1 2010-05-23 Pedro Alves <pedro@codesourcery.com>
3 * config.h: Regenerate.
5 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8 doesn't provide PTRACE_GET_THREAD_AREA.
10 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12 * linux-m68k-low.c: Include <asm/ptrace.h>
13 (ps_get_thread_area): Implement.
15 2010-05-03 Doug Evans <dje@google.com>
17 * event-loop.c (struct callback_event): New struct.
18 (callback_list): New global.
19 (append_callback_event, delete_callback_event): New functions.
20 (process_callback): New function.
21 (start_event_loop): Call it.
22 * remote-utils.c (NOT_SCHEDULED): Define.
23 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
24 moved out of readchar.
25 (readchar): Rewrite. Call reschedule before returning.
26 (reset_readchar): New function.
27 (remote_close): Call it.
28 (process_remaining, reschedule): New functions.
29 * server.h (callback_handler_func): New typedef.
30 (append_callback_event, delete_callback_event): Declare.
32 2010-05-03 Pedro Alves <pedro@codesourcery.com>
34 * proc-service.c (ps_pglobal_lookup): Use
35 thread_db_look_up_one_symbol.
36 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
37 parameter. Use it instead of all_symbols_looked_up.
38 * server.h (struct process_info) <all_symbols_looked_up>: Delete
40 (all_symbols_looked_up): Don't declare.
41 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
42 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
44 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
45 Set all_symbols_looked_up here.
46 (thread_db_look_up_one_symbol): New.
47 (thread_db_get_tls_address): Adjust.
48 (thread_db_load_search, try_thread_db_load_1): Always allocate the
49 thread_db object on the heap, and tentatively set it in the
51 (thread_db_init): Don't set all_symbols_looked_up here.
52 * linux-low.h (thread_db_look_up_one_symbol): Declare.
54 2010-05-03 Pedro Alves <pedro@codesourcery.com>
56 * linux-low.c (linux_kill, linux_detach): Adjust.
57 (status_pending_p_callback): Remove redundant statement. Check
58 for !TARGET_WAITIKIND_IGNORE, instead of
59 TARGET_WAITKIND_STOPPED.
60 (handle_tracepoints): Make sure LWP is locked. Adjust.
61 (linux_wait_for_event_1): Adjust.
62 (linux_cancel_breakpoints): New.
63 (unsuspend_one_lwp): New.
64 (unsuspend_all_lwps): New.
65 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
66 (send_sigstop_callback): Change return type to int, add new
67 `except' parameter and handle it.
68 (suspend_and_send_sigstop_callback): New.
69 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
70 pass them down. If SUSPEND, also increment the lwp's suspend
72 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
73 (need_step_over_p): Don't consider suspended LWPs.
74 (start_step_over): Adjust.
75 (proceed_one_lwp): Change return type to int, add new `except'
76 parameter and handle it.
77 (unsuspend_and_proceed_one_lwp): New.
78 (proceed_all_lwps): Use find_inferior instead of
80 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
81 also decrement the suspend count of LWPs. Pass `except' down,
82 instead of hacking its suspend count.
83 (linux_pause_all): Add `freeze' parameter. Adjust.
84 (linux_unpause_all): New.
85 (linux_target_ops): Install linux_unpause_all.
86 * server.c (handle_status): Adjust.
87 * target.h (struct target_ops): New fields `unpause_all' and
88 `cancel_breakpoints'. Add new parameter to `pause_all'.
89 (pause_all): Add new `freeze' parameter.
91 (cancel_breakpoints): New.
92 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
94 (cmd_qtstart): Pause threads.
95 (stop_tracing): Pause threads, and cancel breakpoints.
96 * win32-low.c (win32_target_ops): Adjust.
98 2010-05-03 Pedro Alves <pedro@codesourcery.com>
100 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
101 the inferior right away from here...
102 (linux_wait_1): ... to here, and adjust to check the thread's
103 last_resume_kind instead of the lwp's step or stop_expected flags.
105 2010-05-02 Pedro Alves <pedro@codesourcery.com>
107 * README: Use consistent `GDB' and `GDBserver' spellings.
109 2010-05-02 Pedro Alves <pedro@codesourcery.com>
111 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
112 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
113 (linux_detach_one_lwp): Assume the lwp is stopped.
114 (any_thread_of): Delete.
115 (linux_detach): Stop all lwps here. Don't blindly delete all
117 (delete_lwp_callback): New.
118 (linux_mourn): Delete all lwps of the process that is gone.
119 (linux_wait_1): Don't delete the last lwp of the process here.
120 * mem-break.h (mark_breakpoints_out): Declare.
121 * mem-break.c (mark_breakpoints_out): New.
122 (free_all_breakpoints): Use it.
123 * server.c (handle_target_event): If the process is gone, mark
125 * thread-db.c (struct thread_db) <create_bp>: New field.
126 (thread_db_enable_reporting): Fix prototype. Store a thread event
127 breakpoint reference in the thread_db struct.
128 (thread_db_load_search): Clear the thread_db object.
129 (try_thread_db_load_1): Ditto.
130 (switch_to_process): New.
131 (disable_thread_event_reporting): Use it.
132 (remove_thread_event_breakpoints): New.
133 (thread_db_detach, thread_db_mourn): Use it.
135 2010-05-01 Pedro Alves <pedro@codesourcery.com>
137 * linux-low.c (linux_enable_event_reporting): New.
138 (linux_wait_for_event_1, handle_extended_wait): Use it.
140 2010-04-30 Pedro Alves <pedro@codesourcery.com>
142 * linux-low.c (linux_kill_one_lwp, linux_kill)
143 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
144 (send_sigstop): Take an lwp_info as parameter instead. Queue a
145 SIGSTOP even if the LWP is stopped.
146 (send_sigstop_callback): New.
147 (stop_all_lwps): Use send_sigstop_callback instead.
148 (linux_resume_one_thread): Adjust.
149 (proceed_one_lwp): Still proceed an LWP that the client has
150 requested to stop, if we haven't reported it as stopped yet. Make
151 sure that LWPs the client want stopped, have a pending SIGSTOP.
153 2010-04-26 Doug Evans <dje@google.com>
155 * server.c (handle_general_set): Make static.
157 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
158 Print received char after testing for error/eof instead of before.
159 (input_interrupt): Tweak comment.
161 2010-04-23 Doug Evans <dje@google.com>
163 * server.c (start_inferior): Print inferior argv if --debug.
165 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
167 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
168 * nto-x86-low.c: Include server.h
170 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
172 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
173 be consistent with other sources of this directory.
174 (init_registers_amd64): Correct name of source file of this function
177 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
179 * configure.srv (x86_64-*-mingw*): New configuration for Windows
182 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
184 * win32-i386-low.c: Add 64-bit support.
185 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
186 (init_registers_amd64): Declare.
187 (mappings): Add 64-bit version of array.
188 (init_windows_x86): New function.
189 (the_low_target): Change init_arch field to init_windows_x86.
191 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
193 * win32-low.c: Adapt to support also 64-bit architecture.
194 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
195 (get_image_name): Use SIZE_T type for local variable `done'.
196 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
197 (toolhelp_get_dll_name): Idem.
198 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
199 Use uintptr_t typecast to avoid warning.
200 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
201 (handle_exception): Use phex_nz to avoid warning.
202 (win32_wait): Remove unused local variable `process'.
204 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
206 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
209 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
211 * configure.ac: Use `ws2_32' library for srv_mingw.
212 * configure: Regenerate.
213 * gdbreplay.c: Include winsock2.h instead of winsock.h.
214 * remote-utils.c: Likewise.
216 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
218 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
219 if __x86_64__ is defined.
221 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
223 * configure: Regenerate.
225 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
227 * server.c (handle_query): Handle 'qGetTIBAddr' query.
228 * target.h (target_ops): New get_tib_address field.
229 * win32-low.h (win32_thread_info): Add thread_local_base field.
230 * win32-low.c (child_add_thread): Add tlb argument.
231 Set thread_local_base field to TLB.
232 (get_child_debug_event): Adapt to child_add_thread change.
233 (win32_get_tib_address): New function.
234 (win32_target_ops): Set get_tib_address field to
235 win32_get_tib_address.
236 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
238 2010-04-12 Pedro Alves <pedro@codesourcery.com>
240 * linux-low.c (linux_mourn): Also remove the process.
241 * server.c (handle_target_event): Don't remove the process here.
242 * nto-low.c (nto_mourn): New.
243 (nto_target_ops): Install it.
244 * spu-low.c (spu_mourn): New.
245 (spu_target_ops): Install it.
246 * win32-low.c (win32_mourn): New.
247 (win32_target_ops): Install it.
249 2010-04-12 Pedro Alves <pedro@codesourcery.com>
251 * server.h (buffer_xml_printf): Remove redundant `;'.
253 2010-04-12 Pedro Alves <pedro@codesourcery.com>
255 * regcache.c (set_register_cache): Invalidate regcaches before
256 changing the register cache layout.
257 (regcache_invalidate_one): Allow a NULL regcache.
258 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
259 regcaches before changing the register cache layout or the target
262 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
264 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
265 variable warning on Linux/x86-64.
267 2010-04-11 Pedro Alves <pedro@codesourcery.com>
269 GDBserver disconnected tracing support.
271 * linux-low.c (linux_remove_process): Delete.
272 (add_lwp): Don't set last_resume_kind here.
273 (linux_kill): Use `mourn'.
274 (linux_detach): Use `thread_db_detach', and `mourn'.
276 (linux_attach_lwp_1): Adjust comment.
277 (linux_attach): last_resume_kind moved the thread_info; adjust.
278 (status_pending_p_callback): Adjust.
279 (linux_wait_for_event_1): Adjust.
280 (count_events_callback, select_singlestep_lwp_callback)
281 (select_event_lwp_callback, cancel_breakpoints_callback)
282 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
283 (proceed_one_lwp): Adjust.
284 (linux_async): Add debug output.
285 (linux_thread_stopped): New.
286 (linux_pause_all): New.
287 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
289 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
290 (thread_db_free): Delete declaration.
291 (thread_db_detach, thread_db_mourn): Declare.
292 * thread-db.c (thread_db_init): Use thread_db_mourn.
293 (thread_db_free): Delete, split in two.
294 (disable_thread_event_reporting): New.
295 (thread_db_detach): New.
296 (thread_db_mourn): New.
298 * server.h (struct thread_info) <last_resume_kind>: New field.
299 <attached>: Add comment.
300 <gdb_detached>: New field.
301 (handler_func): Change return type to int.
302 (handle_serial_event, handle_target_event): Ditto.
303 (gdb_connected): Declare.
305 (disconnected_tracing): Declare.
306 (stop_tracing): Declare.
308 * server.c (handle_query) <qSupported>: Report support for
309 disconnected tracing.
310 (queue_stop_reply_callback): Account for running threads.
311 (gdb_wants_thread_stopped): New.
312 (gdb_wants_all_threads_stopped): New.
313 (gdb_reattached_process): New.
314 (handle_status): Clear the `gdb_detached' flag of all processes.
315 In all-stop, stop all threads.
316 (main): Be sure to leave tfind mode. Handle disconnected tracing.
317 (process_serial_event): If the remote connection breaks, or if an
318 exit was forced with "monitor exit", force an event loop exit.
319 Handle disconnected tracing on detach.
320 (handle_serial_event): Adjust.
321 (handle_target_event): If GDB isn't connected, forward events back
322 to the inferior, unless the last process exited, in which case,
323 exit gdbserver. Adjust interface.
325 * remote-utils.c (remote_open): Don't block in accept. Instead
326 register an event loop source on the listen socket file
327 descriptor. Refactor bits into ...
328 (listen_desc): ... this new global.
329 (gdb_connected): ... this new function.
330 (enable_async_notification): ... this new function.
331 (handle_accept_event): ... this new function.
332 (remote_close): Clear remote_desc.
334 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
336 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
338 (mourn_inferior): Define.
339 (target_process_qsupported): Avoid the dangling else problem.
340 (thread_stopped): Define.
342 (target_waitstatus_to_string): Declare.
343 * target.c (target_waitstatus_to_string): New.
345 * tracepoint.c (tracing): Make extern.
346 (disconnected_tracing): New.
347 (stop_tracing): Make extern. Handle tracing stops due to GDB
349 (cmd_qtdisconnected): New.
350 (cmd_qtstatus): Report disconnected tracing status in trace reply.
351 (handle_tracepoint_general_set): Handle QTDisconnected.
353 * event-loop.c (event_handler_func): Change return type to int.
354 (process_event): Bail out if the event handler wants the event
356 (handle_file_event): Ditto.
357 (start_event_loop): Bail out if the event handler wants the event
360 * nto-low.c (nto_target_ops): Adjust.
361 * spu-low.c (spu_wait): Don't remove the process here.
362 (spu_target_ops): Adjust.
363 * win32-low.c (win32_wait): Don't remove the process here.
364 (win32_target_ops): Adjust.
366 2010-04-11 Pedro Alves <pedro@codesourcery.com>
368 * regcache.c (realloc_register_cache): Invalidate inferior's
369 regcache before recreating it.
371 2010-04-09 Pedro Alves <pedro@codesourcery.com>
373 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
375 2010-04-09 Stan Shebs <stan@codesourcery.com>
376 Pedro Alves <pedro@codesourcery.com>
378 * server.h (LONGEST): New.
379 (struct thread_info) <while_stepping>: New field.
380 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
382 (initialize_tracepoint, handle_tracepoint_general_set)
383 (handle_tracepoint_query, tracepoint_finished_step)
384 (tracepoint_was_hit, release_while_stepping_state_list):
385 (current_traceframe): Declare.
386 * server.c (handle_general_set): Handle tracepoint packets.
389 (handle_search_memory_1): Use read_memory.
390 (handle_query): Report support for conditional tracepoints, trace
391 state variables, and tracepoint sources. Handle tracepoint
393 (main): Initialize the tracepoints module.
394 (process_serial_event): Handle traceframe reads/writes.
396 * linux-low.c (handle_tracepoints): New.
397 (linux_wait_1): Call it.
398 (linux_resume_one_lwp): Handle while-stepping.
399 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
400 (linux_target_ops): Install them.
401 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
403 * linux-x86-low.c (x86_supports_tracepoints): New.
404 (the_low_target). Install it.
406 * mem-break.h (delete_breakpoint): Declare.
407 * mem-break.c (delete_breakpoint): Make external.
409 * target.h (struct target_ops): Add `supports_tracepoints',
410 `read_pc', and `write_pc' fields.
411 (target_supports_tracepoints): Define.
412 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
415 * regcache.h (struct regcache) <registers_owned>: New field.
416 (init_register_cache, regcache_cpy): Declare.
417 (regcache_read_pc, regcache_write_pc): Declare.
418 (register_cache_size): Declare.
419 (supply_regblock): Declare.
420 * regcache.c (init_register_cache): New.
421 (new_register_cache): Use it.
423 (register_cache_size): New.
424 (supply_regblock): New.
425 (regcache_read_pc, regcache_write_pc): New.
429 * Makefile.in (OBS): Add tracepoint.o.
430 (tracepoint.o): New rule.
432 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
434 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
436 (i386-mmx.c): Likewise.
437 (i386-mmx-linux.o): Likewise.
438 (i386-mmx-linux.c): Likewise.
440 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
441 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
442 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
443 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
445 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
446 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
447 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
449 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
451 * Makefile.in (clean): Updated.
453 (i386-avx.c): Likewise.
454 (i386-avx-linux.o): Likewise.
455 (i386-avx-linux.c): Likewise.
456 (amd64-avx.o): Likewise.
457 (amd64-avx.c): Likewise.
458 (amd64-avx-linux.o): Likewise.
459 (amd64-avx-linux.c): Likewise.
461 * configure.srv (srv_i386_regobj): Add i386-avx.o.
462 (srv_i386_linux_regobj): Add i386-avx-linux.o.
463 (srv_amd64_regobj): Add amd64-avx.o.
464 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
465 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
466 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
467 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
468 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
469 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
470 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
472 * i387-fp.c: Include "i386-xstate.h".
474 (i387_cache_to_xsave): Likewise.
475 (i387_xsave_to_cache): Likewise.
476 (x86_xcr0): Likewise.
478 * i387-fp.h (i387_cache_to_xsave): Likewise.
479 (i387_xsave_to_cache): Likewise.
480 (x86_xcr0): Likewise.
482 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
483 * linux-crisv32-low.c (target_regsets): Likewise.
484 * linux-m68k-low.c (target_regsets): Likewise.
485 * linux-mips-low.c (target_regsets): Likewise.
486 * linux-ppc-low.c (target_regsets): Likewise.
487 * linux-s390-low.c (target_regsets): Likewise.
488 * linux-sh-low.c (target_regsets): Likewise.
489 * linux-sparc-low.c (target_regsets): Likewise.
490 * linux-xtensa-low.c (target_regsets): Likewise.
492 * linux-low.c: Include <sys/uio.h>.
493 (regsets_fetch_inferior_registers): Support nt_type.
494 (regsets_store_inferior_registers): Likewise.
495 (linux_process_qsupported): New.
496 (linux_target_ops): Add linux_process_qsupported.
498 * linux-low.h (regset_info): Add nt_type.
499 (linux_target_ops): Add process_qsupported.
501 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
503 (init_registers_i386_avx_linux): New.
504 (init_registers_amd64_avx_linux): Likewise.
505 (xmltarget_i386_linux_no_xml): Likewise.
506 (xmltarget_amd64_linux_no_xml): Likewise.
507 (PTRACE_GETREGSET): Likewise.
508 (PTRACE_SETREGSET): Likewise.
509 (x86_fill_xstateregset): Likewise.
510 (x86_store_xstateregset): Likewise.
512 (x86_linux_update_xmltarget): Likewise.
513 (x86_linux_process_qsupported): Likewise.
514 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
515 (x86_arch_setup): Don't call init_registers_amd64_linux nor
516 init_registers_i386_linux here. Call
517 x86_linux_update_xmltarget.
518 (the_low_target): Add x86_linux_process_qsupported.
520 * server.c (handle_query): Call target_process_qsupported.
522 * target.h (target_ops): Add process_qsupported.
523 (target_process_qsupported): New.
525 2010-04-03 Pedro Alves <pedro@codesourcery.com>
527 * inferiors.c (add_thread): Set last_status kind to
528 TARGET_WAITKIND_IGNORE.
529 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
530 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
531 (linux_wait_1): Move `thread' local definition to block that uses
532 it. Don't NULL initialize `event_child'.
533 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
534 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
535 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
537 2010-04-01 Pedro Alves <pedro@codesourcery.com>
539 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
540 an extended waitstatus, or by a watchpoint.
541 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
542 thread was stepping or has been stopped by a watchpoint.
544 2010-04-01 Pedro Alves <pedro@codesourcery.com>
546 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
547 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
548 of another, then delete the previous, and validate all
550 (validate_inserted_breakpoint): New.
551 (delete_disabled_breakpoints): New.
552 (validate_breakpoints): New.
553 (check_mem_read): Validate breakpoints before trusting their
554 shadow. Delete disabled breakpoints.
555 (check_mem_write): Validate breakpoints before trusting they
556 should be inserted. Delete disabled breakpoints.
557 * mem-break.h (validate_breakpoints):
558 * server.c (handle_query): Validate breakpoints when we see a
561 2010-04-01 Pedro Alves <pedro@codesourcery.com>
563 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
564 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
565 if we could tell there's a GDB breakpoint at stop_pc.
566 (need_step_over_p): Don't do a step over if we find a GDB
567 breakpoint at the resume PC.
569 * mem-break.c (struct raw_breakpoint): New.
570 (enum bkpt_type): New type `gdb_breakpoint'.
571 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
572 fields. New field `raw'.
573 (find_raw_breakpoint_at): New.
574 (set_raw_breakpoint_at): Handle refcounting. Create a raw
576 (set_breakpoint_at): Adjust.
577 (delete_raw_breakpoint): New.
578 (release_breakpoint): New.
579 (delete_breakpoint): Rename to...
580 (delete_breakpoint_1): ... this. Add proc parameter. Use
581 release_breakpoint. Return ENOENT.
582 (delete_breakpoint): Reimplement.
583 (find_breakpoint_at): Delete.
584 (find_gdb_breakpoint_at): New.
585 (delete_breakpoint_at): Delete.
586 (set_gdb_breakpoint_at): New.
587 (delete_gdb_breakpoint_at): New.
588 (gdb_breakpoint_here): New.
589 (set_reinsert_breakpoint): Use release_breakpoint.
590 (uninsert_breakpoint): Rename to ...
591 (uninsert_raw_breakpoint): ... this.
592 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
593 (reinsert_raw_breakpoint): Change parameter type to
595 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
597 (check_breakpoints): Adjust. Use release_breakpoint.
598 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
599 (breakpoint_inserted_here): Ditto.
600 (check_mem_read): Adjust to iterate over raw breakpoints instead.
601 Don't trust the breakpoint's shadow if it is not inserted.
602 (check_mem_write): Adjust to iterate over raw breakpoints instead.
603 (delete_all_breakpoints): Adjust.
604 (free_all_breakpoints): Mark all breakpoints as uninserted, and
605 use delete_breakpoint_1.
607 * mem-break.h (breakpoints_supported): Delete declaration.
608 (set_gdb_breakpoint_at): Declare.
609 (gdb_breakpoint_here): Declare.
610 (delete_breakpoint_at): Delete.
611 (delete_gdb_breakpoint_at): Declare.
613 * server.h (struct raw_breakpoint): Forward declare.
614 (struct process_info): New field `raw_breakpoints'.
616 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
619 2010-03-24 Pedro Alves <pedro@codesourcery.com>
621 * linux-low.c (status_pending_p_callback): Fix comment.
622 (linux_wait_for_event_1): Move most of the internal breakpoint
623 handling from here...
624 (linux_wait_1): ... to here.
625 (count_events_callback): New.
626 (select_singlestep_lwp_callback): New.
627 (select_event_lwp_callback): New.
628 (cancel_breakpoints_callback): New.
629 (select_event_lwp): New.
630 (linux_wait_1): Simplify internal breakpoint handling. Give equal
631 priority to all LWPs that have had events that should be reported
632 to the client. Cancel breakpoints when about to reporting the
633 event to the client, not while stopping lwps. No longer cancel
634 finished single-steps here.
635 (cancel_finished_single_step): Delete.
636 (cancel_finished_single_steps): Delete.
638 2010-03-24 Pedro Alves <pedro@codesourcery.com>
640 * mem-break.c (enum bkpt_type): New.
641 (struct breakpoint): New field `type'.
642 (set_breakpoint_at): Change return type to struct breakpoint
643 pointer. Set type to `other_breakpoint' by default.
644 (delete_breakpoint): Rewrite, supporting more than one breakpoint
645 in the breakpoint list.
646 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
647 (reinsert_breakpoint): Rename to ...
648 (reinsert_raw_breakpoint): ... this.
649 (reinsert_breakpoints_at): Adjust.
650 * mem-break.h (struct breakpoint): Declare.
651 (set_breakpoint_at): Change return type to struct breakpoint
654 2010-03-24 Pedro Alves <pedro@codesourcery.com>
656 * server.c (handle_query): Assign, not compare.
658 2010-03-24 Pedro Alves <pedro@codesourcery.com>
660 Teach linux gdbserver to step-over-breakpoints.
662 * linux-low.c (can_hardware_single_step): New.
663 (supports_breakpoints): New.
664 (handle_extended_wait): If stopping threads, read the stop pc of
667 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
668 low target doesn't support retrieving the PC.
669 (add_lwp): Set last_resume_kind to resume_continue.
670 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
671 (linux_attach): Don't clear stop_expected. Set the lwp's
672 last_resume_kind to resume_stop.
673 (linux_detach_one_lwp): Don't check for removed breakpoints.
674 (check_removed_breakpoint): Delete.
675 (status_pending_p): Rename to ...
676 (status_pending_p_callback): ... this. Don't check for removed
677 breakpoints. Don't consider threads that are stopped from GDB's
679 (linux_wait_for_lwp): Always read the stop_pc here.
680 (cancel_breakpoint): New.
681 (step_over_bkpt): New global.
682 (linux_wait_for_event_1): Implement stepping over breakpoints.
683 (gdb_wants_lwp_stopped): New.
684 (gdb_wants_all_stopped): New.
685 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
686 single-step traps here. Store the thread's last reported target
688 (send_sigstop): Don't clear stop_expected. Always set it,
690 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
691 (cancel_finished_single_step): New.
692 (cancel_finished_single_steps): New.
693 (wait_for_sigstop): Don't cancel finished single-step traps here.
694 (linux_resume_one_lwp): Don't check for removed breakpoints.
695 Don't set `step' on non-hardware step archs.
696 (linux_set_resume_request): Ignore resume_stop requests if already
697 stopping or stopped. Set the lwp's last_resume_kind.
698 (resume_status_pending_p): Don't check for removed breakpoints.
699 (need_step_over_p): New.
700 (start_step_over): New.
701 (finish_step_over): New.
702 (linux_resume_one_thread): Always queue a sigstop for resume_stop
703 requests. Clear the thread's last reported target waitstatus.
704 Don't use the `suspended' flag. Don't consider pending breakpoints.
705 (linux_resume): Start a step-over if necessary.
706 (proceed_one_lwp): New.
707 (proceed_all_lwps): New.
708 (unstop_all_lwps): New.
709 * linux-low.h (struct lwp_info): Rewrite comment for the
710 `suspended' flag. Add the `stop_pc' field. Delete the
711 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
712 Add `'last_resume_kind' and `need_step_over' fields.
713 * inferiors.c (struct thread_info): Delete, moved elsewhere.
714 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
715 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
716 (set_raw_breakpoint_at): New.
717 (set_breakpoint_at): Rewrite to use it.
718 (reinsert_breakpoint_handler): Delete.
719 (set_reinsert_breakpoint): New.
720 (reinsert_breakpoint_by_bp): Delete.
721 (delete_reinsert_breakpoints): New.
722 (uninsert_breakpoint): Rewrite.
723 (uninsert_breakpoints_at): New.
724 (reinsert_breakpoint): Rewrite.
725 (reinsert_breakpoints_at): New.
726 (check_breakpoints): Rewrite.
727 (breakpoint_here): New.
728 (breakpoint_inserted_here): New.
729 (check_mem_read): Adjust.
730 * mem-break.h (breakpoints_supported, breakpoint_here)
731 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
732 (reinsert_breakpoint_by_bp): Delete declaration.
733 (delete_reinsert_breakpoints): Declare.
734 (reinsert_breakpoint): Delete declaration.
735 (reinsert_breakpoints_at): Declare.
736 (uninsert_breakpoint): Delete declaration.
737 (uninsert_breakpoints_at): Declare.
738 (check_breakpoints): Adjust prototype.
739 * server.h: Adjust include order.
740 (struct thread_info): Declare here. Add a `last_status' field.
742 2010-03-23 Michael Snyder <msnyder@vmware.com>
744 * server.c (crc32): New function.
745 (handle_query): Add handling for 'qCRC:' request.
747 2010-03-23 Pedro Alves <pedro@codesourcery.com>
749 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
750 lwp had been stopped by a watchpoint.
752 2010-03-16 Pedro Alves <pedro@codesourcery.com>
754 * server.h (internal_error): Declare.
755 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
756 * utils.c (internal_error): New function.
758 2010-03-15 Andreas Schwab <schwab@redhat.com>
760 * configure.srv: Fix typo setting srv_regobj.
762 2010-03-15 Pedro Alves <pedro@codesourcery.com>
764 * linux-low.c (fetch_register): Avoid passing a non string literal
766 (usr_store_inferior_registers): Ditto.
768 2010-03-14 Pedro Alves <pedro@codesourcery.com>
770 * linux-low.c (linux_write_memory): Bail out early if peeking
773 2010-03-14 Pedro Alves <pedro@codesourcery.com>
775 * linux-low.h (struct lwp_info): New fields
776 `stopped_by_watchpoint' and `stopped_data_address'.
777 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
778 here, and cache them in the lwp object.
779 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
781 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
783 (linux_stopped_by_watchpoint): Rewrite.
784 (linux_stopped_data_address): Rewrite.
786 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
788 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
789 switching the current inferior, not before.
791 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
793 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
794 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
795 i386-linux.c and amd64-linux.c.
796 (reg-i386.o): Removed.
797 (reg-i386.c): Likewise.
798 (reg-i386-linux.o): Likewise.
799 (reg-i386-linux.c): Likewise.
800 (reg-x86-64.o): Likewise.
801 (reg-x86-64.c): Likewise.
802 (reg-x86-64-linux.o): Likewise.
803 (reg-x86-64-linux.c): Likewise.
806 (i386-linux.o): Likewise.
807 (i386-linux.c): Likewise.
810 (amd64-linux.o): Likewise.
811 (amd64-linux.c): Likewise.
813 * configure.srv (srv_i386_regobj): New.
814 (srv_i386_linux_regobj): Likewise.
815 (srv_amd64_regobj): Likewise.
816 (srv_amd64_linux_regobj): Likewise.
817 (srv_i386_32bit_xmlfiles): Likewise.
818 (srv_i386_64bit_xmlfiles): Likewise.
819 (srv_i386_xmlfiles): Likewise.
820 (srv_amd64_xmlfiles): Likewise.
821 (srv_i386_linux_xmlfiles): Likewise.
822 (srv_amd64_linux_xmlfiles): Likewise.
823 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
824 srv_xmlfiles to $srv_i386_xmlfiles.
825 (i[34567]86-*-mingw32ce*): Likewise.
826 (i[34567]86-*-mingw*): Likewise.
827 (i[34567]86-*-nto*): Likewise.
828 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
829 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
830 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
831 (x86_64-*-linux*): Likewise.
833 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
834 (init_registers_amd64_linux): New.
835 (x86_arch_setup): Replace init_registers_x86_64_linux with
836 init_registers_amd64_linux.
838 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
840 * configure.ac: Check for libdl. If it is not available link against
842 * configure: Regenerate.
844 2010-02-22 Pedro Alves <pedro@codesourcery.com>
848 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
849 handing a read watchpoint.
850 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
852 2010-02-12 Doug Evans <dje@google.com>
854 * linux-low.c (linux_supports_tracefork_flag): Document.
855 (linux_look_up_symbols): Add comment.
857 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
859 * regcache.c (supply_register): Clear regcache if buf is NULL.
861 2010-02-02 Nicolas Roche <roche@sourceware.org>
862 Joel Brobecker <brobecker@adacore.com>
864 * inferiors.c (find_inferior): Add function documentation.
865 (unloaded_dll): Handle the case where the unloaded dll has not
866 been previously registered in the dll list.
868 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
870 * linux-arm-low.c (thumb_breakpoint_len): Delete.
871 (thumb2_breakpoint): New.
872 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
874 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
876 * linux-low.c (get_stop_pc): Check for SIGTRAP.
877 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
880 2010-01-21 Pedro Alves <pedro@codesourcery.com>
882 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
884 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
886 * linux-s390-low.c (s390_collect_ptrace_register)
887 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
889 2010-01-21 Doug Evans <dje@google.com>
891 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
892 (PTRACE_ARG4_TYPE): New macro.
893 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
894 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
895 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
896 (usr_store_inferior_registers): Ditto.
897 (linux_read_memory, linux_write_memory): Ditto.
898 (linux_test_for_tracefork): Ditto.
900 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
901 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
903 2010-01-21 Pedro Alves <pedro@codesourcery.com>
905 * proc-service.c (ps_lgetregs): Don't refetch registers from the
908 2010-01-21 Pedro Alves <pedro@codesourcery.com>
910 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
911 prototype to take a regcache. Adjust.
913 2010-01-20 Pedro Alves <pedro@codesourcery.com>
915 * regcache.h (struct thread_info): Forward declare.
916 (struct regcache): New.
917 (new_register_cache): Adjust prototype.
918 (get_thread_regcache): Declare.
919 (free_register_cache): Adjust prototype.
920 (registers_to_string, registers_from_string): Ditto.
921 (supply_register, supply_register_by_name, collect_register)
922 (collect_register_as_string, collect_register_by_name): Ditto.
923 * regcache.c (struct inferior_regcache_data): Delete.
924 (get_regcache): Rename to ...
925 (get_thread_regcache): ... this. Adjust. Switch inferior before
927 (regcache_invalidate_one): Adjust.
928 (regcache_invalidate): Fix prototype.
929 (new_register_cache): Return the new register cache.
930 (free_register_cache): Change prototype.
931 (realloc_register_cache): Adjust.
932 (registers_to_string): Change prototype to take a regcache. Adjust.
933 (registers_from_string): Ditto.
934 (register_data): Ditto.
935 (supply_register): Ditto.
936 (supply_register_by_name): Ditto.
937 (collect_register): Ditto.
938 (collect_register_as_string): Ditto.
939 (collect_register_by_name): Ditto.
940 * server.c (process_serial_event): Adjust.
941 * linux-low.h (regset_fill_func, regset_store_func): Change
943 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
945 * linux-low.c (get_stop_pc): Adjust.
946 (check_removed_breakpoint): Adjust.
947 (linux_wait_for_event): Adjust.
948 (linux_resume_one_lwp): Adjust.
949 (fetch_register): Add regcache parameter. Adjust.
950 (usr_store_inferior_registers): Ditto.
951 (regsets_fetch_inferior_registers): Ditto.
952 (regsets_store_inferior_registers): Ditto.
953 (linux_fetch_registers, linux_store_registers): Ditto.
954 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
956 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
957 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
958 prototype to take a regcache.
959 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
960 * remote-utils.c (convert_ascii_to_int, outreg)
961 (prepare_resume_reply): Change prototype to take a regcache.
963 * target.h (struct target_ops) <fetch_registers, store_registers>:
964 Change prototype to take a regcache.
965 (fetch_inferior_registers, store_inferior_registers): Change
966 prototype to take a regcache. Adjust.
967 * proc-service.c (ps_lgetregs): Adjust.
968 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
969 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
970 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
971 take a regcache. Adjust.
972 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
973 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
974 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
975 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
976 * linux-cris-low.c (cris_get_pc, cris_set_pc)
977 (cris_cannot_fetch_register):
978 (cris_breakpoint_at): Change prototype to take a regcache.
980 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
981 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
982 to take a regcache. Adjust.
983 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
985 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
986 take a regcache. Adjust.
987 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
988 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
989 (m68k_set_pc): Change prototype to take a regcache. Adjust.
990 * linux-mips-low.c (mips_get_pc):
991 (mips_set_pc): Change prototype to take a regcache. Adjust.
992 (mips_reinsert_addr): Adjust.
993 (mips_collect_register): Change prototype to take a regcache.
995 (mips_supply_register):
996 (mips_collect_register_32bit, mips_supply_register_32bit)
997 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
998 (mips_store_fpregset): Ditto.
999 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
1001 (parse_spufs_run): Adjust.
1002 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
1003 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
1004 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
1005 take a regcache. Adjust.
1006 * linux-s390-low.c (s390_collect_ptrace_register)
1007 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
1008 (s390_set_pc): Change prototype to take a regcache. Adjust.
1009 (s390_arch_setup): Adjust.
1010 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
1011 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
1012 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
1013 (sparc_fill_gregset, sparc_store_gregset_from_stack)
1014 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
1016 (sparc_breakpoint_at): Adjust.
1017 * linux-xtensa-low.c (xtensa_fill_gregset):
1018 (xtensa_store_gregset):
1019 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
1020 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
1021 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
1022 prototype to take a regcache. Adjust.
1023 * win32-arm-low.c (arm_fetch_inferior_register)
1024 (arm_store_inferior_register): Change prototype to take a
1026 * win32-i386-low.c (i386_fetch_inferior_register)
1027 (i386_store_inferior_register): Change prototype to take a
1029 * win32-low.c (child_fetch_inferior_registers)
1030 (child_store_inferior_registers): Change prototype to take a
1032 (win32_wait): Adjust.
1033 (win32_fetch_inferior_registers): Change prototype to take a
1035 (win32_store_inferior_registers): Adjust.
1036 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
1037 store_inferior_register>: Change prototype to take a regcache.
1039 2010-01-20 Doug Evans <dje@google.com>
1041 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
1043 (linux_wait_for_event1, linux_init_signals): Ditto.
1044 (W_STOPCODE): Provide definition if missing.
1046 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
1048 * linux-low.c (linux_core_of_thread): New.
1049 (compare_ints, show_process, list_threads): New.
1050 (linux_qxfer_osdata): Report threads and cores.
1051 (linux_target_op): Register linux_core_of_thread.
1052 * remote-utils.c (prepare_resume_reply): Report the core.
1053 (buffer_xml_printf): Support %d specifier.
1054 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
1056 (handle_query): Handle qXfer:threads. Announce availability
1058 * target.h (struct target_ops): New field core_of_thread.
1060 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
1062 * Makefile.in (clean): Remove new generated files.
1063 (reg-s390.o, reg-s390.c): Remove rules.
1064 (reg-s390x.o, reg-s390x.c): Likewise.
1065 (s390-linux32.o, s390-linux32.c): Add rules.
1066 (s390-linux64.o, s390-linux64.c): Likewise.
1067 (s390x-linux64.o, s390x-linux64.c): Likewise.
1068 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
1069 * linux-s390-low.c: Include <elf.h>.
1070 (HWCAP_S390_HIGH_GPRS): Define if undefined.
1071 (init_registers_s390): Remove prototype.
1072 (init_registers_s390x): Likewise.
1073 (init_registers_s390_linux32): Add prototype.
1074 (init_registers_s390_linux64): Likewise.
1075 (init_registers_s390x_linux64): Likewise.
1076 (s390_num_regs_3264): New define.
1077 (s390_regmap_3264): New global variable.
1078 (s390_cannot_fetch_register): Remove obsolete check.
1079 (s390_cannot_store_register): Likewise.
1080 (s390_collect_ptrace_register): Handle upper/lower register halves.
1081 (s390_supply_ptrace_register): Likewise.
1082 (s390_fill_gregset): Update to register number changes.
1083 (s390_get_hwcap): New routine.
1084 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
1085 Install appropriate regmap and register set.
1087 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1089 * server.c (gdbserver_version): Update copyright year to 2010.
1090 * gdbreplay.c (gdbreplay_version): Likewise.
1092 2009-12-28 Doug Evans <dje@google.com>
1094 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
1095 elf/external.h. Include <elf.h> instead but only if necessary.
1097 2009-12-28 Pedro Alves <pedro@codesourcery.com>
1099 * linux-low.c (linux_remove_process): Remove `detaching'
1100 parameter. Don't release/detach from thread_db here.
1101 (linux_kill): Release/detach from thread_db here, ...
1102 (linux_detach): ... and here, before actually detaching.
1103 (linux_wait_1): ... and here, when a process exits.
1104 * thread-db.c (any_thread_of): New.
1105 (thread_db_free): Switch the current inferior to a thread of the
1108 2009-12-21 Doug Evans <dje@google.com>
1110 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
1112 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
1113 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
1114 warning ifndef __NR_tkill. Move setting of errno there too.
1115 Delete unnecessary resetting of errno after syscall.
1116 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
1118 * configure.ac: Check for dladdr.
1119 * config.in: Regenerate.
1120 * configure: Regenerate.
1121 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
1122 (try_thread_db_load): Update.
1124 * linux-low.c (my_waitpid): Delete unnecessary prototype.
1126 2009-12-18 Doug Evans <dje@google.com>
1128 * event-loop.c: Include unistd.h if it exists.
1130 * linux-low.c (my_waitpid): Move definition away from being in
1131 between linux_tracefork_child/linux_test_for_tracefork.
1133 * gdb_proc_service.h (psaddr_t): Fix type.
1134 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
1135 signature to match glibc.
1137 2009-12-16 Doug Evans <dje@google.com>
1139 * linux-low.c (linux_read_memory): Fix argument to read.
1141 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1143 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
1144 events, don't leave current_inferior pointing at null.
1146 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1148 * win32-low.c (LOG): Delete.
1149 (OUTMSG): Output to stderr.
1150 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
1151 on compile time LOG macro.
1152 (win32_wait): Fix debug output.
1154 2009-11-26 Pedro Alves <pedro@codesourcery.com>
1156 * win32-low.c (win32_add_one_solib): If the dll name is
1157 "ntdll.dll", prepend the system directory to the dll path.
1159 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1161 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
1163 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
1164 Vladimir Prus <vladimir@codesourcery.com>
1166 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
1167 * configure.ac: Check for __mcoldfire__ and set
1168 gdb_cv_m68k_is_coldfire.
1169 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1170 reg-cf.o and reg-m68k.o.
1171 * configure: Regenerated.
1173 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1175 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1176 Pass it to thread_db_free.
1177 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1178 proper `detaching' argument to linux_remove_process.
1179 * linux-low.h (thread_db_free): Add `detaching' parameter.
1180 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1182 (thread_db_free): Add `detaching' parameter. Only
1183 call td_ta_clear_event if detaching from process.
1185 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1187 * thread-db.c (thread_db_free): Fix typo.
1189 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1192 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1194 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1196 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1197 with an i686 compiler.
1198 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1200 * configure: Rebuilt.
1202 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1206 * server.c (handle_search_memory_1): Correct read_addr initialization
1207 in loop for searching subsequent chunks.
1209 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1211 * configure.ac: New --with-libthread-db option.
1212 * thread-db.c: Allow direct dependence on libthread_db.
1213 (thread_db_free): Adjust.
1214 * config.in: Regenerate.
1215 * configure: Likewise.
1217 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1220 * thread-db.c (attach_thread): New function.
1221 (maybe_attach_thread): Return success/failure.
1222 (find_new_threads_callback): Adjust.
1223 (thread_db_find_new_threads): Loop until no new threads.
1225 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1227 * proc-service.c (ps_lgetregs): Formatting.
1229 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1231 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1232 * configure.ac: Adjust.
1233 * linux-low.h (struct process_info_private): Move members to struct
1235 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1236 * linux-low.c (linux_remove_process): Adjust.
1237 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1238 * server.c (handle_query): Move code ...
1239 (handle_monitor_command): ... here. New function.
1240 * target.h (struct target_ops): New member.
1241 * thread-db.c (struct thread_db): New.
1242 (libthread_db_search_path): New variable.
1243 (thread_db_create_event, thread_db_enable_reporting)
1244 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1245 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1246 (try_thread_db_load_1, dladdr_to_soname): New functions.
1247 (try_thread_db_load, thread_db_load_search): New functions.
1248 (thread_db_init): Search for libthread_db.
1249 (thread_db_free): New function.
1250 (thread_db_handle_monitor_command): Likewise.
1251 * config.in: Regenerate.
1252 * configure: Regenerate.
1254 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1256 * spu-low.c (spu_kill): Wait for inferior to terminate.
1257 Call clear_inferiors.
1258 (spu_detach): Call clear_inferiors.
1260 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1262 * aclocal.m4: Regenerate.
1263 * config.in: Likewise.
1264 * configure: Likewise.
1266 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1268 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1269 (parse_spufs_run): New function.
1270 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1271 (ppc_breakpoint_at): Handle SPU breakpoints.
1273 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1275 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1276 (SPUFS_MAGIC): Define.
1277 (spu_enumerate_spu_ids): New function.
1278 (linux_qxfer_spu): New function.
1279 (linux_target_ops): Install linux_qxfer_spu.
1281 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1283 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1284 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1285 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1286 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1287 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1288 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1289 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1290 (init_registers_powerpc_cell32l): Add prototype.
1291 (init_registers_powerpc_cell64l): Likewise.
1292 (ppc_arch_setup): Detect Cell/B.E. architecture.
1294 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1296 * Makefile.in (datarootdir): New variable.
1298 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1300 * linux-low.c (linux_write_memory): Update debugging output.
1301 * Makefile.in (clean): Add new descriptions.
1302 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1303 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1304 * configure.srv: Add new files for arm*-*-linux*.
1305 * linux-arm-low.c: Add new declarations.
1306 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1307 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1308 (HWCAP_VFPv3D16): New.
1309 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1310 instead of __IWMMXT__.
1311 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1312 (arm_arch_setup): New.
1313 (target_regsets): Remove #ifdef. Add VFP regset.
1314 (the_low_target): Use arm_arch_setup.
1316 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1318 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1319 the main thread again.
1321 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1323 Adding Neutrino gdbserver.
1324 * configure: Regenerated.
1325 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1326 * configure.srv (i[34567]86-*-nto*): New target.
1327 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1328 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1329 (nto_comctrl) [__QNX__]: New function.
1330 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1332 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1334 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1337 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1338 Pedro Alves <pedro@codesourcery.com>
1340 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1341 don't support CONTEXT_EXTENDED_REGISTERS.
1342 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1343 (the_low_target): Install them.
1344 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1345 failing with ERROR_PIPE_NOT_CONNECTED.
1347 2009-06-30 Doug Evans <dje@google.com>
1348 Pierre Muller <muller@ics.u-strasbg.fr>
1350 Add h/w watchpoint support to x86-linux, win32-i386.
1351 * Makefile.in (SFILES): Add i386-low.c
1352 (i386_low_h): Define.
1353 (i386-low.o): Add dependencies.
1354 (linux-x86-low.o): Add i386-low.h dependency.
1355 (win32-i386-low.o): Ditto.
1356 * i386-low.c: New file.
1357 * i386-low.h: New file.
1358 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1359 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1360 * linux-low.c (linux_add_process): Initialize arch_private.
1361 (linux_remove_process): Free arch_private.
1362 (add_lwp): Initialize arch_private.
1363 (delete_lwp): Free arch_private.
1364 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1366 * linux-low.h (process_info_private): New member arch_private.
1367 (lwp_info): New member arch_private.
1368 (linux_target_ops): New members new_process, new_thread,
1370 (ptid_of): New macro.
1371 * linux-x86-low.c: Include stddef.h, i386-low.h.
1372 (arch_process_info): New struct.
1373 (arch_lwp_info): New struct.
1374 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1375 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1376 (i386_dr_low_get_status): New function.
1377 (x86_insert_point, x86_remove_point): New functions.
1378 (x86_stopped_by_watchpoint): New function.
1379 (x86_stopped_data_address): New function.
1380 (x86_linux_new_process, x86_linux_new_thread): New functions.
1381 (x86_linux_prepare_to_resume): New function.
1382 (the_low_target): Add entries for insert_point, remove_point,
1383 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1385 * server.c (debug_hw_points): New global.
1386 (monitor_show_help): Document set debug-hw-points.
1387 (handle_query): Process "set debug-hw-points".
1388 * server.h (debug_hw_points): Declare.
1389 (paddress): Declare.
1390 * utils.c (NUMCELLS, CELLSIZE): New macros.
1391 (get_sell, xsnprintf, paddress): New functions.
1392 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1393 remove_point, stopped_by_watchpoint, stopped_data_address.
1394 * win32-i386-low.c: Include i386-low.h.
1395 (debug_reg_state): Replaces dr.
1396 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1397 (i386_dr_low_get_status): New function.
1398 (i386_insert_point, i386_remove_point): New functions.
1399 (i386_stopped_by_watchpoint): New function.
1400 (i386_stopped_data_address): New function.
1401 (i386_initial_stuff): Update.
1402 (get_thread_context,set_thread_context,i386_thread_added): Update.
1403 (the_low_target): Add entries for insert_point,
1404 remove_point, stopped_by_watchpoint, stopped_data_address.
1405 * win32-low.c (win32_insert_watchpoint): New function.
1406 (win32_remove_watchpoint): New function.
1407 (win32_stopped_by_watchpoint): New function.
1408 (win32_stopped_data_address): New function.
1409 (win32_target_ops): Add entries for insert_watchpoint,
1410 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1411 * win32-low.h (win32_target_ops): New members insert_point,
1412 remove_point, stopped_by_watchpoint, stopped_data_address.
1414 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1416 * server.c (process_serial_event): Re-return unsupported, not
1417 error, if the type isn't recognized. Re-allow supporting only
1418 insert or remove packets. Also call require_running for
1419 breakpoints. Add missing break statement to default case. Tidy.
1420 * target.h (struct target_ops): Rename insert_watchpoint to
1421 insert_point, and remove_watchpoint to remove_point.
1423 * linux-low.h (struct linux_target_ops): Likewise.
1424 * linux-low.c (linux_insert_watchpoint): Rename to ...
1425 (linux_insert_point): ... this. Adjust.
1426 (linux_remove_watchpoint): Rename to ...
1427 (linux_remove_point): ... this. Adjust.
1428 (linux_target_ops): Adjust.
1429 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1430 (cris_insert_point): ... this.
1431 (cris_remove_watchpoint): Rename to ...
1432 (cris_remove_point): ... this.
1433 (the_low_target): Adjust.
1435 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1437 * server.c (handle_v_kill): Pass signal_pid to
1438 kill_inferior if multi_process is zero.
1440 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1442 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1443 * target.h (target_ops): Comment for *_watchpoint to make it clear
1444 the functions can get types '0' and '1'.
1446 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1448 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1449 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1450 * regcache.c (get_regcache): Likewise.
1451 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1452 * win32-low.c (child_fetch_inferior_registers): Remove check for
1455 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1456 Pedro Alves <pedro@codesourcery.com>
1458 * target.h (struct target_ops) <supports_multi_process>: New
1460 (target_supports_multi_process): New.
1461 * server.c (handle_query): Even if GDB reports support, only
1462 enable multi-process if the target also supports it. Report
1463 multi-process support only if the target backend supports it.
1464 * linux-low.c (linux_supports_multi_process): New function.
1465 (linux_target_ops): Install it as target_supports_multi_process
1468 2009-05-24 Doug Evans <dje@google.com>
1470 Global renaming of find_thread_pid to find_thread_ptid.
1471 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1472 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1473 All callers updated.
1475 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1476 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1479 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1480 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1481 (linux_resume_one_lwp): Ditto.
1483 2009-05-23 Doug Evans <dje@google.com>
1485 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1486 from struct inferior_list_entry * to struct lwp_info *.
1487 All callers updated.
1489 2009-05-13 Doug Evans <dje@google.com>
1491 * linux-x86-low.c: Don't include assert.h.
1492 (x86_siginfo_fixup): Use fatal, not assert.
1493 (x86_arch_setup): Fix comment.
1495 2009-05-12 Doug Evans <dje@google.com>
1497 Biarch support for i386/amd64 gdbserver.
1498 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1499 Add linux-x86-low.c.
1500 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1501 (linux-x86-low.o): Add.
1502 * linux-x86-64-low.c: Delete.
1503 * linux-i386-low.c: Delete.
1504 * linux-x86-low.c: New file.
1505 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1507 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1509 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1510 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1511 (linux_child_pid_to_exec_file): New function.
1512 (elf_64_header_p, elf_64_file_p): New functions.
1513 (siginfo_fixup): New function.
1514 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1515 give target a chance to convert layout.
1516 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1517 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1519 2009-05-07 Doug Evans <dje@google.com>
1521 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1522 (regsets_store_inferior_registers): Ditto.
1524 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1528 * linux-low.c (must_set_ptrace_flags): Delete.
1529 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1531 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1532 `lwp->must_set_ptrace_flags' instead.
1533 (linux_wait_for_event_1): Set ptrace options here.
1534 (linux_wait_1): ... not here.
1536 2009-04-30 Doug Evans <dje@google.com>
1538 * inferiors.c (started_inferior_callback): New function.
1539 (attached_inferior_callback): New function.
1540 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1541 * server.c (print_started_pid, print_attached_pid): New functions.
1542 (detach_or_kill_for_exit): New function.
1543 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1544 * server.h (have_started_inferiors_p): Declare.
1545 (have_attached_inferiors_p): Declare.
1547 * inferiors.c (remove_process): Fix memory leak, free process.
1548 * linux-low.c (linux_remove_process): New function.
1549 (linux_kill): Call it instead of remove_process.
1550 (linux_detach, linux_wait_1): Ditto.
1552 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1554 * configure.srv: Add x86 Windows CE target.
1556 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1558 * inferiors.c (get_thread_process): Make global.
1559 * server.h (get_thread_process): Add prototype.
1560 * thread-db.c (find_one_thread): Use get_thread_process
1561 instead of current_process.
1562 (thread_db_get_tls_address): Do not crash if called when
1563 thread layer is not yet initialized.
1565 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1567 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1568 * spu-low.c (current_tid): Rename to ...
1569 (current_ptid): ... this.
1570 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1571 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1572 ptid_get_lwp (current_ptid) instead of current_tid.
1573 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1574 instead of current_tid. Use find_process_pid to verify pid
1575 argument is valid. Pass proper argument to remove_process.
1576 (spu_thread_alive): Compare current_ptid instead of current_tid.
1577 (spu_resume): Likewise.
1579 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1581 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1584 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1586 Implement the multiprocess extensions, and add linux multiprocess
1589 * server.h (ULONGEST): Declare.
1590 (struct ptid, ptid_t): New.
1591 (minus_one_ptid, null_ptid): Declare.
1592 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1593 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1594 (struct inferior_list_entry): Change `id' type from unsigned from
1596 (struct sym_cache, struct breakpoint, struct
1597 process_info_private): Forward declare.
1598 (struct process_info): Declare.
1599 (current_process): Declare.
1600 (all_processes): Declare.
1601 (initialize_inferiors): Declare.
1602 (add_thread): Adjust to use ptid_t.
1603 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1604 (add_process, remove_process, find_thread_pid): Declare.
1605 (find_inferior_id): Adjust to use ptid_t.
1606 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1607 (multi_process): Declare.
1608 (push_event): Adjust to use ptid_t.
1609 (read_ptid, write_ptid): Declare.
1610 (prepare_resume_reply): Adjust to use ptid_t.
1611 (clear_symbol_cache): Declare.
1612 * inferiors.c (all_processes): New.
1613 (null_ptid, minus_one_ptid): New.
1614 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1615 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1616 (add_thread): Change unsigned long to ptid. Remove gdb_id
1618 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1619 (gdb_id_to_thread): Rename to ...
1620 (find_thread_pid): ... this. Change unsigned long to ptid.
1621 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1622 (loaded_dll, pull_pid_from_list): Adjust.
1623 (add_process, remove_process, find_process_pid)
1624 (get_thread_process, current_process, initialize_inferiors): New.
1625 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1626 (struct target_waitstatus) <related_pid>: Ditto.
1627 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1629 (struct target_ops) <join>: Add `pid' argument.
1630 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1631 (struct target_ops) <wait>: Add `ptid' field. Change return type
1633 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1634 (mywait): Add `ptid' argument. Change return type to ptid_t.
1635 (target_pid_to_str): Declare.
1636 * target.c (set_desired_inferior): Adjust to use ptids.
1637 (mywait): Add new `ptid' argument. Adjust.
1638 (target_pid_to_str): New.
1639 * mem-break.h (free_all_breakpoints): Declare.
1640 * mem-break.c (breakpoints): Delelete.
1641 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1642 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1643 to use per-process breakpoint list.
1644 (free_all_breakpoints): New.
1645 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1646 (symbol_cache, all_symbols_looked_up): Delete.
1648 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1650 (prepare_resume_reply): Change ptid argument's type from unsigned
1651 long to ptid_t. Adjust. Implement W;process and X;process.
1652 (free_sym_cache, clear_symbol_cache): New.
1653 (look_up_one_symbol): Adjust to per-process symbol cache. *
1654 * server.c (cont_thread, general_thread, step_thread): Change type
1657 (multi_process): New.
1658 (last_ptid): Change type to ptid_t.
1659 (struct vstop_notif) <ptid>: Change type to ptid_t.
1660 (queue_stop_reply, push_event): Change `ptid' argument's type to
1662 (discard_queued_stop_replies): Add `pid' argument.
1663 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1664 changes. Don't reference the `attached' global.
1665 (attach_inferior): Adjust to mywait interface changes.
1666 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1667 features. Handle and report "multiprocess+". Handle
1669 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1671 (handle_v_kill): New.
1672 (handle_v_stopped): Adjust to use target_pid_to_str.
1673 (handle_v_requests): Allow multiple attaches and runs when
1674 multiprocess extensions are in effect. Handle "vKill".
1675 (myresume): Adjust to use ptids.
1676 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1677 (handle_status): Adjust to discard_queued_stop_replies interface
1679 (first_thread_of, kill_inferior_callback)
1680 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1681 (main): Call initialize_inferiors. Adjust to use ptids, killing
1682 and detaching from all inferiors. Handle multiprocess packet
1684 * linux-low.h: Include gdb_proc_service.h.
1685 (struct process_info_private): New.
1686 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1687 <lwpid_of>: Use ptid_get_lwp.
1688 (get_lwp_thread): Adjust.
1689 (struct lwp_info): Add `dead' member.
1690 (find_lwp_pid): Declare.
1691 * linux-low.c (thread_db_active): Delete.
1692 (new_inferior): Adjust comment.
1693 (inferior_pid): Delete.
1694 (linux_add_process): New.
1695 (handle_extended_wait): Adjust.
1696 (add_lwp): Change unsigned long to ptid.
1697 (linux_create_inferior): Add process to processes table. Adjust
1698 to use ptids. Don't set new_inferior here.
1699 (linux_attach_lwp): Rename to ...
1700 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1701 it. Adjust to use ptids.
1702 (linux_attach_lwp): New.
1703 (linux_attach): Add process to processes table. Don't set
1705 (struct counter): New.
1706 (second_thread_of_pid_p, last_thread_of_process_p): New.
1707 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1709 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1710 processes. Remove process from process table.
1711 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1712 to multiple processes.
1713 (any_thread_of): New.
1714 (linux_detach): Add `pid' argument, and handle it. Remove process
1715 from processes table.
1716 (linux_join): Add `pid' argument. Handle it.
1717 (linux_thread_alive): Change unsighed long argument to ptid_t.
1718 Consider dead lwps as not being alive.
1719 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1720 threads we're not interested in.
1721 (same_lwp, find_lwp_pid): New.
1722 (linux_wait_for_lwp): Change `pid' argument's type from int to
1724 (linux_wait_for_event): Rename to ...
1725 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1726 from int to ptid_t. Adjust.
1727 (linux_wait_for_event): New.
1728 (linux_wait_1): Add `ptid' argument. Change return type to
1729 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1730 that exit from the process table.
1731 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1733 (mark_lwp_dead): New.
1734 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1735 stopping all threads, mark its main lwp as dead.
1736 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1738 (fetch_register, usr_store_inferior_registers)
1739 (regsets_fetch_inferior_registers)
1740 (regsets_store_inferior_registers, linux_read_memory)
1741 (linux_write_memory): Inline `inferior_pid'.
1742 (linux_look_up_symbols): Adjust to use per-process
1744 (linux_request_interrupt): Adjust to use ptids.
1745 (linux_read_auxv): Inline `inferior_pid'.
1746 (initialize_low): Don't reference thread_db_active.
1747 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1748 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1749 (ps_getpid): Return the pid of the current inferior.
1750 * thread-db.c (proc_handle, thread_agent): Delete.
1751 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1753 (find_one_thread): Change argument type to ptid_t. Adjust to
1755 (maybe_attach_thread): Adjust to per-process data and ptids.
1756 (thread_db_find_new_threads): Ditto.
1757 (thread_db_init): Ditto.
1758 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1759 processes table. Adjust to use ptids.
1760 (spu_kill, spu_detach): Adjust interface. Remove process from
1762 (spu_join, spu_thread_alive): Adjust interface.
1763 (spu_wait): Adjust interface. Remove process from processes
1764 table. Adjust to use ptids.
1765 * win32-low.c (current_inferior_tid): Delete.
1766 (current_inferior_ptid): New.
1767 (debug_event_ptid): New.
1768 (thread_rec): Take a ptid. Adjust.
1769 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1770 (child_delete_thread): Ditto.
1771 (do_initial_child_stuff): Add `attached' argument. Add process to
1773 (child_fetch_inferior_registers, child_store_inferior_registers):
1775 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1776 (win32_attach): Pass 1 to do_initial_child_stuff.
1777 (win32_kill): Adjust interface. Remove process from processes
1779 (win32_detach): Ditto.
1780 (win32_join): Adjust interface.
1781 (win32_thread_alive): Take a ptid.
1782 (win32_resume): Adjust to use ptids.
1783 (get_child_debug_event): Ditto.
1784 (win32_wait): Adjust interface. Remove exiting process from
1787 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1789 Non-stop mode support.
1791 * server.h (non_stop): Declare.
1792 (gdb_client_data, handler_func): Declare.
1793 (delete_file_handler, add_file_handler, start_event_loop):
1795 (handle_serial_event, handle_target_event, push_event)
1796 (putpkt_notif): Declare.
1797 * target.h (enum resume_kind): New.
1798 (struct thread_resume): Replace `step' field by `kind' field.
1799 (TARGET_WNOHANG): Define.
1800 (struct target_ops) <wait>: Add `options' argument.
1801 <supports_non_stop, async, start_non_stop>: New fields.
1802 (target_supports_non_stop, target_async): New.
1803 (start_non_stop): Declare.
1804 (mywait): Add `options' argument.
1805 * target.c (mywait): Add `options' argument. Print child exit
1807 (start_non_stop): New.
1808 * server.c (non_stop, own_buf, mem_buf): New globals.
1809 (struct vstop_notif): New.
1810 (notif_queue): New global.
1811 (queue_stop_reply, push_event, discard_queued_stop_replies)
1812 (send_next_stop_reply): New.
1813 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1815 (attach_inferior): In non-stop mode, don't wait for the target
1817 (handle_general_set): Handle QNonStop.
1818 (handle_query): When handling qC, return the current general
1819 thread, instead of the first thread of the list.
1820 (handle_query): If the backend supports non-stop mode, include
1821 QNonStop+ in the qSupported query response.
1822 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1824 (handle_v_attach, handle_v_run): Handle non-stop mode.
1825 (handle_v_stopped): New.
1826 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1827 (myresume): Adjust to use resume_kind. Handle non-stop.
1828 (queue_stop_reply_callback): New.
1829 (handle_status): Handle non-stop mode.
1830 (main): Clear non_stop flag on reconnection. Use the event-loop.
1831 Refactor serial protocol handling from here ...
1832 (process_serial_event): ... to this new function. When GDB
1833 selects any thread, select one here. In non-stop mode, wait until
1834 GDB acks all pending events before exiting.
1835 (handle_serial_event, handle_target_event): New.
1836 * remote-utils.c (remote_open): Install remote_desc in the event
1838 (remote_close): Remove remote_desc from the event loop.
1839 (putpkt_binary): Rename to...
1840 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1841 (putpkt_binary): New as wrapper around putpkt_binary_1.
1842 (putpkt_notif): New.
1843 (prepare_resume_reply): In non-stop mode, don't change the
1845 * event-loop.c: New.
1846 * Makefile.in (OBJ): Add event-loop.o.
1847 (event-loop.o): New rule.
1849 * linux-low.h (pid_of): Moved here.
1851 (get_lwp_thread): Use lwpid_of.
1852 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1853 * linux-low.c (pid_of): Delete.
1854 (inferior_pid): Use lwpid_of.
1855 (linux_event_pipe): New.
1856 (target_is_async_p): New.
1858 (handle_extended_wait): Use lwpid_of.
1859 (add_lwp): Don't set lwpid field.
1860 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1861 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1862 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1863 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1864 first. Adjust to linux_wait_for_event interface changes. Use
1866 (linux_detach): Don't delete the main lwp here.
1867 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1868 (status_pending_p): Don't consider explicitly suspended lwps.
1869 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1870 pointer. Add OPTIONS argument. Change return type to int. Use
1871 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1872 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1873 pointer. Add status pointer argument. Return a pid instead of a
1874 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1875 changes. In non-stop mode, don't switch to a random thread.
1876 (linux_wait): Rename to...
1877 (linux_wait_1): ... this. Add target_options argument, and handle
1878 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1879 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1880 clean exit and signal exit code. Don't stop all threads in
1881 non-stop mode. In all-stop mode, only stop all threads when
1882 reporting a stop to GDB. Handle explicit thread stop requests.
1883 (async_file_flush, async_file_mark): New.
1885 (send_sigstop): Use lwpid_of.
1886 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1887 interface changes. In non-stop mode, don't switch to a random
1889 (linux_resume_one_lwp): Use lwpid_of.
1890 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1891 (linux_resume_one_thread): ... this. Handle resume_stop. In
1892 non-stop mode, don't look for pending flag in all threads.
1893 (resume_status_pending_p): Don't consider explicitly suspended
1895 (my_waitpid): Reimplement. Emulate __WALL.
1896 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1898 (sigchld_handler, linux_supports_non_stop, linux_async)
1899 (linux_start_non_stop): New.
1900 (linux_target_ops): Register linux_supports_non_stop, linux_async
1901 and linux_start_non_stop.
1902 (initialize_low): Install SIGCHLD handler.
1903 * thread-db.c (thread_db_create_event, find_one_thread)
1904 (thread_db_get_tls_address): Use lwpid_of.
1905 * win32-low.c (win32_detach): Adjust to use resume_kind.
1906 (win32_wait): Add `options' argument.
1907 * spu-low.c (spu_resume): Adjust to use resume_kind.
1908 (spu_wait): Add `options' argument.
1910 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1912 Decouple target code from remote protocol.
1914 * target.h (enum target_waitkind): New.
1915 (struct target_waitstatus): New.
1916 (struct target_ops) <wait>: Return an unsigned long. Take a
1917 target_waitstatus pointer instead of a char pointer.
1919 * target.c (mywait): Change prototype to return an unsigned long.
1920 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1921 * server.h (thread_from_wait, old_thread_from_wait): Delete
1923 (prepare_resume_reply): Change prototype to take a
1925 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1926 (last_status, last_ptid): New.
1927 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1928 pid instead of a signal.
1929 (attach_inferior): Remove "status" and "signal" parameters.
1931 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1933 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1934 (handle_v_requests, myresume): Remove "status" and "signal"
1936 (handle_status): New.
1937 (main): Delete local `status'. Adjust.
1938 * remote-utils.c: Include target.h.
1939 (prepare_resume_reply): Change prototype to take a
1940 target_waitstatus. Adjust.
1942 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1944 * spu-low.c (spu_wait): Adjust.
1945 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1947 (win32_wait): Adjust.
1949 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1951 * target.h (struct thread_resume): Delete leave_stopped member.
1952 (struct target_ops): Add a `n' argument to the `resume' callback.
1953 * server.c (start_inferior): Adjust.
1954 (handle_v_cont, myresume): Adjust.
1955 * linux-low.c (check_removed_breakpoint): Adjust to resume
1956 interface change, and to removed leave_stopped field.
1957 (resume_ptr): Delete.
1958 (struct thread_resume_array): New.
1959 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1960 resume interface change.
1961 (linux_continue_one_thread, linux_queue_one_thread)
1962 (resume_status_pending_p): Check if the resume field is NULL
1963 instead of checking the leave_stopped member.
1964 (linux_resume): Adjust to the target resume interface change.
1965 * spu-low.c (spu_resume): Adjust to the target resume interface
1967 * win32-low.c (win32_detach, win32_resume): Ditto.
1969 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1971 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1973 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1975 (linux_continue_one_thread): Only preserve the stepping flag if
1976 there's a pending breakpoint.
1978 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1980 * server.c (main): After the inferior having exited, call
1981 remote_close before exiting gdbserver.
1983 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1985 Fix size of FPSCR in Power 7 processors.
1986 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1987 (PPC_FEATURE_HAS_DFP): New #define.
1988 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1991 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1993 * server.c (handle_query) Whitespace and formatting.
1995 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1997 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1998 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1999 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
2000 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
2001 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
2002 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
2003 Makefile.in, configure.ac: Fix whitespace throughout.
2004 * configure: Regenerate.
2006 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2008 * inferiors.c (find_inferior): Make it safe for the callback
2009 function to delete the currently iterated inferior.
2011 2009-03-22 Pedro Alves <pedro@codesourcery.com>
2013 * Makefile.in (linuw_low_h): Move higher.
2014 (thread-db.o): Depend on $(linux_low_h).
2016 2009-03-17 Pedro Alves <pedro@codesourcery.com>
2018 Rename "process" to "lwp" throughout.
2020 * linux-low.c (all_processes): Rename to...
2021 (all_lwps): ... this.
2022 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
2023 (add_process): Rename to ...
2024 (add_lwp): ... this. Adjust.
2025 (linux_create_inferior): Adjust.
2026 (linux_attach_lwp): Adjust.
2027 (linux_attach): Adjust.
2028 (linux_kill_one_process): Rename to ...
2029 (linux_kill_one_lwp): ... this. Adjust.
2030 (linux_kill): Adjust.
2031 (linux_detach_one_process): Rename to ...
2032 (linux_detach_one_lwp): ... this. Adjust.
2033 (linux_detach): Adjust.
2034 (check_removed_breakpoint): Adjust.
2035 (status_pending_p): Adjust.
2036 (linux_wait_for_process): Rename to ...
2037 (linux_wait_for_lwp): ... this. Adjust.
2038 (linux_wait_for_event): Adjust.
2039 (send_sigstop): Adjust.
2040 (wait_for_sigstop): Adjust.
2041 (stop_all_processes): Rename to ...
2042 (stop_all_lwps): ... this.
2043 (linux_resume_one_process): Rename to ...
2044 (linux_resume_one_lwp): ... this. Adjust.
2045 (linux_set_resume_request, linux_continue_one_thread)
2046 (linux_queue_one_thread, resume_status_pending_p)
2047 (usr_store_inferior_registers, regsets_store_inferior_registers)
2048 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
2050 * linux-low.h (get_process): Rename to ...
2051 (get_lwp): ... this. Adjust.
2052 (get_thread_process): Rename to ...
2053 (get_thread_lwp): ... this. Adjust.
2054 (get_process_thread): Rename to ...
2055 (get_lwp_thread): ... this. Adjust.
2056 (struct process_info): Rename to ...
2057 (struct lwp_info): ... this.
2058 (all_processes): Rename to ...
2059 (all_lwps): ... this.
2060 * proc-service.c (ps_lgetregs): Adjust.
2061 * thread-db.c (thread_db_create_event, find_one_thread)
2062 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
2064 2009-03-14 Pedro Alves <pedro@codesourcery.com>
2066 * server.c (handle_query): Handle "qAttached".
2068 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
2070 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
2071 GPLv3, update license URL.
2073 2009-03-01 Doug Evans <dje@google.com>
2075 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2076 (server_h): Add gdb_signals.h.
2077 (signals.o): Update.
2078 * server.h (target_signal_from_host,target_signal_to_host_p)
2079 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
2081 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
2083 * remote-utils.c (getpkt): Also generate remote-debug
2084 information if noack_mode is set.
2086 2009-02-06 Pedro Alves <pedro@codesourcery.com>
2088 * server.c (handle_query): Report qXfer:siginfo:read and
2089 qXfer:siginfo:write as supported and handle them.
2090 * target.h (struct target_ops) <qxfer_siginfo>: New field.
2091 * linux-low.c (linux_xfer_siginfo): New.
2092 (linux_target_ops): Set it.
2094 2009-01-26 Pedro Alves <pedro@codesourcery.com>
2096 * server.c (gdbserver_usage): Mention --remote-debug.
2097 (main): Accept '--remote-debug' switch.
2099 2009-01-18 Doug Evans <dje@google.com>
2101 * regcache.c (new_register_cache): No need to check result of xcalloc.
2102 * server.c (handle_search_memory): Back out calls to xmalloc,
2103 result is checked and error is returned to user upon failure.
2104 (handle_query): Ditto. Add more checks for result of malloc.
2105 (handle_v_cont): Check result of malloc, report error back to
2107 (handle_v_run): Ditto. Call freeargv.
2108 * server.h (freeargv): Declare.
2109 * utils.c (freeargv): New fn.
2111 2009-01-15 Doug Evans <dje@google.com>
2113 * gdbreplay.c (perror_with_name): Make arg const char *.
2114 * server.h (target_signal_to_name): Make return type const char *.
2115 * thread-db.c (thread_db_err_str): Make return type const char *.
2116 * utils.c (perror_with_name): Make arg const char *.
2118 2009-01-14 Pedro Alves <pedro@codesourcery.com>
2120 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
2121 when handling a EXIT_PROCESS_DEBUG_EVENT.
2123 2009-01-06 Joel Brobecker <brobecker@adacore.com>
2125 * gdbreplay.c (gdbreplay_version): Update copyright year.
2126 * server.c (gdbserver_version): Likewise.
2128 2009-01-05 Doug Evans <dje@google.com>
2130 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
2131 (handle_extended_wait): Improve comment.
2133 2008-12-13 Doug Evans <dje@google.com>
2135 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
2136 * server.h (ATTR_MALLOC): New macro.
2137 (xmalloc,xcalloc,xstrdup): Declare.
2138 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
2139 * inferiors.c: Ditto.
2140 * linux-low.c: Ditto.
2141 * mem-break.c: Ditto.
2142 * regcache.c: Ditto.
2143 * remote-utils.c: Ditto.
2146 * win32-low.c: Ditto.
2148 2008-12-12 Doug Evans <dje@google.com>
2150 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
2151 in debugging printf.
2153 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
2155 2008-12-09 Doug Evans <dje@google.com>
2157 * linux-low.h (struct process_info): Delete member tid, unused.
2158 * thread-db.c (find_one_thread): Update.
2159 (maybe_attach_thread): Update.
2161 2008-12-02 Pedro Alves <pedro@codesourcery.com>
2163 * target.h (struct target_ops): Add qxfer_osdata member.
2164 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
2166 (linux_qxfer_osdata): New functions.
2167 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2169 * server.c (handle_query): Handle "qXfer:osdata:read:".
2170 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2171 (buffer_xml_printf): New functions.
2172 * server.h (struct buffer): New.
2173 (buffer_grow_str, buffer_grow_str0): New macros.
2174 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2175 (buffer_xml_printf): Declare.
2177 2008-11-24 Doug Evans <dje@google.com>
2179 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2181 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2183 * server.c (handle_v_run): Always use the supplied argument list.
2185 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2187 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2188 (xtensa_regmap_table): Add entry for scompare1.
2190 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2192 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2193 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2194 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2195 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2196 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2197 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2198 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2199 XML target descriptions.
2200 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2201 when inferior is running on an ISA 2.05 or later processor. Add
2202 special case to return offset for full 64-bit slot of FPSCR when
2205 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2207 * Makefile.in (SFILES, clean): Added sparc64 files.
2208 (reg-sparc64.o, reg-sparc64.c): New.
2209 * configure.srv (sparc*-*-linux*): New configuration.
2210 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2211 syscall arguments for SPARC.
2212 (regsets_store_inferior_registers): Likewise.
2213 * linux-sparc-low.c: New file.
2215 2008-10-21 Doug Evans <dje@google.com>
2217 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2218 (READLINE_DIR,READLINE_DEP): Delete.
2219 (INTERNAL_CFLAGS): Update.
2220 (LINTFLAGS): Update.
2222 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2224 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2225 whole argv from the last run, not just argv[0].
2227 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2229 * regcache.c (new_register_cache): Return NULL if the register
2230 cache size isn't known yet.
2231 (free_register_cache): Avoid dereferencing a NULL regcache.
2233 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2235 * configure.srv: Merge MIPS and MIPS64.
2237 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2239 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2241 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2243 * Makefile.in: Add required vsx dependencies.
2245 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2246 Declare init_registers_powerpc_vsx32l.
2247 Declare init_registers_powerpc_vsx64l.
2248 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2249 (ppc_arch_setup): Check for VSX in hwcap.
2250 (ppc_fill_vsxregset): New function.
2251 (ppc_store_vsxregset): New function.
2252 Add new VSX entry in regset_info target_regsets.
2254 * configure.srv: Add new VSX dependencies.
2256 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2258 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2259 (remote_open): Set or clear transport_is_reliable.
2260 (putpkt_binary): Don't expect acks in noack mode.
2261 (getpkt): Don't send ack/nac in noack mode.
2262 * server.c (handle_general_set): Handle QStartNoAckMode.
2263 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2265 (main): Reset noack_mode on every connection.
2266 * server.h (noack_mode): Declare.
2268 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2270 * Makefile.in (GDBREPLAY_OBS): New variable.
2271 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2273 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2274 Daniel Jacobowitz <dan@codesourcery.com>
2276 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2277 (usr_store_inferior_registers): Likewise.
2278 (regsets_store_inferior_registers): Likewise.
2280 2008-07-31 Rolf Jansen <rj@surtec.com>
2281 Pedro Alves <pedro@codesourcery.com>
2283 * configure.ac: Check for memmem declaration.
2284 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2285 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2286 (disable_packet_qfThreadInfo): Unconditionally compile.
2287 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2288 * configure, config.in: Regenerate.
2290 2008-07-28 Doug Kwan <dougkwan@google.com>
2292 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2293 (linux_write_memory): Remove declaration of errno.
2295 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2297 * linux-low.c (handle_extended_wait): Do not use "status"
2298 variable uninitialized.
2300 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2302 * server.c (handle_v_attach): Inhibit reporting dll changes.
2304 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2306 * remote-utils.c (prepare_resume_reply): If requested, don't
2307 output "thread:TID" in the T stop reply.
2309 * server.c (disable_packet_vCont, disable_packet_Tthread)
2310 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2311 (handle_query): If requested, disable support for qC, qfThreadInfo
2313 (handle_v_requests): If requested, disable support for vCont.
2314 (gdbserver_show_disableable): New.
2315 (main): Handle --disable-packet and --disable-packet=LIST.
2317 * server.h (disable_packet_vCont, disable_packet_Tthread)
2318 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2320 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2322 * server.c (gdbserver_usage): Mention --version.
2324 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2326 * Makefile.in (gdbreplay.o): New rule.
2328 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2330 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2331 message, not gdbserver.
2333 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2334 Nathan Sidwell <nathan@codesourcery.com>
2335 Joseph Myers <joseph@codesourcery.com>
2337 * acinclude.m4: Include ../../config/acx.m4.
2338 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2339 * configure, config.in: Regenerate.
2340 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2341 * server.c (gdbserver_version): Print PKGVERSION.
2342 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2343 (main): Adjust gdbserver_usage calls.
2344 * gdbreplay.c (version, host_name): Add declarations.
2345 (gdbreplay_version, gdbreplay_usage): New.
2346 (main): Accept --version and --help options.
2348 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2350 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2351 (arm_breakpoint_at): Handle Thumb.
2352 (the_low_target): Add comment.
2354 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2356 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2358 2008-05-09 Doug Evans <dje@google.com>
2360 * server.h (decode_search_memory_packet): Declare.
2361 * remote-utils.c (decode_search_memory_packet): New fn.
2362 * server.c (handle_search_memory_1): New fn.
2363 (handle_search_memory): New fn.
2364 (handle_query): Process qSearch:memory packets.
2366 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2368 * regcache.c (registers_length): Remove.
2369 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2370 full register packet.
2371 * regcache.h (registers_length): Remove prototype.
2372 * server.h (PBUFSIZ): Define to 16384.
2374 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2376 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2377 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2378 powerpc-64l.o, and powerpc-altivec64l.o.
2379 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2380 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2381 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2382 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2383 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2386 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2387 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2388 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2389 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2390 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2391 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2392 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2393 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2394 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2395 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2398 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2399 (init_registers_powerpc_32l): ... this new prototype.
2400 (init_registers_powerpc_32): Remove, replace by ...
2401 (init_registers_powerpc_altivec32l): ... this new prototype.
2402 (init_registers_powerpc_e500): Remove, replace by ...
2403 (init_registers_powerpc_e500l): ... this new prototype.
2404 (init_registers_ppc64): Remove, replace by ...
2405 (init_registers_powerpc_64l): ... this new prototype.
2406 (init_registers_powerpc_64): Remove, replace by ...
2407 (init_registers_powerpc_altivec64l): ... this new prototype.
2408 (ppc_num_regs): Set to 73.
2409 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2410 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2411 (ppc_cannot_store_register): Handle orig_r3 and trap.
2412 (ppc_arch_setup): Update init_registers_... calls.
2413 (ppc_fill_gregset): Handle orig_r3 and trap.
2415 * inferiors.c (clear_inferiors): Reset current_inferior.
2417 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2419 * acinclude.m4: Add override.m4.
2420 * configure: Regenerate.
2422 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2424 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2425 initial call to init_register_ppc64.
2427 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2429 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2430 powerpc*-*-linux* case.
2431 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2433 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2435 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2436 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2438 * linux-ppc-low.c: Include <elf.h>.
2439 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2440 (ppc_hwcap): New global variable.
2441 (ppc_regmap): Remove __SPE__ #ifdef sections.
2442 (ppc_regmap_e500): New global variable.
2443 (ppc_cannot_store_register): Update __SPE__ special case.
2444 (ppc_get_hwcap): New function.
2445 (ppc_arch_setup): Use it to determine whether inferior supports
2446 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2447 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2448 Do not access registers if target does not support AltiVec.
2449 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2450 Do not access registers if target does not support SPE.
2451 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2453 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2455 * linux-low.c (disabled_regsets, num_regsets): New.
2456 (use_regsets_p): Delete.
2457 (linux_wait_for_process): Clear disabled_regsets.
2458 (regsets_fetch_inferior_registers): Check and set it.
2459 (regsets_store_inferior_registers): Likewise.
2460 (linux_fetch_registers, linux_store_registers): Do not use
2462 (initialize_low): Allocate disabled_regsets.
2464 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2466 * Makefile.in (LIBOBJS): New.
2468 (memmem.o): New rule.
2469 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2470 * configure: Regenerated.
2472 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2474 * server.c (handle_query): Never return "unsupported" for
2475 qXfer:features:read queries.
2477 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2479 * server.c (get_features_xml): Fix inverted condition.
2480 (handle_query): Always support qXfer:feature:read.
2482 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2484 * server.c (wrapper_argv): New.
2485 (start_inferior): Handle wrapper_argv. If set, expect an extra
2487 (gdbserver_usage): Document --wrapper.
2488 (main): Parse --wrapper.
2490 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2492 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2493 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2494 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2495 (ppc_set_pc): Likewise.
2496 (ppc_arch_setup): New function.
2497 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2498 of collect_register.
2499 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2501 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2503 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2504 instead of linux-ppc64-low.o.
2505 * linux-ppc64-low.c: Remove file.
2506 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2507 (linux-ppc64-low.o): Remove rule.
2509 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2510 (init_registers_powerpc_64): Likewise.
2511 (ppc_regmap): Conditionally define depending on __powerpc64__.
2512 (ppc_cannot_store_register): Do not special-case "fpscr" when
2513 compiled on __powerpc64__.
2514 (ppc_collect_ptrace_register): New function.
2515 (ppc_supply_ptrace_register): New function.
2516 (ppc_breakpoint): Change type to "unsigned int".
2517 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2518 (the_low_target): Conditionally provide initializers for the
2519 arch_setup member depending on __powerpc64__. Install
2520 collect_ptrace_register and supply_ptrace_register members.
2522 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2524 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2525 * server.c (gdbserver_xmltarget): Define.
2526 (get_features_xml): Use it to replace "target.xml" and arch_string.
2528 * configure.srv: Remove srv_xmltarget. Add XML files that were
2529 mentioned there to srv_xmlfiles instead. Remove conditional tests
2530 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2531 srv_xmlfiles and srv_regobj to include all possible choices.
2532 * configure.ac (srv_xmltarget): Remove.
2533 (srv_xmlfiles): Do not add "target.xml".
2534 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2535 checks for supplementary target information.
2536 * configure: Regenerate.
2537 * Makefile.in (XML_TARGET): Remove.
2538 (target.xml): Remove rule.
2539 (clean): Do not clean up target.xml.
2540 (.PRECIOUS): Do not mention target.xml.
2542 * target.h (struct target_ops): Remove arch_string member.
2543 * linux-low.c (linux_arch_string): Remove.
2544 (linux_target_ops): Remove arch_string initializer.
2545 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2546 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2547 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2548 * spu-low.c (spu_arch_string): Remove.
2549 (spu_target_ops): Remove arch_string initializer.
2550 * win32-low.c (win32_arch_string): Remove.
2551 (win32_target_ops): Remove arch_string initializer.
2552 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2553 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2554 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2556 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2558 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2559 by collect_ptrace_register and supply_ptrace_register hooks.
2560 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2561 instead of checking for the_low_target.left_pad_xfer.
2562 (usr_store_inferior_registers): Use collect_ptrace_register callback
2563 instead of checking for the_low_target.left_pad_xfer.
2565 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2566 (s390_supply_ptrace_register): Likewise.
2567 (s390_fill_gregset): Call s390_collect_ptrace_register.
2568 (the_low_target): Update.
2570 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2571 (ppc_supply_ptrace_register): Likewise.
2572 (the_low_target): Update.
2574 * linux-i386-low.c (the_low_target): Update.
2575 * linux-x86-64-low.c (the_low_target): Update.
2577 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2579 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2580 reg-s390.o and reg-s390x.o.
2582 * linux-low.c (new_inferior): New global variable.
2583 (linux_create_inferior, linux_attach): Set it.
2584 (linux_wait_for_process): Call the_low_target.arch_setup after the
2585 target has stopped for the first time.
2586 (initialize_low): Do not call the_low_target.arch_setup.
2588 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2589 (s390_set_pc): Likewise.
2590 (s390_arch_setup): New function.
2591 (the_low_target): Use s390_arch_setup as arch_setup routine.
2593 * regcache.c (realloc_register_cache): New function.
2594 (set_register_cache): Call it for each existing regcache.
2596 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2598 * server.h (init_registers): Remove prototype.
2600 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2601 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2602 instead of init_registers ().
2603 * linux-arm-low.c (init_registers_arm): Add prototype.
2604 (init_registers_arm_with_iwmmxt): Likewise.
2605 (the_low_target): Add initializer for arch_setup field.
2606 * linux-cris-low.c (init_registers_cris): Add prototype.
2607 (the_low_target): Add initializer for arch_setup field.
2608 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2609 (the_low_target): Add initializer for arch_setup field.
2610 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2611 (the_low_target): Add initializer for arch_setup field.
2612 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2613 (the_low_target): Add initializer for arch_setup field.
2614 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2615 (the_low_target): Add initializer for arch_setup field.
2616 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2617 (the_low_target): Add initializer for arch_setup field.
2618 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2619 (init_registers_mips64_linux): Likewise.
2620 (the_low_target): Add initializer for arch_setup field.
2621 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2622 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2623 (the_low_target): Add initializer for arch_setup field.
2624 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2625 (init_registers_powerpc_64): Likewise.
2626 (the_low_target): Add initializer for arch_setup field.
2627 * linux-s390-low.c (init_registers_s390): Add prototype.
2628 (init_registers_s390x): Likewise.
2629 (the_low_target): Add initializer for arch_setup field.
2630 * linux-sh-low.c (init_registers_sh): Add prototype.
2631 (the_low_target): Add initializer for arch_setup field.
2632 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2633 (the_low_target): Add initializer for arch_setup field.
2634 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2635 (the_low_target): Add initializer for arch_setup field.
2637 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2638 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2639 instead of init_registers ().
2640 * win32-arm-low.c (init_registers_arm): Add prototype.
2641 (the_low_target): Add initializer for arch_setup field.
2642 * win32-i386-low.c (init_registers_i386): Add prototype.
2643 (the_low_target): Add initializer for arch_setup field.
2645 * spu-low.c (init_registers_spu): Add prototype.
2646 (initialize_low): Call initialie_registers_spu () instead of
2647 initialize_registers ().
2649 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2651 * server.c (handle_v_requests): When handling the vRun and vAttach
2652 packets, if already debugging a process, don't kill it. Return an
2655 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2657 * server.c (handle_query): Correct length check.
2659 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2661 * win32-low.c (do_initial_child_stuff): Add process handle
2662 parameter. Set current_process_handle and current_process_id from the
2663 parameters. Clear globals.
2664 (win32_create_inferior): Don't set current_process_handle and
2665 current_process_id here. Instead pass them on the call to
2666 do_initial_child_stuff.
2667 (win32_attach): Likewise.
2668 (win32_clear_inferiors): New.
2669 (win32_kill): Don't close the current process handle or the
2670 current thread handle here. Instead call win32_clear_inferiors.
2671 (win32_detach): Don't open a new handle to the process. Call
2672 win32_clear_inferiors.
2673 (win32_join): Don't rely on current_process_handle; open a new
2674 handle using the process id.
2675 (win32_wait): Call win32_clear_inferiors when the inferior process
2678 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2680 * server.c (monitor_show_help): Add "exit".
2682 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2684 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2685 (clean): Add reg-xtensa.c.
2686 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2687 * configure.srv (xtensa*-*-linux*) New target.
2688 * linux-xtensa-low.c: New.
2689 * xtensa-xtregs.c: New.
2691 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2693 * hostio.c: Don't include errno.h.
2694 (errno_to_fileio_errno): Move to hostio-errno.
2695 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2696 error number outputting to the target->hostio_last_error callback.
2697 (hostio_packet_error): Use FILEIO_EINVAL directly.
2698 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2699 calls to hostio_error.
2700 * hostio-errno.c: New.
2701 * server.h (hostio_last_error_from_errno): Declare.
2702 * target.h (target_ops): Add hostio_last_error member.
2703 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2704 as hostio_last_error handler.
2705 * spu-low.c (spu_target_ops): Likewise.
2706 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2707 (wince_hostio_last_error): New functions.
2708 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2709 as hostio_last_error handler.
2710 (win32_target_ops) [!_WIN32_WCE]: Register
2711 hostio_last_error_from_errno as hostio_last_error handler.
2712 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2713 (hostio-errno.o): New rule.
2714 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2715 * configure.srv (srv_hostio_err_objs): New variable. Default to
2717 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2718 * configure: Regenerate.
2720 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2722 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2723 (linux_kill, linux_detach): Clean up the process list.
2724 * remote-utils.c (remote_open): Improve port number parsing.
2725 (putpkt_binary, input_interrupt): Only send interrupts if the target
2727 * server.c (extended_protocol): Make static.
2728 (attached): Define earlier.
2729 (exit_requested, response_needed, program_argv): New variables.
2730 (target_running): New.
2731 (start_inferior): Clear attached here.
2732 (attach_inferior): Set attached here.
2733 (require_running): Define.
2734 (handle_query): Use require_running and target_running. Implement
2736 (handle_v_attach, handle_v_run): New.
2737 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2738 (gdbserver_usage): Update.
2739 (main): Redo argument parsing. Handle --debug and --multi. Handle
2740 --attach along with other options or after the port. Save
2741 program_argv. Support no initial program. Resynchronize
2742 communication with GDB after an error. Handle "monitor exit".
2743 Use require_running and target_running. Always allow the extended
2744 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2745 restart in extended mode.
2746 * README: Refer to the GDB manual. Update --attach usage.
2748 2007-12-20 Andreas Schwab <schwab@suse.de>
2750 * linux-low.c (STACK_SIZE): Define.
2751 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2752 (linux_test_for_tracefork): Likewise.
2754 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2756 * linux-low.c (linux_wait_for_event): Update messages. Do not
2757 reinsert auto-delete breakpoints.
2758 * mem-break.c (struct breakpoint): Change return type of handler to
2760 (set_breakpoint_at): Update handler type.
2761 (reinsert_breakpoint_handler): Return 1 instead of calling
2763 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2765 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2766 * mem-break.h (set_breakpoint_at): Update handler type.
2767 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2768 * win32-low.c (auto_delete_breakpoint): New.
2769 (get_child_debug_event): Use it.
2771 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2773 * configure.ac: Check for pread and pwrite.
2774 * hostio.c (handle_pread): Fall back to lseek and read.
2775 (handle_pwrite): Fall back to lseek and write.
2776 * config.in, configure: Regenerated.
2778 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2780 * server.c (myresume): Add own_buf argument.
2781 (main): Update calls.
2783 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2785 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2786 * remote-utils.c (remote_open): Do not call disable_async_io.
2787 (block_async_io): Delete.
2788 (unblock_async_io): Make static.
2789 (initialize_async_io): New.
2790 * server.c (handle_v_cont): Handle async I/O here.
2791 (myresume): Likewise. Move other common resume tasks here...
2792 (main): ... from here. Call initialize_async_io. Disable async
2793 I/O before the main loop.
2794 * server.h (initialize_async_io): Declare.
2795 (block_async_io, unblock_async_io): Delete prototypes.
2796 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2798 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2800 * remote-utils.c (readchar): Allow binary data in received messages.
2802 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2804 * win32-low.c (attaching): New global.
2805 (win32_create_inferior): Clear the `attaching' global.
2806 (win32_attach): Set the `attaching' global.
2807 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2808 attaching. Only set a breakpoint at the entry point if not
2811 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2813 * server.c (main): Don't report dll events on the initial
2814 connection on attaches.
2816 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2818 * server.c (main): Relax numerical bases supported for the pid of
2819 the --attach command line argument.
2821 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2823 * win32-low.c (win32_attach): Call OpenProcess before
2824 DebugActiveProcess, not after. Add last error output to error
2827 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2829 * win32-low.c (win32_get_thread_context)
2830 (win32_set_thread_context): New functions.
2831 (thread_rec): Use win32_get_thread_context.
2832 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2833 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2836 2007-12-03 Leo Zayas
2837 Pedro Alves <pedro_alves@portugalmail.pt>
2839 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2841 (child_add_thread): Minor cleanup.
2842 (child_continue): Resume artificially suspended threads before
2843 calling ContinueDebugEvent.
2844 (suspend_one_thread): New.
2845 (fake_breakpoint_event): New.
2846 (get_child_debug_event): Change return type to int. Check here if
2847 gdb sent an interrupt request. If a soft interrupt was requested,
2848 fake a breakpoint event. Return 0 if there is no event to handle,
2850 (win32_wait): Don't check here if gdb sent an interrupt request.
2851 Ensure there is a valid event to handle.
2852 (win32_request_interrupt): Add soft interruption method as last
2855 2007-12-03 Leo Zayas
2856 Pedro Alves <pedro_alves@portugalmail.pt>
2858 * win32-low.h (win32_thread_info): Add descriptions to the
2859 structure members. Replace `suspend_count' counter by a
2861 * win32-low.c (thread_rec): Update condition of when to get the
2862 context from the inferior. Rely on ContextFlags being set if it
2863 has already been retrieved. Only suspend the inferior thread if
2864 we haven't already. Warn if that fails.
2865 (continue_one_thread): s/suspend_count/suspended/. Only call
2866 ResumeThread once. Warn if that fails.
2868 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2870 * win32-low.c (win32_wait): Don't read from the inferior when it
2873 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2875 * Makefile.in (win32_low_h): New variable.
2876 (win32-low.o): Add dependency on $(win32_low_h).
2877 (win32-arm-low.o, win32-i386-low.o): New rules.
2879 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2881 * hostio.c: Correct copyright year.
2883 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2885 * Makefile.in (OBS): Add hostio.o.
2886 (hostio.o): New rule.
2887 * server.h (handle_vFile): Declare.
2888 * hostio.c: New file.
2889 * server.c (handle_v_requests): Take packet_len and new_packet_len
2890 for binary packets. Call handle_vFile.
2891 (main): Update call to handle_v_requests.
2893 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2895 * linux-low.c: Include <sched.h>.
2897 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2899 * linux-low.c (linux_tracefork_grandchild): New.
2900 (linux_tracefork_child): Use clone.
2901 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2903 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2905 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2907 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2909 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2911 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2913 * inferiors.c (change_inferior_id): Delete.
2914 (add_pid_to_list, pull_pid_from_list): New.
2915 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2916 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2917 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2918 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2919 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2920 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2921 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2922 (using_threads): Always set to 1.
2923 (handle_extended_wait): New.
2924 (add_process): Do not set TID.
2925 (linux_create_inferior): Set must_set_ptrace_flags.
2926 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2927 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2928 (linux_thread_alive): Rename TID argument to LWPID.
2929 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2930 (linux_wait_for_event): Do not use TID or check using_threads. Update
2931 call to dead_thread_notify. Call handle_extended_wait.
2932 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2933 (send_sigstop): Delete sigstop_sent.
2934 (wait_for_sigstop): Avoid TID.
2935 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2936 (linux_test_for_tracefork): New.
2937 (linux_lookup_signals): Use thread_db_active and
2938 linux_supports_tracefork_flag.
2939 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2940 * linux-low.h (get_process_thread): Avoid TID.
2941 (struct process_ifo): Move thread_known and tid to the end. Remove
2943 (linux_attach_lwp, thread_db_init): Update prototypes.
2944 * server.h (change_inferior_id): Delete prototype.
2945 (add_pid_to_list, pull_pid_from_list): New prototypes.
2946 * thread-db.c (thread_db_use_events): New.
2947 (find_first_thread): Rename to...
2948 (find_one_thread): ...this. Update callers and messages. Do not
2949 call fatal. Check thread_db_use_events. Do not call
2950 change_inferior_id or new_thread_notify.
2951 (maybe_attach_thread): Update. Do not call new_thread_notify.
2952 (thread_db_init): Set thread_db_use_events. Check use_events.
2953 * utils.c (fatal, warning): Correct message prefix.
2955 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2957 * Makefile.in (clean): Remove new files.
2958 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2959 (powerpc-64.o, powerpc-64.c): New rules.
2960 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2961 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2963 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2965 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2966 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2967 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2968 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2969 (target_regsets): Add AltiVec and SPE register sets.
2970 * configure.ac: Check for AltiVec and SPE.
2971 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2972 (ppc_fill_vrregset, ppc_store_vrregset): New.
2973 (target_regsets): Add AltiVec register set.
2974 * configure: Regenerated.
2976 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2978 * linux-low.c (O_LARGEFILE): Define.
2979 (linux_read_memory): Use /proc/PID/mem.
2980 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2981 * configure, config.in: Regenerated.
2983 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2985 * linux-low.c (linux_wait_for_event): Do not pass signals while
2988 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2990 * win32-low.c (create_process): New.
2991 (win32_create_inferior): Use create_process instead of
2992 CreateProcess. If create_process failed retry appending an ".exe"
2993 suffix. Store the GetLastError result immediatelly after
2994 create_process calls and use it on the call to error.
2996 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2998 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
3000 2007-08-23 Joel Brobecker <brobecker@adacore.com>
3002 * configure.ac: Switch license to GPLv3.
3004 2007-08-01 Michael Snyder <msnyder@access-company.com>
3006 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
3008 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
3010 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
3012 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
3013 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
3014 CloseToolhelp32Snapshot.
3015 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
3016 CloseToolhelp32Snapshot.
3018 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
3020 * server.c (main): Check for inferior exit before main loop.
3022 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
3024 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
3025 instead of on tmp_desc.
3027 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
3028 Daniel Jacobowitz <dan@codesourcery.com>
3030 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
3031 (add_thread): Minor cleanups.
3032 (clear_inferiors): Move lower in the file. Clear the DLL
3034 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
3035 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
3036 (xml_escape_text): New.
3037 * server.c (handle_query): Handle qXfer:libraries:read. Report it
3039 (handle_v_cont): Report errors.
3040 (gdbserver_version): Update.
3041 (main): Correct size of own_buf. Do not report initial DLL events.
3042 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
3043 (unloaded_dll, xml_escape_text): New.
3044 * win32-low.c (enum target_waitkind): Update comments.
3045 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
3046 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
3047 (win32_EnumProcessModules, win32_GetModuleInformation)
3048 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
3049 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
3050 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
3051 (win32_Module32First, win32_Module32Next, load_toolhelp)
3052 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
3053 (get_child_debug_event): Handle DLL events.
3054 (win32_wait): Likewise.
3056 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3058 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
3059 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
3061 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3063 * win32-low.c (handle_output_debug_string): Ignore event if not
3066 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
3068 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
3070 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
3072 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
3074 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
3076 * inferiors.c (change_inferior_id): Add comment.
3077 * linux-low.c (check_removed_breakpoint): Add an early
3078 prototype. Improve debug output.
3079 (linux_attach): Doc update.
3080 (linux_detach_one_process, linux_detach): Clean up before releasing
3082 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
3083 * linux-low.h (struct process_info): Doc improvement.
3084 * mem-break.c (delete_all_breakpoints): New.
3085 * mem-break.h (delete_all_breakpoints): New prototype.
3086 * thread-db.c (find_first_thread): New.
3087 (thread_db_create_event): Call it instead of
3088 thread_db_find_new_threads. Clean up unused variables.
3089 (maybe_attach_thread): Remove first thread handling.
3090 (thread_db_find_new_threads): Use find_first_thread.
3091 (thread_db_get_tls_address): Likewise.
3093 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3095 * thread-db.c (thread_db_find_new_threads): Add prototype.
3096 (thread_db_create_event): Check for the main thread before adding
3098 (maybe_attach_thread): Only enable event reporting if TID == 0.
3099 (thread_db_get_tls_address): Check for new threads.
3101 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
3103 * linux-low.c (linux_create_inferior): Try execv before execvp.
3104 * spu-low.c (spu_create_inferior): Likewise.
3106 2007-06-13 Mike Frysinger <vapier@gentoo.org>
3108 * linux-low.c (linux_create_inferior): Change execv to execvp.
3109 * spu-low.c (spu_create_inferior): Likewies.
3111 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
3113 * Makefile.in (clean): Clean new files instead of deleted ones.
3114 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
3115 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
3117 * configure.srv: Specify XML files and new regformats for MIPS and
3119 * linux-mips-low.c (mips_num_regs): Set to only used registers.
3120 (mips_regmap): Do not fetch $0. Remove unused registers. Add
3121 an entry for the restart register.
3122 (mips_cannot_fetch_register, mips_cannot_store_register)
3123 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
3124 register names to match the XML descriptions.
3125 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
3126 restart register instead of $0.
3128 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3129 Markus Deuling <deuling@de.ibm.com>
3131 * remote-utils.c (decode_xfer_write): New function.
3132 * server.h (decode_xfer_write): Add prototype.
3133 * server.c (handle_query): Add PACKET_LEN argument. Support
3134 qXfer:spu:read and qXfer:spu:write packets.
3135 (main): Pass packet_len to handle_query.
3136 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
3137 * target.h (target_ops): Add qxfer_spu.
3139 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
3141 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
3142 accessing non-seekable spufs files.
3144 2007-05-16 Markus Deuling <deuling@de.ibm.com>
3146 * server.c (handle_query): Add reply for qC packet.
3148 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3149 Leo Zayas <lerele@champenstudios@com>
3151 * server.h (check_remote_input_interrupt_request): New function.
3152 * remote_utils.c (INVALID_DESCRIPTOR): New define.
3153 (remote_desc): Initialize with INVALID_DESCRIPTOR.
3154 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
3155 (check_remote_input_interrupt_request): New function.
3156 * server.h (check_remote_input_interrupt_request): Declare.
3157 * win32-low.c (winapi_DebugBreakProcess,
3158 winapi_GenerateConsoleCtrlEvent): New typedefs.
3159 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
3161 (win32_wait): Check for remote interrupt request
3162 with check_remote_input_interrupt_request.
3163 (win32_request_interrupt): New function.
3164 (win32_target_op): Set request_interrupt to win32_request_interrupt.
3166 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3168 * win32-low.c (debug_registers_changed,
3169 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3170 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3171 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3172 (thread_rec): Get context using the low target.
3173 (child_add_thread): Call thread_added on the low target,
3174 which does the same thing.
3176 (do_initial_child_stuff): Remove debug registers references.
3177 Set context using the low target. Resume threads after
3178 setting the contexts.
3179 (child_continue): Remove dead variable. Remove debug
3180 registers references.
3181 (child_fetch_inferior_registers): Go through the low target.
3182 (do_child_store_inferior_registers): Remove.
3183 (child_store_inferior_registers): Go through the low target.
3184 (win32_resume): Remove debug registers references.
3185 Set context using the low target.
3186 (handle_exception): Change return type to void. Don't record
3187 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3188 first chance exception.
3189 (get_child_debug_event): Change return type to void. Remove
3190 goto loop. Always return after waiting for debug event.
3191 (win32_wait): Convert to switch statement. Handle spurious
3194 * win32-i386-low.c (debug_registers_changed,
3195 debug_registers_used): New.
3196 (initial_stuff): Rename to ...
3197 (i386_initial_stuff): ... this. Clear debug registers
3199 (store_debug_registers): Delete.
3200 (i386_get_thread_context): New.
3201 (load_debug_registers): Delete.
3202 (i386_set_thread_context): New.
3203 (i386_thread_added): New.
3204 (single_step): Rename to ...
3205 (i386_single_step): ... this.
3206 (do_fetch_inferior_registers): Rename to ...
3207 (i386_fetch_inferior_register): ... this.
3208 (i386_store_inferior_register): New.
3209 (the_low_target): Adapt to new interface.
3211 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3212 (arm_get_thread_context): New.
3213 (arm_set_thread_context): New.
3215 (do_fetch_inferior_registers): Rename to ...
3216 (arm_fetch_inferior_register): ... this.
3217 (arm_store_inferior_register): New.
3218 (arm_wince_breakpoint): Reimplement as unsigned long.
3219 (arm_wince_breakpoint_len): Define.
3220 (the_low_target): Adapt to new interface.
3222 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3223 load_debug_registers. Add get_thread_context, set_thread_context,
3224 thread_added and store_inferior_register. Rename
3225 fetch_inferior_registers to fetch_inferior_register.
3226 (regptr): Remove declaration.
3228 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3230 * linux-low.c (linux_detach): Change return type to int. Return 0.
3231 * spu-low.c (spu_detach): Likewise.
3233 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3235 * target.h (target_ops): Change return type of detach to int.
3237 (join_inferior): New.
3238 * server.c (main): Don't skip detach support on mingw32.
3239 If the inferior doesn't support detaching return error.
3240 Call join_inferior instead of using waitpid.
3241 * linux-low.c (linux_join): New.
3242 (linux_target_op): Add linux_join.
3243 * spu-low.c (spu_join): New.
3244 (spu_target_ops): Add spu_join.
3245 * win32-low.c (win32_detach): Adapt to new interface.
3246 Reopen current_process_handle before detaching. Issue a child
3247 resume before detaching.
3249 (win32_target_op): Add win32_join.
3251 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3253 * win32-low.c (win32-attach): Fix return value.
3254 * target.h (target_ops): Describe ATTACH return values.
3256 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3258 * win32-low.c (GETPROCADDRESS): Define.
3259 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3260 (winapi_DebugSetProcessKillOnExit): Likewise.
3261 (win32_create_inferior): Force usage of ansi CreateProcessA.
3262 (win32_attach): Use GETPROCADDRESS.
3263 (win32_detach): Likewise.
3265 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3267 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3269 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3271 * win32-low.c: Commit leftover changes from 2007-03-29.
3273 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3275 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3276 fields short instead of int. Add explicit padding.
3277 (i387_cache_to_fsave): Remove unnecessary casts.
3278 (i387_fsave_to_cache): Doc fix.
3279 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3281 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3283 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3284 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3286 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3288 * configure.srv (arm*-*-mingw32ce*): Move near the other
3291 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3293 * configure.ac: Add errno checking.
3294 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3295 sys/file.h and malloc.h.
3296 (AC_CHECK_DECLS): Add perror.
3297 (srv_mingwce): Handle.
3298 * configure.srv (i[34567]86-*-cygwin*): Add
3299 win32-i386-low.o to srv_tgtobj.
3300 (i[34567]86-*-mingw*): Likewise.
3301 (arm*-*-mingw32ce*): Add case.
3302 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3303 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3304 [__MINGW32CE__] (strerror): New function.
3305 [__MINGW32CE__] (errno): Define to GetLastError.
3306 [__MINGW32CE__] (COUNTOF): New macro.
3307 (remote_open): Remove extra close call.
3308 * mem-break.c (delete_breakpoint_at): New function.
3309 * mem-break.h (delete_breakpoint_at): Declare.
3310 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3311 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3312 [USE_WIN32API] (read, write): Add char* casts.
3313 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3314 * server.h: Include wincecompat.h on Windows CE.
3315 [HAVE_ERRNO_H]: Check.
3316 (perror): Declare if not declared.
3317 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3318 (perror_with_name): Remove errno declaration.
3319 * wincecompat.h: New.
3320 * wincecompat.c: New.
3322 * win32-arm-low.c: New.
3323 * win32-i386-low.c: New.
3324 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3325 (OUTMSG2): Make it safe.
3327 (COUNTOF): New macro.
3328 (NUM_REGS): Get it from the low target.
3329 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3330 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3331 (thread_rec): Let low target handle debug registers.
3332 (child_add_thread): Likewise.
3333 (child_init_thread_list): Likewise.
3334 (continue_one_thread): Likewise.
3336 (do_child_fetch_inferior_registers): Move to ...
3337 * win32-i386-low.c: ... here, and rename to ...
3338 (do_fetch_inferior_registers): ... this.
3339 * win32-low.c (child_fetch_inferior_registers):
3340 Go through the low target.
3341 (do_child_store_inferior_registers): Use regptr.
3342 (strwinerror): New function.
3343 (win32_create_inferior): Handle Windows CE.
3344 Use strwinerror instead of strerror on Windows error
3345 codes. Add program to the error output.
3346 Don't close the main thread handle on Windows CE.
3347 (win32_attach): Use coredll.dll on Windows CE.
3348 (win32_kill): Close current process and current
3350 (win32_detach): Use coredll.dll on Windows CE.
3351 (win32_resume): Let low target handle debug registers, and
3353 (handle_exception): Add/Remove initial breakpoint. Avoid
3354 non-existant WSTOPSIG on Windows CE.
3355 (win32_read_inferior_memory): Cast to remove warning.
3356 (win32_arch_string): Go through the low target.
3357 (initialize_low): Call set_breakpoint_data with the low
3358 target's breakpoint.
3359 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3360 FOP_REGNUM, mappings): Move to ...
3361 * win32-i386-low.c: ... here.
3362 * win32-low.c (win32_thread_info): Move to ...
3363 * win32-low.h: ... here.
3364 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3365 win32-arm-low.c and wincecompat.c.
3366 (all:): Add $EXEEXT.
3367 (install-only:): Likewise.
3368 (gdbserver:): Likewise.
3369 (gdbreplay:): Likewise.
3370 * config.in: Regenerate.
3371 * configure: Regenerate.
3373 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3375 * win32-low.c: Rename typedef thread_info to
3376 win32_thread_info throughout.
3378 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3380 * win32-i386-low.c: Rename to ...
3381 * win32-low.c: ... this.
3382 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3383 * Makefile.in: Likewise.
3385 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3387 * remote-utils.c (monitor_output): Constify msg parameter.
3388 * server.h (monitor_output): Likewise.
3389 * win32-i386-low.c (handle_output_debug_string): New.
3390 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3391 handle_output_debug_string.
3392 (get_child_debug_event): Likewise.
3394 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3396 * server.c (main): Correct strtoul check.
3398 2007-03-27 Jon Ringle <jon@ringle.org>
3400 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3402 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3404 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3406 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3408 * terminal.h: Check HAVE_SGTTY_H.
3410 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3412 * remote-utils.c (remote_open): Print out the assigned port number.
3414 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3416 * remote-utils.c (monitor_output): New function.
3417 * server.c (debug_threads): Define here.
3418 (monitor_show_help): New function.
3419 (handle_query): Handle qRcmd.
3420 (main): Do not handle 'd' packet.
3421 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3422 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3425 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3427 * Makefile.in (EXEEXT): New.
3428 (clean): Use $(EXEEXT).
3430 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3432 * target.h (target_ops): Rename send_signal to request_interrupt,
3433 and remove enum target_signal parameter.
3434 * linux-low.c (linux_request_interrupt): Rename from
3435 linux_send_signal, and always send SIGINT.
3436 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3437 and always send SIGINT.
3438 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3440 (input_interrupt): Likewise.
3442 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3444 * server.c (get_features_xml): Check if target implemented
3446 * win32-i386-low.c (win32_arch_string): New.
3447 (win32_target_ops): Add win32_arch_string as arch_string member.
3449 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3451 * spu-low.c (spu_arch_string): New.
3452 (spu_target_ops): Add spu_arch_string.
3454 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3456 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3457 * configure.ac: Do not check for terminal.h.
3458 * configure, config.in: Regenerated.
3460 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3462 * Makefile.in (OBS): Add $(XML_BUILTIN).
3463 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3465 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3466 (arm-with-iwmmxt.c): New.
3467 * config.in, configure: Regenerate.
3468 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3469 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3470 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3471 (arm*-*-linux*): Add iWMMXt and regset support.
3472 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3473 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3474 (arm_store_wmmxregset, target_regsets): New.
3475 * server.c (get_features_xml): Take annex argument. Check builtin
3477 (handle_query): Handle multiple annexes.
3479 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3481 * remote-utils.c [USE_WIN32API] (read, write): Define.
3482 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3485 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3487 * linux-i386-low.c (the_low_target): Set arch_string.
3488 * linux-x86-64-low.c (the_low_target): Likewise.
3489 * linux-low.c (linux_arch_string): New.
3490 (linux_target_ops): Add it.
3491 * linux-low.h (struct linux_target_ops): Add arch_string.
3492 * server.c (write_qxfer_response): Use const void * for DATA.
3493 (get_features_xml): New.
3494 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3495 * target.h (struct target_ops): Add arch_string method.
3497 2007-01-03 Denis Pilat <denis.pilat@st.com>
3498 Daniel Jacobowitz <dan@codesourcery.com>
3500 * linux-low.c (linux_kill): Handle being called with no threads.
3501 * win32-i386-low.c (win32_kill): Likewise.
3502 (get_child_debug_event): Clear current_process_handle.
3504 2006-12-30 Denis PILAT <denis.pilat@st.com>
3505 Daniel Jacobowitz <dan@codesourcery.com>
3507 * remote-utils.c (remote_open): Check the type of specified
3508 serial port devices before opening them.
3509 * server.c (main): Kill the inferior if an error occurs during
3510 the first remote_open.
3512 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3514 * README: Update supported targets.
3516 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3518 * Makefile.in (clean): Remove reg-mips64.c.
3519 (reg-mips64.c, reg-mips64.o): New rules.
3520 * configure.srv: Handle mips64. Include regset support for mips.
3521 * linux-mips-low.c (union mips_register): New.
3522 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3523 (mips_breakpoint, mips_breakpoint_at): Use int.
3524 (mips_collect_register, mips_supply_register)
3525 (mips_collect_register_32bit, mips_supply_register_32bit)
3526 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3527 (mips_store_fpregset, target_regsets): New.
3528 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3530 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3532 * configure.srv: Add target "spu*-*-*".
3533 * Makefile.in (clean): Remove reg-spu.c.
3534 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3535 * spu-low.c: New file.
3537 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3539 * configure.ac: Correct td_thr_tls_get_addr test.
3540 * configure: Regenerated.
3542 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3544 * linux-low.c (linux_wait_for_event): Reformat. Use the
3546 * remote-utils.c (decode_address_to_semicolon): New.
3547 * server.c (pass_signals, handle_general_set): New.
3548 (handle_query): Mention QPassSignals for qSupported.
3549 (main): Call handle_general_set.
3550 * server.h (pass_signals, decode_address_to_semicolon): New.
3552 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3554 * server.c (handle_query): Correct error handling for read_auxv.
3556 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3558 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3559 and srv_linux_thread_db to yes.
3560 * linux-s390-low.c (s390_fill_gregset): New function.
3561 (target_regsets): Define data structure.
3563 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3565 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3566 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3567 * config.in, configure: Regenerated.
3568 * inferiors.c (gdb_id_to_thread): New function.
3569 (gdb_id_to_thread_id): Use it.
3570 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3571 * linux-low.h (struct process_info): Add th member.
3572 (thread_db_get_tls_address): New prototype.
3573 * remote-utils.c (decode_address): Make non-static.
3574 * server.c (handle_query): Handle qGetTLSAddr.
3575 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3576 * target.h (struct target_ops): Add get_tls_address.
3577 * thread-db.c (maybe_attach_thread): Save the thread handle.
3578 (thread_db_get_tls_address): New.
3580 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3582 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3583 (linux_resume_one_process): Take a siginfo_t *. Update all
3584 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3585 (struct pending_signals): Add a siginfo_t.
3586 (linux_wait_for_process): Always set last_status.
3587 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3588 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3589 * linux-low.h (struct process_info): Add last_status.
3591 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3593 * remote-utils.c (try_rle): New function.
3594 (putpkt_binary): Use it.
3596 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3598 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3599 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3600 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3601 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3602 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3605 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3607 * server.c (terminal_fd): New variable.
3608 (old_foreground_pgrp): Likewise.
3609 (restore_old_foreground_pgrp): New function.
3610 (start_inferior): Record the terminal file descriptor in terminal_fd
3611 and its original foreground group in old_foreground_pgrp. Register
3612 restore_old_foreground_pgrp with atexit().
3614 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3616 * server.c (handle_query): Correct qPart to qXfer.
3618 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3620 * configure.ac: Check for more headers which are missing on
3621 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3622 * configure.srv: Add Cygwin and mingw32.
3623 * remote-utils.c: Don't include headers unconditionally which
3624 are missing on mingw32. Include <winsock.h> for mingw32.
3625 (remote_open): Adjust for mingw32 support. Flush
3626 standard error after writing to it.
3627 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3628 (unblock_async_io, enable_async_io, disable_async_io)
3629 (readchar, getpkt): Update for Winsock support.
3630 (prepare_resume_reply): Expect a protocol signal number.
3631 * server.c: Disable <sys/wait.h> on mingw32.
3632 (start_inferior): Adjust for mingw32 support. Flush
3633 standard error after writing to it.
3634 (attach_inferior): Likewise. Use protocol signal
3636 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3638 * win32-i386-low.c: New file.
3639 * Makefile.in (XM_CLIBS): Set.
3640 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3641 (win32-i386-low.o): New dependency rule.
3642 * linux-low.c (linux_wait): Use target signal numbers.
3643 * target.h (struct target_ops): Doc fix.
3644 * server.h (target_signal_to_name): New prototype.
3645 * gdbreplay.c: Don't include headers unconditionally which
3646 are missing on mingw32. Include <winsock.h> for mingw32.
3647 (remote_close, remote_open): Adjust for Winsock support.
3648 * configure, config.in: Regenerated.
3650 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3652 * server.c (decode_xfer_read, write_qxfer_response): New.
3653 (handle_query): Take a packet length argument. Handle
3654 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3655 the qSupported response.
3656 (main): Update call to handle_query.
3658 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3660 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3661 (putpkt_binary): Renamed from putpkt and adjusted for binary
3663 (putpkt): New wrapper for putpkt_binary.
3664 (readchar): Don't mask off the high bit.
3665 (decode_X_packet): New function.
3666 * server.c (main): Call putpkt_binary if a handler sets the packet
3667 length. Save the length of the incoming packet. Handle 'X'.
3668 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3670 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3672 * server.c (handle_query): Handle qSupported.
3674 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3676 * remote-utils.c (all_symbols_looked_up): New variable.
3677 (look_up_one_symbol): Check it.
3678 * server.h (look_up_one_symbol): New declaration.
3679 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3681 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3683 * Makefile.in (linux-arm-low.o): Update dependencies.
3684 * linux-arm-low.c: Include "gdb_proc_service.h".
3685 (PTRACE_GET_THREAD_AREA): Define.
3686 (ps_get_thread_area): New function.
3688 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3690 * configure.srv (m68k*-*-uclinux*): New target.
3691 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3692 (linux_resume_one_process): Remove extraneous cast.
3693 (linux_read_offsets): New.
3694 (linux_target_op): Add linux_read_offsets on mmuless systems.
3695 * server.c (handle_query): Add qOffsets logic.
3696 * target.h (struct target_ops): Add read_offsets.
3698 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3700 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3701 (PTRACE_GET_THREAD_AREA): Define.
3702 (ps_get_thread_area): New function.
3703 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3704 (linux-x86-64-low.o): Update.
3706 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3708 * configure.ac: Remove checks for prfpregset_t.
3709 * gdb_proc_service.h: New file.
3710 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3711 new "gdb_proc_service.h".
3712 * proc-service.c: Likewise.
3713 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3714 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3715 * Makefile.in (gdb_proc_service_h): Updated.
3716 * configure, config.in: Regenerated.
3718 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3720 * remote-utils.c (prepare_resume_reply): Move declaration
3721 of gdb_id_from_wait to the top of the block.
3723 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3725 * linux-low.c (regsets_store_inferior_registers): Read the regset
3726 from the target before filling it.
3728 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3730 * server.c (attach_inferior): Return SIGTRAP for a successful
3733 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3735 * Makefile.in (OBS): Add version.o.
3736 (STAGESTUFF): Delete.
3737 (version.o): Add dependencies.
3738 (version.c): Replace rule.
3739 (clean): Remove version.c.
3740 * server.c (gdbserver_version): New.
3741 (gdbserver_usage): Use printf.
3742 (main): Handle --version and --help.
3743 * server.h (version, host_name): Add declarations.
3745 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3757 * linux-x86-64-low.c:
3760 * linux-ppc64-low.c:
3769 * linux-crisv32-low.c:
3781 * gdbserver.1: Add (C) after Copyright. Update the FSF
3784 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3786 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3787 (arm_breakpoint_at): Recognize both breakpoints.
3788 (the_low_target): Use the correct breakpoint instruction.
3790 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3792 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3793 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3794 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3795 (the_low_target): Update.
3797 2005-10-25 Andreas Schwab <schwab@suse.de>
3799 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3801 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3802 (ia64_num_regs): Reduce to 462.
3804 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3806 * acinclude.m4: Correct quoting.
3807 * aclocal.m4: Regenerated.
3809 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3810 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3811 (thread_db_init): Call thread_db_err_str.
3812 * configure.ac: Check for TD_VERSION.
3813 * config.in, configure: Regenerated.
3815 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3817 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3819 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3821 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3822 is not available. Define HAVE_PTRACE_GETREGS if it is.
3823 * config.in, configure: Regenerated.
3824 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3825 * linux-i386-low.c, linux-m68k-low.c: Update to use
3826 HAVE_PTRACE_GETREGS.
3827 * linux-low.c (regsets_fetch_inferior_registers)
3828 (regsets_store_inferior_registers): Only return 0 if we processed
3830 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3831 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3833 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3835 * inferiors.c (struct thread_info): Add gdb_id.
3836 (add_thread): Add gdb_id argument.
3837 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3838 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3839 calls to add_thread.
3840 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3841 * server.c (handle_query): Use thread_to_gdb_id.
3842 (handle_v_cont, main): Use gdb_id_to_thread_id.
3843 * server.h (add_thread): Update prototype.
3844 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3847 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3849 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3850 left-padded registers.
3851 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3852 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3854 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3856 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3857 * configure: Regenerate.
3858 * config.in: Regenerate.
3859 * server.h (NEED_DECLARATION_STRERROR):
3860 Replace with !HAVE_DECL_STRERROR.
3862 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3864 * linux-low.c (linux_wait, linux_send_signal): Don't test
3865 an unsigned long variable for > 0 if it could be MAX_ULONG.
3866 * server.c (myresume): Likewise.
3867 * target.c (set_desired_inferior): Likewise.
3869 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3871 * configure.ac: Simplify and improve check for socklen_t.
3872 * configure, config.in: Regenerate.
3874 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3876 * acconfig.h: Remove.
3877 * configure.ac: Add a test for socklen_t. Use three-argument
3878 AC_DEFINE throughout.
3879 * config.in: Regenerated using autoheader 2.59.
3880 * configure: Regenerated.
3882 * gdbreplay.c (socklen_t): Provide a default.
3883 (remote_open): Use socklen_t.
3884 * remote-utils.c (socklen_t): Provide a default.
3885 (remote_open): Use socklen_t.
3886 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3889 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3891 * linux-low.c (linux_read_memory, linux_write_memory)
3892 (linux_read_auxv): Likewise.
3893 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3894 (check_mem_write): Likewise.
3895 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3897 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3898 (registers_from_string, register_data): Likewise.
3899 * server.c (handle_query, main): Likewise.
3900 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3901 (decode_M_packet): Likewise.
3902 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3903 * target.h (struct target_ops): Update read_memory, write_memory,
3905 (read_inferior_memory, write_inferior_memory): Update.
3906 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3908 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3909 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3910 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3911 linux-s390-low.c, linux-sh-low.c: Update for changes in
3912 read_inferior_memory and the_low_target->breakpoint.
3914 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3916 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3917 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3918 * configure.srv: Add powerpc64-*-linux*.
3919 * linux-ppc64-low.c: New file.
3921 2005-05-23 Orjan Friberg <orjanf@axis.com>
3923 * linux-cris-low.c: New file with support for CRIS.
3924 * linux-crisv32-low.c: Ditto for CRISv32.
3925 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3926 (clean): Add reg-cris.c and reg-crisv32.c.
3927 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3928 reg-crisv32.o, and reg-crisv32.c to make rules.
3929 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3932 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3934 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3935 of sizeof (PTRACE_XFER_TYPE).
3936 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3938 2005-05-12 Orjan Friberg <orjanf@axis.com>
3940 * target.h (struct target_ops): Add insert_watchpoint,
3941 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3942 pointers for hardware watchpoint support.
3943 * linux-low.h (struct linux_target_ops): Ditto.
3944 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3945 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3946 to linux_target_ops.
3947 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3949 * server.c (main): Recognize 'Z' and 'z' packets.
3951 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3953 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3954 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3955 (the_low_target): Add new members.
3957 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3959 * proc-service.c (ps_lgetregs): Search all_processes instead of
3962 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3964 * server.c (start_inferior): Change return type to int.
3965 (attach_inferior): Change sigptr to int *.
3966 (handle_v_cont, handle_v_requests): Change signal to int *.
3967 (main): Change signal to int.
3969 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3971 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3972 * configure.srv: Add m32r*-*-linux*.
3973 * linux-m32r-low.c: New file.
3975 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3977 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3979 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3981 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3982 Take unsigned long arguments for PIDs.
3983 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3984 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3985 (wait_for_sigstop, linux_resume_one_process)
3986 (regsets_fetch_inferior_registers, linux_send_signal)
3987 (linux_read_auxv): Likewise. Update the types of variables holding
3988 PIDs. Update format string specifiers.
3989 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3990 * remote-utils.c (prepare_resume_reply): Likewise.
3991 * server.c (cont_thread, general_thread, step_thread)
3992 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3994 (handle_query): Update format specifiers.
3995 (handle_v_cont, main): Use strtoul for thread IDs.
3996 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3997 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3998 (general_thread, step_thread, thread_from_wait)
3999 (old_thread_from_wait): Update.
4000 * target.h (struct thread_resume): Use unsigned long for THREAD.
4001 (struct target_ops): Use unsigned long for arguments to attach and
4004 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4006 * acinclude.m4: Include bfd/bfd.m4 directly.
4007 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
4008 <agriffis@toolchain.org>.
4009 * aclocal.m4, configure: Regenerated.
4011 2005-01-07 Andrew Cagney <cagney@gnu.org>
4013 * configure.ac: Rename configure.in, require autoconf 2.59.
4014 * configure: Re-generate.
4016 2004-12-08 Daniel Jacobowitz <dan@debian.org>
4018 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
4020 * aclocal.m4: Regenerated.
4021 * configure: Regenerated.
4023 2004-11-21 Andreas Schwab <schwab@suse.de>
4025 * linux-m68k-low.c (m68k_num_gregs): Define.
4026 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
4027 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
4028 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
4029 (m68k_breakpoint_at): New. Add to the_low_target.
4031 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
4032 srv_linux_thread_db to yes.
4034 2004-10-20 Joel Brobecker <brobecker@gnat.com>
4036 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
4037 (ARCH_SET_FS): Likewise.
4038 (ARCH_GET_FS): Likewise.
4039 (ARCH_GET_GS): Likewise.
4041 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4043 * linux-i386-low.c (ps_get_thread_area): New.
4044 * linux-x86-64-low.c (ps_get_thread_area): New.
4045 * linux-low.c: Include <sys/syscall.h>.
4046 (linux_kill_one_process): Don't kill the first thread here.
4047 (linux_kill): Kill the first thread here.
4048 (kill_lwp): New function.
4049 (send_sigstop, linux_send_signal): Use it.
4050 * proc-service.c: Clean up #ifdefs.
4051 (fpregset_info): Delete.
4052 (ps_lgetregs): Update and enable implementation.
4053 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
4055 * remote-utils.c (struct sym_cache, symbol_cache): New.
4056 (input_interrupt): Print a clearer message.
4057 (async_io_enabled): New variable.
4058 (enable_async_io, disable_async_io): Use it. Update comments.
4059 (look_up_one_symbol): Use the symbol cache.
4060 * thread-db.c (thread_db_look_up_symbols): New function.
4061 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
4063 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4065 * configure.in: Test for -rdynamic.
4066 * configure: Regenerated.
4067 * Makefile (INTERNAL_LDFLAGS): New.
4068 (gdbserver, gdbreplay): Use it.
4070 2004-09-02 Andrew Cagney <cagney@gnu.org>
4072 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
4074 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
4076 * linux-low.c (linux_wait): Clear all_processes list also.
4078 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4080 * linux-low.c: Include <errno.h>. Remove extern declaration of
4083 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
4085 * gdbreplay.c, server.h, utils.c: Update copyright years.
4087 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4089 * server.c (main): Print child status or termination signal from
4090 variable 'signal', not 'sig'.
4092 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
4094 * linux-low.c (linux_read_memory): Change return type to
4095 int. Check for and return error from ptrace().
4096 * target.c (read_inferior_memory): Change return type to int. Pass
4097 back return status from the_target->read_memory().
4098 * target.h (struct target_ops): Adapt *read_memory() prototype.
4100 (read_inferior_memory): Adapt prototype.
4101 * server.c (main): Return an error packet if
4102 read_inferior_memory() returns an error.
4104 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
4106 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
4107 Unify with other clean targets.
4109 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4111 * server.c (handle_v_cont): Call set_desired_inferior.
4113 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4115 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
4117 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4119 * linux-low.c (linux_wait): Unblock async I/O.
4120 (linux_resume): Block and enable async I/O.
4121 * remote-utils.c (block_async_io, unblock_async_io): New functions.
4122 * server.h (block_async_io, unblock_async_io): Add prototypes.
4124 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4126 * remote-utils.c (remote_open): Print a status notice after
4128 * server.c (attach_inferior): Print a status notice after
4131 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
4133 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
4135 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
4137 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
4139 * server.c, target.h: Update copyright years.
4141 2004-02-25 Roland McGrath <roland@redhat.com>
4143 * target.h (struct target_ops): New member `read_auxv'.
4144 * server.c (handle_query): Handle qPart:auxv:read: query using that.
4145 * linux-low.c (linux_read_auxv): New function.
4146 (linux_target_ops): Initialize `read_auxv' member to that.
4148 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4150 Committed by Jim Blandy <jimb@redhat.com>.
4152 * linux-s390-low.c (s390_num_regs): Update.
4153 (s390_regmap): Remove control registers. Use __s390x__ predefine
4154 instead of GPR_SIZE to distiguish s390 and s390x targets.
4156 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
4158 * linux-low.c: Update copyright year.
4159 (check_removed_breakpoint): Clear pending_is_breakpoint.
4160 (linux_set_resume_request, linux_queue_one_thread)
4161 (resume_status_pending_p): New functions.
4162 (linux_continue_one_thread): Use process->resume.
4163 (linux_resume): Only resume threads if there are no pending events.
4164 * linux-low.h (struct process_info): Add resume request
4167 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4169 * regcache.c (new_register_cache): Clear the allocated register
4170 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4172 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4174 * linux-low.c (linux_resume): Take a struct thread_resume *
4176 (linux_wait): Update call.
4177 (resume_ptr): New static variable.
4178 (linux_continue_one_thread): Renamed from
4179 linux_continue_one_process. Use resume_ptr.
4180 (linux_resume): Use linux_continue_one_thread.
4181 * server.c (handle_v_cont, handle_v_requests): New functions.
4182 (myresume): New function.
4183 (main): Handle 'v' case.
4184 * target.h (struct thread_resume): New type.
4185 (struct target_ops): Change argument of "resume" to struct
4187 (myresume): Delete macro.
4189 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4191 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4192 (uninstall): Support DESTDIR.
4194 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4196 * configure.srv: Add xscale*linux copy of arm*linux entry.
4198 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4200 * linux-arm-low.c (arm_reinsert_addr): New function.
4201 (the_low_target): Add arm_reinsert_addr.
4203 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4205 * mem-break.c: Remove whitespace at end of file.
4207 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4209 * configure.in: Check whether we need to prototype strerror.
4210 * server.h: Optionally prototype strerror.
4211 * gdbreplay.c (perror_with_name): Use strerror.
4212 * linux-low.c (linux_attach_lwp): Use strerror.
4213 * utils.c (perror_with_name): Use strerror.
4214 * config.in, configure: Regenerated.
4216 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4218 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4219 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4221 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4223 * Makefile.in (SFILES): Update.
4224 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4225 low-sun3.c: Remove files.
4227 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4229 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4230 (linux_detach_one_process, linux_detach): New functions.
4231 (linux_target_ops): Add linux_detach.
4232 * server.c (main): Handle 'D' packet.
4233 * target.h (struct target_ops): Add "detach" member.
4234 (detach_inferior): Define.
4236 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4238 From Kelley Cook <kelleycook@wideopenwest.com>:
4239 * configure.srv: Accept i[34567]86 variants.
4241 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4243 * linux-low.c (linux_wait_for_event): Correct comment typos.
4244 (linux_resume_one_process): Call check_removed_breakpoint.
4245 (linux_send_signal): New function.
4246 (linux_target_ops): Add linux_send_signal.
4247 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4249 * target.h (struct target_ops): Add send_signal.
4251 2003-05-29 Jim Blandy <jimb@redhat.com>
4253 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4254 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4255 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4256 away part of the register's value.
4258 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4260 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4261 (linux_wait_for_event, linux_init_signals): Likewise.
4263 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4265 * configure.in: Check for stdlib.h.
4266 * configure: Regenerated.
4267 * config.in: Regenerated.
4269 2003-01-04 Andreas Schwab <schwab@suse.de>
4271 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4273 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4275 * Makefile.in: Remove obsolete code.
4277 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4279 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4280 defined(PT_FPR0_HI).
4282 2002-11-17 Stuart Hughes <seh@zee2.com>
4284 * linux-arm-low.c (arm_num_regs): Increase.
4285 (arm_regmap): Include status register.
4287 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4289 * linux-low.c (register_addr): Remove incorrect -1 check.
4291 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4293 * linux-low.c (linux_create_inferior): Call setpgid. Return
4295 (unstopped_p, linux_signal_pid): Remove.
4296 (linux_target_ops): Remove linux_signal_pid.
4297 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4298 global instead of target method.
4299 * target.h (struct target_ops): Remove signal_pid. Update comment
4300 for create_inferior.
4301 * server.c (signal_pid): New variable.
4302 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4303 gdbserver. Set the child to be the foreground process group.
4304 (attach_inferior): Set signal_pid.
4306 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4308 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4310 2002-08-20 Jim Blandy <jimb@redhat.com>
4312 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4315 2002-08-01 Andrew Cagney <cagney@redhat.com>
4317 * Makefile.in: Make chill references obsolete.
4319 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4321 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4322 * configure: Regenerate.
4323 * config.in: Regenerate.
4325 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4327 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4328 (perror_with_name, remote_close, remote_open, expect, play): Static.
4330 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4332 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4333 byte offsets instead of an array of indexes.
4334 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4336 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4338 * regcache.c: Add comment.
4340 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4342 * thread-db.c: New file.
4343 * proc-service.c: New file.
4344 * acinclude.m4: New file.
4345 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4346 proc-service.o, and thread-db.o.
4347 (linux-low.o): Add USE_THREAD_DB.
4348 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4349 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4350 * aclocal.m4: Regenerated.
4351 * config.in: Regenerated.
4352 * configure: Regenerated.
4353 * configure.in: Check for proc_service.h, sys/procfs.h,
4354 thread_db.h, and linux/elf.h headrs.
4355 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4356 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4357 Check for -lthread_db and thread support.
4358 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4359 PowerPC, and SuperH.
4360 * i387-fp.c: Constify arguments.
4361 * i387-fp.h: Likewise.
4362 * inferiors.c: (struct thread_info): Renamed from
4363 `struct inferior_info'. Remove PID member. Use generic inferior
4364 list header. All uses updated.
4365 (inferiors, signal_pid): Removed.
4366 (all_threads): New variable.
4367 (get_thread): Define.
4368 (add_inferior_to_list): New function.
4369 (for_each_inferior): New function.
4370 (change_inferior_id): New function.
4371 (add_inferior): Removed.
4372 (remove_inferior): New function.
4373 (add_thread): New function.
4374 (free_one_thread): New function.
4375 (remove_thread): New function.
4376 (clear_inferiors): Use for_each_inferior and free_one_thread.
4377 (find_inferior): New function.
4378 (find_inferior_id): New function.
4379 (inferior_target_data): Update argument type.
4380 (set_inferior_target_data): Likewise.
4381 (inferior_regcache_data): Likewise.
4382 (set_inferior_regcache_data): Likewise.
4383 * linux-low.c (linux_bp_reinsert): Remove.
4384 (all_processes, stopping_threads, using_thrads)
4385 (struct pending_signals, debug_threads, pid_of): New.
4386 (inferior_pid): Replace with macro.
4387 (struct inferior_linux_data): Remove.
4388 (get_stop_pc, add_process): New functions.
4389 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4390 Use add_process and add_thread.
4391 (linux_attach_lwp): New function, based on old linux_attach. Use
4392 add_process and add_thread. Set stop_expected for new threads.
4393 (linux_attach): New function.
4394 (linux_kill_one_process): New function.
4395 (linux_kill): Kill all LWPs.
4396 (linux_thread_alive): Use find_inferior_id.
4397 (check_removed_breakpoints, status_pending_p): New functions.
4398 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4399 Update. Use WNOHANG. Wait for cloned processes also. Update process
4400 struct for the found process.
4401 (linux_wait_for_event): New function.
4402 (linux_wait): Use it. Support LWPs.
4403 (send_sigstop, wait_for_sigstop, stop_all_processes)
4404 (linux_resume_one_process, linux_continue_one_process): New functions.
4405 (linux_resume): Support LWPs.
4406 (REGISTER_RAW_SIZE): Remove.
4407 (fetch_register): Use register_size instead. Call supply_register.
4408 (usr_store_inferior_registers): Likewise. Call collect_register.
4410 (regsets_fetch_inferior_registers): Improve error message.
4411 (regsets_store_inferior_registers): Add debugging.
4412 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4413 (unstopped_p, linux_signal_pid): New functions.
4414 (linux_target_ops): Add linux_signal_pid.
4415 (linux_init_signals): New function.
4416 (initialize_low): Call it. Initialize using_threads.
4417 * regcache.c (inferior_regcache_data): Add valid
4419 (get_regcache): Fetch registers lazily. Add fetch argument
4420 and update all callers.
4421 (regcache_invalidate_one, regcache_invalidate): New
4423 (new_register_cache): Renamed from create_register_cache.
4424 Return the new regcache.
4425 (free_register_cache): Change argument to a void *.
4426 (registers_to_string, registers_from_string): Call get_regcache
4427 with fetch flag set.
4428 (register_data): Make static. Pass fetch flag to get_regcache.
4429 (supply_register): Call get_regcache with fetch flag clear.
4430 (collect_register): Call get_regcache with fetch flag set.
4431 (collect_register_as_string): New function.
4432 * regcache.h: Update.
4433 * remote-utils.c (putpkt): Flush after debug output and use
4435 Handle input interrupts while waiting for an ACK.
4436 (input_interrupt): Use signal_pid method.
4437 (getpkt): Flush after debug output and use stderr.
4438 (outreg): Use collect_register_as_string.
4439 (new_thread_notify, dead_thread_notify): New functions.
4440 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4442 (look_up_one_symbol): Flush after debug output.
4443 * server.c (step_thread, server_waiting): New variables.
4444 (start_inferior): Don't use signal_pid. Update call to mywait.
4445 (attach_inferior): Update call to mywait.
4446 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4447 (main): Don't fetch/store registers explicitly. Use
4448 set_desired_inferior. Support proposed ``Hs'' packet. Update
4451 (struct inferior_list, struct_inferior_list_entry): New.
4452 * target.c (set_desired_inferior): New.
4453 (write_inferior_memory): Constify.
4454 (mywait): New function.
4456 (struct target_ops): New signal_pid method.
4457 (mywait): Removed macro, added prototype.
4459 * linux-low.h (regset_func): Removed.
4460 (regset_fill_func, regset_store_func): New.
4461 (enum regset_type): New.
4462 (struct regset_info): Add type field. Use new operation types.
4463 (struct linux_target_ops): stop_pc renamed to get_pc.
4464 Add decr_pc_after_break and breakpoint_at.
4465 (get_process, get_thread_proess, get_process_thread)
4466 (strut process_info, all_processes, linux_attach_lwp)
4467 (thread_db_init): New.
4469 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4470 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4471 (the_low_target): Add new members.
4472 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4473 (i386_store_fpxregset): Constify.
4474 (target_regsets): Add new kind identifier.
4475 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4476 (i386_set_pc): Add debugging.
4477 (i386_breakpoint_at): New function.
4478 (the_low_target): Add new members.
4479 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4480 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4481 (mips_breakpoint_at): New.
4482 (the_low_target): Add new members.
4483 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4484 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4485 (the_low_target): Add new members.
4486 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4487 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4488 (the_low_target): Add new members.
4489 * linux-x86-64-low.c (target_regsets): Add new kind
4492 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4494 From Martin Pool <mbp@samba.org>:
4495 * server.c (gdbserver_usage): New function.
4498 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4500 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4503 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4505 * Makefile.in: Remove obsolete code.
4507 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4509 * linux-low.c (regsets_fetch_inferior_registers),
4510 (regsets_store_inferior_registers): Removed cast to int from
4512 * regcache.h: Added declaration of struct inferior_info.
4514 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4516 * inferiors.c (struct inferior_info): Add regcache_data.
4517 (add_inferior): Call create_register_cache.
4518 (clear_inferiors): Call free_register_cache.
4519 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4520 * regcache.c (struct inferior_regcache_data): New.
4521 (registers): Remove.
4522 (get_regcache): New function.
4523 (create_register_cache, free_register_cache): New functions.
4524 (set_register_cache): Don't initialize the register cache here.
4525 (registers_to_string, registers_from_string, register_data): Call
4527 * regcache.h: Add prototypes.
4528 * server.h: Likewise.
4530 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4532 * mem-break.c: New file.
4533 * mem-break.h: New file.
4534 * Makefile.in: Add mem-break.o rule; update server.h
4536 * inferiors.c (struct inferior_info): Add target_data
4538 (clear_inferiors): Free target_data member if set.
4539 (inferior_target_data, set_inferior_target_data): New functions.
4540 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4541 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4542 * linux-low.c (linux_bp_reinsert): New variable.
4543 (struct inferior_linux_data): New.
4544 (linux_create_inferior): Use set_inferior_target_data.
4545 (linux_attach): Likewise. Call add_inferior.
4546 (linux_wait_for_one_inferior): New function.
4547 (linux_wait): Call it.
4548 (linux_write_memory): Add const.
4549 (initialize_low): Call set_breakpoint_data.
4550 * linux-low.h (struct linux_target_ops): Add breakpoint
4552 * server.c (attach_inferior): Remove extra add_inferior
4554 * server.h: Include mem-break.h. Update inferior.c
4556 * target.c (read_inferior_memory)
4557 (write_inferior_memory): New functions.
4558 * target.h (read_inferior_memory)
4559 (write_inferior_memory): Change macros to prototypes.
4560 (struct target_ops): Update comments. Add const to write_memory
4563 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4565 * linux-low.c (usr_store_inferior_registers): Support
4566 registers which are allowed to fail to store.
4567 * linux-low.h (linux_target_ops): Likewise.
4568 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4569 (ppc_cannot_store_register): FPSCR may not be storable.
4571 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4573 * server.h: Include <string.h> if HAVE_STRING_H.
4574 * ChangeLog: Correct paths in last ChangeLog entry.
4576 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4578 * linux-low.h: Remove obsolete prototypes.
4579 (struct linux_target_ops): New.
4580 (extern the_low_target): New.
4581 * linux-low.c (num_regs, regmap): Remove declarations.
4582 (register_addr): Use the_low_target explicitly.
4583 (fetch_register): Likewise.
4584 (usr_fetch_inferior_registers): Likewise.
4585 (usr_store_inferior_registers): Likewise.
4586 * linux-arm-low.c (num_regs): Remove.
4587 (arm_num_regs): Define.
4588 (arm_regmap): Renamed from regmap, made static.
4589 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4591 (arm_cannot_store_register): Renamed from cannot_store_register,
4593 (the_low_target): New.
4594 * linux-i386-low.c (num_regs): Remove.
4595 (i386_num_regs): Define.
4596 (i386_regmap): Renamed from regmap, made static.
4597 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4599 (i386_cannot_store_register): Renamed from cannot_store_register,
4601 (the_low_target): New.
4602 * linux-ia64-low.c (num_regs): Remove.
4603 (ia64_num_regs): Define.
4604 (ia64_regmap): Renamed from regmap, made static.
4605 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4607 (ia64_cannot_store_register): Renamed from cannot_store_register,
4609 (the_low_target): New.
4610 * linux-m68k-low.c (num_regs): Remove.
4611 (m68k_num_regs): Define.
4612 (m68k_regmap): Renamed from regmap, made static.
4613 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4615 (m68k_cannot_store_register): Renamed from cannot_store_register,
4617 (the_low_target): New.
4618 * linux-mips-low.c (num_regs): Remove.
4619 (mips_num_regs): Define.
4620 (mips_regmap): Renamed from regmap, made static.
4621 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4623 (mips_cannot_store_register): Renamed from cannot_store_register,
4625 (the_low_target): New.
4626 * linux-ppc-low.c (num_regs): Remove.
4627 (ppc_num_regs): Define.
4628 (ppc_regmap): Renamed from regmap, made static.
4629 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4631 (ppc_cannot_store_register): Renamed from cannot_store_register,
4633 (the_low_target): New.
4634 * linux-s390-low.c (num_regs): Remove.
4635 (s390_num_regs): Define.
4636 (s390_regmap): Renamed from regmap, made static.
4637 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4639 (s390_cannot_store_register): Renamed from cannot_store_register,
4641 (the_low_target): New.
4642 * linux-sh-low.c (num_regs): Remove.
4643 (sh_num_regs): Define.
4644 (sh_regmap): Renamed from regmap, made static.
4645 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4647 (sh_cannot_store_register): Renamed from cannot_store_register,
4649 (the_low_target): New.
4650 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4651 (the_low_target): New.
4653 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4655 * Makefile.in: Add stamp-h target.
4656 * configure.in: Create stamp-h.
4657 * configure: Regenerated.
4659 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4661 * inferiors.c: New file.
4662 * target.c: New file.
4663 * target.h: New file.
4664 * Makefile.in: Add target.o and inferiors.o. Update
4666 * linux-low.c (inferior_pid): New static variable,
4667 moved from server.c.
4668 (linux_create_inferior): Renamed from create_inferior.
4669 Call add_inferior. Return 0 on success instead of a PID.
4670 (linux_attach): Renamed from myattach.
4671 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4672 (linux_thread_alive): Renamed from mythread_alive.
4673 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4675 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4676 (regsets_store_inferior_registers): Correct error message.
4677 Add missing ``return 0''.
4678 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4679 (linux_store_registers): Renamed from store_inferior_registers.
4680 (linux_read_memory): Renamed from read_inferior_memory.
4681 (linux_write_memory): Renamed from write_inferior_memory.
4682 (linux_target_ops): New structure.
4683 (initialize_low): Call set_target_ops ().
4684 * remote-utils.c (unhexify): New function.
4685 (hexify): New function.
4686 (input_interrupt): Send signals to ``signal_pid''.
4687 * server.c (inferior_pid): Remove.
4688 (start_inferior): Update create_inferior call.
4689 (attach_inferior): Call add_inferior.
4690 (handle_query): New function.
4691 (main): Call handle_query for `q' packets.
4692 * server.h: Include "target.h". Remove obsolete prototypes.
4693 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4695 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4697 * Makefile.in: Add WARN_CFLAGS. Update configury
4699 * configure.in: Check for <string.h>
4700 * configure: Regenerate.
4701 * config.in: Regenerate.
4702 * gdbreplay.c: Include needed system headers.
4703 (remote_open): Remove strchr prototype.
4704 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4705 * regcache.c (supply_register): Change buf argument to const void *.
4706 (supply_register_by_name): Likewise.
4707 (collect_register): Change buf argument to void *.
4708 (collect_register_by_name): Likewise.
4709 * regcache.h: Add missing prototypes.
4710 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4711 * server.c (handle_query): New function.
4712 (attached): New static variable, moved out of main.
4713 (main): Quiet longjmp clobber warnings.
4714 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4715 * utils.c (error): Remove NORETURN.