1 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
3 * gdbreplay.c (remote_open): Check error return from socket() call by
4 its equality to -1 not by it being negative.
5 * remote-utils.c (remote_open): Likewise.
7 2010-05-23 Pedro Alves <pedro@codesourcery.com>
9 * config.h: Regenerate.
11 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14 doesn't provide PTRACE_GET_THREAD_AREA.
16 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
18 * linux-m68k-low.c: Include <asm/ptrace.h>
19 (ps_get_thread_area): Implement.
21 2010-05-03 Doug Evans <dje@google.com>
23 * event-loop.c (struct callback_event): New struct.
24 (callback_list): New global.
25 (append_callback_event, delete_callback_event): New functions.
26 (process_callback): New function.
27 (start_event_loop): Call it.
28 * remote-utils.c (NOT_SCHEDULED): Define.
29 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
30 moved out of readchar.
31 (readchar): Rewrite. Call reschedule before returning.
32 (reset_readchar): New function.
33 (remote_close): Call it.
34 (process_remaining, reschedule): New functions.
35 * server.h (callback_handler_func): New typedef.
36 (append_callback_event, delete_callback_event): Declare.
38 2010-05-03 Pedro Alves <pedro@codesourcery.com>
40 * proc-service.c (ps_pglobal_lookup): Use
41 thread_db_look_up_one_symbol.
42 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
43 parameter. Use it instead of all_symbols_looked_up.
44 * server.h (struct process_info) <all_symbols_looked_up>: Delete
46 (all_symbols_looked_up): Don't declare.
47 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
48 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
50 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
51 Set all_symbols_looked_up here.
52 (thread_db_look_up_one_symbol): New.
53 (thread_db_get_tls_address): Adjust.
54 (thread_db_load_search, try_thread_db_load_1): Always allocate the
55 thread_db object on the heap, and tentatively set it in the
57 (thread_db_init): Don't set all_symbols_looked_up here.
58 * linux-low.h (thread_db_look_up_one_symbol): Declare.
60 2010-05-03 Pedro Alves <pedro@codesourcery.com>
62 * linux-low.c (linux_kill, linux_detach): Adjust.
63 (status_pending_p_callback): Remove redundant statement. Check
64 for !TARGET_WAITIKIND_IGNORE, instead of
65 TARGET_WAITKIND_STOPPED.
66 (handle_tracepoints): Make sure LWP is locked. Adjust.
67 (linux_wait_for_event_1): Adjust.
68 (linux_cancel_breakpoints): New.
69 (unsuspend_one_lwp): New.
70 (unsuspend_all_lwps): New.
71 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
72 (send_sigstop_callback): Change return type to int, add new
73 `except' parameter and handle it.
74 (suspend_and_send_sigstop_callback): New.
75 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
76 pass them down. If SUSPEND, also increment the lwp's suspend
78 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
79 (need_step_over_p): Don't consider suspended LWPs.
80 (start_step_over): Adjust.
81 (proceed_one_lwp): Change return type to int, add new `except'
82 parameter and handle it.
83 (unsuspend_and_proceed_one_lwp): New.
84 (proceed_all_lwps): Use find_inferior instead of
86 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
87 also decrement the suspend count of LWPs. Pass `except' down,
88 instead of hacking its suspend count.
89 (linux_pause_all): Add `freeze' parameter. Adjust.
90 (linux_unpause_all): New.
91 (linux_target_ops): Install linux_unpause_all.
92 * server.c (handle_status): Adjust.
93 * target.h (struct target_ops): New fields `unpause_all' and
94 `cancel_breakpoints'. Add new parameter to `pause_all'.
95 (pause_all): Add new `freeze' parameter.
97 (cancel_breakpoints): New.
98 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
100 (cmd_qtstart): Pause threads.
101 (stop_tracing): Pause threads, and cancel breakpoints.
102 * win32-low.c (win32_target_ops): Adjust.
104 2010-05-03 Pedro Alves <pedro@codesourcery.com>
106 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
107 the inferior right away from here...
108 (linux_wait_1): ... to here, and adjust to check the thread's
109 last_resume_kind instead of the lwp's step or stop_expected flags.
111 2010-05-02 Pedro Alves <pedro@codesourcery.com>
113 * README: Use consistent `GDB' and `GDBserver' spellings.
115 2010-05-02 Pedro Alves <pedro@codesourcery.com>
117 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
118 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
119 (linux_detach_one_lwp): Assume the lwp is stopped.
120 (any_thread_of): Delete.
121 (linux_detach): Stop all lwps here. Don't blindly delete all
123 (delete_lwp_callback): New.
124 (linux_mourn): Delete all lwps of the process that is gone.
125 (linux_wait_1): Don't delete the last lwp of the process here.
126 * mem-break.h (mark_breakpoints_out): Declare.
127 * mem-break.c (mark_breakpoints_out): New.
128 (free_all_breakpoints): Use it.
129 * server.c (handle_target_event): If the process is gone, mark
131 * thread-db.c (struct thread_db) <create_bp>: New field.
132 (thread_db_enable_reporting): Fix prototype. Store a thread event
133 breakpoint reference in the thread_db struct.
134 (thread_db_load_search): Clear the thread_db object.
135 (try_thread_db_load_1): Ditto.
136 (switch_to_process): New.
137 (disable_thread_event_reporting): Use it.
138 (remove_thread_event_breakpoints): New.
139 (thread_db_detach, thread_db_mourn): Use it.
141 2010-05-01 Pedro Alves <pedro@codesourcery.com>
143 * linux-low.c (linux_enable_event_reporting): New.
144 (linux_wait_for_event_1, handle_extended_wait): Use it.
146 2010-04-30 Pedro Alves <pedro@codesourcery.com>
148 * linux-low.c (linux_kill_one_lwp, linux_kill)
149 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
150 (send_sigstop): Take an lwp_info as parameter instead. Queue a
151 SIGSTOP even if the LWP is stopped.
152 (send_sigstop_callback): New.
153 (stop_all_lwps): Use send_sigstop_callback instead.
154 (linux_resume_one_thread): Adjust.
155 (proceed_one_lwp): Still proceed an LWP that the client has
156 requested to stop, if we haven't reported it as stopped yet. Make
157 sure that LWPs the client want stopped, have a pending SIGSTOP.
159 2010-04-26 Doug Evans <dje@google.com>
161 * server.c (handle_general_set): Make static.
163 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
164 Print received char after testing for error/eof instead of before.
165 (input_interrupt): Tweak comment.
167 2010-04-23 Doug Evans <dje@google.com>
169 * server.c (start_inferior): Print inferior argv if --debug.
171 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
173 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
174 * nto-x86-low.c: Include server.h
176 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
178 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
179 be consistent with other sources of this directory.
180 (init_registers_amd64): Correct name of source file of this function
183 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
185 * configure.srv (x86_64-*-mingw*): New configuration for Windows
188 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
190 * win32-i386-low.c: Add 64-bit support.
191 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
192 (init_registers_amd64): Declare.
193 (mappings): Add 64-bit version of array.
194 (init_windows_x86): New function.
195 (the_low_target): Change init_arch field to init_windows_x86.
197 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
199 * win32-low.c: Adapt to support also 64-bit architecture.
200 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
201 (get_image_name): Use SIZE_T type for local variable `done'.
202 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
203 (toolhelp_get_dll_name): Idem.
204 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
205 Use uintptr_t typecast to avoid warning.
206 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
207 (handle_exception): Use phex_nz to avoid warning.
208 (win32_wait): Remove unused local variable `process'.
210 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
212 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
215 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
217 * configure.ac: Use `ws2_32' library for srv_mingw.
218 * configure: Regenerate.
219 * gdbreplay.c: Include winsock2.h instead of winsock.h.
220 * remote-utils.c: Likewise.
222 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
224 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
225 if __x86_64__ is defined.
227 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
229 * configure: Regenerate.
231 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
233 * server.c (handle_query): Handle 'qGetTIBAddr' query.
234 * target.h (target_ops): New get_tib_address field.
235 * win32-low.h (win32_thread_info): Add thread_local_base field.
236 * win32-low.c (child_add_thread): Add tlb argument.
237 Set thread_local_base field to TLB.
238 (get_child_debug_event): Adapt to child_add_thread change.
239 (win32_get_tib_address): New function.
240 (win32_target_ops): Set get_tib_address field to
241 win32_get_tib_address.
242 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
244 2010-04-12 Pedro Alves <pedro@codesourcery.com>
246 * linux-low.c (linux_mourn): Also remove the process.
247 * server.c (handle_target_event): Don't remove the process here.
248 * nto-low.c (nto_mourn): New.
249 (nto_target_ops): Install it.
250 * spu-low.c (spu_mourn): New.
251 (spu_target_ops): Install it.
252 * win32-low.c (win32_mourn): New.
253 (win32_target_ops): Install it.
255 2010-04-12 Pedro Alves <pedro@codesourcery.com>
257 * server.h (buffer_xml_printf): Remove redundant `;'.
259 2010-04-12 Pedro Alves <pedro@codesourcery.com>
261 * regcache.c (set_register_cache): Invalidate regcaches before
262 changing the register cache layout.
263 (regcache_invalidate_one): Allow a NULL regcache.
264 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
265 regcaches before changing the register cache layout or the target
268 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
270 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
271 variable warning on Linux/x86-64.
273 2010-04-11 Pedro Alves <pedro@codesourcery.com>
275 GDBserver disconnected tracing support.
277 * linux-low.c (linux_remove_process): Delete.
278 (add_lwp): Don't set last_resume_kind here.
279 (linux_kill): Use `mourn'.
280 (linux_detach): Use `thread_db_detach', and `mourn'.
282 (linux_attach_lwp_1): Adjust comment.
283 (linux_attach): last_resume_kind moved the thread_info; adjust.
284 (status_pending_p_callback): Adjust.
285 (linux_wait_for_event_1): Adjust.
286 (count_events_callback, select_singlestep_lwp_callback)
287 (select_event_lwp_callback, cancel_breakpoints_callback)
288 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
289 (proceed_one_lwp): Adjust.
290 (linux_async): Add debug output.
291 (linux_thread_stopped): New.
292 (linux_pause_all): New.
293 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
295 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
296 (thread_db_free): Delete declaration.
297 (thread_db_detach, thread_db_mourn): Declare.
298 * thread-db.c (thread_db_init): Use thread_db_mourn.
299 (thread_db_free): Delete, split in two.
300 (disable_thread_event_reporting): New.
301 (thread_db_detach): New.
302 (thread_db_mourn): New.
304 * server.h (struct thread_info) <last_resume_kind>: New field.
305 <attached>: Add comment.
306 <gdb_detached>: New field.
307 (handler_func): Change return type to int.
308 (handle_serial_event, handle_target_event): Ditto.
309 (gdb_connected): Declare.
311 (disconnected_tracing): Declare.
312 (stop_tracing): Declare.
314 * server.c (handle_query) <qSupported>: Report support for
315 disconnected tracing.
316 (queue_stop_reply_callback): Account for running threads.
317 (gdb_wants_thread_stopped): New.
318 (gdb_wants_all_threads_stopped): New.
319 (gdb_reattached_process): New.
320 (handle_status): Clear the `gdb_detached' flag of all processes.
321 In all-stop, stop all threads.
322 (main): Be sure to leave tfind mode. Handle disconnected tracing.
323 (process_serial_event): If the remote connection breaks, or if an
324 exit was forced with "monitor exit", force an event loop exit.
325 Handle disconnected tracing on detach.
326 (handle_serial_event): Adjust.
327 (handle_target_event): If GDB isn't connected, forward events back
328 to the inferior, unless the last process exited, in which case,
329 exit gdbserver. Adjust interface.
331 * remote-utils.c (remote_open): Don't block in accept. Instead
332 register an event loop source on the listen socket file
333 descriptor. Refactor bits into ...
334 (listen_desc): ... this new global.
335 (gdb_connected): ... this new function.
336 (enable_async_notification): ... this new function.
337 (handle_accept_event): ... this new function.
338 (remote_close): Clear remote_desc.
340 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
342 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
344 (mourn_inferior): Define.
345 (target_process_qsupported): Avoid the dangling else problem.
346 (thread_stopped): Define.
348 (target_waitstatus_to_string): Declare.
349 * target.c (target_waitstatus_to_string): New.
351 * tracepoint.c (tracing): Make extern.
352 (disconnected_tracing): New.
353 (stop_tracing): Make extern. Handle tracing stops due to GDB
355 (cmd_qtdisconnected): New.
356 (cmd_qtstatus): Report disconnected tracing status in trace reply.
357 (handle_tracepoint_general_set): Handle QTDisconnected.
359 * event-loop.c (event_handler_func): Change return type to int.
360 (process_event): Bail out if the event handler wants the event
362 (handle_file_event): Ditto.
363 (start_event_loop): Bail out if the event handler wants the event
366 * nto-low.c (nto_target_ops): Adjust.
367 * spu-low.c (spu_wait): Don't remove the process here.
368 (spu_target_ops): Adjust.
369 * win32-low.c (win32_wait): Don't remove the process here.
370 (win32_target_ops): Adjust.
372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
374 * regcache.c (realloc_register_cache): Invalidate inferior's
375 regcache before recreating it.
377 2010-04-09 Pedro Alves <pedro@codesourcery.com>
379 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
381 2010-04-09 Stan Shebs <stan@codesourcery.com>
382 Pedro Alves <pedro@codesourcery.com>
384 * server.h (LONGEST): New.
385 (struct thread_info) <while_stepping>: New field.
386 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
388 (initialize_tracepoint, handle_tracepoint_general_set)
389 (handle_tracepoint_query, tracepoint_finished_step)
390 (tracepoint_was_hit, release_while_stepping_state_list):
391 (current_traceframe): Declare.
392 * server.c (handle_general_set): Handle tracepoint packets.
395 (handle_search_memory_1): Use read_memory.
396 (handle_query): Report support for conditional tracepoints, trace
397 state variables, and tracepoint sources. Handle tracepoint
399 (main): Initialize the tracepoints module.
400 (process_serial_event): Handle traceframe reads/writes.
402 * linux-low.c (handle_tracepoints): New.
403 (linux_wait_1): Call it.
404 (linux_resume_one_lwp): Handle while-stepping.
405 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
406 (linux_target_ops): Install them.
407 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
409 * linux-x86-low.c (x86_supports_tracepoints): New.
410 (the_low_target). Install it.
412 * mem-break.h (delete_breakpoint): Declare.
413 * mem-break.c (delete_breakpoint): Make external.
415 * target.h (struct target_ops): Add `supports_tracepoints',
416 `read_pc', and `write_pc' fields.
417 (target_supports_tracepoints): Define.
418 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
421 * regcache.h (struct regcache) <registers_owned>: New field.
422 (init_register_cache, regcache_cpy): Declare.
423 (regcache_read_pc, regcache_write_pc): Declare.
424 (register_cache_size): Declare.
425 (supply_regblock): Declare.
426 * regcache.c (init_register_cache): New.
427 (new_register_cache): Use it.
429 (register_cache_size): New.
430 (supply_regblock): New.
431 (regcache_read_pc, regcache_write_pc): New.
435 * Makefile.in (OBS): Add tracepoint.o.
436 (tracepoint.o): New rule.
438 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
440 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
442 (i386-mmx.c): Likewise.
443 (i386-mmx-linux.o): Likewise.
444 (i386-mmx-linux.c): Likewise.
446 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
447 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
448 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
449 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
451 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
452 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
453 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
455 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
457 * Makefile.in (clean): Updated.
459 (i386-avx.c): Likewise.
460 (i386-avx-linux.o): Likewise.
461 (i386-avx-linux.c): Likewise.
462 (amd64-avx.o): Likewise.
463 (amd64-avx.c): Likewise.
464 (amd64-avx-linux.o): Likewise.
465 (amd64-avx-linux.c): Likewise.
467 * configure.srv (srv_i386_regobj): Add i386-avx.o.
468 (srv_i386_linux_regobj): Add i386-avx-linux.o.
469 (srv_amd64_regobj): Add amd64-avx.o.
470 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
471 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
472 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
473 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
474 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
475 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
476 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
478 * i387-fp.c: Include "i386-xstate.h".
480 (i387_cache_to_xsave): Likewise.
481 (i387_xsave_to_cache): Likewise.
482 (x86_xcr0): Likewise.
484 * i387-fp.h (i387_cache_to_xsave): Likewise.
485 (i387_xsave_to_cache): Likewise.
486 (x86_xcr0): Likewise.
488 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
489 * linux-crisv32-low.c (target_regsets): Likewise.
490 * linux-m68k-low.c (target_regsets): Likewise.
491 * linux-mips-low.c (target_regsets): Likewise.
492 * linux-ppc-low.c (target_regsets): Likewise.
493 * linux-s390-low.c (target_regsets): Likewise.
494 * linux-sh-low.c (target_regsets): Likewise.
495 * linux-sparc-low.c (target_regsets): Likewise.
496 * linux-xtensa-low.c (target_regsets): Likewise.
498 * linux-low.c: Include <sys/uio.h>.
499 (regsets_fetch_inferior_registers): Support nt_type.
500 (regsets_store_inferior_registers): Likewise.
501 (linux_process_qsupported): New.
502 (linux_target_ops): Add linux_process_qsupported.
504 * linux-low.h (regset_info): Add nt_type.
505 (linux_target_ops): Add process_qsupported.
507 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
509 (init_registers_i386_avx_linux): New.
510 (init_registers_amd64_avx_linux): Likewise.
511 (xmltarget_i386_linux_no_xml): Likewise.
512 (xmltarget_amd64_linux_no_xml): Likewise.
513 (PTRACE_GETREGSET): Likewise.
514 (PTRACE_SETREGSET): Likewise.
515 (x86_fill_xstateregset): Likewise.
516 (x86_store_xstateregset): Likewise.
518 (x86_linux_update_xmltarget): Likewise.
519 (x86_linux_process_qsupported): Likewise.
520 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
521 (x86_arch_setup): Don't call init_registers_amd64_linux nor
522 init_registers_i386_linux here. Call
523 x86_linux_update_xmltarget.
524 (the_low_target): Add x86_linux_process_qsupported.
526 * server.c (handle_query): Call target_process_qsupported.
528 * target.h (target_ops): Add process_qsupported.
529 (target_process_qsupported): New.
531 2010-04-03 Pedro Alves <pedro@codesourcery.com>
533 * inferiors.c (add_thread): Set last_status kind to
534 TARGET_WAITKIND_IGNORE.
535 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
536 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
537 (linux_wait_1): Move `thread' local definition to block that uses
538 it. Don't NULL initialize `event_child'.
539 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
540 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
541 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
543 2010-04-01 Pedro Alves <pedro@codesourcery.com>
545 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
546 an extended waitstatus, or by a watchpoint.
547 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
548 thread was stepping or has been stopped by a watchpoint.
550 2010-04-01 Pedro Alves <pedro@codesourcery.com>
552 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
553 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
554 of another, then delete the previous, and validate all
556 (validate_inserted_breakpoint): New.
557 (delete_disabled_breakpoints): New.
558 (validate_breakpoints): New.
559 (check_mem_read): Validate breakpoints before trusting their
560 shadow. Delete disabled breakpoints.
561 (check_mem_write): Validate breakpoints before trusting they
562 should be inserted. Delete disabled breakpoints.
563 * mem-break.h (validate_breakpoints):
564 * server.c (handle_query): Validate breakpoints when we see a
567 2010-04-01 Pedro Alves <pedro@codesourcery.com>
569 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
570 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
571 if we could tell there's a GDB breakpoint at stop_pc.
572 (need_step_over_p): Don't do a step over if we find a GDB
573 breakpoint at the resume PC.
575 * mem-break.c (struct raw_breakpoint): New.
576 (enum bkpt_type): New type `gdb_breakpoint'.
577 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
578 fields. New field `raw'.
579 (find_raw_breakpoint_at): New.
580 (set_raw_breakpoint_at): Handle refcounting. Create a raw
582 (set_breakpoint_at): Adjust.
583 (delete_raw_breakpoint): New.
584 (release_breakpoint): New.
585 (delete_breakpoint): Rename to...
586 (delete_breakpoint_1): ... this. Add proc parameter. Use
587 release_breakpoint. Return ENOENT.
588 (delete_breakpoint): Reimplement.
589 (find_breakpoint_at): Delete.
590 (find_gdb_breakpoint_at): New.
591 (delete_breakpoint_at): Delete.
592 (set_gdb_breakpoint_at): New.
593 (delete_gdb_breakpoint_at): New.
594 (gdb_breakpoint_here): New.
595 (set_reinsert_breakpoint): Use release_breakpoint.
596 (uninsert_breakpoint): Rename to ...
597 (uninsert_raw_breakpoint): ... this.
598 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
599 (reinsert_raw_breakpoint): Change parameter type to
601 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
603 (check_breakpoints): Adjust. Use release_breakpoint.
604 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
605 (breakpoint_inserted_here): Ditto.
606 (check_mem_read): Adjust to iterate over raw breakpoints instead.
607 Don't trust the breakpoint's shadow if it is not inserted.
608 (check_mem_write): Adjust to iterate over raw breakpoints instead.
609 (delete_all_breakpoints): Adjust.
610 (free_all_breakpoints): Mark all breakpoints as uninserted, and
611 use delete_breakpoint_1.
613 * mem-break.h (breakpoints_supported): Delete declaration.
614 (set_gdb_breakpoint_at): Declare.
615 (gdb_breakpoint_here): Declare.
616 (delete_breakpoint_at): Delete.
617 (delete_gdb_breakpoint_at): Declare.
619 * server.h (struct raw_breakpoint): Forward declare.
620 (struct process_info): New field `raw_breakpoints'.
622 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
625 2010-03-24 Pedro Alves <pedro@codesourcery.com>
627 * linux-low.c (status_pending_p_callback): Fix comment.
628 (linux_wait_for_event_1): Move most of the internal breakpoint
629 handling from here...
630 (linux_wait_1): ... to here.
631 (count_events_callback): New.
632 (select_singlestep_lwp_callback): New.
633 (select_event_lwp_callback): New.
634 (cancel_breakpoints_callback): New.
635 (select_event_lwp): New.
636 (linux_wait_1): Simplify internal breakpoint handling. Give equal
637 priority to all LWPs that have had events that should be reported
638 to the client. Cancel breakpoints when about to reporting the
639 event to the client, not while stopping lwps. No longer cancel
640 finished single-steps here.
641 (cancel_finished_single_step): Delete.
642 (cancel_finished_single_steps): Delete.
644 2010-03-24 Pedro Alves <pedro@codesourcery.com>
646 * mem-break.c (enum bkpt_type): New.
647 (struct breakpoint): New field `type'.
648 (set_breakpoint_at): Change return type to struct breakpoint
649 pointer. Set type to `other_breakpoint' by default.
650 (delete_breakpoint): Rewrite, supporting more than one breakpoint
651 in the breakpoint list.
652 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
653 (reinsert_breakpoint): Rename to ...
654 (reinsert_raw_breakpoint): ... this.
655 (reinsert_breakpoints_at): Adjust.
656 * mem-break.h (struct breakpoint): Declare.
657 (set_breakpoint_at): Change return type to struct breakpoint
660 2010-03-24 Pedro Alves <pedro@codesourcery.com>
662 * server.c (handle_query): Assign, not compare.
664 2010-03-24 Pedro Alves <pedro@codesourcery.com>
666 Teach linux gdbserver to step-over-breakpoints.
668 * linux-low.c (can_hardware_single_step): New.
669 (supports_breakpoints): New.
670 (handle_extended_wait): If stopping threads, read the stop pc of
673 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
674 low target doesn't support retrieving the PC.
675 (add_lwp): Set last_resume_kind to resume_continue.
676 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
677 (linux_attach): Don't clear stop_expected. Set the lwp's
678 last_resume_kind to resume_stop.
679 (linux_detach_one_lwp): Don't check for removed breakpoints.
680 (check_removed_breakpoint): Delete.
681 (status_pending_p): Rename to ...
682 (status_pending_p_callback): ... this. Don't check for removed
683 breakpoints. Don't consider threads that are stopped from GDB's
685 (linux_wait_for_lwp): Always read the stop_pc here.
686 (cancel_breakpoint): New.
687 (step_over_bkpt): New global.
688 (linux_wait_for_event_1): Implement stepping over breakpoints.
689 (gdb_wants_lwp_stopped): New.
690 (gdb_wants_all_stopped): New.
691 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
692 single-step traps here. Store the thread's last reported target
694 (send_sigstop): Don't clear stop_expected. Always set it,
696 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
697 (cancel_finished_single_step): New.
698 (cancel_finished_single_steps): New.
699 (wait_for_sigstop): Don't cancel finished single-step traps here.
700 (linux_resume_one_lwp): Don't check for removed breakpoints.
701 Don't set `step' on non-hardware step archs.
702 (linux_set_resume_request): Ignore resume_stop requests if already
703 stopping or stopped. Set the lwp's last_resume_kind.
704 (resume_status_pending_p): Don't check for removed breakpoints.
705 (need_step_over_p): New.
706 (start_step_over): New.
707 (finish_step_over): New.
708 (linux_resume_one_thread): Always queue a sigstop for resume_stop
709 requests. Clear the thread's last reported target waitstatus.
710 Don't use the `suspended' flag. Don't consider pending breakpoints.
711 (linux_resume): Start a step-over if necessary.
712 (proceed_one_lwp): New.
713 (proceed_all_lwps): New.
714 (unstop_all_lwps): New.
715 * linux-low.h (struct lwp_info): Rewrite comment for the
716 `suspended' flag. Add the `stop_pc' field. Delete the
717 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
718 Add `'last_resume_kind' and `need_step_over' fields.
719 * inferiors.c (struct thread_info): Delete, moved elsewhere.
720 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
721 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
722 (set_raw_breakpoint_at): New.
723 (set_breakpoint_at): Rewrite to use it.
724 (reinsert_breakpoint_handler): Delete.
725 (set_reinsert_breakpoint): New.
726 (reinsert_breakpoint_by_bp): Delete.
727 (delete_reinsert_breakpoints): New.
728 (uninsert_breakpoint): Rewrite.
729 (uninsert_breakpoints_at): New.
730 (reinsert_breakpoint): Rewrite.
731 (reinsert_breakpoints_at): New.
732 (check_breakpoints): Rewrite.
733 (breakpoint_here): New.
734 (breakpoint_inserted_here): New.
735 (check_mem_read): Adjust.
736 * mem-break.h (breakpoints_supported, breakpoint_here)
737 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
738 (reinsert_breakpoint_by_bp): Delete declaration.
739 (delete_reinsert_breakpoints): Declare.
740 (reinsert_breakpoint): Delete declaration.
741 (reinsert_breakpoints_at): Declare.
742 (uninsert_breakpoint): Delete declaration.
743 (uninsert_breakpoints_at): Declare.
744 (check_breakpoints): Adjust prototype.
745 * server.h: Adjust include order.
746 (struct thread_info): Declare here. Add a `last_status' field.
748 2010-03-23 Michael Snyder <msnyder@vmware.com>
750 * server.c (crc32): New function.
751 (handle_query): Add handling for 'qCRC:' request.
753 2010-03-23 Pedro Alves <pedro@codesourcery.com>
755 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
756 lwp had been stopped by a watchpoint.
758 2010-03-16 Pedro Alves <pedro@codesourcery.com>
760 * server.h (internal_error): Declare.
761 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
762 * utils.c (internal_error): New function.
764 2010-03-15 Andreas Schwab <schwab@redhat.com>
766 * configure.srv: Fix typo setting srv_regobj.
768 2010-03-15 Pedro Alves <pedro@codesourcery.com>
770 * linux-low.c (fetch_register): Avoid passing a non string literal
772 (usr_store_inferior_registers): Ditto.
774 2010-03-14 Pedro Alves <pedro@codesourcery.com>
776 * linux-low.c (linux_write_memory): Bail out early if peeking
779 2010-03-14 Pedro Alves <pedro@codesourcery.com>
781 * linux-low.h (struct lwp_info): New fields
782 `stopped_by_watchpoint' and `stopped_data_address'.
783 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
784 here, and cache them in the lwp object.
785 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
787 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
789 (linux_stopped_by_watchpoint): Rewrite.
790 (linux_stopped_data_address): Rewrite.
792 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
794 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
795 switching the current inferior, not before.
797 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
799 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
800 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
801 i386-linux.c and amd64-linux.c.
802 (reg-i386.o): Removed.
803 (reg-i386.c): Likewise.
804 (reg-i386-linux.o): Likewise.
805 (reg-i386-linux.c): Likewise.
806 (reg-x86-64.o): Likewise.
807 (reg-x86-64.c): Likewise.
808 (reg-x86-64-linux.o): Likewise.
809 (reg-x86-64-linux.c): Likewise.
812 (i386-linux.o): Likewise.
813 (i386-linux.c): Likewise.
816 (amd64-linux.o): Likewise.
817 (amd64-linux.c): Likewise.
819 * configure.srv (srv_i386_regobj): New.
820 (srv_i386_linux_regobj): Likewise.
821 (srv_amd64_regobj): Likewise.
822 (srv_amd64_linux_regobj): Likewise.
823 (srv_i386_32bit_xmlfiles): Likewise.
824 (srv_i386_64bit_xmlfiles): Likewise.
825 (srv_i386_xmlfiles): Likewise.
826 (srv_amd64_xmlfiles): Likewise.
827 (srv_i386_linux_xmlfiles): Likewise.
828 (srv_amd64_linux_xmlfiles): Likewise.
829 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
830 srv_xmlfiles to $srv_i386_xmlfiles.
831 (i[34567]86-*-mingw32ce*): Likewise.
832 (i[34567]86-*-mingw*): Likewise.
833 (i[34567]86-*-nto*): Likewise.
834 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
835 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
836 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
837 (x86_64-*-linux*): Likewise.
839 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
840 (init_registers_amd64_linux): New.
841 (x86_arch_setup): Replace init_registers_x86_64_linux with
842 init_registers_amd64_linux.
844 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
846 * configure.ac: Check for libdl. If it is not available link against
848 * configure: Regenerate.
850 2010-02-22 Pedro Alves <pedro@codesourcery.com>
854 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
855 handing a read watchpoint.
856 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
858 2010-02-12 Doug Evans <dje@google.com>
860 * linux-low.c (linux_supports_tracefork_flag): Document.
861 (linux_look_up_symbols): Add comment.
863 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
865 * regcache.c (supply_register): Clear regcache if buf is NULL.
867 2010-02-02 Nicolas Roche <roche@sourceware.org>
868 Joel Brobecker <brobecker@adacore.com>
870 * inferiors.c (find_inferior): Add function documentation.
871 (unloaded_dll): Handle the case where the unloaded dll has not
872 been previously registered in the dll list.
874 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
876 * linux-arm-low.c (thumb_breakpoint_len): Delete.
877 (thumb2_breakpoint): New.
878 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
880 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
882 * linux-low.c (get_stop_pc): Check for SIGTRAP.
883 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
886 2010-01-21 Pedro Alves <pedro@codesourcery.com>
888 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
890 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
892 * linux-s390-low.c (s390_collect_ptrace_register)
893 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
895 2010-01-21 Doug Evans <dje@google.com>
897 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
898 (PTRACE_ARG4_TYPE): New macro.
899 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
900 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
901 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
902 (usr_store_inferior_registers): Ditto.
903 (linux_read_memory, linux_write_memory): Ditto.
904 (linux_test_for_tracefork): Ditto.
906 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
907 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
909 2010-01-21 Pedro Alves <pedro@codesourcery.com>
911 * proc-service.c (ps_lgetregs): Don't refetch registers from the
914 2010-01-21 Pedro Alves <pedro@codesourcery.com>
916 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
917 prototype to take a regcache. Adjust.
919 2010-01-20 Pedro Alves <pedro@codesourcery.com>
921 * regcache.h (struct thread_info): Forward declare.
922 (struct regcache): New.
923 (new_register_cache): Adjust prototype.
924 (get_thread_regcache): Declare.
925 (free_register_cache): Adjust prototype.
926 (registers_to_string, registers_from_string): Ditto.
927 (supply_register, supply_register_by_name, collect_register)
928 (collect_register_as_string, collect_register_by_name): Ditto.
929 * regcache.c (struct inferior_regcache_data): Delete.
930 (get_regcache): Rename to ...
931 (get_thread_regcache): ... this. Adjust. Switch inferior before
933 (regcache_invalidate_one): Adjust.
934 (regcache_invalidate): Fix prototype.
935 (new_register_cache): Return the new register cache.
936 (free_register_cache): Change prototype.
937 (realloc_register_cache): Adjust.
938 (registers_to_string): Change prototype to take a regcache. Adjust.
939 (registers_from_string): Ditto.
940 (register_data): Ditto.
941 (supply_register): Ditto.
942 (supply_register_by_name): Ditto.
943 (collect_register): Ditto.
944 (collect_register_as_string): Ditto.
945 (collect_register_by_name): Ditto.
946 * server.c (process_serial_event): Adjust.
947 * linux-low.h (regset_fill_func, regset_store_func): Change
949 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
951 * linux-low.c (get_stop_pc): Adjust.
952 (check_removed_breakpoint): Adjust.
953 (linux_wait_for_event): Adjust.
954 (linux_resume_one_lwp): Adjust.
955 (fetch_register): Add regcache parameter. Adjust.
956 (usr_store_inferior_registers): Ditto.
957 (regsets_fetch_inferior_registers): Ditto.
958 (regsets_store_inferior_registers): Ditto.
959 (linux_fetch_registers, linux_store_registers): Ditto.
960 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
962 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
963 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
964 prototype to take a regcache.
965 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
966 * remote-utils.c (convert_ascii_to_int, outreg)
967 (prepare_resume_reply): Change prototype to take a regcache.
969 * target.h (struct target_ops) <fetch_registers, store_registers>:
970 Change prototype to take a regcache.
971 (fetch_inferior_registers, store_inferior_registers): Change
972 prototype to take a regcache. Adjust.
973 * proc-service.c (ps_lgetregs): Adjust.
974 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
975 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
976 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
977 take a regcache. Adjust.
978 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
979 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
980 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
981 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
982 * linux-cris-low.c (cris_get_pc, cris_set_pc)
983 (cris_cannot_fetch_register):
984 (cris_breakpoint_at): Change prototype to take a regcache.
986 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
987 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
988 to take a regcache. Adjust.
989 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
991 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
992 take a regcache. Adjust.
993 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
994 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
995 (m68k_set_pc): Change prototype to take a regcache. Adjust.
996 * linux-mips-low.c (mips_get_pc):
997 (mips_set_pc): Change prototype to take a regcache. Adjust.
998 (mips_reinsert_addr): Adjust.
999 (mips_collect_register): Change prototype to take a regcache.
1001 (mips_supply_register):
1002 (mips_collect_register_32bit, mips_supply_register_32bit)
1003 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
1004 (mips_store_fpregset): Ditto.
1005 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1007 (parse_spufs_run): Adjust.
1008 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1009 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1010 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1011 take a regcache. Adjust.
1012 * linux-s390-low.c (s390_collect_ptrace_register)
1013 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1014 (s390_set_pc): Change prototype to take a regcache. Adjust.
1015 (s390_arch_setup): Adjust.
1016 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1017 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1018 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1019 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1020 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1022 (sparc_breakpoint_at): Adjust.
1023 * linux-xtensa-low.c (xtensa_fill_gregset):
1024 (xtensa_store_gregset):
1025 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1026 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1027 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1028 prototype to take a regcache. Adjust.
1029 * win32-arm-low.c (arm_fetch_inferior_register)
1030 (arm_store_inferior_register): Change prototype to take a
1032 * win32-i386-low.c (i386_fetch_inferior_register)
1033 (i386_store_inferior_register): Change prototype to take a
1035 * win32-low.c (child_fetch_inferior_registers)
1036 (child_store_inferior_registers): Change prototype to take a
1038 (win32_wait): Adjust.
1039 (win32_fetch_inferior_registers): Change prototype to take a
1041 (win32_store_inferior_registers): Adjust.
1042 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1043 store_inferior_register>: Change prototype to take a regcache.
1045 2010-01-20 Doug Evans <dje@google.com>
1047 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1049 (linux_wait_for_event1, linux_init_signals): Ditto.
1050 (W_STOPCODE): Provide definition if missing.
1052 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1054 * linux-low.c (linux_core_of_thread): New.
1055 (compare_ints, show_process, list_threads): New.
1056 (linux_qxfer_osdata): Report threads and cores.
1057 (linux_target_op): Register linux_core_of_thread.
1058 * remote-utils.c (prepare_resume_reply): Report the core.
1059 (buffer_xml_printf): Support %d specifier.
1060 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1062 (handle_query): Handle qXfer:threads. Announce availability
1064 * target.h (struct target_ops): New field core_of_thread.
1066 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1068 * Makefile.in (clean): Remove new generated files.
1069 (reg-s390.o, reg-s390.c): Remove rules.
1070 (reg-s390x.o, reg-s390x.c): Likewise.
1071 (s390-linux32.o, s390-linux32.c): Add rules.
1072 (s390-linux64.o, s390-linux64.c): Likewise.
1073 (s390x-linux64.o, s390x-linux64.c): Likewise.
1074 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1075 * linux-s390-low.c: Include <elf.h>.
1076 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1077 (init_registers_s390): Remove prototype.
1078 (init_registers_s390x): Likewise.
1079 (init_registers_s390_linux32): Add prototype.
1080 (init_registers_s390_linux64): Likewise.
1081 (init_registers_s390x_linux64): Likewise.
1082 (s390_num_regs_3264): New define.
1083 (s390_regmap_3264): New global variable.
1084 (s390_cannot_fetch_register): Remove obsolete check.
1085 (s390_cannot_store_register): Likewise.
1086 (s390_collect_ptrace_register): Handle upper/lower register halves.
1087 (s390_supply_ptrace_register): Likewise.
1088 (s390_fill_gregset): Update to register number changes.
1089 (s390_get_hwcap): New routine.
1090 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1091 Install appropriate regmap and register set.
1093 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1095 * server.c (gdbserver_version): Update copyright year to 2010.
1096 * gdbreplay.c (gdbreplay_version): Likewise.
1098 2009-12-28 Doug Evans <dje@google.com>
1100 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1101 elf/external.h. Include <elf.h> instead but only if necessary.
1103 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1105 * linux-low.c (linux_remove_process): Remove `detaching'
1106 parameter. Don't release/detach from thread_db here.
1107 (linux_kill): Release/detach from thread_db here, ...
1108 (linux_detach): ... and here, before actually detaching.
1109 (linux_wait_1): ... and here, when a process exits.
1110 * thread-db.c (any_thread_of): New.
1111 (thread_db_free): Switch the current inferior to a thread of the
1114 2009-12-21 Doug Evans <dje@google.com>
1116 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1118 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1119 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1120 warning ifndef __NR_tkill. Move setting of errno there too.
1121 Delete unnecessary resetting of errno after syscall.
1122 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1124 * configure.ac: Check for dladdr.
1125 * config.in: Regenerate.
1126 * configure: Regenerate.
1127 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1128 (try_thread_db_load): Update.
1130 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1132 2009-12-18 Doug Evans <dje@google.com>
1134 * event-loop.c: Include unistd.h if it exists.
1136 * linux-low.c (my_waitpid): Move definition away from being in
1137 between linux_tracefork_child/linux_test_for_tracefork.
1139 * gdb_proc_service.h (psaddr_t): Fix type.
1140 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1141 signature to match glibc.
1143 2009-12-16 Doug Evans <dje@google.com>
1145 * linux-low.c (linux_read_memory): Fix argument to read.
1147 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1149 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1150 events, don't leave current_inferior pointing at null.
1152 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1154 * win32-low.c (LOG): Delete.
1155 (OUTMSG): Output to stderr.
1156 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1157 on compile time LOG macro.
1158 (win32_wait): Fix debug output.
1160 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1162 * win32-low.c (win32_add_one_solib): If the dll name is
1163 "ntdll.dll", prepend the system directory to the dll path.
1165 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1167 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1169 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1170 Vladimir Prus <vladimir@codesourcery.com>
1172 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1173 * configure.ac: Check for __mcoldfire__ and set
1174 gdb_cv_m68k_is_coldfire.
1175 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1176 reg-cf.o and reg-m68k.o.
1177 * configure: Regenerated.
1179 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1181 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1182 Pass it to thread_db_free.
1183 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1184 proper `detaching' argument to linux_remove_process.
1185 * linux-low.h (thread_db_free): Add `detaching' parameter.
1186 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1188 (thread_db_free): Add `detaching' parameter. Only
1189 call td_ta_clear_event if detaching from process.
1191 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1193 * thread-db.c (thread_db_free): Fix typo.
1195 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1198 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1200 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1202 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1203 with an i686 compiler.
1204 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1206 * configure: Rebuilt.
1208 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1212 * server.c (handle_search_memory_1): Correct read_addr initialization
1213 in loop for searching subsequent chunks.
1215 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1217 * configure.ac: New --with-libthread-db option.
1218 * thread-db.c: Allow direct dependence on libthread_db.
1219 (thread_db_free): Adjust.
1220 * config.in: Regenerate.
1221 * configure: Likewise.
1223 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1226 * thread-db.c (attach_thread): New function.
1227 (maybe_attach_thread): Return success/failure.
1228 (find_new_threads_callback): Adjust.
1229 (thread_db_find_new_threads): Loop until no new threads.
1231 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1233 * proc-service.c (ps_lgetregs): Formatting.
1235 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1237 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1238 * configure.ac: Adjust.
1239 * linux-low.h (struct process_info_private): Move members to struct
1241 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1242 * linux-low.c (linux_remove_process): Adjust.
1243 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1244 * server.c (handle_query): Move code ...
1245 (handle_monitor_command): ... here. New function.
1246 * target.h (struct target_ops): New member.
1247 * thread-db.c (struct thread_db): New.
1248 (libthread_db_search_path): New variable.
1249 (thread_db_create_event, thread_db_enable_reporting)
1250 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1251 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1252 (try_thread_db_load_1, dladdr_to_soname): New functions.
1253 (try_thread_db_load, thread_db_load_search): New functions.
1254 (thread_db_init): Search for libthread_db.
1255 (thread_db_free): New function.
1256 (thread_db_handle_monitor_command): Likewise.
1257 * config.in: Regenerate.
1258 * configure: Regenerate.
1260 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1262 * spu-low.c (spu_kill): Wait for inferior to terminate.
1263 Call clear_inferiors.
1264 (spu_detach): Call clear_inferiors.
1266 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1268 * aclocal.m4: Regenerate.
1269 * config.in: Likewise.
1270 * configure: Likewise.
1272 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1274 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1275 (parse_spufs_run): New function.
1276 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1277 (ppc_breakpoint_at): Handle SPU breakpoints.
1279 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1281 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1282 (SPUFS_MAGIC): Define.
1283 (spu_enumerate_spu_ids): New function.
1284 (linux_qxfer_spu): New function.
1285 (linux_target_ops): Install linux_qxfer_spu.
1287 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1289 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1290 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1291 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1292 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1293 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1294 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1295 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1296 (init_registers_powerpc_cell32l): Add prototype.
1297 (init_registers_powerpc_cell64l): Likewise.
1298 (ppc_arch_setup): Detect Cell/B.E. architecture.
1300 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1302 * Makefile.in (datarootdir): New variable.
1304 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1306 * linux-low.c (linux_write_memory): Update debugging output.
1307 * Makefile.in (clean): Add new descriptions.
1308 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1309 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1310 * configure.srv: Add new files for arm*-*-linux*.
1311 * linux-arm-low.c: Add new declarations.
1312 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1313 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1314 (HWCAP_VFPv3D16): New.
1315 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1316 instead of __IWMMXT__.
1317 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1318 (arm_arch_setup): New.
1319 (target_regsets): Remove #ifdef. Add VFP regset.
1320 (the_low_target): Use arm_arch_setup.
1322 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1324 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1325 the main thread again.
1327 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1329 Adding Neutrino gdbserver.
1330 * configure: Regenerated.
1331 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1332 * configure.srv (i[34567]86-*-nto*): New target.
1333 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1334 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1335 (nto_comctrl) [__QNX__]: New function.
1336 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1338 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1340 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1343 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1344 Pedro Alves <pedro@codesourcery.com>
1346 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1347 don't support CONTEXT_EXTENDED_REGISTERS.
1348 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1349 (the_low_target): Install them.
1350 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1351 failing with ERROR_PIPE_NOT_CONNECTED.
1353 2009-06-30 Doug Evans <dje@google.com>
1354 Pierre Muller <muller@ics.u-strasbg.fr>
1356 Add h/w watchpoint support to x86-linux, win32-i386.
1357 * Makefile.in (SFILES): Add i386-low.c
1358 (i386_low_h): Define.
1359 (i386-low.o): Add dependencies.
1360 (linux-x86-low.o): Add i386-low.h dependency.
1361 (win32-i386-low.o): Ditto.
1362 * i386-low.c: New file.
1363 * i386-low.h: New file.
1364 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1365 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1366 * linux-low.c (linux_add_process): Initialize arch_private.
1367 (linux_remove_process): Free arch_private.
1368 (add_lwp): Initialize arch_private.
1369 (delete_lwp): Free arch_private.
1370 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1372 * linux-low.h (process_info_private): New member arch_private.
1373 (lwp_info): New member arch_private.
1374 (linux_target_ops): New members new_process, new_thread,
1376 (ptid_of): New macro.
1377 * linux-x86-low.c: Include stddef.h, i386-low.h.
1378 (arch_process_info): New struct.
1379 (arch_lwp_info): New struct.
1380 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1381 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1382 (i386_dr_low_get_status): New function.
1383 (x86_insert_point, x86_remove_point): New functions.
1384 (x86_stopped_by_watchpoint): New function.
1385 (x86_stopped_data_address): New function.
1386 (x86_linux_new_process, x86_linux_new_thread): New functions.
1387 (x86_linux_prepare_to_resume): New function.
1388 (the_low_target): Add entries for insert_point, remove_point,
1389 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1391 * server.c (debug_hw_points): New global.
1392 (monitor_show_help): Document set debug-hw-points.
1393 (handle_query): Process "set debug-hw-points".
1394 * server.h (debug_hw_points): Declare.
1395 (paddress): Declare.
1396 * utils.c (NUMCELLS, CELLSIZE): New macros.
1397 (get_sell, xsnprintf, paddress): New functions.
1398 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1399 remove_point, stopped_by_watchpoint, stopped_data_address.
1400 * win32-i386-low.c: Include i386-low.h.
1401 (debug_reg_state): Replaces dr.
1402 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1403 (i386_dr_low_get_status): New function.
1404 (i386_insert_point, i386_remove_point): New functions.
1405 (i386_stopped_by_watchpoint): New function.
1406 (i386_stopped_data_address): New function.
1407 (i386_initial_stuff): Update.
1408 (get_thread_context,set_thread_context,i386_thread_added): Update.
1409 (the_low_target): Add entries for insert_point,
1410 remove_point, stopped_by_watchpoint, stopped_data_address.
1411 * win32-low.c (win32_insert_watchpoint): New function.
1412 (win32_remove_watchpoint): New function.
1413 (win32_stopped_by_watchpoint): New function.
1414 (win32_stopped_data_address): New function.
1415 (win32_target_ops): Add entries for insert_watchpoint,
1416 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1417 * win32-low.h (win32_target_ops): New members insert_point,
1418 remove_point, stopped_by_watchpoint, stopped_data_address.
1420 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1422 * server.c (process_serial_event): Re-return unsupported, not
1423 error, if the type isn't recognized. Re-allow supporting only
1424 insert or remove packets. Also call require_running for
1425 breakpoints. Add missing break statement to default case. Tidy.
1426 * target.h (struct target_ops): Rename insert_watchpoint to
1427 insert_point, and remove_watchpoint to remove_point.
1429 * linux-low.h (struct linux_target_ops): Likewise.
1430 * linux-low.c (linux_insert_watchpoint): Rename to ...
1431 (linux_insert_point): ... this. Adjust.
1432 (linux_remove_watchpoint): Rename to ...
1433 (linux_remove_point): ... this. Adjust.
1434 (linux_target_ops): Adjust.
1435 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1436 (cris_insert_point): ... this.
1437 (cris_remove_watchpoint): Rename to ...
1438 (cris_remove_point): ... this.
1439 (the_low_target): Adjust.
1441 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1443 * server.c (handle_v_kill): Pass signal_pid to
1444 kill_inferior if multi_process is zero.
1446 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1448 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1449 * target.h (target_ops): Comment for *_watchpoint to make it clear
1450 the functions can get types '0' and '1'.
1452 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1454 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1455 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1456 * regcache.c (get_regcache): Likewise.
1457 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1458 * win32-low.c (child_fetch_inferior_registers): Remove check for
1461 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1462 Pedro Alves <pedro@codesourcery.com>
1464 * target.h (struct target_ops) <supports_multi_process>: New
1466 (target_supports_multi_process): New.
1467 * server.c (handle_query): Even if GDB reports support, only
1468 enable multi-process if the target also supports it. Report
1469 multi-process support only if the target backend supports it.
1470 * linux-low.c (linux_supports_multi_process): New function.
1471 (linux_target_ops): Install it as target_supports_multi_process
1474 2009-05-24 Doug Evans <dje@google.com>
1476 Global renaming of find_thread_pid to find_thread_ptid.
1477 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1478 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1479 All callers updated.
1481 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1482 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1485 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1486 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1487 (linux_resume_one_lwp): Ditto.
1489 2009-05-23 Doug Evans <dje@google.com>
1491 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1492 from struct inferior_list_entry * to struct lwp_info *.
1493 All callers updated.
1495 2009-05-13 Doug Evans <dje@google.com>
1497 * linux-x86-low.c: Don't include assert.h.
1498 (x86_siginfo_fixup): Use fatal, not assert.
1499 (x86_arch_setup): Fix comment.
1501 2009-05-12 Doug Evans <dje@google.com>
1503 Biarch support for i386/amd64 gdbserver.
1504 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1505 Add linux-x86-low.c.
1506 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1507 (linux-x86-low.o): Add.
1508 * linux-x86-64-low.c: Delete.
1509 * linux-i386-low.c: Delete.
1510 * linux-x86-low.c: New file.
1511 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1513 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1515 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1516 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1517 (linux_child_pid_to_exec_file): New function.
1518 (elf_64_header_p, elf_64_file_p): New functions.
1519 (siginfo_fixup): New function.
1520 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1521 give target a chance to convert layout.
1522 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1523 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1525 2009-05-07 Doug Evans <dje@google.com>
1527 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1528 (regsets_store_inferior_registers): Ditto.
1530 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1534 * linux-low.c (must_set_ptrace_flags): Delete.
1535 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1537 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1538 `lwp->must_set_ptrace_flags' instead.
1539 (linux_wait_for_event_1): Set ptrace options here.
1540 (linux_wait_1): ... not here.
1542 2009-04-30 Doug Evans <dje@google.com>
1544 * inferiors.c (started_inferior_callback): New function.
1545 (attached_inferior_callback): New function.
1546 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1547 * server.c (print_started_pid, print_attached_pid): New functions.
1548 (detach_or_kill_for_exit): New function.
1549 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1550 * server.h (have_started_inferiors_p): Declare.
1551 (have_attached_inferiors_p): Declare.
1553 * inferiors.c (remove_process): Fix memory leak, free process.
1554 * linux-low.c (linux_remove_process): New function.
1555 (linux_kill): Call it instead of remove_process.
1556 (linux_detach, linux_wait_1): Ditto.
1558 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1560 * configure.srv: Add x86 Windows CE target.
1562 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1564 * inferiors.c (get_thread_process): Make global.
1565 * server.h (get_thread_process): Add prototype.
1566 * thread-db.c (find_one_thread): Use get_thread_process
1567 instead of current_process.
1568 (thread_db_get_tls_address): Do not crash if called when
1569 thread layer is not yet initialized.
1571 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1573 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1574 * spu-low.c (current_tid): Rename to ...
1575 (current_ptid): ... this.
1576 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1577 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1578 ptid_get_lwp (current_ptid) instead of current_tid.
1579 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1580 instead of current_tid. Use find_process_pid to verify pid
1581 argument is valid. Pass proper argument to remove_process.
1582 (spu_thread_alive): Compare current_ptid instead of current_tid.
1583 (spu_resume): Likewise.
1585 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1587 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1590 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1592 Implement the multiprocess extensions, and add linux multiprocess
1595 * server.h (ULONGEST): Declare.
1596 (struct ptid, ptid_t): New.
1597 (minus_one_ptid, null_ptid): Declare.
1598 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1599 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1600 (struct inferior_list_entry): Change `id' type from unsigned from
1602 (struct sym_cache, struct breakpoint, struct
1603 process_info_private): Forward declare.
1604 (struct process_info): Declare.
1605 (current_process): Declare.
1606 (all_processes): Declare.
1607 (initialize_inferiors): Declare.
1608 (add_thread): Adjust to use ptid_t.
1609 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1610 (add_process, remove_process, find_thread_pid): Declare.
1611 (find_inferior_id): Adjust to use ptid_t.
1612 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1613 (multi_process): Declare.
1614 (push_event): Adjust to use ptid_t.
1615 (read_ptid, write_ptid): Declare.
1616 (prepare_resume_reply): Adjust to use ptid_t.
1617 (clear_symbol_cache): Declare.
1618 * inferiors.c (all_processes): New.
1619 (null_ptid, minus_one_ptid): New.
1620 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1621 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1622 (add_thread): Change unsigned long to ptid. Remove gdb_id
1624 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1625 (gdb_id_to_thread): Rename to ...
1626 (find_thread_pid): ... this. Change unsigned long to ptid.
1627 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1628 (loaded_dll, pull_pid_from_list): Adjust.
1629 (add_process, remove_process, find_process_pid)
1630 (get_thread_process, current_process, initialize_inferiors): New.
1631 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1632 (struct target_waitstatus) <related_pid>: Ditto.
1633 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1635 (struct target_ops) <join>: Add `pid' argument.
1636 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1637 (struct target_ops) <wait>: Add `ptid' field. Change return type
1639 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1640 (mywait): Add `ptid' argument. Change return type to ptid_t.
1641 (target_pid_to_str): Declare.
1642 * target.c (set_desired_inferior): Adjust to use ptids.
1643 (mywait): Add new `ptid' argument. Adjust.
1644 (target_pid_to_str): New.
1645 * mem-break.h (free_all_breakpoints): Declare.
1646 * mem-break.c (breakpoints): Delelete.
1647 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1648 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1649 to use per-process breakpoint list.
1650 (free_all_breakpoints): New.
1651 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1652 (symbol_cache, all_symbols_looked_up): Delete.
1654 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1656 (prepare_resume_reply): Change ptid argument's type from unsigned
1657 long to ptid_t. Adjust. Implement W;process and X;process.
1658 (free_sym_cache, clear_symbol_cache): New.
1659 (look_up_one_symbol): Adjust to per-process symbol cache. *
1660 * server.c (cont_thread, general_thread, step_thread): Change type
1663 (multi_process): New.
1664 (last_ptid): Change type to ptid_t.
1665 (struct vstop_notif) <ptid>: Change type to ptid_t.
1666 (queue_stop_reply, push_event): Change `ptid' argument's type to
1668 (discard_queued_stop_replies): Add `pid' argument.
1669 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1670 changes. Don't reference the `attached' global.
1671 (attach_inferior): Adjust to mywait interface changes.
1672 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1673 features. Handle and report "multiprocess+". Handle
1675 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1677 (handle_v_kill): New.
1678 (handle_v_stopped): Adjust to use target_pid_to_str.
1679 (handle_v_requests): Allow multiple attaches and runs when
1680 multiprocess extensions are in effect. Handle "vKill".
1681 (myresume): Adjust to use ptids.
1682 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1683 (handle_status): Adjust to discard_queued_stop_replies interface
1685 (first_thread_of, kill_inferior_callback)
1686 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1687 (main): Call initialize_inferiors. Adjust to use ptids, killing
1688 and detaching from all inferiors. Handle multiprocess packet
1690 * linux-low.h: Include gdb_proc_service.h.
1691 (struct process_info_private): New.
1692 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1693 <lwpid_of>: Use ptid_get_lwp.
1694 (get_lwp_thread): Adjust.
1695 (struct lwp_info): Add `dead' member.
1696 (find_lwp_pid): Declare.
1697 * linux-low.c (thread_db_active): Delete.
1698 (new_inferior): Adjust comment.
1699 (inferior_pid): Delete.
1700 (linux_add_process): New.
1701 (handle_extended_wait): Adjust.
1702 (add_lwp): Change unsigned long to ptid.
1703 (linux_create_inferior): Add process to processes table. Adjust
1704 to use ptids. Don't set new_inferior here.
1705 (linux_attach_lwp): Rename to ...
1706 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1707 it. Adjust to use ptids.
1708 (linux_attach_lwp): New.
1709 (linux_attach): Add process to processes table. Don't set
1711 (struct counter): New.
1712 (second_thread_of_pid_p, last_thread_of_process_p): New.
1713 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1715 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1716 processes. Remove process from process table.
1717 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1718 to multiple processes.
1719 (any_thread_of): New.
1720 (linux_detach): Add `pid' argument, and handle it. Remove process
1721 from processes table.
1722 (linux_join): Add `pid' argument. Handle it.
1723 (linux_thread_alive): Change unsighed long argument to ptid_t.
1724 Consider dead lwps as not being alive.
1725 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1726 threads we're not interested in.
1727 (same_lwp, find_lwp_pid): New.
1728 (linux_wait_for_lwp): Change `pid' argument's type from int to
1730 (linux_wait_for_event): Rename to ...
1731 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1732 from int to ptid_t. Adjust.
1733 (linux_wait_for_event): New.
1734 (linux_wait_1): Add `ptid' argument. Change return type to
1735 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1736 that exit from the process table.
1737 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1739 (mark_lwp_dead): New.
1740 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1741 stopping all threads, mark its main lwp as dead.
1742 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1744 (fetch_register, usr_store_inferior_registers)
1745 (regsets_fetch_inferior_registers)
1746 (regsets_store_inferior_registers, linux_read_memory)
1747 (linux_write_memory): Inline `inferior_pid'.
1748 (linux_look_up_symbols): Adjust to use per-process
1750 (linux_request_interrupt): Adjust to use ptids.
1751 (linux_read_auxv): Inline `inferior_pid'.
1752 (initialize_low): Don't reference thread_db_active.
1753 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1754 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1755 (ps_getpid): Return the pid of the current inferior.
1756 * thread-db.c (proc_handle, thread_agent): Delete.
1757 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1759 (find_one_thread): Change argument type to ptid_t. Adjust to
1761 (maybe_attach_thread): Adjust to per-process data and ptids.
1762 (thread_db_find_new_threads): Ditto.
1763 (thread_db_init): Ditto.
1764 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1765 processes table. Adjust to use ptids.
1766 (spu_kill, spu_detach): Adjust interface. Remove process from
1768 (spu_join, spu_thread_alive): Adjust interface.
1769 (spu_wait): Adjust interface. Remove process from processes
1770 table. Adjust to use ptids.
1771 * win32-low.c (current_inferior_tid): Delete.
1772 (current_inferior_ptid): New.
1773 (debug_event_ptid): New.
1774 (thread_rec): Take a ptid. Adjust.
1775 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1776 (child_delete_thread): Ditto.
1777 (do_initial_child_stuff): Add `attached' argument. Add process to
1779 (child_fetch_inferior_registers, child_store_inferior_registers):
1781 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1782 (win32_attach): Pass 1 to do_initial_child_stuff.
1783 (win32_kill): Adjust interface. Remove process from processes
1785 (win32_detach): Ditto.
1786 (win32_join): Adjust interface.
1787 (win32_thread_alive): Take a ptid.
1788 (win32_resume): Adjust to use ptids.
1789 (get_child_debug_event): Ditto.
1790 (win32_wait): Adjust interface. Remove exiting process from
1793 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1795 Non-stop mode support.
1797 * server.h (non_stop): Declare.
1798 (gdb_client_data, handler_func): Declare.
1799 (delete_file_handler, add_file_handler, start_event_loop):
1801 (handle_serial_event, handle_target_event, push_event)
1802 (putpkt_notif): Declare.
1803 * target.h (enum resume_kind): New.
1804 (struct thread_resume): Replace `step' field by `kind' field.
1805 (TARGET_WNOHANG): Define.
1806 (struct target_ops) <wait>: Add `options' argument.
1807 <supports_non_stop, async, start_non_stop>: New fields.
1808 (target_supports_non_stop, target_async): New.
1809 (start_non_stop): Declare.
1810 (mywait): Add `options' argument.
1811 * target.c (mywait): Add `options' argument. Print child exit
1813 (start_non_stop): New.
1814 * server.c (non_stop, own_buf, mem_buf): New globals.
1815 (struct vstop_notif): New.
1816 (notif_queue): New global.
1817 (queue_stop_reply, push_event, discard_queued_stop_replies)
1818 (send_next_stop_reply): New.
1819 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1821 (attach_inferior): In non-stop mode, don't wait for the target
1823 (handle_general_set): Handle QNonStop.
1824 (handle_query): When handling qC, return the current general
1825 thread, instead of the first thread of the list.
1826 (handle_query): If the backend supports non-stop mode, include
1827 QNonStop+ in the qSupported query response.
1828 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1830 (handle_v_attach, handle_v_run): Handle non-stop mode.
1831 (handle_v_stopped): New.
1832 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1833 (myresume): Adjust to use resume_kind. Handle non-stop.
1834 (queue_stop_reply_callback): New.
1835 (handle_status): Handle non-stop mode.
1836 (main): Clear non_stop flag on reconnection. Use the event-loop.
1837 Refactor serial protocol handling from here ...
1838 (process_serial_event): ... to this new function. When GDB
1839 selects any thread, select one here. In non-stop mode, wait until
1840 GDB acks all pending events before exiting.
1841 (handle_serial_event, handle_target_event): New.
1842 * remote-utils.c (remote_open): Install remote_desc in the event
1844 (remote_close): Remove remote_desc from the event loop.
1845 (putpkt_binary): Rename to...
1846 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1847 (putpkt_binary): New as wrapper around putpkt_binary_1.
1848 (putpkt_notif): New.
1849 (prepare_resume_reply): In non-stop mode, don't change the
1851 * event-loop.c: New.
1852 * Makefile.in (OBJ): Add event-loop.o.
1853 (event-loop.o): New rule.
1855 * linux-low.h (pid_of): Moved here.
1857 (get_lwp_thread): Use lwpid_of.
1858 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1859 * linux-low.c (pid_of): Delete.
1860 (inferior_pid): Use lwpid_of.
1861 (linux_event_pipe): New.
1862 (target_is_async_p): New.
1864 (handle_extended_wait): Use lwpid_of.
1865 (add_lwp): Don't set lwpid field.
1866 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1867 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1868 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1869 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1870 first. Adjust to linux_wait_for_event interface changes. Use
1872 (linux_detach): Don't delete the main lwp here.
1873 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1874 (status_pending_p): Don't consider explicitly suspended lwps.
1875 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1876 pointer. Add OPTIONS argument. Change return type to int. Use
1877 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1878 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1879 pointer. Add status pointer argument. Return a pid instead of a
1880 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1881 changes. In non-stop mode, don't switch to a random thread.
1882 (linux_wait): Rename to...
1883 (linux_wait_1): ... this. Add target_options argument, and handle
1884 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1885 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1886 clean exit and signal exit code. Don't stop all threads in
1887 non-stop mode. In all-stop mode, only stop all threads when
1888 reporting a stop to GDB. Handle explicit thread stop requests.
1889 (async_file_flush, async_file_mark): New.
1891 (send_sigstop): Use lwpid_of.
1892 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1893 interface changes. In non-stop mode, don't switch to a random
1895 (linux_resume_one_lwp): Use lwpid_of.
1896 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1897 (linux_resume_one_thread): ... this. Handle resume_stop. In
1898 non-stop mode, don't look for pending flag in all threads.
1899 (resume_status_pending_p): Don't consider explicitly suspended
1901 (my_waitpid): Reimplement. Emulate __WALL.
1902 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1904 (sigchld_handler, linux_supports_non_stop, linux_async)
1905 (linux_start_non_stop): New.
1906 (linux_target_ops): Register linux_supports_non_stop, linux_async
1907 and linux_start_non_stop.
1908 (initialize_low): Install SIGCHLD handler.
1909 * thread-db.c (thread_db_create_event, find_one_thread)
1910 (thread_db_get_tls_address): Use lwpid_of.
1911 * win32-low.c (win32_detach): Adjust to use resume_kind.
1912 (win32_wait): Add `options' argument.
1913 * spu-low.c (spu_resume): Adjust to use resume_kind.
1914 (spu_wait): Add `options' argument.
1916 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1918 Decouple target code from remote protocol.
1920 * target.h (enum target_waitkind): New.
1921 (struct target_waitstatus): New.
1922 (struct target_ops) <wait>: Return an unsigned long. Take a
1923 target_waitstatus pointer instead of a char pointer.
1925 * target.c (mywait): Change prototype to return an unsigned long.
1926 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1927 * server.h (thread_from_wait, old_thread_from_wait): Delete
1929 (prepare_resume_reply): Change prototype to take a
1931 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1932 (last_status, last_ptid): New.
1933 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1934 pid instead of a signal.
1935 (attach_inferior): Remove "status" and "signal" parameters.
1937 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1939 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1940 (handle_v_requests, myresume): Remove "status" and "signal"
1942 (handle_status): New.
1943 (main): Delete local `status'. Adjust.
1944 * remote-utils.c: Include target.h.
1945 (prepare_resume_reply): Change prototype to take a
1946 target_waitstatus. Adjust.
1948 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1950 * spu-low.c (spu_wait): Adjust.
1951 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1953 (win32_wait): Adjust.
1955 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1957 * target.h (struct thread_resume): Delete leave_stopped member.
1958 (struct target_ops): Add a `n' argument to the `resume' callback.
1959 * server.c (start_inferior): Adjust.
1960 (handle_v_cont, myresume): Adjust.
1961 * linux-low.c (check_removed_breakpoint): Adjust to resume
1962 interface change, and to removed leave_stopped field.
1963 (resume_ptr): Delete.
1964 (struct thread_resume_array): New.
1965 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1966 resume interface change.
1967 (linux_continue_one_thread, linux_queue_one_thread)
1968 (resume_status_pending_p): Check if the resume field is NULL
1969 instead of checking the leave_stopped member.
1970 (linux_resume): Adjust to the target resume interface change.
1971 * spu-low.c (spu_resume): Adjust to the target resume interface
1973 * win32-low.c (win32_detach, win32_resume): Ditto.
1975 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1977 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1979 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1981 (linux_continue_one_thread): Only preserve the stepping flag if
1982 there's a pending breakpoint.
1984 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1986 * server.c (main): After the inferior having exited, call
1987 remote_close before exiting gdbserver.
1989 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1991 Fix size of FPSCR in Power 7 processors.
1992 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1993 (PPC_FEATURE_HAS_DFP): New #define.
1994 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1997 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1999 * server.c (handle_query) Whitespace and formatting.
2001 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2003 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
2004 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
2005 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2006 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2007 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2008 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2009 Makefile.in, configure.ac: Fix whitespace throughout.
2010 * configure: Regenerate.
2012 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2014 * inferiors.c (find_inferior): Make it safe for the callback
2015 function to delete the currently iterated inferior.
2017 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2019 * Makefile.in (linuw_low_h): Move higher.
2020 (thread-db.o): Depend on $(linux_low_h).
2022 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2024 Rename "process" to "lwp" throughout.
2026 * linux-low.c (all_processes): Rename to...
2027 (all_lwps): ... this.
2028 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2029 (add_process): Rename to ...
2030 (add_lwp): ... this. Adjust.
2031 (linux_create_inferior): Adjust.
2032 (linux_attach_lwp): Adjust.
2033 (linux_attach): Adjust.
2034 (linux_kill_one_process): Rename to ...
2035 (linux_kill_one_lwp): ... this. Adjust.
2036 (linux_kill): Adjust.
2037 (linux_detach_one_process): Rename to ...
2038 (linux_detach_one_lwp): ... this. Adjust.
2039 (linux_detach): Adjust.
2040 (check_removed_breakpoint): Adjust.
2041 (status_pending_p): Adjust.
2042 (linux_wait_for_process): Rename to ...
2043 (linux_wait_for_lwp): ... this. Adjust.
2044 (linux_wait_for_event): Adjust.
2045 (send_sigstop): Adjust.
2046 (wait_for_sigstop): Adjust.
2047 (stop_all_processes): Rename to ...
2048 (stop_all_lwps): ... this.
2049 (linux_resume_one_process): Rename to ...
2050 (linux_resume_one_lwp): ... this. Adjust.
2051 (linux_set_resume_request, linux_continue_one_thread)
2052 (linux_queue_one_thread, resume_status_pending_p)
2053 (usr_store_inferior_registers, regsets_store_inferior_registers)
2054 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2056 * linux-low.h (get_process): Rename to ...
2057 (get_lwp): ... this. Adjust.
2058 (get_thread_process): Rename to ...
2059 (get_thread_lwp): ... this. Adjust.
2060 (get_process_thread): Rename to ...
2061 (get_lwp_thread): ... this. Adjust.
2062 (struct process_info): Rename to ...
2063 (struct lwp_info): ... this.
2064 (all_processes): Rename to ...
2065 (all_lwps): ... this.
2066 * proc-service.c (ps_lgetregs): Adjust.
2067 * thread-db.c (thread_db_create_event, find_one_thread)
2068 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2070 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2072 * server.c (handle_query): Handle "qAttached".
2074 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2076 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2077 GPLv3, update license URL.
2079 2009-03-01 Doug Evans <dje@google.com>
2081 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2082 (server_h): Add gdb_signals.h.
2083 (signals.o): Update.
2084 * server.h (target_signal_from_host,target_signal_to_host_p)
2085 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2087 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2089 * remote-utils.c (getpkt): Also generate remote-debug
2090 information if noack_mode is set.
2092 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2094 * server.c (handle_query): Report qXfer:siginfo:read and
2095 qXfer:siginfo:write as supported and handle them.
2096 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2097 * linux-low.c (linux_xfer_siginfo): New.
2098 (linux_target_ops): Set it.
2100 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2102 * server.c (gdbserver_usage): Mention --remote-debug.
2103 (main): Accept '--remote-debug' switch.
2105 2009-01-18 Doug Evans <dje@google.com>
2107 * regcache.c (new_register_cache): No need to check result of xcalloc.
2108 * server.c (handle_search_memory): Back out calls to xmalloc,
2109 result is checked and error is returned to user upon failure.
2110 (handle_query): Ditto. Add more checks for result of malloc.
2111 (handle_v_cont): Check result of malloc, report error back to
2113 (handle_v_run): Ditto. Call freeargv.
2114 * server.h (freeargv): Declare.
2115 * utils.c (freeargv): New fn.
2117 2009-01-15 Doug Evans <dje@google.com>
2119 * gdbreplay.c (perror_with_name): Make arg const char *.
2120 * server.h (target_signal_to_name): Make return type const char *.
2121 * thread-db.c (thread_db_err_str): Make return type const char *.
2122 * utils.c (perror_with_name): Make arg const char *.
2124 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2126 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2127 when handling a EXIT_PROCESS_DEBUG_EVENT.
2129 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2131 * gdbreplay.c (gdbreplay_version): Update copyright year.
2132 * server.c (gdbserver_version): Likewise.
2134 2009-01-05 Doug Evans <dje@google.com>
2136 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2137 (handle_extended_wait): Improve comment.
2139 2008-12-13 Doug Evans <dje@google.com>
2141 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2142 * server.h (ATTR_MALLOC): New macro.
2143 (xmalloc,xcalloc,xstrdup): Declare.
2144 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2145 * inferiors.c: Ditto.
2146 * linux-low.c: Ditto.
2147 * mem-break.c: Ditto.
2148 * regcache.c: Ditto.
2149 * remote-utils.c: Ditto.
2152 * win32-low.c: Ditto.
2154 2008-12-12 Doug Evans <dje@google.com>
2156 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2157 in debugging printf.
2159 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2161 2008-12-09 Doug Evans <dje@google.com>
2163 * linux-low.h (struct process_info): Delete member tid, unused.
2164 * thread-db.c (find_one_thread): Update.
2165 (maybe_attach_thread): Update.
2167 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2169 * target.h (struct target_ops): Add qxfer_osdata member.
2170 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2172 (linux_qxfer_osdata): New functions.
2173 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2175 * server.c (handle_query): Handle "qXfer:osdata:read:".
2176 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2177 (buffer_xml_printf): New functions.
2178 * server.h (struct buffer): New.
2179 (buffer_grow_str, buffer_grow_str0): New macros.
2180 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2181 (buffer_xml_printf): Declare.
2183 2008-11-24 Doug Evans <dje@google.com>
2185 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2187 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2189 * server.c (handle_v_run): Always use the supplied argument list.
2191 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2193 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2194 (xtensa_regmap_table): Add entry for scompare1.
2196 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2198 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2199 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2200 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2201 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2202 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2203 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2204 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2205 XML target descriptions.
2206 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2207 when inferior is running on an ISA 2.05 or later processor. Add
2208 special case to return offset for full 64-bit slot of FPSCR when
2211 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2213 * Makefile.in (SFILES, clean): Added sparc64 files.
2214 (reg-sparc64.o, reg-sparc64.c): New.
2215 * configure.srv (sparc*-*-linux*): New configuration.
2216 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2217 syscall arguments for SPARC.
2218 (regsets_store_inferior_registers): Likewise.
2219 * linux-sparc-low.c: New file.
2221 2008-10-21 Doug Evans <dje@google.com>
2223 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2224 (READLINE_DIR,READLINE_DEP): Delete.
2225 (INTERNAL_CFLAGS): Update.
2226 (LINTFLAGS): Update.
2228 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2230 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2231 whole argv from the last run, not just argv[0].
2233 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2235 * regcache.c (new_register_cache): Return NULL if the register
2236 cache size isn't known yet.
2237 (free_register_cache): Avoid dereferencing a NULL regcache.
2239 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2241 * configure.srv: Merge MIPS and MIPS64.
2243 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2245 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2247 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2249 * Makefile.in: Add required vsx dependencies.
2251 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2252 Declare init_registers_powerpc_vsx32l.
2253 Declare init_registers_powerpc_vsx64l.
2254 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2255 (ppc_arch_setup): Check for VSX in hwcap.
2256 (ppc_fill_vsxregset): New function.
2257 (ppc_store_vsxregset): New function.
2258 Add new VSX entry in regset_info target_regsets.
2260 * configure.srv: Add new VSX dependencies.
2262 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2264 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2265 (remote_open): Set or clear transport_is_reliable.
2266 (putpkt_binary): Don't expect acks in noack mode.
2267 (getpkt): Don't send ack/nac in noack mode.
2268 * server.c (handle_general_set): Handle QStartNoAckMode.
2269 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2271 (main): Reset noack_mode on every connection.
2272 * server.h (noack_mode): Declare.
2274 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2276 * Makefile.in (GDBREPLAY_OBS): New variable.
2277 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2279 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2280 Daniel Jacobowitz <dan@codesourcery.com>
2282 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2283 (usr_store_inferior_registers): Likewise.
2284 (regsets_store_inferior_registers): Likewise.
2286 2008-07-31 Rolf Jansen <rj@surtec.com>
2287 Pedro Alves <pedro@codesourcery.com>
2289 * configure.ac: Check for memmem declaration.
2290 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2291 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2292 (disable_packet_qfThreadInfo): Unconditionally compile.
2293 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2294 * configure, config.in: Regenerate.
2296 2008-07-28 Doug Kwan <dougkwan@google.com>
2298 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2299 (linux_write_memory): Remove declaration of errno.
2301 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2303 * linux-low.c (handle_extended_wait): Do not use "status"
2304 variable uninitialized.
2306 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2308 * server.c (handle_v_attach): Inhibit reporting dll changes.
2310 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2312 * remote-utils.c (prepare_resume_reply): If requested, don't
2313 output "thread:TID" in the T stop reply.
2315 * server.c (disable_packet_vCont, disable_packet_Tthread)
2316 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2317 (handle_query): If requested, disable support for qC, qfThreadInfo
2319 (handle_v_requests): If requested, disable support for vCont.
2320 (gdbserver_show_disableable): New.
2321 (main): Handle --disable-packet and --disable-packet=LIST.
2323 * server.h (disable_packet_vCont, disable_packet_Tthread)
2324 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2326 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2328 * server.c (gdbserver_usage): Mention --version.
2330 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2332 * Makefile.in (gdbreplay.o): New rule.
2334 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2336 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2337 message, not gdbserver.
2339 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2340 Nathan Sidwell <nathan@codesourcery.com>
2341 Joseph Myers <joseph@codesourcery.com>
2343 * acinclude.m4: Include ../../config/acx.m4.
2344 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2345 * configure, config.in: Regenerate.
2346 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2347 * server.c (gdbserver_version): Print PKGVERSION.
2348 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2349 (main): Adjust gdbserver_usage calls.
2350 * gdbreplay.c (version, host_name): Add declarations.
2351 (gdbreplay_version, gdbreplay_usage): New.
2352 (main): Accept --version and --help options.
2354 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2356 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2357 (arm_breakpoint_at): Handle Thumb.
2358 (the_low_target): Add comment.
2360 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2362 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2364 2008-05-09 Doug Evans <dje@google.com>
2366 * server.h (decode_search_memory_packet): Declare.
2367 * remote-utils.c (decode_search_memory_packet): New fn.
2368 * server.c (handle_search_memory_1): New fn.
2369 (handle_search_memory): New fn.
2370 (handle_query): Process qSearch:memory packets.
2372 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2374 * regcache.c (registers_length): Remove.
2375 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2376 full register packet.
2377 * regcache.h (registers_length): Remove prototype.
2378 * server.h (PBUFSIZ): Define to 16384.
2380 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2382 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2383 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2384 powerpc-64l.o, and powerpc-altivec64l.o.
2385 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2386 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2387 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2388 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2389 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2392 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2393 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2394 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2395 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2396 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2397 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2398 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2399 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2400 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2401 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2404 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2405 (init_registers_powerpc_32l): ... this new prototype.
2406 (init_registers_powerpc_32): Remove, replace by ...
2407 (init_registers_powerpc_altivec32l): ... this new prototype.
2408 (init_registers_powerpc_e500): Remove, replace by ...
2409 (init_registers_powerpc_e500l): ... this new prototype.
2410 (init_registers_ppc64): Remove, replace by ...
2411 (init_registers_powerpc_64l): ... this new prototype.
2412 (init_registers_powerpc_64): Remove, replace by ...
2413 (init_registers_powerpc_altivec64l): ... this new prototype.
2414 (ppc_num_regs): Set to 73.
2415 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2416 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2417 (ppc_cannot_store_register): Handle orig_r3 and trap.
2418 (ppc_arch_setup): Update init_registers_... calls.
2419 (ppc_fill_gregset): Handle orig_r3 and trap.
2421 * inferiors.c (clear_inferiors): Reset current_inferior.
2423 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2425 * acinclude.m4: Add override.m4.
2426 * configure: Regenerate.
2428 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2430 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2431 initial call to init_register_ppc64.
2433 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2435 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2436 powerpc*-*-linux* case.
2437 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2439 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2441 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2442 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2444 * linux-ppc-low.c: Include <elf.h>.
2445 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2446 (ppc_hwcap): New global variable.
2447 (ppc_regmap): Remove __SPE__ #ifdef sections.
2448 (ppc_regmap_e500): New global variable.
2449 (ppc_cannot_store_register): Update __SPE__ special case.
2450 (ppc_get_hwcap): New function.
2451 (ppc_arch_setup): Use it to determine whether inferior supports
2452 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2453 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2454 Do not access registers if target does not support AltiVec.
2455 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2456 Do not access registers if target does not support SPE.
2457 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2459 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2461 * linux-low.c (disabled_regsets, num_regsets): New.
2462 (use_regsets_p): Delete.
2463 (linux_wait_for_process): Clear disabled_regsets.
2464 (regsets_fetch_inferior_registers): Check and set it.
2465 (regsets_store_inferior_registers): Likewise.
2466 (linux_fetch_registers, linux_store_registers): Do not use
2468 (initialize_low): Allocate disabled_regsets.
2470 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2472 * Makefile.in (LIBOBJS): New.
2474 (memmem.o): New rule.
2475 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2476 * configure: Regenerated.
2478 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2480 * server.c (handle_query): Never return "unsupported" for
2481 qXfer:features:read queries.
2483 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2485 * server.c (get_features_xml): Fix inverted condition.
2486 (handle_query): Always support qXfer:feature:read.
2488 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2490 * server.c (wrapper_argv): New.
2491 (start_inferior): Handle wrapper_argv. If set, expect an extra
2493 (gdbserver_usage): Document --wrapper.
2494 (main): Parse --wrapper.
2496 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2498 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2499 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2500 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2501 (ppc_set_pc): Likewise.
2502 (ppc_arch_setup): New function.
2503 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2504 of collect_register.
2505 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2507 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2509 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2510 instead of linux-ppc64-low.o.
2511 * linux-ppc64-low.c: Remove file.
2512 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2513 (linux-ppc64-low.o): Remove rule.
2515 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2516 (init_registers_powerpc_64): Likewise.
2517 (ppc_regmap): Conditionally define depending on __powerpc64__.
2518 (ppc_cannot_store_register): Do not special-case "fpscr" when
2519 compiled on __powerpc64__.
2520 (ppc_collect_ptrace_register): New function.
2521 (ppc_supply_ptrace_register): New function.
2522 (ppc_breakpoint): Change type to "unsigned int".
2523 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2524 (the_low_target): Conditionally provide initializers for the
2525 arch_setup member depending on __powerpc64__. Install
2526 collect_ptrace_register and supply_ptrace_register members.
2528 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2530 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2531 * server.c (gdbserver_xmltarget): Define.
2532 (get_features_xml): Use it to replace "target.xml" and arch_string.
2534 * configure.srv: Remove srv_xmltarget. Add XML files that were
2535 mentioned there to srv_xmlfiles instead. Remove conditional tests
2536 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2537 srv_xmlfiles and srv_regobj to include all possible choices.
2538 * configure.ac (srv_xmltarget): Remove.
2539 (srv_xmlfiles): Do not add "target.xml".
2540 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2541 checks for supplementary target information.
2542 * configure: Regenerate.
2543 * Makefile.in (XML_TARGET): Remove.
2544 (target.xml): Remove rule.
2545 (clean): Do not clean up target.xml.
2546 (.PRECIOUS): Do not mention target.xml.
2548 * target.h (struct target_ops): Remove arch_string member.
2549 * linux-low.c (linux_arch_string): Remove.
2550 (linux_target_ops): Remove arch_string initializer.
2551 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2552 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2553 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2554 * spu-low.c (spu_arch_string): Remove.
2555 (spu_target_ops): Remove arch_string initializer.
2556 * win32-low.c (win32_arch_string): Remove.
2557 (win32_target_ops): Remove arch_string initializer.
2558 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2559 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2560 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2562 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2564 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2565 by collect_ptrace_register and supply_ptrace_register hooks.
2566 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2567 instead of checking for the_low_target.left_pad_xfer.
2568 (usr_store_inferior_registers): Use collect_ptrace_register callback
2569 instead of checking for the_low_target.left_pad_xfer.
2571 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2572 (s390_supply_ptrace_register): Likewise.
2573 (s390_fill_gregset): Call s390_collect_ptrace_register.
2574 (the_low_target): Update.
2576 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2577 (ppc_supply_ptrace_register): Likewise.
2578 (the_low_target): Update.
2580 * linux-i386-low.c (the_low_target): Update.
2581 * linux-x86-64-low.c (the_low_target): Update.
2583 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2585 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2586 reg-s390.o and reg-s390x.o.
2588 * linux-low.c (new_inferior): New global variable.
2589 (linux_create_inferior, linux_attach): Set it.
2590 (linux_wait_for_process): Call the_low_target.arch_setup after the
2591 target has stopped for the first time.
2592 (initialize_low): Do not call the_low_target.arch_setup.
2594 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2595 (s390_set_pc): Likewise.
2596 (s390_arch_setup): New function.
2597 (the_low_target): Use s390_arch_setup as arch_setup routine.
2599 * regcache.c (realloc_register_cache): New function.
2600 (set_register_cache): Call it for each existing regcache.
2602 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2604 * server.h (init_registers): Remove prototype.
2606 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2607 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2608 instead of init_registers ().
2609 * linux-arm-low.c (init_registers_arm): Add prototype.
2610 (init_registers_arm_with_iwmmxt): Likewise.
2611 (the_low_target): Add initializer for arch_setup field.
2612 * linux-cris-low.c (init_registers_cris): Add prototype.
2613 (the_low_target): Add initializer for arch_setup field.
2614 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2615 (the_low_target): Add initializer for arch_setup field.
2616 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2617 (the_low_target): Add initializer for arch_setup field.
2618 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2619 (the_low_target): Add initializer for arch_setup field.
2620 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2621 (the_low_target): Add initializer for arch_setup field.
2622 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2623 (the_low_target): Add initializer for arch_setup field.
2624 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2625 (init_registers_mips64_linux): Likewise.
2626 (the_low_target): Add initializer for arch_setup field.
2627 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2628 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2629 (the_low_target): Add initializer for arch_setup field.
2630 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2631 (init_registers_powerpc_64): Likewise.
2632 (the_low_target): Add initializer for arch_setup field.
2633 * linux-s390-low.c (init_registers_s390): Add prototype.
2634 (init_registers_s390x): Likewise.
2635 (the_low_target): Add initializer for arch_setup field.
2636 * linux-sh-low.c (init_registers_sh): Add prototype.
2637 (the_low_target): Add initializer for arch_setup field.
2638 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2639 (the_low_target): Add initializer for arch_setup field.
2640 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2641 (the_low_target): Add initializer for arch_setup field.
2643 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2644 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2645 instead of init_registers ().
2646 * win32-arm-low.c (init_registers_arm): Add prototype.
2647 (the_low_target): Add initializer for arch_setup field.
2648 * win32-i386-low.c (init_registers_i386): Add prototype.
2649 (the_low_target): Add initializer for arch_setup field.
2651 * spu-low.c (init_registers_spu): Add prototype.
2652 (initialize_low): Call initialie_registers_spu () instead of
2653 initialize_registers ().
2655 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2657 * server.c (handle_v_requests): When handling the vRun and vAttach
2658 packets, if already debugging a process, don't kill it. Return an
2661 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2663 * server.c (handle_query): Correct length check.
2665 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2667 * win32-low.c (do_initial_child_stuff): Add process handle
2668 parameter. Set current_process_handle and current_process_id from the
2669 parameters. Clear globals.
2670 (win32_create_inferior): Don't set current_process_handle and
2671 current_process_id here. Instead pass them on the call to
2672 do_initial_child_stuff.
2673 (win32_attach): Likewise.
2674 (win32_clear_inferiors): New.
2675 (win32_kill): Don't close the current process handle or the
2676 current thread handle here. Instead call win32_clear_inferiors.
2677 (win32_detach): Don't open a new handle to the process. Call
2678 win32_clear_inferiors.
2679 (win32_join): Don't rely on current_process_handle; open a new
2680 handle using the process id.
2681 (win32_wait): Call win32_clear_inferiors when the inferior process
2684 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2686 * server.c (monitor_show_help): Add "exit".
2688 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2690 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2691 (clean): Add reg-xtensa.c.
2692 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2693 * configure.srv (xtensa*-*-linux*) New target.
2694 * linux-xtensa-low.c: New.
2695 * xtensa-xtregs.c: New.
2697 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2699 * hostio.c: Don't include errno.h.
2700 (errno_to_fileio_errno): Move to hostio-errno.
2701 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2702 error number outputting to the target->hostio_last_error callback.
2703 (hostio_packet_error): Use FILEIO_EINVAL directly.
2704 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2705 calls to hostio_error.
2706 * hostio-errno.c: New.
2707 * server.h (hostio_last_error_from_errno): Declare.
2708 * target.h (target_ops): Add hostio_last_error member.
2709 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2710 as hostio_last_error handler.
2711 * spu-low.c (spu_target_ops): Likewise.
2712 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2713 (wince_hostio_last_error): New functions.
2714 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2715 as hostio_last_error handler.
2716 (win32_target_ops) [!_WIN32_WCE]: Register
2717 hostio_last_error_from_errno as hostio_last_error handler.
2718 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2719 (hostio-errno.o): New rule.
2720 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2721 * configure.srv (srv_hostio_err_objs): New variable. Default to
2723 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2724 * configure: Regenerate.
2726 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2728 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2729 (linux_kill, linux_detach): Clean up the process list.
2730 * remote-utils.c (remote_open): Improve port number parsing.
2731 (putpkt_binary, input_interrupt): Only send interrupts if the target
2733 * server.c (extended_protocol): Make static.
2734 (attached): Define earlier.
2735 (exit_requested, response_needed, program_argv): New variables.
2736 (target_running): New.
2737 (start_inferior): Clear attached here.
2738 (attach_inferior): Set attached here.
2739 (require_running): Define.
2740 (handle_query): Use require_running and target_running. Implement
2742 (handle_v_attach, handle_v_run): New.
2743 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2744 (gdbserver_usage): Update.
2745 (main): Redo argument parsing. Handle --debug and --multi. Handle
2746 --attach along with other options or after the port. Save
2747 program_argv. Support no initial program. Resynchronize
2748 communication with GDB after an error. Handle "monitor exit".
2749 Use require_running and target_running. Always allow the extended
2750 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2751 restart in extended mode.
2752 * README: Refer to the GDB manual. Update --attach usage.
2754 2007-12-20 Andreas Schwab <schwab@suse.de>
2756 * linux-low.c (STACK_SIZE): Define.
2757 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2758 (linux_test_for_tracefork): Likewise.
2760 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2762 * linux-low.c (linux_wait_for_event): Update messages. Do not
2763 reinsert auto-delete breakpoints.
2764 * mem-break.c (struct breakpoint): Change return type of handler to
2766 (set_breakpoint_at): Update handler type.
2767 (reinsert_breakpoint_handler): Return 1 instead of calling
2769 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2771 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2772 * mem-break.h (set_breakpoint_at): Update handler type.
2773 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2774 * win32-low.c (auto_delete_breakpoint): New.
2775 (get_child_debug_event): Use it.
2777 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2779 * configure.ac: Check for pread and pwrite.
2780 * hostio.c (handle_pread): Fall back to lseek and read.
2781 (handle_pwrite): Fall back to lseek and write.
2782 * config.in, configure: Regenerated.
2784 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2786 * server.c (myresume): Add own_buf argument.
2787 (main): Update calls.
2789 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2791 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2792 * remote-utils.c (remote_open): Do not call disable_async_io.
2793 (block_async_io): Delete.
2794 (unblock_async_io): Make static.
2795 (initialize_async_io): New.
2796 * server.c (handle_v_cont): Handle async I/O here.
2797 (myresume): Likewise. Move other common resume tasks here...
2798 (main): ... from here. Call initialize_async_io. Disable async
2799 I/O before the main loop.
2800 * server.h (initialize_async_io): Declare.
2801 (block_async_io, unblock_async_io): Delete prototypes.
2802 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2804 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2806 * remote-utils.c (readchar): Allow binary data in received messages.
2808 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2810 * win32-low.c (attaching): New global.
2811 (win32_create_inferior): Clear the `attaching' global.
2812 (win32_attach): Set the `attaching' global.
2813 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2814 attaching. Only set a breakpoint at the entry point if not
2817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2819 * server.c (main): Don't report dll events on the initial
2820 connection on attaches.
2822 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2824 * server.c (main): Relax numerical bases supported for the pid of
2825 the --attach command line argument.
2827 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2829 * win32-low.c (win32_attach): Call OpenProcess before
2830 DebugActiveProcess, not after. Add last error output to error
2833 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2835 * win32-low.c (win32_get_thread_context)
2836 (win32_set_thread_context): New functions.
2837 (thread_rec): Use win32_get_thread_context.
2838 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2839 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2842 2007-12-03 Leo Zayas
2843 Pedro Alves <pedro_alves@portugalmail.pt>
2845 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2847 (child_add_thread): Minor cleanup.
2848 (child_continue): Resume artificially suspended threads before
2849 calling ContinueDebugEvent.
2850 (suspend_one_thread): New.
2851 (fake_breakpoint_event): New.
2852 (get_child_debug_event): Change return type to int. Check here if
2853 gdb sent an interrupt request. If a soft interrupt was requested,
2854 fake a breakpoint event. Return 0 if there is no event to handle,
2856 (win32_wait): Don't check here if gdb sent an interrupt request.
2857 Ensure there is a valid event to handle.
2858 (win32_request_interrupt): Add soft interruption method as last
2861 2007-12-03 Leo Zayas
2862 Pedro Alves <pedro_alves@portugalmail.pt>
2864 * win32-low.h (win32_thread_info): Add descriptions to the
2865 structure members. Replace `suspend_count' counter by a
2867 * win32-low.c (thread_rec): Update condition of when to get the
2868 context from the inferior. Rely on ContextFlags being set if it
2869 has already been retrieved. Only suspend the inferior thread if
2870 we haven't already. Warn if that fails.
2871 (continue_one_thread): s/suspend_count/suspended/. Only call
2872 ResumeThread once. Warn if that fails.
2874 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2876 * win32-low.c (win32_wait): Don't read from the inferior when it
2879 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2881 * Makefile.in (win32_low_h): New variable.
2882 (win32-low.o): Add dependency on $(win32_low_h).
2883 (win32-arm-low.o, win32-i386-low.o): New rules.
2885 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2887 * hostio.c: Correct copyright year.
2889 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2891 * Makefile.in (OBS): Add hostio.o.
2892 (hostio.o): New rule.
2893 * server.h (handle_vFile): Declare.
2894 * hostio.c: New file.
2895 * server.c (handle_v_requests): Take packet_len and new_packet_len
2896 for binary packets. Call handle_vFile.
2897 (main): Update call to handle_v_requests.
2899 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2901 * linux-low.c: Include <sched.h>.
2903 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2905 * linux-low.c (linux_tracefork_grandchild): New.
2906 (linux_tracefork_child): Use clone.
2907 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2909 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2911 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2913 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2915 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2917 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2919 * inferiors.c (change_inferior_id): Delete.
2920 (add_pid_to_list, pull_pid_from_list): New.
2921 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2922 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2923 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2924 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2925 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2926 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2927 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2928 (using_threads): Always set to 1.
2929 (handle_extended_wait): New.
2930 (add_process): Do not set TID.
2931 (linux_create_inferior): Set must_set_ptrace_flags.
2932 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2933 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2934 (linux_thread_alive): Rename TID argument to LWPID.
2935 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2936 (linux_wait_for_event): Do not use TID or check using_threads. Update
2937 call to dead_thread_notify. Call handle_extended_wait.
2938 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2939 (send_sigstop): Delete sigstop_sent.
2940 (wait_for_sigstop): Avoid TID.
2941 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2942 (linux_test_for_tracefork): New.
2943 (linux_lookup_signals): Use thread_db_active and
2944 linux_supports_tracefork_flag.
2945 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2946 * linux-low.h (get_process_thread): Avoid TID.
2947 (struct process_ifo): Move thread_known and tid to the end. Remove
2949 (linux_attach_lwp, thread_db_init): Update prototypes.
2950 * server.h (change_inferior_id): Delete prototype.
2951 (add_pid_to_list, pull_pid_from_list): New prototypes.
2952 * thread-db.c (thread_db_use_events): New.
2953 (find_first_thread): Rename to...
2954 (find_one_thread): ...this. Update callers and messages. Do not
2955 call fatal. Check thread_db_use_events. Do not call
2956 change_inferior_id or new_thread_notify.
2957 (maybe_attach_thread): Update. Do not call new_thread_notify.
2958 (thread_db_init): Set thread_db_use_events. Check use_events.
2959 * utils.c (fatal, warning): Correct message prefix.
2961 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2963 * Makefile.in (clean): Remove new files.
2964 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2965 (powerpc-64.o, powerpc-64.c): New rules.
2966 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2967 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2969 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2971 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2972 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2973 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2974 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2975 (target_regsets): Add AltiVec and SPE register sets.
2976 * configure.ac: Check for AltiVec and SPE.
2977 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2978 (ppc_fill_vrregset, ppc_store_vrregset): New.
2979 (target_regsets): Add AltiVec register set.
2980 * configure: Regenerated.
2982 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2984 * linux-low.c (O_LARGEFILE): Define.
2985 (linux_read_memory): Use /proc/PID/mem.
2986 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2987 * configure, config.in: Regenerated.
2989 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2991 * linux-low.c (linux_wait_for_event): Do not pass signals while
2994 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2996 * win32-low.c (create_process): New.
2997 (win32_create_inferior): Use create_process instead of
2998 CreateProcess. If create_process failed retry appending an ".exe"
2999 suffix. Store the GetLastError result immediatelly after
3000 create_process calls and use it on the call to error.
3002 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
3004 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3006 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3008 * configure.ac: Switch license to GPLv3.
3010 2007-08-01 Michael Snyder <msnyder@access-company.com>
3012 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3014 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3016 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3018 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3019 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3020 CloseToolhelp32Snapshot.
3021 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3022 CloseToolhelp32Snapshot.
3024 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3026 * server.c (main): Check for inferior exit before main loop.
3028 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3030 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3031 instead of on tmp_desc.
3033 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3034 Daniel Jacobowitz <dan@codesourcery.com>
3036 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3037 (add_thread): Minor cleanups.
3038 (clear_inferiors): Move lower in the file. Clear the DLL
3040 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3041 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3042 (xml_escape_text): New.
3043 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3045 (handle_v_cont): Report errors.
3046 (gdbserver_version): Update.
3047 (main): Correct size of own_buf. Do not report initial DLL events.
3048 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3049 (unloaded_dll, xml_escape_text): New.
3050 * win32-low.c (enum target_waitkind): Update comments.
3051 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3052 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3053 (win32_EnumProcessModules, win32_GetModuleInformation)
3054 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3055 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3056 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3057 (win32_Module32First, win32_Module32Next, load_toolhelp)
3058 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3059 (get_child_debug_event): Handle DLL events.
3060 (win32_wait): Likewise.
3062 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3064 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3065 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3067 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3069 * win32-low.c (handle_output_debug_string): Ignore event if not
3072 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3074 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3076 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3078 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3080 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3082 * inferiors.c (change_inferior_id): Add comment.
3083 * linux-low.c (check_removed_breakpoint): Add an early
3084 prototype. Improve debug output.
3085 (linux_attach): Doc update.
3086 (linux_detach_one_process, linux_detach): Clean up before releasing
3088 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3089 * linux-low.h (struct process_info): Doc improvement.
3090 * mem-break.c (delete_all_breakpoints): New.
3091 * mem-break.h (delete_all_breakpoints): New prototype.
3092 * thread-db.c (find_first_thread): New.
3093 (thread_db_create_event): Call it instead of
3094 thread_db_find_new_threads. Clean up unused variables.
3095 (maybe_attach_thread): Remove first thread handling.
3096 (thread_db_find_new_threads): Use find_first_thread.
3097 (thread_db_get_tls_address): Likewise.
3099 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3101 * thread-db.c (thread_db_find_new_threads): Add prototype.
3102 (thread_db_create_event): Check for the main thread before adding
3104 (maybe_attach_thread): Only enable event reporting if TID == 0.
3105 (thread_db_get_tls_address): Check for new threads.
3107 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3109 * linux-low.c (linux_create_inferior): Try execv before execvp.
3110 * spu-low.c (spu_create_inferior): Likewise.
3112 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3114 * linux-low.c (linux_create_inferior): Change execv to execvp.
3115 * spu-low.c (spu_create_inferior): Likewies.
3117 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3119 * Makefile.in (clean): Clean new files instead of deleted ones.
3120 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3121 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3123 * configure.srv: Specify XML files and new regformats for MIPS and
3125 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3126 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3127 an entry for the restart register.
3128 (mips_cannot_fetch_register, mips_cannot_store_register)
3129 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3130 register names to match the XML descriptions.
3131 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3132 restart register instead of $0.
3134 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3135 Markus Deuling <deuling@de.ibm.com>
3137 * remote-utils.c (decode_xfer_write): New function.
3138 * server.h (decode_xfer_write): Add prototype.
3139 * server.c (handle_query): Add PACKET_LEN argument. Support
3140 qXfer:spu:read and qXfer:spu:write packets.
3141 (main): Pass packet_len to handle_query.
3142 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3143 * target.h (target_ops): Add qxfer_spu.
3145 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3147 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3148 accessing non-seekable spufs files.
3150 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3152 * server.c (handle_query): Add reply for qC packet.
3154 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3155 Leo Zayas <lerele@champenstudios@com>
3157 * server.h (check_remote_input_interrupt_request): New function.
3158 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3159 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3160 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3161 (check_remote_input_interrupt_request): New function.
3162 * server.h (check_remote_input_interrupt_request): Declare.
3163 * win32-low.c (winapi_DebugBreakProcess,
3164 winapi_GenerateConsoleCtrlEvent): New typedefs.
3165 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3167 (win32_wait): Check for remote interrupt request
3168 with check_remote_input_interrupt_request.
3169 (win32_request_interrupt): New function.
3170 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3172 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3174 * win32-low.c (debug_registers_changed,
3175 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3176 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3177 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3178 (thread_rec): Get context using the low target.
3179 (child_add_thread): Call thread_added on the low target,
3180 which does the same thing.
3182 (do_initial_child_stuff): Remove debug registers references.
3183 Set context using the low target. Resume threads after
3184 setting the contexts.
3185 (child_continue): Remove dead variable. Remove debug
3186 registers references.
3187 (child_fetch_inferior_registers): Go through the low target.
3188 (do_child_store_inferior_registers): Remove.
3189 (child_store_inferior_registers): Go through the low target.
3190 (win32_resume): Remove debug registers references.
3191 Set context using the low target.
3192 (handle_exception): Change return type to void. Don't record
3193 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3194 first chance exception.
3195 (get_child_debug_event): Change return type to void. Remove
3196 goto loop. Always return after waiting for debug event.
3197 (win32_wait): Convert to switch statement. Handle spurious
3200 * win32-i386-low.c (debug_registers_changed,
3201 debug_registers_used): New.
3202 (initial_stuff): Rename to ...
3203 (i386_initial_stuff): ... this. Clear debug registers
3205 (store_debug_registers): Delete.
3206 (i386_get_thread_context): New.
3207 (load_debug_registers): Delete.
3208 (i386_set_thread_context): New.
3209 (i386_thread_added): New.
3210 (single_step): Rename to ...
3211 (i386_single_step): ... this.
3212 (do_fetch_inferior_registers): Rename to ...
3213 (i386_fetch_inferior_register): ... this.
3214 (i386_store_inferior_register): New.
3215 (the_low_target): Adapt to new interface.
3217 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3218 (arm_get_thread_context): New.
3219 (arm_set_thread_context): New.
3221 (do_fetch_inferior_registers): Rename to ...
3222 (arm_fetch_inferior_register): ... this.
3223 (arm_store_inferior_register): New.
3224 (arm_wince_breakpoint): Reimplement as unsigned long.
3225 (arm_wince_breakpoint_len): Define.
3226 (the_low_target): Adapt to new interface.
3228 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3229 load_debug_registers. Add get_thread_context, set_thread_context,
3230 thread_added and store_inferior_register. Rename
3231 fetch_inferior_registers to fetch_inferior_register.
3232 (regptr): Remove declaration.
3234 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3236 * linux-low.c (linux_detach): Change return type to int. Return 0.
3237 * spu-low.c (spu_detach): Likewise.
3239 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3241 * target.h (target_ops): Change return type of detach to int.
3243 (join_inferior): New.
3244 * server.c (main): Don't skip detach support on mingw32.
3245 If the inferior doesn't support detaching return error.
3246 Call join_inferior instead of using waitpid.
3247 * linux-low.c (linux_join): New.
3248 (linux_target_op): Add linux_join.
3249 * spu-low.c (spu_join): New.
3250 (spu_target_ops): Add spu_join.
3251 * win32-low.c (win32_detach): Adapt to new interface.
3252 Reopen current_process_handle before detaching. Issue a child
3253 resume before detaching.
3255 (win32_target_op): Add win32_join.
3257 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3259 * win32-low.c (win32-attach): Fix return value.
3260 * target.h (target_ops): Describe ATTACH return values.
3262 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3264 * win32-low.c (GETPROCADDRESS): Define.
3265 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3266 (winapi_DebugSetProcessKillOnExit): Likewise.
3267 (win32_create_inferior): Force usage of ansi CreateProcessA.
3268 (win32_attach): Use GETPROCADDRESS.
3269 (win32_detach): Likewise.
3271 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3273 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3275 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3277 * win32-low.c: Commit leftover changes from 2007-03-29.
3279 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3281 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3282 fields short instead of int. Add explicit padding.
3283 (i387_cache_to_fsave): Remove unnecessary casts.
3284 (i387_fsave_to_cache): Doc fix.
3285 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3287 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3289 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3290 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3292 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3294 * configure.srv (arm*-*-mingw32ce*): Move near the other
3297 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3299 * configure.ac: Add errno checking.
3300 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3301 sys/file.h and malloc.h.
3302 (AC_CHECK_DECLS): Add perror.
3303 (srv_mingwce): Handle.
3304 * configure.srv (i[34567]86-*-cygwin*): Add
3305 win32-i386-low.o to srv_tgtobj.
3306 (i[34567]86-*-mingw*): Likewise.
3307 (arm*-*-mingw32ce*): Add case.
3308 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3309 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3310 [__MINGW32CE__] (strerror): New function.
3311 [__MINGW32CE__] (errno): Define to GetLastError.
3312 [__MINGW32CE__] (COUNTOF): New macro.
3313 (remote_open): Remove extra close call.
3314 * mem-break.c (delete_breakpoint_at): New function.
3315 * mem-break.h (delete_breakpoint_at): Declare.
3316 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3317 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3318 [USE_WIN32API] (read, write): Add char* casts.
3319 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3320 * server.h: Include wincecompat.h on Windows CE.
3321 [HAVE_ERRNO_H]: Check.
3322 (perror): Declare if not declared.
3323 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3324 (perror_with_name): Remove errno declaration.
3325 * wincecompat.h: New.
3326 * wincecompat.c: New.
3328 * win32-arm-low.c: New.
3329 * win32-i386-low.c: New.
3330 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3331 (OUTMSG2): Make it safe.
3333 (COUNTOF): New macro.
3334 (NUM_REGS): Get it from the low target.
3335 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3336 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3337 (thread_rec): Let low target handle debug registers.
3338 (child_add_thread): Likewise.
3339 (child_init_thread_list): Likewise.
3340 (continue_one_thread): Likewise.
3342 (do_child_fetch_inferior_registers): Move to ...
3343 * win32-i386-low.c: ... here, and rename to ...
3344 (do_fetch_inferior_registers): ... this.
3345 * win32-low.c (child_fetch_inferior_registers):
3346 Go through the low target.
3347 (do_child_store_inferior_registers): Use regptr.
3348 (strwinerror): New function.
3349 (win32_create_inferior): Handle Windows CE.
3350 Use strwinerror instead of strerror on Windows error
3351 codes. Add program to the error output.
3352 Don't close the main thread handle on Windows CE.
3353 (win32_attach): Use coredll.dll on Windows CE.
3354 (win32_kill): Close current process and current
3356 (win32_detach): Use coredll.dll on Windows CE.
3357 (win32_resume): Let low target handle debug registers, and
3359 (handle_exception): Add/Remove initial breakpoint. Avoid
3360 non-existant WSTOPSIG on Windows CE.
3361 (win32_read_inferior_memory): Cast to remove warning.
3362 (win32_arch_string): Go through the low target.
3363 (initialize_low): Call set_breakpoint_data with the low
3364 target's breakpoint.
3365 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3366 FOP_REGNUM, mappings): Move to ...
3367 * win32-i386-low.c: ... here.
3368 * win32-low.c (win32_thread_info): Move to ...
3369 * win32-low.h: ... here.
3370 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3371 win32-arm-low.c and wincecompat.c.
3372 (all:): Add $EXEEXT.
3373 (install-only:): Likewise.
3374 (gdbserver:): Likewise.
3375 (gdbreplay:): Likewise.
3376 * config.in: Regenerate.
3377 * configure: Regenerate.
3379 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3381 * win32-low.c: Rename typedef thread_info to
3382 win32_thread_info throughout.
3384 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3386 * win32-i386-low.c: Rename to ...
3387 * win32-low.c: ... this.
3388 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3389 * Makefile.in: Likewise.
3391 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3393 * remote-utils.c (monitor_output): Constify msg parameter.
3394 * server.h (monitor_output): Likewise.
3395 * win32-i386-low.c (handle_output_debug_string): New.
3396 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3397 handle_output_debug_string.
3398 (get_child_debug_event): Likewise.
3400 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3402 * server.c (main): Correct strtoul check.
3404 2007-03-27 Jon Ringle <jon@ringle.org>
3406 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3408 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3410 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3412 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3414 * terminal.h: Check HAVE_SGTTY_H.
3416 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3418 * remote-utils.c (remote_open): Print out the assigned port number.
3420 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3422 * remote-utils.c (monitor_output): New function.
3423 * server.c (debug_threads): Define here.
3424 (monitor_show_help): New function.
3425 (handle_query): Handle qRcmd.
3426 (main): Do not handle 'd' packet.
3427 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3428 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3431 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3433 * Makefile.in (EXEEXT): New.
3434 (clean): Use $(EXEEXT).
3436 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3438 * target.h (target_ops): Rename send_signal to request_interrupt,
3439 and remove enum target_signal parameter.
3440 * linux-low.c (linux_request_interrupt): Rename from
3441 linux_send_signal, and always send SIGINT.
3442 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3443 and always send SIGINT.
3444 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3446 (input_interrupt): Likewise.
3448 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3450 * server.c (get_features_xml): Check if target implemented
3452 * win32-i386-low.c (win32_arch_string): New.
3453 (win32_target_ops): Add win32_arch_string as arch_string member.
3455 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3457 * spu-low.c (spu_arch_string): New.
3458 (spu_target_ops): Add spu_arch_string.
3460 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3462 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3463 * configure.ac: Do not check for terminal.h.
3464 * configure, config.in: Regenerated.
3466 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3468 * Makefile.in (OBS): Add $(XML_BUILTIN).
3469 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3471 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3472 (arm-with-iwmmxt.c): New.
3473 * config.in, configure: Regenerate.
3474 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3475 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3476 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3477 (arm*-*-linux*): Add iWMMXt and regset support.
3478 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3479 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3480 (arm_store_wmmxregset, target_regsets): New.
3481 * server.c (get_features_xml): Take annex argument. Check builtin
3483 (handle_query): Handle multiple annexes.
3485 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3487 * remote-utils.c [USE_WIN32API] (read, write): Define.
3488 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3491 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3493 * linux-i386-low.c (the_low_target): Set arch_string.
3494 * linux-x86-64-low.c (the_low_target): Likewise.
3495 * linux-low.c (linux_arch_string): New.
3496 (linux_target_ops): Add it.
3497 * linux-low.h (struct linux_target_ops): Add arch_string.
3498 * server.c (write_qxfer_response): Use const void * for DATA.
3499 (get_features_xml): New.
3500 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3501 * target.h (struct target_ops): Add arch_string method.
3503 2007-01-03 Denis Pilat <denis.pilat@st.com>
3504 Daniel Jacobowitz <dan@codesourcery.com>
3506 * linux-low.c (linux_kill): Handle being called with no threads.
3507 * win32-i386-low.c (win32_kill): Likewise.
3508 (get_child_debug_event): Clear current_process_handle.
3510 2006-12-30 Denis PILAT <denis.pilat@st.com>
3511 Daniel Jacobowitz <dan@codesourcery.com>
3513 * remote-utils.c (remote_open): Check the type of specified
3514 serial port devices before opening them.
3515 * server.c (main): Kill the inferior if an error occurs during
3516 the first remote_open.
3518 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3520 * README: Update supported targets.
3522 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3524 * Makefile.in (clean): Remove reg-mips64.c.
3525 (reg-mips64.c, reg-mips64.o): New rules.
3526 * configure.srv: Handle mips64. Include regset support for mips.
3527 * linux-mips-low.c (union mips_register): New.
3528 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3529 (mips_breakpoint, mips_breakpoint_at): Use int.
3530 (mips_collect_register, mips_supply_register)
3531 (mips_collect_register_32bit, mips_supply_register_32bit)
3532 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3533 (mips_store_fpregset, target_regsets): New.
3534 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3536 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3538 * configure.srv: Add target "spu*-*-*".
3539 * Makefile.in (clean): Remove reg-spu.c.
3540 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3541 * spu-low.c: New file.
3543 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3545 * configure.ac: Correct td_thr_tls_get_addr test.
3546 * configure: Regenerated.
3548 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3550 * linux-low.c (linux_wait_for_event): Reformat. Use the
3552 * remote-utils.c (decode_address_to_semicolon): New.
3553 * server.c (pass_signals, handle_general_set): New.
3554 (handle_query): Mention QPassSignals for qSupported.
3555 (main): Call handle_general_set.
3556 * server.h (pass_signals, decode_address_to_semicolon): New.
3558 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3560 * server.c (handle_query): Correct error handling for read_auxv.
3562 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3564 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3565 and srv_linux_thread_db to yes.
3566 * linux-s390-low.c (s390_fill_gregset): New function.
3567 (target_regsets): Define data structure.
3569 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3571 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3572 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3573 * config.in, configure: Regenerated.
3574 * inferiors.c (gdb_id_to_thread): New function.
3575 (gdb_id_to_thread_id): Use it.
3576 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3577 * linux-low.h (struct process_info): Add th member.
3578 (thread_db_get_tls_address): New prototype.
3579 * remote-utils.c (decode_address): Make non-static.
3580 * server.c (handle_query): Handle qGetTLSAddr.
3581 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3582 * target.h (struct target_ops): Add get_tls_address.
3583 * thread-db.c (maybe_attach_thread): Save the thread handle.
3584 (thread_db_get_tls_address): New.
3586 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3588 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3589 (linux_resume_one_process): Take a siginfo_t *. Update all
3590 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3591 (struct pending_signals): Add a siginfo_t.
3592 (linux_wait_for_process): Always set last_status.
3593 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3594 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3595 * linux-low.h (struct process_info): Add last_status.
3597 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3599 * remote-utils.c (try_rle): New function.
3600 (putpkt_binary): Use it.
3602 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3604 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3605 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3606 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3607 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3608 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3611 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3613 * server.c (terminal_fd): New variable.
3614 (old_foreground_pgrp): Likewise.
3615 (restore_old_foreground_pgrp): New function.
3616 (start_inferior): Record the terminal file descriptor in terminal_fd
3617 and its original foreground group in old_foreground_pgrp. Register
3618 restore_old_foreground_pgrp with atexit().
3620 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3622 * server.c (handle_query): Correct qPart to qXfer.
3624 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3626 * configure.ac: Check for more headers which are missing on
3627 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3628 * configure.srv: Add Cygwin and mingw32.
3629 * remote-utils.c: Don't include headers unconditionally which
3630 are missing on mingw32. Include <winsock.h> for mingw32.
3631 (remote_open): Adjust for mingw32 support. Flush
3632 standard error after writing to it.
3633 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3634 (unblock_async_io, enable_async_io, disable_async_io)
3635 (readchar, getpkt): Update for Winsock support.
3636 (prepare_resume_reply): Expect a protocol signal number.
3637 * server.c: Disable <sys/wait.h> on mingw32.
3638 (start_inferior): Adjust for mingw32 support. Flush
3639 standard error after writing to it.
3640 (attach_inferior): Likewise. Use protocol signal
3642 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3644 * win32-i386-low.c: New file.
3645 * Makefile.in (XM_CLIBS): Set.
3646 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3647 (win32-i386-low.o): New dependency rule.
3648 * linux-low.c (linux_wait): Use target signal numbers.
3649 * target.h (struct target_ops): Doc fix.
3650 * server.h (target_signal_to_name): New prototype.
3651 * gdbreplay.c: Don't include headers unconditionally which
3652 are missing on mingw32. Include <winsock.h> for mingw32.
3653 (remote_close, remote_open): Adjust for Winsock support.
3654 * configure, config.in: Regenerated.
3656 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3658 * server.c (decode_xfer_read, write_qxfer_response): New.
3659 (handle_query): Take a packet length argument. Handle
3660 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3661 the qSupported response.
3662 (main): Update call to handle_query.
3664 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3666 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3667 (putpkt_binary): Renamed from putpkt and adjusted for binary
3669 (putpkt): New wrapper for putpkt_binary.
3670 (readchar): Don't mask off the high bit.
3671 (decode_X_packet): New function.
3672 * server.c (main): Call putpkt_binary if a handler sets the packet
3673 length. Save the length of the incoming packet. Handle 'X'.
3674 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3676 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3678 * server.c (handle_query): Handle qSupported.
3680 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3682 * remote-utils.c (all_symbols_looked_up): New variable.
3683 (look_up_one_symbol): Check it.
3684 * server.h (look_up_one_symbol): New declaration.
3685 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3687 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3689 * Makefile.in (linux-arm-low.o): Update dependencies.
3690 * linux-arm-low.c: Include "gdb_proc_service.h".
3691 (PTRACE_GET_THREAD_AREA): Define.
3692 (ps_get_thread_area): New function.
3694 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3696 * configure.srv (m68k*-*-uclinux*): New target.
3697 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3698 (linux_resume_one_process): Remove extraneous cast.
3699 (linux_read_offsets): New.
3700 (linux_target_op): Add linux_read_offsets on mmuless systems.
3701 * server.c (handle_query): Add qOffsets logic.
3702 * target.h (struct target_ops): Add read_offsets.
3704 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3706 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3707 (PTRACE_GET_THREAD_AREA): Define.
3708 (ps_get_thread_area): New function.
3709 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3710 (linux-x86-64-low.o): Update.
3712 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3714 * configure.ac: Remove checks for prfpregset_t.
3715 * gdb_proc_service.h: New file.
3716 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3717 new "gdb_proc_service.h".
3718 * proc-service.c: Likewise.
3719 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3720 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3721 * Makefile.in (gdb_proc_service_h): Updated.
3722 * configure, config.in: Regenerated.
3724 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3726 * remote-utils.c (prepare_resume_reply): Move declaration
3727 of gdb_id_from_wait to the top of the block.
3729 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3731 * linux-low.c (regsets_store_inferior_registers): Read the regset
3732 from the target before filling it.
3734 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3736 * server.c (attach_inferior): Return SIGTRAP for a successful
3739 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3741 * Makefile.in (OBS): Add version.o.
3742 (STAGESTUFF): Delete.
3743 (version.o): Add dependencies.
3744 (version.c): Replace rule.
3745 (clean): Remove version.c.
3746 * server.c (gdbserver_version): New.
3747 (gdbserver_usage): Use printf.
3748 (main): Handle --version and --help.
3749 * server.h (version, host_name): Add declarations.
3751 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3763 * linux-x86-64-low.c:
3766 * linux-ppc64-low.c:
3775 * linux-crisv32-low.c:
3787 * gdbserver.1: Add (C) after Copyright. Update the FSF
3790 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3792 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3793 (arm_breakpoint_at): Recognize both breakpoints.
3794 (the_low_target): Use the correct breakpoint instruction.
3796 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3798 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3799 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3800 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3801 (the_low_target): Update.
3803 2005-10-25 Andreas Schwab <schwab@suse.de>
3805 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3807 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3808 (ia64_num_regs): Reduce to 462.
3810 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3812 * acinclude.m4: Correct quoting.
3813 * aclocal.m4: Regenerated.
3815 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3816 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3817 (thread_db_init): Call thread_db_err_str.
3818 * configure.ac: Check for TD_VERSION.
3819 * config.in, configure: Regenerated.
3821 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3823 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3825 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3827 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3828 is not available. Define HAVE_PTRACE_GETREGS if it is.
3829 * config.in, configure: Regenerated.
3830 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3831 * linux-i386-low.c, linux-m68k-low.c: Update to use
3832 HAVE_PTRACE_GETREGS.
3833 * linux-low.c (regsets_fetch_inferior_registers)
3834 (regsets_store_inferior_registers): Only return 0 if we processed
3836 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3837 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3839 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3841 * inferiors.c (struct thread_info): Add gdb_id.
3842 (add_thread): Add gdb_id argument.
3843 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3844 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3845 calls to add_thread.
3846 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3847 * server.c (handle_query): Use thread_to_gdb_id.
3848 (handle_v_cont, main): Use gdb_id_to_thread_id.
3849 * server.h (add_thread): Update prototype.
3850 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3853 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3855 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3856 left-padded registers.
3857 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3858 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3860 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3862 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3863 * configure: Regenerate.
3864 * config.in: Regenerate.
3865 * server.h (NEED_DECLARATION_STRERROR):
3866 Replace with !HAVE_DECL_STRERROR.
3868 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3870 * linux-low.c (linux_wait, linux_send_signal): Don't test
3871 an unsigned long variable for > 0 if it could be MAX_ULONG.
3872 * server.c (myresume): Likewise.
3873 * target.c (set_desired_inferior): Likewise.
3875 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3877 * configure.ac: Simplify and improve check for socklen_t.
3878 * configure, config.in: Regenerate.
3880 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3882 * acconfig.h: Remove.
3883 * configure.ac: Add a test for socklen_t. Use three-argument
3884 AC_DEFINE throughout.
3885 * config.in: Regenerated using autoheader 2.59.
3886 * configure: Regenerated.
3888 * gdbreplay.c (socklen_t): Provide a default.
3889 (remote_open): Use socklen_t.
3890 * remote-utils.c (socklen_t): Provide a default.
3891 (remote_open): Use socklen_t.
3892 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3895 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3897 * linux-low.c (linux_read_memory, linux_write_memory)
3898 (linux_read_auxv): Likewise.
3899 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3900 (check_mem_write): Likewise.
3901 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3903 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3904 (registers_from_string, register_data): Likewise.
3905 * server.c (handle_query, main): Likewise.
3906 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3907 (decode_M_packet): Likewise.
3908 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3909 * target.h (struct target_ops): Update read_memory, write_memory,
3911 (read_inferior_memory, write_inferior_memory): Update.
3912 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3914 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3915 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3916 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3917 linux-s390-low.c, linux-sh-low.c: Update for changes in
3918 read_inferior_memory and the_low_target->breakpoint.
3920 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3922 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3923 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3924 * configure.srv: Add powerpc64-*-linux*.
3925 * linux-ppc64-low.c: New file.
3927 2005-05-23 Orjan Friberg <orjanf@axis.com>
3929 * linux-cris-low.c: New file with support for CRIS.
3930 * linux-crisv32-low.c: Ditto for CRISv32.
3931 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3932 (clean): Add reg-cris.c and reg-crisv32.c.
3933 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3934 reg-crisv32.o, and reg-crisv32.c to make rules.
3935 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3938 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3940 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3941 of sizeof (PTRACE_XFER_TYPE).
3942 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3944 2005-05-12 Orjan Friberg <orjanf@axis.com>
3946 * target.h (struct target_ops): Add insert_watchpoint,
3947 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3948 pointers for hardware watchpoint support.
3949 * linux-low.h (struct linux_target_ops): Ditto.
3950 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3951 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3952 to linux_target_ops.
3953 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3955 * server.c (main): Recognize 'Z' and 'z' packets.
3957 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3959 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3960 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3961 (the_low_target): Add new members.
3963 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3965 * proc-service.c (ps_lgetregs): Search all_processes instead of
3968 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3970 * server.c (start_inferior): Change return type to int.
3971 (attach_inferior): Change sigptr to int *.
3972 (handle_v_cont, handle_v_requests): Change signal to int *.
3973 (main): Change signal to int.
3975 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3977 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3978 * configure.srv: Add m32r*-*-linux*.
3979 * linux-m32r-low.c: New file.
3981 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3983 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3985 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3987 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3988 Take unsigned long arguments for PIDs.
3989 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3990 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3991 (wait_for_sigstop, linux_resume_one_process)
3992 (regsets_fetch_inferior_registers, linux_send_signal)
3993 (linux_read_auxv): Likewise. Update the types of variables holding
3994 PIDs. Update format string specifiers.
3995 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3996 * remote-utils.c (prepare_resume_reply): Likewise.
3997 * server.c (cont_thread, general_thread, step_thread)
3998 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
4000 (handle_query): Update format specifiers.
4001 (handle_v_cont, main): Use strtoul for thread IDs.
4002 * server.h (struct inferior_list_entry): Use unsigned long for ID.
4003 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
4004 (general_thread, step_thread, thread_from_wait)
4005 (old_thread_from_wait): Update.
4006 * target.h (struct thread_resume): Use unsigned long for THREAD.
4007 (struct target_ops): Use unsigned long for arguments to attach and
4010 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4012 * acinclude.m4: Include bfd/bfd.m4 directly.
4013 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4014 <agriffis@toolchain.org>.
4015 * aclocal.m4, configure: Regenerated.
4017 2005-01-07 Andrew Cagney <cagney@gnu.org>
4019 * configure.ac: Rename configure.in, require autoconf 2.59.
4020 * configure: Re-generate.
4022 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4024 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4026 * aclocal.m4: Regenerated.
4027 * configure: Regenerated.
4029 2004-11-21 Andreas Schwab <schwab@suse.de>
4031 * linux-m68k-low.c (m68k_num_gregs): Define.
4032 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4033 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4034 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4035 (m68k_breakpoint_at): New. Add to the_low_target.
4037 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4038 srv_linux_thread_db to yes.
4040 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4042 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4043 (ARCH_SET_FS): Likewise.
4044 (ARCH_GET_FS): Likewise.
4045 (ARCH_GET_GS): Likewise.
4047 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4049 * linux-i386-low.c (ps_get_thread_area): New.
4050 * linux-x86-64-low.c (ps_get_thread_area): New.
4051 * linux-low.c: Include <sys/syscall.h>.
4052 (linux_kill_one_process): Don't kill the first thread here.
4053 (linux_kill): Kill the first thread here.
4054 (kill_lwp): New function.
4055 (send_sigstop, linux_send_signal): Use it.
4056 * proc-service.c: Clean up #ifdefs.
4057 (fpregset_info): Delete.
4058 (ps_lgetregs): Update and enable implementation.
4059 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4061 * remote-utils.c (struct sym_cache, symbol_cache): New.
4062 (input_interrupt): Print a clearer message.
4063 (async_io_enabled): New variable.
4064 (enable_async_io, disable_async_io): Use it. Update comments.
4065 (look_up_one_symbol): Use the symbol cache.
4066 * thread-db.c (thread_db_look_up_symbols): New function.
4067 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4069 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4071 * configure.in: Test for -rdynamic.
4072 * configure: Regenerated.
4073 * Makefile (INTERNAL_LDFLAGS): New.
4074 (gdbserver, gdbreplay): Use it.
4076 2004-09-02 Andrew Cagney <cagney@gnu.org>
4078 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4080 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4082 * linux-low.c (linux_wait): Clear all_processes list also.
4084 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4086 * linux-low.c: Include <errno.h>. Remove extern declaration of
4089 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4091 * gdbreplay.c, server.h, utils.c: Update copyright years.
4093 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4095 * server.c (main): Print child status or termination signal from
4096 variable 'signal', not 'sig'.
4098 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4100 * linux-low.c (linux_read_memory): Change return type to
4101 int. Check for and return error from ptrace().
4102 * target.c (read_inferior_memory): Change return type to int. Pass
4103 back return status from the_target->read_memory().
4104 * target.h (struct target_ops): Adapt *read_memory() prototype.
4106 (read_inferior_memory): Adapt prototype.
4107 * server.c (main): Return an error packet if
4108 read_inferior_memory() returns an error.
4110 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4112 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4113 Unify with other clean targets.
4115 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4117 * server.c (handle_v_cont): Call set_desired_inferior.
4119 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4121 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4123 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4125 * linux-low.c (linux_wait): Unblock async I/O.
4126 (linux_resume): Block and enable async I/O.
4127 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4128 * server.h (block_async_io, unblock_async_io): Add prototypes.
4130 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4132 * remote-utils.c (remote_open): Print a status notice after
4134 * server.c (attach_inferior): Print a status notice after
4137 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4139 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4141 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4143 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4145 * server.c, target.h: Update copyright years.
4147 2004-02-25 Roland McGrath <roland@redhat.com>
4149 * target.h (struct target_ops): New member `read_auxv'.
4150 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4151 * linux-low.c (linux_read_auxv): New function.
4152 (linux_target_ops): Initialize `read_auxv' member to that.
4154 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4156 Committed by Jim Blandy <jimb@redhat.com>.
4158 * linux-s390-low.c (s390_num_regs): Update.
4159 (s390_regmap): Remove control registers. Use __s390x__ predefine
4160 instead of GPR_SIZE to distiguish s390 and s390x targets.
4162 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4164 * linux-low.c: Update copyright year.
4165 (check_removed_breakpoint): Clear pending_is_breakpoint.
4166 (linux_set_resume_request, linux_queue_one_thread)
4167 (resume_status_pending_p): New functions.
4168 (linux_continue_one_thread): Use process->resume.
4169 (linux_resume): Only resume threads if there are no pending events.
4170 * linux-low.h (struct process_info): Add resume request
4173 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4175 * regcache.c (new_register_cache): Clear the allocated register
4176 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4178 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4180 * linux-low.c (linux_resume): Take a struct thread_resume *
4182 (linux_wait): Update call.
4183 (resume_ptr): New static variable.
4184 (linux_continue_one_thread): Renamed from
4185 linux_continue_one_process. Use resume_ptr.
4186 (linux_resume): Use linux_continue_one_thread.
4187 * server.c (handle_v_cont, handle_v_requests): New functions.
4188 (myresume): New function.
4189 (main): Handle 'v' case.
4190 * target.h (struct thread_resume): New type.
4191 (struct target_ops): Change argument of "resume" to struct
4193 (myresume): Delete macro.
4195 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4197 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4198 (uninstall): Support DESTDIR.
4200 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4202 * configure.srv: Add xscale*linux copy of arm*linux entry.
4204 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4206 * linux-arm-low.c (arm_reinsert_addr): New function.
4207 (the_low_target): Add arm_reinsert_addr.
4209 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4211 * mem-break.c: Remove whitespace at end of file.
4213 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4215 * configure.in: Check whether we need to prototype strerror.
4216 * server.h: Optionally prototype strerror.
4217 * gdbreplay.c (perror_with_name): Use strerror.
4218 * linux-low.c (linux_attach_lwp): Use strerror.
4219 * utils.c (perror_with_name): Use strerror.
4220 * config.in, configure: Regenerated.
4222 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4224 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4225 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4227 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4229 * Makefile.in (SFILES): Update.
4230 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4231 low-sun3.c: Remove files.
4233 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4235 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4236 (linux_detach_one_process, linux_detach): New functions.
4237 (linux_target_ops): Add linux_detach.
4238 * server.c (main): Handle 'D' packet.
4239 * target.h (struct target_ops): Add "detach" member.
4240 (detach_inferior): Define.
4242 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4244 From Kelley Cook <kelleycook@wideopenwest.com>:
4245 * configure.srv: Accept i[34567]86 variants.
4247 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4249 * linux-low.c (linux_wait_for_event): Correct comment typos.
4250 (linux_resume_one_process): Call check_removed_breakpoint.
4251 (linux_send_signal): New function.
4252 (linux_target_ops): Add linux_send_signal.
4253 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4255 * target.h (struct target_ops): Add send_signal.
4257 2003-05-29 Jim Blandy <jimb@redhat.com>
4259 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4260 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4261 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4262 away part of the register's value.
4264 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4266 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4267 (linux_wait_for_event, linux_init_signals): Likewise.
4269 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4271 * configure.in: Check for stdlib.h.
4272 * configure: Regenerated.
4273 * config.in: Regenerated.
4275 2003-01-04 Andreas Schwab <schwab@suse.de>
4277 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4279 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4281 * Makefile.in: Remove obsolete code.
4283 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4285 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4286 defined(PT_FPR0_HI).
4288 2002-11-17 Stuart Hughes <seh@zee2.com>
4290 * linux-arm-low.c (arm_num_regs): Increase.
4291 (arm_regmap): Include status register.
4293 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4295 * linux-low.c (register_addr): Remove incorrect -1 check.
4297 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4299 * linux-low.c (linux_create_inferior): Call setpgid. Return
4301 (unstopped_p, linux_signal_pid): Remove.
4302 (linux_target_ops): Remove linux_signal_pid.
4303 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4304 global instead of target method.
4305 * target.h (struct target_ops): Remove signal_pid. Update comment
4306 for create_inferior.
4307 * server.c (signal_pid): New variable.
4308 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4309 gdbserver. Set the child to be the foreground process group.
4310 (attach_inferior): Set signal_pid.
4312 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4314 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4316 2002-08-20 Jim Blandy <jimb@redhat.com>
4318 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4321 2002-08-01 Andrew Cagney <cagney@redhat.com>
4323 * Makefile.in: Make chill references obsolete.
4325 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4327 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4328 * configure: Regenerate.
4329 * config.in: Regenerate.
4331 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4333 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4334 (perror_with_name, remote_close, remote_open, expect, play): Static.
4336 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4338 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4339 byte offsets instead of an array of indexes.
4340 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4342 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4344 * regcache.c: Add comment.
4346 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4348 * thread-db.c: New file.
4349 * proc-service.c: New file.
4350 * acinclude.m4: New file.
4351 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4352 proc-service.o, and thread-db.o.
4353 (linux-low.o): Add USE_THREAD_DB.
4354 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4355 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4356 * aclocal.m4: Regenerated.
4357 * config.in: Regenerated.
4358 * configure: Regenerated.
4359 * configure.in: Check for proc_service.h, sys/procfs.h,
4360 thread_db.h, and linux/elf.h headrs.
4361 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4362 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4363 Check for -lthread_db and thread support.
4364 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4365 PowerPC, and SuperH.
4366 * i387-fp.c: Constify arguments.
4367 * i387-fp.h: Likewise.
4368 * inferiors.c: (struct thread_info): Renamed from
4369 `struct inferior_info'. Remove PID member. Use generic inferior
4370 list header. All uses updated.
4371 (inferiors, signal_pid): Removed.
4372 (all_threads): New variable.
4373 (get_thread): Define.
4374 (add_inferior_to_list): New function.
4375 (for_each_inferior): New function.
4376 (change_inferior_id): New function.
4377 (add_inferior): Removed.
4378 (remove_inferior): New function.
4379 (add_thread): New function.
4380 (free_one_thread): New function.
4381 (remove_thread): New function.
4382 (clear_inferiors): Use for_each_inferior and free_one_thread.
4383 (find_inferior): New function.
4384 (find_inferior_id): New function.
4385 (inferior_target_data): Update argument type.
4386 (set_inferior_target_data): Likewise.
4387 (inferior_regcache_data): Likewise.
4388 (set_inferior_regcache_data): Likewise.
4389 * linux-low.c (linux_bp_reinsert): Remove.
4390 (all_processes, stopping_threads, using_thrads)
4391 (struct pending_signals, debug_threads, pid_of): New.
4392 (inferior_pid): Replace with macro.
4393 (struct inferior_linux_data): Remove.
4394 (get_stop_pc, add_process): New functions.
4395 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4396 Use add_process and add_thread.
4397 (linux_attach_lwp): New function, based on old linux_attach. Use
4398 add_process and add_thread. Set stop_expected for new threads.
4399 (linux_attach): New function.
4400 (linux_kill_one_process): New function.
4401 (linux_kill): Kill all LWPs.
4402 (linux_thread_alive): Use find_inferior_id.
4403 (check_removed_breakpoints, status_pending_p): New functions.
4404 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4405 Update. Use WNOHANG. Wait for cloned processes also. Update process
4406 struct for the found process.
4407 (linux_wait_for_event): New function.
4408 (linux_wait): Use it. Support LWPs.
4409 (send_sigstop, wait_for_sigstop, stop_all_processes)
4410 (linux_resume_one_process, linux_continue_one_process): New functions.
4411 (linux_resume): Support LWPs.
4412 (REGISTER_RAW_SIZE): Remove.
4413 (fetch_register): Use register_size instead. Call supply_register.
4414 (usr_store_inferior_registers): Likewise. Call collect_register.
4416 (regsets_fetch_inferior_registers): Improve error message.
4417 (regsets_store_inferior_registers): Add debugging.
4418 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4419 (unstopped_p, linux_signal_pid): New functions.
4420 (linux_target_ops): Add linux_signal_pid.
4421 (linux_init_signals): New function.
4422 (initialize_low): Call it. Initialize using_threads.
4423 * regcache.c (inferior_regcache_data): Add valid
4425 (get_regcache): Fetch registers lazily. Add fetch argument
4426 and update all callers.
4427 (regcache_invalidate_one, regcache_invalidate): New
4429 (new_register_cache): Renamed from create_register_cache.
4430 Return the new regcache.
4431 (free_register_cache): Change argument to a void *.
4432 (registers_to_string, registers_from_string): Call get_regcache
4433 with fetch flag set.
4434 (register_data): Make static. Pass fetch flag to get_regcache.
4435 (supply_register): Call get_regcache with fetch flag clear.
4436 (collect_register): Call get_regcache with fetch flag set.
4437 (collect_register_as_string): New function.
4438 * regcache.h: Update.
4439 * remote-utils.c (putpkt): Flush after debug output and use
4441 Handle input interrupts while waiting for an ACK.
4442 (input_interrupt): Use signal_pid method.
4443 (getpkt): Flush after debug output and use stderr.
4444 (outreg): Use collect_register_as_string.
4445 (new_thread_notify, dead_thread_notify): New functions.
4446 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4448 (look_up_one_symbol): Flush after debug output.
4449 * server.c (step_thread, server_waiting): New variables.
4450 (start_inferior): Don't use signal_pid. Update call to mywait.
4451 (attach_inferior): Update call to mywait.
4452 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4453 (main): Don't fetch/store registers explicitly. Use
4454 set_desired_inferior. Support proposed ``Hs'' packet. Update
4457 (struct inferior_list, struct_inferior_list_entry): New.
4458 * target.c (set_desired_inferior): New.
4459 (write_inferior_memory): Constify.
4460 (mywait): New function.
4462 (struct target_ops): New signal_pid method.
4463 (mywait): Removed macro, added prototype.
4465 * linux-low.h (regset_func): Removed.
4466 (regset_fill_func, regset_store_func): New.
4467 (enum regset_type): New.
4468 (struct regset_info): Add type field. Use new operation types.
4469 (struct linux_target_ops): stop_pc renamed to get_pc.
4470 Add decr_pc_after_break and breakpoint_at.
4471 (get_process, get_thread_proess, get_process_thread)
4472 (strut process_info, all_processes, linux_attach_lwp)
4473 (thread_db_init): New.
4475 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4476 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4477 (the_low_target): Add new members.
4478 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4479 (i386_store_fpxregset): Constify.
4480 (target_regsets): Add new kind identifier.
4481 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4482 (i386_set_pc): Add debugging.
4483 (i386_breakpoint_at): New function.
4484 (the_low_target): Add new members.
4485 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4486 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4487 (mips_breakpoint_at): New.
4488 (the_low_target): Add new members.
4489 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4490 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4491 (the_low_target): Add new members.
4492 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4493 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4494 (the_low_target): Add new members.
4495 * linux-x86-64-low.c (target_regsets): Add new kind
4498 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4500 From Martin Pool <mbp@samba.org>:
4501 * server.c (gdbserver_usage): New function.
4504 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4506 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4509 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4511 * Makefile.in: Remove obsolete code.
4513 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4515 * linux-low.c (regsets_fetch_inferior_registers),
4516 (regsets_store_inferior_registers): Removed cast to int from
4518 * regcache.h: Added declaration of struct inferior_info.
4520 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4522 * inferiors.c (struct inferior_info): Add regcache_data.
4523 (add_inferior): Call create_register_cache.
4524 (clear_inferiors): Call free_register_cache.
4525 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4526 * regcache.c (struct inferior_regcache_data): New.
4527 (registers): Remove.
4528 (get_regcache): New function.
4529 (create_register_cache, free_register_cache): New functions.
4530 (set_register_cache): Don't initialize the register cache here.
4531 (registers_to_string, registers_from_string, register_data): Call
4533 * regcache.h: Add prototypes.
4534 * server.h: Likewise.
4536 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4538 * mem-break.c: New file.
4539 * mem-break.h: New file.
4540 * Makefile.in: Add mem-break.o rule; update server.h
4542 * inferiors.c (struct inferior_info): Add target_data
4544 (clear_inferiors): Free target_data member if set.
4545 (inferior_target_data, set_inferior_target_data): New functions.
4546 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4547 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4548 * linux-low.c (linux_bp_reinsert): New variable.
4549 (struct inferior_linux_data): New.
4550 (linux_create_inferior): Use set_inferior_target_data.
4551 (linux_attach): Likewise. Call add_inferior.
4552 (linux_wait_for_one_inferior): New function.
4553 (linux_wait): Call it.
4554 (linux_write_memory): Add const.
4555 (initialize_low): Call set_breakpoint_data.
4556 * linux-low.h (struct linux_target_ops): Add breakpoint
4558 * server.c (attach_inferior): Remove extra add_inferior
4560 * server.h: Include mem-break.h. Update inferior.c
4562 * target.c (read_inferior_memory)
4563 (write_inferior_memory): New functions.
4564 * target.h (read_inferior_memory)
4565 (write_inferior_memory): Change macros to prototypes.
4566 (struct target_ops): Update comments. Add const to write_memory
4569 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4571 * linux-low.c (usr_store_inferior_registers): Support
4572 registers which are allowed to fail to store.
4573 * linux-low.h (linux_target_ops): Likewise.
4574 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4575 (ppc_cannot_store_register): FPSCR may not be storable.
4577 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4579 * server.h: Include <string.h> if HAVE_STRING_H.
4580 * ChangeLog: Correct paths in last ChangeLog entry.
4582 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4584 * linux-low.h: Remove obsolete prototypes.
4585 (struct linux_target_ops): New.
4586 (extern the_low_target): New.
4587 * linux-low.c (num_regs, regmap): Remove declarations.
4588 (register_addr): Use the_low_target explicitly.
4589 (fetch_register): Likewise.
4590 (usr_fetch_inferior_registers): Likewise.
4591 (usr_store_inferior_registers): Likewise.
4592 * linux-arm-low.c (num_regs): Remove.
4593 (arm_num_regs): Define.
4594 (arm_regmap): Renamed from regmap, made static.
4595 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4597 (arm_cannot_store_register): Renamed from cannot_store_register,
4599 (the_low_target): New.
4600 * linux-i386-low.c (num_regs): Remove.
4601 (i386_num_regs): Define.
4602 (i386_regmap): Renamed from regmap, made static.
4603 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4605 (i386_cannot_store_register): Renamed from cannot_store_register,
4607 (the_low_target): New.
4608 * linux-ia64-low.c (num_regs): Remove.
4609 (ia64_num_regs): Define.
4610 (ia64_regmap): Renamed from regmap, made static.
4611 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4613 (ia64_cannot_store_register): Renamed from cannot_store_register,
4615 (the_low_target): New.
4616 * linux-m68k-low.c (num_regs): Remove.
4617 (m68k_num_regs): Define.
4618 (m68k_regmap): Renamed from regmap, made static.
4619 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4621 (m68k_cannot_store_register): Renamed from cannot_store_register,
4623 (the_low_target): New.
4624 * linux-mips-low.c (num_regs): Remove.
4625 (mips_num_regs): Define.
4626 (mips_regmap): Renamed from regmap, made static.
4627 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4629 (mips_cannot_store_register): Renamed from cannot_store_register,
4631 (the_low_target): New.
4632 * linux-ppc-low.c (num_regs): Remove.
4633 (ppc_num_regs): Define.
4634 (ppc_regmap): Renamed from regmap, made static.
4635 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4637 (ppc_cannot_store_register): Renamed from cannot_store_register,
4639 (the_low_target): New.
4640 * linux-s390-low.c (num_regs): Remove.
4641 (s390_num_regs): Define.
4642 (s390_regmap): Renamed from regmap, made static.
4643 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4645 (s390_cannot_store_register): Renamed from cannot_store_register,
4647 (the_low_target): New.
4648 * linux-sh-low.c (num_regs): Remove.
4649 (sh_num_regs): Define.
4650 (sh_regmap): Renamed from regmap, made static.
4651 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4653 (sh_cannot_store_register): Renamed from cannot_store_register,
4655 (the_low_target): New.
4656 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4657 (the_low_target): New.
4659 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4661 * Makefile.in: Add stamp-h target.
4662 * configure.in: Create stamp-h.
4663 * configure: Regenerated.
4665 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4667 * inferiors.c: New file.
4668 * target.c: New file.
4669 * target.h: New file.
4670 * Makefile.in: Add target.o and inferiors.o. Update
4672 * linux-low.c (inferior_pid): New static variable,
4673 moved from server.c.
4674 (linux_create_inferior): Renamed from create_inferior.
4675 Call add_inferior. Return 0 on success instead of a PID.
4676 (linux_attach): Renamed from myattach.
4677 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4678 (linux_thread_alive): Renamed from mythread_alive.
4679 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4681 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4682 (regsets_store_inferior_registers): Correct error message.
4683 Add missing ``return 0''.
4684 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4685 (linux_store_registers): Renamed from store_inferior_registers.
4686 (linux_read_memory): Renamed from read_inferior_memory.
4687 (linux_write_memory): Renamed from write_inferior_memory.
4688 (linux_target_ops): New structure.
4689 (initialize_low): Call set_target_ops ().
4690 * remote-utils.c (unhexify): New function.
4691 (hexify): New function.
4692 (input_interrupt): Send signals to ``signal_pid''.
4693 * server.c (inferior_pid): Remove.
4694 (start_inferior): Update create_inferior call.
4695 (attach_inferior): Call add_inferior.
4696 (handle_query): New function.
4697 (main): Call handle_query for `q' packets.
4698 * server.h: Include "target.h". Remove obsolete prototypes.
4699 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4701 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4703 * Makefile.in: Add WARN_CFLAGS. Update configury
4705 * configure.in: Check for <string.h>
4706 * configure: Regenerate.
4707 * config.in: Regenerate.
4708 * gdbreplay.c: Include needed system headers.
4709 (remote_open): Remove strchr prototype.
4710 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4711 * regcache.c (supply_register): Change buf argument to const void *.
4712 (supply_register_by_name): Likewise.
4713 (collect_register): Change buf argument to void *.
4714 (collect_register_by_name): Likewise.
4715 * regcache.h: Add missing prototypes.
4716 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4717 * server.c (handle_query): New function.
4718 (attached): New static variable, moved out of main.
4719 (main): Quiet longjmp clobber warnings.
4720 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4721 * utils.c (error): Remove NORETURN.