]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
* gdb.mi/mi-nsmoribund.exp: Revert back to send_gdb/gdb_expect in
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
3c11dd79
PA
12010-08-25 Pedro Alves <pedro@codesourcery.com>
2
3 * linux-low.c (linux_wait_1): Move non-debugging code out of
4 `debug_threads' control.
5
d20a8ad9
PA
62010-08-25 Pedro Alves <pedro@codesourcery.com>
7
8 * linux-low.c (linux_wait_1): Don't set last_status here.
9 * server.c (push_event, queue_stop_reply_callback): Assert we're
10 not pushing a TARGET_WAITKIND_IGNORE event.
11 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12 (myresume, handle_target_event): Set the thread's last_resume_kind
13 and last_status from the target returned status.
14
964e4306
PA
152010-08-25 Pedro Alves <pedro@codesourcery.com>
16
17 PR threads/10729
18
19 * linux-x86-low.c (update_debug_registers_callback): New.
20 (i386_dr_low_set_addr): Use it.
21 (i386_dr_low_get_addr): New.
22 (i386_dr_low_set_control): Use update_debug_registers_callback.
23 (i386_dr_low_get_control): New.
24 (i386_dr_low_get_status): Adjust.
25 * linux-low.c (linux_stop_lwp): New.
26 * linux-low.h (linux_stop_lwp): Declare.
27
28 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
29 argument instead of a i386_debug_reg_state.
30 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
31 a i386_debug_reg_state.
32 (i386_insert_aligned_watchpoint): Adjust.
33 (i386_remove_aligned_watchpoint): Adjust.
34 (i386_low_stopped_data_address): Read the debug registers from the
35 inferior instead of from the mirrors.
36 * i386-low.h (struct i386_debug_reg_state): Extend comment.
37 (i386_dr_low_get_addr): Declare.
38 (i386_dr_low_get_control): Declare.
39 (i386_dr_low_get_status): Change prototype.
40
41 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
42 (i386_dr_low_get_addr): New.
43 (i386_dr_low_get_control): New.
44 (i386_dr_low_get_status): Adjust prototype. Return
45 dr_status_mirror.
46 (i386_initial_stuff): Clear dr_status_mirror and
47 dr_control_mirror.
48 (i386_get_thread_context): Adjust.
49 (i386_set_thread_context): Adjust.
50 (i386_thread_added): Adjust.
51
5f21a75b
PA
522010-08-24 Pedro Alves <pedro@codesourcery.com>
53
54 * linux-low.h (linux_thread_area): Delete declaration.
55
3e4c1235
TS
562010-08-11 Thomas Schwinge <thomas@codesourcery.com>
57
58 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
59 after its termination.
60
1971b033
PA
612010-08-09 Pedro Alves <pedro@codesourcery.com>
62
63 * linux-low.c (gdb_wants_lwp_stopped): Delete.
64 (gdb_wants_all_stopped): Delete.
65 (linux_wait_1): Don't call them.
66 * server.c (handle_v_cont): Tag all threads as want-stopped.
67 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
68 stopped as "client-wants-stopped".
69
310444ac
PA
702010-07-31 Pedro Alves <pedro@codesourcery.com>
71
72 * Makefile.in (signals_h): New.
73 (server_h): Depend on it.
74 (server.o): Don't depend on $(signals_def).
75 (signals.o): Depend on $(signals_def).
76
a19cae16
JK
772010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
78
79 * Makefile.in (signals_def): New.
80 (server_h): Append include/gdb/signals.h and signals_def.
81 (server.o): Append signals_def.
82
30d50328
JK
832010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
84
85 * server.c (handle_target_event): Use target_signal_to_host for
86 resume_info.sig initialization.
87 * target.h (struct thread_resume) <sig>: New comment.
88
5c3216e2
OS
892010-07-20 Ozkan Sezer <sezeroz@gmail.com>
90
c6f46ca0
OS
91 * server.c (handle_query): strcpy() the returned string from paddress()
92 instead of sprintf().
5c3216e2
OS
93 * utils.c (paddress): Return phex_nz().
94
6bd31874
JB
952010-07-07 Joel Brobecker <brobecker@adacore.com>
96
97 * server.c (handle_v_cont): Call mourn_inferior if process
98 just exited.
99 (myresume): Likewise.
100
0fb4aa4b
PA
1012010-07-01 Pedro Alves <pedro@codesourcery.com>
102
103 Static tracepoints, and integration with UST.
104
105 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
106 * mem-break.c (uninsert_all_breakpoints)
107 (reinsert_all_breakpoints): New.
108 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
109 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
110 (gdb_agent_ust_loaded, helper_thread_id)
111 (gdb_agent_helper_thread_id): New macros.
112 (struct ipa_sym_addresses): Add addr_ust_loaded,
113 addr_helper_thread_id, addr_cmd_buf.
114 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
115 (in_process_agent_loaded_ust): New.
116 (write_e_ust_not_loaded): New.
117 (maybe_write_ipa_ust_not_loaded): New.
118 (struct collect_static_trace_data_action): New.
119 (enum tracepoint_type) <static_tracepoint>: New.
120 (struct tracepoint) <handle>: Mention static tracepoints.
121 (struct static_tracepoint_ctx): New.
122 (CMD_BUF_SIZE): New.
123 (add_tracepoint_action): Handle static tracepoint actions.
124 (unprobe_marker_at): New.
125 (clear_installed_tracepoints): Handle static tracepoints.
126 (cmd_qtdp): Handle static tracepoints.
127 (probe_marker_at): New.
128 (cmd_qtstart): Handle static tracepoints.
129 (response_tracepoint): Handle static tracepoints.
130 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
131 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
132 (get_context_regcache): Handle static tracepoints.
133 (do_action_at_tracepoint): Handle static tracepoint actions.
134 (traceframe_find_block_type): Handle static trace data blocks.
135 (traceframe_read_sdata): New.
136 (download_tracepoints): Download static tracepoint actions.
137 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
138 (GDB_PROBE_NAME): New.
139 (ust_ops): New.
140 (GET_UST_SYM): New.
141 (USTF): New.
142 (dlsym_ust): New.
143 (ust_marker_to_static_tracepoint): New.
144 (gdb_probe): New.
145 (collect_ust_data_at_tracepoint): New.
146 (gdb_ust_probe): New.
147 (UNIX_PATH_MAX, SOCK_DIR): New.
148 (gdb_ust_connect_sync_socket): New.
149 (resume_thread, stop_thread): New.
150 (run_inferior_command): New.
151 (init_named_socket): New.
152 (gdb_ust_socket_init): New.
153 (cstr_to_hexstr): New.
154 (next_st): New.
155 (first_marker, next_marker): New.
156 (response_ust_marker): New.
157 (cmd_qtfstm, cmd_qtsstm): New.
158 (unprobe_marker_at, probe_marker_at): New.
159 (cmd_qtstmat, gdb_ust_thread): New.
160 (gdb_ust_init): New.
161 (initialize_tracepoint_ftlib): Call gdb_ust_init.
162 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
163 (ST_REGENTRY): New.
164 (x86_64_st_collect_regmap): New.
165 (X86_64_NUM_ST_COLLECT_GREGS): New.
166 (AMD64_RIP_REGNUM): New.
167 (supply_static_tracepoint_registers): New.
168 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
169 (ST_REGENTRY): New.
170 (i386_st_collect_regmap): New.
171 (i386_NUM_ST_COLLECT_GREGS): New.
172 (supply_static_tracepoint_registers): New.
173 * server.c (handle_query): Handle qXfer:statictrace:read.
174 <qSupported>: Report support for StaticTracepoints, and
175 qXfer:statictrace:read features.
176 * server.h (traceframe_read_sdata)
177 (supply_static_tracepoint_registers): Declare.
178 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
179 (unpack_varlen_hex): Include in IPA build.
180 * Makefile.in (ustlibs, ustinc): New.
181 (IPA_OBJS): Add remote-utils-ipa.o.
182 ($(IPA_LIB)): Link -ldl and -lpthread.
183 (UST_CFLAGS): New.
184 (IPAGENT_CFLAGS): Add UST_CFLAGS.
185 * config.in, configure: Regenerate.
186
9e4344e5
PA
1872010-06-20 Ian Lance Taylor <iant@google.com>
188 Pedro Alves <pedro@codesourcery.com>
189
190 * linux-x86-low.c (always_true): Delete.
191 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
192 trying to fool the compiler with always_true.
193
c6beb2cb
PA
1942010-06-20 Pedro Alves <pedro@codesourcery.com>
195
196 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
197 conditions in gdbserver.
198
d2ed6730
UW
1992010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
200
201 * spu-low.c (spu_read_memory): Wrap around local store limit.
202 (spu_write_memory): Likewise.
203
4e29fb54
PA
2042010-06-15 Pedro Alves <pedro@codesourcery.com>
205
206 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
207 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
208 LONGEST uses.
209 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
210 uses.
211 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
212 uses with LONGEST uses.
213
6a271cae
PA
2142010-06-14 Stan Shebs <stan@codesourcery.com>
215 Pedro Alves <pedro@codesourcery.com>
216
217 Bytecode compiler.
218
219 * linux-x86-low.c: Include limits.h.
220 (add_insns): New.
221 (always_true): New.
222 (EMIT_ASM): New.
223 (EMIT_ASM32): New.
224 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
225 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
226 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
227 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
228 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
229 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
230 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
231 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
232 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
233 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
234 (amd64_emit_void_call_2): New.
235 (amd64_emit_ops): New.
236 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
237 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
238 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
239 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
240 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
241 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
242 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
243 (i386_emit_call, i386_emit_reg, i386_emit_pop)
244 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
245 (i386_emit_stack_adjust, i386_emit_int_call_1)
246 (i386_emit_void_call_2): New.
247 (i386_emit_ops): New.
248 (x86_emit_ops): New.
249 (the_low_target): Install x86_emit_ops.
250 * server.h (struct emit_ops): New.
251 (get_raw_reg_func_addr): Declare.
252 (current_insn_ptr, emit_error): Declare.
253 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
254 (set_trace_state_variable_value): New defines.
255 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
256 addr_get_trace_state_variable_value and
257 addr_set_trace_state_variable_value.
258 (symbol_list): New fields for get_raw_reg,
259 get_trace_state_variable_value and set_trace_state_variable_value.
260 (condfn): New typedef.
261 (struct tracepoint): New field `compiled_cond'.
262 (do_action_at_tracepoint): Clear compiled_cond.
263 (get_trace_state_variable_value, set_trace_state_variable_value):
264 Export in the IPA.
265 (condition_true_at_tracepoint): If there's a compiled condition,
266 run that.
267 (current_insn_ptr, emit_error): New globals.
268 (struct bytecode_address): New.
269 (get_raw_reg_func_addr): New.
270 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
271 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
272 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
273 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
274 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
275 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
276 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
277 (compile_tracepoint_condition, compile_bytecodes): New.
278 * target.h (emit_ops): Forward declare.
279 (struct target_ops): New field emit_ops.
280 (target_emit_ops): New.
281 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
282 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
283 * linux-low.c (linux_emit_ops): New.
284 (linux_target_ops): Install it.
285 * linux-low.h (struct linux_target_ops): New field emit_ops.
286
92b72907
UW
2872010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
288
289 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
290 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
291
fa593d66
PA
2922010-06-01 Pedro Alves <pedro@codesourcery.com>
293 Stan Shebs <stan@codesourcery.com>
294
295 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
296 (all): Depend on $(extra_libraries).
297 (install-only): Install the IPA.
298 (IPA_OBJS, IPA_LIB): New.
299 (clean): Remove the IPA lib.
300 (IPAGENT_CFLAGS): New.
301 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
302 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
303 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
304 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
305 * configure.ac: Check for atomic builtins support in the compiler.
306 (IPA_DEPFILES, extra_libraries): Define.
307 * configure.srv (ipa_obj): Add description.
308 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
309 (i[34567]86-*-linux*): Set ipa_obj.
310 (x86_64-*-linux*): Set ipa_obj.
311 * linux-low.c (stabilizing_threads): New.
312 (supports_fast_tracepoints): New.
313 (linux_detach): Stabilize threads before detaching.
314 (handle_tracepoints): Handle internal tracing breakpoints. Assert
315 the lwp is either not stabilizing, or is moving out of a jump pad.
316 (linux_fast_tracepoint_collecting): New.
317 (maybe_move_out_of_jump_pad): New.
318 (enqueue_one_deferred_signal): New.
319 (dequeue_one_deferred_signal): New.
320 (linux_wait_for_event_1): If moving out of a jump pad, defer
321 pending signals to later.
322 (linux_stabilize_threads): New.
323 (linux_wait_1): Check if threads need moving out of jump pads, and
324 do it if so.
325 (stuck_in_jump_pad_callback): New.
326 (move_out_of_jump_pad_callback): New.
327 (lwp_running): New.
328 (linux_resume_one_lwp): Handle moving out of jump pads.
329 (linux_set_resume_request): Dequeue deferred signals.
330 (need_step_over_p): Also step over fast tracepoint jumps.
331 (start_step_over): Also uninsert fast tracepoint jumps.
332 (finish_step_over): Also reinsert fast tracepoint jumps.
333 (linux_install_fast_tracepoint_jump): New.
334 (linux_target_ops): Install linux_stabilize_threads and
335 linux_install_fast_tracepoint_jump_pad.
336 * linux-low.h (linux_target_ops) <get_thread_area,
337 install_fast_tracepoint_jump_pad>: New fields.
338 (struct lwp_info) <collecting_fast_tracepoint,
339 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
340 (linux_get_thread_area): Declare.
341 * linux-x86-low.c (jump_insn): New.
342 (x86_get_thread_area): New.
343 (append_insns): New.
344 (push_opcode): New.
345 (amd64_install_fast_tracepoint_jump_pad): New.
346 (i386_install_fast_tracepoint_jump_pad): New.
347 (x86_install_fast_tracepoint_jump_pad): New.
348 (the_low_target): Install x86_get_thread_area and
349 x86_install_fast_tracepoint_jump_pad.
350 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
351 (struct fast_tracepoint_jump): New.
352 (fast_tracepoint_jump_insn): New.
353 (fast_tracepoint_jump_shadow): New.
354 (find_fast_tracepoint_jump_at): New.
355 (fast_tracepoint_jump_here): New.
356 (delete_fast_tracepoint_jump): New.
357 (set_fast_tracepoint_jump): New.
358 (uninsert_fast_tracepoint_jumps_at): New.
359 (reinsert_fast_tracepoint_jumps_at): New.
360 (set_breakpoint_at): Use write_inferior_memory.
361 (uninsert_raw_breakpoint): Use write_inferior_memory.
362 (check_mem_read): Mask out fast tracepoint jumps.
363 (check_mem_write): Mask out fast tracepoint jumps.
364 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
365 (set_fast_tracepoint_jump): Declare.
366 (delete_fast_tracepoint_jump)
367 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
368 (reinsert_fast_tracepoint_jumps_at): Declare.
369 * regcache.c: Don't compile many functions when building the
370 in-process agent library.
371 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
372 the register buffer in the heap.
373 (free_register_cache): If the register buffer isn't owned by the
374 regcache, don't free it.
375 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
376 pre-existing register caches.
377 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
378 type.
379 (convert_ascii_to_int): : Constify `from' parameter type.
380 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
381 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
382 the needed buffer in-place.
383 (relocate_instruction): New.
384 * server.c (handle_query) <qSymbols>: If the target supports
385 tracepoints, give it a chance of looking up symbols. Report
386 support for fast tracepoints.
387 (handle_status): Stabilize threads.
388 (process_serial_event): Adjust.
389 * server.h (struct fast_tracepoint_jump): Forward declare.
390 (struct process_info) <fast_tracepoint_jumps>: New field.
391 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
392 (decode_X_packet, decode_M_packet): Adjust.
393 (relocate_instruction): Declare.
394 (in_process_agent_loaded): Declare.
395 (tracepoint_look_up_symbols): Declare.
396 (struct fast_tpoint_collect_status): Declare.
397 (fast_tracepoint_collecting): Declare.
398 (force_unlock_trace_buffer): Declare.
399 (handle_tracepoint_bkpts): Declare.
400 (initialize_low_tracepoint)
401 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
402 * target.h (struct target_ops) <stabilize_threads,
403 install_fast_tracepoint_jump_pad>: New fields.
404 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
405 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
406 [HAVE_STDINT_H]: Include stdint.h.
407 (trace_debug_1): Rename to ...
408 (trace_vdebug): ... this.
409 (trace_debug): Rename to ...
410 (trace_debug_1): ... this. Add `level' parameter.
411 (trace_debug): New.
412 (ATTR_USED, ATTR_NOINLINE): New.
413 (IP_AGENT_EXPORT): New.
414 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
415 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
416 (about_to_request_buffer_space, trace_buffer_is_full)
417 (stopping_tracepoint, expr_eval_result, error_tracepoint)
418 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
419 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
420 (traceframe_write_count, traceframes_created)
421 (trace_state_variables)
422 New renaming defines.
423 (struct ipa_sym_addresses): New.
424 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
425 (symbol_list): New.
426 (ipa_sym_addrs): New.
427 (all_tracepoint_symbols_looked_up): New.
428 (in_process_agent_loaded): New.
429 (write_e_ipa_not_loaded): New.
430 (maybe_write_ipa_not_loaded): New.
431 (tracepoint_look_up_symbols): New.
432 (debug_threads) [IN_PROCESS_AGENT]: New.
433 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
434 (UNKNOWN_SIDE_EFFECTS): New.
435 (stop_tracing): New.
436 (flush_trace_buffer): New.
437 (stop_tracing_bkpt): New.
438 (flush_trace_buffer_bkpt): New.
439 (read_inferior_integer): New.
440 (read_inferior_uinteger): New.
441 (read_inferior_data_pointer): New.
442 (write_inferior_data_pointer): New.
443 (write_inferior_integer): New.
444 (write_inferior_uinteger): New.
445 (struct collect_static_trace_data_action): Delete.
446 (enum tracepoint_type): New.
447 (struct tracepoint) <type>: New field `type'.
448 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
449 <orig_size, obj_addr_on_target, adjusted_insn_addr>
450 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
451 (tracepoints): Use IP_AGENT_EXPORT.
452 (last_tracepoint): Don't include in the IPA.
453 (stopping_tracepoint): Use IP_AGENT_EXPORT.
454 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
455 (alloced_trace_state_variables): New.
456 (trace_state_variables): Use IP_AGENT_EXPORT.
457 (traceframe_t): Delete unused variable.
458 (circular_trace_buffer): Don't include in the IPA.
459 (trace_buffer_start): Delete.
460 (struct trace_buffer_control): New.
461 (trace_buffer_free): Delete.
462 (struct ipa_trace_buffer_control): New.
463 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
464 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
465 New.
466 (trace_buffer_ctrl): New.
467 (TRACE_BUFFER_CTRL_CURR): New.
468 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
469 Reimplement as macros.
470 (trace_buffer_wrap): Delete.
471 (traceframe_write_count, traceframe_read_count)
472 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
473 (struct tracepoint_hit_ctx) <type>: New field.
474 (struct fast_tracepoint_ctx): New.
475 (memory_barrier): New.
476 (cmpxchg): New.
477 (record_tracepoint_error): Update atomically in the IPA.
478 (clear_inferior_trace_buffer): New.
479 (about_to_request_buffer_space): New.
480 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
481 updating the same buffer.
482 (add_tracepoint): Default the tracepoint's type to trap
483 tracepoint, and orig_size to -1.
484 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
485 internal variables.
486 (create_trace_state_variable): New parameter `gdb'. Handle it.
487 (clear_installed_tracepoints): Clear fast tracepoint jumps.
488 (cmd_qtdp): Handle fast tracepoints.
489 (cmd_qtdv): Adjust.
490 (max_jump_pad_size): New.
491 (gdb_jump_pad_head): New.
492 (get_jump_space_head): New.
493 (claim_jump_space): New.
494 (sort_tracepoints): New.
495 (MAX_JUMP_SIZE): New.
496 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
497 IPA.
498 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
499 support. Upload fast traceframes, and delete internal IPA
500 breakpoints.
501 (stop_tracing_handler): New.
502 (flush_trace_buffer_handler): New.
503 (cmd_qtstop): Upload fast tracepoints.
504 (response_tracepoint): Handle fast tracepoints.
505 (tracepoint_finished_step): Upload fast traceframes. Set the
506 tracepoint hit context's tracepoint type.
507 (handle_tracepoint_bkpts): New.
508 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
509 type. Add comment about fast tracepoints.
510 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
511 non-existing action_str field.
512 (get_context_regcache): Handle fast tracepoints.
513 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
514 to the regcache.
515 (fast_tracepoint_from_jump_pad_address): New.
516 (fast_tracepoint_from_ipa_tpoint_address): New.
517 (collecting_t): New.
518 (force_unlock_trace_buffer): New.
519 (fast_tracepoint_collecting): New.
520 (collecting): New.
521 (gdb_collect): New.
522 (write_inferior_data_ptr): New.
523 (target_tp_heap): New.
524 (target_malloc): New.
525 (download_agent_expr): New.
526 (UALIGN): New.
527 (download_tracepoints): New.
528 (download_trace_state_variables): New.
529 (upload_fast_traceframes): New.
530 (IPA_FIRST_TRACEFRAME): New.
531 (IPA_NEXT_TRACEFRAME_1): New.
532 (IPA_NEXT_TRACEFRAME): New.
533 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
534 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
535 (gdb_jump_pad_buffer_end): New.
536 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
537 (initialize_tracepoint): Adjust.
538 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
539 buffer. Initialize the low module.
540 * utils.c (PREFIX, TOOLNAME): New.
541 (malloc_failure): Use PREFIX.
542 (error): In the IPA, an error causes an exit.
543 (fatal, warning): Use PREFIX.
544 (internal_error): Use TOOLNAME.
545 (NUMCELLS): Increase to 10.
546 * configure, config.in: Regenerate.
547
d149dd1d
PA
5482010-06-01 Pedro Alves <pedro@codesourcery.com>
549
550 * server.c (handle_query) <qSupported>: Do two passes over the
551 qSupported string to avoid nesting strtok.
552
f6528abd
JK
5532010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
554
555 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
556 (CDEPS): New.
557 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
558 -Wl,--dynamic-list.
559 * configure: Regenerate.
560 * proc-service.list: New.
561
ca2a87a0
JK
5622010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
563
564 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
565 New comment.
566
363a6e9f
OS
5672010-05-26 Ozkan Sezer <sezeroz@gmail.com>
568
569 * gdbreplay.c (remote_open): Check error return from socket() call by
570 its equality to -1 not by it being negative.
571 * remote-utils.c (remote_open): Likewise.
572
d23b6cb1
PA
5732010-05-23 Pedro Alves <pedro@codesourcery.com>
574
575 * config.h: Regenerate.
576
28d3cf85
MK
5772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
578
579 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
580 doesn't provide PTRACE_GET_THREAD_AREA.
581
fea36a59
MK
5822010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
583
584 * linux-m68k-low.c: Include <asm/ptrace.h>
585 (ps_get_thread_area): Implement.
586
24b066ba
DE
5872010-05-03 Doug Evans <dje@google.com>
588
589 * event-loop.c (struct callback_event): New struct.
590 (callback_list): New global.
591 (append_callback_event, delete_callback_event): New functions.
592 (process_callback): New function.
593 (start_event_loop): Call it.
594 * remote-utils.c (NOT_SCHEDULED): Define.
595 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
596 moved out of readchar.
597 (readchar): Rewrite. Call reschedule before returning.
598 (reset_readchar): New function.
599 (remote_close): Call it.
600 (process_remaining, reschedule): New functions.
601 * server.h (callback_handler_func): New typedef.
602 (append_callback_event, delete_callback_event): Declare.
603
9836d6ea
PA
6042010-05-03 Pedro Alves <pedro@codesourcery.com>
605
606 * proc-service.c (ps_pglobal_lookup): Use
607 thread_db_look_up_one_symbol.
608 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
609 parameter. Use it instead of all_symbols_looked_up.
610 * server.h (struct process_info) <all_symbols_looked_up>: Delete
611 field.
612 (all_symbols_looked_up): Don't declare.
613 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
614 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
615 field.
616 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
617 Set all_symbols_looked_up here.
618 (thread_db_look_up_one_symbol): New.
619 (thread_db_get_tls_address): Adjust.
620 (thread_db_load_search, try_thread_db_load_1): Always allocate the
621 thread_db object on the heap, and tentatively set it in the
622 process structure.
623 (thread_db_init): Don't set all_symbols_looked_up here.
624 * linux-low.h (thread_db_look_up_one_symbol): Declare.
625
7984d532
PA
6262010-05-03 Pedro Alves <pedro@codesourcery.com>
627
628 * linux-low.c (linux_kill, linux_detach): Adjust.
629 (status_pending_p_callback): Remove redundant statement. Check
630 for !TARGET_WAITIKIND_IGNORE, instead of
631 TARGET_WAITKIND_STOPPED.
632 (handle_tracepoints): Make sure LWP is locked. Adjust.
633 (linux_wait_for_event_1): Adjust.
634 (linux_cancel_breakpoints): New.
635 (unsuspend_one_lwp): New.
636 (unsuspend_all_lwps): New.
637 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
638 (send_sigstop_callback): Change return type to int, add new
639 `except' parameter and handle it.
640 (suspend_and_send_sigstop_callback): New.
641 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
642 pass them down. If SUSPEND, also increment the lwp's suspend
643 count.
644 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
645 (need_step_over_p): Don't consider suspended LWPs.
646 (start_step_over): Adjust.
647 (proceed_one_lwp): Change return type to int, add new `except'
648 parameter and handle it.
649 (unsuspend_and_proceed_one_lwp): New.
650 (proceed_all_lwps): Use find_inferior instead of
651 for_each_inferior.
652 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
653 also decrement the suspend count of LWPs. Pass `except' down,
654 instead of hacking its suspend count.
655 (linux_pause_all): Add `freeze' parameter. Adjust.
656 (linux_unpause_all): New.
657 (linux_target_ops): Install linux_unpause_all.
658 * server.c (handle_status): Adjust.
659 * target.h (struct target_ops): New fields `unpause_all' and
660 `cancel_breakpoints'. Add new parameter to `pause_all'.
661 (pause_all): Add new `freeze' parameter.
662 (unpause_all): New.
663 (cancel_breakpoints): New.
664 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
665 cancel breakpoints.
666 (cmd_qtstart): Pause threads.
667 (stop_tracing): Pause threads, and cancel breakpoints.
668 * win32-low.c (win32_target_ops): Adjust.
669
e471f25b
PA
6702010-05-03 Pedro Alves <pedro@codesourcery.com>
671
672 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
673 the inferior right away from here...
674 (linux_wait_1): ... to here, and adjust to check the thread's
675 last_resume_kind instead of the lwp's step or stop_expected flags.
676
1915ef4f
PA
6772010-05-02 Pedro Alves <pedro@codesourcery.com>
678
679 * README: Use consistent `GDB' and `GDBserver' spellings.
680
f9e39928
PA
6812010-05-02 Pedro Alves <pedro@codesourcery.com>
682
683 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
684 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
685 (linux_detach_one_lwp): Assume the lwp is stopped.
686 (any_thread_of): Delete.
687 (linux_detach): Stop all lwps here. Don't blindly delete all
688 breakpoints.
689 (delete_lwp_callback): New.
690 (linux_mourn): Delete all lwps of the process that is gone.
691 (linux_wait_1): Don't delete the last lwp of the process here.
692 * mem-break.h (mark_breakpoints_out): Declare.
693 * mem-break.c (mark_breakpoints_out): New.
694 (free_all_breakpoints): Use it.
695 * server.c (handle_target_event): If the process is gone, mark
696 breakpoints out.
697 * thread-db.c (struct thread_db) <create_bp>: New field.
698 (thread_db_enable_reporting): Fix prototype. Store a thread event
699 breakpoint reference in the thread_db struct.
700 (thread_db_load_search): Clear the thread_db object.
701 (try_thread_db_load_1): Ditto.
702 (switch_to_process): New.
703 (disable_thread_event_reporting): Use it.
704 (remove_thread_event_breakpoints): New.
705 (thread_db_detach, thread_db_mourn): Use it.
706
1e7fc18c
PA
7072010-05-01 Pedro Alves <pedro@codesourcery.com>
708
709 * linux-low.c (linux_enable_event_reporting): New.
710 (linux_wait_for_event_1, handle_extended_wait): Use it.
711
02fc4de7
PA
7122010-04-30 Pedro Alves <pedro@codesourcery.com>
713
714 * linux-low.c (linux_kill_one_lwp, linux_kill)
715 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
716 (send_sigstop): Take an lwp_info as parameter instead. Queue a
717 SIGSTOP even if the LWP is stopped.
718 (send_sigstop_callback): New.
719 (stop_all_lwps): Use send_sigstop_callback instead.
720 (linux_resume_one_thread): Adjust.
721 (proceed_one_lwp): Still proceed an LWP that the client has
722 requested to stop, if we haven't reported it as stopped yet. Make
723 sure that LWPs the client want stopped, have a pending SIGSTOP.
724
bc3b5632
DE
7252010-04-26 Doug Evans <dje@google.com>
726
ae1ada35
DE
727 * server.c (handle_general_set): Make static.
728
bc3b5632
DE
729 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
730 Print received char after testing for error/eof instead of before.
731 (input_interrupt): Tweak comment.
732
65730243
DE
7332010-04-23 Doug Evans <dje@google.com>
734
735 * server.c (start_inferior): Print inferior argv if --debug.
736
a8ae7dc0
AR
7372010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
738
739 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
740 * nto-x86-low.c: Include server.h
741
1c07cc19
PM
7422010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
743
744 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
745 be consistent with other sources of this directory.
746 (init_registers_amd64): Correct name of source file of this function
747 in the comment.
748
e0a61e09
PM
7492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
750
751 * configure.srv (x86_64-*-mingw*): New configuration for Windows
752 64-bit executables.
753
54709339
PM
7542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
755
756 * win32-i386-low.c: Add 64-bit support.
757 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
758 (init_registers_amd64): Declare.
759 (mappings): Add 64-bit version of array.
760 (init_windows_x86): New function.
761 (the_low_target): Change init_arch field to init_windows_x86.
762
e8f0053d
PM
7632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
764
765 * win32-low.c: Adapt to support also 64-bit architecture.
766 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
767 (get_image_name): Use SIZE_T type for local variable `done'.
768 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
769 (toolhelp_get_dll_name): Idem.
770 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
771 Use uintptr_t typecast to avoid warning.
772 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
773 (handle_exception): Use phex_nz to avoid warning.
774 (win32_wait): Remove unused local variable `process'.
775
c481e77e
PM
7762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
777
778 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
779 `amd64-avx.o'.
780
12ea4b69
PM
7812010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
782
783 * configure.ac: Use `ws2_32' library for srv_mingw.
784 * configure: Regenerate.
785 * gdbreplay.c: Include winsock2.h instead of winsock.h.
786 * remote-utils.c: Likewise.
787
f6d1620c
L
7882010-04-17 H.J. Lu <hongjiu.lu@intel.com>
789
790 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
791 if __x86_64__ is defined.
792
8e642873
PM
7932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
794
795 * configure: Regenerate.
796
711e434b
PM
7972010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
798
799 * server.c (handle_query): Handle 'qGetTIBAddr' query.
800 * target.h (target_ops): New get_tib_address field.
801 * win32-low.h (win32_thread_info): Add thread_local_base field.
802 * win32-low.c (child_add_thread): Add tlb argument.
803 Set thread_local_base field to TLB.
804 (get_child_debug_event): Adapt to child_add_thread change.
805 (win32_get_tib_address): New function.
806 (win32_target_ops): Set get_tib_address field to
807 win32_get_tib_address.
808 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
809
505106cd
PA
8102010-04-12 Pedro Alves <pedro@codesourcery.com>
811
505106cd
PA
812 * linux-low.c (linux_mourn): Also remove the process.
813 * server.c (handle_target_event): Don't remove the process here.
814 * nto-low.c (nto_mourn): New.
815 (nto_target_ops): Install it.
816 * spu-low.c (spu_mourn): New.
817 (spu_target_ops): Install it.
818 * win32-low.c (win32_mourn): New.
819 (win32_target_ops): Install it.
820
e8470a06
PA
8212010-04-12 Pedro Alves <pedro@codesourcery.com>
822
823 * server.h (buffer_xml_printf): Remove redundant `;'.
824
45ba0d02
PA
8252010-04-12 Pedro Alves <pedro@codesourcery.com>
826
827 * regcache.c (set_register_cache): Invalidate regcaches before
828 changing the register cache layout.
829 (regcache_invalidate_one): Allow a NULL regcache.
830 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
831 regcaches before changing the register cache layout or the target
832 regsets.
833
59e04013
L
8342010-04-12 H.J. Lu <hongjiu.lu@intel.com>
835
836 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
837 variable warning on Linux/x86-64.
838
8336d594
PA
8392010-04-11 Pedro Alves <pedro@codesourcery.com>
840
841 GDBserver disconnected tracing support.
842
843 * linux-low.c (linux_remove_process): Delete.
844 (add_lwp): Don't set last_resume_kind here.
845 (linux_kill): Use `mourn'.
846 (linux_detach): Use `thread_db_detach', and `mourn'.
847 (linux_mourn): New.
848 (linux_attach_lwp_1): Adjust comment.
849 (linux_attach): last_resume_kind moved the thread_info; adjust.
850 (status_pending_p_callback): Adjust.
851 (linux_wait_for_event_1): Adjust.
852 (count_events_callback, select_singlestep_lwp_callback)
853 (select_event_lwp_callback, cancel_breakpoints_callback)
854 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
855 (proceed_one_lwp): Adjust.
856 (linux_async): Add debug output.
857 (linux_thread_stopped): New.
858 (linux_pause_all): New.
859 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
860 linux_pause_all.
861 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
862 (thread_db_free): Delete declaration.
863 (thread_db_detach, thread_db_mourn): Declare.
864 * thread-db.c (thread_db_init): Use thread_db_mourn.
865 (thread_db_free): Delete, split in two.
866 (disable_thread_event_reporting): New.
867 (thread_db_detach): New.
868 (thread_db_mourn): New.
869
870 * server.h (struct thread_info) <last_resume_kind>: New field.
871 <attached>: Add comment.
872 <gdb_detached>: New field.
873 (handler_func): Change return type to int.
874 (handle_serial_event, handle_target_event): Ditto.
875 (gdb_connected): Declare.
876 (tracing): Delete.
877 (disconnected_tracing): Declare.
878 (stop_tracing): Declare.
879
880 * server.c (handle_query) <qSupported>: Report support for
881 disconnected tracing.
882 (queue_stop_reply_callback): Account for running threads.
883 (gdb_wants_thread_stopped): New.
884 (gdb_wants_all_threads_stopped): New.
885 (gdb_reattached_process): New.
886 (handle_status): Clear the `gdb_detached' flag of all processes.
887 In all-stop, stop all threads.
888 (main): Be sure to leave tfind mode. Handle disconnected tracing.
889 (process_serial_event): If the remote connection breaks, or if an
890 exit was forced with "monitor exit", force an event loop exit.
891 Handle disconnected tracing on detach.
892 (handle_serial_event): Adjust.
893 (handle_target_event): If GDB isn't connected, forward events back
894 to the inferior, unless the last process exited, in which case,
895 exit gdbserver. Adjust interface.
896
897 * remote-utils.c (remote_open): Don't block in accept. Instead
898 register an event loop source on the listen socket file
899 descriptor. Refactor bits into ...
900 (listen_desc): ... this new global.
901 (gdb_connected): ... this new function.
902 (enable_async_notification): ... this new function.
903 (handle_accept_event): ... this new function.
904 (remote_close): Clear remote_desc.
905
906 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
907
908 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
909 New fields.
910 (mourn_inferior): Define.
911 (target_process_qsupported): Avoid the dangling else problem.
912 (thread_stopped): Define.
913 (pause_all): Define.
914 (target_waitstatus_to_string): Declare.
915 * target.c (target_waitstatus_to_string): New.
916
917 * tracepoint.c (tracing): Make extern.
918 (disconnected_tracing): New.
919 (stop_tracing): Make extern. Handle tracing stops due to GDB
920 disconnecting.
921 (cmd_qtdisconnected): New.
922 (cmd_qtstatus): Report disconnected tracing status in trace reply.
923 (handle_tracepoint_general_set): Handle QTDisconnected.
924
925 * event-loop.c (event_handler_func): Change return type to int.
926 (process_event): Bail out if the event handler wants the event
927 loop to stop.
928 (handle_file_event): Ditto.
929 (start_event_loop): Bail out if the event handler wants the event
930 loop to stop.
931
932 * nto-low.c (nto_target_ops): Adjust.
933 * spu-low.c (spu_wait): Don't remove the process here.
934 (spu_target_ops): Adjust.
935 * win32-low.c (win32_wait): Don't remove the process here.
936 (win32_target_ops): Adjust.
937
5d267c4c
PA
9382010-04-11 Pedro Alves <pedro@codesourcery.com>
939
940 * regcache.c (realloc_register_cache): Invalidate inferior's
941 regcache before recreating it.
942
623ccd72
PA
9432010-04-09 Pedro Alves <pedro@codesourcery.com>
944
945 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
946
219f2f23
PA
9472010-04-09 Stan Shebs <stan@codesourcery.com>
948 Pedro Alves <pedro@codesourcery.com>
949
950 * server.h (LONGEST): New.
951 (struct thread_info) <while_stepping>: New field.
952 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
953 Declare.
954 (initialize_tracepoint, handle_tracepoint_general_set)
955 (handle_tracepoint_query, tracepoint_finished_step)
956 (tracepoint_was_hit, release_while_stepping_state_list):
957 (current_traceframe): Declare.
958 * server.c (handle_general_set): Handle tracepoint packets.
959 (read_memory): New.
960 (write_memory): New.
961 (handle_search_memory_1): Use read_memory.
962 (handle_query): Report support for conditional tracepoints, trace
963 state variables, and tracepoint sources. Handle tracepoint
964 queries.
965 (main): Initialize the tracepoints module.
966 (process_serial_event): Handle traceframe reads/writes.
967
968 * linux-low.c (handle_tracepoints): New.
969 (linux_wait_1): Call it.
970 (linux_resume_one_lwp): Handle while-stepping.
971 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
972 (linux_target_ops): Install them.
973 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
974 New field.
975 * linux-x86-low.c (x86_supports_tracepoints): New.
976 (the_low_target). Install it.
977
978 * mem-break.h (delete_breakpoint): Declare.
979 * mem-break.c (delete_breakpoint): Make external.
980
981 * target.h (struct target_ops): Add `supports_tracepoints',
982 `read_pc', and `write_pc' fields.
983 (target_supports_tracepoints): Define.
984 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
985 (phex_nz): New.
986
987 * regcache.h (struct regcache) <registers_owned>: New field.
988 (init_register_cache, regcache_cpy): Declare.
989 (regcache_read_pc, regcache_write_pc): Declare.
990 (register_cache_size): Declare.
991 (supply_regblock): Declare.
992 * regcache.c (init_register_cache): New.
993 (new_register_cache): Use it.
994 (regcache_cpy): New.
995 (register_cache_size): New.
996 (supply_regblock): New.
997 (regcache_read_pc, regcache_write_pc): New.
998
999 * tracepoint.c: New.
1000
1001 * Makefile.in (OBS): Add tracepoint.o.
1002 (tracepoint.o): New rule.
1003
3a13a53b
L
10042010-04-08 H.J. Lu <hongjiu.lu@intel.com>
1005
1006 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
1007 (i386-mmx.o): New.
1008 (i386-mmx.c): Likewise.
1009 (i386-mmx-linux.o): Likewise.
1010 (i386-mmx-linux.c): Likewise.
1011
1012 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
1013 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
1014 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
1015 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
1016
1017 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
1018 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
1019 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
1020
1570b33e
L
10212010-04-07 H.J. Lu <hongjiu.lu@intel.com>
1022
1023 * Makefile.in (clean): Updated.
1024 (i386-avx.o): New.
1025 (i386-avx.c): Likewise.
1026 (i386-avx-linux.o): Likewise.
1027 (i386-avx-linux.c): Likewise.
1028 (amd64-avx.o): Likewise.
1029 (amd64-avx.c): Likewise.
1030 (amd64-avx-linux.o): Likewise.
1031 (amd64-avx-linux.c): Likewise.
1032
1033 * configure.srv (srv_i386_regobj): Add i386-avx.o.
1034 (srv_i386_linux_regobj): Add i386-avx-linux.o.
1035 (srv_amd64_regobj): Add amd64-avx.o.
1036 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
1037 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
1038 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
1039 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
1040 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
1041 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
1042 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
1043
1044 * i387-fp.c: Include "i386-xstate.h".
1045 (i387_xsave): New.
1046 (i387_cache_to_xsave): Likewise.
1047 (i387_xsave_to_cache): Likewise.
1048 (x86_xcr0): Likewise.
1049
1050 * i387-fp.h (i387_cache_to_xsave): Likewise.
1051 (i387_xsave_to_cache): Likewise.
1052 (x86_xcr0): Likewise.
1053
1054 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
1055 * linux-crisv32-low.c (target_regsets): Likewise.
1056 * linux-m68k-low.c (target_regsets): Likewise.
1057 * linux-mips-low.c (target_regsets): Likewise.
1058 * linux-ppc-low.c (target_regsets): Likewise.
1059 * linux-s390-low.c (target_regsets): Likewise.
1060 * linux-sh-low.c (target_regsets): Likewise.
1061 * linux-sparc-low.c (target_regsets): Likewise.
1062 * linux-xtensa-low.c (target_regsets): Likewise.
1063
1064 * linux-low.c: Include <sys/uio.h>.
1065 (regsets_fetch_inferior_registers): Support nt_type.
1066 (regsets_store_inferior_registers): Likewise.
1067 (linux_process_qsupported): New.
1068 (linux_target_ops): Add linux_process_qsupported.
1069
1070 * linux-low.h (regset_info): Add nt_type.
1071 (linux_target_ops): Add process_qsupported.
1072
1073 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
1074 and <sys/uio.h>.
1075 (init_registers_i386_avx_linux): New.
1076 (init_registers_amd64_avx_linux): Likewise.
1077 (xmltarget_i386_linux_no_xml): Likewise.
1078 (xmltarget_amd64_linux_no_xml): Likewise.
1079 (PTRACE_GETREGSET): Likewise.
1080 (PTRACE_SETREGSET): Likewise.
1081 (x86_fill_xstateregset): Likewise.
1082 (x86_store_xstateregset): Likewise.
1083 (use_xml): Likewise.
1084 (x86_linux_update_xmltarget): Likewise.
1085 (x86_linux_process_qsupported): Likewise.
1086 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
1087 (x86_arch_setup): Don't call init_registers_amd64_linux nor
1088 init_registers_i386_linux here. Call
1089 x86_linux_update_xmltarget.
1090 (the_low_target): Add x86_linux_process_qsupported.
1091
1092 * server.c (handle_query): Call target_process_qsupported.
1093
1094 * target.h (target_ops): Add process_qsupported.
1095 (target_process_qsupported): New.
1096
fc7238bb
PA
10972010-04-03 Pedro Alves <pedro@codesourcery.com>
1098
1099 * inferiors.c (add_thread): Set last_status kind to
1100 TARGET_WAITKIND_IGNORE.
1101 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
1102 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
1103 (linux_wait_1): Move `thread' local definition to block that uses
1104 it. Don't NULL initialize `event_child'.
1105 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
1106 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
1107 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
1108
bdabb078
PA
11092010-04-01 Pedro Alves <pedro@codesourcery.com>
1110
1111 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
1112 an extended waitstatus, or by a watchpoint.
1113 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
1114 thread was stepping or has been stopped by a watchpoint.
1115
d3bbe7a0
PA
11162010-04-01 Pedro Alves <pedro@codesourcery.com>
1117
1118 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
1119 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
1120 of another, then delete the previous, and validate all
1121 breakpoints.
1122 (validate_inserted_breakpoint): New.
1123 (delete_disabled_breakpoints): New.
1124 (validate_breakpoints): New.
1125 (check_mem_read): Validate breakpoints before trusting their
1126 shadow. Delete disabled breakpoints.
1127 (check_mem_write): Validate breakpoints before trusting they
1128 should be inserted. Delete disabled breakpoints.
1129 * mem-break.h (validate_breakpoints):
1130 * server.c (handle_query): Validate breakpoints when we see a
1131 qSymbol query.
1132
8b07ae33
PA
11332010-04-01 Pedro Alves <pedro@codesourcery.com>
1134
1135 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
1136 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
1137 if we could tell there's a GDB breakpoint at stop_pc.
1138 (need_step_over_p): Don't do a step over if we find a GDB
1139 breakpoint at the resume PC.
1140
1141 * mem-break.c (struct raw_breakpoint): New.
1142 (enum bkpt_type): New type `gdb_breakpoint'.
1143 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
1144 fields. New field `raw'.
1145 (find_raw_breakpoint_at): New.
1146 (set_raw_breakpoint_at): Handle refcounting. Create a raw
1147 breakpoint instead.
1148 (set_breakpoint_at): Adjust.
1149 (delete_raw_breakpoint): New.
1150 (release_breakpoint): New.
1151 (delete_breakpoint): Rename to...
1152 (delete_breakpoint_1): ... this. Add proc parameter. Use
1153 release_breakpoint. Return ENOENT.
1154 (delete_breakpoint): Reimplement.
1155 (find_breakpoint_at): Delete.
1156 (find_gdb_breakpoint_at): New.
1157 (delete_breakpoint_at): Delete.
1158 (set_gdb_breakpoint_at): New.
1159 (delete_gdb_breakpoint_at): New.
1160 (gdb_breakpoint_here): New.
1161 (set_reinsert_breakpoint): Use release_breakpoint.
1162 (uninsert_breakpoint): Rename to ...
1163 (uninsert_raw_breakpoint): ... this.
1164 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
1165 (reinsert_raw_breakpoint): Change parameter type to
1166 raw_breakpoint.
1167 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
1168 instead.
1169 (check_breakpoints): Adjust. Use release_breakpoint.
1170 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
1171 (breakpoint_inserted_here): Ditto.
1172 (check_mem_read): Adjust to iterate over raw breakpoints instead.
1173 Don't trust the breakpoint's shadow if it is not inserted.
1174 (check_mem_write): Adjust to iterate over raw breakpoints instead.
1175 (delete_all_breakpoints): Adjust.
1176 (free_all_breakpoints): Mark all breakpoints as uninserted, and
1177 use delete_breakpoint_1.
1178
1179 * mem-break.h (breakpoints_supported): Delete declaration.
1180 (set_gdb_breakpoint_at): Declare.
1181 (gdb_breakpoint_here): Declare.
1182 (delete_breakpoint_at): Delete.
1183 (delete_gdb_breakpoint_at): Declare.
1184
1185 * server.h (struct raw_breakpoint): Forward declare.
1186 (struct process_info): New field `raw_breakpoints'.
1187
1188 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
1189 breakpoints.
1190
6bf5e0ba
PA
11912010-03-24 Pedro Alves <pedro@codesourcery.com>
1192
1193 * linux-low.c (status_pending_p_callback): Fix comment.
1194 (linux_wait_for_event_1): Move most of the internal breakpoint
1195 handling from here...
1196 (linux_wait_1): ... to here.
1197 (count_events_callback): New.
1198 (select_singlestep_lwp_callback): New.
1199 (select_event_lwp_callback): New.
1200 (cancel_breakpoints_callback): New.
1201 (select_event_lwp): New.
1202 (linux_wait_1): Simplify internal breakpoint handling. Give equal
1203 priority to all LWPs that have had events that should be reported
1204 to the client. Cancel breakpoints when about to reporting the
1205 event to the client, not while stopping lwps. No longer cancel
1206 finished single-steps here.
1207 (cancel_finished_single_step): Delete.
1208 (cancel_finished_single_steps): Delete.
1209
414a389f
PA
12102010-03-24 Pedro Alves <pedro@codesourcery.com>
1211
1212 * mem-break.c (enum bkpt_type): New.
1213 (struct breakpoint): New field `type'.
1214 (set_breakpoint_at): Change return type to struct breakpoint
1215 pointer. Set type to `other_breakpoint' by default.
1216 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1217 in the breakpoint list.
1218 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1219 (reinsert_breakpoint): Rename to ...
1220 (reinsert_raw_breakpoint): ... this.
1221 (reinsert_breakpoints_at): Adjust.
1222 * mem-break.h (struct breakpoint): Declare.
1223 (set_breakpoint_at): Change return type to struct breakpoint
1224 pointer.
1225
2280c721
PA
12262010-03-24 Pedro Alves <pedro@codesourcery.com>
1227
1228 * server.c (handle_query): Assign, not compare.
1229
d50171e4
PA
12302010-03-24 Pedro Alves <pedro@codesourcery.com>
1231
1232 Teach linux gdbserver to step-over-breakpoints.
1233
1234 * linux-low.c (can_hardware_single_step): New.
1235 (supports_breakpoints): New.
1236 (handle_extended_wait): If stopping threads, read the stop pc of
1237 the new cloned LWP.
1238 (get_pc): New.
1239 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1240 low target doesn't support retrieving the PC.
1241 (add_lwp): Set last_resume_kind to resume_continue.
1242 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1243 (linux_attach): Don't clear stop_expected. Set the lwp's
1244 last_resume_kind to resume_stop.
1245 (linux_detach_one_lwp): Don't check for removed breakpoints.
1246 (check_removed_breakpoint): Delete.
1247 (status_pending_p): Rename to ...
1248 (status_pending_p_callback): ... this. Don't check for removed
1249 breakpoints. Don't consider threads that are stopped from GDB's
1250 perspective.
1251 (linux_wait_for_lwp): Always read the stop_pc here.
1252 (cancel_breakpoint): New.
1253 (step_over_bkpt): New global.
1254 (linux_wait_for_event_1): Implement stepping over breakpoints.
1255 (gdb_wants_lwp_stopped): New.
1256 (gdb_wants_all_stopped): New.
1257 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1258 single-step traps here. Store the thread's last reported target
1259 wait status.
1260 (send_sigstop): Don't clear stop_expected. Always set it,
1261 instead.
1262 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1263 (cancel_finished_single_step): New.
1264 (cancel_finished_single_steps): New.
1265 (wait_for_sigstop): Don't cancel finished single-step traps here.
1266 (linux_resume_one_lwp): Don't check for removed breakpoints.
1267 Don't set `step' on non-hardware step archs.
1268 (linux_set_resume_request): Ignore resume_stop requests if already
1269 stopping or stopped. Set the lwp's last_resume_kind.
1270 (resume_status_pending_p): Don't check for removed breakpoints.
1271 (need_step_over_p): New.
1272 (start_step_over): New.
1273 (finish_step_over): New.
1274 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1275 requests. Clear the thread's last reported target waitstatus.
1276 Don't use the `suspended' flag. Don't consider pending breakpoints.
1277 (linux_resume): Start a step-over if necessary.
1278 (proceed_one_lwp): New.
1279 (proceed_all_lwps): New.
1280 (unstop_all_lwps): New.
1281 * linux-low.h (struct lwp_info): Rewrite comment for the
1282 `suspended' flag. Add the `stop_pc' field. Delete the
1283 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1284 Add `'last_resume_kind' and `need_step_over' fields.
1285 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1286 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1287 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1288 (set_raw_breakpoint_at): New.
1289 (set_breakpoint_at): Rewrite to use it.
1290 (reinsert_breakpoint_handler): Delete.
1291 (set_reinsert_breakpoint): New.
1292 (reinsert_breakpoint_by_bp): Delete.
1293 (delete_reinsert_breakpoints): New.
1294 (uninsert_breakpoint): Rewrite.
1295 (uninsert_breakpoints_at): New.
1296 (reinsert_breakpoint): Rewrite.
1297 (reinsert_breakpoints_at): New.
1298 (check_breakpoints): Rewrite.
1299 (breakpoint_here): New.
1300 (breakpoint_inserted_here): New.
1301 (check_mem_read): Adjust.
1302 * mem-break.h (breakpoints_supported, breakpoint_here)
1303 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1304 (reinsert_breakpoint_by_bp): Delete declaration.
1305 (delete_reinsert_breakpoints): Declare.
1306 (reinsert_breakpoint): Delete declaration.
1307 (reinsert_breakpoints_at): Declare.
1308 (uninsert_breakpoint): Delete declaration.
1309 (uninsert_breakpoints_at): Declare.
1310 (check_breakpoints): Adjust prototype.
1311 * server.h: Adjust include order.
1312 (struct thread_info): Declare here. Add a `last_status' field.
1313
30ba68cb
MS
13142010-03-23 Michael Snyder <msnyder@vmware.com>
1315
1316 * server.c (crc32): New function.
1317 (handle_query): Add handling for 'qCRC:' request.
1318
b9a881c2
PA
13192010-03-23 Pedro Alves <pedro@codesourcery.com>
1320
1321 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1322 lwp had been stopped by a watchpoint.
1323
e92d13d5
PA
13242010-03-16 Pedro Alves <pedro@codesourcery.com>
1325
1326 * server.h (internal_error): Declare.
1327 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1328 * utils.c (internal_error): New function.
1329
64daa791
AS
13302010-03-15 Andreas Schwab <schwab@redhat.com>
1331
1332 * configure.srv: Fix typo setting srv_regobj.
1333
f52cd8cd
PA
13342010-03-15 Pedro Alves <pedro@codesourcery.com>
1335
1336 * linux-low.c (fetch_register): Avoid passing a non string literal
1337 format to `error'.
1338 (usr_store_inferior_registers): Ditto.
1339
93ae6fdc
PA
13402010-03-14 Pedro Alves <pedro@codesourcery.com>
1341
1342 * linux-low.c (linux_write_memory): Bail out early if peeking
1343 memory failed.
1344
c3adc08c
PA
13452010-03-14 Pedro Alves <pedro@codesourcery.com>
1346
1347 * linux-low.h (struct lwp_info): New fields
1348 `stopped_by_watchpoint' and `stopped_data_address'.
1349 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1350 here, and cache them in the lwp object.
1351 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1352 directly.
1353 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1354 field.
1355 (linux_stopped_by_watchpoint): Rewrite.
1356 (linux_stopped_data_address): Rewrite.
1357
bce522a2
PA
13582010-03-06 Simo Melenius <simo.melenius@iki.fi>
1359
1360 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1361 switching the current inferior, not before.
1362
90884b2b
L
13632010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1364
1365 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1366 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1367 i386-linux.c and amd64-linux.c.
1368 (reg-i386.o): Removed.
1369 (reg-i386.c): Likewise.
1370 (reg-i386-linux.o): Likewise.
1371 (reg-i386-linux.c): Likewise.
1372 (reg-x86-64.o): Likewise.
1373 (reg-x86-64.c): Likewise.
1374 (reg-x86-64-linux.o): Likewise.
1375 (reg-x86-64-linux.c): Likewise.
1376 (i386.o): New.
1377 (i386.c): Likewise.
1378 (i386-linux.o): Likewise.
1379 (i386-linux.c): Likewise.
1380 (amd64.o): Likewise.
1381 (amd64.c): Likewise.
1382 (amd64-linux.o): Likewise.
1383 (amd64-linux.c): Likewise.
1384
1385 * configure.srv (srv_i386_regobj): New.
1386 (srv_i386_linux_regobj): Likewise.
1387 (srv_amd64_regobj): Likewise.
1388 (srv_amd64_linux_regobj): Likewise.
1389 (srv_i386_32bit_xmlfiles): Likewise.
1390 (srv_i386_64bit_xmlfiles): Likewise.
1391 (srv_i386_xmlfiles): Likewise.
1392 (srv_amd64_xmlfiles): Likewise.
1393 (srv_i386_linux_xmlfiles): Likewise.
1394 (srv_amd64_linux_xmlfiles): Likewise.
1395 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1396 srv_xmlfiles to $srv_i386_xmlfiles.
1397 (i[34567]86-*-mingw32ce*): Likewise.
1398 (i[34567]86-*-mingw*): Likewise.
1399 (i[34567]86-*-nto*): Likewise.
1400 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1401 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1402 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1403 (x86_64-*-linux*): Likewise.
1404
1405 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1406 (init_registers_amd64_linux): New.
1407 (x86_arch_setup): Replace init_registers_x86_64_linux with
1408 init_registers_amd64_linux.
1409
193f13e6
MK
14102010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1411
1412 * configure.ac: Check for libdl. If it is not available link against
1413 static libthread_db.
1414 * configure: Regenerate.
1415
85d721b8
PA
14162010-02-22 Pedro Alves <pedro@codesourcery.com>
1417
1418 PR9605
1419
1420 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1421 handing a read watchpoint.
1422 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1423
6076632b
DE
14242010-02-12 Doug Evans <dje@google.com>
1425
1426 * linux-low.c (linux_supports_tracefork_flag): Document.
1427 (linux_look_up_symbols): Add comment.
1428
3327ccf7
L
14292010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 * regcache.c (supply_register): Clear regcache if buf is NULL.
1432
0718675c 14332010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 1434 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
1435
1436 * inferiors.c (find_inferior): Add function documentation.
1437 (unloaded_dll): Handle the case where the unloaded dll has not
1438 been previously registered in the dll list.
1439
177321bd
DJ
14402010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1441
1442 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1443 (thumb2_breakpoint): New.
1444 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1445
2b009048
DJ
14462010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1447
1448 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1449 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1450 breakpoints.
1451
3be029c7
PA
14522010-01-21 Pedro Alves <pedro@codesourcery.com>
1453
1454 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1455
18f5de3b
JK
14562010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1457
1458 * linux-s390-low.c (s390_collect_ptrace_register)
1459 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1460
3743bb4f
DE
14612010-01-21 Doug Evans <dje@google.com>
1462
14ce3065
DE
1463 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1464 (PTRACE_ARG4_TYPE): New macro.
1465 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1466 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1467 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1468 (usr_store_inferior_registers): Ditto.
1469 (linux_read_memory, linux_write_memory): Ditto.
1470 (linux_test_for_tracefork): Ditto.
1471
3743bb4f
DE
1472 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1473 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1474
8b315be5
PA
14752010-01-21 Pedro Alves <pedro@codesourcery.com>
1476
1477 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1478 target.
1479
85492558
PA
14802010-01-21 Pedro Alves <pedro@codesourcery.com>
1481
1482 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1483 prototype to take a regcache. Adjust.
1484
442ea881
PA
14852010-01-20 Pedro Alves <pedro@codesourcery.com>
1486
1487 * regcache.h (struct thread_info): Forward declare.
1488 (struct regcache): New.
1489 (new_register_cache): Adjust prototype.
1490 (get_thread_regcache): Declare.
1491 (free_register_cache): Adjust prototype.
1492 (registers_to_string, registers_from_string): Ditto.
1493 (supply_register, supply_register_by_name, collect_register)
1494 (collect_register_as_string, collect_register_by_name): Ditto.
1495 * regcache.c (struct inferior_regcache_data): Delete.
1496 (get_regcache): Rename to ...
1497 (get_thread_regcache): ... this. Adjust. Switch inferior before
1498 fetching registers.
1499 (regcache_invalidate_one): Adjust.
1500 (regcache_invalidate): Fix prototype.
1501 (new_register_cache): Return the new register cache.
1502 (free_register_cache): Change prototype.
1503 (realloc_register_cache): Adjust.
1504 (registers_to_string): Change prototype to take a regcache. Adjust.
1505 (registers_from_string): Ditto.
1506 (register_data): Ditto.
1507 (supply_register): Ditto.
1508 (supply_register_by_name): Ditto.
1509 (collect_register): Ditto.
1510 (collect_register_as_string): Ditto.
1511 (collect_register_by_name): Ditto.
1512 * server.c (process_serial_event): Adjust.
1513 * linux-low.h (regset_fill_func, regset_store_func): Change
1514 prototype.
1515 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1516 Change prototype.
1517 * linux-low.c (get_stop_pc): Adjust.
1518 (check_removed_breakpoint): Adjust.
1519 (linux_wait_for_event): Adjust.
1520 (linux_resume_one_lwp): Adjust.
1521 (fetch_register): Add regcache parameter. Adjust.
1522 (usr_store_inferior_registers): Ditto.
1523 (regsets_fetch_inferior_registers): Ditto.
1524 (regsets_store_inferior_registers): Ditto.
1525 (linux_fetch_registers, linux_store_registers): Ditto.
1526 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1527 regcache. Adjust.
1528 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1529 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1530 prototype to take a regcache.
1531 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1532 * remote-utils.c (convert_ascii_to_int, outreg)
1533 (prepare_resume_reply): Change prototype to take a regcache.
1534 Adjust.
1535 * target.h (struct target_ops) <fetch_registers, store_registers>:
1536 Change prototype to take a regcache.
1537 (fetch_inferior_registers, store_inferior_registers): Change
1538 prototype to take a regcache. Adjust.
1539 * proc-service.c (ps_lgetregs): Adjust.
1540 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1541 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1542 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1543 take a regcache. Adjust.
1544 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1545 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1546 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1547 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1548 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1549 (cris_cannot_fetch_register):
1550 (cris_breakpoint_at): Change prototype to take a regcache.
1551 Adjust.
1552 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1553 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1554 to take a regcache. Adjust.
1555 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1556 Adjust.
1557 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1558 take a regcache. Adjust.
1559 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1560 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1561 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1562 * linux-mips-low.c (mips_get_pc):
1563 (mips_set_pc): Change prototype to take a regcache. Adjust.
1564 (mips_reinsert_addr): Adjust.
1565 (mips_collect_register): Change prototype to take a regcache.
1566 Adjust.
1567 (mips_supply_register):
1568 (mips_collect_register_32bit, mips_supply_register_32bit)
1569 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1570 (mips_store_fpregset): Ditto.
1571 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1572 Ditto.
1573 (parse_spufs_run): Adjust.
1574 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1575 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1576 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1577 take a regcache. Adjust.
1578 * linux-s390-low.c (s390_collect_ptrace_register)
1579 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1580 (s390_set_pc): Change prototype to take a regcache. Adjust.
1581 (s390_arch_setup): Adjust.
1582 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1583 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1584 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1585 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1586 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1587 regcache. Adjust.
1588 (sparc_breakpoint_at): Adjust.
1589 * linux-xtensa-low.c (xtensa_fill_gregset):
1590 (xtensa_store_gregset):
1591 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1592 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1593 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1594 prototype to take a regcache. Adjust.
1595 * win32-arm-low.c (arm_fetch_inferior_register)
1596 (arm_store_inferior_register): Change prototype to take a
1597 regcache. Adjust.
1598 * win32-i386-low.c (i386_fetch_inferior_register)
1599 (i386_store_inferior_register): Change prototype to take a
1600 regcache. Adjust.
1601 * win32-low.c (child_fetch_inferior_registers)
1602 (child_store_inferior_registers): Change prototype to take a
1603 regcache. Adjust.
1604 (win32_wait): Adjust.
1605 (win32_fetch_inferior_registers): Change prototype to take a
1606 regcache. Adjust.
1607 (win32_store_inferior_registers): Adjust.
1608 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1609 store_inferior_register>: Change prototype to take a regcache.
1610
60c3d7b0
DE
16112010-01-20 Doug Evans <dje@google.com>
1612
1613 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1614 #ifdef.
1615 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 1616 (W_STOPCODE): Provide definition if missing.
60c3d7b0 1617
dc146f7c
VP
16182010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1619
1620 * linux-low.c (linux_core_of_thread): New.
1621 (compare_ints, show_process, list_threads): New.
1622 (linux_qxfer_osdata): Report threads and cores.
1623 (linux_target_op): Register linux_core_of_thread.
1624 * remote-utils.c (prepare_resume_reply): Report the core.
1625 (buffer_xml_printf): Support %d specifier.
1626 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1627 New.
1628 (handle_query): Handle qXfer:threads. Announce availability
1629 thereof.
1630 * target.h (struct target_ops): New field core_of_thread.
1631
7803799a
UW
16322010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1633
1634 * Makefile.in (clean): Remove new generated files.
1635 (reg-s390.o, reg-s390.c): Remove rules.
1636 (reg-s390x.o, reg-s390x.c): Likewise.
1637 (s390-linux32.o, s390-linux32.c): Add rules.
1638 (s390-linux64.o, s390-linux64.c): Likewise.
1639 (s390x-linux64.o, s390x-linux64.c): Likewise.
1640 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1641 * linux-s390-low.c: Include <elf.h>.
1642 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1643 (init_registers_s390): Remove prototype.
1644 (init_registers_s390x): Likewise.
1645 (init_registers_s390_linux32): Add prototype.
1646 (init_registers_s390_linux64): Likewise.
1647 (init_registers_s390x_linux64): Likewise.
1648 (s390_num_regs_3264): New define.
1649 (s390_regmap_3264): New global variable.
1650 (s390_cannot_fetch_register): Remove obsolete check.
1651 (s390_cannot_store_register): Likewise.
1652 (s390_collect_ptrace_register): Handle upper/lower register halves.
1653 (s390_supply_ptrace_register): Likewise.
1654 (s390_fill_gregset): Update to register number changes.
1655 (s390_get_hwcap): New routine.
1656 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1657 Install appropriate regmap and register set.
1658
6e7ffa39
JB
16592010-01-01 Joel Brobecker <brobecker@adacore.com>
1660
1661 * server.c (gdbserver_version): Update copyright year to 2010.
1662 * gdbreplay.c (gdbreplay_version): Likewise.
1663
957f3f49
DE
16642009-12-28 Doug Evans <dje@google.com>
1665
1666 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1667 elf/external.h. Include <elf.h> instead but only if necessary.
1668
ca5c370d
PA
16692009-12-28 Pedro Alves <pedro@codesourcery.com>
1670
1671 * linux-low.c (linux_remove_process): Remove `detaching'
1672 parameter. Don't release/detach from thread_db here.
1673 (linux_kill): Release/detach from thread_db here, ...
1674 (linux_detach): ... and here, before actually detaching.
1675 (linux_wait_1): ... and here, when a process exits.
1676 * thread-db.c (any_thread_of): New.
1677 (thread_db_free): Switch the current inferior to a thread of the
1678 passed in process.
1679
4ee62156
DE
16802009-12-21 Doug Evans <dje@google.com>
1681
d90e6a88
DE
1682 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1683
c5f62d5f
DE
1684 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1685 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1686 warning ifndef __NR_tkill. Move setting of errno there too.
1687 Delete unnecessary resetting of errno after syscall.
1688 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1689
10e86dd7
DE
1690 * configure.ac: Check for dladdr.
1691 * config.in: Regenerate.
1692 * configure: Regenerate.
1693 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1694 (try_thread_db_load): Update.
1695
4ee62156
DE
1696 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1697
00f515da
DE
16982009-12-18 Doug Evans <dje@google.com>
1699
e9464885
DE
1700 * event-loop.c: Include unistd.h if it exists.
1701
07d4f67e
DE
1702 * linux-low.c (my_waitpid): Move definition away from being in
1703 between linux_tracefork_child/linux_test_for_tracefork.
1704
00f515da
DE
1705 * gdb_proc_service.h (psaddr_t): Fix type.
1706 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1707 signature to match glibc.
1708
1de1badb
DE
17092009-12-16 Doug Evans <dje@google.com>
1710
1711 * linux-low.c (linux_read_memory): Fix argument to read.
1712
aeeb81d1
PA
17132009-11-26 Pedro Alves <pedro@codesourcery.com>
1714
1715 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1716 events, don't leave current_inferior pointing at null.
1717
10357975
PA
17182009-11-26 Pedro Alves <pedro@codesourcery.com>
1719
1720 * win32-low.c (LOG): Delete.
1721 (OUTMSG): Output to stderr.
1722 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1723 on compile time LOG macro.
1724 (win32_wait): Fix debug output.
1725
cf6e3471
PA
17262009-11-26 Pedro Alves <pedro@codesourcery.com>
1727
1728 * win32-low.c (win32_add_one_solib): If the dll name is
1729 "ntdll.dll", prepend the system directory to the dll path.
1730
0c85e18e
MK
17312009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1732
1733 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1734
9ac544ce 17352009-11-17 Nathan Sidwell <nathan@codesourcery.com>
0c85e18e 1736 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
1737
1738 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1739 * configure.ac: Check for __mcoldfire__ and set
1740 gdb_cv_m68k_is_coldfire.
1741 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1742 reg-cf.o and reg-m68k.o.
1743 * configure: Regenerated.
1744
fd7dd3e6
PA
17452009-11-16 Pedro Alves <pedro@codesourcery.com>
1746
1747 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1748 Pass it to thread_db_free.
1749 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1750 proper `detaching' argument to linux_remove_process.
1751 * linux-low.h (thread_db_free): Add `detaching' parameter.
1752 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1753 to thread_db_free.
1754 (thread_db_free): Add `detaching' parameter. Only
1755 call td_ta_clear_event if detaching from process.
1756
75aa492e
MK
17572009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1758
1759 * thread-db.c (thread_db_free): Fix typo.
1760
21e1bee4
PP
17612009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1762
1763 PR gdb/10838
1764 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1765
8838b45e
NS
17662009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1767
1768 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1769 with an i686 compiler.
1770 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1771 needed.
1772 * configure: Rebuilt.
1773
8a35fb51
SL
17742009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1775
1776 PR gdb/10783
1777
1778 * server.c (handle_search_memory_1): Correct read_addr initialization
1779 in loop for searching subsequent chunks.
1780
96f15937
PP
17812009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1782
1783 * configure.ac: New --with-libthread-db option.
1784 * thread-db.c: Allow direct dependence on libthread_db.
1785 (thread_db_free): Adjust.
1786 * config.in: Regenerate.
1787 * configure: Likewise.
1788
5f7d1694
PP
17892009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1790
1791 PR gdb/10757
1792 * thread-db.c (attach_thread): New function.
1793 (maybe_attach_thread): Return success/failure.
1794 (find_new_threads_callback): Adjust.
1795 (thread_db_find_new_threads): Loop until no new threads.
1796
88e3b899
PA
17972009-10-13 Pedro Alves <pedro@codesourcery.com>
1798
1799 * proc-service.c (ps_lgetregs): Formatting.
1800
cdbfd419
PP
18012009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1802
1803 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1804 * configure.ac: Adjust.
1805 * linux-low.h (struct process_info_private): Move members to struct
1806 thread_db.
1807 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1808 * linux-low.c (linux_remove_process): Adjust.
1809 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1810 * server.c (handle_query): Move code ...
1811 (handle_monitor_command): ... here. New function.
1812 * target.h (struct target_ops): New member.
1813 * thread-db.c (struct thread_db): New.
1814 (libthread_db_search_path): New variable.
1815 (thread_db_create_event, thread_db_enable_reporting)
1816 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1817 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1818 (try_thread_db_load_1, dladdr_to_soname): New functions.
1819 (try_thread_db_load, thread_db_load_search): New functions.
1820 (thread_db_init): Search for libthread_db.
1821 (thread_db_free): New function.
1822 (thread_db_handle_monitor_command): Likewise.
1823 * config.in: Regenerate.
1824 * configure: Regenerate.
1825
4168d2d6
UW
18262009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1827
1828 * spu-low.c (spu_kill): Wait for inferior to terminate.
1829 Call clear_inferiors.
1830 (spu_detach): Call clear_inferiors.
1831
81ecdfbb
RW
18322009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1833
1834 * aclocal.m4: Regenerate.
1835 * config.in: Likewise.
1836 * configure: Likewise.
1837
0b9ff2c0
UW
18382009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1839
1840 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1841 (parse_spufs_run): New function.
1842 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1843 (ppc_breakpoint_at): Handle SPU breakpoints.
1844
efcbbd14
UW
18452009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1846
1847 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1848 (SPUFS_MAGIC): Define.
1849 (spu_enumerate_spu_ids): New function.
1850 (linux_qxfer_spu): New function.
1851 (linux_target_ops): Install linux_qxfer_spu.
1852
f4d9bade
UW
18532009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1854
1855 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1856 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1857 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1858 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1859 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1860 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1861 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1862 (init_registers_powerpc_cell32l): Add prototype.
1863 (init_registers_powerpc_cell64l): Likewise.
1864 (ppc_arch_setup): Detect Cell/B.E. architecture.
1865
96e946ca
RW
18662009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1867
1868 * Makefile.in (datarootdir): New variable.
1869
58d6951d
DJ
18702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1871
1872 * linux-low.c (linux_write_memory): Update debugging output.
1873 * Makefile.in (clean): Add new descriptions.
1874 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1875 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1876 * configure.srv: Add new files for arm*-*-linux*.
1877 * linux-arm-low.c: Add new declarations.
1878 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1879 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1880 (HWCAP_VFPv3D16): New.
1881 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1882 instead of __IWMMXT__.
1883 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1884 (arm_arch_setup): New.
1885 (target_regsets): Remove #ifdef. Add VFP regset.
1886 (the_low_target): Use arm_arch_setup.
1887
12b42a12
DJ
18882009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1889
1890 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1891 the main thread again.
1892
ac8c974e
AR
18932009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1894
1895 Adding Neutrino gdbserver.
1896 * configure: Regenerated.
1897 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1898 * configure.srv (i[34567]86-*-nto*): New target.
1899 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1900 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1901 (nto_comctrl) [__QNX__]: New function.
1902 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1903
4424e0c3 19042009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
1905
1906 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1907 srv_tgtobj.
1908
912cf4ba
PA
19092009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1910 Pedro Alves <pedro@codesourcery.com>
1911
1912 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1913 don't support CONTEXT_EXTENDED_REGISTERS.
1914 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1915 (the_low_target): Install them.
1916 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1917 failing with ERROR_PIPE_NOT_CONNECTED.
1918
aa5ca48f
DE
19192009-06-30 Doug Evans <dje@google.com>
1920 Pierre Muller <muller@ics.u-strasbg.fr>
1921
1922 Add h/w watchpoint support to x86-linux, win32-i386.
1923 * Makefile.in (SFILES): Add i386-low.c
1924 (i386_low_h): Define.
1925 (i386-low.o): Add dependencies.
1926 (linux-x86-low.o): Add i386-low.h dependency.
1927 (win32-i386-low.o): Ditto.
1928 * i386-low.c: New file.
1929 * i386-low.h: New file.
1930 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1931 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1932 * linux-low.c (linux_add_process): Initialize arch_private.
1933 (linux_remove_process): Free arch_private.
1934 (add_lwp): Initialize arch_private.
1935 (delete_lwp): Free arch_private.
1936 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1937 provided.
1938 * linux-low.h (process_info_private): New member arch_private.
1939 (lwp_info): New member arch_private.
1940 (linux_target_ops): New members new_process, new_thread,
1941 prepare_to_resume.
1942 (ptid_of): New macro.
1943 * linux-x86-low.c: Include stddef.h, i386-low.h.
1944 (arch_process_info): New struct.
1945 (arch_lwp_info): New struct.
1946 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1947 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1948 (i386_dr_low_get_status): New function.
1949 (x86_insert_point, x86_remove_point): New functions.
1950 (x86_stopped_by_watchpoint): New function.
1951 (x86_stopped_data_address): New function.
1952 (x86_linux_new_process, x86_linux_new_thread): New functions.
1953 (x86_linux_prepare_to_resume): New function.
1954 (the_low_target): Add entries for insert_point, remove_point,
1955 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1956 prepare_to_resume.
1957 * server.c (debug_hw_points): New global.
1958 (monitor_show_help): Document set debug-hw-points.
1959 (handle_query): Process "set debug-hw-points".
1960 * server.h (debug_hw_points): Declare.
1961 (paddress): Declare.
1962 * utils.c (NUMCELLS, CELLSIZE): New macros.
1963 (get_sell, xsnprintf, paddress): New functions.
1964 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1965 remove_point, stopped_by_watchpoint, stopped_data_address.
1966 * win32-i386-low.c: Include i386-low.h.
1967 (debug_reg_state): Replaces dr.
1968 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1969 (i386_dr_low_get_status): New function.
1970 (i386_insert_point, i386_remove_point): New functions.
1971 (i386_stopped_by_watchpoint): New function.
1972 (i386_stopped_data_address): New function.
1973 (i386_initial_stuff): Update.
1974 (get_thread_context,set_thread_context,i386_thread_added): Update.
1975 (the_low_target): Add entries for insert_point,
1976 remove_point, stopped_by_watchpoint, stopped_data_address.
1977 * win32-low.c (win32_insert_watchpoint): New function.
1978 (win32_remove_watchpoint): New function.
1979 (win32_stopped_by_watchpoint): New function.
1980 (win32_stopped_data_address): New function.
1981 (win32_target_ops): Add entries for insert_watchpoint,
1982 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1983 * win32-low.h (win32_target_ops): New members insert_point,
1984 remove_point, stopped_by_watchpoint, stopped_data_address.
1985
d993e290
PA
19862009-06-25 Pedro Alves <pedro@codesourcery.com>
1987
1988 * server.c (process_serial_event): Re-return unsupported, not
1989 error, if the type isn't recognized. Re-allow supporting only
1990 insert or remove packets. Also call require_running for
1991 breakpoints. Add missing break statement to default case. Tidy.
1992 * target.h (struct target_ops): Rename insert_watchpoint to
1993 insert_point, and remove_watchpoint to remove_point.
1994
1995 * linux-low.h (struct linux_target_ops): Likewise.
1996 * linux-low.c (linux_insert_watchpoint): Rename to ...
1997 (linux_insert_point): ... this. Adjust.
1998 (linux_remove_watchpoint): Rename to ...
1999 (linux_remove_point): ... this. Adjust.
2000 (linux_target_ops): Adjust.
2001 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
2002 (cris_insert_point): ... this.
2003 (cris_remove_watchpoint): Rename to ...
2004 (cris_remove_point): ... this.
2005 (the_low_target): Adjust.
2006
0f54c268
PM
20072009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
2008
2009 * server.c (handle_v_kill): Pass signal_pid to
2010 kill_inferior if multi_process is zero.
2011
c6314022
AR
20122009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
2013
2014 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
2015 * target.h (target_ops): Comment for *_watchpoint to make it clear
2016 the functions can get types '0' and '1'.
2017
4463ce24
AR
20182009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
2019
2020 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
2021 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
2022 * regcache.c (get_regcache): Likewise.
2023 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
2024 * win32-low.c (child_fetch_inferior_registers): Remove check for
2025 regno 0.
2026
cf8fd78b
PA
20272009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
2028 Pedro Alves <pedro@codesourcery.com>
2029
2030 * target.h (struct target_ops) <supports_multi_process>: New
2031 callback.
2032 (target_supports_multi_process): New.
2033 * server.c (handle_query): Even if GDB reports support, only
2034 enable multi-process if the target also supports it. Report
2035 multi-process support only if the target backend supports it.
2036 * linux-low.c (linux_supports_multi_process): New function.
2037 (linux_target_ops): Install it as target_supports_multi_process
2038 callback.
2039
47c0c975
DE
20402009-05-24 Doug Evans <dje@google.com>
2041
e09875d4
DE
2042 Global renaming of find_thread_pid to find_thread_ptid.
2043 * server.h (find_thread_ptid): Renamed from find_thread_pid.
2044 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
2045 All callers updated.
2046
e27d73f6
DE
2047 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
2048 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
2049 directly.
2050
47c0c975
DE
2051 * linux-low.c (get_stop_pc): Print pc if debug_threads.
2052 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
2053 (linux_resume_one_lwp): Ditto.
2054
2acc282a
DE
20552009-05-23 Doug Evans <dje@google.com>
2056
2057 * linux-low.c (linux_resume_one_lwp): Change type of first arg
2058 from struct inferior_list_entry * to struct lwp_info *.
2059 All callers updated.
2060
9f1036c1
DE
20612009-05-13 Doug Evans <dje@google.com>
2062
2063 * linux-x86-low.c: Don't include assert.h.
2064 (x86_siginfo_fixup): Use fatal, not assert.
2065 (x86_arch_setup): Fix comment.
2066
d0722149
DE
20672009-05-12 Doug Evans <dje@google.com>
2068
2069 Biarch support for i386/amd64 gdbserver.
2070 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
2071 Add linux-x86-low.c.
2072 (linux-i386-low.o, linux-x86-64-low.o): Delete.
2073 (linux-x86-low.o): Add.
2074 * linux-x86-64-low.c: Delete.
2075 * linux-i386-low.c: Delete.
2076 * linux-x86-low.c: New file.
2077 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
2078 linux-x86-low.o.
2079 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
2080 linux-x86-low.o.
2081 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
2082 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
2083 (linux_child_pid_to_exec_file): New function.
2084 (elf_64_header_p, elf_64_file_p): New functions.
2085 (siginfo_fixup): New function.
2086 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
2087 give target a chance to convert layout.
2088 * linux-low.h (linux_target_ops): New member siginfo_fixup.
2089 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
2090
fdeb2a12
DE
20912009-05-07 Doug Evans <dje@google.com>
2092
2093 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
2094 (regsets_store_inferior_registers): Ditto.
2095
a6dbe5df
PA
20962009-05-06 Pedro Alves <pedro@codesourcery.com>
2097
2098 PR server/10048
2099
2100 * linux-low.c (must_set_ptrace_flags): Delete.
2101 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
2102 of the global.
2103 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
2104 `lwp->must_set_ptrace_flags' instead.
ba42693b 2105 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
2106 (linux_wait_1): ... not here.
2107
5091eb23
DE
21082009-04-30 Doug Evans <dje@google.com>
2109
9f767825
DE
2110 * inferiors.c (started_inferior_callback): New function.
2111 (attached_inferior_callback): New function.
2112 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
2113 * server.c (print_started_pid, print_attached_pid): New functions.
2114 (detach_or_kill_for_exit): New function.
2115 (main): Call it instead of for_each_inferior (kill_inferior_callback).
2116 * server.h (have_started_inferiors_p): Declare.
2117 (have_attached_inferiors_p): Declare.
2118
5091eb23
DE
2119 * inferiors.c (remove_process): Fix memory leak, free process.
2120 * linux-low.c (linux_remove_process): New function.
2121 (linux_kill): Call it instead of remove_process.
2122 (linux_detach, linux_wait_1): Ditto.
2123
155c8968
PA
21242009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
2125
2126 * configure.srv: Add x86 Windows CE target.
2127
7fe519cb
UW
21282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2129
2130 * inferiors.c (get_thread_process): Make global.
2131 * server.h (get_thread_process): Add prototype.
2132 * thread-db.c (find_one_thread): Use get_thread_process
2133 instead of current_process.
2134 (thread_db_get_tls_address): Do not crash if called when
2135 thread layer is not yet initialized.
2136
5472f405
UW
21372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
2138
2139 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
2140 * spu-low.c (current_tid): Rename to ...
2141 (current_ptid): ... this.
2142 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
2143 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
2144 ptid_get_lwp (current_ptid) instead of current_tid.
2145 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
2146 instead of current_tid. Use find_process_pid to verify pid
2147 argument is valid. Pass proper argument to remove_process.
2148 (spu_thread_alive): Compare current_ptid instead of current_tid.
2149 (spu_resume): Likewise.
2150
55ac2b99
PA
21512009-04-02 Pedro Alves <pedro@codesourcery.com>
2152
2153 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
2154 variable.
2155
95954743
PA
21562009-04-01 Pedro Alves <pedro@codesourcery.com>
2157
2158 Implement the multiprocess extensions, and add linux multiprocess
2159 support.
2160
2161 * server.h (ULONGEST): Declare.
2162 (struct ptid, ptid_t): New.
2163 (minus_one_ptid, null_ptid): Declare.
2164 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2165 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
2166 (struct inferior_list_entry): Change `id' type from unsigned from
2167 to ptid_t.
2168 (struct sym_cache, struct breakpoint, struct
2169 process_info_private): Forward declare.
2170 (struct process_info): Declare.
2171 (current_process): Declare.
2172 (all_processes): Declare.
2173 (initialize_inferiors): Declare.
2174 (add_thread): Adjust to use ptid_t.
2175 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
2176 (add_process, remove_process, find_thread_pid): Declare.
2177 (find_inferior_id): Adjust to use ptid_t.
2178 (cont_thread, general_thread, step_thread): Change type to ptid_t.
2179 (multi_process): Declare.
2180 (push_event): Adjust to use ptid_t.
2181 (read_ptid, write_ptid): Declare.
2182 (prepare_resume_reply): Adjust to use ptid_t.
2183 (clear_symbol_cache): Declare.
2184 * inferiors.c (all_processes): New.
2185 (null_ptid, minus_one_ptid): New.
2186 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
2187 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
2188 (add_thread): Change unsigned long to ptid. Remove gdb_id
2189 parameter. Adjust.
2190 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
2191 (gdb_id_to_thread): Rename to ...
2192 (find_thread_pid): ... this. Change unsigned long to ptid.
2193 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
2194 (loaded_dll, pull_pid_from_list): Adjust.
2195 (add_process, remove_process, find_process_pid)
2196 (get_thread_process, current_process, initialize_inferiors): New.
2197 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
2198 (struct target_waitstatus) <related_pid>: Ditto.
2199 (struct target_ops) <kill, detach>: Add `pid' argument. Change
2200 return type to int.
2201 (struct target_ops) <join>: Add `pid' argument.
2202 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
2203 (struct target_ops) <wait>: Add `ptid' field. Change return type
2204 to ptid.
2205 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
2206 (mywait): Add `ptid' argument. Change return type to ptid_t.
2207 (target_pid_to_str): Declare.
2208 * target.c (set_desired_inferior): Adjust to use ptids.
2209 (mywait): Add new `ptid' argument. Adjust.
2210 (target_pid_to_str): New.
2211 * mem-break.h (free_all_breakpoints): Declare.
2212 * mem-break.c (breakpoints): Delelete.
2213 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2214 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2215 to use per-process breakpoint list.
2216 (free_all_breakpoints): New.
2217 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2218 (symbol_cache, all_symbols_looked_up): Delete.
2219 (hexchars): New.
2220 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2221 read_ptid): New.
2222 (prepare_resume_reply): Change ptid argument's type from unsigned
2223 long to ptid_t. Adjust. Implement W;process and X;process.
2224 (free_sym_cache, clear_symbol_cache): New.
2225 (look_up_one_symbol): Adjust to per-process symbol cache. *
2226 * server.c (cont_thread, general_thread, step_thread): Change type
2227 to ptid_t.
2228 (attached): Delete.
2229 (multi_process): New.
2230 (last_ptid): Change type to ptid_t.
2231 (struct vstop_notif) <ptid>: Change type to ptid_t.
2232 (queue_stop_reply, push_event): Change `ptid' argument's type to
2233 ptid_t.
2234 (discard_queued_stop_replies): Add `pid' argument.
2235 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2236 changes. Don't reference the `attached' global.
2237 (attach_inferior): Adjust to mywait interface changes.
2238 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2239 features. Handle and report "multiprocess+". Handle
2240 "qAttached:PID".
2241 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2242 changes.
2243 (handle_v_kill): New.
2244 (handle_v_stopped): Adjust to use target_pid_to_str.
2245 (handle_v_requests): Allow multiple attaches and runs when
2246 multiprocess extensions are in effect. Handle "vKill".
2247 (myresume): Adjust to use ptids.
2248 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2249 (handle_status): Adjust to discard_queued_stop_replies interface
2250 change.
2251 (first_thread_of, kill_inferior_callback)
2252 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2253 (main): Call initialize_inferiors. Adjust to use ptids, killing
2254 and detaching from all inferiors. Handle multiprocess packet
2255 variants.
2256 * linux-low.h: Include gdb_proc_service.h.
2257 (struct process_info_private): New.
2258 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2259 <lwpid_of>: Use ptid_get_lwp.
2260 (get_lwp_thread): Adjust.
2261 (struct lwp_info): Add `dead' member.
2262 (find_lwp_pid): Declare.
2263 * linux-low.c (thread_db_active): Delete.
2264 (new_inferior): Adjust comment.
2265 (inferior_pid): Delete.
2266 (linux_add_process): New.
2267 (handle_extended_wait): Adjust.
2268 (add_lwp): Change unsigned long to ptid.
2269 (linux_create_inferior): Add process to processes table. Adjust
2270 to use ptids. Don't set new_inferior here.
2271 (linux_attach_lwp): Rename to ...
2272 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2273 it. Adjust to use ptids.
2274 (linux_attach_lwp): New.
2275 (linux_attach): Add process to processes table. Don't set
2276 new_inferior here.
2277 (struct counter): New.
2278 (second_thread_of_pid_p, last_thread_of_process_p): New.
2279 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2280 multiple processes.
2281 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2282 processes. Remove process from process table.
2283 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2284 to multiple processes.
2285 (any_thread_of): New.
2286 (linux_detach): Add `pid' argument, and handle it. Remove process
2287 from processes table.
2288 (linux_join): Add `pid' argument. Handle it.
2289 (linux_thread_alive): Change unsighed long argument to ptid_t.
2290 Consider dead lwps as not being alive.
2291 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2292 threads we're not interested in.
2293 (same_lwp, find_lwp_pid): New.
2294 (linux_wait_for_lwp): Change `pid' argument's type from int to
2295 ptid_t. Adjust.
2296 (linux_wait_for_event): Rename to ...
2297 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2298 from int to ptid_t. Adjust.
2299 (linux_wait_for_event): New.
2300 (linux_wait_1): Add `ptid' argument. Change return type to
2301 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2302 that exit from the process table.
2303 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2304 Adjust.
2305 (mark_lwp_dead): New.
2306 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2307 stopping all threads, mark its main lwp as dead.
2308 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2309 ptids.
2310 (fetch_register, usr_store_inferior_registers)
2311 (regsets_fetch_inferior_registers)
2312 (regsets_store_inferior_registers, linux_read_memory)
2313 (linux_write_memory): Inline `inferior_pid'.
2314 (linux_look_up_symbols): Adjust to use per-process
2315 `thread_db_active'.
2316 (linux_request_interrupt): Adjust to use ptids.
2317 (linux_read_auxv): Inline `inferior_pid'.
2318 (initialize_low): Don't reference thread_db_active.
2319 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2320 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2321 (ps_getpid): Return the pid of the current inferior.
2322 * thread-db.c (proc_handle, thread_agent): Delete.
2323 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2324 per-process data.
2325 (find_one_thread): Change argument type to ptid_t. Adjust to
2326 per-process data.
2327 (maybe_attach_thread): Adjust to per-process data and ptids.
2328 (thread_db_find_new_threads): Ditto.
2329 (thread_db_init): Ditto.
2330 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2331 processes table. Adjust to use ptids.
2332 (spu_kill, spu_detach): Adjust interface. Remove process from
2333 processes table.
2334 (spu_join, spu_thread_alive): Adjust interface.
2335 (spu_wait): Adjust interface. Remove process from processes
2336 table. Adjust to use ptids.
2337 * win32-low.c (current_inferior_tid): Delete.
2338 (current_inferior_ptid): New.
2339 (debug_event_ptid): New.
2340 (thread_rec): Take a ptid. Adjust.
2341 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2342 (child_delete_thread): Ditto.
2343 (do_initial_child_stuff): Add `attached' argument. Add process to
2344 processes table.
2345 (child_fetch_inferior_registers, child_store_inferior_registers):
2346 Adjust.
2347 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2348 (win32_attach): Pass 1 to do_initial_child_stuff.
2349 (win32_kill): Adjust interface. Remove process from processes
2350 table.
2351 (win32_detach): Ditto.
2352 (win32_join): Adjust interface.
2353 (win32_thread_alive): Take a ptid.
2354 (win32_resume): Adjust to use ptids.
2355 (get_child_debug_event): Ditto.
2356 (win32_wait): Adjust interface. Remove exiting process from
2357 processes table.
2358
bd99dc85
PA
23592009-04-01 Pedro Alves <pedro@codesourcery.com>
2360
2361 Non-stop mode support.
2362
2363 * server.h (non_stop): Declare.
2364 (gdb_client_data, handler_func): Declare.
2365 (delete_file_handler, add_file_handler, start_event_loop):
2366 Declare.
2367 (handle_serial_event, handle_target_event, push_event)
2368 (putpkt_notif): Declare.
2369 * target.h (enum resume_kind): New.
2370 (struct thread_resume): Replace `step' field by `kind' field.
2371 (TARGET_WNOHANG): Define.
2372 (struct target_ops) <wait>: Add `options' argument.
2373 <supports_non_stop, async, start_non_stop>: New fields.
2374 (target_supports_non_stop, target_async): New.
2375 (start_non_stop): Declare.
2376 (mywait): Add `options' argument.
2377 * target.c (mywait): Add `options' argument. Print child exit
2378 notifications here.
2379 (start_non_stop): New.
2380 * server.c (non_stop, own_buf, mem_buf): New globals.
2381 (struct vstop_notif): New.
2382 (notif_queue): New global.
2383 (queue_stop_reply, push_event, discard_queued_stop_replies)
2384 (send_next_stop_reply): New.
2385 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2386 interface changes.
2387 (attach_inferior): In non-stop mode, don't wait for the target
2388 here.
2389 (handle_general_set): Handle QNonStop.
2390 (handle_query): When handling qC, return the current general
2391 thread, instead of the first thread of the list.
2392 (handle_query): If the backend supports non-stop mode, include
2393 QNonStop+ in the qSupported query response.
2394 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2395 and non-stop mode.
2396 (handle_v_attach, handle_v_run): Handle non-stop mode.
2397 (handle_v_stopped): New.
2398 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2399 (myresume): Adjust to use resume_kind. Handle non-stop.
2400 (queue_stop_reply_callback): New.
2401 (handle_status): Handle non-stop mode.
2402 (main): Clear non_stop flag on reconnection. Use the event-loop.
2403 Refactor serial protocol handling from here ...
2404 (process_serial_event): ... to this new function. When GDB
2405 selects any thread, select one here. In non-stop mode, wait until
2406 GDB acks all pending events before exiting.
2407 (handle_serial_event, handle_target_event): New.
2408 * remote-utils.c (remote_open): Install remote_desc in the event
2409 loop.
2410 (remote_close): Remove remote_desc from the event loop.
2411 (putpkt_binary): Rename to...
2412 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2413 (putpkt_binary): New as wrapper around putpkt_binary_1.
2414 (putpkt_notif): New.
2415 (prepare_resume_reply): In non-stop mode, don't change the
2416 general_thread.
2417 * event-loop.c: New.
2418 * Makefile.in (OBJ): Add event-loop.o.
2419 (event-loop.o): New rule.
2420
2421 * linux-low.h (pid_of): Moved here.
2422 (lwpid_of): New.
2423 (get_lwp_thread): Use lwpid_of.
2424 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2425 * linux-low.c (pid_of): Delete.
2426 (inferior_pid): Use lwpid_of.
2427 (linux_event_pipe): New.
2428 (target_is_async_p): New.
2429 (delete_lwp): New.
2430 (handle_extended_wait): Use lwpid_of.
2431 (add_lwp): Don't set lwpid field.
2432 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2433 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2434 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2435 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2436 first. Adjust to linux_wait_for_event interface changes. Use
2437 lwpid_of.
2438 (linux_detach): Don't delete the main lwp here.
2439 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2440 (status_pending_p): Don't consider explicitly suspended lwps.
2441 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2442 pointer. Add OPTIONS argument. Change return type to int. Use
2443 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2444 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2445 pointer. Add status pointer argument. Return a pid instead of a
2446 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2447 changes. In non-stop mode, don't switch to a random thread.
2448 (linux_wait): Rename to...
2449 (linux_wait_1): ... this. Add target_options argument, and handle
2450 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2451 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2452 clean exit and signal exit code. Don't stop all threads in
2453 non-stop mode. In all-stop mode, only stop all threads when
2454 reporting a stop to GDB. Handle explicit thread stop requests.
2455 (async_file_flush, async_file_mark): New.
2456 (linux_wait): New.
2457 (send_sigstop): Use lwpid_of.
2458 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2459 interface changes. In non-stop mode, don't switch to a random
2460 thread.
2461 (linux_resume_one_lwp): Use lwpid_of.
2462 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2463 (linux_resume_one_thread): ... this. Handle resume_stop. In
2464 non-stop mode, don't look for pending flag in all threads.
2465 (resume_status_pending_p): Don't consider explicitly suspended
2466 threads.
2467 (my_waitpid): Reimplement. Emulate __WALL.
2468 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2469 Use lwpid_of.
2470 (sigchld_handler, linux_supports_non_stop, linux_async)
2471 (linux_start_non_stop): New.
2472 (linux_target_ops): Register linux_supports_non_stop, linux_async
2473 and linux_start_non_stop.
2474 (initialize_low): Install SIGCHLD handler.
2475 * thread-db.c (thread_db_create_event, find_one_thread)
2476 (thread_db_get_tls_address): Use lwpid_of.
2477 * win32-low.c (win32_detach): Adjust to use resume_kind.
2478 (win32_wait): Add `options' argument.
2479 * spu-low.c (spu_resume): Adjust to use resume_kind.
2480 (spu_wait): Add `options' argument.
2481
5b1c542e
PA
24822009-04-01 Pedro Alves <pedro@codesourcery.com>
2483
2484 Decouple target code from remote protocol.
2485
2486 * target.h (enum target_waitkind): New.
2487 (struct target_waitstatus): New.
2488 (struct target_ops) <wait>: Return an unsigned long. Take a
2489 target_waitstatus pointer instead of a char pointer.
2490 (mywait): Likewise.
2491 * target.c (mywait): Change prototype to return an unsigned long.
2492 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2493 * server.h (thread_from_wait, old_thread_from_wait): Delete
2494 declarations.
2495 (prepare_resume_reply): Change prototype to take a
2496 target_waitstatus.
2497 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2498 (last_status, last_ptid): New.
2499 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2500 pid instead of a signal.
2501 (attach_inferior): Remove "status" and "signal" parameters.
2502 Adjust.
2503 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2504 not as an address.
2505 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2506 (handle_v_requests, myresume): Remove "status" and "signal"
2507 parameters. Adjust.
2508 (handle_status): New.
2509 (main): Delete local `status'. Adjust.
2510 * remote-utils.c: Include target.h.
2511 (prepare_resume_reply): Change prototype to take a
2512 target_waitstatus. Adjust.
2513
2514 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2515 interface.
2516 * spu-low.c (spu_wait): Adjust.
2517 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2518 Delete.
2519 (win32_wait): Adjust.
2520
2bd7c093
PA
25212009-04-01 Pedro Alves <pedro@codesourcery.com>
2522
2523 * target.h (struct thread_resume): Delete leave_stopped member.
2524 (struct target_ops): Add a `n' argument to the `resume' callback.
2525 * server.c (start_inferior): Adjust.
2526 (handle_v_cont, myresume): Adjust.
2527 * linux-low.c (check_removed_breakpoint): Adjust to resume
2528 interface change, and to removed leave_stopped field.
2529 (resume_ptr): Delete.
2530 (struct thread_resume_array): New.
2531 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2532 resume interface change.
2533 (linux_continue_one_thread, linux_queue_one_thread)
2534 (resume_status_pending_p): Check if the resume field is NULL
2535 instead of checking the leave_stopped member.
2536 (linux_resume): Adjust to the target resume interface change.
2537 * spu-low.c (spu_resume): Adjust to the target resume interface
2538 change.
2539 * win32-low.c (win32_detach, win32_resume): Ditto.
2540
c35fafde
PA
25412009-04-01 Pedro Alves <pedro@codesourcery.com>
2542
2543 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2544 flag.
2545 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2546 pending.
2547 (linux_continue_one_thread): Only preserve the stepping flag if
2548 there's a pending breakpoint.
2549
0a59d50b
PA
25502009-03-31 Pedro Alves <pedro@codesourcery.com>
2551
2552 * server.c (main): After the inferior having exited, call
2553 remote_close before exiting gdbserver.
2554
f04c6d38
TJB
25552009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2556
2557 Fix size of FPSCR in Power 7 processors.
2558 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2559 (PPC_FEATURE_HAS_DFP): New #define.
2560 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2561 size of the FPSCR.
2562
78e5cee6
PA
25632009-03-23 Pedro Alves <pedro@codesourcery.com>
2564
2565 * server.c (handle_query) Whitespace and formatting.
2566
1b3f6016
PA
25672009-03-22 Pedro Alves <pedro@codesourcery.com>
2568
2569 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2570 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2571 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2572 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2573 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2574 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2575 Makefile.in, configure.ac: Fix whitespace throughout.
2576 * configure: Regenerate.
2577
a07b2135
PA
25782009-03-22 Pedro Alves <pedro@codesourcery.com>
2579
2580 * inferiors.c (find_inferior): Make it safe for the callback
2581 function to delete the currently iterated inferior.
2582
67cc2626
PA
25832009-03-22 Pedro Alves <pedro@codesourcery.com>
2584
2585 * Makefile.in (linuw_low_h): Move higher.
2586 (thread-db.o): Depend on $(linux_low_h).
2587
54a0b537
PA
25882009-03-17 Pedro Alves <pedro@codesourcery.com>
2589
2590 Rename "process" to "lwp" throughout.
2591
2592 * linux-low.c (all_processes): Rename to...
2593 (all_lwps): ... this.
2594 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2595 (add_process): Rename to ...
2596 (add_lwp): ... this. Adjust.
2597 (linux_create_inferior): Adjust.
2598 (linux_attach_lwp): Adjust.
2599 (linux_attach): Adjust.
2600 (linux_kill_one_process): Rename to ...
2601 (linux_kill_one_lwp): ... this. Adjust.
2602 (linux_kill): Adjust.
2603 (linux_detach_one_process): Rename to ...
2604 (linux_detach_one_lwp): ... this. Adjust.
2605 (linux_detach): Adjust.
2606 (check_removed_breakpoint): Adjust.
2607 (status_pending_p): Adjust.
2608 (linux_wait_for_process): Rename to ...
2609 (linux_wait_for_lwp): ... this. Adjust.
2610 (linux_wait_for_event): Adjust.
2611 (send_sigstop): Adjust.
2612 (wait_for_sigstop): Adjust.
2613 (stop_all_processes): Rename to ...
2614 (stop_all_lwps): ... this.
2615 (linux_resume_one_process): Rename to ...
2616 (linux_resume_one_lwp): ... this. Adjust.
2617 (linux_set_resume_request, linux_continue_one_thread)
2618 (linux_queue_one_thread, resume_status_pending_p)
2619 (usr_store_inferior_registers, regsets_store_inferior_registers)
2620 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2621 Adjust.
2622 * linux-low.h (get_process): Rename to ...
2623 (get_lwp): ... this. Adjust.
2624 (get_thread_process): Rename to ...
2625 (get_thread_lwp): ... this. Adjust.
2626 (get_process_thread): Rename to ...
2627 (get_lwp_thread): ... this. Adjust.
2628 (struct process_info): Rename to ...
2629 (struct lwp_info): ... this.
2630 (all_processes): Rename to ...
2631 (all_lwps): ... this.
2632 * proc-service.c (ps_lgetregs): Adjust.
2633 * thread-db.c (thread_db_create_event, find_one_thread)
2634 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2635
0b16c5cf
PA
26362009-03-14 Pedro Alves <pedro@codesourcery.com>
2637
2638 * server.c (handle_query): Handle "qAttached".
2639
32de4b9d
NS
26402009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2641
2642 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2643 GPLv3, update license URL.
2644
2aecd87f
DE
26452009-03-01 Doug Evans <dje@google.com>
2646
93efd302 2647 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
2648 (server_h): Add gdb_signals.h.
2649 (signals.o): Update.
2650 * server.h (target_signal_from_host,target_signal_to_host_p)
2651 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2652
86b1f9c5
PM
26532009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2654
2655 * remote-utils.c (getpkt): Also generate remote-debug
2656 information if noack_mode is set.
2657
4aa995e1
PA
26582009-02-06 Pedro Alves <pedro@codesourcery.com>
2659
2660 * server.c (handle_query): Report qXfer:siginfo:read and
2661 qXfer:siginfo:write as supported and handle them.
2662 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2663 * linux-low.c (linux_xfer_siginfo): New.
2664 (linux_target_ops): Set it.
2665
62709adf
PA
26662009-01-26 Pedro Alves <pedro@codesourcery.com>
2667
2668 * server.c (gdbserver_usage): Mention --remote-debug.
2669 (main): Accept '--remote-debug' switch.
2670
aef93bd7
DE
26712009-01-18 Doug Evans <dje@google.com>
2672
2673 * regcache.c (new_register_cache): No need to check result of xcalloc.
2674 * server.c (handle_search_memory): Back out calls to xmalloc,
2675 result is checked and error is returned to user upon failure.
2676 (handle_query): Ditto. Add more checks for result of malloc.
2677 (handle_v_cont): Check result of malloc, report error back to
2678 user upon failure.
2679 (handle_v_run): Ditto. Call freeargv.
2680 * server.h (freeargv): Declare.
2681 * utils.c (freeargv): New fn.
2682
54363045
DE
26832009-01-15 Doug Evans <dje@google.com>
2684
f626972c
DE
2685 * gdbreplay.c (perror_with_name): Make arg const char *.
2686 * server.h (target_signal_to_name): Make return type const char *.
0842e787 2687 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 2688 * utils.c (perror_with_name): Make arg const char *.
54363045 2689
18aae699
PA
26902009-01-14 Pedro Alves <pedro@codesourcery.com>
2691
2692 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2693 when handling a EXIT_PROCESS_DEBUG_EVENT.
2694
ff703abe
JB
26952009-01-06 Joel Brobecker <brobecker@adacore.com>
2696
2697 * gdbreplay.c (gdbreplay_version): Update copyright year.
2698 * server.c (gdbserver_version): Likewise.
2699
f21cc1a2 27002009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
2701
2702 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 2703 (handle_extended_wait): Improve comment.
0e21c1ec 2704
bca929d3
DE
27052008-12-13 Doug Evans <dje@google.com>
2706
2707 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2708 * server.h (ATTR_MALLOC): New macro.
2709 (xmalloc,xcalloc,xstrdup): Declare.
2710 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2711 * inferiors.c: Ditto.
2712 * linux-low.c: Ditto.
2713 * mem-break.c: Ditto.
2714 * regcache.c: Ditto.
2715 * remote-utils.c: Ditto.
2716 * server.c: Ditto.
2717 * target.c: Ditto.
2718 * win32-low.c: Ditto.
2719
97438e3f
DE
27202008-12-12 Doug Evans <dje@google.com>
2721
896c7fbb
DE
2722 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2723 in debugging printf.
2724
97438e3f
DE
2725 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2726
e3b886f8
DE
27272008-12-09 Doug Evans <dje@google.com>
2728
2729 * linux-low.h (struct process_info): Delete member tid, unused.
2730 * thread-db.c (find_one_thread): Update.
2731 (maybe_attach_thread): Update.
2732
07e059b5
VP
27332008-12-02 Pedro Alves <pedro@codesourcery.com>
2734
2735 * target.h (struct target_ops): Add qxfer_osdata member.
2736 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2737 and dirent.h.
2738 (linux_qxfer_osdata): New functions.
2739 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2740 callback.
2741 * server.c (handle_query): Handle "qXfer:osdata:read:".
2742 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2743 (buffer_xml_printf): New functions.
2744 * server.h (struct buffer): New.
2745 (buffer_grow_str, buffer_grow_str0): New macros.
2746 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2747 (buffer_xml_printf): Declare.
2748
4cab47ab
DE
27492008-11-24 Doug Evans <dje@google.com>
2750
2751 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2752
f142445f
DJ
27532008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2754
2755 * server.c (handle_v_run): Always use the supplied argument list.
2756
d0107bb6
BW
27572008-11-19 Bob Wilson <bob.wilson@acm.org>
2758
2759 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2760 (xtensa_regmap_table): Add entry for scompare1.
2761
2c4ad781
TJB
27622008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2763
2764 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2765 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2766 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2767 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2768 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2769 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2770 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2771 XML target descriptions.
2772 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2773 when inferior is running on an ISA 2.05 or later processor. Add
2774 special case to return offset for full 64-bit slot of FPSCR when
2775 in 32-bits.
2776
dfb64f85
DJ
27772008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2778
2779 * Makefile.in (SFILES, clean): Added sparc64 files.
2780 (reg-sparc64.o, reg-sparc64.c): New.
2781 * configure.srv (sparc*-*-linux*): New configuration.
2782 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2783 syscall arguments for SPARC.
2784 (regsets_store_inferior_registers): Likewise.
2785 * linux-sparc-low.c: New file.
2786
66b6e1dd
DE
27872008-10-21 Doug Evans <dje@google.com>
2788
2789 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2790 (READLINE_DIR,READLINE_DEP): Delete.
2791 (INTERNAL_CFLAGS): Update.
2792 (LINTFLAGS): Update.
2793
9b710a42
PA
27942008-10-10 Pedro Alves <pedro@codesourcery.com>
2795
2796 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2797 whole argv from the last run, not just argv[0].
2798
5822d809
PA
27992008-09-08 Pedro Alves <pedro@codesourcery.com>
2800
2801 * regcache.c (new_register_cache): Return NULL if the register
2802 cache size isn't known yet.
2803 (free_register_cache): Avoid dereferencing a NULL regcache.
2804
74aac56f
DJ
28052008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2806
2807 * configure.srv: Merge MIPS and MIPS64.
2808
400b20f5
MR
28092008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2810
2811 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2812
677c5bb1
LM
28132008-08-18 Luis Machado <luisgpm@br.ibm.com>
2814
2815 * Makefile.in: Add required vsx dependencies.
2816
2817 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2818 Declare init_registers_powerpc_vsx32l.
2819 Declare init_registers_powerpc_vsx64l.
2820 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2821 (ppc_arch_setup): Check for VSX in hwcap.
2822 (ppc_fill_vsxregset): New function.
2823 (ppc_store_vsxregset): New function.
2824 Add new VSX entry in regset_info target_regsets.
2825
2826 * configure.srv: Add new VSX dependencies.
2827
a6f3e723
SL
28282008-08-12 Pedro Alves <pedro@codesourcery.com>
2829
2830 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2831 (remote_open): Set or clear transport_is_reliable.
2832 (putpkt_binary): Don't expect acks in noack mode.
2833 (getpkt): Don't send ack/nac in noack mode.
2834 * server.c (handle_general_set): Handle QStartNoAckMode.
2835 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2836 qSupported.
2837 (main): Reset noack_mode on every connection.
2838 * server.h (noack_mode): Declare.
2839
a417dc56
RW
28402008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2841
2842 * Makefile.in (GDBREPLAY_OBS): New variable.
2843 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2844
3221518c
UW
28452008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2846 Daniel Jacobowitz <dan@codesourcery.com>
2847
2848 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2849 (usr_store_inferior_registers): Likewise.
2850 (regsets_store_inferior_registers): Likewise.
2851
ec56be1b
PA
28522008-07-31 Rolf Jansen <rj@surtec.com>
2853 Pedro Alves <pedro@codesourcery.com>
2854
2855 * configure.ac: Check for memmem declaration.
2856 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2857 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2858 (disable_packet_qfThreadInfo): Unconditionally compile.
2859 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2860 * configure, config.in: Regenerate.
2861
2fe5e3ff
DE
28622008-07-28 Doug Kwan <dougkwan@google.com>
2863
2864 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2865 (linux_write_memory): Remove declaration of errno.
2866
836acd6d
UW
28672008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2868
2869 * linux-low.c (handle_extended_wait): Do not use "status"
2870 variable uninitialized.
2871
aeba519e
PA
28722008-07-07 Pedro Alves <pedro@codesourcery.com>
2873
2874 * server.c (handle_v_attach): Inhibit reporting dll changes.
2875
db42f210
PA
28762008-06-27 Pedro Alves <pedro@codesourcery.com>
2877
2878 * remote-utils.c (prepare_resume_reply): If requested, don't
2879 output "thread:TID" in the T stop reply.
2880
2881 * server.c (disable_packet_vCont, disable_packet_Tthread)
2882 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2883 (handle_query): If requested, disable support for qC, qfThreadInfo
2884 and qsThreadInfo.
2885 (handle_v_requests): If requested, disable support for vCont.
2886 (gdbserver_show_disableable): New.
2887 (main): Handle --disable-packet and --disable-packet=LIST.
2888
2889 * server.h (disable_packet_vCont, disable_packet_Tthread)
2890 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2891
8e4c5421
CD
28922008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2893
2894 * server.c (gdbserver_usage): Mention --version.
2895
6e23a804
DJ
28962008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2897
2898 * Makefile.in (gdbreplay.o): New rule.
2899
90aa6a40
JM
29002008-06-06 Joseph Myers <joseph@codesourcery.com>
2901
2902 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2903 message, not gdbserver.
2904
c16158bc
JM
29052008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2906 Nathan Sidwell <nathan@codesourcery.com>
2907 Joseph Myers <joseph@codesourcery.com>
2908
2909 * acinclude.m4: Include ../../config/acx.m4.
2910 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2911 * configure, config.in: Regenerate.
2912 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2913 * server.c (gdbserver_version): Print PKGVERSION.
2914 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2915 (main): Adjust gdbserver_usage calls.
2916 * gdbreplay.c (version, host_name): Add declarations.
2917 (gdbreplay_version, gdbreplay_usage): New.
2918 (main): Accept --version and --help options.
2919
aeb75bf5
DJ
29202008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2921
2922 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2923 (arm_breakpoint_at): Handle Thumb.
2924 (the_low_target): Add comment.
2925
76b233dd
UW
29262008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2927
2928 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2929
08388c79
DE
29302008-05-09 Doug Evans <dje@google.com>
2931
a3c83fae
DE
2932 * server.h (decode_search_memory_packet): Declare.
2933 * remote-utils.c (decode_search_memory_packet): New fn.
2934 * server.c (handle_search_memory_1): New fn.
08388c79
DE
2935 (handle_search_memory): New fn.
2936 (handle_query): Process qSearch:memory packets.
2937
bb9c3d36
UW
29382008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2939
2940 * regcache.c (registers_length): Remove.
2941 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2942 full register packet.
2943 * regcache.h (registers_length): Remove prototype.
2944 * server.h (PBUFSIZ): Define to 16384.
2945
7284e1be
UW
29462008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2947
2948 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2949 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2950 powerpc-64l.o, and powerpc-altivec64l.o.
2951 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2952 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2953 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2954 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2955 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2956 to srv_xmlfiles.
2957
2958 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2959 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2960 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2961 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2962 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2963 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2964 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2965 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2966 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2967 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2968 (clean): Update.
2969
2970 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2971 (init_registers_powerpc_32l): ... this new prototype.
2972 (init_registers_powerpc_32): Remove, replace by ...
2973 (init_registers_powerpc_altivec32l): ... this new prototype.
2974 (init_registers_powerpc_e500): Remove, replace by ...
2975 (init_registers_powerpc_e500l): ... this new prototype.
2976 (init_registers_ppc64): Remove, replace by ...
2977 (init_registers_powerpc_64l): ... this new prototype.
2978 (init_registers_powerpc_64): Remove, replace by ...
2979 (init_registers_powerpc_altivec64l): ... this new prototype.
2980 (ppc_num_regs): Set to 73.
2981 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2982 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2983 (ppc_cannot_store_register): Handle orig_r3 and trap.
2984 (ppc_arch_setup): Update init_registers_... calls.
2985 (ppc_fill_gregset): Handle orig_r3 and trap.
2986
2987 * inferiors.c (clear_inferiors): Reset current_inferior.
2988
fdc59709
PB
29892008-04-23 Paolo Bonzini <bonzini@gnu.org>
2990
2991 * acinclude.m4: Add override.m4.
2992 * configure: Regenerate.
2993
c9b2f845
UW
29942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2995
2996 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2997 initial call to init_register_ppc64.
2998
550512b8
UW
29992008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
3000
3001 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
3002 powerpc*-*-linux* case.
3003 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
3004
b6430ec3
UW
30052008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
3006
3007 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
3008 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
3009 from reg_xmlfiles.
3010 * linux-ppc-low.c: Include <elf.h>.
3011 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
3012 (ppc_hwcap): New global variable.
3013 (ppc_regmap): Remove __SPE__ #ifdef sections.
3014 (ppc_regmap_e500): New global variable.
3015 (ppc_cannot_store_register): Update __SPE__ special case.
3016 (ppc_get_hwcap): New function.
3017 (ppc_arch_setup): Use it to determine whether inferior supports
3018 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
3019 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
3020 Do not access registers if target does not support AltiVec.
3021 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
3022 Do not access registers if target does not support SPE.
3023 (target_regsets): Unconditionally include AltiVec and SPE regsets.
3024
52fa2412
UW
30252008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
3026
3027 * linux-low.c (disabled_regsets, num_regsets): New.
3028 (use_regsets_p): Delete.
3029 (linux_wait_for_process): Clear disabled_regsets.
3030 (regsets_fetch_inferior_registers): Check and set it.
3031 (regsets_store_inferior_registers): Likewise.
3032 (linux_fetch_registers, linux_store_registers): Do not use
3033 use_regsets_p.
3034 (initialize_low): Allocate disabled_regsets.
3035
e28b3332
DJ
30362008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
3037
3038 * Makefile.in (LIBOBJS): New.
3039 (OBS): Use LIBOBJS.
3040 (memmem.o): New rule.
3041 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
3042 * configure: Regenerated.
3043
4536995d
UW
30442008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
3045
3046 * server.c (handle_query): Never return "unsupported" for
3047 qXfer:features:read queries.
3048
221c031f
UW
30492008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
3050
3051 * server.c (get_features_xml): Fix inverted condition.
3052 (handle_query): Always support qXfer:feature:read.
3053
ccd213ac
DJ
30542008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
3055
3056 * server.c (wrapper_argv): New.
3057 (start_inferior): Handle wrapper_argv. If set, expect an extra
3058 trap.
3059 (gdbserver_usage): Document --wrapper.
3060 (main): Parse --wrapper.
3061
6fe305f7
UW
30622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3063
3064 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
3065 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
3066 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
3067 (ppc_set_pc): Likewise.
3068 (ppc_arch_setup): New function.
3069 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
3070 of collect_register.
3071 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
3072
5b0a002e
UW
30732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3074
3075 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
3076 instead of linux-ppc64-low.o.
3077 * linux-ppc64-low.c: Remove file.
3078 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
3079 (linux-ppc64-low.o): Remove rule.
3080
3081 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
3082 (init_registers_powerpc_64): Likewise.
3083 (ppc_regmap): Conditionally define depending on __powerpc64__.
3084 (ppc_cannot_store_register): Do not special-case "fpscr" when
3085 compiled on __powerpc64__.
3086 (ppc_collect_ptrace_register): New function.
3087 (ppc_supply_ptrace_register): New function.
3088 (ppc_breakpoint): Change type to "unsigned int".
3089 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
3090 (the_low_target): Conditionally provide initializers for the
3091 arch_setup member depending on __powerpc64__. Install
3092 collect_ptrace_register and supply_ptrace_register members.
3093
9b4b61c8
UW
30942008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
3095
3096 * regcache.h (gdbserver_xmltarget): Add extern declaration.
3097 * server.c (gdbserver_xmltarget): Define.
3098 (get_features_xml): Use it to replace "target.xml" and arch_string.
3099
3100 * configure.srv: Remove srv_xmltarget. Add XML files that were
3101 mentioned there to srv_xmlfiles instead. Remove conditional tests
3102 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
3103 srv_xmlfiles and srv_regobj to include all possible choices.
3104 * configure.ac (srv_xmltarget): Remove.
3105 (srv_xmlfiles): Do not add "target.xml".
3106 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
3107 checks for supplementary target information.
3108 * configure: Regenerate.
3109 * Makefile.in (XML_TARGET): Remove.
3110 (target.xml): Remove rule.
3111 (clean): Do not clean up target.xml.
3112 (.PRECIOUS): Do not mention target.xml.
3113
3114 * target.h (struct target_ops): Remove arch_string member.
3115 * linux-low.c (linux_arch_string): Remove.
3116 (linux_target_ops): Remove arch_string initializer.
3117 * linux-low.h (struct linux_target_ops): Remove arch_string member.
3118 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
3119 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
3120 * spu-low.c (spu_arch_string): Remove.
3121 (spu_target_ops): Remove arch_string initializer.
3122 * win32-low.c (win32_arch_string): Remove.
3123 (win32_target_ops): Remove arch_string initializer.
3124 * win32-low.h (struct win32_target_ops): Remove arch_string member.
3125 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
3126 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
3127
ee1a7ae4
UW
31282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3129
3130 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
3131 by collect_ptrace_register and supply_ptrace_register hooks.
3132 * linux-low.c (fetch_register): Use supply_ptrace_register callback
3133 instead of checking for the_low_target.left_pad_xfer.
3134 (usr_store_inferior_registers): Use collect_ptrace_register callback
3135 instead of checking for the_low_target.left_pad_xfer.
3136
3137 * linux-s390-low.c (s390_collect_ptrace_register): New function.
3138 (s390_supply_ptrace_register): Likewise.
3139 (s390_fill_gregset): Call s390_collect_ptrace_register.
3140 (the_low_target): Update.
3141
3142 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
3143 (ppc_supply_ptrace_register): Likewise.
3144 (the_low_target): Update.
3145
3146 * linux-i386-low.c (the_low_target): Update.
3147 * linux-x86-64-low.c (the_low_target): Update.
3148
d61ddec4
UW
31492008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3150
3151 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
3152 reg-s390.o and reg-s390x.o.
3153
3154 * linux-low.c (new_inferior): New global variable.
3155 (linux_create_inferior, linux_attach): Set it.
3156 (linux_wait_for_process): Call the_low_target.arch_setup after the
3157 target has stopped for the first time.
3158 (initialize_low): Do not call the_low_target.arch_setup.
3159
3160 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
3161 (s390_set_pc): Likewise.
3162 (s390_arch_setup): New function.
3163 (the_low_target): Use s390_arch_setup as arch_setup routine.
3164
3165 * regcache.c (realloc_register_cache): New function.
3166 (set_register_cache): Call it for each existing regcache.
3167
d05b4ac3
UW
31682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
3169
3170 * server.h (init_registers): Remove prototype.
3171
3172 * linux-low.h (struct linux_target_ops): Add arch_setup field.
3173 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
3174 instead of init_registers ().
3175 * linux-arm-low.c (init_registers_arm): Add prototype.
3176 (init_registers_arm_with_iwmmxt): Likewise.
3177 (the_low_target): Add initializer for arch_setup field.
3178 * linux-cris-low.c (init_registers_cris): Add prototype.
3179 (the_low_target): Add initializer for arch_setup field.
3180 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
3181 (the_low_target): Add initializer for arch_setup field.
3182 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
3183 (the_low_target): Add initializer for arch_setup field.
3184 * linux-ia64-low.c (init_registers_ia64): Add prototype.
3185 (the_low_target): Add initializer for arch_setup field.
3186 * linux-m32r-low.c (init_registers_m32r): Add prototype.
3187 (the_low_target): Add initializer for arch_setup field.
3188 * linux-m68k-low.c (init_registers_m68k): Add prototype.
3189 (the_low_target): Add initializer for arch_setup field.
3190 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
3191 (init_registers_mips64_linux): Likewise.
3192 (the_low_target): Add initializer for arch_setup field.
3193 * linux-ppc-low.c (init_registers_ppc): Add prototype.
3194 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
3195 (the_low_target): Add initializer for arch_setup field.
3196 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
3197 (init_registers_powerpc_64): Likewise.
3198 (the_low_target): Add initializer for arch_setup field.
3199 * linux-s390-low.c (init_registers_s390): Add prototype.
3200 (init_registers_s390x): Likewise.
3201 (the_low_target): Add initializer for arch_setup field.
3202 * linux-sh-low.c (init_registers_sh): Add prototype.
3203 (the_low_target): Add initializer for arch_setup field.
3204 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
3205 (the_low_target): Add initializer for arch_setup field.
3206 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
3207 (the_low_target): Add initializer for arch_setup field.
3208
3209 * win32-low.h (struct win32_target_ops): Add arch_setup field.
3210 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
3211 instead of init_registers ().
3212 * win32-arm-low.c (init_registers_arm): Add prototype.
3213 (the_low_target): Add initializer for arch_setup field.
3214 * win32-i386-low.c (init_registers_i386): Add prototype.
3215 (the_low_target): Add initializer for arch_setup field.
3216
3217 * spu-low.c (init_registers_spu): Add prototype.
3218 (initialize_low): Call initialie_registers_spu () instead of
3219 initialize_registers ().
3220
fd96d250
PA
32212008-02-19 Pedro Alves <pedro@codesourcery.com>
3222
3223 * server.c (handle_v_requests): When handling the vRun and vAttach
3224 packets, if already debugging a process, don't kill it. Return an
3225 error instead.
3226
d41b6bb4
DJ
32272008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3228
3229 * server.c (handle_query): Correct length check.
3230
5ac588cf
PA
32312008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3232
3233 * win32-low.c (do_initial_child_stuff): Add process handle
3234 parameter. Set current_process_handle and current_process_id from the
3235 parameters. Clear globals.
3236 (win32_create_inferior): Don't set current_process_handle and
3237 current_process_id here. Instead pass them on the call to
3238 do_initial_child_stuff.
3239 (win32_attach): Likewise.
3240 (win32_clear_inferiors): New.
3241 (win32_kill): Don't close the current process handle or the
3242 current thread handle here. Instead call win32_clear_inferiors.
3243 (win32_detach): Don't open a new handle to the process. Call
3244 win32_clear_inferiors.
3245 (win32_join): Don't rely on current_process_handle; open a new
3246 handle using the process id.
3247 (win32_wait): Call win32_clear_inferiors when the inferior process
3248 has exited.
3249
ecd7ecbc
DJ
32502008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3251
3252 * server.c (monitor_show_help): Add "exit".
3253
1525d545
MG
32542008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3255
ecd7ecbc 3256 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
3257 (clean): Add reg-xtensa.c.
3258 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
3259 * configure.srv (xtensa*-*-linux*) New target.
3260 * linux-xtensa-low.c: New.
3261 * xtensa-xtregs.c: New.
1525d545 3262
59a016f0
PA
32632008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3264
3265 * hostio.c: Don't include errno.h.
3266 (errno_to_fileio_errno): Move to hostio-errno.
3267 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3268 error number outputting to the target->hostio_last_error callback.
3269 (hostio_packet_error): Use FILEIO_EINVAL directly.
3270 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3271 calls to hostio_error.
3272 * hostio-errno.c: New.
3273 * server.h (hostio_last_error_from_errno): Declare.
3274 * target.h (target_ops): Add hostio_last_error member.
3275 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3276 as hostio_last_error handler.
3277 * spu-low.c (spu_target_ops): Likewise.
3278 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3279 (wince_hostio_last_error): New functions.
3280 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3281 as hostio_last_error handler.
3282 (win32_target_ops) [!_WIN32_WCE]: Register
3283 hostio_last_error_from_errno as hostio_last_error handler.
3284 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3285 (hostio-errno.o): New rule.
3286 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3287 * configure.srv (srv_hostio_err_objs): New variable. Default to
3288 hostio-errno.o.
3289 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3290 * configure: Regenerate.
3291
2d717e4f
DJ
32922008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3293
3294 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3295 (linux_kill, linux_detach): Clean up the process list.
3296 * remote-utils.c (remote_open): Improve port number parsing.
3297 (putpkt_binary, input_interrupt): Only send interrupts if the target
3298 is running.
3299 * server.c (extended_protocol): Make static.
3300 (attached): Define earlier.
3301 (exit_requested, response_needed, program_argv): New variables.
3302 (target_running): New.
3303 (start_inferior): Clear attached here.
3304 (attach_inferior): Set attached here.
3305 (require_running): Define.
3306 (handle_query): Use require_running and target_running. Implement
3307 "monitor exit".
3308 (handle_v_attach, handle_v_run): New.
3309 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3310 (gdbserver_usage): Update.
3311 (main): Redo argument parsing. Handle --debug and --multi. Handle
3312 --attach along with other options or after the port. Save
3313 program_argv. Support no initial program. Resynchronize
3314 communication with GDB after an error. Handle "monitor exit".
3315 Use require_running and target_running. Always allow the extended
3316 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3317 restart in extended mode.
3318 * README: Refer to the GDB manual. Update --attach usage.
3319
7407e2de
AS
33202007-12-20 Andreas Schwab <schwab@suse.de>
3321
3322 * linux-low.c (STACK_SIZE): Define.
3323 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3324 (linux_test_for_tracefork): Likewise.
3325
b65d95c5
DJ
33262007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3327
3328 * linux-low.c (linux_wait_for_event): Update messages. Do not
3329 reinsert auto-delete breakpoints.
3330 * mem-break.c (struct breakpoint): Change return type of handler to
3331 int.
3332 (set_breakpoint_at): Update handler type.
3333 (reinsert_breakpoint_handler): Return 1 instead of calling
3334 delete_breakpoint.
3335 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3336 setting a new one.
3337 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3338 * mem-break.h (set_breakpoint_at): Update handler type.
3339 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3340 * win32-low.c (auto_delete_breakpoint): New.
3341 (get_child_debug_event): Use it.
3342
4e799345
DJ
33432007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3344
3345 * configure.ac: Check for pread and pwrite.
3346 * hostio.c (handle_pread): Fall back to lseek and read.
3347 (handle_pwrite): Fall back to lseek and write.
3348 * config.in, configure: Regenerated.
3349
27524b67
DJ
33502007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3351
3352 * server.c (myresume): Add own_buf argument.
3353 (main): Update calls.
3354
a20d5e98
DJ
33552007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3356
3357 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3358 * remote-utils.c (remote_open): Do not call disable_async_io.
3359 (block_async_io): Delete.
3360 (unblock_async_io): Make static.
3361 (initialize_async_io): New.
3362 * server.c (handle_v_cont): Handle async I/O here.
3363 (myresume): Likewise. Move other common resume tasks here...
3364 (main): ... from here. Call initialize_async_io. Disable async
3365 I/O before the main loop.
3366 * server.h (initialize_async_io): Declare.
3367 (block_async_io, unblock_async_io): Delete prototypes.
3368 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3369
b79d787e
DJ
33702007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3371
3372 * remote-utils.c (readchar): Allow binary data in received messages.
3373
d97903b2
PA
33742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3375
3376 * win32-low.c (attaching): New global.
3377 (win32_create_inferior): Clear the `attaching' global.
3378 (win32_attach): Set the `attaching' global.
3379 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3380 attaching. Only set a breakpoint at the entry point if not
3381 attaching.
3382
311de423
PA
33832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3384
3385 * server.c (main): Don't report dll events on the initial
3386 connection on attaches.
3387
6c2d16d2
PA
33882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3389
3390 * server.c (main): Relax numerical bases supported for the pid of
3391 the --attach command line argument.
3392
5ca906e6
PA
33932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3394
3395 * win32-low.c (win32_attach): Call OpenProcess before
3396 DebugActiveProcess, not after. Add last error output to error
3397 call.
3398
9c6c8194
PA
33992007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3400
3401 * win32-low.c (win32_get_thread_context)
3402 (win32_set_thread_context): New functions.
3403 (thread_rec): Use win32_get_thread_context.
3404 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3405 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3406 field.
3407
4d5d1aaa
PA
34082007-12-03 Leo Zayas
3409 Pedro Alves <pedro_alves@portugalmail.pt>
3410
3411 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3412 global variables.
3413 (child_add_thread): Minor cleanup.
3414 (child_continue): Resume artificially suspended threads before
3415 calling ContinueDebugEvent.
3416 (suspend_one_thread): New.
3417 (fake_breakpoint_event): New.
3418 (get_child_debug_event): Change return type to int. Check here if
3419 gdb sent an interrupt request. If a soft interrupt was requested,
3420 fake a breakpoint event. Return 0 if there is no event to handle,
3421 and 1 otherwise.
3422 (win32_wait): Don't check here if gdb sent an interrupt request.
3423 Ensure there is a valid event to handle.
3424 (win32_request_interrupt): Add soft interruption method as last
3425 resort.
3426
c436e841
PA
34272007-12-03 Leo Zayas
3428 Pedro Alves <pedro_alves@portugalmail.pt>
3429
3430 * win32-low.h (win32_thread_info): Add descriptions to the
3431 structure members. Replace `suspend_count' counter by a
3432 `suspended' flag.
3433 * win32-low.c (thread_rec): Update condition of when to get the
3434 context from the inferior. Rely on ContextFlags being set if it
3435 has already been retrieved. Only suspend the inferior thread if
3436 we haven't already. Warn if that fails.
3437 (continue_one_thread): s/suspend_count/suspended/. Only call
3438 ResumeThread once. Warn if that fails.
3439
e7b5fa67
PA
34402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3441
3442 * win32-low.c (win32_wait): Don't read from the inferior when it
3443 has already exited.
3444
a385171d
PA
34452007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3446
3447 * Makefile.in (win32_low_h): New variable.
3448 (win32-low.o): Add dependency on $(win32_low_h).
3449 (win32-arm-low.o, win32-i386-low.o): New rules.
3450
f80c84b3
DJ
34512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3452
3453 * hostio.c: Correct copyright year.
3454
a6b151f1
DJ
34552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3456
3457 * Makefile.in (OBS): Add hostio.o.
3458 (hostio.o): New rule.
3459 * server.h (handle_vFile): Declare.
3460 * hostio.c: New file.
3461 * server.c (handle_v_requests): Take packet_len and new_packet_len
3462 for binary packets. Call handle_vFile.
3463 (main): Update call to handle_v_requests.
3464
f9387fc3
DJ
34652007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3466
3467 * linux-low.c: Include <sched.h>.
3468
51c2684e
DJ
34692007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3470
3471 * linux-low.c (linux_tracefork_grandchild): New.
3472 (linux_tracefork_child): Use clone.
3473 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3474
75f83163
JB
34752007-10-31 Joel Brobecker <brobecker@adacore.com>
3476
3477 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3478
da5898ce
DJ
34792007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3480
3481 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3482
24a09b5f
DJ
34832007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3484
3485 * inferiors.c (change_inferior_id): Delete.
3486 (add_pid_to_list, pull_pid_from_list): New.
3487 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3488 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3489 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3490 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3491 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3492 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3493 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3494 (using_threads): Always set to 1.
3495 (handle_extended_wait): New.
3496 (add_process): Do not set TID.
3497 (linux_create_inferior): Set must_set_ptrace_flags.
3498 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3499 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3500 (linux_thread_alive): Rename TID argument to LWPID.
3501 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3502 (linux_wait_for_event): Do not use TID or check using_threads. Update
3503 call to dead_thread_notify. Call handle_extended_wait.
3504 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3505 (send_sigstop): Delete sigstop_sent.
3506 (wait_for_sigstop): Avoid TID.
3507 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3508 (linux_test_for_tracefork): New.
3509 (linux_lookup_signals): Use thread_db_active and
3510 linux_supports_tracefork_flag.
3511 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3512 * linux-low.h (get_process_thread): Avoid TID.
3513 (struct process_ifo): Move thread_known and tid to the end. Remove
3514 sigstop_sent.
3515 (linux_attach_lwp, thread_db_init): Update prototypes.
3516 * server.h (change_inferior_id): Delete prototype.
3517 (add_pid_to_list, pull_pid_from_list): New prototypes.
3518 * thread-db.c (thread_db_use_events): New.
3519 (find_first_thread): Rename to...
3520 (find_one_thread): ...this. Update callers and messages. Do not
3521 call fatal. Check thread_db_use_events. Do not call
3522 change_inferior_id or new_thread_notify.
3523 (maybe_attach_thread): Update. Do not call new_thread_notify.
3524 (thread_db_init): Set thread_db_use_events. Check use_events.
3525 * utils.c (fatal, warning): Correct message prefix.
3526
30ed0a8f
DJ
35272007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3528
3529 * Makefile.in (clean): Remove new files.
3530 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3531 (powerpc-64.o, powerpc-64.c): New rules.
3532 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3533 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3534 with SPE.
3535 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3536 SPE targets.
3537 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3538 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3539 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3540 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3541 (target_regsets): Add AltiVec and SPE register sets.
3542 * configure.ac: Check for AltiVec and SPE.
3543 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3544 (ppc_fill_vrregset, ppc_store_vrregset): New.
3545 (target_regsets): Add AltiVec register set.
3546 * configure: Regenerated.
3547
fd462a61
DJ
35482007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3549
3550 * linux-low.c (O_LARGEFILE): Define.
3551 (linux_read_memory): Use /proc/PID/mem.
3552 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3553 * configure, config.in: Regenerated.
3554
69f223ed
DJ
35552007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3556
3557 * linux-low.c (linux_wait_for_event): Do not pass signals while
3558 single-stepping.
3559
aec18585
PA
35602007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3561
3562 * win32-low.c (create_process): New.
3563 (win32_create_inferior): Use create_process instead of
3564 CreateProcess. If create_process failed retry appending an ".exe"
3565 suffix. Store the GetLastError result immediatelly after
3566 create_process calls and use it on the call to error.
3567
34d86ddd
PA
35682007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3569
3570 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3571
5a0e3bd0
JB
35722007-08-23 Joel Brobecker <brobecker@adacore.com>
3573
3574 * configure.ac: Switch license to GPLv3.
3575
f88c79e6
MS
35762007-08-01 Michael Snyder <msnyder@access-company.com>
3577
3578 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3579
6b3d9b83
PA
35802007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3581
3582 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3583 typedef.
3584 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3585 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3586 CloseToolhelp32Snapshot.
3587 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3588 CloseToolhelp32Snapshot.
3589
c588c53c
MS
35902007-07-27 Michael Snyder <michael.snyder@access-company.com>
3591
3592 * server.c (main): Check for inferior exit before main loop.
3593
aa0403d9
PA
35942007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3595
3596 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3597 instead of on tmp_desc.
3598
255e7678
DJ
35992007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3600 Daniel Jacobowitz <dan@codesourcery.com>
3601
3602 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3603 (add_thread): Minor cleanups.
3604 (clear_inferiors): Move lower in the file. Clear the DLL
3605 list.
3606 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3607 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3608 (xml_escape_text): New.
3609 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3610 for qSupported.
3611 (handle_v_cont): Report errors.
3612 (gdbserver_version): Update.
3613 (main): Correct size of own_buf. Do not report initial DLL events.
3614 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3615 (unloaded_dll, xml_escape_text): New.
3616 * win32-low.c (enum target_waitkind): Update comments.
3617 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3618 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3619 (win32_EnumProcessModules, win32_GetModuleInformation)
3620 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3621 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3622 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3623 (win32_Module32First, win32_Module32Next, load_toolhelp)
3624 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3625 (get_child_debug_event): Handle DLL events.
3626 (win32_wait): Likewise.
3627
0d37add9
DJ
36282007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3629
3630 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3631 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3632
45e2715e
PA
36332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3634
3635 * win32-low.c (handle_output_debug_string): Ignore event if not
3636 waiting.
3637
c5674cf1
PA
36382007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3639
3640 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3641
2bbe3cc1
DJ
36422007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3643
3644 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3645
ae13219e
DJ
36462007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3647
3648 * inferiors.c (change_inferior_id): Add comment.
3649 * linux-low.c (check_removed_breakpoint): Add an early
3650 prototype. Improve debug output.
3651 (linux_attach): Doc update.
3652 (linux_detach_one_process, linux_detach): Clean up before releasing
3653 each process.
3654 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3655 * linux-low.h (struct process_info): Doc improvement.
3656 * mem-break.c (delete_all_breakpoints): New.
3657 * mem-break.h (delete_all_breakpoints): New prototype.
3658 * thread-db.c (find_first_thread): New.
3659 (thread_db_create_event): Call it instead of
3660 thread_db_find_new_threads. Clean up unused variables.
3661 (maybe_attach_thread): Remove first thread handling.
3662 (thread_db_find_new_threads): Use find_first_thread.
3663 (thread_db_get_tls_address): Likewise.
3664
4105de34
DJ
36652007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3666
3667 * thread-db.c (thread_db_find_new_threads): Add prototype.
3668 (thread_db_create_event): Check for the main thread before adding
3669 a new thread.
3670 (maybe_attach_thread): Only enable event reporting if TID == 0.
3671 (thread_db_get_tls_address): Check for new threads.
3672
2b876972
DJ
36732007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3674
3675 * linux-low.c (linux_create_inferior): Try execv before execvp.
3676 * spu-low.c (spu_create_inferior): Likewise.
3677
7a245884
DJ
36782007-06-13 Mike Frysinger <vapier@gentoo.org>
3679
3680 * linux-low.c (linux_create_inferior): Change execv to execvp.
3681 * spu-low.c (spu_create_inferior): Likewies.
3682
117ce543
DJ
36832007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3684
3685 * Makefile.in (clean): Clean new files instead of deleted ones.
3686 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3687 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3688 rules.
3689 * configure.srv: Specify XML files and new regformats for MIPS and
3690 MIPS64 GNU/Linux.
3691 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3692 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3693 an entry for the restart register.
3694 (mips_cannot_fetch_register, mips_cannot_store_register)
3695 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3696 register names to match the XML descriptions.
3697 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3698 restart register instead of $0.
3699
0e7f50da
UW
37002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3701 Markus Deuling <deuling@de.ibm.com>
3702
3703 * remote-utils.c (decode_xfer_write): New function.
3704 * server.h (decode_xfer_write): Add prototype.
3705 * server.c (handle_query): Add PACKET_LEN argument. Support
3706 qXfer:spu:read and qXfer:spu:write packets.
3707 (main): Pass packet_len to handle_query.
3708 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3709 * target.h (target_ops): Add qxfer_spu.
3710
374c1d38
UW
37112007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3712
3713 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3714 accessing non-seekable spufs files.
3715
bb63802a
UW
37162007-05-16 Markus Deuling <deuling@de.ibm.com>
3717
3718 * server.c (handle_query): Add reply for qC packet.
3719
7390519e
PA
37202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3721 Leo Zayas <lerele@champenstudios@com>
3722
3723 * server.h (check_remote_input_interrupt_request): New function.
3724 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3725 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3726 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3727 (check_remote_input_interrupt_request): New function.
3728 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 3729 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
3730 winapi_GenerateConsoleCtrlEvent): New typedefs.
3731 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3732 to 250 ms.
3733 (win32_wait): Check for remote interrupt request
3734 with check_remote_input_interrupt_request.
3735 (win32_request_interrupt): New function.
3736 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3737
34b34921
PA
37382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3739
3740 * win32-low.c (debug_registers_changed,
3741 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3742 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3743 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3744 (thread_rec): Get context using the low target.
3745 (child_add_thread): Call thread_added on the low target,
3746 which does the same thing.
3747 (regptr): Delete.
3748 (do_initial_child_stuff): Remove debug registers references.
3749 Set context using the low target. Resume threads after
3750 setting the contexts.
3751 (child_continue): Remove dead variable. Remove debug
3752 registers references.
3753 (child_fetch_inferior_registers): Go through the low target.
3754 (do_child_store_inferior_registers): Remove.
3755 (child_store_inferior_registers): Go through the low target.
3756 (win32_resume): Remove debug registers references.
3757 Set context using the low target.
3758 (handle_exception): Change return type to void. Don't record
3759 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3760 first chance exception.
3761 (get_child_debug_event): Change return type to void. Remove
3762 goto loop. Always return after waiting for debug event.
3763 (win32_wait): Convert to switch statement. Handle spurious
3764 events.
3765
3766 * win32-i386-low.c (debug_registers_changed,
3767 debug_registers_used): New.
3768 (initial_stuff): Rename to ...
3769 (i386_initial_stuff): ... this. Clear debug registers
3770 state variables.
3771 (store_debug_registers): Delete.
3772 (i386_get_thread_context): New.
3773 (load_debug_registers): Delete.
3774 (i386_set_thread_context): New.
3775 (i386_thread_added): New.
3776 (single_step): Rename to ...
3777 (i386_single_step): ... this.
3778 (do_fetch_inferior_registers): Rename to ...
3779 (i386_fetch_inferior_register): ... this.
3780 (i386_store_inferior_register): New.
3781 (the_low_target): Adapt to new interface.
3782
3783 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3784 (arm_get_thread_context): New.
3785 (arm_set_thread_context): New.
3786 (regptr): New.
3787 (do_fetch_inferior_registers): Rename to ...
3788 (arm_fetch_inferior_register): ... this.
3789 (arm_store_inferior_register): New.
3790 (arm_wince_breakpoint): Reimplement as unsigned long.
3791 (arm_wince_breakpoint_len): Define.
3792 (the_low_target): Adapt to new interface.
3793
3794 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3795 load_debug_registers. Add get_thread_context, set_thread_context,
3796 thread_added and store_inferior_register. Rename
3797 fetch_inferior_registers to fetch_inferior_register.
3798 (regptr): Remove declaration.
3799
dd6953e1
PA
38002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3801
3802 * linux-low.c (linux_detach): Change return type to int. Return 0.
3803 * spu-low.c (spu_detach): Likewise.
3804
444d6139
PA
38052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3806
3807 * target.h (target_ops): Change return type of detach to int.
3808 Add join.
3809 (join_inferior): New.
3810 * server.c (main): Don't skip detach support on mingw32.
3811 If the inferior doesn't support detaching return error.
3812 Call join_inferior instead of using waitpid.
3813 * linux-low.c (linux_join): New.
3814 (linux_target_op): Add linux_join.
3815 * spu-low.c (spu_join): New.
3816 (spu_target_ops): Add spu_join.
3817 * win32-low.c (win32_detach): Adapt to new interface.
3818 Reopen current_process_handle before detaching. Issue a child
3819 resume before detaching.
3820 (win32_join): New.
3821 (win32_target_op): Add win32_join.
3822
1d5315fe
PA
38232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3824
3825 * win32-low.c (win32-attach): Fix return value.
3826 * target.h (target_ops): Describe ATTACH return values.
3827
bf914831
PA
38282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3829
3830 * win32-low.c (GETPROCADDRESS): Define.
3831 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3832 (winapi_DebugSetProcessKillOnExit): Likewise.
3833 (win32_create_inferior): Force usage of ansi CreateProcessA.
3834 (win32_attach): Use GETPROCADDRESS.
3835 (win32_detach): Likewise.
3836
f72f3e60
PA
38372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3838
3839 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3840
ed50f18f
PA
38412007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3842
3843 * win32-low.c: Commit leftover changes from 2007-03-29.
3844
0c2ead7e
DJ
38452007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3846
3847 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3848 fields short instead of int. Add explicit padding.
3849 (i387_cache_to_fsave): Remove unnecessary casts.
3850 (i387_fsave_to_cache): Doc fix.
3851 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3852
73725ff3
DJ
38532007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3854
3855 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3856 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3857
d99f33d8
PA
38582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3859
3860 * configure.srv (arm*-*-mingw32ce*): Move near the other
3861 arm targets.
3862
68070c10
PA
38632007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3864
2482afc6 3865 * configure.ac: Add errno checking.
68070c10
PA
3866 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3867 sys/file.h and malloc.h.
3868 (AC_CHECK_DECLS): Add perror.
3869 (srv_mingwce): Handle.
2482afc6 3870 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
3871 win32-i386-low.o to srv_tgtobj.
3872 (i[34567]86-*-mingw*): Likewise.
3873 (arm*-*-mingw32ce*): Add case.
3874 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3875 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3876 [__MINGW32CE__] (strerror): New function.
3877 [__MINGW32CE__] (errno): Define to GetLastError.
3878 [__MINGW32CE__] (COUNTOF): New macro.
3879 (remote_open): Remove extra close call.
3880 * mem-break.c (delete_breakpoint_at): New function.
3881 * mem-break.h (delete_breakpoint_at): Declare.
3882 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3883 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3884 [USE_WIN32API] (read, write): Add char* casts.
3885 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3886 * server.h: Include wincecompat.h on Windows CE.
3887 [HAVE_ERRNO_H]: Check.
3888 (perror): Declare if not declared.
3889 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3890 (perror_with_name): Remove errno declaration.
3891 * wincecompat.h: New.
3892 * wincecompat.c: New.
3893 * win32-low.h: New.
3894 * win32-arm-low.c: New.
3895 * win32-i386-low.c: New.
3896 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3897 (OUTMSG2): Make it safe.
3898 (_T): New macro.
3899 (COUNTOF): New macro.
3900 (NUM_REGS): Get it from the low target.
3901 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3902 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3903 (thread_rec): Let low target handle debug registers.
3904 (child_add_thread): Likewise.
3905 (child_init_thread_list): Likewise.
3906 (continue_one_thread): Likewise.
3907 (regptr): New.
3908 (do_child_fetch_inferior_registers): Move to ...
3909 * win32-i386-low.c: ... here, and rename to ...
3910 (do_fetch_inferior_registers): ... this.
3911 * win32-low.c (child_fetch_inferior_registers):
3912 Go through the low target.
3913 (do_child_store_inferior_registers): Use regptr.
3914 (strwinerror): New function.
3915 (win32_create_inferior): Handle Windows CE.
3916 Use strwinerror instead of strerror on Windows error
3917 codes. Add program to the error output.
3918 Don't close the main thread handle on Windows CE.
3919 (win32_attach): Use coredll.dll on Windows CE.
3920 (win32_kill): Close current process and current
3921 thread handles.
3922 (win32_detach): Use coredll.dll on Windows CE.
3923 (win32_resume): Let low target handle debug registers, and
3924 step request.
3925 (handle_exception): Add/Remove initial breakpoint. Avoid
3926 non-existant WSTOPSIG on Windows CE.
3927 (win32_read_inferior_memory): Cast to remove warning.
3928 (win32_arch_string): Go through the low target.
3929 (initialize_low): Call set_breakpoint_data with the low
3930 target's breakpoint.
3931 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3932 FOP_REGNUM, mappings): Move to ...
3933 * win32-i386-low.c: ... here.
3934 * win32-low.c (win32_thread_info): Move to ...
3935 * win32-low.h: ... here.
3936 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3937 win32-arm-low.c and wincecompat.c.
3938 (all:): Add $EXEEXT.
3939 (install-only:): Likewise.
3940 (gdbserver:): Likewise.
3941 (gdbreplay:): Likewise.
3942 * config.in: Regenerate.
3943 * configure: Regenerate.
3944
41093d81
PA
39452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3946
3947 * win32-low.c: Rename typedef thread_info to
3948 win32_thread_info throughout.
3949
544afa54
PA
39502007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3951
3952 * win32-i386-low.c: Rename to ...
3953 * win32-low.c: ... this.
3954 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3955 * Makefile.in: Likewise.
3956
bce7165d
PA
39572007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3958
3959 * remote-utils.c (monitor_output): Constify msg parameter.
3960 * server.h (monitor_output): Likewise.
3961 * win32-i386-low.c (handle_output_debug_string): New.
3962 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3963 handle_output_debug_string.
3964 (get_child_debug_event): Likewise.
3965
506c7aa0
DJ
39662007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3967
3968 * server.c (main): Correct strtoul check.
3969
42c81e2a
DJ
39702007-03-27 Jon Ringle <jon@ringle.org>
3971
3972 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3973
9453113a
DJ
39742007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3975
3976 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3977
64a69107
DJ
39782007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3979
3980 * terminal.h: Check HAVE_SGTTY_H.
3981
39822007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
3983
3984 * remote-utils.c (remote_open): Print out the assigned port number.
3985
c74d0ad8
DJ
39862007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3987
3988 * remote-utils.c (monitor_output): New function.
3989 * server.c (debug_threads): Define here.
3990 (monitor_show_help): New function.
3991 (handle_query): Handle qRcmd.
3992 (main): Do not handle 'd' packet.
3993 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3994 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3995 of debug_threads.
3996
de7c3b4a
PA
39972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3998
3999 * Makefile.in (EXEEXT): New.
4000 (clean): Use $(EXEEXT).
4001
ef57601b
PA
40022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4003
4004 * target.h (target_ops): Rename send_signal to request_interrupt,
4005 and remove enum target_signal parameter.
4006 * linux-low.c (linux_request_interrupt): Rename from
4007 linux_send_signal, and always send SIGINT.
4008 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
4009 and always send SIGINT.
4010 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
4011 of send_signal.
4012 (input_interrupt): Likewise.
4013
820f2bda
PA
40142007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
4015
4016 * server.c (get_features_xml): Check if target implemented
4017 arch_string.
4018 * win32-i386-low.c (win32_arch_string): New.
4019 (win32_target_ops): Add win32_arch_string as arch_string member.
4020
ab39bf24
UW
40212007-02-22 Markus Deuling <deuling@de.ibm.com>
4022
4023 * spu-low.c (spu_arch_string): New.
4024 (spu_target_ops): Add spu_arch_string.
4025
61ff6e04
DJ
40262007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
4027
4028 * remote-utils.c: Remove HAVE_TERMINAL_H check.
4029 * configure.ac: Do not check for terminal.h.
4030 * configure, config.in: Regenerated.
4031
fb1e4ffc
DJ
40322007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4033
4034 * Makefile.in (OBS): Add $(XML_BUILTIN).
4035 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
4036 (clean): Update.
4037 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
4038 (arm-with-iwmmxt.c): New.
4039 * config.in, configure: Regenerate.
4040 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
4041 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
4042 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
4043 (arm*-*-linux*): Add iWMMXt and regset support.
4044 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
4045 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
4046 (arm_store_wmmxregset, target_regsets): New.
4047 * server.c (get_features_xml): Take annex argument. Check builtin
4048 XML documents.
4049 (handle_query): Handle multiple annexes.
4050
0f48aa01
DJ
40512007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4052
4053 * remote-utils.c [USE_WIN32API] (read, write): Define.
4054 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
4055 write.
4056
23181151
DJ
40572007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
4058
4059 * linux-i386-low.c (the_low_target): Set arch_string.
4060 * linux-x86-64-low.c (the_low_target): Likewise.
4061 * linux-low.c (linux_arch_string): New.
4062 (linux_target_ops): Add it.
4063 * linux-low.h (struct linux_target_ops): Add arch_string.
4064 * server.c (write_qxfer_response): Use const void * for DATA.
4065 (get_features_xml): New.
4066 (handle_query): Handle qXfer:features:read. Report it for qSupported.
4067 * target.h (struct target_ops): Add arch_string method.
4068
9d606399
DJ
40692007-01-03 Denis Pilat <denis.pilat@st.com>
4070 Daniel Jacobowitz <dan@codesourcery.com>
4071
4072 * linux-low.c (linux_kill): Handle being called with no threads.
4073 * win32-i386-low.c (win32_kill): Likewise.
4074 (get_child_debug_event): Clear current_process_handle.
4075
40762006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
4077 Daniel Jacobowitz <dan@codesourcery.com>
4078
4079 * remote-utils.c (remote_open): Check the type of specified
4080 serial port devices before opening them.
4081 * server.c (main): Kill the inferior if an error occurs during
4082 the first remote_open.
4083
a5e13d24
DJ
40842006-12-05 Markus Deuling <deuling@de.ibm.com>
4085
4086 * README: Update supported targets.
4087
186947f7
DJ
40882006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
4089
4090 * Makefile.in (clean): Remove reg-mips64.c.
4091 (reg-mips64.c, reg-mips64.o): New rules.
4092 * configure.srv: Handle mips64. Include regset support for mips.
4093 * linux-mips-low.c (union mips_register): New.
4094 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
4095 (mips_breakpoint, mips_breakpoint_at): Use int.
4096 (mips_collect_register, mips_supply_register)
4097 (mips_collect_register_32bit, mips_supply_register_32bit)
4098 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
4099 (mips_store_fpregset, target_regsets): New.
4100 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
4101
a13e2c95
UW
41022006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
4103
4104 * configure.srv: Add target "spu*-*-*".
4105 * Makefile.in (clean): Remove reg-spu.c.
4106 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
4107 * spu-low.c: New file.
4108
cb7283db
DJ
41092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4110
4111 * configure.ac: Correct td_thr_tls_get_addr test.
4112 * configure: Regenerated.
4113
89be2091
DJ
41142006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
4115
4116 * linux-low.c (linux_wait_for_event): Reformat. Use the
4117 pass_signals array.
4118 * remote-utils.c (decode_address_to_semicolon): New.
4119 * server.c (pass_signals, handle_general_set): New.
4120 (handle_query): Mention QPassSignals for qSupported.
4121 (main): Call handle_general_set.
4122 * server.h (pass_signals, decode_address_to_semicolon): New.
4123
000ef4f0
DJ
41242006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
4125
4126 * server.c (handle_query): Correct error handling for read_auxv.
4127
b7149293
UW
41282005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
4129
4130 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
4131 and srv_linux_thread_db to yes.
4132 * linux-s390-low.c (s390_fill_gregset): New function.
4133 (target_regsets): Define data structure.
4134
dae5f5cf
DJ
41352006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
4136
4137 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
4138 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
4139 * config.in, configure: Regenerated.
4140 * inferiors.c (gdb_id_to_thread): New function.
4141 (gdb_id_to_thread_id): Use it.
4142 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
4143 * linux-low.h (struct process_info): Add th member.
4144 (thread_db_get_tls_address): New prototype.
4145 * remote-utils.c (decode_address): Make non-static.
4146 * server.c (handle_query): Handle qGetTLSAddr.
4147 * server.h (gdb_id_to_thread, decode_address): New prototypes.
4148 * target.h (struct target_ops): Add get_tls_address.
4149 * thread-db.c (maybe_attach_thread): Save the thread handle.
4150 (thread_db_get_tls_address): New.
4151
32ca6d61
DJ
41522006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
4153
4154 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
4155 (linux_resume_one_process): Take a siginfo_t *. Update all
4156 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
4157 (struct pending_signals): Add a siginfo_t.
4158 (linux_wait_for_process): Always set last_status.
4159 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
4160 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
4161 * linux-low.h (struct process_info): Add last_status.
4162
5ffff7c1
DJ
41632006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
4164
4165 * remote-utils.c (try_rle): New function.
4166 (putpkt_binary): Use it.
4167
8695c747
DJ
41682006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
4169
4170 * Makefile.in (clean): Clean reg-x86-64-linux.c.
4171 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
4172 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
4173 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
4174 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
4175 point registers.
4176
290fadea
RS
41772006-08-08 Richard Sandiford <richard@codesourcery.com>
4178
4179 * server.c (terminal_fd): New variable.
4180 (old_foreground_pgrp): Likewise.
4181 (restore_old_foreground_pgrp): New function.
4182 (start_inferior): Record the terminal file descriptor in terminal_fd
4183 and its original foreground group in old_foreground_pgrp. Register
4184 restore_old_foreground_pgrp with atexit().
4185
9f2e1e63
DJ
41862006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
4187
4188 * server.c (handle_query): Correct qPart to qXfer.
4189
b80864fb
DJ
41902006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
4191
4192 * configure.ac: Check for more headers which are missing on
4193 Windows. Automatically supply -lwsock32 and USE_WIN32API.
4194 * configure.srv: Add Cygwin and mingw32.
4195 * remote-utils.c: Don't include headers unconditionally which
4196 are missing on mingw32. Include <winsock.h> for mingw32.
4197 (remote_open): Adjust for mingw32 support. Flush
4198 standard error after writing to it.
4199 (remote_close, putpkt_binary, input_interrupt, block_async_io)
4200 (unblock_async_io, enable_async_io, disable_async_io)
4201 (readchar, getpkt): Update for Winsock support.
4202 (prepare_resume_reply): Expect a protocol signal number.
4203 * server.c: Disable <sys/wait.h> on mingw32.
4204 (start_inferior): Adjust for mingw32 support. Flush
4205 standard error after writing to it.
4206 (attach_inferior): Likewise. Use protocol signal
4207 numbers.
4208 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
4209 and names.
4210 * win32-i386-low.c: New file.
4211 * Makefile.in (XM_CLIBS): Set.
4212 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4213 (win32-i386-low.o): New dependency rule.
4214 * linux-low.c (linux_wait): Use target signal numbers.
4215 * target.h (struct target_ops): Doc fix.
4216 * server.h (target_signal_to_name): New prototype.
4217 * gdbreplay.c: Don't include headers unconditionally which
4218 are missing on mingw32. Include <winsock.h> for mingw32.
4219 (remote_close, remote_open): Adjust for Winsock support.
4220 * configure, config.in: Regenerated.
4221
0876f84a
DJ
42222006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4223
4224 * server.c (decode_xfer_read, write_qxfer_response): New.
4225 (handle_query): Take a packet length argument. Handle
4226 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4227 the qSupported response.
4228 (main): Update call to handle_query.
4229
01f9e8fa
DJ
42302006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4231
4232 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4233 (putpkt_binary): Renamed from putpkt and adjusted for binary
4234 data.
4235 (putpkt): New wrapper for putpkt_binary.
4236 (readchar): Don't mask off the high bit.
4237 (decode_X_packet): New function.
4238 * server.c (main): Call putpkt_binary if a handler sets the packet
4239 length. Save the length of the incoming packet. Handle 'X'.
4240 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4241
be2a5f71
DJ
42422006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4243
4244 * server.c (handle_query): Handle qSupported.
4245
ea025f5f
DJ
42462006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4247
4248 * remote-utils.c (all_symbols_looked_up): New variable.
4249 (look_up_one_symbol): Check it.
4250 * server.h (look_up_one_symbol): New declaration.
4251 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4252
9308fc88
DJ
42532006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4254
4255 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 4256 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
4257 (PTRACE_GET_THREAD_AREA): Define.
4258 (ps_get_thread_area): New function.
4259
52fb6437
NS
42602006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4261
4262 * configure.srv (m68k*-*-uclinux*): New target.
4263 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4264 (linux_resume_one_process): Remove extraneous cast.
4265 (linux_read_offsets): New.
4266 (linux_target_op): Add linux_read_offsets on mmuless systems.
4267 * server.c (handle_query): Add qOffsets logic.
4268 * target.h (struct target_ops): Add read_offsets.
4269
21b0f40c
DJ
42702006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4271
4272 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4273 (PTRACE_GET_THREAD_AREA): Define.
4274 (ps_get_thread_area): New function.
4275 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4276 (linux-x86-64-low.o): Update.
4277
0050a760
DJ
42782006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4279
4280 * configure.ac: Remove checks for prfpregset_t.
4281 * gdb_proc_service.h: New file.
4282 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4283 new "gdb_proc_service.h".
4284 * proc-service.c: Likewise.
4285 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4286 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4287 * Makefile.in (gdb_proc_service_h): Updated.
4288 * configure, config.in: Regenerated.
4289
b92a518e
DJ
42902006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4291
4292 * remote-utils.c (prepare_resume_reply): Move declaration
4293 of gdb_id_from_wait to the top of the block.
4294
545587ee
DJ
42952006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4296
4297 * linux-low.c (regsets_store_inferior_registers): Read the regset
4298 from the target before filling it.
4299
9db87ebd
DJ
43002006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4301
4302 * server.c (attach_inferior): Return SIGTRAP for a successful
4303 attach.
4304
dd24457d
DJ
43052006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4306
4307 * Makefile.in (OBS): Add version.o.
4308 (STAGESTUFF): Delete.
4309 (version.o): Add dependencies.
4310 (version.c): Replace rule.
4311 (clean): Remove version.c.
4312 * server.c (gdbserver_version): New.
4313 (gdbserver_usage): Use printf.
4314 (main): Handle --version and --help.
4315 * server.h (version, host_name): Add declarations.
4316
6f0f660e
EZ
43172005-12-23 Eli Zaretskii <eliz@gnu.org>
4318
4319 * linux-arm-low.c:
4320 * linux-arm-low.c:
4321 * inferiors.c:
4322 * i387-fp.h:
4323 * i387-fp.c:
4324 * gdbreplay.c:
4325 * regcache.c:
4326 * proc-service.c:
4327 * mem-break.h:
4328 * mem-break.c:
4329 * linux-x86-64-low.c:
4330 * linux-sh-low.c:
4331 * linux-s390-low.c:
4332 * linux-ppc64-low.c:
4333 * linux-ppc-low.c:
4334 * linux-mips-low.c:
4335 * linux-m68k-low.c:
4336 * linux-m32r-low.c:
4337 * linux-low.h:
4338 * linux-low.c:
4339 * linux-ia64-low.c:
4340 * linux-i386-low.c:
4341 * linux-crisv32-low.c:
4342 * thread-db.c:
4343 * terminal.h:
4344 * target.h:
4345 * target.c:
4346 * server.h:
4347 * server.c:
4348 * remote-utils.c:
4349 * regcache.h:
4350 * utils.c:
4351 * Makefile.in:
4352 * configure.ac:
4353 * gdbserver.1: Add (C) after Copyright. Update the FSF
4354 address.
4355
9d1fb177
DJ
43562005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4357
4358 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4359 (arm_breakpoint_at): Recognize both breakpoints.
4360 (the_low_target): Use the correct breakpoint instruction.
4361
011a70c2
DJ
43622005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4363
4364 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4365 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4366 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4367 (the_low_target): Update.
4368
7fb85e41
AS
43692005-10-25 Andreas Schwab <schwab@suse.de>
4370
4371 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4372
4373 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4374 (ia64_num_regs): Reduce to 462.
4375
3db0444b
DJ
43762005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4377
4378 * acinclude.m4: Correct quoting.
4379 * aclocal.m4: Regenerated.
4380
4381 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4382 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4383 (thread_db_init): Call thread_db_err_str.
4384 * configure.ac: Check for TD_VERSION.
4385 * config.in, configure: Regenerated.
4386
bee0189a
DJ
43872005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4388
4389 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4390
e9d25b98
DJ
43912005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4392
4393 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4394 is not available. Define HAVE_PTRACE_GETREGS if it is.
4395 * config.in, configure: Regenerated.
4396 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4397 * linux-i386-low.c, linux-m68k-low.c: Update to use
4398 HAVE_PTRACE_GETREGS.
4399 * linux-low.c (regsets_fetch_inferior_registers)
4400 (regsets_store_inferior_registers): Only return 0 if we processed
4401 GENERAL_REGS.
4402 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4403 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4404
a06660f7
DJ
44052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4406
4407 * inferiors.c (struct thread_info): Add gdb_id.
4408 (add_thread): Add gdb_id argument.
4409 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4410 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4411 calls to add_thread.
4412 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4413 * server.c (handle_query): Use thread_to_gdb_id.
4414 (handle_v_cont, main): Use gdb_id_to_thread_id.
4415 * server.h (add_thread): Update prototype.
4416 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4417 prototypes.
4418
5a1f5858
DJ
44192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4420
4421 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4422 left-padded registers.
4423 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4424 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4425
e122f1f5
SE
44262005-07-01 Steve Ellcey <sje@cup.hp.com>
4427
4428 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4429 * configure: Regenerate.
4430 * config.in: Regenerate.
4431 * server.h (NEED_DECLARATION_STRERROR):
4432 Replace with !HAVE_DECL_STRERROR.
4433
d592fa2f
DJ
44342005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4435
4436 * linux-low.c (linux_wait, linux_send_signal): Don't test
4437 an unsigned long variable for > 0 if it could be MAX_ULONG.
4438 * server.c (myresume): Likewise.
4439 * target.c (set_desired_inferior): Likewise.
4440
ccbd4912
MK
44412005-06-13 Mark Kettenis <kettenis@gnu.org>
4442
4443 * configure.ac: Simplify and improve check for socklen_t.
4444 * configure, config.in: Regenerate.
4445
f450004a
DJ
44462005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4447
4448 * acconfig.h: Remove.
4449 * configure.ac: Add a test for socklen_t. Use three-argument
4450 AC_DEFINE throughout.
4451 * config.in: Regenerated using autoheader 2.59.
4452 * configure: Regenerated.
4453
4454 * gdbreplay.c (socklen_t): Provide a default.
4455 (remote_open): Use socklen_t.
4456 * remote-utils.c (socklen_t): Provide a default.
4457 (remote_open): Use socklen_t.
4458 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4459 unsigned char.
4460
4461 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4462 char for buffers.
4463 * linux-low.c (linux_read_memory, linux_write_memory)
4464 (linux_read_auxv): Likewise.
4465 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4466 (check_mem_write): Likewise.
4467 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4468 Likewise.
4469 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4470 (registers_from_string, register_data): Likewise.
4471 * server.c (handle_query, main): Likewise.
4472 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4473 (decode_M_packet): Likewise.
4474 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4475 * target.h (struct target_ops): Update read_memory, write_memory,
4476 and read_auxv.
4477 (read_inferior_memory, write_inferior_memory): Update.
4478 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4479 to unsigned char *.
4480 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4481 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4482 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4483 linux-s390-low.c, linux-sh-low.c: Update for changes in
4484 read_inferior_memory and the_low_target->breakpoint.
4485
eee84df1
DJ
44862005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4487
4488 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4489 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4490 * configure.srv: Add powerpc64-*-linux*.
4491 * linux-ppc64-low.c: New file.
4492
45b134e5
OF
44932005-05-23 Orjan Friberg <orjanf@axis.com>
4494
4495 * linux-cris-low.c: New file with support for CRIS.
4496 * linux-crisv32-low.c: Ditto for CRISv32.
4497 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4498 (clean): Add reg-cris.c and reg-crisv32.c.
4499 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4500 reg-crisv32.o, and reg-crisv32.c to make rules.
4501 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4502 recognized targets.
4503
48d93c75
UW
45042005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4505
4506 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4507 of sizeof (PTRACE_XFER_TYPE).
4508 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4509
e013ee27
OF
45102005-05-12 Orjan Friberg <orjanf@axis.com>
4511
4512 * target.h (struct target_ops): Add insert_watchpoint,
4513 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4514 pointers for hardware watchpoint support.
4515 * linux-low.h (struct linux_target_ops): Ditto.
4516 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4517 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4518 to linux_target_ops.
4519 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4520 reply packet.
4521 * server.c (main): Recognize 'Z' and 'z' packets.
4522
b0ded00b
UW
45232005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4524
4525 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4526 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4527 (the_low_target): Add new members.
4528
8643e2ad
DJ
45292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4530
4531 * proc-service.c (ps_lgetregs): Search all_processes instead of
4532 all_threads.
4533
fc620387
DJ
45342005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4535
4536 * server.c (start_inferior): Change return type to int.
4537 (attach_inferior): Change sigptr to int *.
4538 (handle_v_cont, handle_v_requests): Change signal to int *.
4539 (main): Change signal to int.
4540
45412005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
4542
4543 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4544 * configure.srv: Add m32r*-*-linux*.
4545 * linux-m32r-low.c: New file.
4546
e0e76420
DJ
45472005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4548
4549 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4550
a1928bad
DJ
45512005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4552
4553 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4554 Take unsigned long arguments for PIDs.
4555 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4556 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4557 (wait_for_sigstop, linux_resume_one_process)
4558 (regsets_fetch_inferior_registers, linux_send_signal)
4559 (linux_read_auxv): Likewise. Update the types of variables holding
4560 PIDs. Update format string specifiers.
4561 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4562 * remote-utils.c (prepare_resume_reply): Likewise.
4563 * server.c (cont_thread, general_thread, step_thread)
4564 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4565 unsigned long.
4566 (handle_query): Update format specifiers.
4567 (handle_v_cont, main): Use strtoul for thread IDs.
4568 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4569 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4570 (general_thread, step_thread, thread_from_wait)
4571 (old_thread_from_wait): Update.
4572 * target.h (struct thread_resume): Use unsigned long for THREAD.
4573 (struct target_ops): Use unsigned long for arguments to attach and
4574 thread_alive.
4575
dcdb98d2
DJ
45762005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4577
4578 * acinclude.m4: Include bfd/bfd.m4 directly.
4579 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4580 <agriffis@toolchain.org>.
4581 * aclocal.m4, configure: Regenerated.
4582
bec39cab
AC
45832005-01-07 Andrew Cagney <cagney@gnu.org>
4584
4585 * configure.ac: Rename configure.in, require autoconf 2.59.
4586 * configure: Re-generate.
4587
434c4c77
DJ
45882004-12-08 Daniel Jacobowitz <dan@debian.org>
4589
4590 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4591 LIBS when finished.
4592 * aclocal.m4: Regenerated.
4593 * configure: Regenerated.
4594
db1d3e1b
AS
45952004-11-21 Andreas Schwab <schwab@suse.de>
4596
4597 * linux-m68k-low.c (m68k_num_gregs): Define.
4598 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4599 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4600 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4601 (m68k_breakpoint_at): New. Add to the_low_target.
4602
4603 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4604 srv_linux_thread_db to yes.
4605
43360365
JB
46062004-10-20 Joel Brobecker <brobecker@gnat.com>
4607
4608 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4609 (ARCH_SET_FS): Likewise.
4610 (ARCH_GET_FS): Likewise.
4611 (ARCH_GET_GS): Likewise.
4612
fd500816
DJ
46132004-10-16 Daniel Jacobowitz <dan@debian.org>
4614
4615 * linux-i386-low.c (ps_get_thread_area): New.
4616 * linux-x86-64-low.c (ps_get_thread_area): New.
4617 * linux-low.c: Include <sys/syscall.h>.
4618 (linux_kill_one_process): Don't kill the first thread here.
4619 (linux_kill): Kill the first thread here.
4620 (kill_lwp): New function.
4621 (send_sigstop, linux_send_signal): Use it.
4622 * proc-service.c: Clean up #ifdefs.
4623 (fpregset_info): Delete.
4624 (ps_lgetregs): Update and enable implementation.
4625 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4626 implementations.
4627 * remote-utils.c (struct sym_cache, symbol_cache): New.
4628 (input_interrupt): Print a clearer message.
4629 (async_io_enabled): New variable.
4630 (enable_async_io, disable_async_io): Use it. Update comments.
4631 (look_up_one_symbol): Use the symbol cache.
4632 * thread-db.c (thread_db_look_up_symbols): New function.
4633 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4634
f6de3c42
DJ
46352004-10-16 Daniel Jacobowitz <dan@debian.org>
4636
4637 * configure.in: Test for -rdynamic.
4638 * configure: Regenerated.
4639 * Makefile (INTERNAL_LDFLAGS): New.
4640 (gdbserver, gdbreplay): Use it.
4641
2c0fc042
AC
46422004-09-02 Andrew Cagney <cagney@gnu.org>
4643
4644 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4645
075b3282
DJ
46462004-03-23 Daniel Jacobowitz <drow@mvista.com>
4647
4648 * linux-low.c (linux_wait): Clear all_processes list also.
4649
fa6a77dc
DJ
46502004-03-12 Daniel Jacobowitz <drow@mvista.com>
4651
4652 * linux-low.c: Include <errno.h>. Remove extern declaration of
4653 errno.
4654
6d782a97
DJ
46552004-03-12 Daniel Jacobowitz <drow@mvista.com>
4656
4657 * gdbreplay.c, server.h, utils.c: Update copyright years.
4658
3a7fb99b
DJ
46592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4660
4661 * server.c (main): Print child status or termination signal from
4662 variable 'signal', not 'sig'.
4663
c3e735a6
DJ
46642004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4665
4666 * linux-low.c (linux_read_memory): Change return type to
4667 int. Check for and return error from ptrace().
4668 * target.c (read_inferior_memory): Change return type to int. Pass
4669 back return status from the_target->read_memory().
4670 * target.h (struct target_ops): Adapt *read_memory() prototype.
4671 Update comment.
4672 (read_inferior_memory): Adapt prototype.
4673 * server.c (main): Return an error packet if
4674 read_inferior_memory() returns an error.
4675
a59d1c82
DJ
46762004-03-04 Daniel Jacobowitz <drow@mvista.com>
4677
4678 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4679 Unify with other clean targets.
4680
dc3f8883
DJ
46812004-02-29 Daniel Jacobowitz <drow@mvista.com>
4682
4683 * server.c (handle_v_cont): Call set_desired_inferior.
4684
89a208da
DJ
46852004-02-29 Daniel Jacobowitz <drow@mvista.com>
4686
4687 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4688
62ea82f5
DJ
46892004-02-29 Daniel Jacobowitz <drow@mvista.com>
4690
4691 * linux-low.c (linux_wait): Unblock async I/O.
4692 (linux_resume): Block and enable async I/O.
4693 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4694 * server.h (block_async_io, unblock_async_io): Add prototypes.
4695
6910d122
DJ
46962004-02-29 Daniel Jacobowitz <drow@mvista.com>
4697
4698 * remote-utils.c (remote_open): Print a status notice after
4699 opening a TCP port.
4700 * server.c (attach_inferior): Print a status notice after
4701 attaching.
4702
47032004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
4704
4705 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4706
c89dc5d4
DJ
47072004-02-26 Daniel Jacobowitz <drow@mvista.com>
4708
4709 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4710 error packet.
4711 * server.c, target.h: Update copyright years.
4712
4b8dad4a
RM
47132004-02-25 Roland McGrath <roland@redhat.com>
4714
4715 * target.h (struct target_ops): New member `read_auxv'.
4716 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4717 * linux-low.c (linux_read_auxv): New function.
4718 (linux_target_ops): Initialize `read_auxv' member to that.
4719
d7446758
JB
47202004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4721
4722 Committed by Jim Blandy <jimb@redhat.com>.
4723
4724 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 4725 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
4726 instead of GPR_SIZE to distiguish s390 and s390x targets.
4727
5544ad89
DJ
47282004-01-31 Daniel Jacobowitz <drow@mvista.com>
4729
4730 * linux-low.c: Update copyright year.
4731 (check_removed_breakpoint): Clear pending_is_breakpoint.
4732 (linux_set_resume_request, linux_queue_one_thread)
4733 (resume_status_pending_p): New functions.
4734 (linux_continue_one_thread): Use process->resume.
4735 (linux_resume): Only resume threads if there are no pending events.
4736 * linux-low.h (struct process_info): Add resume request
4737 pointer.
4738
2a68b70e
DJ
47392004-01-30 Daniel Jacobowitz <drow@mvista.com>
4740
4741 * regcache.c (new_register_cache): Clear the allocated register
4742 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4743
64386c31
DJ
47442003-10-13 Daniel Jacobowitz <drow@mvista.com>
4745
4746 * linux-low.c (linux_resume): Take a struct thread_resume *
4747 argument.
4748 (linux_wait): Update call.
4749 (resume_ptr): New static variable.
4750 (linux_continue_one_thread): Renamed from
4751 linux_continue_one_process. Use resume_ptr.
4752 (linux_resume): Use linux_continue_one_thread.
4753 * server.c (handle_v_cont, handle_v_requests): New functions.
4754 (myresume): New function.
4755 (main): Handle 'v' case.
4756 * target.h (struct thread_resume): New type.
4757 (struct target_ops): Change argument of "resume" to struct
4758 thread_resume *.
4759 (myresume): Delete macro.
4760
c938e9b0
L
47612003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4762
4763 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4764 (uninstall): Support DESTDIR.
4765
7f313d07
BC
4766Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4767
4768 * configure.srv: Add xscale*linux copy of arm*linux entry.
4769
3b2fc2ea
DJ
47702003-07-24 Daniel Jacobowitz <drow@mvista.com>
4771
4772 * linux-arm-low.c (arm_reinsert_addr): New function.
4773 (the_low_target): Add arm_reinsert_addr.
4774
1c0a559e
MK
47752003-07-08 Mark Kettenis <kettenis@gnu.org>
4776
4777 * mem-break.c: Remove whitespace at end of file.
4778
43d5792c
DJ
47792003-06-28 Daniel Jacobowitz <drow@mvista.com>
4780
4781 * configure.in: Check whether we need to prototype strerror.
4782 * server.h: Optionally prototype strerror.
4783 * gdbreplay.c (perror_with_name): Use strerror.
4784 * linux-low.c (linux_attach_lwp): Use strerror.
4785 * utils.c (perror_with_name): Use strerror.
4786 * config.in, configure: Regenerated.
4787
c8a86edf
DJ
47882003-06-28 Daniel Jacobowitz <drow@mvista.com>
4789
4790 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4791 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4792
73d37363
DJ
47932003-06-20 Daniel Jacobowitz <drow@mvista.com>
4794
4795 * Makefile.in (SFILES): Update.
4796 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4797 low-sun3.c: Remove files.
4798
6ad8ae5c
DJ
47992003-06-17 Daniel Jacobowitz <drow@mvista.com>
4800
4801 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4802 (linux_detach_one_process, linux_detach): New functions.
4803 (linux_target_ops): Add linux_detach.
4804 * server.c (main): Handle 'D' packet.
4805 * target.h (struct target_ops): Add "detach" member.
4806 (detach_inferior): Define.
4807
1581182a
MK
48082003-06-13 Mark Kettenis <kettenis@gnu.org>
4809
4810 From Kelley Cook <kelleycook@wideopenwest.com>:
4811 * configure.srv: Accept i[34567]86 variants.
4812
e5379b03
DJ
48132003-06-05 Daniel Jacobowitz <drow@mvista.com>
4814
4815 * linux-low.c (linux_wait_for_event): Correct comment typos.
4816 (linux_resume_one_process): Call check_removed_breakpoint.
4817 (linux_send_signal): New function.
4818 (linux_target_ops): Add linux_send_signal.
4819 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4820 of kill.
4821 * target.h (struct target_ops): Add send_signal.
4822
2ff29de4
JB
48232003-05-29 Jim Blandy <jimb@redhat.com>
4824
4825 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4826 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4827 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4828 away part of the register's value.
4829
254787d4
DJ
48302003-03-26 Daniel Jacobowitz <drow@mvista.com>
4831
4832 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4833 (linux_wait_for_event, linux_init_signals): Likewise.
4834
94e10508
DJ
48352003-03-17 Daniel Jacobowitz <drow@mvista.com>
4836
4837 * configure.in: Check for stdlib.h.
4838 * configure: Regenerated.
4839 * config.in: Regenerated.
4840
4c0711e0
DJ
48412003-01-04 Andreas Schwab <schwab@suse.de>
4842
4843 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4844
ef66e766
AC
48452003-01-02 Andrew Cagney <ac131313@redhat.com>
4846
4847 * Makefile.in: Remove obsolete code.
4848
a1358604
DJ
48492002-11-20 Daniel Jacobowitz <drow@mvista.com>
4850
4851 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4852 defined(PT_FPR0_HI).
4853
23ce3b1c
DJ
48542002-11-17 Stuart Hughes <seh@zee2.com>
4855
4856 * linux-arm-low.c (arm_num_regs): Increase.
4857 (arm_regmap): Include status register.
4858
48592002-11-17 Daniel Jacobowitz <drow@mvista.com>
4860
4861 * linux-low.c (register_addr): Remove incorrect -1 check.
4862
a9fa9f7d
DJ
48632002-08-29 Daniel Jacobowitz <drow@mvista.com>
4864
4865 * linux-low.c (linux_create_inferior): Call setpgid. Return
4866 the new PID.
4867 (unstopped_p, linux_signal_pid): Remove.
4868 (linux_target_ops): Remove linux_signal_pid.
4869 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4870 global instead of target method.
4871 * target.h (struct target_ops): Remove signal_pid. Update comment
4872 for create_inferior.
4873 * server.c (signal_pid): New variable.
4874 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 4875 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
4876 (attach_inferior): Set signal_pid.
4877
17574093
DJ
48782002-08-23 Daniel Jacobowitz <drow@mvista.com>
4879
4880 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4881
48822002-08-20 Jim Blandy <jimb@redhat.com>
4883
4884 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4885 default for this.
4886
48872002-08-01 Andrew Cagney <cagney@redhat.com>
4888
4889 * Makefile.in: Make chill references obsolete.
4890
48912002-07-24 Kevin Buettner <kevinb@redhat.com>
4892
4893 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4894 * configure: Regenerate.
4895 * config.in: Regenerate.
4896
48972002-07-09 David O'Brien <obrien@FreeBSD.org>
4898
4899 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4900 (perror_with_name, remote_close, remote_open, expect, play): Static.
4901
49022002-07-04 Michal Ludvig <mludvig@suse.cz>
4903
4b8dad4a 4904 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
4905 byte offsets instead of an array of indexes.
4906 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4907
49082002-06-13 Daniel Jacobowitz <drow@mvista.com>
4909
4910 * regcache.c: Add comment.
4911
49122002-06-11 Daniel Jacobowitz <drow@mvista.com>
4913
4914 * thread-db.c: New file.
4915 * proc-service.c: New file.
4916 * acinclude.m4: New file.
4917 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4918 proc-service.o, and thread-db.o.
4919 (linux-low.o): Add USE_THREAD_DB.
4920 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4921 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4922 * aclocal.m4: Regenerated.
4923 * config.in: Regenerated.
4924 * configure: Regenerated.
4925 * configure.in: Check for proc_service.h, sys/procfs.h,
4926 thread_db.h, and linux/elf.h headrs.
4927 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4928 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4929 Check for -lthread_db and thread support.
4930 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4931 PowerPC, and SuperH.
4932 * i387-fp.c: Constify arguments.
4933 * i387-fp.h: Likewise.
4934 * inferiors.c: (struct thread_info): Renamed from
4935 `struct inferior_info'. Remove PID member. Use generic inferior
4936 list header. All uses updated.
4937 (inferiors, signal_pid): Removed.
4938 (all_threads): New variable.
4939 (get_thread): Define.
4940 (add_inferior_to_list): New function.
4941 (for_each_inferior): New function.
4942 (change_inferior_id): New function.
4943 (add_inferior): Removed.
4944 (remove_inferior): New function.
4945 (add_thread): New function.
4946 (free_one_thread): New function.
4947 (remove_thread): New function.
4948 (clear_inferiors): Use for_each_inferior and free_one_thread.
4949 (find_inferior): New function.
4950 (find_inferior_id): New function.
4951 (inferior_target_data): Update argument type.
4952 (set_inferior_target_data): Likewise.
4953 (inferior_regcache_data): Likewise.
4954 (set_inferior_regcache_data): Likewise.
4955 * linux-low.c (linux_bp_reinsert): Remove.
4956 (all_processes, stopping_threads, using_thrads)
4957 (struct pending_signals, debug_threads, pid_of): New.
4958 (inferior_pid): Replace with macro.
4959 (struct inferior_linux_data): Remove.
4960 (get_stop_pc, add_process): New functions.
4961 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4962 Use add_process and add_thread.
4963 (linux_attach_lwp): New function, based on old linux_attach. Use
4964 add_process and add_thread. Set stop_expected for new threads.
4965 (linux_attach): New function.
4966 (linux_kill_one_process): New function.
4967 (linux_kill): Kill all LWPs.
4968 (linux_thread_alive): Use find_inferior_id.
4969 (check_removed_breakpoints, status_pending_p): New functions.
4970 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4971 Update. Use WNOHANG. Wait for cloned processes also. Update process
4972 struct for the found process.
4973 (linux_wait_for_event): New function.
4974 (linux_wait): Use it. Support LWPs.
4975 (send_sigstop, wait_for_sigstop, stop_all_processes)
4976 (linux_resume_one_process, linux_continue_one_process): New functions.
4977 (linux_resume): Support LWPs.
4978 (REGISTER_RAW_SIZE): Remove.
4979 (fetch_register): Use register_size instead. Call supply_register.
4980 (usr_store_inferior_registers): Likewise. Call collect_register.
4981 Fix recursive case.
4982 (regsets_fetch_inferior_registers): Improve error message.
4983 (regsets_store_inferior_registers): Add debugging.
4984 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4985 (unstopped_p, linux_signal_pid): New functions.
4986 (linux_target_ops): Add linux_signal_pid.
4987 (linux_init_signals): New function.
4988 (initialize_low): Call it. Initialize using_threads.
4989 * regcache.c (inferior_regcache_data): Add valid
4990 flag.
4991 (get_regcache): Fetch registers lazily. Add fetch argument
4992 and update all callers.
4993 (regcache_invalidate_one, regcache_invalidate): New
4994 functions.
4995 (new_register_cache): Renamed from create_register_cache.
4996 Return the new regcache.
4997 (free_register_cache): Change argument to a void *.
4998 (registers_to_string, registers_from_string): Call get_regcache
4999 with fetch flag set.
5000 (register_data): Make static. Pass fetch flag to get_regcache.
5001 (supply_register): Call get_regcache with fetch flag clear.
5002 (collect_register): Call get_regcache with fetch flag set.
5003 (collect_register_as_string): New function.
5004 * regcache.h: Update.
5005 * remote-utils.c (putpkt): Flush after debug output and use
5006 stderr.
5007 Handle input interrupts while waiting for an ACK.
5008 (input_interrupt): Use signal_pid method.
5009 (getpkt): Flush after debug output and use stderr.
5010 (outreg): Use collect_register_as_string.
5011 (new_thread_notify, dead_thread_notify): New functions.
5012 (prepare_resume_reply): Check using_threads. Set thread_from_wait
5013 and general_thread.
5014 (look_up_one_symbol): Flush after debug output.
5015 * server.c (step_thread, server_waiting): New variables.
5016 (start_inferior): Don't use signal_pid. Update call to mywait.
5017 (attach_inferior): Update call to mywait.
5018 (handle_query): Handle qfThreadInfo and qsThreadInfo.
5019 (main): Don't fetch/store registers explicitly. Use
5020 set_desired_inferior. Support proposed ``Hs'' packet. Update
5021 calls to mywait.
5022 * server.h: Update.
5023 (struct inferior_list, struct_inferior_list_entry): New.
5024 * target.c (set_desired_inferior): New.
5025 (write_inferior_memory): Constify.
5026 (mywait): New function.
5027 * target.h: Update.
5028 (struct target_ops): New signal_pid method.
5029 (mywait): Removed macro, added prototype.
5030
5031 * linux-low.h (regset_func): Removed.
5032 (regset_fill_func, regset_store_func): New.
5033 (enum regset_type): New.
5034 (struct regset_info): Add type field. Use new operation types.
5035 (struct linux_target_ops): stop_pc renamed to get_pc.
5036 Add decr_pc_after_break and breakpoint_at.
5037 (get_process, get_thread_proess, get_process_thread)
5038 (strut process_info, all_processes, linux_attach_lwp)
5039 (thread_db_init): New.
5040
5041 * linux-arm-low.c (arm_get_pc, arm_set_pc,
5042 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
5043 (the_low_target): Add new members.
5044 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
5045 (i386_store_fpxregset): Constify.
5046 (target_regsets): Add new kind identifier.
5047 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
5048 (i386_set_pc): Add debugging.
5049 (i386_breakpoint_at): New function.
5050 (the_low_target): Add new members.
5051 * linux-mips-low.c (mips_get_pc, mips_set_pc)
5052 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
5053 (mips_breakpoint_at): New.
5054 (the_low_target): Add new members.
5055 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
5056 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
5057 (the_low_target): Add new members.
5058 * linux-sh-low.c (sh_get_pc, sh_set_pc)
5059 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
5060 (the_low_target): Add new members.
5061 * linux-x86-64-low.c (target_regsets): Add new kind
5062 identifier.
5063
50642002-05-15 Daniel Jacobowitz <drow@mvista.com>
5065
5066 From Martin Pool <mbp@samba.org>:
5067 * server.c (gdbserver_usage): New function.
5068 (main): Call it.
5069
50702002-05-14 Daniel Jacobowitz <drow@mvista.com>
5071
5072 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
5073 stop_at -> stop_pc.
5074
50752002-05-04 Andrew Cagney <ac131313@redhat.com>
5076
5077 * Makefile.in: Remove obsolete code.
5078
50792002-04-24 Michal Ludvig <mludvig@suse.cz>
5080
5081 * linux-low.c (regsets_fetch_inferior_registers),
5082 (regsets_store_inferior_registers): Removed cast to int from
5083 ptrace() calls.
5084 * regcache.h: Added declaration of struct inferior_info.
5085
50862002-04-20 Daniel Jacobowitz <drow@mvista.com>
5087
5088 * inferiors.c (struct inferior_info): Add regcache_data.
5089 (add_inferior): Call create_register_cache.
5090 (clear_inferiors): Call free_register_cache.
5091 (inferior_regcache_data, set_inferior_regcache_data): New functions.
5092 * regcache.c (struct inferior_regcache_data): New.
5093 (registers): Remove.
5094 (get_regcache): New function.
5095 (create_register_cache, free_register_cache): New functions.
5096 (set_register_cache): Don't initialize the register cache here.
5097 (registers_to_string, registers_from_string, register_data): Call
5098 get_regcache.
5099 * regcache.h: Add prototypes.
5100 * server.h: Likewise.
5101
51022002-04-20 Daniel Jacobowitz <drow@mvista.com>
5103
5104 * mem-break.c: New file.
5105 * mem-break.h: New file.
5106 * Makefile.in: Add mem-break.o rule; update server.h
5107 dependencies.
5108 * inferiors.c (struct inferior_info): Add target_data
5109 member.
5110 (clear_inferiors): Free target_data member if set.
5111 (inferior_target_data, set_inferior_target_data): New functions.
5112 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
5113 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
5114 * linux-low.c (linux_bp_reinsert): New variable.
5115 (struct inferior_linux_data): New.
5116 (linux_create_inferior): Use set_inferior_target_data.
5117 (linux_attach): Likewise. Call add_inferior.
5118 (linux_wait_for_one_inferior): New function.
5119 (linux_wait): Call it.
5120 (linux_write_memory): Add const.
5121 (initialize_low): Call set_breakpoint_data.
5122 * linux-low.h (struct linux_target_ops): Add breakpoint
5123 handling members.
5124 * server.c (attach_inferior): Remove extra add_inferior
5125 call.
5126 * server.h: Include mem-break.h. Update inferior.c
5127 prototypes.
5128 * target.c (read_inferior_memory)
5129 (write_inferior_memory): New functions.
5130 * target.h (read_inferior_memory)
5131 (write_inferior_memory): Change macros to prototypes.
5132 (struct target_ops): Update comments. Add const to write_memory
5133 definition.
5134
51352002-04-11 Daniel Jacobowitz <drow@mvista.com>
5136
5137 * linux-low.c (usr_store_inferior_registers): Support
5138 registers which are allowed to fail to store.
5139 * linux-low.h (linux_target_ops): Likewise.
5140 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
5141 (ppc_cannot_store_register): FPSCR may not be storable.
5142
51432002-04-09 Daniel Jacobowitz <drow@mvista.com>
5144
5145 * server.h: Include <string.h> if HAVE_STRING_H.
5146 * ChangeLog: Correct paths in last ChangeLog entry.
5147
51482002-04-09 Daniel Jacobowitz <drow@mvista.com>
5149
5150 * linux-low.h: Remove obsolete prototypes.
5151 (struct linux_target_ops): New.
5152 (extern the_low_target): New.
5153 * linux-low.c (num_regs, regmap): Remove declarations.
5154 (register_addr): Use the_low_target explicitly.
5155 (fetch_register): Likewise.
5156 (usr_fetch_inferior_registers): Likewise.
5157 (usr_store_inferior_registers): Likewise.
5158 * linux-arm-low.c (num_regs): Remove.
5159 (arm_num_regs): Define.
5160 (arm_regmap): Renamed from regmap, made static.
5161 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
5162 made static.
5163 (arm_cannot_store_register): Renamed from cannot_store_register,
5164 made static.
5165 (the_low_target): New.
5166 * linux-i386-low.c (num_regs): Remove.
5167 (i386_num_regs): Define.
5168 (i386_regmap): Renamed from regmap, made static.
5169 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
5170 made static.
5171 (i386_cannot_store_register): Renamed from cannot_store_register,
5172 made static.
5173 (the_low_target): New.
5174 * linux-ia64-low.c (num_regs): Remove.
5175 (ia64_num_regs): Define.
5176 (ia64_regmap): Renamed from regmap, made static.
5177 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
5178 made static.
5179 (ia64_cannot_store_register): Renamed from cannot_store_register,
5180 made static.
5181 (the_low_target): New.
5182 * linux-m68k-low.c (num_regs): Remove.
5183 (m68k_num_regs): Define.
5184 (m68k_regmap): Renamed from regmap, made static.
5185 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
5186 made static.
5187 (m68k_cannot_store_register): Renamed from cannot_store_register,
5188 made static.
5189 (the_low_target): New.
5190 * linux-mips-low.c (num_regs): Remove.
5191 (mips_num_regs): Define.
5192 (mips_regmap): Renamed from regmap, made static.
5193 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
5194 made static.
5195 (mips_cannot_store_register): Renamed from cannot_store_register,
5196 made static.
5197 (the_low_target): New.
5198 * linux-ppc-low.c (num_regs): Remove.
5199 (ppc_num_regs): Define.
5200 (ppc_regmap): Renamed from regmap, made static.
5201 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
5202 made static.
5203 (ppc_cannot_store_register): Renamed from cannot_store_register,
5204 made static.
5205 (the_low_target): New.
5206 * linux-s390-low.c (num_regs): Remove.
5207 (s390_num_regs): Define.
5208 (s390_regmap): Renamed from regmap, made static.
5209 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
5210 made static.
5211 (s390_cannot_store_register): Renamed from cannot_store_register,
5212 made static.
5213 (the_low_target): New.
5214 * linux-sh-low.c (num_regs): Remove.
5215 (sh_num_regs): Define.
5216 (sh_regmap): Renamed from regmap, made static.
5217 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5218 made static.
5219 (sh_cannot_store_register): Renamed from cannot_store_register,
5220 made static.
5221 (the_low_target): New.
5222 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5223 (the_low_target): New.
5224
52252002-04-09 Daniel Jacobowitz <drow@mvista.com>
5226
5227 * Makefile.in: Add stamp-h target.
5228 * configure.in: Create stamp-h.
5229 * configure: Regenerated.
5230
52312002-04-09 Daniel Jacobowitz <drow@mvista.com>
5232
5233 * inferiors.c: New file.
5234 * target.c: New file.
5235 * target.h: New file.
5236 * Makefile.in: Add target.o and inferiors.o. Update
5237 dependencies.
5238 * linux-low.c (inferior_pid): New static variable,
5239 moved from server.c.
5240 (linux_create_inferior): Renamed from create_inferior.
5241 Call add_inferior. Return 0 on success instead of a PID.
5242 (linux_attach): Renamed from myattach.
5243 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5244 (linux_thread_alive): Renamed from mythread_alive.
5245 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5246 child dies.
5247 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5248 (regsets_store_inferior_registers): Correct error message.
5249 Add missing ``return 0''.
5250 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5251 (linux_store_registers): Renamed from store_inferior_registers.
5252 (linux_read_memory): Renamed from read_inferior_memory.
5253 (linux_write_memory): Renamed from write_inferior_memory.
5254 (linux_target_ops): New structure.
5255 (initialize_low): Call set_target_ops ().
5256 * remote-utils.c (unhexify): New function.
5257 (hexify): New function.
5258 (input_interrupt): Send signals to ``signal_pid''.
5259 * server.c (inferior_pid): Remove.
5260 (start_inferior): Update create_inferior call.
5261 (attach_inferior): Call add_inferior.
5262 (handle_query): New function.
5263 (main): Call handle_query for `q' packets.
5264 * server.h: Include "target.h". Remove obsolete prototypes.
5265 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5266
52672002-04-09 Daniel Jacobowitz <drow@mvista.com>
5268
5269 * Makefile.in: Add WARN_CFLAGS. Update configury
5270 dependencies.
5271 * configure.in: Check for <string.h>
5272 * configure: Regenerate.
5273 * config.in: Regenerate.
5274 * gdbreplay.c: Include needed system headers.
5275 (remote_open): Remove strchr prototype.
5276 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5277 * regcache.c (supply_register): Change buf argument to const void *.
5278 (supply_register_by_name): Likewise.
5279 (collect_register): Change buf argument to void *.
5280 (collect_register_by_name): Likewise.
5281 * regcache.h: Add missing prototypes.
5282 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5283 * server.c (handle_query): New function.
5284 (attached): New static variable, moved out of main.
5285 (main): Quiet longjmp clobber warnings.
5286 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5287 * utils.c (error): Remove NORETURN.
5288 (fatal): Likewise.