1 2010-06-14 Stan Shebs <stan@codesourcery.com>
2 Pedro Alves <pedro@codesourcery.com>
6 * linux-x86-low.c: Include limits.h.
11 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
15 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
16 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
18 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
19 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
20 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
21 (amd64_emit_void_call_2): New.
22 (amd64_emit_ops): New.
23 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
24 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
25 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
26 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
27 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
28 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
29 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
30 (i386_emit_call, i386_emit_reg, i386_emit_pop)
31 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
32 (i386_emit_stack_adjust, i386_emit_int_call_1)
33 (i386_emit_void_call_2): New.
36 (the_low_target): Install x86_emit_ops.
37 * server.h (struct emit_ops): New.
38 (get_raw_reg_func_addr): Declare.
39 (current_insn_ptr, emit_error): Declare.
40 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
41 (set_trace_state_variable_value): New defines.
42 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
43 addr_get_trace_state_variable_value and
44 addr_set_trace_state_variable_value.
45 (symbol_list): New fields for get_raw_reg,
46 get_trace_state_variable_value and set_trace_state_variable_value.
47 (condfn): New typedef.
48 (struct tracepoint): New field `compiled_cond'.
49 (do_action_at_tracepoint): Clear compiled_cond.
50 (get_trace_state_variable_value, set_trace_state_variable_value):
52 (condition_true_at_tracepoint): If there's a compiled condition,
54 (current_insn_ptr, emit_error): New globals.
55 (struct bytecode_address): New.
56 (get_raw_reg_func_addr): New.
57 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
58 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
59 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
60 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
61 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
62 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
63 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
64 (compile_tracepoint_condition, compile_bytecodes): New.
65 * target.h (emit_ops): Forward declare.
66 (struct target_ops): New field emit_ops.
67 (target_emit_ops): New.
68 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
69 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
70 * linux-low.c (linux_emit_ops): New.
71 (linux_target_ops): Install it.
72 * linux-low.h (struct linux_target_ops): New field emit_ops.
74 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
76 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
77 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
79 2010-06-01 Pedro Alves <pedro@codesourcery.com>
80 Stan Shebs <stan@codesourcery.com>
82 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
83 (all): Depend on $(extra_libraries).
84 (install-only): Install the IPA.
85 (IPA_OBJS, IPA_LIB): New.
86 (clean): Remove the IPA lib.
87 (IPAGENT_CFLAGS): New.
88 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
89 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
90 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
91 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
92 * configure.ac: Check for atomic builtins support in the compiler.
93 (IPA_DEPFILES, extra_libraries): Define.
94 * configure.srv (ipa_obj): Add description.
95 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
96 (i[34567]86-*-linux*): Set ipa_obj.
97 (x86_64-*-linux*): Set ipa_obj.
98 * linux-low.c (stabilizing_threads): New.
99 (supports_fast_tracepoints): New.
100 (linux_detach): Stabilize threads before detaching.
101 (handle_tracepoints): Handle internal tracing breakpoints. Assert
102 the lwp is either not stabilizing, or is moving out of a jump pad.
103 (linux_fast_tracepoint_collecting): New.
104 (maybe_move_out_of_jump_pad): New.
105 (enqueue_one_deferred_signal): New.
106 (dequeue_one_deferred_signal): New.
107 (linux_wait_for_event_1): If moving out of a jump pad, defer
108 pending signals to later.
109 (linux_stabilize_threads): New.
110 (linux_wait_1): Check if threads need moving out of jump pads, and
112 (stuck_in_jump_pad_callback): New.
113 (move_out_of_jump_pad_callback): New.
115 (linux_resume_one_lwp): Handle moving out of jump pads.
116 (linux_set_resume_request): Dequeue deferred signals.
117 (need_step_over_p): Also step over fast tracepoint jumps.
118 (start_step_over): Also uninsert fast tracepoint jumps.
119 (finish_step_over): Also reinsert fast tracepoint jumps.
120 (linux_install_fast_tracepoint_jump): New.
121 (linux_target_ops): Install linux_stabilize_threads and
122 linux_install_fast_tracepoint_jump_pad.
123 * linux-low.h (linux_target_ops) <get_thread_area,
124 install_fast_tracepoint_jump_pad>: New fields.
125 (struct lwp_info) <collecting_fast_tracepoint,
126 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
127 (linux_get_thread_area): Declare.
128 * linux-x86-low.c (jump_insn): New.
129 (x86_get_thread_area): New.
132 (amd64_install_fast_tracepoint_jump_pad): New.
133 (i386_install_fast_tracepoint_jump_pad): New.
134 (x86_install_fast_tracepoint_jump_pad): New.
135 (the_low_target): Install x86_get_thread_area and
136 x86_install_fast_tracepoint_jump_pad.
137 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
138 (struct fast_tracepoint_jump): New.
139 (fast_tracepoint_jump_insn): New.
140 (fast_tracepoint_jump_shadow): New.
141 (find_fast_tracepoint_jump_at): New.
142 (fast_tracepoint_jump_here): New.
143 (delete_fast_tracepoint_jump): New.
144 (set_fast_tracepoint_jump): New.
145 (uninsert_fast_tracepoint_jumps_at): New.
146 (reinsert_fast_tracepoint_jumps_at): New.
147 (set_breakpoint_at): Use write_inferior_memory.
148 (uninsert_raw_breakpoint): Use write_inferior_memory.
149 (check_mem_read): Mask out fast tracepoint jumps.
150 (check_mem_write): Mask out fast tracepoint jumps.
151 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
152 (set_fast_tracepoint_jump): Declare.
153 (delete_fast_tracepoint_jump)
154 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
155 (reinsert_fast_tracepoint_jumps_at): Declare.
156 * regcache.c: Don't compile many functions when building the
157 in-process agent library.
158 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
159 the register buffer in the heap.
160 (free_register_cache): If the register buffer isn't owned by the
161 regcache, don't free it.
162 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
163 pre-existing register caches.
164 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
166 (convert_ascii_to_int): : Constify `from' parameter type.
167 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
168 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
169 the needed buffer in-place.
170 (relocate_instruction): New.
171 * server.c (handle_query) <qSymbols>: If the target supports
172 tracepoints, give it a chance of looking up symbols. Report
173 support for fast tracepoints.
174 (handle_status): Stabilize threads.
175 (process_serial_event): Adjust.
176 * server.h (struct fast_tracepoint_jump): Forward declare.
177 (struct process_info) <fast_tracepoint_jumps>: New field.
178 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
179 (decode_X_packet, decode_M_packet): Adjust.
180 (relocate_instruction): Declare.
181 (in_process_agent_loaded): Declare.
182 (tracepoint_look_up_symbols): Declare.
183 (struct fast_tpoint_collect_status): Declare.
184 (fast_tracepoint_collecting): Declare.
185 (force_unlock_trace_buffer): Declare.
186 (handle_tracepoint_bkpts): Declare.
187 (initialize_low_tracepoint)
188 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
189 * target.h (struct target_ops) <stabilize_threads,
190 install_fast_tracepoint_jump_pad>: New fields.
191 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
192 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
193 [HAVE_STDINT_H]: Include stdint.h.
194 (trace_debug_1): Rename to ...
195 (trace_vdebug): ... this.
196 (trace_debug): Rename to ...
197 (trace_debug_1): ... this. Add `level' parameter.
199 (ATTR_USED, ATTR_NOINLINE): New.
200 (IP_AGENT_EXPORT): New.
201 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
202 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
203 (about_to_request_buffer_space, trace_buffer_is_full)
204 (stopping_tracepoint, expr_eval_result, error_tracepoint)
205 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
206 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
207 (traceframe_write_count, traceframes_created)
208 (trace_state_variables)
209 New renaming defines.
210 (struct ipa_sym_addresses): New.
211 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
213 (ipa_sym_addrs): New.
214 (all_tracepoint_symbols_looked_up): New.
215 (in_process_agent_loaded): New.
216 (write_e_ipa_not_loaded): New.
217 (maybe_write_ipa_not_loaded): New.
218 (tracepoint_look_up_symbols): New.
219 (debug_threads) [IN_PROCESS_AGENT]: New.
220 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
221 (UNKNOWN_SIDE_EFFECTS): New.
223 (flush_trace_buffer): New.
224 (stop_tracing_bkpt): New.
225 (flush_trace_buffer_bkpt): New.
226 (read_inferior_integer): New.
227 (read_inferior_uinteger): New.
228 (read_inferior_data_pointer): New.
229 (write_inferior_data_pointer): New.
230 (write_inferior_integer): New.
231 (write_inferior_uinteger): New.
232 (struct collect_static_trace_data_action): Delete.
233 (enum tracepoint_type): New.
234 (struct tracepoint) <type>: New field `type'.
235 <actions_str, step_actions, step_actions_str>: Only include in GDBserver.
236 <orig_size, obj_addr_on_target, adjusted_insn_addr>
237 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
238 (tracepoints): Use IP_AGENT_EXPORT.
239 (last_tracepoint): Don't include in the IPA.
240 (stopping_tracepoint): Use IP_AGENT_EXPORT.
241 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
242 (alloced_trace_state_variables): New.
243 (trace_state_variables): Use IP_AGENT_EXPORT.
244 (traceframe_t): Delete unused variable.
245 (circular_trace_buffer): Don't include in the IPA.
246 (trace_buffer_start): Delete.
247 (struct trace_buffer_control): New.
248 (trace_buffer_free): Delete.
249 (struct ipa_trace_buffer_control): New.
250 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
251 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
253 (trace_buffer_ctrl): New.
254 (TRACE_BUFFER_CTRL_CURR): New.
255 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
256 Reimplement as macros.
257 (trace_buffer_wrap): Delete.
258 (traceframe_write_count, traceframe_read_count)
259 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
260 (struct tracepoint_hit_ctx) <type>: New field.
261 (struct fast_tracepoint_ctx): New.
262 (memory_barrier): New.
264 (record_tracepoint_error): Update atomically in the IPA.
265 (clear_inferior_trace_buffer): New.
266 (about_to_request_buffer_space): New.
267 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
268 updating the same buffer.
269 (add_tracepoint): Default the tracepoint's type to trap
270 tracepoint, and orig_size to -1.
271 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
273 (create_trace_state_variable): New parameter `gdb'. Handle it.
274 (clear_installed_tracepoints): Clear fast tracepoint jumps.
275 (cmd_qtdp): Handle fast tracepoints.
277 (max_jump_pad_size): New.
278 (gdb_jump_pad_head): New.
279 (get_jump_space_head): New.
280 (claim_jump_space): New.
281 (sort_tracepoints): New.
282 (MAX_JUMP_SIZE): New.
283 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
285 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
286 support. Upload fast traceframes, and delete internal IPA
288 (stop_tracing_handler): New.
289 (flush_trace_buffer_handler): New.
290 (cmd_qtstop): Upload fast tracepoints.
291 (response_tracepoint): Handle fast tracepoints.
292 (tracepoint_finished_step): Upload fast traceframes. Set the
293 tracepoint hit context's tracepoint type.
294 (handle_tracepoint_bkpts): New.
295 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
296 type. Add comment about fast tracepoints.
297 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
298 non-existing action_str field.
299 (get_context_regcache): Handle fast tracepoints.
300 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
302 (fast_tracepoint_from_jump_pad_address): New.
303 (fast_tracepoint_from_ipa_tpoint_address): New.
305 (force_unlock_trace_buffer): New.
306 (fast_tracepoint_collecting): New.
309 (write_inferior_data_ptr): New.
310 (target_tp_heap): New.
311 (target_malloc): New.
312 (download_agent_expr): New.
314 (download_tracepoints): New.
315 (download_trace_state_variables): New.
316 (upload_fast_traceframes): New.
317 (IPA_FIRST_TRACEFRAME): New.
318 (IPA_NEXT_TRACEFRAME_1): New.
319 (IPA_NEXT_TRACEFRAME): New.
320 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
321 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
322 (gdb_jump_pad_buffer_end): New.
323 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
324 (initialize_tracepoint): Adjust.
325 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
326 buffer. Initialize the low module.
327 * utils.c (PREFIX, TOOLNAME): New.
328 (malloc_failure): Use PREFIX.
329 (error): In the IPA, an error causes an exit.
330 (fatal, warning): Use PREFIX.
331 (internal_error): Use TOOLNAME.
332 (NUMCELLS): Increase to 10.
333 * configure, config.in: Regenerate.
335 2010-06-01 Pedro Alves <pedro@codesourcery.com>
337 * server.c (handle_query) <qSupported>: Do two passes over the
338 qSupported string to avoid nesting strtok.
340 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
342 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
344 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
346 * configure: Regenerate.
347 * proc-service.list: New.
349 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
351 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
354 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
356 * gdbreplay.c (remote_open): Check error return from socket() call by
357 its equality to -1 not by it being negative.
358 * remote-utils.c (remote_open): Likewise.
360 2010-05-23 Pedro Alves <pedro@codesourcery.com>
362 * config.h: Regenerate.
364 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
366 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
367 doesn't provide PTRACE_GET_THREAD_AREA.
369 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
371 * linux-m68k-low.c: Include <asm/ptrace.h>
372 (ps_get_thread_area): Implement.
374 2010-05-03 Doug Evans <dje@google.com>
376 * event-loop.c (struct callback_event): New struct.
377 (callback_list): New global.
378 (append_callback_event, delete_callback_event): New functions.
379 (process_callback): New function.
380 (start_event_loop): Call it.
381 * remote-utils.c (NOT_SCHEDULED): Define.
382 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
383 moved out of readchar.
384 (readchar): Rewrite. Call reschedule before returning.
385 (reset_readchar): New function.
386 (remote_close): Call it.
387 (process_remaining, reschedule): New functions.
388 * server.h (callback_handler_func): New typedef.
389 (append_callback_event, delete_callback_event): Declare.
391 2010-05-03 Pedro Alves <pedro@codesourcery.com>
393 * proc-service.c (ps_pglobal_lookup): Use
394 thread_db_look_up_one_symbol.
395 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
396 parameter. Use it instead of all_symbols_looked_up.
397 * server.h (struct process_info) <all_symbols_looked_up>: Delete
399 (all_symbols_looked_up): Don't declare.
400 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
401 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
403 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
404 Set all_symbols_looked_up here.
405 (thread_db_look_up_one_symbol): New.
406 (thread_db_get_tls_address): Adjust.
407 (thread_db_load_search, try_thread_db_load_1): Always allocate the
408 thread_db object on the heap, and tentatively set it in the
410 (thread_db_init): Don't set all_symbols_looked_up here.
411 * linux-low.h (thread_db_look_up_one_symbol): Declare.
413 2010-05-03 Pedro Alves <pedro@codesourcery.com>
415 * linux-low.c (linux_kill, linux_detach): Adjust.
416 (status_pending_p_callback): Remove redundant statement. Check
417 for !TARGET_WAITIKIND_IGNORE, instead of
418 TARGET_WAITKIND_STOPPED.
419 (handle_tracepoints): Make sure LWP is locked. Adjust.
420 (linux_wait_for_event_1): Adjust.
421 (linux_cancel_breakpoints): New.
422 (unsuspend_one_lwp): New.
423 (unsuspend_all_lwps): New.
424 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
425 (send_sigstop_callback): Change return type to int, add new
426 `except' parameter and handle it.
427 (suspend_and_send_sigstop_callback): New.
428 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
429 pass them down. If SUSPEND, also increment the lwp's suspend
431 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
432 (need_step_over_p): Don't consider suspended LWPs.
433 (start_step_over): Adjust.
434 (proceed_one_lwp): Change return type to int, add new `except'
435 parameter and handle it.
436 (unsuspend_and_proceed_one_lwp): New.
437 (proceed_all_lwps): Use find_inferior instead of
439 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
440 also decrement the suspend count of LWPs. Pass `except' down,
441 instead of hacking its suspend count.
442 (linux_pause_all): Add `freeze' parameter. Adjust.
443 (linux_unpause_all): New.
444 (linux_target_ops): Install linux_unpause_all.
445 * server.c (handle_status): Adjust.
446 * target.h (struct target_ops): New fields `unpause_all' and
447 `cancel_breakpoints'. Add new parameter to `pause_all'.
448 (pause_all): Add new `freeze' parameter.
450 (cancel_breakpoints): New.
451 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
453 (cmd_qtstart): Pause threads.
454 (stop_tracing): Pause threads, and cancel breakpoints.
455 * win32-low.c (win32_target_ops): Adjust.
457 2010-05-03 Pedro Alves <pedro@codesourcery.com>
459 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
460 the inferior right away from here...
461 (linux_wait_1): ... to here, and adjust to check the thread's
462 last_resume_kind instead of the lwp's step or stop_expected flags.
464 2010-05-02 Pedro Alves <pedro@codesourcery.com>
466 * README: Use consistent `GDB' and `GDBserver' spellings.
468 2010-05-02 Pedro Alves <pedro@codesourcery.com>
470 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
471 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
472 (linux_detach_one_lwp): Assume the lwp is stopped.
473 (any_thread_of): Delete.
474 (linux_detach): Stop all lwps here. Don't blindly delete all
476 (delete_lwp_callback): New.
477 (linux_mourn): Delete all lwps of the process that is gone.
478 (linux_wait_1): Don't delete the last lwp of the process here.
479 * mem-break.h (mark_breakpoints_out): Declare.
480 * mem-break.c (mark_breakpoints_out): New.
481 (free_all_breakpoints): Use it.
482 * server.c (handle_target_event): If the process is gone, mark
484 * thread-db.c (struct thread_db) <create_bp>: New field.
485 (thread_db_enable_reporting): Fix prototype. Store a thread event
486 breakpoint reference in the thread_db struct.
487 (thread_db_load_search): Clear the thread_db object.
488 (try_thread_db_load_1): Ditto.
489 (switch_to_process): New.
490 (disable_thread_event_reporting): Use it.
491 (remove_thread_event_breakpoints): New.
492 (thread_db_detach, thread_db_mourn): Use it.
494 2010-05-01 Pedro Alves <pedro@codesourcery.com>
496 * linux-low.c (linux_enable_event_reporting): New.
497 (linux_wait_for_event_1, handle_extended_wait): Use it.
499 2010-04-30 Pedro Alves <pedro@codesourcery.com>
501 * linux-low.c (linux_kill_one_lwp, linux_kill)
502 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
503 (send_sigstop): Take an lwp_info as parameter instead. Queue a
504 SIGSTOP even if the LWP is stopped.
505 (send_sigstop_callback): New.
506 (stop_all_lwps): Use send_sigstop_callback instead.
507 (linux_resume_one_thread): Adjust.
508 (proceed_one_lwp): Still proceed an LWP that the client has
509 requested to stop, if we haven't reported it as stopped yet. Make
510 sure that LWPs the client want stopped, have a pending SIGSTOP.
512 2010-04-26 Doug Evans <dje@google.com>
514 * server.c (handle_general_set): Make static.
516 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
517 Print received char after testing for error/eof instead of before.
518 (input_interrupt): Tweak comment.
520 2010-04-23 Doug Evans <dje@google.com>
522 * server.c (start_inferior): Print inferior argv if --debug.
524 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
526 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
527 * nto-x86-low.c: Include server.h
529 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
531 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
532 be consistent with other sources of this directory.
533 (init_registers_amd64): Correct name of source file of this function
536 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
538 * configure.srv (x86_64-*-mingw*): New configuration for Windows
541 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
543 * win32-i386-low.c: Add 64-bit support.
544 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
545 (init_registers_amd64): Declare.
546 (mappings): Add 64-bit version of array.
547 (init_windows_x86): New function.
548 (the_low_target): Change init_arch field to init_windows_x86.
550 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
552 * win32-low.c: Adapt to support also 64-bit architecture.
553 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
554 (get_image_name): Use SIZE_T type for local variable `done'.
555 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
556 (toolhelp_get_dll_name): Idem.
557 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
558 Use uintptr_t typecast to avoid warning.
559 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
560 (handle_exception): Use phex_nz to avoid warning.
561 (win32_wait): Remove unused local variable `process'.
563 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
565 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
568 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
570 * configure.ac: Use `ws2_32' library for srv_mingw.
571 * configure: Regenerate.
572 * gdbreplay.c: Include winsock2.h instead of winsock.h.
573 * remote-utils.c: Likewise.
575 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
577 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
578 if __x86_64__ is defined.
580 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
582 * configure: Regenerate.
584 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
586 * server.c (handle_query): Handle 'qGetTIBAddr' query.
587 * target.h (target_ops): New get_tib_address field.
588 * win32-low.h (win32_thread_info): Add thread_local_base field.
589 * win32-low.c (child_add_thread): Add tlb argument.
590 Set thread_local_base field to TLB.
591 (get_child_debug_event): Adapt to child_add_thread change.
592 (win32_get_tib_address): New function.
593 (win32_target_ops): Set get_tib_address field to
594 win32_get_tib_address.
595 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
597 2010-04-12 Pedro Alves <pedro@codesourcery.com>
599 * linux-low.c (linux_mourn): Also remove the process.
600 * server.c (handle_target_event): Don't remove the process here.
601 * nto-low.c (nto_mourn): New.
602 (nto_target_ops): Install it.
603 * spu-low.c (spu_mourn): New.
604 (spu_target_ops): Install it.
605 * win32-low.c (win32_mourn): New.
606 (win32_target_ops): Install it.
608 2010-04-12 Pedro Alves <pedro@codesourcery.com>
610 * server.h (buffer_xml_printf): Remove redundant `;'.
612 2010-04-12 Pedro Alves <pedro@codesourcery.com>
614 * regcache.c (set_register_cache): Invalidate regcaches before
615 changing the register cache layout.
616 (regcache_invalidate_one): Allow a NULL regcache.
617 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
618 regcaches before changing the register cache layout or the target
621 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
623 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
624 variable warning on Linux/x86-64.
626 2010-04-11 Pedro Alves <pedro@codesourcery.com>
628 GDBserver disconnected tracing support.
630 * linux-low.c (linux_remove_process): Delete.
631 (add_lwp): Don't set last_resume_kind here.
632 (linux_kill): Use `mourn'.
633 (linux_detach): Use `thread_db_detach', and `mourn'.
635 (linux_attach_lwp_1): Adjust comment.
636 (linux_attach): last_resume_kind moved the thread_info; adjust.
637 (status_pending_p_callback): Adjust.
638 (linux_wait_for_event_1): Adjust.
639 (count_events_callback, select_singlestep_lwp_callback)
640 (select_event_lwp_callback, cancel_breakpoints_callback)
641 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
642 (proceed_one_lwp): Adjust.
643 (linux_async): Add debug output.
644 (linux_thread_stopped): New.
645 (linux_pause_all): New.
646 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
648 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
649 (thread_db_free): Delete declaration.
650 (thread_db_detach, thread_db_mourn): Declare.
651 * thread-db.c (thread_db_init): Use thread_db_mourn.
652 (thread_db_free): Delete, split in two.
653 (disable_thread_event_reporting): New.
654 (thread_db_detach): New.
655 (thread_db_mourn): New.
657 * server.h (struct thread_info) <last_resume_kind>: New field.
658 <attached>: Add comment.
659 <gdb_detached>: New field.
660 (handler_func): Change return type to int.
661 (handle_serial_event, handle_target_event): Ditto.
662 (gdb_connected): Declare.
664 (disconnected_tracing): Declare.
665 (stop_tracing): Declare.
667 * server.c (handle_query) <qSupported>: Report support for
668 disconnected tracing.
669 (queue_stop_reply_callback): Account for running threads.
670 (gdb_wants_thread_stopped): New.
671 (gdb_wants_all_threads_stopped): New.
672 (gdb_reattached_process): New.
673 (handle_status): Clear the `gdb_detached' flag of all processes.
674 In all-stop, stop all threads.
675 (main): Be sure to leave tfind mode. Handle disconnected tracing.
676 (process_serial_event): If the remote connection breaks, or if an
677 exit was forced with "monitor exit", force an event loop exit.
678 Handle disconnected tracing on detach.
679 (handle_serial_event): Adjust.
680 (handle_target_event): If GDB isn't connected, forward events back
681 to the inferior, unless the last process exited, in which case,
682 exit gdbserver. Adjust interface.
684 * remote-utils.c (remote_open): Don't block in accept. Instead
685 register an event loop source on the listen socket file
686 descriptor. Refactor bits into ...
687 (listen_desc): ... this new global.
688 (gdb_connected): ... this new function.
689 (enable_async_notification): ... this new function.
690 (handle_accept_event): ... this new function.
691 (remote_close): Clear remote_desc.
693 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
695 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
697 (mourn_inferior): Define.
698 (target_process_qsupported): Avoid the dangling else problem.
699 (thread_stopped): Define.
701 (target_waitstatus_to_string): Declare.
702 * target.c (target_waitstatus_to_string): New.
704 * tracepoint.c (tracing): Make extern.
705 (disconnected_tracing): New.
706 (stop_tracing): Make extern. Handle tracing stops due to GDB
708 (cmd_qtdisconnected): New.
709 (cmd_qtstatus): Report disconnected tracing status in trace reply.
710 (handle_tracepoint_general_set): Handle QTDisconnected.
712 * event-loop.c (event_handler_func): Change return type to int.
713 (process_event): Bail out if the event handler wants the event
715 (handle_file_event): Ditto.
716 (start_event_loop): Bail out if the event handler wants the event
719 * nto-low.c (nto_target_ops): Adjust.
720 * spu-low.c (spu_wait): Don't remove the process here.
721 (spu_target_ops): Adjust.
722 * win32-low.c (win32_wait): Don't remove the process here.
723 (win32_target_ops): Adjust.
725 2010-04-11 Pedro Alves <pedro@codesourcery.com>
727 * regcache.c (realloc_register_cache): Invalidate inferior's
728 regcache before recreating it.
730 2010-04-09 Pedro Alves <pedro@codesourcery.com>
732 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
734 2010-04-09 Stan Shebs <stan@codesourcery.com>
735 Pedro Alves <pedro@codesourcery.com>
737 * server.h (LONGEST): New.
738 (struct thread_info) <while_stepping>: New field.
739 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
741 (initialize_tracepoint, handle_tracepoint_general_set)
742 (handle_tracepoint_query, tracepoint_finished_step)
743 (tracepoint_was_hit, release_while_stepping_state_list):
744 (current_traceframe): Declare.
745 * server.c (handle_general_set): Handle tracepoint packets.
748 (handle_search_memory_1): Use read_memory.
749 (handle_query): Report support for conditional tracepoints, trace
750 state variables, and tracepoint sources. Handle tracepoint
752 (main): Initialize the tracepoints module.
753 (process_serial_event): Handle traceframe reads/writes.
755 * linux-low.c (handle_tracepoints): New.
756 (linux_wait_1): Call it.
757 (linux_resume_one_lwp): Handle while-stepping.
758 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
759 (linux_target_ops): Install them.
760 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
762 * linux-x86-low.c (x86_supports_tracepoints): New.
763 (the_low_target). Install it.
765 * mem-break.h (delete_breakpoint): Declare.
766 * mem-break.c (delete_breakpoint): Make external.
768 * target.h (struct target_ops): Add `supports_tracepoints',
769 `read_pc', and `write_pc' fields.
770 (target_supports_tracepoints): Define.
771 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
774 * regcache.h (struct regcache) <registers_owned>: New field.
775 (init_register_cache, regcache_cpy): Declare.
776 (regcache_read_pc, regcache_write_pc): Declare.
777 (register_cache_size): Declare.
778 (supply_regblock): Declare.
779 * regcache.c (init_register_cache): New.
780 (new_register_cache): Use it.
782 (register_cache_size): New.
783 (supply_regblock): New.
784 (regcache_read_pc, regcache_write_pc): New.
788 * Makefile.in (OBS): Add tracepoint.o.
789 (tracepoint.o): New rule.
791 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
793 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
795 (i386-mmx.c): Likewise.
796 (i386-mmx-linux.o): Likewise.
797 (i386-mmx-linux.c): Likewise.
799 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
800 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
801 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
802 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
804 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
805 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
806 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
808 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
810 * Makefile.in (clean): Updated.
812 (i386-avx.c): Likewise.
813 (i386-avx-linux.o): Likewise.
814 (i386-avx-linux.c): Likewise.
815 (amd64-avx.o): Likewise.
816 (amd64-avx.c): Likewise.
817 (amd64-avx-linux.o): Likewise.
818 (amd64-avx-linux.c): Likewise.
820 * configure.srv (srv_i386_regobj): Add i386-avx.o.
821 (srv_i386_linux_regobj): Add i386-avx-linux.o.
822 (srv_amd64_regobj): Add amd64-avx.o.
823 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
824 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
825 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
826 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
827 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
828 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
829 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
831 * i387-fp.c: Include "i386-xstate.h".
833 (i387_cache_to_xsave): Likewise.
834 (i387_xsave_to_cache): Likewise.
835 (x86_xcr0): Likewise.
837 * i387-fp.h (i387_cache_to_xsave): Likewise.
838 (i387_xsave_to_cache): Likewise.
839 (x86_xcr0): Likewise.
841 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
842 * linux-crisv32-low.c (target_regsets): Likewise.
843 * linux-m68k-low.c (target_regsets): Likewise.
844 * linux-mips-low.c (target_regsets): Likewise.
845 * linux-ppc-low.c (target_regsets): Likewise.
846 * linux-s390-low.c (target_regsets): Likewise.
847 * linux-sh-low.c (target_regsets): Likewise.
848 * linux-sparc-low.c (target_regsets): Likewise.
849 * linux-xtensa-low.c (target_regsets): Likewise.
851 * linux-low.c: Include <sys/uio.h>.
852 (regsets_fetch_inferior_registers): Support nt_type.
853 (regsets_store_inferior_registers): Likewise.
854 (linux_process_qsupported): New.
855 (linux_target_ops): Add linux_process_qsupported.
857 * linux-low.h (regset_info): Add nt_type.
858 (linux_target_ops): Add process_qsupported.
860 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
862 (init_registers_i386_avx_linux): New.
863 (init_registers_amd64_avx_linux): Likewise.
864 (xmltarget_i386_linux_no_xml): Likewise.
865 (xmltarget_amd64_linux_no_xml): Likewise.
866 (PTRACE_GETREGSET): Likewise.
867 (PTRACE_SETREGSET): Likewise.
868 (x86_fill_xstateregset): Likewise.
869 (x86_store_xstateregset): Likewise.
871 (x86_linux_update_xmltarget): Likewise.
872 (x86_linux_process_qsupported): Likewise.
873 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
874 (x86_arch_setup): Don't call init_registers_amd64_linux nor
875 init_registers_i386_linux here. Call
876 x86_linux_update_xmltarget.
877 (the_low_target): Add x86_linux_process_qsupported.
879 * server.c (handle_query): Call target_process_qsupported.
881 * target.h (target_ops): Add process_qsupported.
882 (target_process_qsupported): New.
884 2010-04-03 Pedro Alves <pedro@codesourcery.com>
886 * inferiors.c (add_thread): Set last_status kind to
887 TARGET_WAITKIND_IGNORE.
888 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
889 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
890 (linux_wait_1): Move `thread' local definition to block that uses
891 it. Don't NULL initialize `event_child'.
892 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
893 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
894 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
896 2010-04-01 Pedro Alves <pedro@codesourcery.com>
898 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
899 an extended waitstatus, or by a watchpoint.
900 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
901 thread was stepping or has been stopped by a watchpoint.
903 2010-04-01 Pedro Alves <pedro@codesourcery.com>
905 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
906 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
907 of another, then delete the previous, and validate all
909 (validate_inserted_breakpoint): New.
910 (delete_disabled_breakpoints): New.
911 (validate_breakpoints): New.
912 (check_mem_read): Validate breakpoints before trusting their
913 shadow. Delete disabled breakpoints.
914 (check_mem_write): Validate breakpoints before trusting they
915 should be inserted. Delete disabled breakpoints.
916 * mem-break.h (validate_breakpoints):
917 * server.c (handle_query): Validate breakpoints when we see a
920 2010-04-01 Pedro Alves <pedro@codesourcery.com>
922 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
923 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
924 if we could tell there's a GDB breakpoint at stop_pc.
925 (need_step_over_p): Don't do a step over if we find a GDB
926 breakpoint at the resume PC.
928 * mem-break.c (struct raw_breakpoint): New.
929 (enum bkpt_type): New type `gdb_breakpoint'.
930 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
931 fields. New field `raw'.
932 (find_raw_breakpoint_at): New.
933 (set_raw_breakpoint_at): Handle refcounting. Create a raw
935 (set_breakpoint_at): Adjust.
936 (delete_raw_breakpoint): New.
937 (release_breakpoint): New.
938 (delete_breakpoint): Rename to...
939 (delete_breakpoint_1): ... this. Add proc parameter. Use
940 release_breakpoint. Return ENOENT.
941 (delete_breakpoint): Reimplement.
942 (find_breakpoint_at): Delete.
943 (find_gdb_breakpoint_at): New.
944 (delete_breakpoint_at): Delete.
945 (set_gdb_breakpoint_at): New.
946 (delete_gdb_breakpoint_at): New.
947 (gdb_breakpoint_here): New.
948 (set_reinsert_breakpoint): Use release_breakpoint.
949 (uninsert_breakpoint): Rename to ...
950 (uninsert_raw_breakpoint): ... this.
951 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
952 (reinsert_raw_breakpoint): Change parameter type to
954 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
956 (check_breakpoints): Adjust. Use release_breakpoint.
957 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
958 (breakpoint_inserted_here): Ditto.
959 (check_mem_read): Adjust to iterate over raw breakpoints instead.
960 Don't trust the breakpoint's shadow if it is not inserted.
961 (check_mem_write): Adjust to iterate over raw breakpoints instead.
962 (delete_all_breakpoints): Adjust.
963 (free_all_breakpoints): Mark all breakpoints as uninserted, and
964 use delete_breakpoint_1.
966 * mem-break.h (breakpoints_supported): Delete declaration.
967 (set_gdb_breakpoint_at): Declare.
968 (gdb_breakpoint_here): Declare.
969 (delete_breakpoint_at): Delete.
970 (delete_gdb_breakpoint_at): Declare.
972 * server.h (struct raw_breakpoint): Forward declare.
973 (struct process_info): New field `raw_breakpoints'.
975 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
978 2010-03-24 Pedro Alves <pedro@codesourcery.com>
980 * linux-low.c (status_pending_p_callback): Fix comment.
981 (linux_wait_for_event_1): Move most of the internal breakpoint
982 handling from here...
983 (linux_wait_1): ... to here.
984 (count_events_callback): New.
985 (select_singlestep_lwp_callback): New.
986 (select_event_lwp_callback): New.
987 (cancel_breakpoints_callback): New.
988 (select_event_lwp): New.
989 (linux_wait_1): Simplify internal breakpoint handling. Give equal
990 priority to all LWPs that have had events that should be reported
991 to the client. Cancel breakpoints when about to reporting the
992 event to the client, not while stopping lwps. No longer cancel
993 finished single-steps here.
994 (cancel_finished_single_step): Delete.
995 (cancel_finished_single_steps): Delete.
997 2010-03-24 Pedro Alves <pedro@codesourcery.com>
999 * mem-break.c (enum bkpt_type): New.
1000 (struct breakpoint): New field `type'.
1001 (set_breakpoint_at): Change return type to struct breakpoint
1002 pointer. Set type to `other_breakpoint' by default.
1003 (delete_breakpoint): Rewrite, supporting more than one breakpoint
1004 in the breakpoint list.
1005 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
1006 (reinsert_breakpoint): Rename to ...
1007 (reinsert_raw_breakpoint): ... this.
1008 (reinsert_breakpoints_at): Adjust.
1009 * mem-break.h (struct breakpoint): Declare.
1010 (set_breakpoint_at): Change return type to struct breakpoint
1013 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1015 * server.c (handle_query): Assign, not compare.
1017 2010-03-24 Pedro Alves <pedro@codesourcery.com>
1019 Teach linux gdbserver to step-over-breakpoints.
1021 * linux-low.c (can_hardware_single_step): New.
1022 (supports_breakpoints): New.
1023 (handle_extended_wait): If stopping threads, read the stop pc of
1026 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
1027 low target doesn't support retrieving the PC.
1028 (add_lwp): Set last_resume_kind to resume_continue.
1029 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
1030 (linux_attach): Don't clear stop_expected. Set the lwp's
1031 last_resume_kind to resume_stop.
1032 (linux_detach_one_lwp): Don't check for removed breakpoints.
1033 (check_removed_breakpoint): Delete.
1034 (status_pending_p): Rename to ...
1035 (status_pending_p_callback): ... this. Don't check for removed
1036 breakpoints. Don't consider threads that are stopped from GDB's
1038 (linux_wait_for_lwp): Always read the stop_pc here.
1039 (cancel_breakpoint): New.
1040 (step_over_bkpt): New global.
1041 (linux_wait_for_event_1): Implement stepping over breakpoints.
1042 (gdb_wants_lwp_stopped): New.
1043 (gdb_wants_all_stopped): New.
1044 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
1045 single-step traps here. Store the thread's last reported target
1047 (send_sigstop): Don't clear stop_expected. Always set it,
1049 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
1050 (cancel_finished_single_step): New.
1051 (cancel_finished_single_steps): New.
1052 (wait_for_sigstop): Don't cancel finished single-step traps here.
1053 (linux_resume_one_lwp): Don't check for removed breakpoints.
1054 Don't set `step' on non-hardware step archs.
1055 (linux_set_resume_request): Ignore resume_stop requests if already
1056 stopping or stopped. Set the lwp's last_resume_kind.
1057 (resume_status_pending_p): Don't check for removed breakpoints.
1058 (need_step_over_p): New.
1059 (start_step_over): New.
1060 (finish_step_over): New.
1061 (linux_resume_one_thread): Always queue a sigstop for resume_stop
1062 requests. Clear the thread's last reported target waitstatus.
1063 Don't use the `suspended' flag. Don't consider pending breakpoints.
1064 (linux_resume): Start a step-over if necessary.
1065 (proceed_one_lwp): New.
1066 (proceed_all_lwps): New.
1067 (unstop_all_lwps): New.
1068 * linux-low.h (struct lwp_info): Rewrite comment for the
1069 `suspended' flag. Add the `stop_pc' field. Delete the
1070 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
1071 Add `'last_resume_kind' and `need_step_over' fields.
1072 * inferiors.c (struct thread_info): Delete, moved elsewhere.
1073 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
1074 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
1075 (set_raw_breakpoint_at): New.
1076 (set_breakpoint_at): Rewrite to use it.
1077 (reinsert_breakpoint_handler): Delete.
1078 (set_reinsert_breakpoint): New.
1079 (reinsert_breakpoint_by_bp): Delete.
1080 (delete_reinsert_breakpoints): New.
1081 (uninsert_breakpoint): Rewrite.
1082 (uninsert_breakpoints_at): New.
1083 (reinsert_breakpoint): Rewrite.
1084 (reinsert_breakpoints_at): New.
1085 (check_breakpoints): Rewrite.
1086 (breakpoint_here): New.
1087 (breakpoint_inserted_here): New.
1088 (check_mem_read): Adjust.
1089 * mem-break.h (breakpoints_supported, breakpoint_here)
1090 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
1091 (reinsert_breakpoint_by_bp): Delete declaration.
1092 (delete_reinsert_breakpoints): Declare.
1093 (reinsert_breakpoint): Delete declaration.
1094 (reinsert_breakpoints_at): Declare.
1095 (uninsert_breakpoint): Delete declaration.
1096 (uninsert_breakpoints_at): Declare.
1097 (check_breakpoints): Adjust prototype.
1098 * server.h: Adjust include order.
1099 (struct thread_info): Declare here. Add a `last_status' field.
1101 2010-03-23 Michael Snyder <msnyder@vmware.com>
1103 * server.c (crc32): New function.
1104 (handle_query): Add handling for 'qCRC:' request.
1106 2010-03-23 Pedro Alves <pedro@codesourcery.com>
1108 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
1109 lwp had been stopped by a watchpoint.
1111 2010-03-16 Pedro Alves <pedro@codesourcery.com>
1113 * server.h (internal_error): Declare.
1114 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
1115 * utils.c (internal_error): New function.
1117 2010-03-15 Andreas Schwab <schwab@redhat.com>
1119 * configure.srv: Fix typo setting srv_regobj.
1121 2010-03-15 Pedro Alves <pedro@codesourcery.com>
1123 * linux-low.c (fetch_register): Avoid passing a non string literal
1125 (usr_store_inferior_registers): Ditto.
1127 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1129 * linux-low.c (linux_write_memory): Bail out early if peeking
1132 2010-03-14 Pedro Alves <pedro@codesourcery.com>
1134 * linux-low.h (struct lwp_info): New fields
1135 `stopped_by_watchpoint' and `stopped_data_address'.
1136 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
1137 here, and cache them in the lwp object.
1138 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
1140 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
1142 (linux_stopped_by_watchpoint): Rewrite.
1143 (linux_stopped_data_address): Rewrite.
1145 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
1147 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
1148 switching the current inferior, not before.
1150 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
1152 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
1153 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
1154 i386-linux.c and amd64-linux.c.
1155 (reg-i386.o): Removed.
1156 (reg-i386.c): Likewise.
1157 (reg-i386-linux.o): Likewise.
1158 (reg-i386-linux.c): Likewise.
1159 (reg-x86-64.o): Likewise.
1160 (reg-x86-64.c): Likewise.
1161 (reg-x86-64-linux.o): Likewise.
1162 (reg-x86-64-linux.c): Likewise.
1165 (i386-linux.o): Likewise.
1166 (i386-linux.c): Likewise.
1167 (amd64.o): Likewise.
1168 (amd64.c): Likewise.
1169 (amd64-linux.o): Likewise.
1170 (amd64-linux.c): Likewise.
1172 * configure.srv (srv_i386_regobj): New.
1173 (srv_i386_linux_regobj): Likewise.
1174 (srv_amd64_regobj): Likewise.
1175 (srv_amd64_linux_regobj): Likewise.
1176 (srv_i386_32bit_xmlfiles): Likewise.
1177 (srv_i386_64bit_xmlfiles): Likewise.
1178 (srv_i386_xmlfiles): Likewise.
1179 (srv_amd64_xmlfiles): Likewise.
1180 (srv_i386_linux_xmlfiles): Likewise.
1181 (srv_amd64_linux_xmlfiles): Likewise.
1182 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
1183 srv_xmlfiles to $srv_i386_xmlfiles.
1184 (i[34567]86-*-mingw32ce*): Likewise.
1185 (i[34567]86-*-mingw*): Likewise.
1186 (i[34567]86-*-nto*): Likewise.
1187 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
1188 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
1189 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
1190 (x86_64-*-linux*): Likewise.
1192 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
1193 (init_registers_amd64_linux): New.
1194 (x86_arch_setup): Replace init_registers_x86_64_linux with
1195 init_registers_amd64_linux.
1197 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
1199 * configure.ac: Check for libdl. If it is not available link against
1200 static libthread_db.
1201 * configure: Regenerate.
1203 2010-02-22 Pedro Alves <pedro@codesourcery.com>
1207 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
1208 handing a read watchpoint.
1209 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
1211 2010-02-12 Doug Evans <dje@google.com>
1213 * linux-low.c (linux_supports_tracefork_flag): Document.
1214 (linux_look_up_symbols): Add comment.
1216 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
1218 * regcache.c (supply_register): Clear regcache if buf is NULL.
1220 2010-02-02 Nicolas Roche <roche@sourceware.org>
1221 Joel Brobecker <brobecker@adacore.com>
1223 * inferiors.c (find_inferior): Add function documentation.
1224 (unloaded_dll): Handle the case where the unloaded dll has not
1225 been previously registered in the dll list.
1227 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
1229 * linux-arm-low.c (thumb_breakpoint_len): Delete.
1230 (thumb2_breakpoint): New.
1231 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
1233 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1235 * linux-low.c (get_stop_pc): Check for SIGTRAP.
1236 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
1239 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1241 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
1243 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1245 * linux-s390-low.c (s390_collect_ptrace_register)
1246 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
1248 2010-01-21 Doug Evans <dje@google.com>
1250 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
1251 (PTRACE_ARG4_TYPE): New macro.
1252 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
1253 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
1254 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
1255 (usr_store_inferior_registers): Ditto.
1256 (linux_read_memory, linux_write_memory): Ditto.
1257 (linux_test_for_tracefork): Ditto.
1259 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
1260 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
1262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1264 * proc-service.c (ps_lgetregs): Don't refetch registers from the
1267 2010-01-21 Pedro Alves <pedro@codesourcery.com>
1269 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
1270 prototype to take a regcache. Adjust.
1272 2010-01-20 Pedro Alves <pedro@codesourcery.com>
1274 * regcache.h (struct thread_info): Forward declare.
1275 (struct regcache): New.
1276 (new_register_cache): Adjust prototype.
1277 (get_thread_regcache): Declare.
1278 (free_register_cache): Adjust prototype.
1279 (registers_to_string, registers_from_string): Ditto.
1280 (supply_register, supply_register_by_name, collect_register)
1281 (collect_register_as_string, collect_register_by_name): Ditto.
1282 * regcache.c (struct inferior_regcache_data): Delete.
1283 (get_regcache): Rename to ...
1284 (get_thread_regcache): ... this. Adjust. Switch inferior before
1286 (regcache_invalidate_one): Adjust.
1287 (regcache_invalidate): Fix prototype.
1288 (new_register_cache): Return the new register cache.
1289 (free_register_cache): Change prototype.
1290 (realloc_register_cache): Adjust.
1291 (registers_to_string): Change prototype to take a regcache. Adjust.
1292 (registers_from_string): Ditto.
1293 (register_data): Ditto.
1294 (supply_register): Ditto.
1295 (supply_register_by_name): Ditto.
1296 (collect_register): Ditto.
1297 (collect_register_as_string): Ditto.
1298 (collect_register_by_name): Ditto.
1299 * server.c (process_serial_event): Adjust.
1300 * linux-low.h (regset_fill_func, regset_store_func): Change
1302 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
1304 * linux-low.c (get_stop_pc): Adjust.
1305 (check_removed_breakpoint): Adjust.
1306 (linux_wait_for_event): Adjust.
1307 (linux_resume_one_lwp): Adjust.
1308 (fetch_register): Add regcache parameter. Adjust.
1309 (usr_store_inferior_registers): Ditto.
1310 (regsets_fetch_inferior_registers): Ditto.
1311 (regsets_store_inferior_registers): Ditto.
1312 (linux_fetch_registers, linux_store_registers): Ditto.
1313 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
1315 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1316 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
1317 prototype to take a regcache.
1318 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
1319 * remote-utils.c (convert_ascii_to_int, outreg)
1320 (prepare_resume_reply): Change prototype to take a regcache.
1322 * target.h (struct target_ops) <fetch_registers, store_registers>:
1323 Change prototype to take a regcache.
1324 (fetch_inferior_registers, store_inferior_registers): Change
1325 prototype to take a regcache. Adjust.
1326 * proc-service.c (ps_lgetregs): Adjust.
1327 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
1328 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
1329 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
1330 take a regcache. Adjust.
1331 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
1332 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1333 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
1334 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
1335 * linux-cris-low.c (cris_get_pc, cris_set_pc)
1336 (cris_cannot_fetch_register):
1337 (cris_breakpoint_at): Change prototype to take a regcache.
1339 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
1340 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
1341 to take a regcache. Adjust.
1342 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
1344 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
1345 take a regcache. Adjust.
1346 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
1347 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
1348 (m68k_set_pc): Change prototype to take a regcache. Adjust.
1349 * linux-mips-low.c (mips_get_pc):
1350 (mips_set_pc): Change prototype to take a regcache. Adjust.
1351 (mips_reinsert_addr): Adjust.
1352 (mips_collect_register): Change prototype to take a regcache.
1354 (mips_supply_register):
1355 (mips_collect_register_32bit, mips_supply_register_32bit)
1356 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1357 (mips_store_fpregset): Ditto.
1358 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1360 (parse_spufs_run): Adjust.
1361 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1362 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1363 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1364 take a regcache. Adjust.
1365 * linux-s390-low.c (s390_collect_ptrace_register)
1366 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1367 (s390_set_pc): Change prototype to take a regcache. Adjust.
1368 (s390_arch_setup): Adjust.
1369 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1370 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1371 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1372 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1373 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1375 (sparc_breakpoint_at): Adjust.
1376 * linux-xtensa-low.c (xtensa_fill_gregset):
1377 (xtensa_store_gregset):
1378 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1379 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1380 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1381 prototype to take a regcache. Adjust.
1382 * win32-arm-low.c (arm_fetch_inferior_register)
1383 (arm_store_inferior_register): Change prototype to take a
1385 * win32-i386-low.c (i386_fetch_inferior_register)
1386 (i386_store_inferior_register): Change prototype to take a
1388 * win32-low.c (child_fetch_inferior_registers)
1389 (child_store_inferior_registers): Change prototype to take a
1391 (win32_wait): Adjust.
1392 (win32_fetch_inferior_registers): Change prototype to take a
1394 (win32_store_inferior_registers): Adjust.
1395 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1396 store_inferior_register>: Change prototype to take a regcache.
1398 2010-01-20 Doug Evans <dje@google.com>
1400 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1402 (linux_wait_for_event1, linux_init_signals): Ditto.
1403 (W_STOPCODE): Provide definition if missing.
1405 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1407 * linux-low.c (linux_core_of_thread): New.
1408 (compare_ints, show_process, list_threads): New.
1409 (linux_qxfer_osdata): Report threads and cores.
1410 (linux_target_op): Register linux_core_of_thread.
1411 * remote-utils.c (prepare_resume_reply): Report the core.
1412 (buffer_xml_printf): Support %d specifier.
1413 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1415 (handle_query): Handle qXfer:threads. Announce availability
1417 * target.h (struct target_ops): New field core_of_thread.
1419 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1421 * Makefile.in (clean): Remove new generated files.
1422 (reg-s390.o, reg-s390.c): Remove rules.
1423 (reg-s390x.o, reg-s390x.c): Likewise.
1424 (s390-linux32.o, s390-linux32.c): Add rules.
1425 (s390-linux64.o, s390-linux64.c): Likewise.
1426 (s390x-linux64.o, s390x-linux64.c): Likewise.
1427 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1428 * linux-s390-low.c: Include <elf.h>.
1429 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1430 (init_registers_s390): Remove prototype.
1431 (init_registers_s390x): Likewise.
1432 (init_registers_s390_linux32): Add prototype.
1433 (init_registers_s390_linux64): Likewise.
1434 (init_registers_s390x_linux64): Likewise.
1435 (s390_num_regs_3264): New define.
1436 (s390_regmap_3264): New global variable.
1437 (s390_cannot_fetch_register): Remove obsolete check.
1438 (s390_cannot_store_register): Likewise.
1439 (s390_collect_ptrace_register): Handle upper/lower register halves.
1440 (s390_supply_ptrace_register): Likewise.
1441 (s390_fill_gregset): Update to register number changes.
1442 (s390_get_hwcap): New routine.
1443 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1444 Install appropriate regmap and register set.
1446 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1448 * server.c (gdbserver_version): Update copyright year to 2010.
1449 * gdbreplay.c (gdbreplay_version): Likewise.
1451 2009-12-28 Doug Evans <dje@google.com>
1453 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1454 elf/external.h. Include <elf.h> instead but only if necessary.
1456 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1458 * linux-low.c (linux_remove_process): Remove `detaching'
1459 parameter. Don't release/detach from thread_db here.
1460 (linux_kill): Release/detach from thread_db here, ...
1461 (linux_detach): ... and here, before actually detaching.
1462 (linux_wait_1): ... and here, when a process exits.
1463 * thread-db.c (any_thread_of): New.
1464 (thread_db_free): Switch the current inferior to a thread of the
1467 2009-12-21 Doug Evans <dje@google.com>
1469 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1471 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1472 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1473 warning ifndef __NR_tkill. Move setting of errno there too.
1474 Delete unnecessary resetting of errno after syscall.
1475 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1477 * configure.ac: Check for dladdr.
1478 * config.in: Regenerate.
1479 * configure: Regenerate.
1480 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1481 (try_thread_db_load): Update.
1483 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1485 2009-12-18 Doug Evans <dje@google.com>
1487 * event-loop.c: Include unistd.h if it exists.
1489 * linux-low.c (my_waitpid): Move definition away from being in
1490 between linux_tracefork_child/linux_test_for_tracefork.
1492 * gdb_proc_service.h (psaddr_t): Fix type.
1493 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1494 signature to match glibc.
1496 2009-12-16 Doug Evans <dje@google.com>
1498 * linux-low.c (linux_read_memory): Fix argument to read.
1500 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1502 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1503 events, don't leave current_inferior pointing at null.
1505 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1507 * win32-low.c (LOG): Delete.
1508 (OUTMSG): Output to stderr.
1509 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1510 on compile time LOG macro.
1511 (win32_wait): Fix debug output.
1513 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1515 * win32-low.c (win32_add_one_solib): If the dll name is
1516 "ntdll.dll", prepend the system directory to the dll path.
1518 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1520 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1522 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1523 Vladimir Prus <vladimir@codesourcery.com>
1525 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1526 * configure.ac: Check for __mcoldfire__ and set
1527 gdb_cv_m68k_is_coldfire.
1528 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1529 reg-cf.o and reg-m68k.o.
1530 * configure: Regenerated.
1532 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1534 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1535 Pass it to thread_db_free.
1536 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1537 proper `detaching' argument to linux_remove_process.
1538 * linux-low.h (thread_db_free): Add `detaching' parameter.
1539 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1541 (thread_db_free): Add `detaching' parameter. Only
1542 call td_ta_clear_event if detaching from process.
1544 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1546 * thread-db.c (thread_db_free): Fix typo.
1548 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1551 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1553 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1555 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1556 with an i686 compiler.
1557 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1559 * configure: Rebuilt.
1561 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1565 * server.c (handle_search_memory_1): Correct read_addr initialization
1566 in loop for searching subsequent chunks.
1568 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1570 * configure.ac: New --with-libthread-db option.
1571 * thread-db.c: Allow direct dependence on libthread_db.
1572 (thread_db_free): Adjust.
1573 * config.in: Regenerate.
1574 * configure: Likewise.
1576 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1579 * thread-db.c (attach_thread): New function.
1580 (maybe_attach_thread): Return success/failure.
1581 (find_new_threads_callback): Adjust.
1582 (thread_db_find_new_threads): Loop until no new threads.
1584 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1586 * proc-service.c (ps_lgetregs): Formatting.
1588 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1590 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1591 * configure.ac: Adjust.
1592 * linux-low.h (struct process_info_private): Move members to struct
1594 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1595 * linux-low.c (linux_remove_process): Adjust.
1596 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1597 * server.c (handle_query): Move code ...
1598 (handle_monitor_command): ... here. New function.
1599 * target.h (struct target_ops): New member.
1600 * thread-db.c (struct thread_db): New.
1601 (libthread_db_search_path): New variable.
1602 (thread_db_create_event, thread_db_enable_reporting)
1603 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1604 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1605 (try_thread_db_load_1, dladdr_to_soname): New functions.
1606 (try_thread_db_load, thread_db_load_search): New functions.
1607 (thread_db_init): Search for libthread_db.
1608 (thread_db_free): New function.
1609 (thread_db_handle_monitor_command): Likewise.
1610 * config.in: Regenerate.
1611 * configure: Regenerate.
1613 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1615 * spu-low.c (spu_kill): Wait for inferior to terminate.
1616 Call clear_inferiors.
1617 (spu_detach): Call clear_inferiors.
1619 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1621 * aclocal.m4: Regenerate.
1622 * config.in: Likewise.
1623 * configure: Likewise.
1625 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1627 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1628 (parse_spufs_run): New function.
1629 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1630 (ppc_breakpoint_at): Handle SPU breakpoints.
1632 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1634 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1635 (SPUFS_MAGIC): Define.
1636 (spu_enumerate_spu_ids): New function.
1637 (linux_qxfer_spu): New function.
1638 (linux_target_ops): Install linux_qxfer_spu.
1640 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1642 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1643 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1644 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1645 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1646 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1647 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1648 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1649 (init_registers_powerpc_cell32l): Add prototype.
1650 (init_registers_powerpc_cell64l): Likewise.
1651 (ppc_arch_setup): Detect Cell/B.E. architecture.
1653 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1655 * Makefile.in (datarootdir): New variable.
1657 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1659 * linux-low.c (linux_write_memory): Update debugging output.
1660 * Makefile.in (clean): Add new descriptions.
1661 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1662 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1663 * configure.srv: Add new files for arm*-*-linux*.
1664 * linux-arm-low.c: Add new declarations.
1665 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1666 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1667 (HWCAP_VFPv3D16): New.
1668 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1669 instead of __IWMMXT__.
1670 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1671 (arm_arch_setup): New.
1672 (target_regsets): Remove #ifdef. Add VFP regset.
1673 (the_low_target): Use arm_arch_setup.
1675 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1677 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1678 the main thread again.
1680 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1682 Adding Neutrino gdbserver.
1683 * configure: Regenerated.
1684 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1685 * configure.srv (i[34567]86-*-nto*): New target.
1686 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1687 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1688 (nto_comctrl) [__QNX__]: New function.
1689 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1691 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1693 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1696 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1697 Pedro Alves <pedro@codesourcery.com>
1699 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1700 don't support CONTEXT_EXTENDED_REGISTERS.
1701 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1702 (the_low_target): Install them.
1703 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1704 failing with ERROR_PIPE_NOT_CONNECTED.
1706 2009-06-30 Doug Evans <dje@google.com>
1707 Pierre Muller <muller@ics.u-strasbg.fr>
1709 Add h/w watchpoint support to x86-linux, win32-i386.
1710 * Makefile.in (SFILES): Add i386-low.c
1711 (i386_low_h): Define.
1712 (i386-low.o): Add dependencies.
1713 (linux-x86-low.o): Add i386-low.h dependency.
1714 (win32-i386-low.o): Ditto.
1715 * i386-low.c: New file.
1716 * i386-low.h: New file.
1717 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1718 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1719 * linux-low.c (linux_add_process): Initialize arch_private.
1720 (linux_remove_process): Free arch_private.
1721 (add_lwp): Initialize arch_private.
1722 (delete_lwp): Free arch_private.
1723 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1725 * linux-low.h (process_info_private): New member arch_private.
1726 (lwp_info): New member arch_private.
1727 (linux_target_ops): New members new_process, new_thread,
1729 (ptid_of): New macro.
1730 * linux-x86-low.c: Include stddef.h, i386-low.h.
1731 (arch_process_info): New struct.
1732 (arch_lwp_info): New struct.
1733 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1734 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1735 (i386_dr_low_get_status): New function.
1736 (x86_insert_point, x86_remove_point): New functions.
1737 (x86_stopped_by_watchpoint): New function.
1738 (x86_stopped_data_address): New function.
1739 (x86_linux_new_process, x86_linux_new_thread): New functions.
1740 (x86_linux_prepare_to_resume): New function.
1741 (the_low_target): Add entries for insert_point, remove_point,
1742 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1744 * server.c (debug_hw_points): New global.
1745 (monitor_show_help): Document set debug-hw-points.
1746 (handle_query): Process "set debug-hw-points".
1747 * server.h (debug_hw_points): Declare.
1748 (paddress): Declare.
1749 * utils.c (NUMCELLS, CELLSIZE): New macros.
1750 (get_sell, xsnprintf, paddress): New functions.
1751 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1752 remove_point, stopped_by_watchpoint, stopped_data_address.
1753 * win32-i386-low.c: Include i386-low.h.
1754 (debug_reg_state): Replaces dr.
1755 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1756 (i386_dr_low_get_status): New function.
1757 (i386_insert_point, i386_remove_point): New functions.
1758 (i386_stopped_by_watchpoint): New function.
1759 (i386_stopped_data_address): New function.
1760 (i386_initial_stuff): Update.
1761 (get_thread_context,set_thread_context,i386_thread_added): Update.
1762 (the_low_target): Add entries for insert_point,
1763 remove_point, stopped_by_watchpoint, stopped_data_address.
1764 * win32-low.c (win32_insert_watchpoint): New function.
1765 (win32_remove_watchpoint): New function.
1766 (win32_stopped_by_watchpoint): New function.
1767 (win32_stopped_data_address): New function.
1768 (win32_target_ops): Add entries for insert_watchpoint,
1769 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1770 * win32-low.h (win32_target_ops): New members insert_point,
1771 remove_point, stopped_by_watchpoint, stopped_data_address.
1773 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1775 * server.c (process_serial_event): Re-return unsupported, not
1776 error, if the type isn't recognized. Re-allow supporting only
1777 insert or remove packets. Also call require_running for
1778 breakpoints. Add missing break statement to default case. Tidy.
1779 * target.h (struct target_ops): Rename insert_watchpoint to
1780 insert_point, and remove_watchpoint to remove_point.
1782 * linux-low.h (struct linux_target_ops): Likewise.
1783 * linux-low.c (linux_insert_watchpoint): Rename to ...
1784 (linux_insert_point): ... this. Adjust.
1785 (linux_remove_watchpoint): Rename to ...
1786 (linux_remove_point): ... this. Adjust.
1787 (linux_target_ops): Adjust.
1788 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1789 (cris_insert_point): ... this.
1790 (cris_remove_watchpoint): Rename to ...
1791 (cris_remove_point): ... this.
1792 (the_low_target): Adjust.
1794 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1796 * server.c (handle_v_kill): Pass signal_pid to
1797 kill_inferior if multi_process is zero.
1799 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1801 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1802 * target.h (target_ops): Comment for *_watchpoint to make it clear
1803 the functions can get types '0' and '1'.
1805 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1807 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1808 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1809 * regcache.c (get_regcache): Likewise.
1810 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1811 * win32-low.c (child_fetch_inferior_registers): Remove check for
1814 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1815 Pedro Alves <pedro@codesourcery.com>
1817 * target.h (struct target_ops) <supports_multi_process>: New
1819 (target_supports_multi_process): New.
1820 * server.c (handle_query): Even if GDB reports support, only
1821 enable multi-process if the target also supports it. Report
1822 multi-process support only if the target backend supports it.
1823 * linux-low.c (linux_supports_multi_process): New function.
1824 (linux_target_ops): Install it as target_supports_multi_process
1827 2009-05-24 Doug Evans <dje@google.com>
1829 Global renaming of find_thread_pid to find_thread_ptid.
1830 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1831 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1832 All callers updated.
1834 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1835 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1838 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1839 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1840 (linux_resume_one_lwp): Ditto.
1842 2009-05-23 Doug Evans <dje@google.com>
1844 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1845 from struct inferior_list_entry * to struct lwp_info *.
1846 All callers updated.
1848 2009-05-13 Doug Evans <dje@google.com>
1850 * linux-x86-low.c: Don't include assert.h.
1851 (x86_siginfo_fixup): Use fatal, not assert.
1852 (x86_arch_setup): Fix comment.
1854 2009-05-12 Doug Evans <dje@google.com>
1856 Biarch support for i386/amd64 gdbserver.
1857 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1858 Add linux-x86-low.c.
1859 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1860 (linux-x86-low.o): Add.
1861 * linux-x86-64-low.c: Delete.
1862 * linux-i386-low.c: Delete.
1863 * linux-x86-low.c: New file.
1864 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1866 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1868 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1869 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1870 (linux_child_pid_to_exec_file): New function.
1871 (elf_64_header_p, elf_64_file_p): New functions.
1872 (siginfo_fixup): New function.
1873 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1874 give target a chance to convert layout.
1875 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1876 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1878 2009-05-07 Doug Evans <dje@google.com>
1880 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1881 (regsets_store_inferior_registers): Ditto.
1883 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1887 * linux-low.c (must_set_ptrace_flags): Delete.
1888 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1890 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1891 `lwp->must_set_ptrace_flags' instead.
1892 (linux_wait_for_event_1): Set ptrace options here.
1893 (linux_wait_1): ... not here.
1895 2009-04-30 Doug Evans <dje@google.com>
1897 * inferiors.c (started_inferior_callback): New function.
1898 (attached_inferior_callback): New function.
1899 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1900 * server.c (print_started_pid, print_attached_pid): New functions.
1901 (detach_or_kill_for_exit): New function.
1902 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1903 * server.h (have_started_inferiors_p): Declare.
1904 (have_attached_inferiors_p): Declare.
1906 * inferiors.c (remove_process): Fix memory leak, free process.
1907 * linux-low.c (linux_remove_process): New function.
1908 (linux_kill): Call it instead of remove_process.
1909 (linux_detach, linux_wait_1): Ditto.
1911 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1913 * configure.srv: Add x86 Windows CE target.
1915 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1917 * inferiors.c (get_thread_process): Make global.
1918 * server.h (get_thread_process): Add prototype.
1919 * thread-db.c (find_one_thread): Use get_thread_process
1920 instead of current_process.
1921 (thread_db_get_tls_address): Do not crash if called when
1922 thread layer is not yet initialized.
1924 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1926 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1927 * spu-low.c (current_tid): Rename to ...
1928 (current_ptid): ... this.
1929 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1930 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1931 ptid_get_lwp (current_ptid) instead of current_tid.
1932 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1933 instead of current_tid. Use find_process_pid to verify pid
1934 argument is valid. Pass proper argument to remove_process.
1935 (spu_thread_alive): Compare current_ptid instead of current_tid.
1936 (spu_resume): Likewise.
1938 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1940 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1943 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1945 Implement the multiprocess extensions, and add linux multiprocess
1948 * server.h (ULONGEST): Declare.
1949 (struct ptid, ptid_t): New.
1950 (minus_one_ptid, null_ptid): Declare.
1951 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1952 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1953 (struct inferior_list_entry): Change `id' type from unsigned from
1955 (struct sym_cache, struct breakpoint, struct
1956 process_info_private): Forward declare.
1957 (struct process_info): Declare.
1958 (current_process): Declare.
1959 (all_processes): Declare.
1960 (initialize_inferiors): Declare.
1961 (add_thread): Adjust to use ptid_t.
1962 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1963 (add_process, remove_process, find_thread_pid): Declare.
1964 (find_inferior_id): Adjust to use ptid_t.
1965 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1966 (multi_process): Declare.
1967 (push_event): Adjust to use ptid_t.
1968 (read_ptid, write_ptid): Declare.
1969 (prepare_resume_reply): Adjust to use ptid_t.
1970 (clear_symbol_cache): Declare.
1971 * inferiors.c (all_processes): New.
1972 (null_ptid, minus_one_ptid): New.
1973 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1974 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1975 (add_thread): Change unsigned long to ptid. Remove gdb_id
1977 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1978 (gdb_id_to_thread): Rename to ...
1979 (find_thread_pid): ... this. Change unsigned long to ptid.
1980 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1981 (loaded_dll, pull_pid_from_list): Adjust.
1982 (add_process, remove_process, find_process_pid)
1983 (get_thread_process, current_process, initialize_inferiors): New.
1984 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1985 (struct target_waitstatus) <related_pid>: Ditto.
1986 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1988 (struct target_ops) <join>: Add `pid' argument.
1989 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1990 (struct target_ops) <wait>: Add `ptid' field. Change return type
1992 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1993 (mywait): Add `ptid' argument. Change return type to ptid_t.
1994 (target_pid_to_str): Declare.
1995 * target.c (set_desired_inferior): Adjust to use ptids.
1996 (mywait): Add new `ptid' argument. Adjust.
1997 (target_pid_to_str): New.
1998 * mem-break.h (free_all_breakpoints): Declare.
1999 * mem-break.c (breakpoints): Delelete.
2000 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
2001 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
2002 to use per-process breakpoint list.
2003 (free_all_breakpoints): New.
2004 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
2005 (symbol_cache, all_symbols_looked_up): Delete.
2007 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
2009 (prepare_resume_reply): Change ptid argument's type from unsigned
2010 long to ptid_t. Adjust. Implement W;process and X;process.
2011 (free_sym_cache, clear_symbol_cache): New.
2012 (look_up_one_symbol): Adjust to per-process symbol cache. *
2013 * server.c (cont_thread, general_thread, step_thread): Change type
2016 (multi_process): New.
2017 (last_ptid): Change type to ptid_t.
2018 (struct vstop_notif) <ptid>: Change type to ptid_t.
2019 (queue_stop_reply, push_event): Change `ptid' argument's type to
2021 (discard_queued_stop_replies): Add `pid' argument.
2022 (start_inferior): Adjust to use ptids. Adjust to mywait interface
2023 changes. Don't reference the `attached' global.
2024 (attach_inferior): Adjust to mywait interface changes.
2025 (handle_query): Adjust to use ptids. Parse GDB's qSupported
2026 features. Handle and report "multiprocess+". Handle
2028 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
2030 (handle_v_kill): New.
2031 (handle_v_stopped): Adjust to use target_pid_to_str.
2032 (handle_v_requests): Allow multiple attaches and runs when
2033 multiprocess extensions are in effect. Handle "vKill".
2034 (myresume): Adjust to use ptids.
2035 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
2036 (handle_status): Adjust to discard_queued_stop_replies interface
2038 (first_thread_of, kill_inferior_callback)
2039 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
2040 (main): Call initialize_inferiors. Adjust to use ptids, killing
2041 and detaching from all inferiors. Handle multiprocess packet
2043 * linux-low.h: Include gdb_proc_service.h.
2044 (struct process_info_private): New.
2045 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
2046 <lwpid_of>: Use ptid_get_lwp.
2047 (get_lwp_thread): Adjust.
2048 (struct lwp_info): Add `dead' member.
2049 (find_lwp_pid): Declare.
2050 * linux-low.c (thread_db_active): Delete.
2051 (new_inferior): Adjust comment.
2052 (inferior_pid): Delete.
2053 (linux_add_process): New.
2054 (handle_extended_wait): Adjust.
2055 (add_lwp): Change unsigned long to ptid.
2056 (linux_create_inferior): Add process to processes table. Adjust
2057 to use ptids. Don't set new_inferior here.
2058 (linux_attach_lwp): Rename to ...
2059 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
2060 it. Adjust to use ptids.
2061 (linux_attach_lwp): New.
2062 (linux_attach): Add process to processes table. Don't set
2064 (struct counter): New.
2065 (second_thread_of_pid_p, last_thread_of_process_p): New.
2066 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
2068 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
2069 processes. Remove process from process table.
2070 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
2071 to multiple processes.
2072 (any_thread_of): New.
2073 (linux_detach): Add `pid' argument, and handle it. Remove process
2074 from processes table.
2075 (linux_join): Add `pid' argument. Handle it.
2076 (linux_thread_alive): Change unsighed long argument to ptid_t.
2077 Consider dead lwps as not being alive.
2078 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
2079 threads we're not interested in.
2080 (same_lwp, find_lwp_pid): New.
2081 (linux_wait_for_lwp): Change `pid' argument's type from int to
2083 (linux_wait_for_event): Rename to ...
2084 (linux_wait_for_event_1): ... this. Change `pid' argument's type
2085 from int to ptid_t. Adjust.
2086 (linux_wait_for_event): New.
2087 (linux_wait_1): Add `ptid' argument. Change return type to
2088 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
2089 that exit from the process table.
2090 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
2092 (mark_lwp_dead): New.
2093 (wait_for_sigstop): Adjust to use ptids. If a process exits while
2094 stopping all threads, mark its main lwp as dead.
2095 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
2097 (fetch_register, usr_store_inferior_registers)
2098 (regsets_fetch_inferior_registers)
2099 (regsets_store_inferior_registers, linux_read_memory)
2100 (linux_write_memory): Inline `inferior_pid'.
2101 (linux_look_up_symbols): Adjust to use per-process
2103 (linux_request_interrupt): Adjust to use ptids.
2104 (linux_read_auxv): Inline `inferior_pid'.
2105 (initialize_low): Don't reference thread_db_active.
2106 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
2107 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
2108 (ps_getpid): Return the pid of the current inferior.
2109 * thread-db.c (proc_handle, thread_agent): Delete.
2110 (thread_db_create_event, thread_db_enable_reporting): Adjust to
2112 (find_one_thread): Change argument type to ptid_t. Adjust to
2114 (maybe_attach_thread): Adjust to per-process data and ptids.
2115 (thread_db_find_new_threads): Ditto.
2116 (thread_db_init): Ditto.
2117 * spu-low.c (spu_create_inferior, spu_attach): Add process to
2118 processes table. Adjust to use ptids.
2119 (spu_kill, spu_detach): Adjust interface. Remove process from
2121 (spu_join, spu_thread_alive): Adjust interface.
2122 (spu_wait): Adjust interface. Remove process from processes
2123 table. Adjust to use ptids.
2124 * win32-low.c (current_inferior_tid): Delete.
2125 (current_inferior_ptid): New.
2126 (debug_event_ptid): New.
2127 (thread_rec): Take a ptid. Adjust.
2128 (child_add_thread): Add `pid' argument. Adjust to use ptids.
2129 (child_delete_thread): Ditto.
2130 (do_initial_child_stuff): Add `attached' argument. Add process to
2132 (child_fetch_inferior_registers, child_store_inferior_registers):
2134 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
2135 (win32_attach): Pass 1 to do_initial_child_stuff.
2136 (win32_kill): Adjust interface. Remove process from processes
2138 (win32_detach): Ditto.
2139 (win32_join): Adjust interface.
2140 (win32_thread_alive): Take a ptid.
2141 (win32_resume): Adjust to use ptids.
2142 (get_child_debug_event): Ditto.
2143 (win32_wait): Adjust interface. Remove exiting process from
2146 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2148 Non-stop mode support.
2150 * server.h (non_stop): Declare.
2151 (gdb_client_data, handler_func): Declare.
2152 (delete_file_handler, add_file_handler, start_event_loop):
2154 (handle_serial_event, handle_target_event, push_event)
2155 (putpkt_notif): Declare.
2156 * target.h (enum resume_kind): New.
2157 (struct thread_resume): Replace `step' field by `kind' field.
2158 (TARGET_WNOHANG): Define.
2159 (struct target_ops) <wait>: Add `options' argument.
2160 <supports_non_stop, async, start_non_stop>: New fields.
2161 (target_supports_non_stop, target_async): New.
2162 (start_non_stop): Declare.
2163 (mywait): Add `options' argument.
2164 * target.c (mywait): Add `options' argument. Print child exit
2166 (start_non_stop): New.
2167 * server.c (non_stop, own_buf, mem_buf): New globals.
2168 (struct vstop_notif): New.
2169 (notif_queue): New global.
2170 (queue_stop_reply, push_event, discard_queued_stop_replies)
2171 (send_next_stop_reply): New.
2172 (start_inferior): Adjust to use resume_kind. Adjust to mywait
2174 (attach_inferior): In non-stop mode, don't wait for the target
2176 (handle_general_set): Handle QNonStop.
2177 (handle_query): When handling qC, return the current general
2178 thread, instead of the first thread of the list.
2179 (handle_query): If the backend supports non-stop mode, include
2180 QNonStop+ in the qSupported query response.
2181 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
2183 (handle_v_attach, handle_v_run): Handle non-stop mode.
2184 (handle_v_stopped): New.
2185 (handle_v_requests): Report support for vCont;t. Handle vStopped.
2186 (myresume): Adjust to use resume_kind. Handle non-stop.
2187 (queue_stop_reply_callback): New.
2188 (handle_status): Handle non-stop mode.
2189 (main): Clear non_stop flag on reconnection. Use the event-loop.
2190 Refactor serial protocol handling from here ...
2191 (process_serial_event): ... to this new function. When GDB
2192 selects any thread, select one here. In non-stop mode, wait until
2193 GDB acks all pending events before exiting.
2194 (handle_serial_event, handle_target_event): New.
2195 * remote-utils.c (remote_open): Install remote_desc in the event
2197 (remote_close): Remove remote_desc from the event loop.
2198 (putpkt_binary): Rename to...
2199 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
2200 (putpkt_binary): New as wrapper around putpkt_binary_1.
2201 (putpkt_notif): New.
2202 (prepare_resume_reply): In non-stop mode, don't change the
2204 * event-loop.c: New.
2205 * Makefile.in (OBJ): Add event-loop.o.
2206 (event-loop.o): New rule.
2208 * linux-low.h (pid_of): Moved here.
2210 (get_lwp_thread): Use lwpid_of.
2211 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
2212 * linux-low.c (pid_of): Delete.
2213 (inferior_pid): Use lwpid_of.
2214 (linux_event_pipe): New.
2215 (target_is_async_p): New.
2217 (handle_extended_wait): Use lwpid_of.
2218 (add_lwp): Don't set lwpid field.
2219 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
2220 (linux_kill_one_lwp): If killing a running lwp, stop it first.
2221 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
2222 (linux_detach_one_lwp): If detaching from a running lwp, stop it
2223 first. Adjust to linux_wait_for_event interface changes. Use
2225 (linux_detach): Don't delete the main lwp here.
2226 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
2227 (status_pending_p): Don't consider explicitly suspended lwps.
2228 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
2229 pointer. Add OPTIONS argument. Change return type to int. Use
2230 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
2231 (linux_wait_for_event): Take an integer pid instead of a lwp_info
2232 pointer. Add status pointer argument. Return a pid instead of a
2233 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
2234 changes. In non-stop mode, don't switch to a random thread.
2235 (linux_wait): Rename to...
2236 (linux_wait_1): ... this. Add target_options argument, and handle
2237 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
2238 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
2239 clean exit and signal exit code. Don't stop all threads in
2240 non-stop mode. In all-stop mode, only stop all threads when
2241 reporting a stop to GDB. Handle explicit thread stop requests.
2242 (async_file_flush, async_file_mark): New.
2244 (send_sigstop): Use lwpid_of.
2245 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
2246 interface changes. In non-stop mode, don't switch to a random
2248 (linux_resume_one_lwp): Use lwpid_of.
2249 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
2250 (linux_resume_one_thread): ... this. Handle resume_stop. In
2251 non-stop mode, don't look for pending flag in all threads.
2252 (resume_status_pending_p): Don't consider explicitly suspended
2254 (my_waitpid): Reimplement. Emulate __WALL.
2255 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2257 (sigchld_handler, linux_supports_non_stop, linux_async)
2258 (linux_start_non_stop): New.
2259 (linux_target_ops): Register linux_supports_non_stop, linux_async
2260 and linux_start_non_stop.
2261 (initialize_low): Install SIGCHLD handler.
2262 * thread-db.c (thread_db_create_event, find_one_thread)
2263 (thread_db_get_tls_address): Use lwpid_of.
2264 * win32-low.c (win32_detach): Adjust to use resume_kind.
2265 (win32_wait): Add `options' argument.
2266 * spu-low.c (spu_resume): Adjust to use resume_kind.
2267 (spu_wait): Add `options' argument.
2269 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2271 Decouple target code from remote protocol.
2273 * target.h (enum target_waitkind): New.
2274 (struct target_waitstatus): New.
2275 (struct target_ops) <wait>: Return an unsigned long. Take a
2276 target_waitstatus pointer instead of a char pointer.
2278 * target.c (mywait): Change prototype to return an unsigned long.
2279 Take a target_waitstatus pointer instead of a char pointer. Adjust.
2280 * server.h (thread_from_wait, old_thread_from_wait): Delete
2282 (prepare_resume_reply): Change prototype to take a
2284 * server.c (thread_from_wait, old_thread_from_wait): Delete.
2285 (last_status, last_ptid): New.
2286 (start_inferior): Remove "statusptr" argument. Adjust. Return a
2287 pid instead of a signal.
2288 (attach_inferior): Remove "status" and "signal" parameters.
2290 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
2292 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
2293 (handle_v_requests, myresume): Remove "status" and "signal"
2295 (handle_status): New.
2296 (main): Delete local `status'. Adjust.
2297 * remote-utils.c: Include target.h.
2298 (prepare_resume_reply): Change prototype to take a
2299 target_waitstatus. Adjust.
2301 * linux-low.c (linux_wait): Adjust to new target_ops->wait
2303 * spu-low.c (spu_wait): Adjust.
2304 * win32-low.c (enum target_waitkind, struct target_waitstatus):
2306 (win32_wait): Adjust.
2308 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2310 * target.h (struct thread_resume): Delete leave_stopped member.
2311 (struct target_ops): Add a `n' argument to the `resume' callback.
2312 * server.c (start_inferior): Adjust.
2313 (handle_v_cont, myresume): Adjust.
2314 * linux-low.c (check_removed_breakpoint): Adjust to resume
2315 interface change, and to removed leave_stopped field.
2316 (resume_ptr): Delete.
2317 (struct thread_resume_array): New.
2318 (linux_set_resume_request): Add new `arg' parameter. Adjust to
2319 resume interface change.
2320 (linux_continue_one_thread, linux_queue_one_thread)
2321 (resume_status_pending_p): Check if the resume field is NULL
2322 instead of checking the leave_stopped member.
2323 (linux_resume): Adjust to the target resume interface change.
2324 * spu-low.c (spu_resume): Adjust to the target resume interface
2326 * win32-low.c (win32_detach, win32_resume): Ditto.
2328 2009-04-01 Pedro Alves <pedro@codesourcery.com>
2330 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
2332 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
2334 (linux_continue_one_thread): Only preserve the stepping flag if
2335 there's a pending breakpoint.
2337 2009-03-31 Pedro Alves <pedro@codesourcery.com>
2339 * server.c (main): After the inferior having exited, call
2340 remote_close before exiting gdbserver.
2342 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
2344 Fix size of FPSCR in Power 7 processors.
2345 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
2346 (PPC_FEATURE_HAS_DFP): New #define.
2347 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
2350 2009-03-23 Pedro Alves <pedro@codesourcery.com>
2352 * server.c (handle_query) Whitespace and formatting.
2354 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2356 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2357 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2358 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2359 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2360 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2361 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2362 Makefile.in, configure.ac: Fix whitespace throughout.
2363 * configure: Regenerate.
2365 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2367 * inferiors.c (find_inferior): Make it safe for the callback
2368 function to delete the currently iterated inferior.
2370 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2372 * Makefile.in (linuw_low_h): Move higher.
2373 (thread-db.o): Depend on $(linux_low_h).
2375 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2377 Rename "process" to "lwp" throughout.
2379 * linux-low.c (all_processes): Rename to...
2380 (all_lwps): ... this.
2381 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2382 (add_process): Rename to ...
2383 (add_lwp): ... this. Adjust.
2384 (linux_create_inferior): Adjust.
2385 (linux_attach_lwp): Adjust.
2386 (linux_attach): Adjust.
2387 (linux_kill_one_process): Rename to ...
2388 (linux_kill_one_lwp): ... this. Adjust.
2389 (linux_kill): Adjust.
2390 (linux_detach_one_process): Rename to ...
2391 (linux_detach_one_lwp): ... this. Adjust.
2392 (linux_detach): Adjust.
2393 (check_removed_breakpoint): Adjust.
2394 (status_pending_p): Adjust.
2395 (linux_wait_for_process): Rename to ...
2396 (linux_wait_for_lwp): ... this. Adjust.
2397 (linux_wait_for_event): Adjust.
2398 (send_sigstop): Adjust.
2399 (wait_for_sigstop): Adjust.
2400 (stop_all_processes): Rename to ...
2401 (stop_all_lwps): ... this.
2402 (linux_resume_one_process): Rename to ...
2403 (linux_resume_one_lwp): ... this. Adjust.
2404 (linux_set_resume_request, linux_continue_one_thread)
2405 (linux_queue_one_thread, resume_status_pending_p)
2406 (usr_store_inferior_registers, regsets_store_inferior_registers)
2407 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2409 * linux-low.h (get_process): Rename to ...
2410 (get_lwp): ... this. Adjust.
2411 (get_thread_process): Rename to ...
2412 (get_thread_lwp): ... this. Adjust.
2413 (get_process_thread): Rename to ...
2414 (get_lwp_thread): ... this. Adjust.
2415 (struct process_info): Rename to ...
2416 (struct lwp_info): ... this.
2417 (all_processes): Rename to ...
2418 (all_lwps): ... this.
2419 * proc-service.c (ps_lgetregs): Adjust.
2420 * thread-db.c (thread_db_create_event, find_one_thread)
2421 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2423 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2425 * server.c (handle_query): Handle "qAttached".
2427 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2429 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2430 GPLv3, update license URL.
2432 2009-03-01 Doug Evans <dje@google.com>
2434 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2435 (server_h): Add gdb_signals.h.
2436 (signals.o): Update.
2437 * server.h (target_signal_from_host,target_signal_to_host_p)
2438 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2440 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2442 * remote-utils.c (getpkt): Also generate remote-debug
2443 information if noack_mode is set.
2445 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2447 * server.c (handle_query): Report qXfer:siginfo:read and
2448 qXfer:siginfo:write as supported and handle them.
2449 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2450 * linux-low.c (linux_xfer_siginfo): New.
2451 (linux_target_ops): Set it.
2453 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2455 * server.c (gdbserver_usage): Mention --remote-debug.
2456 (main): Accept '--remote-debug' switch.
2458 2009-01-18 Doug Evans <dje@google.com>
2460 * regcache.c (new_register_cache): No need to check result of xcalloc.
2461 * server.c (handle_search_memory): Back out calls to xmalloc,
2462 result is checked and error is returned to user upon failure.
2463 (handle_query): Ditto. Add more checks for result of malloc.
2464 (handle_v_cont): Check result of malloc, report error back to
2466 (handle_v_run): Ditto. Call freeargv.
2467 * server.h (freeargv): Declare.
2468 * utils.c (freeargv): New fn.
2470 2009-01-15 Doug Evans <dje@google.com>
2472 * gdbreplay.c (perror_with_name): Make arg const char *.
2473 * server.h (target_signal_to_name): Make return type const char *.
2474 * thread-db.c (thread_db_err_str): Make return type const char *.
2475 * utils.c (perror_with_name): Make arg const char *.
2477 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2479 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2480 when handling a EXIT_PROCESS_DEBUG_EVENT.
2482 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2484 * gdbreplay.c (gdbreplay_version): Update copyright year.
2485 * server.c (gdbserver_version): Likewise.
2487 2009-01-05 Doug Evans <dje@google.com>
2489 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2490 (handle_extended_wait): Improve comment.
2492 2008-12-13 Doug Evans <dje@google.com>
2494 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2495 * server.h (ATTR_MALLOC): New macro.
2496 (xmalloc,xcalloc,xstrdup): Declare.
2497 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2498 * inferiors.c: Ditto.
2499 * linux-low.c: Ditto.
2500 * mem-break.c: Ditto.
2501 * regcache.c: Ditto.
2502 * remote-utils.c: Ditto.
2505 * win32-low.c: Ditto.
2507 2008-12-12 Doug Evans <dje@google.com>
2509 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2510 in debugging printf.
2512 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2514 2008-12-09 Doug Evans <dje@google.com>
2516 * linux-low.h (struct process_info): Delete member tid, unused.
2517 * thread-db.c (find_one_thread): Update.
2518 (maybe_attach_thread): Update.
2520 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2522 * target.h (struct target_ops): Add qxfer_osdata member.
2523 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2525 (linux_qxfer_osdata): New functions.
2526 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2528 * server.c (handle_query): Handle "qXfer:osdata:read:".
2529 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2530 (buffer_xml_printf): New functions.
2531 * server.h (struct buffer): New.
2532 (buffer_grow_str, buffer_grow_str0): New macros.
2533 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2534 (buffer_xml_printf): Declare.
2536 2008-11-24 Doug Evans <dje@google.com>
2538 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2540 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2542 * server.c (handle_v_run): Always use the supplied argument list.
2544 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2546 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2547 (xtensa_regmap_table): Add entry for scompare1.
2549 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2551 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2552 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2553 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2554 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2555 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2556 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2557 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2558 XML target descriptions.
2559 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2560 when inferior is running on an ISA 2.05 or later processor. Add
2561 special case to return offset for full 64-bit slot of FPSCR when
2564 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2566 * Makefile.in (SFILES, clean): Added sparc64 files.
2567 (reg-sparc64.o, reg-sparc64.c): New.
2568 * configure.srv (sparc*-*-linux*): New configuration.
2569 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2570 syscall arguments for SPARC.
2571 (regsets_store_inferior_registers): Likewise.
2572 * linux-sparc-low.c: New file.
2574 2008-10-21 Doug Evans <dje@google.com>
2576 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2577 (READLINE_DIR,READLINE_DEP): Delete.
2578 (INTERNAL_CFLAGS): Update.
2579 (LINTFLAGS): Update.
2581 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2583 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2584 whole argv from the last run, not just argv[0].
2586 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2588 * regcache.c (new_register_cache): Return NULL if the register
2589 cache size isn't known yet.
2590 (free_register_cache): Avoid dereferencing a NULL regcache.
2592 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2594 * configure.srv: Merge MIPS and MIPS64.
2596 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2598 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2600 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2602 * Makefile.in: Add required vsx dependencies.
2604 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2605 Declare init_registers_powerpc_vsx32l.
2606 Declare init_registers_powerpc_vsx64l.
2607 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2608 (ppc_arch_setup): Check for VSX in hwcap.
2609 (ppc_fill_vsxregset): New function.
2610 (ppc_store_vsxregset): New function.
2611 Add new VSX entry in regset_info target_regsets.
2613 * configure.srv: Add new VSX dependencies.
2615 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2617 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2618 (remote_open): Set or clear transport_is_reliable.
2619 (putpkt_binary): Don't expect acks in noack mode.
2620 (getpkt): Don't send ack/nac in noack mode.
2621 * server.c (handle_general_set): Handle QStartNoAckMode.
2622 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2624 (main): Reset noack_mode on every connection.
2625 * server.h (noack_mode): Declare.
2627 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2629 * Makefile.in (GDBREPLAY_OBS): New variable.
2630 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2632 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2633 Daniel Jacobowitz <dan@codesourcery.com>
2635 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2636 (usr_store_inferior_registers): Likewise.
2637 (regsets_store_inferior_registers): Likewise.
2639 2008-07-31 Rolf Jansen <rj@surtec.com>
2640 Pedro Alves <pedro@codesourcery.com>
2642 * configure.ac: Check for memmem declaration.
2643 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2644 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2645 (disable_packet_qfThreadInfo): Unconditionally compile.
2646 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2647 * configure, config.in: Regenerate.
2649 2008-07-28 Doug Kwan <dougkwan@google.com>
2651 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2652 (linux_write_memory): Remove declaration of errno.
2654 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2656 * linux-low.c (handle_extended_wait): Do not use "status"
2657 variable uninitialized.
2659 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2661 * server.c (handle_v_attach): Inhibit reporting dll changes.
2663 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2665 * remote-utils.c (prepare_resume_reply): If requested, don't
2666 output "thread:TID" in the T stop reply.
2668 * server.c (disable_packet_vCont, disable_packet_Tthread)
2669 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2670 (handle_query): If requested, disable support for qC, qfThreadInfo
2672 (handle_v_requests): If requested, disable support for vCont.
2673 (gdbserver_show_disableable): New.
2674 (main): Handle --disable-packet and --disable-packet=LIST.
2676 * server.h (disable_packet_vCont, disable_packet_Tthread)
2677 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2679 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2681 * server.c (gdbserver_usage): Mention --version.
2683 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2685 * Makefile.in (gdbreplay.o): New rule.
2687 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2689 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2690 message, not gdbserver.
2692 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2693 Nathan Sidwell <nathan@codesourcery.com>
2694 Joseph Myers <joseph@codesourcery.com>
2696 * acinclude.m4: Include ../../config/acx.m4.
2697 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2698 * configure, config.in: Regenerate.
2699 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2700 * server.c (gdbserver_version): Print PKGVERSION.
2701 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2702 (main): Adjust gdbserver_usage calls.
2703 * gdbreplay.c (version, host_name): Add declarations.
2704 (gdbreplay_version, gdbreplay_usage): New.
2705 (main): Accept --version and --help options.
2707 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2709 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2710 (arm_breakpoint_at): Handle Thumb.
2711 (the_low_target): Add comment.
2713 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2715 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2717 2008-05-09 Doug Evans <dje@google.com>
2719 * server.h (decode_search_memory_packet): Declare.
2720 * remote-utils.c (decode_search_memory_packet): New fn.
2721 * server.c (handle_search_memory_1): New fn.
2722 (handle_search_memory): New fn.
2723 (handle_query): Process qSearch:memory packets.
2725 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2727 * regcache.c (registers_length): Remove.
2728 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2729 full register packet.
2730 * regcache.h (registers_length): Remove prototype.
2731 * server.h (PBUFSIZ): Define to 16384.
2733 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2735 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2736 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2737 powerpc-64l.o, and powerpc-altivec64l.o.
2738 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2739 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2740 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2741 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2742 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2745 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2746 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2747 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2748 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2749 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2750 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2751 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2752 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2753 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2754 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2757 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2758 (init_registers_powerpc_32l): ... this new prototype.
2759 (init_registers_powerpc_32): Remove, replace by ...
2760 (init_registers_powerpc_altivec32l): ... this new prototype.
2761 (init_registers_powerpc_e500): Remove, replace by ...
2762 (init_registers_powerpc_e500l): ... this new prototype.
2763 (init_registers_ppc64): Remove, replace by ...
2764 (init_registers_powerpc_64l): ... this new prototype.
2765 (init_registers_powerpc_64): Remove, replace by ...
2766 (init_registers_powerpc_altivec64l): ... this new prototype.
2767 (ppc_num_regs): Set to 73.
2768 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2769 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2770 (ppc_cannot_store_register): Handle orig_r3 and trap.
2771 (ppc_arch_setup): Update init_registers_... calls.
2772 (ppc_fill_gregset): Handle orig_r3 and trap.
2774 * inferiors.c (clear_inferiors): Reset current_inferior.
2776 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2778 * acinclude.m4: Add override.m4.
2779 * configure: Regenerate.
2781 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2783 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2784 initial call to init_register_ppc64.
2786 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2788 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2789 powerpc*-*-linux* case.
2790 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2792 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2794 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2795 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2797 * linux-ppc-low.c: Include <elf.h>.
2798 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2799 (ppc_hwcap): New global variable.
2800 (ppc_regmap): Remove __SPE__ #ifdef sections.
2801 (ppc_regmap_e500): New global variable.
2802 (ppc_cannot_store_register): Update __SPE__ special case.
2803 (ppc_get_hwcap): New function.
2804 (ppc_arch_setup): Use it to determine whether inferior supports
2805 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2806 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2807 Do not access registers if target does not support AltiVec.
2808 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2809 Do not access registers if target does not support SPE.
2810 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2812 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2814 * linux-low.c (disabled_regsets, num_regsets): New.
2815 (use_regsets_p): Delete.
2816 (linux_wait_for_process): Clear disabled_regsets.
2817 (regsets_fetch_inferior_registers): Check and set it.
2818 (regsets_store_inferior_registers): Likewise.
2819 (linux_fetch_registers, linux_store_registers): Do not use
2821 (initialize_low): Allocate disabled_regsets.
2823 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2825 * Makefile.in (LIBOBJS): New.
2827 (memmem.o): New rule.
2828 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2829 * configure: Regenerated.
2831 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2833 * server.c (handle_query): Never return "unsupported" for
2834 qXfer:features:read queries.
2836 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2838 * server.c (get_features_xml): Fix inverted condition.
2839 (handle_query): Always support qXfer:feature:read.
2841 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2843 * server.c (wrapper_argv): New.
2844 (start_inferior): Handle wrapper_argv. If set, expect an extra
2846 (gdbserver_usage): Document --wrapper.
2847 (main): Parse --wrapper.
2849 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2851 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2852 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2853 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2854 (ppc_set_pc): Likewise.
2855 (ppc_arch_setup): New function.
2856 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2857 of collect_register.
2858 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2860 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2862 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2863 instead of linux-ppc64-low.o.
2864 * linux-ppc64-low.c: Remove file.
2865 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2866 (linux-ppc64-low.o): Remove rule.
2868 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2869 (init_registers_powerpc_64): Likewise.
2870 (ppc_regmap): Conditionally define depending on __powerpc64__.
2871 (ppc_cannot_store_register): Do not special-case "fpscr" when
2872 compiled on __powerpc64__.
2873 (ppc_collect_ptrace_register): New function.
2874 (ppc_supply_ptrace_register): New function.
2875 (ppc_breakpoint): Change type to "unsigned int".
2876 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2877 (the_low_target): Conditionally provide initializers for the
2878 arch_setup member depending on __powerpc64__. Install
2879 collect_ptrace_register and supply_ptrace_register members.
2881 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2883 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2884 * server.c (gdbserver_xmltarget): Define.
2885 (get_features_xml): Use it to replace "target.xml" and arch_string.
2887 * configure.srv: Remove srv_xmltarget. Add XML files that were
2888 mentioned there to srv_xmlfiles instead. Remove conditional tests
2889 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2890 srv_xmlfiles and srv_regobj to include all possible choices.
2891 * configure.ac (srv_xmltarget): Remove.
2892 (srv_xmlfiles): Do not add "target.xml".
2893 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2894 checks for supplementary target information.
2895 * configure: Regenerate.
2896 * Makefile.in (XML_TARGET): Remove.
2897 (target.xml): Remove rule.
2898 (clean): Do not clean up target.xml.
2899 (.PRECIOUS): Do not mention target.xml.
2901 * target.h (struct target_ops): Remove arch_string member.
2902 * linux-low.c (linux_arch_string): Remove.
2903 (linux_target_ops): Remove arch_string initializer.
2904 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2905 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2906 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2907 * spu-low.c (spu_arch_string): Remove.
2908 (spu_target_ops): Remove arch_string initializer.
2909 * win32-low.c (win32_arch_string): Remove.
2910 (win32_target_ops): Remove arch_string initializer.
2911 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2912 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2913 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2915 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2917 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2918 by collect_ptrace_register and supply_ptrace_register hooks.
2919 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2920 instead of checking for the_low_target.left_pad_xfer.
2921 (usr_store_inferior_registers): Use collect_ptrace_register callback
2922 instead of checking for the_low_target.left_pad_xfer.
2924 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2925 (s390_supply_ptrace_register): Likewise.
2926 (s390_fill_gregset): Call s390_collect_ptrace_register.
2927 (the_low_target): Update.
2929 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2930 (ppc_supply_ptrace_register): Likewise.
2931 (the_low_target): Update.
2933 * linux-i386-low.c (the_low_target): Update.
2934 * linux-x86-64-low.c (the_low_target): Update.
2936 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2938 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2939 reg-s390.o and reg-s390x.o.
2941 * linux-low.c (new_inferior): New global variable.
2942 (linux_create_inferior, linux_attach): Set it.
2943 (linux_wait_for_process): Call the_low_target.arch_setup after the
2944 target has stopped for the first time.
2945 (initialize_low): Do not call the_low_target.arch_setup.
2947 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2948 (s390_set_pc): Likewise.
2949 (s390_arch_setup): New function.
2950 (the_low_target): Use s390_arch_setup as arch_setup routine.
2952 * regcache.c (realloc_register_cache): New function.
2953 (set_register_cache): Call it for each existing regcache.
2955 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2957 * server.h (init_registers): Remove prototype.
2959 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2960 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2961 instead of init_registers ().
2962 * linux-arm-low.c (init_registers_arm): Add prototype.
2963 (init_registers_arm_with_iwmmxt): Likewise.
2964 (the_low_target): Add initializer for arch_setup field.
2965 * linux-cris-low.c (init_registers_cris): Add prototype.
2966 (the_low_target): Add initializer for arch_setup field.
2967 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2968 (the_low_target): Add initializer for arch_setup field.
2969 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2970 (the_low_target): Add initializer for arch_setup field.
2971 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2972 (the_low_target): Add initializer for arch_setup field.
2973 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2974 (the_low_target): Add initializer for arch_setup field.
2975 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2976 (the_low_target): Add initializer for arch_setup field.
2977 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2978 (init_registers_mips64_linux): Likewise.
2979 (the_low_target): Add initializer for arch_setup field.
2980 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2981 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2982 (the_low_target): Add initializer for arch_setup field.
2983 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2984 (init_registers_powerpc_64): Likewise.
2985 (the_low_target): Add initializer for arch_setup field.
2986 * linux-s390-low.c (init_registers_s390): Add prototype.
2987 (init_registers_s390x): Likewise.
2988 (the_low_target): Add initializer for arch_setup field.
2989 * linux-sh-low.c (init_registers_sh): Add prototype.
2990 (the_low_target): Add initializer for arch_setup field.
2991 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2992 (the_low_target): Add initializer for arch_setup field.
2993 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2994 (the_low_target): Add initializer for arch_setup field.
2996 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2997 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2998 instead of init_registers ().
2999 * win32-arm-low.c (init_registers_arm): Add prototype.
3000 (the_low_target): Add initializer for arch_setup field.
3001 * win32-i386-low.c (init_registers_i386): Add prototype.
3002 (the_low_target): Add initializer for arch_setup field.
3004 * spu-low.c (init_registers_spu): Add prototype.
3005 (initialize_low): Call initialie_registers_spu () instead of
3006 initialize_registers ().
3008 2008-02-19 Pedro Alves <pedro@codesourcery.com>
3010 * server.c (handle_v_requests): When handling the vRun and vAttach
3011 packets, if already debugging a process, don't kill it. Return an
3014 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
3016 * server.c (handle_query): Correct length check.
3018 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
3020 * win32-low.c (do_initial_child_stuff): Add process handle
3021 parameter. Set current_process_handle and current_process_id from the
3022 parameters. Clear globals.
3023 (win32_create_inferior): Don't set current_process_handle and
3024 current_process_id here. Instead pass them on the call to
3025 do_initial_child_stuff.
3026 (win32_attach): Likewise.
3027 (win32_clear_inferiors): New.
3028 (win32_kill): Don't close the current process handle or the
3029 current thread handle here. Instead call win32_clear_inferiors.
3030 (win32_detach): Don't open a new handle to the process. Call
3031 win32_clear_inferiors.
3032 (win32_join): Don't rely on current_process_handle; open a new
3033 handle using the process id.
3034 (win32_wait): Call win32_clear_inferiors when the inferior process
3037 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
3039 * server.c (monitor_show_help): Add "exit".
3041 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
3043 * Makefile.in (SFILES): Add linux-xtensa-low.c.
3044 (clean): Add reg-xtensa.c.
3045 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
3046 * configure.srv (xtensa*-*-linux*) New target.
3047 * linux-xtensa-low.c: New.
3048 * xtensa-xtregs.c: New.
3050 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
3052 * hostio.c: Don't include errno.h.
3053 (errno_to_fileio_errno): Move to hostio-errno.
3054 * hostio.c: (hostio_error): Remove the error parameter. Defer the
3055 error number outputting to the target->hostio_last_error callback.
3056 (hostio_packet_error): Use FILEIO_EINVAL directly.
3057 (handle_open, handle_pread, hostio_error, handle_unlink): Update
3058 calls to hostio_error.
3059 * hostio-errno.c: New.
3060 * server.h (hostio_last_error_from_errno): Declare.
3061 * target.h (target_ops): Add hostio_last_error member.
3062 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
3063 as hostio_last_error handler.
3064 * spu-low.c (spu_target_ops): Likewise.
3065 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
3066 (wince_hostio_last_error): New functions.
3067 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
3068 as hostio_last_error handler.
3069 (win32_target_ops) [!_WIN32_WCE]: Register
3070 hostio_last_error_from_errno as hostio_last_error handler.
3071 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
3072 (hostio-errno.o): New rule.
3073 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
3074 * configure.srv (srv_hostio_err_objs): New variable. Default to
3076 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
3077 * configure: Regenerate.
3079 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3081 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
3082 (linux_kill, linux_detach): Clean up the process list.
3083 * remote-utils.c (remote_open): Improve port number parsing.
3084 (putpkt_binary, input_interrupt): Only send interrupts if the target
3086 * server.c (extended_protocol): Make static.
3087 (attached): Define earlier.
3088 (exit_requested, response_needed, program_argv): New variables.
3089 (target_running): New.
3090 (start_inferior): Clear attached here.
3091 (attach_inferior): Set attached here.
3092 (require_running): Define.
3093 (handle_query): Use require_running and target_running. Implement
3095 (handle_v_attach, handle_v_run): New.
3096 (handle_v_requests): Use require_running. Handle vAttach and vRun.
3097 (gdbserver_usage): Update.
3098 (main): Redo argument parsing. Handle --debug and --multi. Handle
3099 --attach along with other options or after the port. Save
3100 program_argv. Support no initial program. Resynchronize
3101 communication with GDB after an error. Handle "monitor exit".
3102 Use require_running and target_running. Always allow the extended
3103 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
3104 restart in extended mode.
3105 * README: Refer to the GDB manual. Update --attach usage.
3107 2007-12-20 Andreas Schwab <schwab@suse.de>
3109 * linux-low.c (STACK_SIZE): Define.
3110 (linux_tracefork_child): Use it. Use __clone2 on ia64.
3111 (linux_test_for_tracefork): Likewise.
3113 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
3115 * linux-low.c (linux_wait_for_event): Update messages. Do not
3116 reinsert auto-delete breakpoints.
3117 * mem-break.c (struct breakpoint): Change return type of handler to
3119 (set_breakpoint_at): Update handler type.
3120 (reinsert_breakpoint_handler): Return 1 instead of calling
3122 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
3124 (check_breakpoints): Delete auto-delete breakpoints and return 2.
3125 * mem-break.h (set_breakpoint_at): Update handler type.
3126 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
3127 * win32-low.c (auto_delete_breakpoint): New.
3128 (get_child_debug_event): Use it.
3130 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
3132 * configure.ac: Check for pread and pwrite.
3133 * hostio.c (handle_pread): Fall back to lseek and read.
3134 (handle_pwrite): Fall back to lseek and write.
3135 * config.in, configure: Regenerated.
3137 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
3139 * server.c (myresume): Add own_buf argument.
3140 (main): Update calls.
3142 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
3144 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
3145 * remote-utils.c (remote_open): Do not call disable_async_io.
3146 (block_async_io): Delete.
3147 (unblock_async_io): Make static.
3148 (initialize_async_io): New.
3149 * server.c (handle_v_cont): Handle async I/O here.
3150 (myresume): Likewise. Move other common resume tasks here...
3151 (main): ... from here. Call initialize_async_io. Disable async
3152 I/O before the main loop.
3153 * server.h (initialize_async_io): Declare.
3154 (block_async_io, unblock_async_io): Delete prototypes.
3155 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
3157 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
3159 * remote-utils.c (readchar): Allow binary data in received messages.
3161 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3163 * win32-low.c (attaching): New global.
3164 (win32_create_inferior): Clear the `attaching' global.
3165 (win32_attach): Set the `attaching' global.
3166 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
3167 attaching. Only set a breakpoint at the entry point if not
3170 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3172 * server.c (main): Don't report dll events on the initial
3173 connection on attaches.
3175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3177 * server.c (main): Relax numerical bases supported for the pid of
3178 the --attach command line argument.
3180 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3182 * win32-low.c (win32_attach): Call OpenProcess before
3183 DebugActiveProcess, not after. Add last error output to error
3186 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
3188 * win32-low.c (win32_get_thread_context)
3189 (win32_set_thread_context): New functions.
3190 (thread_rec): Use win32_get_thread_context.
3191 (continue_one_thread, win32_resume): Use win32_set_thread_context.
3192 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
3195 2007-12-03 Leo Zayas
3196 Pedro Alves <pedro_alves@portugalmail.pt>
3198 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
3200 (child_add_thread): Minor cleanup.
3201 (child_continue): Resume artificially suspended threads before
3202 calling ContinueDebugEvent.
3203 (suspend_one_thread): New.
3204 (fake_breakpoint_event): New.
3205 (get_child_debug_event): Change return type to int. Check here if
3206 gdb sent an interrupt request. If a soft interrupt was requested,
3207 fake a breakpoint event. Return 0 if there is no event to handle,
3209 (win32_wait): Don't check here if gdb sent an interrupt request.
3210 Ensure there is a valid event to handle.
3211 (win32_request_interrupt): Add soft interruption method as last
3214 2007-12-03 Leo Zayas
3215 Pedro Alves <pedro_alves@portugalmail.pt>
3217 * win32-low.h (win32_thread_info): Add descriptions to the
3218 structure members. Replace `suspend_count' counter by a
3220 * win32-low.c (thread_rec): Update condition of when to get the
3221 context from the inferior. Rely on ContextFlags being set if it
3222 has already been retrieved. Only suspend the inferior thread if
3223 we haven't already. Warn if that fails.
3224 (continue_one_thread): s/suspend_count/suspended/. Only call
3225 ResumeThread once. Warn if that fails.
3227 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3229 * win32-low.c (win32_wait): Don't read from the inferior when it
3232 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
3234 * Makefile.in (win32_low_h): New variable.
3235 (win32-low.o): Add dependency on $(win32_low_h).
3236 (win32-arm-low.o, win32-i386-low.o): New rules.
3238 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3240 * hostio.c: Correct copyright year.
3242 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
3244 * Makefile.in (OBS): Add hostio.o.
3245 (hostio.o): New rule.
3246 * server.h (handle_vFile): Declare.
3247 * hostio.c: New file.
3248 * server.c (handle_v_requests): Take packet_len and new_packet_len
3249 for binary packets. Call handle_vFile.
3250 (main): Update call to handle_v_requests.
3252 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
3254 * linux-low.c: Include <sched.h>.
3256 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
3258 * linux-low.c (linux_tracefork_grandchild): New.
3259 (linux_tracefork_child): Use clone.
3260 (linux_test_for_tracefork): Use clone; allocate and free a stack.
3262 2007-10-31 Joel Brobecker <brobecker@adacore.com>
3264 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
3266 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
3268 * linux-low.c (handle_extended_wait): Handle unexpected signals.
3270 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
3272 * inferiors.c (change_inferior_id): Delete.
3273 (add_pid_to_list, pull_pid_from_list): New.
3274 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
3275 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
3276 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
3277 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
3278 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
3279 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
3280 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
3281 (using_threads): Always set to 1.
3282 (handle_extended_wait): New.
3283 (add_process): Do not set TID.
3284 (linux_create_inferior): Set must_set_ptrace_flags.
3285 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
3286 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
3287 (linux_thread_alive): Rename TID argument to LWPID.
3288 (linux_wait_for_process): Handle unknown processes. Do not use TID.
3289 (linux_wait_for_event): Do not use TID or check using_threads. Update
3290 call to dead_thread_notify. Call handle_extended_wait.
3291 (linux_create_inferior): Use PTRACE_SETOPTIONS.
3292 (send_sigstop): Delete sigstop_sent.
3293 (wait_for_sigstop): Avoid TID.
3294 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
3295 (linux_test_for_tracefork): New.
3296 (linux_lookup_signals): Use thread_db_active and
3297 linux_supports_tracefork_flag.
3298 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
3299 * linux-low.h (get_process_thread): Avoid TID.
3300 (struct process_ifo): Move thread_known and tid to the end. Remove
3302 (linux_attach_lwp, thread_db_init): Update prototypes.
3303 * server.h (change_inferior_id): Delete prototype.
3304 (add_pid_to_list, pull_pid_from_list): New prototypes.
3305 * thread-db.c (thread_db_use_events): New.
3306 (find_first_thread): Rename to...
3307 (find_one_thread): ...this. Update callers and messages. Do not
3308 call fatal. Check thread_db_use_events. Do not call
3309 change_inferior_id or new_thread_notify.
3310 (maybe_attach_thread): Update. Do not call new_thread_notify.
3311 (thread_db_init): Set thread_db_use_events. Check use_events.
3312 * utils.c (fatal, warning): Correct message prefix.
3314 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
3316 * Makefile.in (clean): Remove new files.
3317 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
3318 (powerpc-64.o, powerpc-64.c): New rules.
3319 * configure.srv: Use alternate register sets for powerpc64-*-linux*
3320 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
3322 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
3324 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
3325 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
3326 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
3327 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
3328 (target_regsets): Add AltiVec and SPE register sets.
3329 * configure.ac: Check for AltiVec and SPE.
3330 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
3331 (ppc_fill_vrregset, ppc_store_vrregset): New.
3332 (target_regsets): Add AltiVec register set.
3333 * configure: Regenerated.
3335 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3337 * linux-low.c (O_LARGEFILE): Define.
3338 (linux_read_memory): Use /proc/PID/mem.
3339 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
3340 * configure, config.in: Regenerated.
3342 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
3344 * linux-low.c (linux_wait_for_event): Do not pass signals while
3347 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3349 * win32-low.c (create_process): New.
3350 (win32_create_inferior): Use create_process instead of
3351 CreateProcess. If create_process failed retry appending an ".exe"
3352 suffix. Store the GetLastError result immediatelly after
3353 create_process calls and use it on the call to error.
3355 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3357 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3359 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3361 * configure.ac: Switch license to GPLv3.
3363 2007-08-01 Michael Snyder <msnyder@access-company.com>
3365 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3367 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3369 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3371 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3372 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3373 CloseToolhelp32Snapshot.
3374 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3375 CloseToolhelp32Snapshot.
3377 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3379 * server.c (main): Check for inferior exit before main loop.
3381 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3383 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3384 instead of on tmp_desc.
3386 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3387 Daniel Jacobowitz <dan@codesourcery.com>
3389 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3390 (add_thread): Minor cleanups.
3391 (clear_inferiors): Move lower in the file. Clear the DLL
3393 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3394 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3395 (xml_escape_text): New.
3396 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3398 (handle_v_cont): Report errors.
3399 (gdbserver_version): Update.
3400 (main): Correct size of own_buf. Do not report initial DLL events.
3401 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3402 (unloaded_dll, xml_escape_text): New.
3403 * win32-low.c (enum target_waitkind): Update comments.
3404 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3405 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3406 (win32_EnumProcessModules, win32_GetModuleInformation)
3407 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3408 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3409 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3410 (win32_Module32First, win32_Module32Next, load_toolhelp)
3411 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3412 (get_child_debug_event): Handle DLL events.
3413 (win32_wait): Likewise.
3415 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3417 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3418 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3420 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3422 * win32-low.c (handle_output_debug_string): Ignore event if not
3425 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3427 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3429 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3431 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3433 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3435 * inferiors.c (change_inferior_id): Add comment.
3436 * linux-low.c (check_removed_breakpoint): Add an early
3437 prototype. Improve debug output.
3438 (linux_attach): Doc update.
3439 (linux_detach_one_process, linux_detach): Clean up before releasing
3441 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3442 * linux-low.h (struct process_info): Doc improvement.
3443 * mem-break.c (delete_all_breakpoints): New.
3444 * mem-break.h (delete_all_breakpoints): New prototype.
3445 * thread-db.c (find_first_thread): New.
3446 (thread_db_create_event): Call it instead of
3447 thread_db_find_new_threads. Clean up unused variables.
3448 (maybe_attach_thread): Remove first thread handling.
3449 (thread_db_find_new_threads): Use find_first_thread.
3450 (thread_db_get_tls_address): Likewise.
3452 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3454 * thread-db.c (thread_db_find_new_threads): Add prototype.
3455 (thread_db_create_event): Check for the main thread before adding
3457 (maybe_attach_thread): Only enable event reporting if TID == 0.
3458 (thread_db_get_tls_address): Check for new threads.
3460 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3462 * linux-low.c (linux_create_inferior): Try execv before execvp.
3463 * spu-low.c (spu_create_inferior): Likewise.
3465 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3467 * linux-low.c (linux_create_inferior): Change execv to execvp.
3468 * spu-low.c (spu_create_inferior): Likewies.
3470 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3472 * Makefile.in (clean): Clean new files instead of deleted ones.
3473 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3474 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3476 * configure.srv: Specify XML files and new regformats for MIPS and
3478 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3479 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3480 an entry for the restart register.
3481 (mips_cannot_fetch_register, mips_cannot_store_register)
3482 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3483 register names to match the XML descriptions.
3484 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3485 restart register instead of $0.
3487 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3488 Markus Deuling <deuling@de.ibm.com>
3490 * remote-utils.c (decode_xfer_write): New function.
3491 * server.h (decode_xfer_write): Add prototype.
3492 * server.c (handle_query): Add PACKET_LEN argument. Support
3493 qXfer:spu:read and qXfer:spu:write packets.
3494 (main): Pass packet_len to handle_query.
3495 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3496 * target.h (target_ops): Add qxfer_spu.
3498 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3500 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3501 accessing non-seekable spufs files.
3503 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3505 * server.c (handle_query): Add reply for qC packet.
3507 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3508 Leo Zayas <lerele@champenstudios@com>
3510 * server.h (check_remote_input_interrupt_request): New function.
3511 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3512 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3513 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3514 (check_remote_input_interrupt_request): New function.
3515 * server.h (check_remote_input_interrupt_request): Declare.
3516 * win32-low.c (winapi_DebugBreakProcess,
3517 winapi_GenerateConsoleCtrlEvent): New typedefs.
3518 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3520 (win32_wait): Check for remote interrupt request
3521 with check_remote_input_interrupt_request.
3522 (win32_request_interrupt): New function.
3523 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3525 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3527 * win32-low.c (debug_registers_changed,
3528 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3529 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3530 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3531 (thread_rec): Get context using the low target.
3532 (child_add_thread): Call thread_added on the low target,
3533 which does the same thing.
3535 (do_initial_child_stuff): Remove debug registers references.
3536 Set context using the low target. Resume threads after
3537 setting the contexts.
3538 (child_continue): Remove dead variable. Remove debug
3539 registers references.
3540 (child_fetch_inferior_registers): Go through the low target.
3541 (do_child_store_inferior_registers): Remove.
3542 (child_store_inferior_registers): Go through the low target.
3543 (win32_resume): Remove debug registers references.
3544 Set context using the low target.
3545 (handle_exception): Change return type to void. Don't record
3546 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3547 first chance exception.
3548 (get_child_debug_event): Change return type to void. Remove
3549 goto loop. Always return after waiting for debug event.
3550 (win32_wait): Convert to switch statement. Handle spurious
3553 * win32-i386-low.c (debug_registers_changed,
3554 debug_registers_used): New.
3555 (initial_stuff): Rename to ...
3556 (i386_initial_stuff): ... this. Clear debug registers
3558 (store_debug_registers): Delete.
3559 (i386_get_thread_context): New.
3560 (load_debug_registers): Delete.
3561 (i386_set_thread_context): New.
3562 (i386_thread_added): New.
3563 (single_step): Rename to ...
3564 (i386_single_step): ... this.
3565 (do_fetch_inferior_registers): Rename to ...
3566 (i386_fetch_inferior_register): ... this.
3567 (i386_store_inferior_register): New.
3568 (the_low_target): Adapt to new interface.
3570 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3571 (arm_get_thread_context): New.
3572 (arm_set_thread_context): New.
3574 (do_fetch_inferior_registers): Rename to ...
3575 (arm_fetch_inferior_register): ... this.
3576 (arm_store_inferior_register): New.
3577 (arm_wince_breakpoint): Reimplement as unsigned long.
3578 (arm_wince_breakpoint_len): Define.
3579 (the_low_target): Adapt to new interface.
3581 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3582 load_debug_registers. Add get_thread_context, set_thread_context,
3583 thread_added and store_inferior_register. Rename
3584 fetch_inferior_registers to fetch_inferior_register.
3585 (regptr): Remove declaration.
3587 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3589 * linux-low.c (linux_detach): Change return type to int. Return 0.
3590 * spu-low.c (spu_detach): Likewise.
3592 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3594 * target.h (target_ops): Change return type of detach to int.
3596 (join_inferior): New.
3597 * server.c (main): Don't skip detach support on mingw32.
3598 If the inferior doesn't support detaching return error.
3599 Call join_inferior instead of using waitpid.
3600 * linux-low.c (linux_join): New.
3601 (linux_target_op): Add linux_join.
3602 * spu-low.c (spu_join): New.
3603 (spu_target_ops): Add spu_join.
3604 * win32-low.c (win32_detach): Adapt to new interface.
3605 Reopen current_process_handle before detaching. Issue a child
3606 resume before detaching.
3608 (win32_target_op): Add win32_join.
3610 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3612 * win32-low.c (win32-attach): Fix return value.
3613 * target.h (target_ops): Describe ATTACH return values.
3615 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3617 * win32-low.c (GETPROCADDRESS): Define.
3618 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3619 (winapi_DebugSetProcessKillOnExit): Likewise.
3620 (win32_create_inferior): Force usage of ansi CreateProcessA.
3621 (win32_attach): Use GETPROCADDRESS.
3622 (win32_detach): Likewise.
3624 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3626 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3628 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3630 * win32-low.c: Commit leftover changes from 2007-03-29.
3632 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3634 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3635 fields short instead of int. Add explicit padding.
3636 (i387_cache_to_fsave): Remove unnecessary casts.
3637 (i387_fsave_to_cache): Doc fix.
3638 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3640 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3642 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3643 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3645 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3647 * configure.srv (arm*-*-mingw32ce*): Move near the other
3650 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3652 * configure.ac: Add errno checking.
3653 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3654 sys/file.h and malloc.h.
3655 (AC_CHECK_DECLS): Add perror.
3656 (srv_mingwce): Handle.
3657 * configure.srv (i[34567]86-*-cygwin*): Add
3658 win32-i386-low.o to srv_tgtobj.
3659 (i[34567]86-*-mingw*): Likewise.
3660 (arm*-*-mingw32ce*): Add case.
3661 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3662 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3663 [__MINGW32CE__] (strerror): New function.
3664 [__MINGW32CE__] (errno): Define to GetLastError.
3665 [__MINGW32CE__] (COUNTOF): New macro.
3666 (remote_open): Remove extra close call.
3667 * mem-break.c (delete_breakpoint_at): New function.
3668 * mem-break.h (delete_breakpoint_at): Declare.
3669 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3670 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3671 [USE_WIN32API] (read, write): Add char* casts.
3672 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3673 * server.h: Include wincecompat.h on Windows CE.
3674 [HAVE_ERRNO_H]: Check.
3675 (perror): Declare if not declared.
3676 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3677 (perror_with_name): Remove errno declaration.
3678 * wincecompat.h: New.
3679 * wincecompat.c: New.
3681 * win32-arm-low.c: New.
3682 * win32-i386-low.c: New.
3683 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3684 (OUTMSG2): Make it safe.
3686 (COUNTOF): New macro.
3687 (NUM_REGS): Get it from the low target.
3688 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3689 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3690 (thread_rec): Let low target handle debug registers.
3691 (child_add_thread): Likewise.
3692 (child_init_thread_list): Likewise.
3693 (continue_one_thread): Likewise.
3695 (do_child_fetch_inferior_registers): Move to ...
3696 * win32-i386-low.c: ... here, and rename to ...
3697 (do_fetch_inferior_registers): ... this.
3698 * win32-low.c (child_fetch_inferior_registers):
3699 Go through the low target.
3700 (do_child_store_inferior_registers): Use regptr.
3701 (strwinerror): New function.
3702 (win32_create_inferior): Handle Windows CE.
3703 Use strwinerror instead of strerror on Windows error
3704 codes. Add program to the error output.
3705 Don't close the main thread handle on Windows CE.
3706 (win32_attach): Use coredll.dll on Windows CE.
3707 (win32_kill): Close current process and current
3709 (win32_detach): Use coredll.dll on Windows CE.
3710 (win32_resume): Let low target handle debug registers, and
3712 (handle_exception): Add/Remove initial breakpoint. Avoid
3713 non-existant WSTOPSIG on Windows CE.
3714 (win32_read_inferior_memory): Cast to remove warning.
3715 (win32_arch_string): Go through the low target.
3716 (initialize_low): Call set_breakpoint_data with the low
3717 target's breakpoint.
3718 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3719 FOP_REGNUM, mappings): Move to ...
3720 * win32-i386-low.c: ... here.
3721 * win32-low.c (win32_thread_info): Move to ...
3722 * win32-low.h: ... here.
3723 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3724 win32-arm-low.c and wincecompat.c.
3725 (all:): Add $EXEEXT.
3726 (install-only:): Likewise.
3727 (gdbserver:): Likewise.
3728 (gdbreplay:): Likewise.
3729 * config.in: Regenerate.
3730 * configure: Regenerate.
3732 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3734 * win32-low.c: Rename typedef thread_info to
3735 win32_thread_info throughout.
3737 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3739 * win32-i386-low.c: Rename to ...
3740 * win32-low.c: ... this.
3741 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3742 * Makefile.in: Likewise.
3744 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3746 * remote-utils.c (monitor_output): Constify msg parameter.
3747 * server.h (monitor_output): Likewise.
3748 * win32-i386-low.c (handle_output_debug_string): New.
3749 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3750 handle_output_debug_string.
3751 (get_child_debug_event): Likewise.
3753 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3755 * server.c (main): Correct strtoul check.
3757 2007-03-27 Jon Ringle <jon@ringle.org>
3759 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3761 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3763 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3765 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3767 * terminal.h: Check HAVE_SGTTY_H.
3769 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3771 * remote-utils.c (remote_open): Print out the assigned port number.
3773 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3775 * remote-utils.c (monitor_output): New function.
3776 * server.c (debug_threads): Define here.
3777 (monitor_show_help): New function.
3778 (handle_query): Handle qRcmd.
3779 (main): Do not handle 'd' packet.
3780 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3781 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3784 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3786 * Makefile.in (EXEEXT): New.
3787 (clean): Use $(EXEEXT).
3789 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3791 * target.h (target_ops): Rename send_signal to request_interrupt,
3792 and remove enum target_signal parameter.
3793 * linux-low.c (linux_request_interrupt): Rename from
3794 linux_send_signal, and always send SIGINT.
3795 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3796 and always send SIGINT.
3797 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3799 (input_interrupt): Likewise.
3801 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3803 * server.c (get_features_xml): Check if target implemented
3805 * win32-i386-low.c (win32_arch_string): New.
3806 (win32_target_ops): Add win32_arch_string as arch_string member.
3808 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3810 * spu-low.c (spu_arch_string): New.
3811 (spu_target_ops): Add spu_arch_string.
3813 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3815 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3816 * configure.ac: Do not check for terminal.h.
3817 * configure, config.in: Regenerated.
3819 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3821 * Makefile.in (OBS): Add $(XML_BUILTIN).
3822 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3824 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3825 (arm-with-iwmmxt.c): New.
3826 * config.in, configure: Regenerate.
3827 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3828 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3829 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3830 (arm*-*-linux*): Add iWMMXt and regset support.
3831 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3832 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3833 (arm_store_wmmxregset, target_regsets): New.
3834 * server.c (get_features_xml): Take annex argument. Check builtin
3836 (handle_query): Handle multiple annexes.
3838 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3840 * remote-utils.c [USE_WIN32API] (read, write): Define.
3841 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3844 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3846 * linux-i386-low.c (the_low_target): Set arch_string.
3847 * linux-x86-64-low.c (the_low_target): Likewise.
3848 * linux-low.c (linux_arch_string): New.
3849 (linux_target_ops): Add it.
3850 * linux-low.h (struct linux_target_ops): Add arch_string.
3851 * server.c (write_qxfer_response): Use const void * for DATA.
3852 (get_features_xml): New.
3853 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3854 * target.h (struct target_ops): Add arch_string method.
3856 2007-01-03 Denis Pilat <denis.pilat@st.com>
3857 Daniel Jacobowitz <dan@codesourcery.com>
3859 * linux-low.c (linux_kill): Handle being called with no threads.
3860 * win32-i386-low.c (win32_kill): Likewise.
3861 (get_child_debug_event): Clear current_process_handle.
3863 2006-12-30 Denis PILAT <denis.pilat@st.com>
3864 Daniel Jacobowitz <dan@codesourcery.com>
3866 * remote-utils.c (remote_open): Check the type of specified
3867 serial port devices before opening them.
3868 * server.c (main): Kill the inferior if an error occurs during
3869 the first remote_open.
3871 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3873 * README: Update supported targets.
3875 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3877 * Makefile.in (clean): Remove reg-mips64.c.
3878 (reg-mips64.c, reg-mips64.o): New rules.
3879 * configure.srv: Handle mips64. Include regset support for mips.
3880 * linux-mips-low.c (union mips_register): New.
3881 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3882 (mips_breakpoint, mips_breakpoint_at): Use int.
3883 (mips_collect_register, mips_supply_register)
3884 (mips_collect_register_32bit, mips_supply_register_32bit)
3885 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3886 (mips_store_fpregset, target_regsets): New.
3887 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3889 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3891 * configure.srv: Add target "spu*-*-*".
3892 * Makefile.in (clean): Remove reg-spu.c.
3893 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3894 * spu-low.c: New file.
3896 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3898 * configure.ac: Correct td_thr_tls_get_addr test.
3899 * configure: Regenerated.
3901 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3903 * linux-low.c (linux_wait_for_event): Reformat. Use the
3905 * remote-utils.c (decode_address_to_semicolon): New.
3906 * server.c (pass_signals, handle_general_set): New.
3907 (handle_query): Mention QPassSignals for qSupported.
3908 (main): Call handle_general_set.
3909 * server.h (pass_signals, decode_address_to_semicolon): New.
3911 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3913 * server.c (handle_query): Correct error handling for read_auxv.
3915 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3917 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3918 and srv_linux_thread_db to yes.
3919 * linux-s390-low.c (s390_fill_gregset): New function.
3920 (target_regsets): Define data structure.
3922 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3924 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3925 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3926 * config.in, configure: Regenerated.
3927 * inferiors.c (gdb_id_to_thread): New function.
3928 (gdb_id_to_thread_id): Use it.
3929 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3930 * linux-low.h (struct process_info): Add th member.
3931 (thread_db_get_tls_address): New prototype.
3932 * remote-utils.c (decode_address): Make non-static.
3933 * server.c (handle_query): Handle qGetTLSAddr.
3934 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3935 * target.h (struct target_ops): Add get_tls_address.
3936 * thread-db.c (maybe_attach_thread): Save the thread handle.
3937 (thread_db_get_tls_address): New.
3939 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3941 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3942 (linux_resume_one_process): Take a siginfo_t *. Update all
3943 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3944 (struct pending_signals): Add a siginfo_t.
3945 (linux_wait_for_process): Always set last_status.
3946 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3947 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3948 * linux-low.h (struct process_info): Add last_status.
3950 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3952 * remote-utils.c (try_rle): New function.
3953 (putpkt_binary): Use it.
3955 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3957 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3958 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3959 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3960 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3961 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3964 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3966 * server.c (terminal_fd): New variable.
3967 (old_foreground_pgrp): Likewise.
3968 (restore_old_foreground_pgrp): New function.
3969 (start_inferior): Record the terminal file descriptor in terminal_fd
3970 and its original foreground group in old_foreground_pgrp. Register
3971 restore_old_foreground_pgrp with atexit().
3973 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3975 * server.c (handle_query): Correct qPart to qXfer.
3977 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3979 * configure.ac: Check for more headers which are missing on
3980 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3981 * configure.srv: Add Cygwin and mingw32.
3982 * remote-utils.c: Don't include headers unconditionally which
3983 are missing on mingw32. Include <winsock.h> for mingw32.
3984 (remote_open): Adjust for mingw32 support. Flush
3985 standard error after writing to it.
3986 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3987 (unblock_async_io, enable_async_io, disable_async_io)
3988 (readchar, getpkt): Update for Winsock support.
3989 (prepare_resume_reply): Expect a protocol signal number.
3990 * server.c: Disable <sys/wait.h> on mingw32.
3991 (start_inferior): Adjust for mingw32 support. Flush
3992 standard error after writing to it.
3993 (attach_inferior): Likewise. Use protocol signal
3995 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3997 * win32-i386-low.c: New file.
3998 * Makefile.in (XM_CLIBS): Set.
3999 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
4000 (win32-i386-low.o): New dependency rule.
4001 * linux-low.c (linux_wait): Use target signal numbers.
4002 * target.h (struct target_ops): Doc fix.
4003 * server.h (target_signal_to_name): New prototype.
4004 * gdbreplay.c: Don't include headers unconditionally which
4005 are missing on mingw32. Include <winsock.h> for mingw32.
4006 (remote_close, remote_open): Adjust for Winsock support.
4007 * configure, config.in: Regenerated.
4009 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
4011 * server.c (decode_xfer_read, write_qxfer_response): New.
4012 (handle_query): Take a packet length argument. Handle
4013 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
4014 the qSupported response.
4015 (main): Update call to handle_query.
4017 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
4019 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
4020 (putpkt_binary): Renamed from putpkt and adjusted for binary
4022 (putpkt): New wrapper for putpkt_binary.
4023 (readchar): Don't mask off the high bit.
4024 (decode_X_packet): New function.
4025 * server.c (main): Call putpkt_binary if a handler sets the packet
4026 length. Save the length of the incoming packet. Handle 'X'.
4027 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
4029 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
4031 * server.c (handle_query): Handle qSupported.
4033 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4035 * remote-utils.c (all_symbols_looked_up): New variable.
4036 (look_up_one_symbol): Check it.
4037 * server.h (look_up_one_symbol): New declaration.
4038 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
4040 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
4042 * Makefile.in (linux-arm-low.o): Update dependencies.
4043 * linux-arm-low.c: Include "gdb_proc_service.h".
4044 (PTRACE_GET_THREAD_AREA): Define.
4045 (ps_get_thread_area): New function.
4047 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
4049 * configure.srv (m68k*-*-uclinux*): New target.
4050 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
4051 (linux_resume_one_process): Remove extraneous cast.
4052 (linux_read_offsets): New.
4053 (linux_target_op): Add linux_read_offsets on mmuless systems.
4054 * server.c (handle_query): Add qOffsets logic.
4055 * target.h (struct target_ops): Add read_offsets.
4057 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4059 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
4060 (PTRACE_GET_THREAD_AREA): Define.
4061 (ps_get_thread_area): New function.
4062 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
4063 (linux-x86-64-low.o): Update.
4065 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
4067 * configure.ac: Remove checks for prfpregset_t.
4068 * gdb_proc_service.h: New file.
4069 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
4070 new "gdb_proc_service.h".
4071 * proc-service.c: Likewise.
4072 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
4073 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
4074 * Makefile.in (gdb_proc_service_h): Updated.
4075 * configure, config.in: Regenerated.
4077 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4079 * remote-utils.c (prepare_resume_reply): Move declaration
4080 of gdb_id_from_wait to the top of the block.
4082 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
4084 * linux-low.c (regsets_store_inferior_registers): Read the regset
4085 from the target before filling it.
4087 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
4089 * server.c (attach_inferior): Return SIGTRAP for a successful
4092 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
4094 * Makefile.in (OBS): Add version.o.
4095 (STAGESTUFF): Delete.
4096 (version.o): Add dependencies.
4097 (version.c): Replace rule.
4098 (clean): Remove version.c.
4099 * server.c (gdbserver_version): New.
4100 (gdbserver_usage): Use printf.
4101 (main): Handle --version and --help.
4102 * server.h (version, host_name): Add declarations.
4104 2005-12-23 Eli Zaretskii <eliz@gnu.org>
4116 * linux-x86-64-low.c:
4119 * linux-ppc64-low.c:
4128 * linux-crisv32-low.c:
4140 * gdbserver.1: Add (C) after Copyright. Update the FSF
4143 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
4145 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
4146 (arm_breakpoint_at): Recognize both breakpoints.
4147 (the_low_target): Use the correct breakpoint instruction.
4149 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
4151 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
4152 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
4153 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
4154 (the_low_target): Update.
4156 2005-10-25 Andreas Schwab <schwab@suse.de>
4158 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
4160 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
4161 (ia64_num_regs): Reduce to 462.
4163 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
4165 * acinclude.m4: Correct quoting.
4166 * aclocal.m4: Regenerated.
4168 Suggested by SZOKOVACS Robert <szo@ies.hu>:
4169 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
4170 (thread_db_init): Call thread_db_err_str.
4171 * configure.ac: Check for TD_VERSION.
4172 * config.in, configure: Regenerated.
4174 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4176 * server.h (error, fatal, warning): Add ATTR_FORMAT.
4178 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4180 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
4181 is not available. Define HAVE_PTRACE_GETREGS if it is.
4182 * config.in, configure: Regenerated.
4183 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
4184 * linux-i386-low.c, linux-m68k-low.c: Update to use
4185 HAVE_PTRACE_GETREGS.
4186 * linux-low.c (regsets_fetch_inferior_registers)
4187 (regsets_store_inferior_registers): Only return 0 if we processed
4189 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
4190 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
4192 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4194 * inferiors.c (struct thread_info): Add gdb_id.
4195 (add_thread): Add gdb_id argument.
4196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
4197 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
4198 calls to add_thread.
4199 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
4200 * server.c (handle_query): Use thread_to_gdb_id.
4201 (handle_v_cont, main): Use gdb_id_to_thread_id.
4202 * server.h (add_thread): Update prototype.
4203 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
4206 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
4208 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
4209 left-padded registers.
4210 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
4211 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
4213 2005-07-01 Steve Ellcey <sje@cup.hp.com>
4215 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
4216 * configure: Regenerate.
4217 * config.in: Regenerate.
4218 * server.h (NEED_DECLARATION_STRERROR):
4219 Replace with !HAVE_DECL_STRERROR.
4221 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
4223 * linux-low.c (linux_wait, linux_send_signal): Don't test
4224 an unsigned long variable for > 0 if it could be MAX_ULONG.
4225 * server.c (myresume): Likewise.
4226 * target.c (set_desired_inferior): Likewise.
4228 2005-06-13 Mark Kettenis <kettenis@gnu.org>
4230 * configure.ac: Simplify and improve check for socklen_t.
4231 * configure, config.in: Regenerate.
4233 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
4235 * acconfig.h: Remove.
4236 * configure.ac: Add a test for socklen_t. Use three-argument
4237 AC_DEFINE throughout.
4238 * config.in: Regenerated using autoheader 2.59.
4239 * configure: Regenerated.
4241 * gdbreplay.c (socklen_t): Provide a default.
4242 (remote_open): Use socklen_t.
4243 * remote-utils.c (socklen_t): Provide a default.
4244 (remote_open): Use socklen_t.
4245 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
4248 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
4250 * linux-low.c (linux_read_memory, linux_write_memory)
4251 (linux_read_auxv): Likewise.
4252 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
4253 (check_mem_write): Likewise.
4254 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
4256 * regcache.c (struct inferior_rgcache_data, registers_to_string)
4257 (registers_from_string, register_data): Likewise.
4258 * server.c (handle_query, main): Likewise.
4259 * server.h (convert_ascii_to_int, convert_int_to_ascii)
4260 (decode_M_packet): Likewise.
4261 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
4262 * target.h (struct target_ops): Update read_memory, write_memory,
4264 (read_inferior_memory, write_inferior_memory): Update.
4265 * linux-low.h (struct linux_target_ops): Change type of breakpoint
4267 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
4268 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
4269 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
4270 linux-s390-low.c, linux-sh-low.c: Update for changes in
4271 read_inferior_memory and the_low_target->breakpoint.
4273 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
4275 * Makefile.in (SFILES): Add linux-ppc64-low.c.
4276 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
4277 * configure.srv: Add powerpc64-*-linux*.
4278 * linux-ppc64-low.c: New file.
4280 2005-05-23 Orjan Friberg <orjanf@axis.com>
4282 * linux-cris-low.c: New file with support for CRIS.
4283 * linux-crisv32-low.c: Ditto for CRISv32.
4284 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
4285 (clean): Add reg-cris.c and reg-crisv32.c.
4286 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
4287 reg-crisv32.o, and reg-crisv32.c to make rules.
4288 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
4291 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
4293 * linux-low.c (fetch_register): Ensure buffer size is a multiple
4294 of sizeof (PTRACE_XFER_TYPE).
4295 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
4297 2005-05-12 Orjan Friberg <orjanf@axis.com>
4299 * target.h (struct target_ops): Add insert_watchpoint,
4300 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
4301 pointers for hardware watchpoint support.
4302 * linux-low.h (struct linux_target_ops): Ditto.
4303 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
4304 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
4305 to linux_target_ops.
4306 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
4308 * server.c (main): Recognize 'Z' and 'z' packets.
4310 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
4312 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
4313 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
4314 (the_low_target): Add new members.
4316 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4318 * proc-service.c (ps_lgetregs): Search all_processes instead of
4321 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
4323 * server.c (start_inferior): Change return type to int.
4324 (attach_inferior): Change sigptr to int *.
4325 (handle_v_cont, handle_v_requests): Change signal to int *.
4326 (main): Change signal to int.
4328 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
4330 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
4331 * configure.srv: Add m32r*-*-linux*.
4332 * linux-m32r-low.c: New file.
4334 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
4336 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
4338 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
4340 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
4341 Take unsigned long arguments for PIDs.
4342 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
4343 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
4344 (wait_for_sigstop, linux_resume_one_process)
4345 (regsets_fetch_inferior_registers, linux_send_signal)
4346 (linux_read_auxv): Likewise. Update the types of variables holding
4347 PIDs. Update format string specifiers.
4348 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
4349 * remote-utils.c (prepare_resume_reply): Likewise.
4350 * server.c (cont_thread, general_thread, step_thread)
4351 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4353 (handle_query): Update format specifiers.
4354 (handle_v_cont, main): Use strtoul for thread IDs.
4355 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4356 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4357 (general_thread, step_thread, thread_from_wait)
4358 (old_thread_from_wait): Update.
4359 * target.h (struct thread_resume): Use unsigned long for THREAD.
4360 (struct target_ops): Use unsigned long for arguments to attach and
4363 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4365 * acinclude.m4: Include bfd/bfd.m4 directly.
4366 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4367 <agriffis@toolchain.org>.
4368 * aclocal.m4, configure: Regenerated.
4370 2005-01-07 Andrew Cagney <cagney@gnu.org>
4372 * configure.ac: Rename configure.in, require autoconf 2.59.
4373 * configure: Re-generate.
4375 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4377 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4379 * aclocal.m4: Regenerated.
4380 * configure: Regenerated.
4382 2004-11-21 Andreas Schwab <schwab@suse.de>
4384 * linux-m68k-low.c (m68k_num_gregs): Define.
4385 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4386 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4387 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4388 (m68k_breakpoint_at): New. Add to the_low_target.
4390 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4391 srv_linux_thread_db to yes.
4393 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4395 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4396 (ARCH_SET_FS): Likewise.
4397 (ARCH_GET_FS): Likewise.
4398 (ARCH_GET_GS): Likewise.
4400 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4402 * linux-i386-low.c (ps_get_thread_area): New.
4403 * linux-x86-64-low.c (ps_get_thread_area): New.
4404 * linux-low.c: Include <sys/syscall.h>.
4405 (linux_kill_one_process): Don't kill the first thread here.
4406 (linux_kill): Kill the first thread here.
4407 (kill_lwp): New function.
4408 (send_sigstop, linux_send_signal): Use it.
4409 * proc-service.c: Clean up #ifdefs.
4410 (fpregset_info): Delete.
4411 (ps_lgetregs): Update and enable implementation.
4412 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4414 * remote-utils.c (struct sym_cache, symbol_cache): New.
4415 (input_interrupt): Print a clearer message.
4416 (async_io_enabled): New variable.
4417 (enable_async_io, disable_async_io): Use it. Update comments.
4418 (look_up_one_symbol): Use the symbol cache.
4419 * thread-db.c (thread_db_look_up_symbols): New function.
4420 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4422 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4424 * configure.in: Test for -rdynamic.
4425 * configure: Regenerated.
4426 * Makefile (INTERNAL_LDFLAGS): New.
4427 (gdbserver, gdbreplay): Use it.
4429 2004-09-02 Andrew Cagney <cagney@gnu.org>
4431 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4433 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4435 * linux-low.c (linux_wait): Clear all_processes list also.
4437 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4439 * linux-low.c: Include <errno.h>. Remove extern declaration of
4442 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4444 * gdbreplay.c, server.h, utils.c: Update copyright years.
4446 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4448 * server.c (main): Print child status or termination signal from
4449 variable 'signal', not 'sig'.
4451 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4453 * linux-low.c (linux_read_memory): Change return type to
4454 int. Check for and return error from ptrace().
4455 * target.c (read_inferior_memory): Change return type to int. Pass
4456 back return status from the_target->read_memory().
4457 * target.h (struct target_ops): Adapt *read_memory() prototype.
4459 (read_inferior_memory): Adapt prototype.
4460 * server.c (main): Return an error packet if
4461 read_inferior_memory() returns an error.
4463 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4465 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4466 Unify with other clean targets.
4468 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4470 * server.c (handle_v_cont): Call set_desired_inferior.
4472 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4474 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4476 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4478 * linux-low.c (linux_wait): Unblock async I/O.
4479 (linux_resume): Block and enable async I/O.
4480 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4481 * server.h (block_async_io, unblock_async_io): Add prototypes.
4483 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4485 * remote-utils.c (remote_open): Print a status notice after
4487 * server.c (attach_inferior): Print a status notice after
4490 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4492 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4494 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4496 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4498 * server.c, target.h: Update copyright years.
4500 2004-02-25 Roland McGrath <roland@redhat.com>
4502 * target.h (struct target_ops): New member `read_auxv'.
4503 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4504 * linux-low.c (linux_read_auxv): New function.
4505 (linux_target_ops): Initialize `read_auxv' member to that.
4507 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4509 Committed by Jim Blandy <jimb@redhat.com>.
4511 * linux-s390-low.c (s390_num_regs): Update.
4512 (s390_regmap): Remove control registers. Use __s390x__ predefine
4513 instead of GPR_SIZE to distiguish s390 and s390x targets.
4515 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4517 * linux-low.c: Update copyright year.
4518 (check_removed_breakpoint): Clear pending_is_breakpoint.
4519 (linux_set_resume_request, linux_queue_one_thread)
4520 (resume_status_pending_p): New functions.
4521 (linux_continue_one_thread): Use process->resume.
4522 (linux_resume): Only resume threads if there are no pending events.
4523 * linux-low.h (struct process_info): Add resume request
4526 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4528 * regcache.c (new_register_cache): Clear the allocated register
4529 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4531 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4533 * linux-low.c (linux_resume): Take a struct thread_resume *
4535 (linux_wait): Update call.
4536 (resume_ptr): New static variable.
4537 (linux_continue_one_thread): Renamed from
4538 linux_continue_one_process. Use resume_ptr.
4539 (linux_resume): Use linux_continue_one_thread.
4540 * server.c (handle_v_cont, handle_v_requests): New functions.
4541 (myresume): New function.
4542 (main): Handle 'v' case.
4543 * target.h (struct thread_resume): New type.
4544 (struct target_ops): Change argument of "resume" to struct
4546 (myresume): Delete macro.
4548 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4550 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4551 (uninstall): Support DESTDIR.
4553 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4555 * configure.srv: Add xscale*linux copy of arm*linux entry.
4557 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4559 * linux-arm-low.c (arm_reinsert_addr): New function.
4560 (the_low_target): Add arm_reinsert_addr.
4562 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4564 * mem-break.c: Remove whitespace at end of file.
4566 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4568 * configure.in: Check whether we need to prototype strerror.
4569 * server.h: Optionally prototype strerror.
4570 * gdbreplay.c (perror_with_name): Use strerror.
4571 * linux-low.c (linux_attach_lwp): Use strerror.
4572 * utils.c (perror_with_name): Use strerror.
4573 * config.in, configure: Regenerated.
4575 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4577 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4578 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4580 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4582 * Makefile.in (SFILES): Update.
4583 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4584 low-sun3.c: Remove files.
4586 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4588 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4589 (linux_detach_one_process, linux_detach): New functions.
4590 (linux_target_ops): Add linux_detach.
4591 * server.c (main): Handle 'D' packet.
4592 * target.h (struct target_ops): Add "detach" member.
4593 (detach_inferior): Define.
4595 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4597 From Kelley Cook <kelleycook@wideopenwest.com>:
4598 * configure.srv: Accept i[34567]86 variants.
4600 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4602 * linux-low.c (linux_wait_for_event): Correct comment typos.
4603 (linux_resume_one_process): Call check_removed_breakpoint.
4604 (linux_send_signal): New function.
4605 (linux_target_ops): Add linux_send_signal.
4606 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4608 * target.h (struct target_ops): Add send_signal.
4610 2003-05-29 Jim Blandy <jimb@redhat.com>
4612 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4613 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4614 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4615 away part of the register's value.
4617 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4619 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4620 (linux_wait_for_event, linux_init_signals): Likewise.
4622 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4624 * configure.in: Check for stdlib.h.
4625 * configure: Regenerated.
4626 * config.in: Regenerated.
4628 2003-01-04 Andreas Schwab <schwab@suse.de>
4630 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4632 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4634 * Makefile.in: Remove obsolete code.
4636 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4638 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4639 defined(PT_FPR0_HI).
4641 2002-11-17 Stuart Hughes <seh@zee2.com>
4643 * linux-arm-low.c (arm_num_regs): Increase.
4644 (arm_regmap): Include status register.
4646 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4648 * linux-low.c (register_addr): Remove incorrect -1 check.
4650 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4652 * linux-low.c (linux_create_inferior): Call setpgid. Return
4654 (unstopped_p, linux_signal_pid): Remove.
4655 (linux_target_ops): Remove linux_signal_pid.
4656 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4657 global instead of target method.
4658 * target.h (struct target_ops): Remove signal_pid. Update comment
4659 for create_inferior.
4660 * server.c (signal_pid): New variable.
4661 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4662 gdbserver. Set the child to be the foreground process group.
4663 (attach_inferior): Set signal_pid.
4665 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4667 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4669 2002-08-20 Jim Blandy <jimb@redhat.com>
4671 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4674 2002-08-01 Andrew Cagney <cagney@redhat.com>
4676 * Makefile.in: Make chill references obsolete.
4678 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4680 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4681 * configure: Regenerate.
4682 * config.in: Regenerate.
4684 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4686 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4687 (perror_with_name, remote_close, remote_open, expect, play): Static.
4689 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4691 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4692 byte offsets instead of an array of indexes.
4693 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4695 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4697 * regcache.c: Add comment.
4699 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4701 * thread-db.c: New file.
4702 * proc-service.c: New file.
4703 * acinclude.m4: New file.
4704 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4705 proc-service.o, and thread-db.o.
4706 (linux-low.o): Add USE_THREAD_DB.
4707 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4708 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4709 * aclocal.m4: Regenerated.
4710 * config.in: Regenerated.
4711 * configure: Regenerated.
4712 * configure.in: Check for proc_service.h, sys/procfs.h,
4713 thread_db.h, and linux/elf.h headrs.
4714 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4715 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4716 Check for -lthread_db and thread support.
4717 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4718 PowerPC, and SuperH.
4719 * i387-fp.c: Constify arguments.
4720 * i387-fp.h: Likewise.
4721 * inferiors.c: (struct thread_info): Renamed from
4722 `struct inferior_info'. Remove PID member. Use generic inferior
4723 list header. All uses updated.
4724 (inferiors, signal_pid): Removed.
4725 (all_threads): New variable.
4726 (get_thread): Define.
4727 (add_inferior_to_list): New function.
4728 (for_each_inferior): New function.
4729 (change_inferior_id): New function.
4730 (add_inferior): Removed.
4731 (remove_inferior): New function.
4732 (add_thread): New function.
4733 (free_one_thread): New function.
4734 (remove_thread): New function.
4735 (clear_inferiors): Use for_each_inferior and free_one_thread.
4736 (find_inferior): New function.
4737 (find_inferior_id): New function.
4738 (inferior_target_data): Update argument type.
4739 (set_inferior_target_data): Likewise.
4740 (inferior_regcache_data): Likewise.
4741 (set_inferior_regcache_data): Likewise.
4742 * linux-low.c (linux_bp_reinsert): Remove.
4743 (all_processes, stopping_threads, using_thrads)
4744 (struct pending_signals, debug_threads, pid_of): New.
4745 (inferior_pid): Replace with macro.
4746 (struct inferior_linux_data): Remove.
4747 (get_stop_pc, add_process): New functions.
4748 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4749 Use add_process and add_thread.
4750 (linux_attach_lwp): New function, based on old linux_attach. Use
4751 add_process and add_thread. Set stop_expected for new threads.
4752 (linux_attach): New function.
4753 (linux_kill_one_process): New function.
4754 (linux_kill): Kill all LWPs.
4755 (linux_thread_alive): Use find_inferior_id.
4756 (check_removed_breakpoints, status_pending_p): New functions.
4757 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4758 Update. Use WNOHANG. Wait for cloned processes also. Update process
4759 struct for the found process.
4760 (linux_wait_for_event): New function.
4761 (linux_wait): Use it. Support LWPs.
4762 (send_sigstop, wait_for_sigstop, stop_all_processes)
4763 (linux_resume_one_process, linux_continue_one_process): New functions.
4764 (linux_resume): Support LWPs.
4765 (REGISTER_RAW_SIZE): Remove.
4766 (fetch_register): Use register_size instead. Call supply_register.
4767 (usr_store_inferior_registers): Likewise. Call collect_register.
4769 (regsets_fetch_inferior_registers): Improve error message.
4770 (regsets_store_inferior_registers): Add debugging.
4771 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4772 (unstopped_p, linux_signal_pid): New functions.
4773 (linux_target_ops): Add linux_signal_pid.
4774 (linux_init_signals): New function.
4775 (initialize_low): Call it. Initialize using_threads.
4776 * regcache.c (inferior_regcache_data): Add valid
4778 (get_regcache): Fetch registers lazily. Add fetch argument
4779 and update all callers.
4780 (regcache_invalidate_one, regcache_invalidate): New
4782 (new_register_cache): Renamed from create_register_cache.
4783 Return the new regcache.
4784 (free_register_cache): Change argument to a void *.
4785 (registers_to_string, registers_from_string): Call get_regcache
4786 with fetch flag set.
4787 (register_data): Make static. Pass fetch flag to get_regcache.
4788 (supply_register): Call get_regcache with fetch flag clear.
4789 (collect_register): Call get_regcache with fetch flag set.
4790 (collect_register_as_string): New function.
4791 * regcache.h: Update.
4792 * remote-utils.c (putpkt): Flush after debug output and use
4794 Handle input interrupts while waiting for an ACK.
4795 (input_interrupt): Use signal_pid method.
4796 (getpkt): Flush after debug output and use stderr.
4797 (outreg): Use collect_register_as_string.
4798 (new_thread_notify, dead_thread_notify): New functions.
4799 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4801 (look_up_one_symbol): Flush after debug output.
4802 * server.c (step_thread, server_waiting): New variables.
4803 (start_inferior): Don't use signal_pid. Update call to mywait.
4804 (attach_inferior): Update call to mywait.
4805 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4806 (main): Don't fetch/store registers explicitly. Use
4807 set_desired_inferior. Support proposed ``Hs'' packet. Update
4810 (struct inferior_list, struct_inferior_list_entry): New.
4811 * target.c (set_desired_inferior): New.
4812 (write_inferior_memory): Constify.
4813 (mywait): New function.
4815 (struct target_ops): New signal_pid method.
4816 (mywait): Removed macro, added prototype.
4818 * linux-low.h (regset_func): Removed.
4819 (regset_fill_func, regset_store_func): New.
4820 (enum regset_type): New.
4821 (struct regset_info): Add type field. Use new operation types.
4822 (struct linux_target_ops): stop_pc renamed to get_pc.
4823 Add decr_pc_after_break and breakpoint_at.
4824 (get_process, get_thread_proess, get_process_thread)
4825 (strut process_info, all_processes, linux_attach_lwp)
4826 (thread_db_init): New.
4828 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4829 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4830 (the_low_target): Add new members.
4831 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4832 (i386_store_fpxregset): Constify.
4833 (target_regsets): Add new kind identifier.
4834 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4835 (i386_set_pc): Add debugging.
4836 (i386_breakpoint_at): New function.
4837 (the_low_target): Add new members.
4838 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4839 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4840 (mips_breakpoint_at): New.
4841 (the_low_target): Add new members.
4842 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4843 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4844 (the_low_target): Add new members.
4845 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4846 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4847 (the_low_target): Add new members.
4848 * linux-x86-64-low.c (target_regsets): Add new kind
4851 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4853 From Martin Pool <mbp@samba.org>:
4854 * server.c (gdbserver_usage): New function.
4857 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4859 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4862 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4864 * Makefile.in: Remove obsolete code.
4866 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4868 * linux-low.c (regsets_fetch_inferior_registers),
4869 (regsets_store_inferior_registers): Removed cast to int from
4871 * regcache.h: Added declaration of struct inferior_info.
4873 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4875 * inferiors.c (struct inferior_info): Add regcache_data.
4876 (add_inferior): Call create_register_cache.
4877 (clear_inferiors): Call free_register_cache.
4878 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4879 * regcache.c (struct inferior_regcache_data): New.
4880 (registers): Remove.
4881 (get_regcache): New function.
4882 (create_register_cache, free_register_cache): New functions.
4883 (set_register_cache): Don't initialize the register cache here.
4884 (registers_to_string, registers_from_string, register_data): Call
4886 * regcache.h: Add prototypes.
4887 * server.h: Likewise.
4889 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4891 * mem-break.c: New file.
4892 * mem-break.h: New file.
4893 * Makefile.in: Add mem-break.o rule; update server.h
4895 * inferiors.c (struct inferior_info): Add target_data
4897 (clear_inferiors): Free target_data member if set.
4898 (inferior_target_data, set_inferior_target_data): New functions.
4899 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4900 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4901 * linux-low.c (linux_bp_reinsert): New variable.
4902 (struct inferior_linux_data): New.
4903 (linux_create_inferior): Use set_inferior_target_data.
4904 (linux_attach): Likewise. Call add_inferior.
4905 (linux_wait_for_one_inferior): New function.
4906 (linux_wait): Call it.
4907 (linux_write_memory): Add const.
4908 (initialize_low): Call set_breakpoint_data.
4909 * linux-low.h (struct linux_target_ops): Add breakpoint
4911 * server.c (attach_inferior): Remove extra add_inferior
4913 * server.h: Include mem-break.h. Update inferior.c
4915 * target.c (read_inferior_memory)
4916 (write_inferior_memory): New functions.
4917 * target.h (read_inferior_memory)
4918 (write_inferior_memory): Change macros to prototypes.
4919 (struct target_ops): Update comments. Add const to write_memory
4922 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4924 * linux-low.c (usr_store_inferior_registers): Support
4925 registers which are allowed to fail to store.
4926 * linux-low.h (linux_target_ops): Likewise.
4927 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4928 (ppc_cannot_store_register): FPSCR may not be storable.
4930 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4932 * server.h: Include <string.h> if HAVE_STRING_H.
4933 * ChangeLog: Correct paths in last ChangeLog entry.
4935 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4937 * linux-low.h: Remove obsolete prototypes.
4938 (struct linux_target_ops): New.
4939 (extern the_low_target): New.
4940 * linux-low.c (num_regs, regmap): Remove declarations.
4941 (register_addr): Use the_low_target explicitly.
4942 (fetch_register): Likewise.
4943 (usr_fetch_inferior_registers): Likewise.
4944 (usr_store_inferior_registers): Likewise.
4945 * linux-arm-low.c (num_regs): Remove.
4946 (arm_num_regs): Define.
4947 (arm_regmap): Renamed from regmap, made static.
4948 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4950 (arm_cannot_store_register): Renamed from cannot_store_register,
4952 (the_low_target): New.
4953 * linux-i386-low.c (num_regs): Remove.
4954 (i386_num_regs): Define.
4955 (i386_regmap): Renamed from regmap, made static.
4956 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4958 (i386_cannot_store_register): Renamed from cannot_store_register,
4960 (the_low_target): New.
4961 * linux-ia64-low.c (num_regs): Remove.
4962 (ia64_num_regs): Define.
4963 (ia64_regmap): Renamed from regmap, made static.
4964 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4966 (ia64_cannot_store_register): Renamed from cannot_store_register,
4968 (the_low_target): New.
4969 * linux-m68k-low.c (num_regs): Remove.
4970 (m68k_num_regs): Define.
4971 (m68k_regmap): Renamed from regmap, made static.
4972 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4974 (m68k_cannot_store_register): Renamed from cannot_store_register,
4976 (the_low_target): New.
4977 * linux-mips-low.c (num_regs): Remove.
4978 (mips_num_regs): Define.
4979 (mips_regmap): Renamed from regmap, made static.
4980 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4982 (mips_cannot_store_register): Renamed from cannot_store_register,
4984 (the_low_target): New.
4985 * linux-ppc-low.c (num_regs): Remove.
4986 (ppc_num_regs): Define.
4987 (ppc_regmap): Renamed from regmap, made static.
4988 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4990 (ppc_cannot_store_register): Renamed from cannot_store_register,
4992 (the_low_target): New.
4993 * linux-s390-low.c (num_regs): Remove.
4994 (s390_num_regs): Define.
4995 (s390_regmap): Renamed from regmap, made static.
4996 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4998 (s390_cannot_store_register): Renamed from cannot_store_register,
5000 (the_low_target): New.
5001 * linux-sh-low.c (num_regs): Remove.
5002 (sh_num_regs): Define.
5003 (sh_regmap): Renamed from regmap, made static.
5004 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
5006 (sh_cannot_store_register): Renamed from cannot_store_register,
5008 (the_low_target): New.
5009 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
5010 (the_low_target): New.
5012 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5014 * Makefile.in: Add stamp-h target.
5015 * configure.in: Create stamp-h.
5016 * configure: Regenerated.
5018 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5020 * inferiors.c: New file.
5021 * target.c: New file.
5022 * target.h: New file.
5023 * Makefile.in: Add target.o and inferiors.o. Update
5025 * linux-low.c (inferior_pid): New static variable,
5026 moved from server.c.
5027 (linux_create_inferior): Renamed from create_inferior.
5028 Call add_inferior. Return 0 on success instead of a PID.
5029 (linux_attach): Renamed from myattach.
5030 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
5031 (linux_thread_alive): Renamed from mythread_alive.
5032 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
5034 (linux_resume): Renamed from myresume. Add missing ``return 0''.
5035 (regsets_store_inferior_registers): Correct error message.
5036 Add missing ``return 0''.
5037 (linux_fetch_registers): Renamed from fetch_inferior_registers.
5038 (linux_store_registers): Renamed from store_inferior_registers.
5039 (linux_read_memory): Renamed from read_inferior_memory.
5040 (linux_write_memory): Renamed from write_inferior_memory.
5041 (linux_target_ops): New structure.
5042 (initialize_low): Call set_target_ops ().
5043 * remote-utils.c (unhexify): New function.
5044 (hexify): New function.
5045 (input_interrupt): Send signals to ``signal_pid''.
5046 * server.c (inferior_pid): Remove.
5047 (start_inferior): Update create_inferior call.
5048 (attach_inferior): Call add_inferior.
5049 (handle_query): New function.
5050 (main): Call handle_query for `q' packets.
5051 * server.h: Include "target.h". Remove obsolete prototypes.
5052 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
5054 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
5056 * Makefile.in: Add WARN_CFLAGS. Update configury
5058 * configure.in: Check for <string.h>
5059 * configure: Regenerate.
5060 * config.in: Regenerate.
5061 * gdbreplay.c: Include needed system headers.
5062 (remote_open): Remove strchr prototype.
5063 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
5064 * regcache.c (supply_register): Change buf argument to const void *.
5065 (supply_register_by_name): Likewise.
5066 (collect_register): Change buf argument to void *.
5067 (collect_register_by_name): Likewise.
5068 * regcache.h: Add missing prototypes.
5069 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
5070 * server.c (handle_query): New function.
5071 (attached): New static variable, moved out of main.
5072 (main): Quiet longjmp clobber warnings.
5073 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
5074 * utils.c (error): Remove NORETURN.