1 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
3 * configure.ac: Use `ws2_32' library for srv_mingw.
4 * configure: Regenerate.
5 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6 * remote-utils.c: Likewise.
8 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11 if __x86_64__ is defined.
13 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15 * configure: Regenerate.
17 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
19 * server.c (handle_query): Handle 'qGetTIBAddr' query.
20 * target.h (target_ops): New get_tib_address field.
21 * win32-low.h (win32_thread_info): Add thread_local_base field.
22 * win32-low.c (child_add_thread): Add tlb argument.
23 Set thread_local_base field to TLB.
24 (get_child_debug_event): Adapt to child_add_thread change.
25 (win32_get_tib_address): New function.
26 (win32_target_ops): Set get_tib_address field to
27 win32_get_tib_address.
28 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
30 2010-04-12 Pedro Alves <pedro@codesourcery.com>
32 * linux-low.c (linux_mourn): Also remove the process.
33 * server.c (handle_target_event): Don't remove the process here.
34 * nto-low.c (nto_mourn): New.
35 (nto_target_ops): Install it.
36 * spu-low.c (spu_mourn): New.
37 (spu_target_ops): Install it.
38 * win32-low.c (win32_mourn): New.
39 (win32_target_ops): Install it.
41 2010-04-12 Pedro Alves <pedro@codesourcery.com>
43 * server.h (buffer_xml_printf): Remove redundant `;'.
45 2010-04-12 Pedro Alves <pedro@codesourcery.com>
47 * regcache.c (set_register_cache): Invalidate regcaches before
48 changing the register cache layout.
49 (regcache_invalidate_one): Allow a NULL regcache.
50 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
51 regcaches before changing the register cache layout or the target
54 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
56 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
57 variable warning on Linux/x86-64.
59 2010-04-11 Pedro Alves <pedro@codesourcery.com>
61 GDBserver disconnected tracing support.
63 * linux-low.c (linux_remove_process): Delete.
64 (add_lwp): Don't set last_resume_kind here.
65 (linux_kill): Use `mourn'.
66 (linux_detach): Use `thread_db_detach', and `mourn'.
68 (linux_attach_lwp_1): Adjust comment.
69 (linux_attach): last_resume_kind moved the thread_info; adjust.
70 (status_pending_p_callback): Adjust.
71 (linux_wait_for_event_1): Adjust.
72 (count_events_callback, select_singlestep_lwp_callback)
73 (select_event_lwp_callback, cancel_breakpoints_callback)
74 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
75 (proceed_one_lwp): Adjust.
76 (linux_async): Add debug output.
77 (linux_thread_stopped): New.
78 (linux_pause_all): New.
79 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
81 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
82 (thread_db_free): Delete declaration.
83 (thread_db_detach, thread_db_mourn): Declare.
84 * thread-db.c (thread_db_init): Use thread_db_mourn.
85 (thread_db_free): Delete, split in two.
86 (disable_thread_event_reporting): New.
87 (thread_db_detach): New.
88 (thread_db_mourn): New.
90 * server.h (struct thread_info) <last_resume_kind>: New field.
91 <attached>: Add comment.
92 <gdb_detached>: New field.
93 (handler_func): Change return type to int.
94 (handle_serial_event, handle_target_event): Ditto.
95 (gdb_connected): Declare.
97 (disconnected_tracing): Declare.
98 (stop_tracing): Declare.
100 * server.c (handle_query) <qSupported>: Report support for
101 disconnected tracing.
102 (queue_stop_reply_callback): Account for running threads.
103 (gdb_wants_thread_stopped): New.
104 (gdb_wants_all_threads_stopped): New.
105 (gdb_reattached_process): New.
106 (handle_status): Clear the `gdb_detached' flag of all processes.
107 In all-stop, stop all threads.
108 (main): Be sure to leave tfind mode. Handle disconnected tracing.
109 (process_serial_event): If the remote connection breaks, or if an
110 exit was forced with "monitor exit", force an event loop exit.
111 Handle disconnected tracing on detach.
112 (handle_serial_event): Adjust.
113 (handle_target_event): If GDB isn't connected, forward events back
114 to the inferior, unless the last process exited, in which case,
115 exit gdbserver. Adjust interface.
117 * remote-utils.c (remote_open): Don't block in accept. Instead
118 register an event loop source on the listen socket file
119 descriptor. Refactor bits into ...
120 (listen_desc): ... this new global.
121 (gdb_connected): ... this new function.
122 (enable_async_notification): ... this new function.
123 (handle_accept_event): ... this new function.
124 (remote_close): Clear remote_desc.
126 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
128 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
130 (mourn_inferior): Define.
131 (target_process_qsupported): Avoid the dangling else problem.
132 (thread_stopped): Define.
134 (target_waitstatus_to_string): Declare.
135 * target.c (target_waitstatus_to_string): New.
137 * tracepoint.c (tracing): Make extern.
138 (disconnected_tracing): New.
139 (stop_tracing): Make extern. Handle tracing stops due to GDB
141 (cmd_qtdisconnected): New.
142 (cmd_qtstatus): Report disconnected tracing status in trace reply.
143 (handle_tracepoint_general_set): Handle QTDisconnected.
145 * event-loop.c (event_handler_func): Change return type to int.
146 (process_event): Bail out if the event handler wants the event
148 (handle_file_event): Ditto.
149 (start_event_loop): Bail out if the event handler wants the event
152 * nto-low.c (nto_target_ops): Adjust.
153 * spu-low.c (spu_wait): Don't remove the process here.
154 (spu_target_ops): Adjust.
155 * win32-low.c (win32_wait): Don't remove the process here.
156 (win32_target_ops): Adjust.
158 2010-04-11 Pedro Alves <pedro@codesourcery.com>
160 * regcache.c (realloc_register_cache): Invalidate inferior's
161 regcache before recreating it.
163 2010-04-09 Pedro Alves <pedro@codesourcery.com>
165 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
167 2010-04-09 Stan Shebs <stan@codesourcery.com>
168 Pedro Alves <pedro@codesourcery.com>
170 * server.h (LONGEST): New.
171 (struct thread_info) <while_stepping>: New field.
172 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
174 (initialize_tracepoint, handle_tracepoint_general_set)
175 (handle_tracepoint_query, tracepoint_finished_step)
176 (tracepoint_was_hit, release_while_stepping_state_list):
177 (current_traceframe): Declare.
178 * server.c (handle_general_set): Handle tracepoint packets.
181 (handle_search_memory_1): Use read_memory.
182 (handle_query): Report support for conditional tracepoints, trace
183 state variables, and tracepoint sources. Handle tracepoint
185 (main): Initialize the tracepoints module.
186 (process_serial_event): Handle traceframe reads/writes.
188 * linux-low.c (handle_tracepoints): New.
189 (linux_wait_1): Call it.
190 (linux_resume_one_lwp): Handle while-stepping.
191 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
192 (linux_target_ops): Install them.
193 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
195 * linux-x86-low.c (x86_supports_tracepoints): New.
196 (the_low_target). Install it.
198 * mem-break.h (delete_breakpoint): Declare.
199 * mem-break.c (delete_breakpoint): Make external.
201 * target.h (struct target_ops): Add `supports_tracepoints',
202 `read_pc', and `write_pc' fields.
203 (target_supports_tracepoints): Define.
204 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
207 * regcache.h (struct regcache) <registers_owned>: New field.
208 (init_register_cache, regcache_cpy): Declare.
209 (regcache_read_pc, regcache_write_pc): Declare.
210 (register_cache_size): Declare.
211 (supply_regblock): Declare.
212 * regcache.c (init_register_cache): New.
213 (new_register_cache): Use it.
215 (register_cache_size): New.
216 (supply_regblock): New.
217 (regcache_read_pc, regcache_write_pc): New.
221 * Makefile.in (OBS): Add tracepoint.o.
222 (tracepoint.o): New rule.
224 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
226 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
228 (i386-mmx.c): Likewise.
229 (i386-mmx-linux.o): Likewise.
230 (i386-mmx-linux.c): Likewise.
232 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
233 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
234 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
235 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
237 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
238 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
239 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
241 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
243 * Makefile.in (clean): Updated.
245 (i386-avx.c): Likewise.
246 (i386-avx-linux.o): Likewise.
247 (i386-avx-linux.c): Likewise.
248 (amd64-avx.o): Likewise.
249 (amd64-avx.c): Likewise.
250 (amd64-avx-linux.o): Likewise.
251 (amd64-avx-linux.c): Likewise.
253 * configure.srv (srv_i386_regobj): Add i386-avx.o.
254 (srv_i386_linux_regobj): Add i386-avx-linux.o.
255 (srv_amd64_regobj): Add amd64-avx.o.
256 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
257 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
258 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
259 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
260 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
261 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
262 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
264 * i387-fp.c: Include "i386-xstate.h".
266 (i387_cache_to_xsave): Likewise.
267 (i387_xsave_to_cache): Likewise.
268 (x86_xcr0): Likewise.
270 * i387-fp.h (i387_cache_to_xsave): Likewise.
271 (i387_xsave_to_cache): Likewise.
272 (x86_xcr0): Likewise.
274 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
275 * linux-crisv32-low.c (target_regsets): Likewise.
276 * linux-m68k-low.c (target_regsets): Likewise.
277 * linux-mips-low.c (target_regsets): Likewise.
278 * linux-ppc-low.c (target_regsets): Likewise.
279 * linux-s390-low.c (target_regsets): Likewise.
280 * linux-sh-low.c (target_regsets): Likewise.
281 * linux-sparc-low.c (target_regsets): Likewise.
282 * linux-xtensa-low.c (target_regsets): Likewise.
284 * linux-low.c: Include <sys/uio.h>.
285 (regsets_fetch_inferior_registers): Support nt_type.
286 (regsets_store_inferior_registers): Likewise.
287 (linux_process_qsupported): New.
288 (linux_target_ops): Add linux_process_qsupported.
290 * linux-low.h (regset_info): Add nt_type.
291 (linux_target_ops): Add process_qsupported.
293 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
295 (init_registers_i386_avx_linux): New.
296 (init_registers_amd64_avx_linux): Likewise.
297 (xmltarget_i386_linux_no_xml): Likewise.
298 (xmltarget_amd64_linux_no_xml): Likewise.
299 (PTRACE_GETREGSET): Likewise.
300 (PTRACE_SETREGSET): Likewise.
301 (x86_fill_xstateregset): Likewise.
302 (x86_store_xstateregset): Likewise.
304 (x86_linux_update_xmltarget): Likewise.
305 (x86_linux_process_qsupported): Likewise.
306 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
307 (x86_arch_setup): Don't call init_registers_amd64_linux nor
308 init_registers_i386_linux here. Call
309 x86_linux_update_xmltarget.
310 (the_low_target): Add x86_linux_process_qsupported.
312 * server.c (handle_query): Call target_process_qsupported.
314 * target.h (target_ops): Add process_qsupported.
315 (target_process_qsupported): New.
317 2010-04-03 Pedro Alves <pedro@codesourcery.com>
319 * inferiors.c (add_thread): Set last_status kind to
320 TARGET_WAITKIND_IGNORE.
321 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
322 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
323 (linux_wait_1): Move `thread' local definition to block that uses
324 it. Don't NULL initialize `event_child'.
325 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
326 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
327 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
329 2010-04-01 Pedro Alves <pedro@codesourcery.com>
331 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
332 an extended waitstatus, or by a watchpoint.
333 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
334 thread was stepping or has been stopped by a watchpoint.
336 2010-04-01 Pedro Alves <pedro@codesourcery.com>
338 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
339 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
340 of another, then delete the previous, and validate all
342 (validate_inserted_breakpoint): New.
343 (delete_disabled_breakpoints): New.
344 (validate_breakpoints): New.
345 (check_mem_read): Validate breakpoints before trusting their
346 shadow. Delete disabled breakpoints.
347 (check_mem_write): Validate breakpoints before trusting they
348 should be inserted. Delete disabled breakpoints.
349 * mem-break.h (validate_breakpoints):
350 * server.c (handle_query): Validate breakpoints when we see a
353 2010-04-01 Pedro Alves <pedro@codesourcery.com>
355 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
356 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
357 if we could tell there's a GDB breakpoint at stop_pc.
358 (need_step_over_p): Don't do a step over if we find a GDB
359 breakpoint at the resume PC.
361 * mem-break.c (struct raw_breakpoint): New.
362 (enum bkpt_type): New type `gdb_breakpoint'.
363 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
364 fields. New field `raw'.
365 (find_raw_breakpoint_at): New.
366 (set_raw_breakpoint_at): Handle refcounting. Create a raw
368 (set_breakpoint_at): Adjust.
369 (delete_raw_breakpoint): New.
370 (release_breakpoint): New.
371 (delete_breakpoint): Rename to...
372 (delete_breakpoint_1): ... this. Add proc parameter. Use
373 release_breakpoint. Return ENOENT.
374 (delete_breakpoint): Reimplement.
375 (find_breakpoint_at): Delete.
376 (find_gdb_breakpoint_at): New.
377 (delete_breakpoint_at): Delete.
378 (set_gdb_breakpoint_at): New.
379 (delete_gdb_breakpoint_at): New.
380 (gdb_breakpoint_here): New.
381 (set_reinsert_breakpoint): Use release_breakpoint.
382 (uninsert_breakpoint): Rename to ...
383 (uninsert_raw_breakpoint): ... this.
384 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
385 (reinsert_raw_breakpoint): Change parameter type to
387 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
389 (check_breakpoints): Adjust. Use release_breakpoint.
390 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
391 (breakpoint_inserted_here): Ditto.
392 (check_mem_read): Adjust to iterate over raw breakpoints instead.
393 Don't trust the breakpoint's shadow if it is not inserted.
394 (check_mem_write): Adjust to iterate over raw breakpoints instead.
395 (delete_all_breakpoints): Adjust.
396 (free_all_breakpoints): Mark all breakpoints as uninserted, and
397 use delete_breakpoint_1.
399 * mem-break.h (breakpoints_supported): Delete declaration.
400 (set_gdb_breakpoint_at): Declare.
401 (gdb_breakpoint_here): Declare.
402 (delete_breakpoint_at): Delete.
403 (delete_gdb_breakpoint_at): Declare.
405 * server.h (struct raw_breakpoint): Forward declare.
406 (struct process_info): New field `raw_breakpoints'.
408 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
411 2010-03-24 Pedro Alves <pedro@codesourcery.com>
413 * linux-low.c (status_pending_p_callback): Fix comment.
414 (linux_wait_for_event_1): Move most of the internal breakpoint
415 handling from here...
416 (linux_wait_1): ... to here.
417 (count_events_callback): New.
418 (select_singlestep_lwp_callback): New.
419 (select_event_lwp_callback): New.
420 (cancel_breakpoints_callback): New.
421 (select_event_lwp): New.
422 (linux_wait_1): Simplify internal breakpoint handling. Give equal
423 priority to all LWPs that have had events that should be reported
424 to the client. Cancel breakpoints when about to reporting the
425 event to the client, not while stopping lwps. No longer cancel
426 finished single-steps here.
427 (cancel_finished_single_step): Delete.
428 (cancel_finished_single_steps): Delete.
430 2010-03-24 Pedro Alves <pedro@codesourcery.com>
432 * mem-break.c (enum bkpt_type): New.
433 (struct breakpoint): New field `type'.
434 (set_breakpoint_at): Change return type to struct breakpoint
435 pointer. Set type to `other_breakpoint' by default.
436 (delete_breakpoint): Rewrite, supporting more than one breakpoint
437 in the breakpoint list.
438 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
439 (reinsert_breakpoint): Rename to ...
440 (reinsert_raw_breakpoint): ... this.
441 (reinsert_breakpoints_at): Adjust.
442 * mem-break.h (struct breakpoint): Declare.
443 (set_breakpoint_at): Change return type to struct breakpoint
446 2010-03-24 Pedro Alves <pedro@codesourcery.com>
448 * server.c (handle_query): Assign, not compare.
450 2010-03-24 Pedro Alves <pedro@codesourcery.com>
452 Teach linux gdbserver to step-over-breakpoints.
454 * linux-low.c (can_hardware_single_step): New.
455 (supports_breakpoints): New.
456 (handle_extended_wait): If stopping threads, read the stop pc of
459 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
460 low target doesn't support retrieving the PC.
461 (add_lwp): Set last_resume_kind to resume_continue.
462 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
463 (linux_attach): Don't clear stop_expected. Set the lwp's
464 last_resume_kind to resume_stop.
465 (linux_detach_one_lwp): Don't check for removed breakpoints.
466 (check_removed_breakpoint): Delete.
467 (status_pending_p): Rename to ...
468 (status_pending_p_callback): ... this. Don't check for removed
469 breakpoints. Don't consider threads that are stopped from GDB's
471 (linux_wait_for_lwp): Always read the stop_pc here.
472 (cancel_breakpoint): New.
473 (step_over_bkpt): New global.
474 (linux_wait_for_event_1): Implement stepping over breakpoints.
475 (gdb_wants_lwp_stopped): New.
476 (gdb_wants_all_stopped): New.
477 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
478 single-step traps here. Store the thread's last reported target
480 (send_sigstop): Don't clear stop_expected. Always set it,
482 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
483 (cancel_finished_single_step): New.
484 (cancel_finished_single_steps): New.
485 (wait_for_sigstop): Don't cancel finished single-step traps here.
486 (linux_resume_one_lwp): Don't check for removed breakpoints.
487 Don't set `step' on non-hardware step archs.
488 (linux_set_resume_request): Ignore resume_stop requests if already
489 stopping or stopped. Set the lwp's last_resume_kind.
490 (resume_status_pending_p): Don't check for removed breakpoints.
491 (need_step_over_p): New.
492 (start_step_over): New.
493 (finish_step_over): New.
494 (linux_resume_one_thread): Always queue a sigstop for resume_stop
495 requests. Clear the thread's last reported target waitstatus.
496 Don't use the `suspended' flag. Don't consider pending breakpoints.
497 (linux_resume): Start a step-over if necessary.
498 (proceed_one_lwp): New.
499 (proceed_all_lwps): New.
500 (unstop_all_lwps): New.
501 * linux-low.h (struct lwp_info): Rewrite comment for the
502 `suspended' flag. Add the `stop_pc' field. Delete the
503 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
504 Add `'last_resume_kind' and `need_step_over' fields.
505 * inferiors.c (struct thread_info): Delete, moved elsewhere.
506 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
507 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
508 (set_raw_breakpoint_at): New.
509 (set_breakpoint_at): Rewrite to use it.
510 (reinsert_breakpoint_handler): Delete.
511 (set_reinsert_breakpoint): New.
512 (reinsert_breakpoint_by_bp): Delete.
513 (delete_reinsert_breakpoints): New.
514 (uninsert_breakpoint): Rewrite.
515 (uninsert_breakpoints_at): New.
516 (reinsert_breakpoint): Rewrite.
517 (reinsert_breakpoints_at): New.
518 (check_breakpoints): Rewrite.
519 (breakpoint_here): New.
520 (breakpoint_inserted_here): New.
521 (check_mem_read): Adjust.
522 * mem-break.h (breakpoints_supported, breakpoint_here)
523 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
524 (reinsert_breakpoint_by_bp): Delete declaration.
525 (delete_reinsert_breakpoints): Declare.
526 (reinsert_breakpoint): Delete declaration.
527 (reinsert_breakpoints_at): Declare.
528 (uninsert_breakpoint): Delete declaration.
529 (uninsert_breakpoints_at): Declare.
530 (check_breakpoints): Adjust prototype.
531 * server.h: Adjust include order.
532 (struct thread_info): Declare here. Add a `last_status' field.
534 2010-03-23 Michael Snyder <msnyder@vmware.com>
536 * server.c (crc32): New function.
537 (handle_query): Add handling for 'qCRC:' request.
539 2010-03-23 Pedro Alves <pedro@codesourcery.com>
541 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
542 lwp had been stopped by a watchpoint.
544 2010-03-16 Pedro Alves <pedro@codesourcery.com>
546 * server.h (internal_error): Declare.
547 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
548 * utils.c (internal_error): New function.
550 2010-03-15 Andreas Schwab <schwab@redhat.com>
552 * configure.srv: Fix typo setting srv_regobj.
554 2010-03-15 Pedro Alves <pedro@codesourcery.com>
556 * linux-low.c (fetch_register): Avoid passing a non string literal
558 (usr_store_inferior_registers): Ditto.
560 2010-03-14 Pedro Alves <pedro@codesourcery.com>
562 * linux-low.c (linux_write_memory): Bail out early if peeking
565 2010-03-14 Pedro Alves <pedro@codesourcery.com>
567 * linux-low.h (struct lwp_info): New fields
568 `stopped_by_watchpoint' and `stopped_data_address'.
569 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
570 here, and cache them in the lwp object.
571 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
573 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
575 (linux_stopped_by_watchpoint): Rewrite.
576 (linux_stopped_data_address): Rewrite.
578 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
580 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
581 switching the current inferior, not before.
583 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
585 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
586 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
587 i386-linux.c and amd64-linux.c.
588 (reg-i386.o): Removed.
589 (reg-i386.c): Likewise.
590 (reg-i386-linux.o): Likewise.
591 (reg-i386-linux.c): Likewise.
592 (reg-x86-64.o): Likewise.
593 (reg-x86-64.c): Likewise.
594 (reg-x86-64-linux.o): Likewise.
595 (reg-x86-64-linux.c): Likewise.
598 (i386-linux.o): Likewise.
599 (i386-linux.c): Likewise.
602 (amd64-linux.o): Likewise.
603 (amd64-linux.c): Likewise.
605 * configure.srv (srv_i386_regobj): New.
606 (srv_i386_linux_regobj): Likewise.
607 (srv_amd64_regobj): Likewise.
608 (srv_amd64_linux_regobj): Likewise.
609 (srv_i386_32bit_xmlfiles): Likewise.
610 (srv_i386_64bit_xmlfiles): Likewise.
611 (srv_i386_xmlfiles): Likewise.
612 (srv_amd64_xmlfiles): Likewise.
613 (srv_i386_linux_xmlfiles): Likewise.
614 (srv_amd64_linux_xmlfiles): Likewise.
615 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
616 srv_xmlfiles to $srv_i386_xmlfiles.
617 (i[34567]86-*-mingw32ce*): Likewise.
618 (i[34567]86-*-mingw*): Likewise.
619 (i[34567]86-*-nto*): Likewise.
620 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
621 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
622 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
623 (x86_64-*-linux*): Likewise.
625 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
626 (init_registers_amd64_linux): New.
627 (x86_arch_setup): Replace init_registers_x86_64_linux with
628 init_registers_amd64_linux.
630 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
632 * configure.ac: Check for libdl. If it is not available link against
634 * configure: Regenerate.
636 2010-02-22 Pedro Alves <pedro@codesourcery.com>
640 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
641 handing a read watchpoint.
642 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
644 2010-02-12 Doug Evans <dje@google.com>
646 * linux-low.c (linux_supports_tracefork_flag): Document.
647 (linux_look_up_symbols): Add comment.
649 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
651 * regcache.c (supply_register): Clear regcache if buf is NULL.
653 2010-02-02 Nicolas Roche <roche@sourceware.org>
654 Joel Brobecker <brobecker@adacore.com>
656 * inferiors.c (find_inferior): Add function documentation.
657 (unloaded_dll): Handle the case where the unloaded dll has not
658 been previously registered in the dll list.
660 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
662 * linux-arm-low.c (thumb_breakpoint_len): Delete.
663 (thumb2_breakpoint): New.
664 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
666 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
668 * linux-low.c (get_stop_pc): Check for SIGTRAP.
669 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
672 2010-01-21 Pedro Alves <pedro@codesourcery.com>
674 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
676 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
678 * linux-s390-low.c (s390_collect_ptrace_register)
679 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
681 2010-01-21 Doug Evans <dje@google.com>
683 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
684 (PTRACE_ARG4_TYPE): New macro.
685 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
686 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
687 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
688 (usr_store_inferior_registers): Ditto.
689 (linux_read_memory, linux_write_memory): Ditto.
690 (linux_test_for_tracefork): Ditto.
692 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
693 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
695 2010-01-21 Pedro Alves <pedro@codesourcery.com>
697 * proc-service.c (ps_lgetregs): Don't refetch registers from the
700 2010-01-21 Pedro Alves <pedro@codesourcery.com>
702 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
703 prototype to take a regcache. Adjust.
705 2010-01-20 Pedro Alves <pedro@codesourcery.com>
707 * regcache.h (struct thread_info): Forward declare.
708 (struct regcache): New.
709 (new_register_cache): Adjust prototype.
710 (get_thread_regcache): Declare.
711 (free_register_cache): Adjust prototype.
712 (registers_to_string, registers_from_string): Ditto.
713 (supply_register, supply_register_by_name, collect_register)
714 (collect_register_as_string, collect_register_by_name): Ditto.
715 * regcache.c (struct inferior_regcache_data): Delete.
716 (get_regcache): Rename to ...
717 (get_thread_regcache): ... this. Adjust. Switch inferior before
719 (regcache_invalidate_one): Adjust.
720 (regcache_invalidate): Fix prototype.
721 (new_register_cache): Return the new register cache.
722 (free_register_cache): Change prototype.
723 (realloc_register_cache): Adjust.
724 (registers_to_string): Change prototype to take a regcache. Adjust.
725 (registers_from_string): Ditto.
726 (register_data): Ditto.
727 (supply_register): Ditto.
728 (supply_register_by_name): Ditto.
729 (collect_register): Ditto.
730 (collect_register_as_string): Ditto.
731 (collect_register_by_name): Ditto.
732 * server.c (process_serial_event): Adjust.
733 * linux-low.h (regset_fill_func, regset_store_func): Change
735 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
737 * linux-low.c (get_stop_pc): Adjust.
738 (check_removed_breakpoint): Adjust.
739 (linux_wait_for_event): Adjust.
740 (linux_resume_one_lwp): Adjust.
741 (fetch_register): Add regcache parameter. Adjust.
742 (usr_store_inferior_registers): Ditto.
743 (regsets_fetch_inferior_registers): Ditto.
744 (regsets_store_inferior_registers): Ditto.
745 (linux_fetch_registers, linux_store_registers): Ditto.
746 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
748 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
749 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
750 prototype to take a regcache.
751 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
752 * remote-utils.c (convert_ascii_to_int, outreg)
753 (prepare_resume_reply): Change prototype to take a regcache.
755 * target.h (struct target_ops) <fetch_registers, store_registers>:
756 Change prototype to take a regcache.
757 (fetch_inferior_registers, store_inferior_registers): Change
758 prototype to take a regcache. Adjust.
759 * proc-service.c (ps_lgetregs): Adjust.
760 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
761 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
762 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
763 take a regcache. Adjust.
764 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
765 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
766 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
767 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
768 * linux-cris-low.c (cris_get_pc, cris_set_pc)
769 (cris_cannot_fetch_register):
770 (cris_breakpoint_at): Change prototype to take a regcache.
772 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
773 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
774 to take a regcache. Adjust.
775 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
777 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
778 take a regcache. Adjust.
779 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
780 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
781 (m68k_set_pc): Change prototype to take a regcache. Adjust.
782 * linux-mips-low.c (mips_get_pc):
783 (mips_set_pc): Change prototype to take a regcache. Adjust.
784 (mips_reinsert_addr): Adjust.
785 (mips_collect_register): Change prototype to take a regcache.
787 (mips_supply_register):
788 (mips_collect_register_32bit, mips_supply_register_32bit)
789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
790 (mips_store_fpregset): Ditto.
791 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
793 (parse_spufs_run): Adjust.
794 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
795 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
796 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
797 take a regcache. Adjust.
798 * linux-s390-low.c (s390_collect_ptrace_register)
799 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
800 (s390_set_pc): Change prototype to take a regcache. Adjust.
801 (s390_arch_setup): Adjust.
802 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
803 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
804 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
805 (sparc_fill_gregset, sparc_store_gregset_from_stack)
806 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
808 (sparc_breakpoint_at): Adjust.
809 * linux-xtensa-low.c (xtensa_fill_gregset):
810 (xtensa_store_gregset):
811 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
812 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
813 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
814 prototype to take a regcache. Adjust.
815 * win32-arm-low.c (arm_fetch_inferior_register)
816 (arm_store_inferior_register): Change prototype to take a
818 * win32-i386-low.c (i386_fetch_inferior_register)
819 (i386_store_inferior_register): Change prototype to take a
821 * win32-low.c (child_fetch_inferior_registers)
822 (child_store_inferior_registers): Change prototype to take a
824 (win32_wait): Adjust.
825 (win32_fetch_inferior_registers): Change prototype to take a
827 (win32_store_inferior_registers): Adjust.
828 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
829 store_inferior_register>: Change prototype to take a regcache.
831 2010-01-20 Doug Evans <dje@google.com>
833 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
835 (linux_wait_for_event1, linux_init_signals): Ditto.
836 (W_STOPCODE): Provide definition if missing.
838 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
840 * linux-low.c (linux_core_of_thread): New.
841 (compare_ints, show_process, list_threads): New.
842 (linux_qxfer_osdata): Report threads and cores.
843 (linux_target_op): Register linux_core_of_thread.
844 * remote-utils.c (prepare_resume_reply): Report the core.
845 (buffer_xml_printf): Support %d specifier.
846 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
848 (handle_query): Handle qXfer:threads. Announce availability
850 * target.h (struct target_ops): New field core_of_thread.
852 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
854 * Makefile.in (clean): Remove new generated files.
855 (reg-s390.o, reg-s390.c): Remove rules.
856 (reg-s390x.o, reg-s390x.c): Likewise.
857 (s390-linux32.o, s390-linux32.c): Add rules.
858 (s390-linux64.o, s390-linux64.c): Likewise.
859 (s390x-linux64.o, s390x-linux64.c): Likewise.
860 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
861 * linux-s390-low.c: Include <elf.h>.
862 (HWCAP_S390_HIGH_GPRS): Define if undefined.
863 (init_registers_s390): Remove prototype.
864 (init_registers_s390x): Likewise.
865 (init_registers_s390_linux32): Add prototype.
866 (init_registers_s390_linux64): Likewise.
867 (init_registers_s390x_linux64): Likewise.
868 (s390_num_regs_3264): New define.
869 (s390_regmap_3264): New global variable.
870 (s390_cannot_fetch_register): Remove obsolete check.
871 (s390_cannot_store_register): Likewise.
872 (s390_collect_ptrace_register): Handle upper/lower register halves.
873 (s390_supply_ptrace_register): Likewise.
874 (s390_fill_gregset): Update to register number changes.
875 (s390_get_hwcap): New routine.
876 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
877 Install appropriate regmap and register set.
879 2010-01-01 Joel Brobecker <brobecker@adacore.com>
881 * server.c (gdbserver_version): Update copyright year to 2010.
882 * gdbreplay.c (gdbreplay_version): Likewise.
884 2009-12-28 Doug Evans <dje@google.com>
886 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
887 elf/external.h. Include <elf.h> instead but only if necessary.
889 2009-12-28 Pedro Alves <pedro@codesourcery.com>
891 * linux-low.c (linux_remove_process): Remove `detaching'
892 parameter. Don't release/detach from thread_db here.
893 (linux_kill): Release/detach from thread_db here, ...
894 (linux_detach): ... and here, before actually detaching.
895 (linux_wait_1): ... and here, when a process exits.
896 * thread-db.c (any_thread_of): New.
897 (thread_db_free): Switch the current inferior to a thread of the
900 2009-12-21 Doug Evans <dje@google.com>
902 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
904 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
905 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
906 warning ifndef __NR_tkill. Move setting of errno there too.
907 Delete unnecessary resetting of errno after syscall.
908 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
910 * configure.ac: Check for dladdr.
911 * config.in: Regenerate.
912 * configure: Regenerate.
913 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
914 (try_thread_db_load): Update.
916 * linux-low.c (my_waitpid): Delete unnecessary prototype.
918 2009-12-18 Doug Evans <dje@google.com>
920 * event-loop.c: Include unistd.h if it exists.
922 * linux-low.c (my_waitpid): Move definition away from being in
923 between linux_tracefork_child/linux_test_for_tracefork.
925 * gdb_proc_service.h (psaddr_t): Fix type.
926 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
927 signature to match glibc.
929 2009-12-16 Doug Evans <dje@google.com>
931 * linux-low.c (linux_read_memory): Fix argument to read.
933 2009-11-26 Pedro Alves <pedro@codesourcery.com>
935 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
936 events, don't leave current_inferior pointing at null.
938 2009-11-26 Pedro Alves <pedro@codesourcery.com>
940 * win32-low.c (LOG): Delete.
941 (OUTMSG): Output to stderr.
942 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
943 on compile time LOG macro.
944 (win32_wait): Fix debug output.
946 2009-11-26 Pedro Alves <pedro@codesourcery.com>
948 * win32-low.c (win32_add_one_solib): If the dll name is
949 "ntdll.dll", prepend the system directory to the dll path.
951 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
953 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
955 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
956 Vladimir Prus <vladimir@codesourcery.com>
958 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
959 * configure.ac: Check for __mcoldfire__ and set
960 gdb_cv_m68k_is_coldfire.
961 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
962 reg-cf.o and reg-m68k.o.
963 * configure: Regenerated.
965 2009-11-16 Pedro Alves <pedro@codesourcery.com>
967 * linux-low.c (linux_remove_process): Add `detaching' parameter.
968 Pass it to thread_db_free.
969 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
970 proper `detaching' argument to linux_remove_process.
971 * linux-low.h (thread_db_free): Add `detaching' parameter.
972 * thread-db.c (thread_db_init): Pass false as `detaching' argument
974 (thread_db_free): Add `detaching' parameter. Only
975 call td_ta_clear_event if detaching from process.
977 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
979 * thread-db.c (thread_db_free): Fix typo.
981 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
984 * thread-db.c (thread_db_free): Call td_ta_clear_event.
986 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
988 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
989 with an i686 compiler.
990 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
992 * configure: Rebuilt.
994 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
998 * server.c (handle_search_memory_1): Correct read_addr initialization
999 in loop for searching subsequent chunks.
1001 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1003 * configure.ac: New --with-libthread-db option.
1004 * thread-db.c: Allow direct dependence on libthread_db.
1005 (thread_db_free): Adjust.
1006 * config.in: Regenerate.
1007 * configure: Likewise.
1009 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1012 * thread-db.c (attach_thread): New function.
1013 (maybe_attach_thread): Return success/failure.
1014 (find_new_threads_callback): Adjust.
1015 (thread_db_find_new_threads): Loop until no new threads.
1017 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1019 * proc-service.c (ps_lgetregs): Formatting.
1021 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1023 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1024 * configure.ac: Adjust.
1025 * linux-low.h (struct process_info_private): Move members to struct
1027 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1028 * linux-low.c (linux_remove_process): Adjust.
1029 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1030 * server.c (handle_query): Move code ...
1031 (handle_monitor_command): ... here. New function.
1032 * target.h (struct target_ops): New member.
1033 * thread-db.c (struct thread_db): New.
1034 (libthread_db_search_path): New variable.
1035 (thread_db_create_event, thread_db_enable_reporting)
1036 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1037 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1038 (try_thread_db_load_1, dladdr_to_soname): New functions.
1039 (try_thread_db_load, thread_db_load_search): New functions.
1040 (thread_db_init): Search for libthread_db.
1041 (thread_db_free): New function.
1042 (thread_db_handle_monitor_command): Likewise.
1043 * config.in: Regenerate.
1044 * configure: Regenerate.
1046 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1048 * spu-low.c (spu_kill): Wait for inferior to terminate.
1049 Call clear_inferiors.
1050 (spu_detach): Call clear_inferiors.
1052 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1054 * aclocal.m4: Regenerate.
1055 * config.in: Likewise.
1056 * configure: Likewise.
1058 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1060 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1061 (parse_spufs_run): New function.
1062 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1063 (ppc_breakpoint_at): Handle SPU breakpoints.
1065 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1067 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1068 (SPUFS_MAGIC): Define.
1069 (spu_enumerate_spu_ids): New function.
1070 (linux_qxfer_spu): New function.
1071 (linux_target_ops): Install linux_qxfer_spu.
1073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1075 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1076 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1077 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1078 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1079 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1080 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1081 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1082 (init_registers_powerpc_cell32l): Add prototype.
1083 (init_registers_powerpc_cell64l): Likewise.
1084 (ppc_arch_setup): Detect Cell/B.E. architecture.
1086 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1088 * Makefile.in (datarootdir): New variable.
1090 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1092 * linux-low.c (linux_write_memory): Update debugging output.
1093 * Makefile.in (clean): Add new descriptions.
1094 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1095 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1096 * configure.srv: Add new files for arm*-*-linux*.
1097 * linux-arm-low.c: Add new declarations.
1098 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1099 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1100 (HWCAP_VFPv3D16): New.
1101 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1102 instead of __IWMMXT__.
1103 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1104 (arm_arch_setup): New.
1105 (target_regsets): Remove #ifdef. Add VFP regset.
1106 (the_low_target): Use arm_arch_setup.
1108 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1110 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1111 the main thread again.
1113 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1115 Adding Neutrino gdbserver.
1116 * configure: Regenerated.
1117 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1118 * configure.srv (i[34567]86-*-nto*): New target.
1119 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1120 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1121 (nto_comctrl) [__QNX__]: New function.
1122 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1124 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1126 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1129 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1130 Pedro Alves <pedro@codesourcery.com>
1132 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1133 don't support CONTEXT_EXTENDED_REGISTERS.
1134 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1135 (the_low_target): Install them.
1136 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1137 failing with ERROR_PIPE_NOT_CONNECTED.
1139 2009-06-30 Doug Evans <dje@google.com>
1140 Pierre Muller <muller@ics.u-strasbg.fr>
1142 Add h/w watchpoint support to x86-linux, win32-i386.
1143 * Makefile.in (SFILES): Add i386-low.c
1144 (i386_low_h): Define.
1145 (i386-low.o): Add dependencies.
1146 (linux-x86-low.o): Add i386-low.h dependency.
1147 (win32-i386-low.o): Ditto.
1148 * i386-low.c: New file.
1149 * i386-low.h: New file.
1150 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1151 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1152 * linux-low.c (linux_add_process): Initialize arch_private.
1153 (linux_remove_process): Free arch_private.
1154 (add_lwp): Initialize arch_private.
1155 (delete_lwp): Free arch_private.
1156 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1158 * linux-low.h (process_info_private): New member arch_private.
1159 (lwp_info): New member arch_private.
1160 (linux_target_ops): New members new_process, new_thread,
1162 (ptid_of): New macro.
1163 * linux-x86-low.c: Include stddef.h, i386-low.h.
1164 (arch_process_info): New struct.
1165 (arch_lwp_info): New struct.
1166 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1167 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1168 (i386_dr_low_get_status): New function.
1169 (x86_insert_point, x86_remove_point): New functions.
1170 (x86_stopped_by_watchpoint): New function.
1171 (x86_stopped_data_address): New function.
1172 (x86_linux_new_process, x86_linux_new_thread): New functions.
1173 (x86_linux_prepare_to_resume): New function.
1174 (the_low_target): Add entries for insert_point, remove_point,
1175 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1177 * server.c (debug_hw_points): New global.
1178 (monitor_show_help): Document set debug-hw-points.
1179 (handle_query): Process "set debug-hw-points".
1180 * server.h (debug_hw_points): Declare.
1181 (paddress): Declare.
1182 * utils.c (NUMCELLS, CELLSIZE): New macros.
1183 (get_sell, xsnprintf, paddress): New functions.
1184 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1185 remove_point, stopped_by_watchpoint, stopped_data_address.
1186 * win32-i386-low.c: Include i386-low.h.
1187 (debug_reg_state): Replaces dr.
1188 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1189 (i386_dr_low_get_status): New function.
1190 (i386_insert_point, i386_remove_point): New functions.
1191 (i386_stopped_by_watchpoint): New function.
1192 (i386_stopped_data_address): New function.
1193 (i386_initial_stuff): Update.
1194 (get_thread_context,set_thread_context,i386_thread_added): Update.
1195 (the_low_target): Add entries for insert_point,
1196 remove_point, stopped_by_watchpoint, stopped_data_address.
1197 * win32-low.c (win32_insert_watchpoint): New function.
1198 (win32_remove_watchpoint): New function.
1199 (win32_stopped_by_watchpoint): New function.
1200 (win32_stopped_data_address): New function.
1201 (win32_target_ops): Add entries for insert_watchpoint,
1202 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1203 * win32-low.h (win32_target_ops): New members insert_point,
1204 remove_point, stopped_by_watchpoint, stopped_data_address.
1206 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1208 * server.c (process_serial_event): Re-return unsupported, not
1209 error, if the type isn't recognized. Re-allow supporting only
1210 insert or remove packets. Also call require_running for
1211 breakpoints. Add missing break statement to default case. Tidy.
1212 * target.h (struct target_ops): Rename insert_watchpoint to
1213 insert_point, and remove_watchpoint to remove_point.
1215 * linux-low.h (struct linux_target_ops): Likewise.
1216 * linux-low.c (linux_insert_watchpoint): Rename to ...
1217 (linux_insert_point): ... this. Adjust.
1218 (linux_remove_watchpoint): Rename to ...
1219 (linux_remove_point): ... this. Adjust.
1220 (linux_target_ops): Adjust.
1221 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1222 (cris_insert_point): ... this.
1223 (cris_remove_watchpoint): Rename to ...
1224 (cris_remove_point): ... this.
1225 (the_low_target): Adjust.
1227 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1229 * server.c (handle_v_kill): Pass signal_pid to
1230 kill_inferior if multi_process is zero.
1232 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1234 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1235 * target.h (target_ops): Comment for *_watchpoint to make it clear
1236 the functions can get types '0' and '1'.
1238 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1240 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1241 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1242 * regcache.c (get_regcache): Likewise.
1243 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1244 * win32-low.c (child_fetch_inferior_registers): Remove check for
1247 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1248 Pedro Alves <pedro@codesourcery.com>
1250 * target.h (struct target_ops) <supports_multi_process>: New
1252 (target_supports_multi_process): New.
1253 * server.c (handle_query): Even if GDB reports support, only
1254 enable multi-process if the target also supports it. Report
1255 multi-process support only if the target backend supports it.
1256 * linux-low.c (linux_supports_multi_process): New function.
1257 (linux_target_ops): Install it as target_supports_multi_process
1260 2009-05-24 Doug Evans <dje@google.com>
1262 Global renaming of find_thread_pid to find_thread_ptid.
1263 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1264 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1265 All callers updated.
1267 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1268 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1271 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1272 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1273 (linux_resume_one_lwp): Ditto.
1275 2009-05-23 Doug Evans <dje@google.com>
1277 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1278 from struct inferior_list_entry * to struct lwp_info *.
1279 All callers updated.
1281 2009-05-13 Doug Evans <dje@google.com>
1283 * linux-x86-low.c: Don't include assert.h.
1284 (x86_siginfo_fixup): Use fatal, not assert.
1285 (x86_arch_setup): Fix comment.
1287 2009-05-12 Doug Evans <dje@google.com>
1289 Biarch support for i386/amd64 gdbserver.
1290 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1291 Add linux-x86-low.c.
1292 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1293 (linux-x86-low.o): Add.
1294 * linux-x86-64-low.c: Delete.
1295 * linux-i386-low.c: Delete.
1296 * linux-x86-low.c: New file.
1297 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1299 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1301 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1302 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1303 (linux_child_pid_to_exec_file): New function.
1304 (elf_64_header_p, elf_64_file_p): New functions.
1305 (siginfo_fixup): New function.
1306 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1307 give target a chance to convert layout.
1308 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1309 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1311 2009-05-07 Doug Evans <dje@google.com>
1313 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1314 (regsets_store_inferior_registers): Ditto.
1316 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1320 * linux-low.c (must_set_ptrace_flags): Delete.
1321 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1323 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1324 `lwp->must_set_ptrace_flags' instead.
1325 (linux_wait_for_event_1): Set ptrace options here.
1326 (linux_wait_1): ... not here.
1328 2009-04-30 Doug Evans <dje@google.com>
1330 * inferiors.c (started_inferior_callback): New function.
1331 (attached_inferior_callback): New function.
1332 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1333 * server.c (print_started_pid, print_attached_pid): New functions.
1334 (detach_or_kill_for_exit): New function.
1335 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1336 * server.h (have_started_inferiors_p): Declare.
1337 (have_attached_inferiors_p): Declare.
1339 * inferiors.c (remove_process): Fix memory leak, free process.
1340 * linux-low.c (linux_remove_process): New function.
1341 (linux_kill): Call it instead of remove_process.
1342 (linux_detach, linux_wait_1): Ditto.
1344 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1346 * configure.srv: Add x86 Windows CE target.
1348 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1350 * inferiors.c (get_thread_process): Make global.
1351 * server.h (get_thread_process): Add prototype.
1352 * thread-db.c (find_one_thread): Use get_thread_process
1353 instead of current_process.
1354 (thread_db_get_tls_address): Do not crash if called when
1355 thread layer is not yet initialized.
1357 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1359 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1360 * spu-low.c (current_tid): Rename to ...
1361 (current_ptid): ... this.
1362 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1363 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1364 ptid_get_lwp (current_ptid) instead of current_tid.
1365 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1366 instead of current_tid. Use find_process_pid to verify pid
1367 argument is valid. Pass proper argument to remove_process.
1368 (spu_thread_alive): Compare current_ptid instead of current_tid.
1369 (spu_resume): Likewise.
1371 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1373 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1376 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1378 Implement the multiprocess extensions, and add linux multiprocess
1381 * server.h (ULONGEST): Declare.
1382 (struct ptid, ptid_t): New.
1383 (minus_one_ptid, null_ptid): Declare.
1384 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1385 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1386 (struct inferior_list_entry): Change `id' type from unsigned from
1388 (struct sym_cache, struct breakpoint, struct
1389 process_info_private): Forward declare.
1390 (struct process_info): Declare.
1391 (current_process): Declare.
1392 (all_processes): Declare.
1393 (initialize_inferiors): Declare.
1394 (add_thread): Adjust to use ptid_t.
1395 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1396 (add_process, remove_process, find_thread_pid): Declare.
1397 (find_inferior_id): Adjust to use ptid_t.
1398 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1399 (multi_process): Declare.
1400 (push_event): Adjust to use ptid_t.
1401 (read_ptid, write_ptid): Declare.
1402 (prepare_resume_reply): Adjust to use ptid_t.
1403 (clear_symbol_cache): Declare.
1404 * inferiors.c (all_processes): New.
1405 (null_ptid, minus_one_ptid): New.
1406 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1407 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1408 (add_thread): Change unsigned long to ptid. Remove gdb_id
1410 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1411 (gdb_id_to_thread): Rename to ...
1412 (find_thread_pid): ... this. Change unsigned long to ptid.
1413 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1414 (loaded_dll, pull_pid_from_list): Adjust.
1415 (add_process, remove_process, find_process_pid)
1416 (get_thread_process, current_process, initialize_inferiors): New.
1417 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1418 (struct target_waitstatus) <related_pid>: Ditto.
1419 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1421 (struct target_ops) <join>: Add `pid' argument.
1422 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1423 (struct target_ops) <wait>: Add `ptid' field. Change return type
1425 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1426 (mywait): Add `ptid' argument. Change return type to ptid_t.
1427 (target_pid_to_str): Declare.
1428 * target.c (set_desired_inferior): Adjust to use ptids.
1429 (mywait): Add new `ptid' argument. Adjust.
1430 (target_pid_to_str): New.
1431 * mem-break.h (free_all_breakpoints): Declare.
1432 * mem-break.c (breakpoints): Delelete.
1433 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1434 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1435 to use per-process breakpoint list.
1436 (free_all_breakpoints): New.
1437 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1438 (symbol_cache, all_symbols_looked_up): Delete.
1440 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1442 (prepare_resume_reply): Change ptid argument's type from unsigned
1443 long to ptid_t. Adjust. Implement W;process and X;process.
1444 (free_sym_cache, clear_symbol_cache): New.
1445 (look_up_one_symbol): Adjust to per-process symbol cache. *
1446 * server.c (cont_thread, general_thread, step_thread): Change type
1449 (multi_process): New.
1450 (last_ptid): Change type to ptid_t.
1451 (struct vstop_notif) <ptid>: Change type to ptid_t.
1452 (queue_stop_reply, push_event): Change `ptid' argument's type to
1454 (discard_queued_stop_replies): Add `pid' argument.
1455 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1456 changes. Don't reference the `attached' global.
1457 (attach_inferior): Adjust to mywait interface changes.
1458 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1459 features. Handle and report "multiprocess+". Handle
1461 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1463 (handle_v_kill): New.
1464 (handle_v_stopped): Adjust to use target_pid_to_str.
1465 (handle_v_requests): Allow multiple attaches and runs when
1466 multiprocess extensions are in effect. Handle "vKill".
1467 (myresume): Adjust to use ptids.
1468 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1469 (handle_status): Adjust to discard_queued_stop_replies interface
1471 (first_thread_of, kill_inferior_callback)
1472 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1473 (main): Call initialize_inferiors. Adjust to use ptids, killing
1474 and detaching from all inferiors. Handle multiprocess packet
1476 * linux-low.h: Include gdb_proc_service.h.
1477 (struct process_info_private): New.
1478 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1479 <lwpid_of>: Use ptid_get_lwp.
1480 (get_lwp_thread): Adjust.
1481 (struct lwp_info): Add `dead' member.
1482 (find_lwp_pid): Declare.
1483 * linux-low.c (thread_db_active): Delete.
1484 (new_inferior): Adjust comment.
1485 (inferior_pid): Delete.
1486 (linux_add_process): New.
1487 (handle_extended_wait): Adjust.
1488 (add_lwp): Change unsigned long to ptid.
1489 (linux_create_inferior): Add process to processes table. Adjust
1490 to use ptids. Don't set new_inferior here.
1491 (linux_attach_lwp): Rename to ...
1492 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1493 it. Adjust to use ptids.
1494 (linux_attach_lwp): New.
1495 (linux_attach): Add process to processes table. Don't set
1497 (struct counter): New.
1498 (second_thread_of_pid_p, last_thread_of_process_p): New.
1499 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1501 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1502 processes. Remove process from process table.
1503 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1504 to multiple processes.
1505 (any_thread_of): New.
1506 (linux_detach): Add `pid' argument, and handle it. Remove process
1507 from processes table.
1508 (linux_join): Add `pid' argument. Handle it.
1509 (linux_thread_alive): Change unsighed long argument to ptid_t.
1510 Consider dead lwps as not being alive.
1511 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1512 threads we're not interested in.
1513 (same_lwp, find_lwp_pid): New.
1514 (linux_wait_for_lwp): Change `pid' argument's type from int to
1516 (linux_wait_for_event): Rename to ...
1517 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1518 from int to ptid_t. Adjust.
1519 (linux_wait_for_event): New.
1520 (linux_wait_1): Add `ptid' argument. Change return type to
1521 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1522 that exit from the process table.
1523 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1525 (mark_lwp_dead): New.
1526 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1527 stopping all threads, mark its main lwp as dead.
1528 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1530 (fetch_register, usr_store_inferior_registers)
1531 (regsets_fetch_inferior_registers)
1532 (regsets_store_inferior_registers, linux_read_memory)
1533 (linux_write_memory): Inline `inferior_pid'.
1534 (linux_look_up_symbols): Adjust to use per-process
1536 (linux_request_interrupt): Adjust to use ptids.
1537 (linux_read_auxv): Inline `inferior_pid'.
1538 (initialize_low): Don't reference thread_db_active.
1539 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1540 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1541 (ps_getpid): Return the pid of the current inferior.
1542 * thread-db.c (proc_handle, thread_agent): Delete.
1543 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1545 (find_one_thread): Change argument type to ptid_t. Adjust to
1547 (maybe_attach_thread): Adjust to per-process data and ptids.
1548 (thread_db_find_new_threads): Ditto.
1549 (thread_db_init): Ditto.
1550 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1551 processes table. Adjust to use ptids.
1552 (spu_kill, spu_detach): Adjust interface. Remove process from
1554 (spu_join, spu_thread_alive): Adjust interface.
1555 (spu_wait): Adjust interface. Remove process from processes
1556 table. Adjust to use ptids.
1557 * win32-low.c (current_inferior_tid): Delete.
1558 (current_inferior_ptid): New.
1559 (debug_event_ptid): New.
1560 (thread_rec): Take a ptid. Adjust.
1561 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1562 (child_delete_thread): Ditto.
1563 (do_initial_child_stuff): Add `attached' argument. Add process to
1565 (child_fetch_inferior_registers, child_store_inferior_registers):
1567 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1568 (win32_attach): Pass 1 to do_initial_child_stuff.
1569 (win32_kill): Adjust interface. Remove process from processes
1571 (win32_detach): Ditto.
1572 (win32_join): Adjust interface.
1573 (win32_thread_alive): Take a ptid.
1574 (win32_resume): Adjust to use ptids.
1575 (get_child_debug_event): Ditto.
1576 (win32_wait): Adjust interface. Remove exiting process from
1579 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1581 Non-stop mode support.
1583 * server.h (non_stop): Declare.
1584 (gdb_client_data, handler_func): Declare.
1585 (delete_file_handler, add_file_handler, start_event_loop):
1587 (handle_serial_event, handle_target_event, push_event)
1588 (putpkt_notif): Declare.
1589 * target.h (enum resume_kind): New.
1590 (struct thread_resume): Replace `step' field by `kind' field.
1591 (TARGET_WNOHANG): Define.
1592 (struct target_ops) <wait>: Add `options' argument.
1593 <supports_non_stop, async, start_non_stop>: New fields.
1594 (target_supports_non_stop, target_async): New.
1595 (start_non_stop): Declare.
1596 (mywait): Add `options' argument.
1597 * target.c (mywait): Add `options' argument. Print child exit
1599 (start_non_stop): New.
1600 * server.c (non_stop, own_buf, mem_buf): New globals.
1601 (struct vstop_notif): New.
1602 (notif_queue): New global.
1603 (queue_stop_reply, push_event, discard_queued_stop_replies)
1604 (send_next_stop_reply): New.
1605 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1607 (attach_inferior): In non-stop mode, don't wait for the target
1609 (handle_general_set): Handle QNonStop.
1610 (handle_query): When handling qC, return the current general
1611 thread, instead of the first thread of the list.
1612 (handle_query): If the backend supports non-stop mode, include
1613 QNonStop+ in the qSupported query response.
1614 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1616 (handle_v_attach, handle_v_run): Handle non-stop mode.
1617 (handle_v_stopped): New.
1618 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1619 (myresume): Adjust to use resume_kind. Handle non-stop.
1620 (queue_stop_reply_callback): New.
1621 (handle_status): Handle non-stop mode.
1622 (main): Clear non_stop flag on reconnection. Use the event-loop.
1623 Refactor serial protocol handling from here ...
1624 (process_serial_event): ... to this new function. When GDB
1625 selects any thread, select one here. In non-stop mode, wait until
1626 GDB acks all pending events before exiting.
1627 (handle_serial_event, handle_target_event): New.
1628 * remote-utils.c (remote_open): Install remote_desc in the event
1630 (remote_close): Remove remote_desc from the event loop.
1631 (putpkt_binary): Rename to...
1632 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1633 (putpkt_binary): New as wrapper around putpkt_binary_1.
1634 (putpkt_notif): New.
1635 (prepare_resume_reply): In non-stop mode, don't change the
1637 * event-loop.c: New.
1638 * Makefile.in (OBJ): Add event-loop.o.
1639 (event-loop.o): New rule.
1641 * linux-low.h (pid_of): Moved here.
1643 (get_lwp_thread): Use lwpid_of.
1644 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1645 * linux-low.c (pid_of): Delete.
1646 (inferior_pid): Use lwpid_of.
1647 (linux_event_pipe): New.
1648 (target_is_async_p): New.
1650 (handle_extended_wait): Use lwpid_of.
1651 (add_lwp): Don't set lwpid field.
1652 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1653 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1654 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1655 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1656 first. Adjust to linux_wait_for_event interface changes. Use
1658 (linux_detach): Don't delete the main lwp here.
1659 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1660 (status_pending_p): Don't consider explicitly suspended lwps.
1661 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1662 pointer. Add OPTIONS argument. Change return type to int. Use
1663 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1664 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1665 pointer. Add status pointer argument. Return a pid instead of a
1666 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1667 changes. In non-stop mode, don't switch to a random thread.
1668 (linux_wait): Rename to...
1669 (linux_wait_1): ... this. Add target_options argument, and handle
1670 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1671 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1672 clean exit and signal exit code. Don't stop all threads in
1673 non-stop mode. In all-stop mode, only stop all threads when
1674 reporting a stop to GDB. Handle explicit thread stop requests.
1675 (async_file_flush, async_file_mark): New.
1677 (send_sigstop): Use lwpid_of.
1678 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1679 interface changes. In non-stop mode, don't switch to a random
1681 (linux_resume_one_lwp): Use lwpid_of.
1682 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1683 (linux_resume_one_thread): ... this. Handle resume_stop. In
1684 non-stop mode, don't look for pending flag in all threads.
1685 (resume_status_pending_p): Don't consider explicitly suspended
1687 (my_waitpid): Reimplement. Emulate __WALL.
1688 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1690 (sigchld_handler, linux_supports_non_stop, linux_async)
1691 (linux_start_non_stop): New.
1692 (linux_target_ops): Register linux_supports_non_stop, linux_async
1693 and linux_start_non_stop.
1694 (initialize_low): Install SIGCHLD handler.
1695 * thread-db.c (thread_db_create_event, find_one_thread)
1696 (thread_db_get_tls_address): Use lwpid_of.
1697 * win32-low.c (win32_detach): Adjust to use resume_kind.
1698 (win32_wait): Add `options' argument.
1699 * spu-low.c (spu_resume): Adjust to use resume_kind.
1700 (spu_wait): Add `options' argument.
1702 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1704 Decouple target code from remote protocol.
1706 * target.h (enum target_waitkind): New.
1707 (struct target_waitstatus): New.
1708 (struct target_ops) <wait>: Return an unsigned long. Take a
1709 target_waitstatus pointer instead of a char pointer.
1711 * target.c (mywait): Change prototype to return an unsigned long.
1712 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1713 * server.h (thread_from_wait, old_thread_from_wait): Delete
1715 (prepare_resume_reply): Change prototype to take a
1717 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1718 (last_status, last_ptid): New.
1719 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1720 pid instead of a signal.
1721 (attach_inferior): Remove "status" and "signal" parameters.
1723 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1725 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1726 (handle_v_requests, myresume): Remove "status" and "signal"
1728 (handle_status): New.
1729 (main): Delete local `status'. Adjust.
1730 * remote-utils.c: Include target.h.
1731 (prepare_resume_reply): Change prototype to take a
1732 target_waitstatus. Adjust.
1734 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1736 * spu-low.c (spu_wait): Adjust.
1737 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1739 (win32_wait): Adjust.
1741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1743 * target.h (struct thread_resume): Delete leave_stopped member.
1744 (struct target_ops): Add a `n' argument to the `resume' callback.
1745 * server.c (start_inferior): Adjust.
1746 (handle_v_cont, myresume): Adjust.
1747 * linux-low.c (check_removed_breakpoint): Adjust to resume
1748 interface change, and to removed leave_stopped field.
1749 (resume_ptr): Delete.
1750 (struct thread_resume_array): New.
1751 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1752 resume interface change.
1753 (linux_continue_one_thread, linux_queue_one_thread)
1754 (resume_status_pending_p): Check if the resume field is NULL
1755 instead of checking the leave_stopped member.
1756 (linux_resume): Adjust to the target resume interface change.
1757 * spu-low.c (spu_resume): Adjust to the target resume interface
1759 * win32-low.c (win32_detach, win32_resume): Ditto.
1761 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1763 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1765 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1767 (linux_continue_one_thread): Only preserve the stepping flag if
1768 there's a pending breakpoint.
1770 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1772 * server.c (main): After the inferior having exited, call
1773 remote_close before exiting gdbserver.
1775 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1777 Fix size of FPSCR in Power 7 processors.
1778 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1779 (PPC_FEATURE_HAS_DFP): New #define.
1780 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1783 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1785 * server.c (handle_query) Whitespace and formatting.
1787 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1789 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1790 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1791 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1792 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1793 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1794 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1795 Makefile.in, configure.ac: Fix whitespace throughout.
1796 * configure: Regenerate.
1798 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1800 * inferiors.c (find_inferior): Make it safe for the callback
1801 function to delete the currently iterated inferior.
1803 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1805 * Makefile.in (linuw_low_h): Move higher.
1806 (thread-db.o): Depend on $(linux_low_h).
1808 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1810 Rename "process" to "lwp" throughout.
1812 * linux-low.c (all_processes): Rename to...
1813 (all_lwps): ... this.
1814 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1815 (add_process): Rename to ...
1816 (add_lwp): ... this. Adjust.
1817 (linux_create_inferior): Adjust.
1818 (linux_attach_lwp): Adjust.
1819 (linux_attach): Adjust.
1820 (linux_kill_one_process): Rename to ...
1821 (linux_kill_one_lwp): ... this. Adjust.
1822 (linux_kill): Adjust.
1823 (linux_detach_one_process): Rename to ...
1824 (linux_detach_one_lwp): ... this. Adjust.
1825 (linux_detach): Adjust.
1826 (check_removed_breakpoint): Adjust.
1827 (status_pending_p): Adjust.
1828 (linux_wait_for_process): Rename to ...
1829 (linux_wait_for_lwp): ... this. Adjust.
1830 (linux_wait_for_event): Adjust.
1831 (send_sigstop): Adjust.
1832 (wait_for_sigstop): Adjust.
1833 (stop_all_processes): Rename to ...
1834 (stop_all_lwps): ... this.
1835 (linux_resume_one_process): Rename to ...
1836 (linux_resume_one_lwp): ... this. Adjust.
1837 (linux_set_resume_request, linux_continue_one_thread)
1838 (linux_queue_one_thread, resume_status_pending_p)
1839 (usr_store_inferior_registers, regsets_store_inferior_registers)
1840 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1842 * linux-low.h (get_process): Rename to ...
1843 (get_lwp): ... this. Adjust.
1844 (get_thread_process): Rename to ...
1845 (get_thread_lwp): ... this. Adjust.
1846 (get_process_thread): Rename to ...
1847 (get_lwp_thread): ... this. Adjust.
1848 (struct process_info): Rename to ...
1849 (struct lwp_info): ... this.
1850 (all_processes): Rename to ...
1851 (all_lwps): ... this.
1852 * proc-service.c (ps_lgetregs): Adjust.
1853 * thread-db.c (thread_db_create_event, find_one_thread)
1854 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1856 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1858 * server.c (handle_query): Handle "qAttached".
1860 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1862 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1863 GPLv3, update license URL.
1865 2009-03-01 Doug Evans <dje@google.com>
1867 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1868 (server_h): Add gdb_signals.h.
1869 (signals.o): Update.
1870 * server.h (target_signal_from_host,target_signal_to_host_p)
1871 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1873 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1875 * remote-utils.c (getpkt): Also generate remote-debug
1876 information if noack_mode is set.
1878 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1880 * server.c (handle_query): Report qXfer:siginfo:read and
1881 qXfer:siginfo:write as supported and handle them.
1882 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1883 * linux-low.c (linux_xfer_siginfo): New.
1884 (linux_target_ops): Set it.
1886 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1888 * server.c (gdbserver_usage): Mention --remote-debug.
1889 (main): Accept '--remote-debug' switch.
1891 2009-01-18 Doug Evans <dje@google.com>
1893 * regcache.c (new_register_cache): No need to check result of xcalloc.
1894 * server.c (handle_search_memory): Back out calls to xmalloc,
1895 result is checked and error is returned to user upon failure.
1896 (handle_query): Ditto. Add more checks for result of malloc.
1897 (handle_v_cont): Check result of malloc, report error back to
1899 (handle_v_run): Ditto. Call freeargv.
1900 * server.h (freeargv): Declare.
1901 * utils.c (freeargv): New fn.
1903 2009-01-15 Doug Evans <dje@google.com>
1905 * gdbreplay.c (perror_with_name): Make arg const char *.
1906 * server.h (target_signal_to_name): Make return type const char *.
1907 * thread-db.c (thread_db_err_str): Make return type const char *.
1908 * utils.c (perror_with_name): Make arg const char *.
1910 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1912 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1913 when handling a EXIT_PROCESS_DEBUG_EVENT.
1915 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1917 * gdbreplay.c (gdbreplay_version): Update copyright year.
1918 * server.c (gdbserver_version): Likewise.
1920 2009-01-05 Doug Evans <dje@google.com>
1922 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1923 (handle_extended_wait): Improve comment.
1925 2008-12-13 Doug Evans <dje@google.com>
1927 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1928 * server.h (ATTR_MALLOC): New macro.
1929 (xmalloc,xcalloc,xstrdup): Declare.
1930 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1931 * inferiors.c: Ditto.
1932 * linux-low.c: Ditto.
1933 * mem-break.c: Ditto.
1934 * regcache.c: Ditto.
1935 * remote-utils.c: Ditto.
1938 * win32-low.c: Ditto.
1940 2008-12-12 Doug Evans <dje@google.com>
1942 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1943 in debugging printf.
1945 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1947 2008-12-09 Doug Evans <dje@google.com>
1949 * linux-low.h (struct process_info): Delete member tid, unused.
1950 * thread-db.c (find_one_thread): Update.
1951 (maybe_attach_thread): Update.
1953 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1955 * target.h (struct target_ops): Add qxfer_osdata member.
1956 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1958 (linux_qxfer_osdata): New functions.
1959 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1961 * server.c (handle_query): Handle "qXfer:osdata:read:".
1962 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1963 (buffer_xml_printf): New functions.
1964 * server.h (struct buffer): New.
1965 (buffer_grow_str, buffer_grow_str0): New macros.
1966 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1967 (buffer_xml_printf): Declare.
1969 2008-11-24 Doug Evans <dje@google.com>
1971 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1973 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1975 * server.c (handle_v_run): Always use the supplied argument list.
1977 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1979 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1980 (xtensa_regmap_table): Add entry for scompare1.
1982 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1984 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1985 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1986 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1987 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1988 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1989 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1990 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1991 XML target descriptions.
1992 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1993 when inferior is running on an ISA 2.05 or later processor. Add
1994 special case to return offset for full 64-bit slot of FPSCR when
1997 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1999 * Makefile.in (SFILES, clean): Added sparc64 files.
2000 (reg-sparc64.o, reg-sparc64.c): New.
2001 * configure.srv (sparc*-*-linux*): New configuration.
2002 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2003 syscall arguments for SPARC.
2004 (regsets_store_inferior_registers): Likewise.
2005 * linux-sparc-low.c: New file.
2007 2008-10-21 Doug Evans <dje@google.com>
2009 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2010 (READLINE_DIR,READLINE_DEP): Delete.
2011 (INTERNAL_CFLAGS): Update.
2012 (LINTFLAGS): Update.
2014 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2016 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2017 whole argv from the last run, not just argv[0].
2019 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2021 * regcache.c (new_register_cache): Return NULL if the register
2022 cache size isn't known yet.
2023 (free_register_cache): Avoid dereferencing a NULL regcache.
2025 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2027 * configure.srv: Merge MIPS and MIPS64.
2029 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2031 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2033 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2035 * Makefile.in: Add required vsx dependencies.
2037 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2038 Declare init_registers_powerpc_vsx32l.
2039 Declare init_registers_powerpc_vsx64l.
2040 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2041 (ppc_arch_setup): Check for VSX in hwcap.
2042 (ppc_fill_vsxregset): New function.
2043 (ppc_store_vsxregset): New function.
2044 Add new VSX entry in regset_info target_regsets.
2046 * configure.srv: Add new VSX dependencies.
2048 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2050 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2051 (remote_open): Set or clear transport_is_reliable.
2052 (putpkt_binary): Don't expect acks in noack mode.
2053 (getpkt): Don't send ack/nac in noack mode.
2054 * server.c (handle_general_set): Handle QStartNoAckMode.
2055 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2057 (main): Reset noack_mode on every connection.
2058 * server.h (noack_mode): Declare.
2060 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2062 * Makefile.in (GDBREPLAY_OBS): New variable.
2063 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2065 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2066 Daniel Jacobowitz <dan@codesourcery.com>
2068 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2069 (usr_store_inferior_registers): Likewise.
2070 (regsets_store_inferior_registers): Likewise.
2072 2008-07-31 Rolf Jansen <rj@surtec.com>
2073 Pedro Alves <pedro@codesourcery.com>
2075 * configure.ac: Check for memmem declaration.
2076 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2077 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2078 (disable_packet_qfThreadInfo): Unconditionally compile.
2079 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2080 * configure, config.in: Regenerate.
2082 2008-07-28 Doug Kwan <dougkwan@google.com>
2084 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2085 (linux_write_memory): Remove declaration of errno.
2087 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2089 * linux-low.c (handle_extended_wait): Do not use "status"
2090 variable uninitialized.
2092 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2094 * server.c (handle_v_attach): Inhibit reporting dll changes.
2096 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2098 * remote-utils.c (prepare_resume_reply): If requested, don't
2099 output "thread:TID" in the T stop reply.
2101 * server.c (disable_packet_vCont, disable_packet_Tthread)
2102 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2103 (handle_query): If requested, disable support for qC, qfThreadInfo
2105 (handle_v_requests): If requested, disable support for vCont.
2106 (gdbserver_show_disableable): New.
2107 (main): Handle --disable-packet and --disable-packet=LIST.
2109 * server.h (disable_packet_vCont, disable_packet_Tthread)
2110 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2112 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2114 * server.c (gdbserver_usage): Mention --version.
2116 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2118 * Makefile.in (gdbreplay.o): New rule.
2120 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2122 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2123 message, not gdbserver.
2125 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2126 Nathan Sidwell <nathan@codesourcery.com>
2127 Joseph Myers <joseph@codesourcery.com>
2129 * acinclude.m4: Include ../../config/acx.m4.
2130 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2131 * configure, config.in: Regenerate.
2132 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2133 * server.c (gdbserver_version): Print PKGVERSION.
2134 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2135 (main): Adjust gdbserver_usage calls.
2136 * gdbreplay.c (version, host_name): Add declarations.
2137 (gdbreplay_version, gdbreplay_usage): New.
2138 (main): Accept --version and --help options.
2140 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2142 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2143 (arm_breakpoint_at): Handle Thumb.
2144 (the_low_target): Add comment.
2146 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2148 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2150 2008-05-09 Doug Evans <dje@google.com>
2152 * server.h (decode_search_memory_packet): Declare.
2153 * remote-utils.c (decode_search_memory_packet): New fn.
2154 * server.c (handle_search_memory_1): New fn.
2155 (handle_search_memory): New fn.
2156 (handle_query): Process qSearch:memory packets.
2158 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2160 * regcache.c (registers_length): Remove.
2161 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2162 full register packet.
2163 * regcache.h (registers_length): Remove prototype.
2164 * server.h (PBUFSIZ): Define to 16384.
2166 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2168 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2169 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2170 powerpc-64l.o, and powerpc-altivec64l.o.
2171 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2172 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2173 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2174 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2175 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2178 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2179 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2180 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2181 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2182 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2183 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2184 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2185 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2186 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2187 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2190 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2191 (init_registers_powerpc_32l): ... this new prototype.
2192 (init_registers_powerpc_32): Remove, replace by ...
2193 (init_registers_powerpc_altivec32l): ... this new prototype.
2194 (init_registers_powerpc_e500): Remove, replace by ...
2195 (init_registers_powerpc_e500l): ... this new prototype.
2196 (init_registers_ppc64): Remove, replace by ...
2197 (init_registers_powerpc_64l): ... this new prototype.
2198 (init_registers_powerpc_64): Remove, replace by ...
2199 (init_registers_powerpc_altivec64l): ... this new prototype.
2200 (ppc_num_regs): Set to 73.
2201 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2202 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2203 (ppc_cannot_store_register): Handle orig_r3 and trap.
2204 (ppc_arch_setup): Update init_registers_... calls.
2205 (ppc_fill_gregset): Handle orig_r3 and trap.
2207 * inferiors.c (clear_inferiors): Reset current_inferior.
2209 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2211 * acinclude.m4: Add override.m4.
2212 * configure: Regenerate.
2214 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2216 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2217 initial call to init_register_ppc64.
2219 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2221 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2222 powerpc*-*-linux* case.
2223 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2225 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2227 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2228 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2230 * linux-ppc-low.c: Include <elf.h>.
2231 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2232 (ppc_hwcap): New global variable.
2233 (ppc_regmap): Remove __SPE__ #ifdef sections.
2234 (ppc_regmap_e500): New global variable.
2235 (ppc_cannot_store_register): Update __SPE__ special case.
2236 (ppc_get_hwcap): New function.
2237 (ppc_arch_setup): Use it to determine whether inferior supports
2238 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2239 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2240 Do not access registers if target does not support AltiVec.
2241 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2242 Do not access registers if target does not support SPE.
2243 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2245 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2247 * linux-low.c (disabled_regsets, num_regsets): New.
2248 (use_regsets_p): Delete.
2249 (linux_wait_for_process): Clear disabled_regsets.
2250 (regsets_fetch_inferior_registers): Check and set it.
2251 (regsets_store_inferior_registers): Likewise.
2252 (linux_fetch_registers, linux_store_registers): Do not use
2254 (initialize_low): Allocate disabled_regsets.
2256 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2258 * Makefile.in (LIBOBJS): New.
2260 (memmem.o): New rule.
2261 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2262 * configure: Regenerated.
2264 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2266 * server.c (handle_query): Never return "unsupported" for
2267 qXfer:features:read queries.
2269 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2271 * server.c (get_features_xml): Fix inverted condition.
2272 (handle_query): Always support qXfer:feature:read.
2274 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2276 * server.c (wrapper_argv): New.
2277 (start_inferior): Handle wrapper_argv. If set, expect an extra
2279 (gdbserver_usage): Document --wrapper.
2280 (main): Parse --wrapper.
2282 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2284 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2285 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2286 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2287 (ppc_set_pc): Likewise.
2288 (ppc_arch_setup): New function.
2289 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2290 of collect_register.
2291 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2293 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2295 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2296 instead of linux-ppc64-low.o.
2297 * linux-ppc64-low.c: Remove file.
2298 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2299 (linux-ppc64-low.o): Remove rule.
2301 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2302 (init_registers_powerpc_64): Likewise.
2303 (ppc_regmap): Conditionally define depending on __powerpc64__.
2304 (ppc_cannot_store_register): Do not special-case "fpscr" when
2305 compiled on __powerpc64__.
2306 (ppc_collect_ptrace_register): New function.
2307 (ppc_supply_ptrace_register): New function.
2308 (ppc_breakpoint): Change type to "unsigned int".
2309 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2310 (the_low_target): Conditionally provide initializers for the
2311 arch_setup member depending on __powerpc64__. Install
2312 collect_ptrace_register and supply_ptrace_register members.
2314 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2316 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2317 * server.c (gdbserver_xmltarget): Define.
2318 (get_features_xml): Use it to replace "target.xml" and arch_string.
2320 * configure.srv: Remove srv_xmltarget. Add XML files that were
2321 mentioned there to srv_xmlfiles instead. Remove conditional tests
2322 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2323 srv_xmlfiles and srv_regobj to include all possible choices.
2324 * configure.ac (srv_xmltarget): Remove.
2325 (srv_xmlfiles): Do not add "target.xml".
2326 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2327 checks for supplementary target information.
2328 * configure: Regenerate.
2329 * Makefile.in (XML_TARGET): Remove.
2330 (target.xml): Remove rule.
2331 (clean): Do not clean up target.xml.
2332 (.PRECIOUS): Do not mention target.xml.
2334 * target.h (struct target_ops): Remove arch_string member.
2335 * linux-low.c (linux_arch_string): Remove.
2336 (linux_target_ops): Remove arch_string initializer.
2337 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2338 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2339 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2340 * spu-low.c (spu_arch_string): Remove.
2341 (spu_target_ops): Remove arch_string initializer.
2342 * win32-low.c (win32_arch_string): Remove.
2343 (win32_target_ops): Remove arch_string initializer.
2344 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2345 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2346 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2348 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2350 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2351 by collect_ptrace_register and supply_ptrace_register hooks.
2352 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2353 instead of checking for the_low_target.left_pad_xfer.
2354 (usr_store_inferior_registers): Use collect_ptrace_register callback
2355 instead of checking for the_low_target.left_pad_xfer.
2357 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2358 (s390_supply_ptrace_register): Likewise.
2359 (s390_fill_gregset): Call s390_collect_ptrace_register.
2360 (the_low_target): Update.
2362 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2363 (ppc_supply_ptrace_register): Likewise.
2364 (the_low_target): Update.
2366 * linux-i386-low.c (the_low_target): Update.
2367 * linux-x86-64-low.c (the_low_target): Update.
2369 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2371 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2372 reg-s390.o and reg-s390x.o.
2374 * linux-low.c (new_inferior): New global variable.
2375 (linux_create_inferior, linux_attach): Set it.
2376 (linux_wait_for_process): Call the_low_target.arch_setup after the
2377 target has stopped for the first time.
2378 (initialize_low): Do not call the_low_target.arch_setup.
2380 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2381 (s390_set_pc): Likewise.
2382 (s390_arch_setup): New function.
2383 (the_low_target): Use s390_arch_setup as arch_setup routine.
2385 * regcache.c (realloc_register_cache): New function.
2386 (set_register_cache): Call it for each existing regcache.
2388 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2390 * server.h (init_registers): Remove prototype.
2392 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2393 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2394 instead of init_registers ().
2395 * linux-arm-low.c (init_registers_arm): Add prototype.
2396 (init_registers_arm_with_iwmmxt): Likewise.
2397 (the_low_target): Add initializer for arch_setup field.
2398 * linux-cris-low.c (init_registers_cris): Add prototype.
2399 (the_low_target): Add initializer for arch_setup field.
2400 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2401 (the_low_target): Add initializer for arch_setup field.
2402 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2403 (the_low_target): Add initializer for arch_setup field.
2404 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2405 (the_low_target): Add initializer for arch_setup field.
2406 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2407 (the_low_target): Add initializer for arch_setup field.
2408 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2409 (the_low_target): Add initializer for arch_setup field.
2410 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2411 (init_registers_mips64_linux): Likewise.
2412 (the_low_target): Add initializer for arch_setup field.
2413 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2414 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2415 (the_low_target): Add initializer for arch_setup field.
2416 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2417 (init_registers_powerpc_64): Likewise.
2418 (the_low_target): Add initializer for arch_setup field.
2419 * linux-s390-low.c (init_registers_s390): Add prototype.
2420 (init_registers_s390x): Likewise.
2421 (the_low_target): Add initializer for arch_setup field.
2422 * linux-sh-low.c (init_registers_sh): Add prototype.
2423 (the_low_target): Add initializer for arch_setup field.
2424 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2425 (the_low_target): Add initializer for arch_setup field.
2426 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2427 (the_low_target): Add initializer for arch_setup field.
2429 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2430 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2431 instead of init_registers ().
2432 * win32-arm-low.c (init_registers_arm): Add prototype.
2433 (the_low_target): Add initializer for arch_setup field.
2434 * win32-i386-low.c (init_registers_i386): Add prototype.
2435 (the_low_target): Add initializer for arch_setup field.
2437 * spu-low.c (init_registers_spu): Add prototype.
2438 (initialize_low): Call initialie_registers_spu () instead of
2439 initialize_registers ().
2441 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2443 * server.c (handle_v_requests): When handling the vRun and vAttach
2444 packets, if already debugging a process, don't kill it. Return an
2447 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2449 * server.c (handle_query): Correct length check.
2451 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2453 * win32-low.c (do_initial_child_stuff): Add process handle
2454 parameter. Set current_process_handle and current_process_id from the
2455 parameters. Clear globals.
2456 (win32_create_inferior): Don't set current_process_handle and
2457 current_process_id here. Instead pass them on the call to
2458 do_initial_child_stuff.
2459 (win32_attach): Likewise.
2460 (win32_clear_inferiors): New.
2461 (win32_kill): Don't close the current process handle or the
2462 current thread handle here. Instead call win32_clear_inferiors.
2463 (win32_detach): Don't open a new handle to the process. Call
2464 win32_clear_inferiors.
2465 (win32_join): Don't rely on current_process_handle; open a new
2466 handle using the process id.
2467 (win32_wait): Call win32_clear_inferiors when the inferior process
2470 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2472 * server.c (monitor_show_help): Add "exit".
2474 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2476 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2477 (clean): Add reg-xtensa.c.
2478 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2479 * configure.srv (xtensa*-*-linux*) New target.
2480 * linux-xtensa-low.c: New.
2481 * xtensa-xtregs.c: New.
2483 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2485 * hostio.c: Don't include errno.h.
2486 (errno_to_fileio_errno): Move to hostio-errno.
2487 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2488 error number outputting to the target->hostio_last_error callback.
2489 (hostio_packet_error): Use FILEIO_EINVAL directly.
2490 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2491 calls to hostio_error.
2492 * hostio-errno.c: New.
2493 * server.h (hostio_last_error_from_errno): Declare.
2494 * target.h (target_ops): Add hostio_last_error member.
2495 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2496 as hostio_last_error handler.
2497 * spu-low.c (spu_target_ops): Likewise.
2498 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2499 (wince_hostio_last_error): New functions.
2500 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2501 as hostio_last_error handler.
2502 (win32_target_ops) [!_WIN32_WCE]: Register
2503 hostio_last_error_from_errno as hostio_last_error handler.
2504 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2505 (hostio-errno.o): New rule.
2506 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2507 * configure.srv (srv_hostio_err_objs): New variable. Default to
2509 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2510 * configure: Regenerate.
2512 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2514 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2515 (linux_kill, linux_detach): Clean up the process list.
2516 * remote-utils.c (remote_open): Improve port number parsing.
2517 (putpkt_binary, input_interrupt): Only send interrupts if the target
2519 * server.c (extended_protocol): Make static.
2520 (attached): Define earlier.
2521 (exit_requested, response_needed, program_argv): New variables.
2522 (target_running): New.
2523 (start_inferior): Clear attached here.
2524 (attach_inferior): Set attached here.
2525 (require_running): Define.
2526 (handle_query): Use require_running and target_running. Implement
2528 (handle_v_attach, handle_v_run): New.
2529 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2530 (gdbserver_usage): Update.
2531 (main): Redo argument parsing. Handle --debug and --multi. Handle
2532 --attach along with other options or after the port. Save
2533 program_argv. Support no initial program. Resynchronize
2534 communication with GDB after an error. Handle "monitor exit".
2535 Use require_running and target_running. Always allow the extended
2536 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2537 restart in extended mode.
2538 * README: Refer to the GDB manual. Update --attach usage.
2540 2007-12-20 Andreas Schwab <schwab@suse.de>
2542 * linux-low.c (STACK_SIZE): Define.
2543 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2544 (linux_test_for_tracefork): Likewise.
2546 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2548 * linux-low.c (linux_wait_for_event): Update messages. Do not
2549 reinsert auto-delete breakpoints.
2550 * mem-break.c (struct breakpoint): Change return type of handler to
2552 (set_breakpoint_at): Update handler type.
2553 (reinsert_breakpoint_handler): Return 1 instead of calling
2555 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2557 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2558 * mem-break.h (set_breakpoint_at): Update handler type.
2559 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2560 * win32-low.c (auto_delete_breakpoint): New.
2561 (get_child_debug_event): Use it.
2563 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2565 * configure.ac: Check for pread and pwrite.
2566 * hostio.c (handle_pread): Fall back to lseek and read.
2567 (handle_pwrite): Fall back to lseek and write.
2568 * config.in, configure: Regenerated.
2570 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2572 * server.c (myresume): Add own_buf argument.
2573 (main): Update calls.
2575 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2577 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2578 * remote-utils.c (remote_open): Do not call disable_async_io.
2579 (block_async_io): Delete.
2580 (unblock_async_io): Make static.
2581 (initialize_async_io): New.
2582 * server.c (handle_v_cont): Handle async I/O here.
2583 (myresume): Likewise. Move other common resume tasks here...
2584 (main): ... from here. Call initialize_async_io. Disable async
2585 I/O before the main loop.
2586 * server.h (initialize_async_io): Declare.
2587 (block_async_io, unblock_async_io): Delete prototypes.
2588 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2590 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2592 * remote-utils.c (readchar): Allow binary data in received messages.
2594 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2596 * win32-low.c (attaching): New global.
2597 (win32_create_inferior): Clear the `attaching' global.
2598 (win32_attach): Set the `attaching' global.
2599 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2600 attaching. Only set a breakpoint at the entry point if not
2603 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2605 * server.c (main): Don't report dll events on the initial
2606 connection on attaches.
2608 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2610 * server.c (main): Relax numerical bases supported for the pid of
2611 the --attach command line argument.
2613 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2615 * win32-low.c (win32_attach): Call OpenProcess before
2616 DebugActiveProcess, not after. Add last error output to error
2619 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2621 * win32-low.c (win32_get_thread_context)
2622 (win32_set_thread_context): New functions.
2623 (thread_rec): Use win32_get_thread_context.
2624 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2625 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2628 2007-12-03 Leo Zayas
2629 Pedro Alves <pedro_alves@portugalmail.pt>
2631 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2633 (child_add_thread): Minor cleanup.
2634 (child_continue): Resume artificially suspended threads before
2635 calling ContinueDebugEvent.
2636 (suspend_one_thread): New.
2637 (fake_breakpoint_event): New.
2638 (get_child_debug_event): Change return type to int. Check here if
2639 gdb sent an interrupt request. If a soft interrupt was requested,
2640 fake a breakpoint event. Return 0 if there is no event to handle,
2642 (win32_wait): Don't check here if gdb sent an interrupt request.
2643 Ensure there is a valid event to handle.
2644 (win32_request_interrupt): Add soft interruption method as last
2647 2007-12-03 Leo Zayas
2648 Pedro Alves <pedro_alves@portugalmail.pt>
2650 * win32-low.h (win32_thread_info): Add descriptions to the
2651 structure members. Replace `suspend_count' counter by a
2653 * win32-low.c (thread_rec): Update condition of when to get the
2654 context from the inferior. Rely on ContextFlags being set if it
2655 has already been retrieved. Only suspend the inferior thread if
2656 we haven't already. Warn if that fails.
2657 (continue_one_thread): s/suspend_count/suspended/. Only call
2658 ResumeThread once. Warn if that fails.
2660 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2662 * win32-low.c (win32_wait): Don't read from the inferior when it
2665 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2667 * Makefile.in (win32_low_h): New variable.
2668 (win32-low.o): Add dependency on $(win32_low_h).
2669 (win32-arm-low.o, win32-i386-low.o): New rules.
2671 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2673 * hostio.c: Correct copyright year.
2675 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2677 * Makefile.in (OBS): Add hostio.o.
2678 (hostio.o): New rule.
2679 * server.h (handle_vFile): Declare.
2680 * hostio.c: New file.
2681 * server.c (handle_v_requests): Take packet_len and new_packet_len
2682 for binary packets. Call handle_vFile.
2683 (main): Update call to handle_v_requests.
2685 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2687 * linux-low.c: Include <sched.h>.
2689 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2691 * linux-low.c (linux_tracefork_grandchild): New.
2692 (linux_tracefork_child): Use clone.
2693 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2695 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2697 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2699 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2701 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2703 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2705 * inferiors.c (change_inferior_id): Delete.
2706 (add_pid_to_list, pull_pid_from_list): New.
2707 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2708 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2709 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2710 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2711 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2712 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2713 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2714 (using_threads): Always set to 1.
2715 (handle_extended_wait): New.
2716 (add_process): Do not set TID.
2717 (linux_create_inferior): Set must_set_ptrace_flags.
2718 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2719 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2720 (linux_thread_alive): Rename TID argument to LWPID.
2721 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2722 (linux_wait_for_event): Do not use TID or check using_threads. Update
2723 call to dead_thread_notify. Call handle_extended_wait.
2724 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2725 (send_sigstop): Delete sigstop_sent.
2726 (wait_for_sigstop): Avoid TID.
2727 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2728 (linux_test_for_tracefork): New.
2729 (linux_lookup_signals): Use thread_db_active and
2730 linux_supports_tracefork_flag.
2731 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2732 * linux-low.h (get_process_thread): Avoid TID.
2733 (struct process_ifo): Move thread_known and tid to the end. Remove
2735 (linux_attach_lwp, thread_db_init): Update prototypes.
2736 * server.h (change_inferior_id): Delete prototype.
2737 (add_pid_to_list, pull_pid_from_list): New prototypes.
2738 * thread-db.c (thread_db_use_events): New.
2739 (find_first_thread): Rename to...
2740 (find_one_thread): ...this. Update callers and messages. Do not
2741 call fatal. Check thread_db_use_events. Do not call
2742 change_inferior_id or new_thread_notify.
2743 (maybe_attach_thread): Update. Do not call new_thread_notify.
2744 (thread_db_init): Set thread_db_use_events. Check use_events.
2745 * utils.c (fatal, warning): Correct message prefix.
2747 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2749 * Makefile.in (clean): Remove new files.
2750 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2751 (powerpc-64.o, powerpc-64.c): New rules.
2752 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2753 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2755 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2757 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2758 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2759 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2760 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2761 (target_regsets): Add AltiVec and SPE register sets.
2762 * configure.ac: Check for AltiVec and SPE.
2763 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2764 (ppc_fill_vrregset, ppc_store_vrregset): New.
2765 (target_regsets): Add AltiVec register set.
2766 * configure: Regenerated.
2768 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2770 * linux-low.c (O_LARGEFILE): Define.
2771 (linux_read_memory): Use /proc/PID/mem.
2772 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2773 * configure, config.in: Regenerated.
2775 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2777 * linux-low.c (linux_wait_for_event): Do not pass signals while
2780 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2782 * win32-low.c (create_process): New.
2783 (win32_create_inferior): Use create_process instead of
2784 CreateProcess. If create_process failed retry appending an ".exe"
2785 suffix. Store the GetLastError result immediatelly after
2786 create_process calls and use it on the call to error.
2788 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2790 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2792 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2794 * configure.ac: Switch license to GPLv3.
2796 2007-08-01 Michael Snyder <msnyder@access-company.com>
2798 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2800 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2802 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2804 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2805 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2806 CloseToolhelp32Snapshot.
2807 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2808 CloseToolhelp32Snapshot.
2810 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2812 * server.c (main): Check for inferior exit before main loop.
2814 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2816 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2817 instead of on tmp_desc.
2819 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2820 Daniel Jacobowitz <dan@codesourcery.com>
2822 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2823 (add_thread): Minor cleanups.
2824 (clear_inferiors): Move lower in the file. Clear the DLL
2826 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2827 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2828 (xml_escape_text): New.
2829 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2831 (handle_v_cont): Report errors.
2832 (gdbserver_version): Update.
2833 (main): Correct size of own_buf. Do not report initial DLL events.
2834 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2835 (unloaded_dll, xml_escape_text): New.
2836 * win32-low.c (enum target_waitkind): Update comments.
2837 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2838 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2839 (win32_EnumProcessModules, win32_GetModuleInformation)
2840 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2841 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2842 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2843 (win32_Module32First, win32_Module32Next, load_toolhelp)
2844 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2845 (get_child_debug_event): Handle DLL events.
2846 (win32_wait): Likewise.
2848 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2850 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2851 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2853 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2855 * win32-low.c (handle_output_debug_string): Ignore event if not
2858 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2860 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2862 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2864 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2866 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2868 * inferiors.c (change_inferior_id): Add comment.
2869 * linux-low.c (check_removed_breakpoint): Add an early
2870 prototype. Improve debug output.
2871 (linux_attach): Doc update.
2872 (linux_detach_one_process, linux_detach): Clean up before releasing
2874 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2875 * linux-low.h (struct process_info): Doc improvement.
2876 * mem-break.c (delete_all_breakpoints): New.
2877 * mem-break.h (delete_all_breakpoints): New prototype.
2878 * thread-db.c (find_first_thread): New.
2879 (thread_db_create_event): Call it instead of
2880 thread_db_find_new_threads. Clean up unused variables.
2881 (maybe_attach_thread): Remove first thread handling.
2882 (thread_db_find_new_threads): Use find_first_thread.
2883 (thread_db_get_tls_address): Likewise.
2885 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2887 * thread-db.c (thread_db_find_new_threads): Add prototype.
2888 (thread_db_create_event): Check for the main thread before adding
2890 (maybe_attach_thread): Only enable event reporting if TID == 0.
2891 (thread_db_get_tls_address): Check for new threads.
2893 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2895 * linux-low.c (linux_create_inferior): Try execv before execvp.
2896 * spu-low.c (spu_create_inferior): Likewise.
2898 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2900 * linux-low.c (linux_create_inferior): Change execv to execvp.
2901 * spu-low.c (spu_create_inferior): Likewies.
2903 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2905 * Makefile.in (clean): Clean new files instead of deleted ones.
2906 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2907 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2909 * configure.srv: Specify XML files and new regformats for MIPS and
2911 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2912 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2913 an entry for the restart register.
2914 (mips_cannot_fetch_register, mips_cannot_store_register)
2915 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2916 register names to match the XML descriptions.
2917 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2918 restart register instead of $0.
2920 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2921 Markus Deuling <deuling@de.ibm.com>
2923 * remote-utils.c (decode_xfer_write): New function.
2924 * server.h (decode_xfer_write): Add prototype.
2925 * server.c (handle_query): Add PACKET_LEN argument. Support
2926 qXfer:spu:read and qXfer:spu:write packets.
2927 (main): Pass packet_len to handle_query.
2928 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2929 * target.h (target_ops): Add qxfer_spu.
2931 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2933 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2934 accessing non-seekable spufs files.
2936 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2938 * server.c (handle_query): Add reply for qC packet.
2940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2941 Leo Zayas <lerele@champenstudios@com>
2943 * server.h (check_remote_input_interrupt_request): New function.
2944 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2945 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2946 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2947 (check_remote_input_interrupt_request): New function.
2948 * server.h (check_remote_input_interrupt_request): Declare.
2949 * win32-low.c (winapi_DebugBreakProcess,
2950 winapi_GenerateConsoleCtrlEvent): New typedefs.
2951 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2953 (win32_wait): Check for remote interrupt request
2954 with check_remote_input_interrupt_request.
2955 (win32_request_interrupt): New function.
2956 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2960 * win32-low.c (debug_registers_changed,
2961 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2962 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2963 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2964 (thread_rec): Get context using the low target.
2965 (child_add_thread): Call thread_added on the low target,
2966 which does the same thing.
2968 (do_initial_child_stuff): Remove debug registers references.
2969 Set context using the low target. Resume threads after
2970 setting the contexts.
2971 (child_continue): Remove dead variable. Remove debug
2972 registers references.
2973 (child_fetch_inferior_registers): Go through the low target.
2974 (do_child_store_inferior_registers): Remove.
2975 (child_store_inferior_registers): Go through the low target.
2976 (win32_resume): Remove debug registers references.
2977 Set context using the low target.
2978 (handle_exception): Change return type to void. Don't record
2979 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2980 first chance exception.
2981 (get_child_debug_event): Change return type to void. Remove
2982 goto loop. Always return after waiting for debug event.
2983 (win32_wait): Convert to switch statement. Handle spurious
2986 * win32-i386-low.c (debug_registers_changed,
2987 debug_registers_used): New.
2988 (initial_stuff): Rename to ...
2989 (i386_initial_stuff): ... this. Clear debug registers
2991 (store_debug_registers): Delete.
2992 (i386_get_thread_context): New.
2993 (load_debug_registers): Delete.
2994 (i386_set_thread_context): New.
2995 (i386_thread_added): New.
2996 (single_step): Rename to ...
2997 (i386_single_step): ... this.
2998 (do_fetch_inferior_registers): Rename to ...
2999 (i386_fetch_inferior_register): ... this.
3000 (i386_store_inferior_register): New.
3001 (the_low_target): Adapt to new interface.
3003 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3004 (arm_get_thread_context): New.
3005 (arm_set_thread_context): New.
3007 (do_fetch_inferior_registers): Rename to ...
3008 (arm_fetch_inferior_register): ... this.
3009 (arm_store_inferior_register): New.
3010 (arm_wince_breakpoint): Reimplement as unsigned long.
3011 (arm_wince_breakpoint_len): Define.
3012 (the_low_target): Adapt to new interface.
3014 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3015 load_debug_registers. Add get_thread_context, set_thread_context,
3016 thread_added and store_inferior_register. Rename
3017 fetch_inferior_registers to fetch_inferior_register.
3018 (regptr): Remove declaration.
3020 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3022 * linux-low.c (linux_detach): Change return type to int. Return 0.
3023 * spu-low.c (spu_detach): Likewise.
3025 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3027 * target.h (target_ops): Change return type of detach to int.
3029 (join_inferior): New.
3030 * server.c (main): Don't skip detach support on mingw32.
3031 If the inferior doesn't support detaching return error.
3032 Call join_inferior instead of using waitpid.
3033 * linux-low.c (linux_join): New.
3034 (linux_target_op): Add linux_join.
3035 * spu-low.c (spu_join): New.
3036 (spu_target_ops): Add spu_join.
3037 * win32-low.c (win32_detach): Adapt to new interface.
3038 Reopen current_process_handle before detaching. Issue a child
3039 resume before detaching.
3041 (win32_target_op): Add win32_join.
3043 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3045 * win32-low.c (win32-attach): Fix return value.
3046 * target.h (target_ops): Describe ATTACH return values.
3048 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3050 * win32-low.c (GETPROCADDRESS): Define.
3051 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3052 (winapi_DebugSetProcessKillOnExit): Likewise.
3053 (win32_create_inferior): Force usage of ansi CreateProcessA.
3054 (win32_attach): Use GETPROCADDRESS.
3055 (win32_detach): Likewise.
3057 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3059 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3061 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3063 * win32-low.c: Commit leftover changes from 2007-03-29.
3065 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3067 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3068 fields short instead of int. Add explicit padding.
3069 (i387_cache_to_fsave): Remove unnecessary casts.
3070 (i387_fsave_to_cache): Doc fix.
3071 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3073 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3075 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3076 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3078 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3080 * configure.srv (arm*-*-mingw32ce*): Move near the other
3083 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3085 * configure.ac: Add errno checking.
3086 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3087 sys/file.h and malloc.h.
3088 (AC_CHECK_DECLS): Add perror.
3089 (srv_mingwce): Handle.
3090 * configure.srv (i[34567]86-*-cygwin*): Add
3091 win32-i386-low.o to srv_tgtobj.
3092 (i[34567]86-*-mingw*): Likewise.
3093 (arm*-*-mingw32ce*): Add case.
3094 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3095 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3096 [__MINGW32CE__] (strerror): New function.
3097 [__MINGW32CE__] (errno): Define to GetLastError.
3098 [__MINGW32CE__] (COUNTOF): New macro.
3099 (remote_open): Remove extra close call.
3100 * mem-break.c (delete_breakpoint_at): New function.
3101 * mem-break.h (delete_breakpoint_at): Declare.
3102 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3103 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3104 [USE_WIN32API] (read, write): Add char* casts.
3105 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3106 * server.h: Include wincecompat.h on Windows CE.
3107 [HAVE_ERRNO_H]: Check.
3108 (perror): Declare if not declared.
3109 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3110 (perror_with_name): Remove errno declaration.
3111 * wincecompat.h: New.
3112 * wincecompat.c: New.
3114 * win32-arm-low.c: New.
3115 * win32-i386-low.c: New.
3116 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3117 (OUTMSG2): Make it safe.
3119 (COUNTOF): New macro.
3120 (NUM_REGS): Get it from the low target.
3121 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3122 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3123 (thread_rec): Let low target handle debug registers.
3124 (child_add_thread): Likewise.
3125 (child_init_thread_list): Likewise.
3126 (continue_one_thread): Likewise.
3128 (do_child_fetch_inferior_registers): Move to ...
3129 * win32-i386-low.c: ... here, and rename to ...
3130 (do_fetch_inferior_registers): ... this.
3131 * win32-low.c (child_fetch_inferior_registers):
3132 Go through the low target.
3133 (do_child_store_inferior_registers): Use regptr.
3134 (strwinerror): New function.
3135 (win32_create_inferior): Handle Windows CE.
3136 Use strwinerror instead of strerror on Windows error
3137 codes. Add program to the error output.
3138 Don't close the main thread handle on Windows CE.
3139 (win32_attach): Use coredll.dll on Windows CE.
3140 (win32_kill): Close current process and current
3142 (win32_detach): Use coredll.dll on Windows CE.
3143 (win32_resume): Let low target handle debug registers, and
3145 (handle_exception): Add/Remove initial breakpoint. Avoid
3146 non-existant WSTOPSIG on Windows CE.
3147 (win32_read_inferior_memory): Cast to remove warning.
3148 (win32_arch_string): Go through the low target.
3149 (initialize_low): Call set_breakpoint_data with the low
3150 target's breakpoint.
3151 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3152 FOP_REGNUM, mappings): Move to ...
3153 * win32-i386-low.c: ... here.
3154 * win32-low.c (win32_thread_info): Move to ...
3155 * win32-low.h: ... here.
3156 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3157 win32-arm-low.c and wincecompat.c.
3158 (all:): Add $EXEEXT.
3159 (install-only:): Likewise.
3160 (gdbserver:): Likewise.
3161 (gdbreplay:): Likewise.
3162 * config.in: Regenerate.
3163 * configure: Regenerate.
3165 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3167 * win32-low.c: Rename typedef thread_info to
3168 win32_thread_info throughout.
3170 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3172 * win32-i386-low.c: Rename to ...
3173 * win32-low.c: ... this.
3174 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3175 * Makefile.in: Likewise.
3177 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3179 * remote-utils.c (monitor_output): Constify msg parameter.
3180 * server.h (monitor_output): Likewise.
3181 * win32-i386-low.c (handle_output_debug_string): New.
3182 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3183 handle_output_debug_string.
3184 (get_child_debug_event): Likewise.
3186 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3188 * server.c (main): Correct strtoul check.
3190 2007-03-27 Jon Ringle <jon@ringle.org>
3192 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3194 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3196 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3198 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3200 * terminal.h: Check HAVE_SGTTY_H.
3202 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3204 * remote-utils.c (remote_open): Print out the assigned port number.
3206 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3208 * remote-utils.c (monitor_output): New function.
3209 * server.c (debug_threads): Define here.
3210 (monitor_show_help): New function.
3211 (handle_query): Handle qRcmd.
3212 (main): Do not handle 'd' packet.
3213 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3214 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3217 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3219 * Makefile.in (EXEEXT): New.
3220 (clean): Use $(EXEEXT).
3222 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3224 * target.h (target_ops): Rename send_signal to request_interrupt,
3225 and remove enum target_signal parameter.
3226 * linux-low.c (linux_request_interrupt): Rename from
3227 linux_send_signal, and always send SIGINT.
3228 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3229 and always send SIGINT.
3230 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3232 (input_interrupt): Likewise.
3234 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3236 * server.c (get_features_xml): Check if target implemented
3238 * win32-i386-low.c (win32_arch_string): New.
3239 (win32_target_ops): Add win32_arch_string as arch_string member.
3241 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3243 * spu-low.c (spu_arch_string): New.
3244 (spu_target_ops): Add spu_arch_string.
3246 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3248 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3249 * configure.ac: Do not check for terminal.h.
3250 * configure, config.in: Regenerated.
3252 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3254 * Makefile.in (OBS): Add $(XML_BUILTIN).
3255 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3257 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3258 (arm-with-iwmmxt.c): New.
3259 * config.in, configure: Regenerate.
3260 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3261 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3262 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3263 (arm*-*-linux*): Add iWMMXt and regset support.
3264 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3265 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3266 (arm_store_wmmxregset, target_regsets): New.
3267 * server.c (get_features_xml): Take annex argument. Check builtin
3269 (handle_query): Handle multiple annexes.
3271 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3273 * remote-utils.c [USE_WIN32API] (read, write): Define.
3274 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3277 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3279 * linux-i386-low.c (the_low_target): Set arch_string.
3280 * linux-x86-64-low.c (the_low_target): Likewise.
3281 * linux-low.c (linux_arch_string): New.
3282 (linux_target_ops): Add it.
3283 * linux-low.h (struct linux_target_ops): Add arch_string.
3284 * server.c (write_qxfer_response): Use const void * for DATA.
3285 (get_features_xml): New.
3286 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3287 * target.h (struct target_ops): Add arch_string method.
3289 2007-01-03 Denis Pilat <denis.pilat@st.com>
3290 Daniel Jacobowitz <dan@codesourcery.com>
3292 * linux-low.c (linux_kill): Handle being called with no threads.
3293 * win32-i386-low.c (win32_kill): Likewise.
3294 (get_child_debug_event): Clear current_process_handle.
3296 2006-12-30 Denis PILAT <denis.pilat@st.com>
3297 Daniel Jacobowitz <dan@codesourcery.com>
3299 * remote-utils.c (remote_open): Check the type of specified
3300 serial port devices before opening them.
3301 * server.c (main): Kill the inferior if an error occurs during
3302 the first remote_open.
3304 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3306 * README: Update supported targets.
3308 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3310 * Makefile.in (clean): Remove reg-mips64.c.
3311 (reg-mips64.c, reg-mips64.o): New rules.
3312 * configure.srv: Handle mips64. Include regset support for mips.
3313 * linux-mips-low.c (union mips_register): New.
3314 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3315 (mips_breakpoint, mips_breakpoint_at): Use int.
3316 (mips_collect_register, mips_supply_register)
3317 (mips_collect_register_32bit, mips_supply_register_32bit)
3318 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3319 (mips_store_fpregset, target_regsets): New.
3320 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3322 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3324 * configure.srv: Add target "spu*-*-*".
3325 * Makefile.in (clean): Remove reg-spu.c.
3326 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3327 * spu-low.c: New file.
3329 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3331 * configure.ac: Correct td_thr_tls_get_addr test.
3332 * configure: Regenerated.
3334 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3336 * linux-low.c (linux_wait_for_event): Reformat. Use the
3338 * remote-utils.c (decode_address_to_semicolon): New.
3339 * server.c (pass_signals, handle_general_set): New.
3340 (handle_query): Mention QPassSignals for qSupported.
3341 (main): Call handle_general_set.
3342 * server.h (pass_signals, decode_address_to_semicolon): New.
3344 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3346 * server.c (handle_query): Correct error handling for read_auxv.
3348 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3350 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3351 and srv_linux_thread_db to yes.
3352 * linux-s390-low.c (s390_fill_gregset): New function.
3353 (target_regsets): Define data structure.
3355 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3357 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3358 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3359 * config.in, configure: Regenerated.
3360 * inferiors.c (gdb_id_to_thread): New function.
3361 (gdb_id_to_thread_id): Use it.
3362 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3363 * linux-low.h (struct process_info): Add th member.
3364 (thread_db_get_tls_address): New prototype.
3365 * remote-utils.c (decode_address): Make non-static.
3366 * server.c (handle_query): Handle qGetTLSAddr.
3367 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3368 * target.h (struct target_ops): Add get_tls_address.
3369 * thread-db.c (maybe_attach_thread): Save the thread handle.
3370 (thread_db_get_tls_address): New.
3372 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3374 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3375 (linux_resume_one_process): Take a siginfo_t *. Update all
3376 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3377 (struct pending_signals): Add a siginfo_t.
3378 (linux_wait_for_process): Always set last_status.
3379 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3380 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3381 * linux-low.h (struct process_info): Add last_status.
3383 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3385 * remote-utils.c (try_rle): New function.
3386 (putpkt_binary): Use it.
3388 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3390 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3391 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3392 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3393 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3394 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3397 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3399 * server.c (terminal_fd): New variable.
3400 (old_foreground_pgrp): Likewise.
3401 (restore_old_foreground_pgrp): New function.
3402 (start_inferior): Record the terminal file descriptor in terminal_fd
3403 and its original foreground group in old_foreground_pgrp. Register
3404 restore_old_foreground_pgrp with atexit().
3406 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3408 * server.c (handle_query): Correct qPart to qXfer.
3410 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3412 * configure.ac: Check for more headers which are missing on
3413 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3414 * configure.srv: Add Cygwin and mingw32.
3415 * remote-utils.c: Don't include headers unconditionally which
3416 are missing on mingw32. Include <winsock.h> for mingw32.
3417 (remote_open): Adjust for mingw32 support. Flush
3418 standard error after writing to it.
3419 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3420 (unblock_async_io, enable_async_io, disable_async_io)
3421 (readchar, getpkt): Update for Winsock support.
3422 (prepare_resume_reply): Expect a protocol signal number.
3423 * server.c: Disable <sys/wait.h> on mingw32.
3424 (start_inferior): Adjust for mingw32 support. Flush
3425 standard error after writing to it.
3426 (attach_inferior): Likewise. Use protocol signal
3428 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3430 * win32-i386-low.c: New file.
3431 * Makefile.in (XM_CLIBS): Set.
3432 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3433 (win32-i386-low.o): New dependency rule.
3434 * linux-low.c (linux_wait): Use target signal numbers.
3435 * target.h (struct target_ops): Doc fix.
3436 * server.h (target_signal_to_name): New prototype.
3437 * gdbreplay.c: Don't include headers unconditionally which
3438 are missing on mingw32. Include <winsock.h> for mingw32.
3439 (remote_close, remote_open): Adjust for Winsock support.
3440 * configure, config.in: Regenerated.
3442 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3444 * server.c (decode_xfer_read, write_qxfer_response): New.
3445 (handle_query): Take a packet length argument. Handle
3446 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3447 the qSupported response.
3448 (main): Update call to handle_query.
3450 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3452 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3453 (putpkt_binary): Renamed from putpkt and adjusted for binary
3455 (putpkt): New wrapper for putpkt_binary.
3456 (readchar): Don't mask off the high bit.
3457 (decode_X_packet): New function.
3458 * server.c (main): Call putpkt_binary if a handler sets the packet
3459 length. Save the length of the incoming packet. Handle 'X'.
3460 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3462 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3464 * server.c (handle_query): Handle qSupported.
3466 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3468 * remote-utils.c (all_symbols_looked_up): New variable.
3469 (look_up_one_symbol): Check it.
3470 * server.h (look_up_one_symbol): New declaration.
3471 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3473 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3475 * Makefile.in (linux-arm-low.o): Update dependencies.
3476 * linux-arm-low.c: Include "gdb_proc_service.h".
3477 (PTRACE_GET_THREAD_AREA): Define.
3478 (ps_get_thread_area): New function.
3480 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3482 * configure.srv (m68k*-*-uclinux*): New target.
3483 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3484 (linux_resume_one_process): Remove extraneous cast.
3485 (linux_read_offsets): New.
3486 (linux_target_op): Add linux_read_offsets on mmuless systems.
3487 * server.c (handle_query): Add qOffsets logic.
3488 * target.h (struct target_ops): Add read_offsets.
3490 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3492 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3493 (PTRACE_GET_THREAD_AREA): Define.
3494 (ps_get_thread_area): New function.
3495 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3496 (linux-x86-64-low.o): Update.
3498 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3500 * configure.ac: Remove checks for prfpregset_t.
3501 * gdb_proc_service.h: New file.
3502 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3503 new "gdb_proc_service.h".
3504 * proc-service.c: Likewise.
3505 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3506 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3507 * Makefile.in (gdb_proc_service_h): Updated.
3508 * configure, config.in: Regenerated.
3510 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3512 * remote-utils.c (prepare_resume_reply): Move declaration
3513 of gdb_id_from_wait to the top of the block.
3515 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3517 * linux-low.c (regsets_store_inferior_registers): Read the regset
3518 from the target before filling it.
3520 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3522 * server.c (attach_inferior): Return SIGTRAP for a successful
3525 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3527 * Makefile.in (OBS): Add version.o.
3528 (STAGESTUFF): Delete.
3529 (version.o): Add dependencies.
3530 (version.c): Replace rule.
3531 (clean): Remove version.c.
3532 * server.c (gdbserver_version): New.
3533 (gdbserver_usage): Use printf.
3534 (main): Handle --version and --help.
3535 * server.h (version, host_name): Add declarations.
3537 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3549 * linux-x86-64-low.c:
3552 * linux-ppc64-low.c:
3561 * linux-crisv32-low.c:
3573 * gdbserver.1: Add (C) after Copyright. Update the FSF
3576 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3578 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3579 (arm_breakpoint_at): Recognize both breakpoints.
3580 (the_low_target): Use the correct breakpoint instruction.
3582 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3584 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3585 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3586 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3587 (the_low_target): Update.
3589 2005-10-25 Andreas Schwab <schwab@suse.de>
3591 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3593 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3594 (ia64_num_regs): Reduce to 462.
3596 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3598 * acinclude.m4: Correct quoting.
3599 * aclocal.m4: Regenerated.
3601 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3602 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3603 (thread_db_init): Call thread_db_err_str.
3604 * configure.ac: Check for TD_VERSION.
3605 * config.in, configure: Regenerated.
3607 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3609 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3611 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3613 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3614 is not available. Define HAVE_PTRACE_GETREGS if it is.
3615 * config.in, configure: Regenerated.
3616 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3617 * linux-i386-low.c, linux-m68k-low.c: Update to use
3618 HAVE_PTRACE_GETREGS.
3619 * linux-low.c (regsets_fetch_inferior_registers)
3620 (regsets_store_inferior_registers): Only return 0 if we processed
3622 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3623 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3625 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3627 * inferiors.c (struct thread_info): Add gdb_id.
3628 (add_thread): Add gdb_id argument.
3629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3630 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3631 calls to add_thread.
3632 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3633 * server.c (handle_query): Use thread_to_gdb_id.
3634 (handle_v_cont, main): Use gdb_id_to_thread_id.
3635 * server.h (add_thread): Update prototype.
3636 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3639 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3641 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3642 left-padded registers.
3643 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3644 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3646 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3648 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3649 * configure: Regenerate.
3650 * config.in: Regenerate.
3651 * server.h (NEED_DECLARATION_STRERROR):
3652 Replace with !HAVE_DECL_STRERROR.
3654 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3656 * linux-low.c (linux_wait, linux_send_signal): Don't test
3657 an unsigned long variable for > 0 if it could be MAX_ULONG.
3658 * server.c (myresume): Likewise.
3659 * target.c (set_desired_inferior): Likewise.
3661 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3663 * configure.ac: Simplify and improve check for socklen_t.
3664 * configure, config.in: Regenerate.
3666 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3668 * acconfig.h: Remove.
3669 * configure.ac: Add a test for socklen_t. Use three-argument
3670 AC_DEFINE throughout.
3671 * config.in: Regenerated using autoheader 2.59.
3672 * configure: Regenerated.
3674 * gdbreplay.c (socklen_t): Provide a default.
3675 (remote_open): Use socklen_t.
3676 * remote-utils.c (socklen_t): Provide a default.
3677 (remote_open): Use socklen_t.
3678 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3681 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3683 * linux-low.c (linux_read_memory, linux_write_memory)
3684 (linux_read_auxv): Likewise.
3685 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3686 (check_mem_write): Likewise.
3687 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3689 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3690 (registers_from_string, register_data): Likewise.
3691 * server.c (handle_query, main): Likewise.
3692 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3693 (decode_M_packet): Likewise.
3694 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3695 * target.h (struct target_ops): Update read_memory, write_memory,
3697 (read_inferior_memory, write_inferior_memory): Update.
3698 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3700 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3701 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3702 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3703 linux-s390-low.c, linux-sh-low.c: Update for changes in
3704 read_inferior_memory and the_low_target->breakpoint.
3706 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3708 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3709 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3710 * configure.srv: Add powerpc64-*-linux*.
3711 * linux-ppc64-low.c: New file.
3713 2005-05-23 Orjan Friberg <orjanf@axis.com>
3715 * linux-cris-low.c: New file with support for CRIS.
3716 * linux-crisv32-low.c: Ditto for CRISv32.
3717 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3718 (clean): Add reg-cris.c and reg-crisv32.c.
3719 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3720 reg-crisv32.o, and reg-crisv32.c to make rules.
3721 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3724 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3726 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3727 of sizeof (PTRACE_XFER_TYPE).
3728 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3730 2005-05-12 Orjan Friberg <orjanf@axis.com>
3732 * target.h (struct target_ops): Add insert_watchpoint,
3733 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3734 pointers for hardware watchpoint support.
3735 * linux-low.h (struct linux_target_ops): Ditto.
3736 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3737 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3738 to linux_target_ops.
3739 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3741 * server.c (main): Recognize 'Z' and 'z' packets.
3743 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3745 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3746 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3747 (the_low_target): Add new members.
3749 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3751 * proc-service.c (ps_lgetregs): Search all_processes instead of
3754 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3756 * server.c (start_inferior): Change return type to int.
3757 (attach_inferior): Change sigptr to int *.
3758 (handle_v_cont, handle_v_requests): Change signal to int *.
3759 (main): Change signal to int.
3761 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3763 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3764 * configure.srv: Add m32r*-*-linux*.
3765 * linux-m32r-low.c: New file.
3767 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3769 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3771 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3773 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3774 Take unsigned long arguments for PIDs.
3775 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3776 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3777 (wait_for_sigstop, linux_resume_one_process)
3778 (regsets_fetch_inferior_registers, linux_send_signal)
3779 (linux_read_auxv): Likewise. Update the types of variables holding
3780 PIDs. Update format string specifiers.
3781 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3782 * remote-utils.c (prepare_resume_reply): Likewise.
3783 * server.c (cont_thread, general_thread, step_thread)
3784 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3786 (handle_query): Update format specifiers.
3787 (handle_v_cont, main): Use strtoul for thread IDs.
3788 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3789 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3790 (general_thread, step_thread, thread_from_wait)
3791 (old_thread_from_wait): Update.
3792 * target.h (struct thread_resume): Use unsigned long for THREAD.
3793 (struct target_ops): Use unsigned long for arguments to attach and
3796 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3798 * acinclude.m4: Include bfd/bfd.m4 directly.
3799 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3800 <agriffis@toolchain.org>.
3801 * aclocal.m4, configure: Regenerated.
3803 2005-01-07 Andrew Cagney <cagney@gnu.org>
3805 * configure.ac: Rename configure.in, require autoconf 2.59.
3806 * configure: Re-generate.
3808 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3810 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3812 * aclocal.m4: Regenerated.
3813 * configure: Regenerated.
3815 2004-11-21 Andreas Schwab <schwab@suse.de>
3817 * linux-m68k-low.c (m68k_num_gregs): Define.
3818 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3819 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3820 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3821 (m68k_breakpoint_at): New. Add to the_low_target.
3823 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3824 srv_linux_thread_db to yes.
3826 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3828 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3829 (ARCH_SET_FS): Likewise.
3830 (ARCH_GET_FS): Likewise.
3831 (ARCH_GET_GS): Likewise.
3833 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3835 * linux-i386-low.c (ps_get_thread_area): New.
3836 * linux-x86-64-low.c (ps_get_thread_area): New.
3837 * linux-low.c: Include <sys/syscall.h>.
3838 (linux_kill_one_process): Don't kill the first thread here.
3839 (linux_kill): Kill the first thread here.
3840 (kill_lwp): New function.
3841 (send_sigstop, linux_send_signal): Use it.
3842 * proc-service.c: Clean up #ifdefs.
3843 (fpregset_info): Delete.
3844 (ps_lgetregs): Update and enable implementation.
3845 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3847 * remote-utils.c (struct sym_cache, symbol_cache): New.
3848 (input_interrupt): Print a clearer message.
3849 (async_io_enabled): New variable.
3850 (enable_async_io, disable_async_io): Use it. Update comments.
3851 (look_up_one_symbol): Use the symbol cache.
3852 * thread-db.c (thread_db_look_up_symbols): New function.
3853 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3855 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3857 * configure.in: Test for -rdynamic.
3858 * configure: Regenerated.
3859 * Makefile (INTERNAL_LDFLAGS): New.
3860 (gdbserver, gdbreplay): Use it.
3862 2004-09-02 Andrew Cagney <cagney@gnu.org>
3864 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3866 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3868 * linux-low.c (linux_wait): Clear all_processes list also.
3870 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3872 * linux-low.c: Include <errno.h>. Remove extern declaration of
3875 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3877 * gdbreplay.c, server.h, utils.c: Update copyright years.
3879 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3881 * server.c (main): Print child status or termination signal from
3882 variable 'signal', not 'sig'.
3884 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3886 * linux-low.c (linux_read_memory): Change return type to
3887 int. Check for and return error from ptrace().
3888 * target.c (read_inferior_memory): Change return type to int. Pass
3889 back return status from the_target->read_memory().
3890 * target.h (struct target_ops): Adapt *read_memory() prototype.
3892 (read_inferior_memory): Adapt prototype.
3893 * server.c (main): Return an error packet if
3894 read_inferior_memory() returns an error.
3896 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3898 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3899 Unify with other clean targets.
3901 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3903 * server.c (handle_v_cont): Call set_desired_inferior.
3905 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3907 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3911 * linux-low.c (linux_wait): Unblock async I/O.
3912 (linux_resume): Block and enable async I/O.
3913 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3914 * server.h (block_async_io, unblock_async_io): Add prototypes.
3916 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3918 * remote-utils.c (remote_open): Print a status notice after
3920 * server.c (attach_inferior): Print a status notice after
3923 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3925 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3927 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3929 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3931 * server.c, target.h: Update copyright years.
3933 2004-02-25 Roland McGrath <roland@redhat.com>
3935 * target.h (struct target_ops): New member `read_auxv'.
3936 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3937 * linux-low.c (linux_read_auxv): New function.
3938 (linux_target_ops): Initialize `read_auxv' member to that.
3940 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3942 Committed by Jim Blandy <jimb@redhat.com>.
3944 * linux-s390-low.c (s390_num_regs): Update.
3945 (s390_regmap): Remove control registers. Use __s390x__ predefine
3946 instead of GPR_SIZE to distiguish s390 and s390x targets.
3948 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3950 * linux-low.c: Update copyright year.
3951 (check_removed_breakpoint): Clear pending_is_breakpoint.
3952 (linux_set_resume_request, linux_queue_one_thread)
3953 (resume_status_pending_p): New functions.
3954 (linux_continue_one_thread): Use process->resume.
3955 (linux_resume): Only resume threads if there are no pending events.
3956 * linux-low.h (struct process_info): Add resume request
3959 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3961 * regcache.c (new_register_cache): Clear the allocated register
3962 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3964 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3966 * linux-low.c (linux_resume): Take a struct thread_resume *
3968 (linux_wait): Update call.
3969 (resume_ptr): New static variable.
3970 (linux_continue_one_thread): Renamed from
3971 linux_continue_one_process. Use resume_ptr.
3972 (linux_resume): Use linux_continue_one_thread.
3973 * server.c (handle_v_cont, handle_v_requests): New functions.
3974 (myresume): New function.
3975 (main): Handle 'v' case.
3976 * target.h (struct thread_resume): New type.
3977 (struct target_ops): Change argument of "resume" to struct
3979 (myresume): Delete macro.
3981 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3983 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3984 (uninstall): Support DESTDIR.
3986 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3988 * configure.srv: Add xscale*linux copy of arm*linux entry.
3990 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3992 * linux-arm-low.c (arm_reinsert_addr): New function.
3993 (the_low_target): Add arm_reinsert_addr.
3995 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3997 * mem-break.c: Remove whitespace at end of file.
3999 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4001 * configure.in: Check whether we need to prototype strerror.
4002 * server.h: Optionally prototype strerror.
4003 * gdbreplay.c (perror_with_name): Use strerror.
4004 * linux-low.c (linux_attach_lwp): Use strerror.
4005 * utils.c (perror_with_name): Use strerror.
4006 * config.in, configure: Regenerated.
4008 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4010 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4011 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4013 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4015 * Makefile.in (SFILES): Update.
4016 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4017 low-sun3.c: Remove files.
4019 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4021 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4022 (linux_detach_one_process, linux_detach): New functions.
4023 (linux_target_ops): Add linux_detach.
4024 * server.c (main): Handle 'D' packet.
4025 * target.h (struct target_ops): Add "detach" member.
4026 (detach_inferior): Define.
4028 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4030 From Kelley Cook <kelleycook@wideopenwest.com>:
4031 * configure.srv: Accept i[34567]86 variants.
4033 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4035 * linux-low.c (linux_wait_for_event): Correct comment typos.
4036 (linux_resume_one_process): Call check_removed_breakpoint.
4037 (linux_send_signal): New function.
4038 (linux_target_ops): Add linux_send_signal.
4039 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4041 * target.h (struct target_ops): Add send_signal.
4043 2003-05-29 Jim Blandy <jimb@redhat.com>
4045 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4046 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4047 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4048 away part of the register's value.
4050 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4052 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4053 (linux_wait_for_event, linux_init_signals): Likewise.
4055 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4057 * configure.in: Check for stdlib.h.
4058 * configure: Regenerated.
4059 * config.in: Regenerated.
4061 2003-01-04 Andreas Schwab <schwab@suse.de>
4063 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4065 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4067 * Makefile.in: Remove obsolete code.
4069 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4071 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4072 defined(PT_FPR0_HI).
4074 2002-11-17 Stuart Hughes <seh@zee2.com>
4076 * linux-arm-low.c (arm_num_regs): Increase.
4077 (arm_regmap): Include status register.
4079 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4081 * linux-low.c (register_addr): Remove incorrect -1 check.
4083 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4085 * linux-low.c (linux_create_inferior): Call setpgid. Return
4087 (unstopped_p, linux_signal_pid): Remove.
4088 (linux_target_ops): Remove linux_signal_pid.
4089 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4090 global instead of target method.
4091 * target.h (struct target_ops): Remove signal_pid. Update comment
4092 for create_inferior.
4093 * server.c (signal_pid): New variable.
4094 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4095 gdbserver. Set the child to be the foreground process group.
4096 (attach_inferior): Set signal_pid.
4098 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4100 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4102 2002-08-20 Jim Blandy <jimb@redhat.com>
4104 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4107 2002-08-01 Andrew Cagney <cagney@redhat.com>
4109 * Makefile.in: Make chill references obsolete.
4111 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4113 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4114 * configure: Regenerate.
4115 * config.in: Regenerate.
4117 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4119 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4120 (perror_with_name, remote_close, remote_open, expect, play): Static.
4122 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4124 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4125 byte offsets instead of an array of indexes.
4126 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4128 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4130 * regcache.c: Add comment.
4132 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4134 * thread-db.c: New file.
4135 * proc-service.c: New file.
4136 * acinclude.m4: New file.
4137 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4138 proc-service.o, and thread-db.o.
4139 (linux-low.o): Add USE_THREAD_DB.
4140 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4141 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4142 * aclocal.m4: Regenerated.
4143 * config.in: Regenerated.
4144 * configure: Regenerated.
4145 * configure.in: Check for proc_service.h, sys/procfs.h,
4146 thread_db.h, and linux/elf.h headrs.
4147 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4148 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4149 Check for -lthread_db and thread support.
4150 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4151 PowerPC, and SuperH.
4152 * i387-fp.c: Constify arguments.
4153 * i387-fp.h: Likewise.
4154 * inferiors.c: (struct thread_info): Renamed from
4155 `struct inferior_info'. Remove PID member. Use generic inferior
4156 list header. All uses updated.
4157 (inferiors, signal_pid): Removed.
4158 (all_threads): New variable.
4159 (get_thread): Define.
4160 (add_inferior_to_list): New function.
4161 (for_each_inferior): New function.
4162 (change_inferior_id): New function.
4163 (add_inferior): Removed.
4164 (remove_inferior): New function.
4165 (add_thread): New function.
4166 (free_one_thread): New function.
4167 (remove_thread): New function.
4168 (clear_inferiors): Use for_each_inferior and free_one_thread.
4169 (find_inferior): New function.
4170 (find_inferior_id): New function.
4171 (inferior_target_data): Update argument type.
4172 (set_inferior_target_data): Likewise.
4173 (inferior_regcache_data): Likewise.
4174 (set_inferior_regcache_data): Likewise.
4175 * linux-low.c (linux_bp_reinsert): Remove.
4176 (all_processes, stopping_threads, using_thrads)
4177 (struct pending_signals, debug_threads, pid_of): New.
4178 (inferior_pid): Replace with macro.
4179 (struct inferior_linux_data): Remove.
4180 (get_stop_pc, add_process): New functions.
4181 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4182 Use add_process and add_thread.
4183 (linux_attach_lwp): New function, based on old linux_attach. Use
4184 add_process and add_thread. Set stop_expected for new threads.
4185 (linux_attach): New function.
4186 (linux_kill_one_process): New function.
4187 (linux_kill): Kill all LWPs.
4188 (linux_thread_alive): Use find_inferior_id.
4189 (check_removed_breakpoints, status_pending_p): New functions.
4190 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4191 Update. Use WNOHANG. Wait for cloned processes also. Update process
4192 struct for the found process.
4193 (linux_wait_for_event): New function.
4194 (linux_wait): Use it. Support LWPs.
4195 (send_sigstop, wait_for_sigstop, stop_all_processes)
4196 (linux_resume_one_process, linux_continue_one_process): New functions.
4197 (linux_resume): Support LWPs.
4198 (REGISTER_RAW_SIZE): Remove.
4199 (fetch_register): Use register_size instead. Call supply_register.
4200 (usr_store_inferior_registers): Likewise. Call collect_register.
4202 (regsets_fetch_inferior_registers): Improve error message.
4203 (regsets_store_inferior_registers): Add debugging.
4204 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4205 (unstopped_p, linux_signal_pid): New functions.
4206 (linux_target_ops): Add linux_signal_pid.
4207 (linux_init_signals): New function.
4208 (initialize_low): Call it. Initialize using_threads.
4209 * regcache.c (inferior_regcache_data): Add valid
4211 (get_regcache): Fetch registers lazily. Add fetch argument
4212 and update all callers.
4213 (regcache_invalidate_one, regcache_invalidate): New
4215 (new_register_cache): Renamed from create_register_cache.
4216 Return the new regcache.
4217 (free_register_cache): Change argument to a void *.
4218 (registers_to_string, registers_from_string): Call get_regcache
4219 with fetch flag set.
4220 (register_data): Make static. Pass fetch flag to get_regcache.
4221 (supply_register): Call get_regcache with fetch flag clear.
4222 (collect_register): Call get_regcache with fetch flag set.
4223 (collect_register_as_string): New function.
4224 * regcache.h: Update.
4225 * remote-utils.c (putpkt): Flush after debug output and use
4227 Handle input interrupts while waiting for an ACK.
4228 (input_interrupt): Use signal_pid method.
4229 (getpkt): Flush after debug output and use stderr.
4230 (outreg): Use collect_register_as_string.
4231 (new_thread_notify, dead_thread_notify): New functions.
4232 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4234 (look_up_one_symbol): Flush after debug output.
4235 * server.c (step_thread, server_waiting): New variables.
4236 (start_inferior): Don't use signal_pid. Update call to mywait.
4237 (attach_inferior): Update call to mywait.
4238 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4239 (main): Don't fetch/store registers explicitly. Use
4240 set_desired_inferior. Support proposed ``Hs'' packet. Update
4243 (struct inferior_list, struct_inferior_list_entry): New.
4244 * target.c (set_desired_inferior): New.
4245 (write_inferior_memory): Constify.
4246 (mywait): New function.
4248 (struct target_ops): New signal_pid method.
4249 (mywait): Removed macro, added prototype.
4251 * linux-low.h (regset_func): Removed.
4252 (regset_fill_func, regset_store_func): New.
4253 (enum regset_type): New.
4254 (struct regset_info): Add type field. Use new operation types.
4255 (struct linux_target_ops): stop_pc renamed to get_pc.
4256 Add decr_pc_after_break and breakpoint_at.
4257 (get_process, get_thread_proess, get_process_thread)
4258 (strut process_info, all_processes, linux_attach_lwp)
4259 (thread_db_init): New.
4261 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4262 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4263 (the_low_target): Add new members.
4264 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4265 (i386_store_fpxregset): Constify.
4266 (target_regsets): Add new kind identifier.
4267 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4268 (i386_set_pc): Add debugging.
4269 (i386_breakpoint_at): New function.
4270 (the_low_target): Add new members.
4271 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4272 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4273 (mips_breakpoint_at): New.
4274 (the_low_target): Add new members.
4275 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4276 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4277 (the_low_target): Add new members.
4278 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4279 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4280 (the_low_target): Add new members.
4281 * linux-x86-64-low.c (target_regsets): Add new kind
4284 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4286 From Martin Pool <mbp@samba.org>:
4287 * server.c (gdbserver_usage): New function.
4290 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4292 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4295 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4297 * Makefile.in: Remove obsolete code.
4299 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4301 * linux-low.c (regsets_fetch_inferior_registers),
4302 (regsets_store_inferior_registers): Removed cast to int from
4304 * regcache.h: Added declaration of struct inferior_info.
4306 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4308 * inferiors.c (struct inferior_info): Add regcache_data.
4309 (add_inferior): Call create_register_cache.
4310 (clear_inferiors): Call free_register_cache.
4311 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4312 * regcache.c (struct inferior_regcache_data): New.
4313 (registers): Remove.
4314 (get_regcache): New function.
4315 (create_register_cache, free_register_cache): New functions.
4316 (set_register_cache): Don't initialize the register cache here.
4317 (registers_to_string, registers_from_string, register_data): Call
4319 * regcache.h: Add prototypes.
4320 * server.h: Likewise.
4322 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4324 * mem-break.c: New file.
4325 * mem-break.h: New file.
4326 * Makefile.in: Add mem-break.o rule; update server.h
4328 * inferiors.c (struct inferior_info): Add target_data
4330 (clear_inferiors): Free target_data member if set.
4331 (inferior_target_data, set_inferior_target_data): New functions.
4332 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4333 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4334 * linux-low.c (linux_bp_reinsert): New variable.
4335 (struct inferior_linux_data): New.
4336 (linux_create_inferior): Use set_inferior_target_data.
4337 (linux_attach): Likewise. Call add_inferior.
4338 (linux_wait_for_one_inferior): New function.
4339 (linux_wait): Call it.
4340 (linux_write_memory): Add const.
4341 (initialize_low): Call set_breakpoint_data.
4342 * linux-low.h (struct linux_target_ops): Add breakpoint
4344 * server.c (attach_inferior): Remove extra add_inferior
4346 * server.h: Include mem-break.h. Update inferior.c
4348 * target.c (read_inferior_memory)
4349 (write_inferior_memory): New functions.
4350 * target.h (read_inferior_memory)
4351 (write_inferior_memory): Change macros to prototypes.
4352 (struct target_ops): Update comments. Add const to write_memory
4355 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4357 * linux-low.c (usr_store_inferior_registers): Support
4358 registers which are allowed to fail to store.
4359 * linux-low.h (linux_target_ops): Likewise.
4360 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4361 (ppc_cannot_store_register): FPSCR may not be storable.
4363 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4365 * server.h: Include <string.h> if HAVE_STRING_H.
4366 * ChangeLog: Correct paths in last ChangeLog entry.
4368 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4370 * linux-low.h: Remove obsolete prototypes.
4371 (struct linux_target_ops): New.
4372 (extern the_low_target): New.
4373 * linux-low.c (num_regs, regmap): Remove declarations.
4374 (register_addr): Use the_low_target explicitly.
4375 (fetch_register): Likewise.
4376 (usr_fetch_inferior_registers): Likewise.
4377 (usr_store_inferior_registers): Likewise.
4378 * linux-arm-low.c (num_regs): Remove.
4379 (arm_num_regs): Define.
4380 (arm_regmap): Renamed from regmap, made static.
4381 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4383 (arm_cannot_store_register): Renamed from cannot_store_register,
4385 (the_low_target): New.
4386 * linux-i386-low.c (num_regs): Remove.
4387 (i386_num_regs): Define.
4388 (i386_regmap): Renamed from regmap, made static.
4389 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4391 (i386_cannot_store_register): Renamed from cannot_store_register,
4393 (the_low_target): New.
4394 * linux-ia64-low.c (num_regs): Remove.
4395 (ia64_num_regs): Define.
4396 (ia64_regmap): Renamed from regmap, made static.
4397 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4399 (ia64_cannot_store_register): Renamed from cannot_store_register,
4401 (the_low_target): New.
4402 * linux-m68k-low.c (num_regs): Remove.
4403 (m68k_num_regs): Define.
4404 (m68k_regmap): Renamed from regmap, made static.
4405 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4407 (m68k_cannot_store_register): Renamed from cannot_store_register,
4409 (the_low_target): New.
4410 * linux-mips-low.c (num_regs): Remove.
4411 (mips_num_regs): Define.
4412 (mips_regmap): Renamed from regmap, made static.
4413 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4415 (mips_cannot_store_register): Renamed from cannot_store_register,
4417 (the_low_target): New.
4418 * linux-ppc-low.c (num_regs): Remove.
4419 (ppc_num_regs): Define.
4420 (ppc_regmap): Renamed from regmap, made static.
4421 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4423 (ppc_cannot_store_register): Renamed from cannot_store_register,
4425 (the_low_target): New.
4426 * linux-s390-low.c (num_regs): Remove.
4427 (s390_num_regs): Define.
4428 (s390_regmap): Renamed from regmap, made static.
4429 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4431 (s390_cannot_store_register): Renamed from cannot_store_register,
4433 (the_low_target): New.
4434 * linux-sh-low.c (num_regs): Remove.
4435 (sh_num_regs): Define.
4436 (sh_regmap): Renamed from regmap, made static.
4437 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4439 (sh_cannot_store_register): Renamed from cannot_store_register,
4441 (the_low_target): New.
4442 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4443 (the_low_target): New.
4445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4447 * Makefile.in: Add stamp-h target.
4448 * configure.in: Create stamp-h.
4449 * configure: Regenerated.
4451 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4453 * inferiors.c: New file.
4454 * target.c: New file.
4455 * target.h: New file.
4456 * Makefile.in: Add target.o and inferiors.o. Update
4458 * linux-low.c (inferior_pid): New static variable,
4459 moved from server.c.
4460 (linux_create_inferior): Renamed from create_inferior.
4461 Call add_inferior. Return 0 on success instead of a PID.
4462 (linux_attach): Renamed from myattach.
4463 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4464 (linux_thread_alive): Renamed from mythread_alive.
4465 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4467 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4468 (regsets_store_inferior_registers): Correct error message.
4469 Add missing ``return 0''.
4470 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4471 (linux_store_registers): Renamed from store_inferior_registers.
4472 (linux_read_memory): Renamed from read_inferior_memory.
4473 (linux_write_memory): Renamed from write_inferior_memory.
4474 (linux_target_ops): New structure.
4475 (initialize_low): Call set_target_ops ().
4476 * remote-utils.c (unhexify): New function.
4477 (hexify): New function.
4478 (input_interrupt): Send signals to ``signal_pid''.
4479 * server.c (inferior_pid): Remove.
4480 (start_inferior): Update create_inferior call.
4481 (attach_inferior): Call add_inferior.
4482 (handle_query): New function.
4483 (main): Call handle_query for `q' packets.
4484 * server.h: Include "target.h". Remove obsolete prototypes.
4485 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4487 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4489 * Makefile.in: Add WARN_CFLAGS. Update configury
4491 * configure.in: Check for <string.h>
4492 * configure: Regenerate.
4493 * config.in: Regenerate.
4494 * gdbreplay.c: Include needed system headers.
4495 (remote_open): Remove strchr prototype.
4496 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4497 * regcache.c (supply_register): Change buf argument to const void *.
4498 (supply_register_by_name): Likewise.
4499 (collect_register): Change buf argument to void *.
4500 (collect_register_by_name): Likewise.
4501 * regcache.h: Add missing prototypes.
4502 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4503 * server.c (handle_query): New function.
4504 (attached): New static variable, moved out of main.
4505 (main): Quiet longjmp clobber warnings.
4506 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4507 * utils.c (error): Remove NORETURN.