1 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
3 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
4 be consistent with other sources of this directory.
5 (init_registers_amd64): Correct name of source file of this function
8 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15 * win32-i386-low.c: Add 64-bit support.
16 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17 (init_registers_amd64): Declare.
18 (mappings): Add 64-bit version of array.
19 (init_windows_x86): New function.
20 (the_low_target): Change init_arch field to init_windows_x86.
22 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
24 * win32-low.c: Adapt to support also 64-bit architecture.
25 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
26 (get_image_name): Use SIZE_T type for local variable `done'.
27 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
28 (toolhelp_get_dll_name): Idem.
29 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
30 Use uintptr_t typecast to avoid warning.
31 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
32 (handle_exception): Use phex_nz to avoid warning.
33 (win32_wait): Remove unused local variable `process'.
35 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
37 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
40 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
42 * configure.ac: Use `ws2_32' library for srv_mingw.
43 * configure: Regenerate.
44 * gdbreplay.c: Include winsock2.h instead of winsock.h.
45 * remote-utils.c: Likewise.
47 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
49 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
50 if __x86_64__ is defined.
52 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
54 * configure: Regenerate.
56 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
58 * server.c (handle_query): Handle 'qGetTIBAddr' query.
59 * target.h (target_ops): New get_tib_address field.
60 * win32-low.h (win32_thread_info): Add thread_local_base field.
61 * win32-low.c (child_add_thread): Add tlb argument.
62 Set thread_local_base field to TLB.
63 (get_child_debug_event): Adapt to child_add_thread change.
64 (win32_get_tib_address): New function.
65 (win32_target_ops): Set get_tib_address field to
66 win32_get_tib_address.
67 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
69 2010-04-12 Pedro Alves <pedro@codesourcery.com>
71 * linux-low.c (linux_mourn): Also remove the process.
72 * server.c (handle_target_event): Don't remove the process here.
73 * nto-low.c (nto_mourn): New.
74 (nto_target_ops): Install it.
75 * spu-low.c (spu_mourn): New.
76 (spu_target_ops): Install it.
77 * win32-low.c (win32_mourn): New.
78 (win32_target_ops): Install it.
80 2010-04-12 Pedro Alves <pedro@codesourcery.com>
82 * server.h (buffer_xml_printf): Remove redundant `;'.
84 2010-04-12 Pedro Alves <pedro@codesourcery.com>
86 * regcache.c (set_register_cache): Invalidate regcaches before
87 changing the register cache layout.
88 (regcache_invalidate_one): Allow a NULL regcache.
89 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
90 regcaches before changing the register cache layout or the target
93 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
95 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
96 variable warning on Linux/x86-64.
98 2010-04-11 Pedro Alves <pedro@codesourcery.com>
100 GDBserver disconnected tracing support.
102 * linux-low.c (linux_remove_process): Delete.
103 (add_lwp): Don't set last_resume_kind here.
104 (linux_kill): Use `mourn'.
105 (linux_detach): Use `thread_db_detach', and `mourn'.
107 (linux_attach_lwp_1): Adjust comment.
108 (linux_attach): last_resume_kind moved the thread_info; adjust.
109 (status_pending_p_callback): Adjust.
110 (linux_wait_for_event_1): Adjust.
111 (count_events_callback, select_singlestep_lwp_callback)
112 (select_event_lwp_callback, cancel_breakpoints_callback)
113 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
114 (proceed_one_lwp): Adjust.
115 (linux_async): Add debug output.
116 (linux_thread_stopped): New.
117 (linux_pause_all): New.
118 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
120 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
121 (thread_db_free): Delete declaration.
122 (thread_db_detach, thread_db_mourn): Declare.
123 * thread-db.c (thread_db_init): Use thread_db_mourn.
124 (thread_db_free): Delete, split in two.
125 (disable_thread_event_reporting): New.
126 (thread_db_detach): New.
127 (thread_db_mourn): New.
129 * server.h (struct thread_info) <last_resume_kind>: New field.
130 <attached>: Add comment.
131 <gdb_detached>: New field.
132 (handler_func): Change return type to int.
133 (handle_serial_event, handle_target_event): Ditto.
134 (gdb_connected): Declare.
136 (disconnected_tracing): Declare.
137 (stop_tracing): Declare.
139 * server.c (handle_query) <qSupported>: Report support for
140 disconnected tracing.
141 (queue_stop_reply_callback): Account for running threads.
142 (gdb_wants_thread_stopped): New.
143 (gdb_wants_all_threads_stopped): New.
144 (gdb_reattached_process): New.
145 (handle_status): Clear the `gdb_detached' flag of all processes.
146 In all-stop, stop all threads.
147 (main): Be sure to leave tfind mode. Handle disconnected tracing.
148 (process_serial_event): If the remote connection breaks, or if an
149 exit was forced with "monitor exit", force an event loop exit.
150 Handle disconnected tracing on detach.
151 (handle_serial_event): Adjust.
152 (handle_target_event): If GDB isn't connected, forward events back
153 to the inferior, unless the last process exited, in which case,
154 exit gdbserver. Adjust interface.
156 * remote-utils.c (remote_open): Don't block in accept. Instead
157 register an event loop source on the listen socket file
158 descriptor. Refactor bits into ...
159 (listen_desc): ... this new global.
160 (gdb_connected): ... this new function.
161 (enable_async_notification): ... this new function.
162 (handle_accept_event): ... this new function.
163 (remote_close): Clear remote_desc.
165 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
167 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
169 (mourn_inferior): Define.
170 (target_process_qsupported): Avoid the dangling else problem.
171 (thread_stopped): Define.
173 (target_waitstatus_to_string): Declare.
174 * target.c (target_waitstatus_to_string): New.
176 * tracepoint.c (tracing): Make extern.
177 (disconnected_tracing): New.
178 (stop_tracing): Make extern. Handle tracing stops due to GDB
180 (cmd_qtdisconnected): New.
181 (cmd_qtstatus): Report disconnected tracing status in trace reply.
182 (handle_tracepoint_general_set): Handle QTDisconnected.
184 * event-loop.c (event_handler_func): Change return type to int.
185 (process_event): Bail out if the event handler wants the event
187 (handle_file_event): Ditto.
188 (start_event_loop): Bail out if the event handler wants the event
191 * nto-low.c (nto_target_ops): Adjust.
192 * spu-low.c (spu_wait): Don't remove the process here.
193 (spu_target_ops): Adjust.
194 * win32-low.c (win32_wait): Don't remove the process here.
195 (win32_target_ops): Adjust.
197 2010-04-11 Pedro Alves <pedro@codesourcery.com>
199 * regcache.c (realloc_register_cache): Invalidate inferior's
200 regcache before recreating it.
202 2010-04-09 Pedro Alves <pedro@codesourcery.com>
204 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
206 2010-04-09 Stan Shebs <stan@codesourcery.com>
207 Pedro Alves <pedro@codesourcery.com>
209 * server.h (LONGEST): New.
210 (struct thread_info) <while_stepping>: New field.
211 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
213 (initialize_tracepoint, handle_tracepoint_general_set)
214 (handle_tracepoint_query, tracepoint_finished_step)
215 (tracepoint_was_hit, release_while_stepping_state_list):
216 (current_traceframe): Declare.
217 * server.c (handle_general_set): Handle tracepoint packets.
220 (handle_search_memory_1): Use read_memory.
221 (handle_query): Report support for conditional tracepoints, trace
222 state variables, and tracepoint sources. Handle tracepoint
224 (main): Initialize the tracepoints module.
225 (process_serial_event): Handle traceframe reads/writes.
227 * linux-low.c (handle_tracepoints): New.
228 (linux_wait_1): Call it.
229 (linux_resume_one_lwp): Handle while-stepping.
230 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
231 (linux_target_ops): Install them.
232 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
234 * linux-x86-low.c (x86_supports_tracepoints): New.
235 (the_low_target). Install it.
237 * mem-break.h (delete_breakpoint): Declare.
238 * mem-break.c (delete_breakpoint): Make external.
240 * target.h (struct target_ops): Add `supports_tracepoints',
241 `read_pc', and `write_pc' fields.
242 (target_supports_tracepoints): Define.
243 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
246 * regcache.h (struct regcache) <registers_owned>: New field.
247 (init_register_cache, regcache_cpy): Declare.
248 (regcache_read_pc, regcache_write_pc): Declare.
249 (register_cache_size): Declare.
250 (supply_regblock): Declare.
251 * regcache.c (init_register_cache): New.
252 (new_register_cache): Use it.
254 (register_cache_size): New.
255 (supply_regblock): New.
256 (regcache_read_pc, regcache_write_pc): New.
260 * Makefile.in (OBS): Add tracepoint.o.
261 (tracepoint.o): New rule.
263 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
265 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
267 (i386-mmx.c): Likewise.
268 (i386-mmx-linux.o): Likewise.
269 (i386-mmx-linux.c): Likewise.
271 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
272 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
273 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
274 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
276 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
277 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
278 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
280 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
282 * Makefile.in (clean): Updated.
284 (i386-avx.c): Likewise.
285 (i386-avx-linux.o): Likewise.
286 (i386-avx-linux.c): Likewise.
287 (amd64-avx.o): Likewise.
288 (amd64-avx.c): Likewise.
289 (amd64-avx-linux.o): Likewise.
290 (amd64-avx-linux.c): Likewise.
292 * configure.srv (srv_i386_regobj): Add i386-avx.o.
293 (srv_i386_linux_regobj): Add i386-avx-linux.o.
294 (srv_amd64_regobj): Add amd64-avx.o.
295 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
296 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
297 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
298 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
299 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
300 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
301 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
303 * i387-fp.c: Include "i386-xstate.h".
305 (i387_cache_to_xsave): Likewise.
306 (i387_xsave_to_cache): Likewise.
307 (x86_xcr0): Likewise.
309 * i387-fp.h (i387_cache_to_xsave): Likewise.
310 (i387_xsave_to_cache): Likewise.
311 (x86_xcr0): Likewise.
313 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
314 * linux-crisv32-low.c (target_regsets): Likewise.
315 * linux-m68k-low.c (target_regsets): Likewise.
316 * linux-mips-low.c (target_regsets): Likewise.
317 * linux-ppc-low.c (target_regsets): Likewise.
318 * linux-s390-low.c (target_regsets): Likewise.
319 * linux-sh-low.c (target_regsets): Likewise.
320 * linux-sparc-low.c (target_regsets): Likewise.
321 * linux-xtensa-low.c (target_regsets): Likewise.
323 * linux-low.c: Include <sys/uio.h>.
324 (regsets_fetch_inferior_registers): Support nt_type.
325 (regsets_store_inferior_registers): Likewise.
326 (linux_process_qsupported): New.
327 (linux_target_ops): Add linux_process_qsupported.
329 * linux-low.h (regset_info): Add nt_type.
330 (linux_target_ops): Add process_qsupported.
332 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
334 (init_registers_i386_avx_linux): New.
335 (init_registers_amd64_avx_linux): Likewise.
336 (xmltarget_i386_linux_no_xml): Likewise.
337 (xmltarget_amd64_linux_no_xml): Likewise.
338 (PTRACE_GETREGSET): Likewise.
339 (PTRACE_SETREGSET): Likewise.
340 (x86_fill_xstateregset): Likewise.
341 (x86_store_xstateregset): Likewise.
343 (x86_linux_update_xmltarget): Likewise.
344 (x86_linux_process_qsupported): Likewise.
345 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
346 (x86_arch_setup): Don't call init_registers_amd64_linux nor
347 init_registers_i386_linux here. Call
348 x86_linux_update_xmltarget.
349 (the_low_target): Add x86_linux_process_qsupported.
351 * server.c (handle_query): Call target_process_qsupported.
353 * target.h (target_ops): Add process_qsupported.
354 (target_process_qsupported): New.
356 2010-04-03 Pedro Alves <pedro@codesourcery.com>
358 * inferiors.c (add_thread): Set last_status kind to
359 TARGET_WAITKIND_IGNORE.
360 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
361 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
362 (linux_wait_1): Move `thread' local definition to block that uses
363 it. Don't NULL initialize `event_child'.
364 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
365 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
366 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
368 2010-04-01 Pedro Alves <pedro@codesourcery.com>
370 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
371 an extended waitstatus, or by a watchpoint.
372 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
373 thread was stepping or has been stopped by a watchpoint.
375 2010-04-01 Pedro Alves <pedro@codesourcery.com>
377 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
378 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
379 of another, then delete the previous, and validate all
381 (validate_inserted_breakpoint): New.
382 (delete_disabled_breakpoints): New.
383 (validate_breakpoints): New.
384 (check_mem_read): Validate breakpoints before trusting their
385 shadow. Delete disabled breakpoints.
386 (check_mem_write): Validate breakpoints before trusting they
387 should be inserted. Delete disabled breakpoints.
388 * mem-break.h (validate_breakpoints):
389 * server.c (handle_query): Validate breakpoints when we see a
392 2010-04-01 Pedro Alves <pedro@codesourcery.com>
394 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
395 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
396 if we could tell there's a GDB breakpoint at stop_pc.
397 (need_step_over_p): Don't do a step over if we find a GDB
398 breakpoint at the resume PC.
400 * mem-break.c (struct raw_breakpoint): New.
401 (enum bkpt_type): New type `gdb_breakpoint'.
402 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
403 fields. New field `raw'.
404 (find_raw_breakpoint_at): New.
405 (set_raw_breakpoint_at): Handle refcounting. Create a raw
407 (set_breakpoint_at): Adjust.
408 (delete_raw_breakpoint): New.
409 (release_breakpoint): New.
410 (delete_breakpoint): Rename to...
411 (delete_breakpoint_1): ... this. Add proc parameter. Use
412 release_breakpoint. Return ENOENT.
413 (delete_breakpoint): Reimplement.
414 (find_breakpoint_at): Delete.
415 (find_gdb_breakpoint_at): New.
416 (delete_breakpoint_at): Delete.
417 (set_gdb_breakpoint_at): New.
418 (delete_gdb_breakpoint_at): New.
419 (gdb_breakpoint_here): New.
420 (set_reinsert_breakpoint): Use release_breakpoint.
421 (uninsert_breakpoint): Rename to ...
422 (uninsert_raw_breakpoint): ... this.
423 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
424 (reinsert_raw_breakpoint): Change parameter type to
426 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
428 (check_breakpoints): Adjust. Use release_breakpoint.
429 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
430 (breakpoint_inserted_here): Ditto.
431 (check_mem_read): Adjust to iterate over raw breakpoints instead.
432 Don't trust the breakpoint's shadow if it is not inserted.
433 (check_mem_write): Adjust to iterate over raw breakpoints instead.
434 (delete_all_breakpoints): Adjust.
435 (free_all_breakpoints): Mark all breakpoints as uninserted, and
436 use delete_breakpoint_1.
438 * mem-break.h (breakpoints_supported): Delete declaration.
439 (set_gdb_breakpoint_at): Declare.
440 (gdb_breakpoint_here): Declare.
441 (delete_breakpoint_at): Delete.
442 (delete_gdb_breakpoint_at): Declare.
444 * server.h (struct raw_breakpoint): Forward declare.
445 (struct process_info): New field `raw_breakpoints'.
447 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
450 2010-03-24 Pedro Alves <pedro@codesourcery.com>
452 * linux-low.c (status_pending_p_callback): Fix comment.
453 (linux_wait_for_event_1): Move most of the internal breakpoint
454 handling from here...
455 (linux_wait_1): ... to here.
456 (count_events_callback): New.
457 (select_singlestep_lwp_callback): New.
458 (select_event_lwp_callback): New.
459 (cancel_breakpoints_callback): New.
460 (select_event_lwp): New.
461 (linux_wait_1): Simplify internal breakpoint handling. Give equal
462 priority to all LWPs that have had events that should be reported
463 to the client. Cancel breakpoints when about to reporting the
464 event to the client, not while stopping lwps. No longer cancel
465 finished single-steps here.
466 (cancel_finished_single_step): Delete.
467 (cancel_finished_single_steps): Delete.
469 2010-03-24 Pedro Alves <pedro@codesourcery.com>
471 * mem-break.c (enum bkpt_type): New.
472 (struct breakpoint): New field `type'.
473 (set_breakpoint_at): Change return type to struct breakpoint
474 pointer. Set type to `other_breakpoint' by default.
475 (delete_breakpoint): Rewrite, supporting more than one breakpoint
476 in the breakpoint list.
477 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
478 (reinsert_breakpoint): Rename to ...
479 (reinsert_raw_breakpoint): ... this.
480 (reinsert_breakpoints_at): Adjust.
481 * mem-break.h (struct breakpoint): Declare.
482 (set_breakpoint_at): Change return type to struct breakpoint
485 2010-03-24 Pedro Alves <pedro@codesourcery.com>
487 * server.c (handle_query): Assign, not compare.
489 2010-03-24 Pedro Alves <pedro@codesourcery.com>
491 Teach linux gdbserver to step-over-breakpoints.
493 * linux-low.c (can_hardware_single_step): New.
494 (supports_breakpoints): New.
495 (handle_extended_wait): If stopping threads, read the stop pc of
498 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
499 low target doesn't support retrieving the PC.
500 (add_lwp): Set last_resume_kind to resume_continue.
501 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
502 (linux_attach): Don't clear stop_expected. Set the lwp's
503 last_resume_kind to resume_stop.
504 (linux_detach_one_lwp): Don't check for removed breakpoints.
505 (check_removed_breakpoint): Delete.
506 (status_pending_p): Rename to ...
507 (status_pending_p_callback): ... this. Don't check for removed
508 breakpoints. Don't consider threads that are stopped from GDB's
510 (linux_wait_for_lwp): Always read the stop_pc here.
511 (cancel_breakpoint): New.
512 (step_over_bkpt): New global.
513 (linux_wait_for_event_1): Implement stepping over breakpoints.
514 (gdb_wants_lwp_stopped): New.
515 (gdb_wants_all_stopped): New.
516 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
517 single-step traps here. Store the thread's last reported target
519 (send_sigstop): Don't clear stop_expected. Always set it,
521 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
522 (cancel_finished_single_step): New.
523 (cancel_finished_single_steps): New.
524 (wait_for_sigstop): Don't cancel finished single-step traps here.
525 (linux_resume_one_lwp): Don't check for removed breakpoints.
526 Don't set `step' on non-hardware step archs.
527 (linux_set_resume_request): Ignore resume_stop requests if already
528 stopping or stopped. Set the lwp's last_resume_kind.
529 (resume_status_pending_p): Don't check for removed breakpoints.
530 (need_step_over_p): New.
531 (start_step_over): New.
532 (finish_step_over): New.
533 (linux_resume_one_thread): Always queue a sigstop for resume_stop
534 requests. Clear the thread's last reported target waitstatus.
535 Don't use the `suspended' flag. Don't consider pending breakpoints.
536 (linux_resume): Start a step-over if necessary.
537 (proceed_one_lwp): New.
538 (proceed_all_lwps): New.
539 (unstop_all_lwps): New.
540 * linux-low.h (struct lwp_info): Rewrite comment for the
541 `suspended' flag. Add the `stop_pc' field. Delete the
542 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
543 Add `'last_resume_kind' and `need_step_over' fields.
544 * inferiors.c (struct thread_info): Delete, moved elsewhere.
545 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
546 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
547 (set_raw_breakpoint_at): New.
548 (set_breakpoint_at): Rewrite to use it.
549 (reinsert_breakpoint_handler): Delete.
550 (set_reinsert_breakpoint): New.
551 (reinsert_breakpoint_by_bp): Delete.
552 (delete_reinsert_breakpoints): New.
553 (uninsert_breakpoint): Rewrite.
554 (uninsert_breakpoints_at): New.
555 (reinsert_breakpoint): Rewrite.
556 (reinsert_breakpoints_at): New.
557 (check_breakpoints): Rewrite.
558 (breakpoint_here): New.
559 (breakpoint_inserted_here): New.
560 (check_mem_read): Adjust.
561 * mem-break.h (breakpoints_supported, breakpoint_here)
562 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
563 (reinsert_breakpoint_by_bp): Delete declaration.
564 (delete_reinsert_breakpoints): Declare.
565 (reinsert_breakpoint): Delete declaration.
566 (reinsert_breakpoints_at): Declare.
567 (uninsert_breakpoint): Delete declaration.
568 (uninsert_breakpoints_at): Declare.
569 (check_breakpoints): Adjust prototype.
570 * server.h: Adjust include order.
571 (struct thread_info): Declare here. Add a `last_status' field.
573 2010-03-23 Michael Snyder <msnyder@vmware.com>
575 * server.c (crc32): New function.
576 (handle_query): Add handling for 'qCRC:' request.
578 2010-03-23 Pedro Alves <pedro@codesourcery.com>
580 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
581 lwp had been stopped by a watchpoint.
583 2010-03-16 Pedro Alves <pedro@codesourcery.com>
585 * server.h (internal_error): Declare.
586 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
587 * utils.c (internal_error): New function.
589 2010-03-15 Andreas Schwab <schwab@redhat.com>
591 * configure.srv: Fix typo setting srv_regobj.
593 2010-03-15 Pedro Alves <pedro@codesourcery.com>
595 * linux-low.c (fetch_register): Avoid passing a non string literal
597 (usr_store_inferior_registers): Ditto.
599 2010-03-14 Pedro Alves <pedro@codesourcery.com>
601 * linux-low.c (linux_write_memory): Bail out early if peeking
604 2010-03-14 Pedro Alves <pedro@codesourcery.com>
606 * linux-low.h (struct lwp_info): New fields
607 `stopped_by_watchpoint' and `stopped_data_address'.
608 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
609 here, and cache them in the lwp object.
610 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
612 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
614 (linux_stopped_by_watchpoint): Rewrite.
615 (linux_stopped_data_address): Rewrite.
617 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
619 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
620 switching the current inferior, not before.
622 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
624 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
625 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
626 i386-linux.c and amd64-linux.c.
627 (reg-i386.o): Removed.
628 (reg-i386.c): Likewise.
629 (reg-i386-linux.o): Likewise.
630 (reg-i386-linux.c): Likewise.
631 (reg-x86-64.o): Likewise.
632 (reg-x86-64.c): Likewise.
633 (reg-x86-64-linux.o): Likewise.
634 (reg-x86-64-linux.c): Likewise.
637 (i386-linux.o): Likewise.
638 (i386-linux.c): Likewise.
641 (amd64-linux.o): Likewise.
642 (amd64-linux.c): Likewise.
644 * configure.srv (srv_i386_regobj): New.
645 (srv_i386_linux_regobj): Likewise.
646 (srv_amd64_regobj): Likewise.
647 (srv_amd64_linux_regobj): Likewise.
648 (srv_i386_32bit_xmlfiles): Likewise.
649 (srv_i386_64bit_xmlfiles): Likewise.
650 (srv_i386_xmlfiles): Likewise.
651 (srv_amd64_xmlfiles): Likewise.
652 (srv_i386_linux_xmlfiles): Likewise.
653 (srv_amd64_linux_xmlfiles): Likewise.
654 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
655 srv_xmlfiles to $srv_i386_xmlfiles.
656 (i[34567]86-*-mingw32ce*): Likewise.
657 (i[34567]86-*-mingw*): Likewise.
658 (i[34567]86-*-nto*): Likewise.
659 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
660 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
661 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
662 (x86_64-*-linux*): Likewise.
664 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
665 (init_registers_amd64_linux): New.
666 (x86_arch_setup): Replace init_registers_x86_64_linux with
667 init_registers_amd64_linux.
669 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
671 * configure.ac: Check for libdl. If it is not available link against
673 * configure: Regenerate.
675 2010-02-22 Pedro Alves <pedro@codesourcery.com>
679 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
680 handing a read watchpoint.
681 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
683 2010-02-12 Doug Evans <dje@google.com>
685 * linux-low.c (linux_supports_tracefork_flag): Document.
686 (linux_look_up_symbols): Add comment.
688 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
690 * regcache.c (supply_register): Clear regcache if buf is NULL.
692 2010-02-02 Nicolas Roche <roche@sourceware.org>
693 Joel Brobecker <brobecker@adacore.com>
695 * inferiors.c (find_inferior): Add function documentation.
696 (unloaded_dll): Handle the case where the unloaded dll has not
697 been previously registered in the dll list.
699 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
701 * linux-arm-low.c (thumb_breakpoint_len): Delete.
702 (thumb2_breakpoint): New.
703 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
705 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
707 * linux-low.c (get_stop_pc): Check for SIGTRAP.
708 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
711 2010-01-21 Pedro Alves <pedro@codesourcery.com>
713 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
715 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
717 * linux-s390-low.c (s390_collect_ptrace_register)
718 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
720 2010-01-21 Doug Evans <dje@google.com>
722 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
723 (PTRACE_ARG4_TYPE): New macro.
724 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
725 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
726 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
727 (usr_store_inferior_registers): Ditto.
728 (linux_read_memory, linux_write_memory): Ditto.
729 (linux_test_for_tracefork): Ditto.
731 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
732 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
734 2010-01-21 Pedro Alves <pedro@codesourcery.com>
736 * proc-service.c (ps_lgetregs): Don't refetch registers from the
739 2010-01-21 Pedro Alves <pedro@codesourcery.com>
741 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
742 prototype to take a regcache. Adjust.
744 2010-01-20 Pedro Alves <pedro@codesourcery.com>
746 * regcache.h (struct thread_info): Forward declare.
747 (struct regcache): New.
748 (new_register_cache): Adjust prototype.
749 (get_thread_regcache): Declare.
750 (free_register_cache): Adjust prototype.
751 (registers_to_string, registers_from_string): Ditto.
752 (supply_register, supply_register_by_name, collect_register)
753 (collect_register_as_string, collect_register_by_name): Ditto.
754 * regcache.c (struct inferior_regcache_data): Delete.
755 (get_regcache): Rename to ...
756 (get_thread_regcache): ... this. Adjust. Switch inferior before
758 (regcache_invalidate_one): Adjust.
759 (regcache_invalidate): Fix prototype.
760 (new_register_cache): Return the new register cache.
761 (free_register_cache): Change prototype.
762 (realloc_register_cache): Adjust.
763 (registers_to_string): Change prototype to take a regcache. Adjust.
764 (registers_from_string): Ditto.
765 (register_data): Ditto.
766 (supply_register): Ditto.
767 (supply_register_by_name): Ditto.
768 (collect_register): Ditto.
769 (collect_register_as_string): Ditto.
770 (collect_register_by_name): Ditto.
771 * server.c (process_serial_event): Adjust.
772 * linux-low.h (regset_fill_func, regset_store_func): Change
774 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
776 * linux-low.c (get_stop_pc): Adjust.
777 (check_removed_breakpoint): Adjust.
778 (linux_wait_for_event): Adjust.
779 (linux_resume_one_lwp): Adjust.
780 (fetch_register): Add regcache parameter. Adjust.
781 (usr_store_inferior_registers): Ditto.
782 (regsets_fetch_inferior_registers): Ditto.
783 (regsets_store_inferior_registers): Ditto.
784 (linux_fetch_registers, linux_store_registers): Ditto.
785 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
787 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
788 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
789 prototype to take a regcache.
790 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
791 * remote-utils.c (convert_ascii_to_int, outreg)
792 (prepare_resume_reply): Change prototype to take a regcache.
794 * target.h (struct target_ops) <fetch_registers, store_registers>:
795 Change prototype to take a regcache.
796 (fetch_inferior_registers, store_inferior_registers): Change
797 prototype to take a regcache. Adjust.
798 * proc-service.c (ps_lgetregs): Adjust.
799 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
800 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
801 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
802 take a regcache. Adjust.
803 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
804 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
805 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
806 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
807 * linux-cris-low.c (cris_get_pc, cris_set_pc)
808 (cris_cannot_fetch_register):
809 (cris_breakpoint_at): Change prototype to take a regcache.
811 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
812 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
813 to take a regcache. Adjust.
814 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
816 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
817 take a regcache. Adjust.
818 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
819 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
820 (m68k_set_pc): Change prototype to take a regcache. Adjust.
821 * linux-mips-low.c (mips_get_pc):
822 (mips_set_pc): Change prototype to take a regcache. Adjust.
823 (mips_reinsert_addr): Adjust.
824 (mips_collect_register): Change prototype to take a regcache.
826 (mips_supply_register):
827 (mips_collect_register_32bit, mips_supply_register_32bit)
828 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
829 (mips_store_fpregset): Ditto.
830 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
832 (parse_spufs_run): Adjust.
833 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
834 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
835 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
836 take a regcache. Adjust.
837 * linux-s390-low.c (s390_collect_ptrace_register)
838 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
839 (s390_set_pc): Change prototype to take a regcache. Adjust.
840 (s390_arch_setup): Adjust.
841 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
842 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
843 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
844 (sparc_fill_gregset, sparc_store_gregset_from_stack)
845 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
847 (sparc_breakpoint_at): Adjust.
848 * linux-xtensa-low.c (xtensa_fill_gregset):
849 (xtensa_store_gregset):
850 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
851 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
852 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
853 prototype to take a regcache. Adjust.
854 * win32-arm-low.c (arm_fetch_inferior_register)
855 (arm_store_inferior_register): Change prototype to take a
857 * win32-i386-low.c (i386_fetch_inferior_register)
858 (i386_store_inferior_register): Change prototype to take a
860 * win32-low.c (child_fetch_inferior_registers)
861 (child_store_inferior_registers): Change prototype to take a
863 (win32_wait): Adjust.
864 (win32_fetch_inferior_registers): Change prototype to take a
866 (win32_store_inferior_registers): Adjust.
867 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
868 store_inferior_register>: Change prototype to take a regcache.
870 2010-01-20 Doug Evans <dje@google.com>
872 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
874 (linux_wait_for_event1, linux_init_signals): Ditto.
875 (W_STOPCODE): Provide definition if missing.
877 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
879 * linux-low.c (linux_core_of_thread): New.
880 (compare_ints, show_process, list_threads): New.
881 (linux_qxfer_osdata): Report threads and cores.
882 (linux_target_op): Register linux_core_of_thread.
883 * remote-utils.c (prepare_resume_reply): Report the core.
884 (buffer_xml_printf): Support %d specifier.
885 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
887 (handle_query): Handle qXfer:threads. Announce availability
889 * target.h (struct target_ops): New field core_of_thread.
891 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
893 * Makefile.in (clean): Remove new generated files.
894 (reg-s390.o, reg-s390.c): Remove rules.
895 (reg-s390x.o, reg-s390x.c): Likewise.
896 (s390-linux32.o, s390-linux32.c): Add rules.
897 (s390-linux64.o, s390-linux64.c): Likewise.
898 (s390x-linux64.o, s390x-linux64.c): Likewise.
899 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
900 * linux-s390-low.c: Include <elf.h>.
901 (HWCAP_S390_HIGH_GPRS): Define if undefined.
902 (init_registers_s390): Remove prototype.
903 (init_registers_s390x): Likewise.
904 (init_registers_s390_linux32): Add prototype.
905 (init_registers_s390_linux64): Likewise.
906 (init_registers_s390x_linux64): Likewise.
907 (s390_num_regs_3264): New define.
908 (s390_regmap_3264): New global variable.
909 (s390_cannot_fetch_register): Remove obsolete check.
910 (s390_cannot_store_register): Likewise.
911 (s390_collect_ptrace_register): Handle upper/lower register halves.
912 (s390_supply_ptrace_register): Likewise.
913 (s390_fill_gregset): Update to register number changes.
914 (s390_get_hwcap): New routine.
915 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
916 Install appropriate regmap and register set.
918 2010-01-01 Joel Brobecker <brobecker@adacore.com>
920 * server.c (gdbserver_version): Update copyright year to 2010.
921 * gdbreplay.c (gdbreplay_version): Likewise.
923 2009-12-28 Doug Evans <dje@google.com>
925 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
926 elf/external.h. Include <elf.h> instead but only if necessary.
928 2009-12-28 Pedro Alves <pedro@codesourcery.com>
930 * linux-low.c (linux_remove_process): Remove `detaching'
931 parameter. Don't release/detach from thread_db here.
932 (linux_kill): Release/detach from thread_db here, ...
933 (linux_detach): ... and here, before actually detaching.
934 (linux_wait_1): ... and here, when a process exits.
935 * thread-db.c (any_thread_of): New.
936 (thread_db_free): Switch the current inferior to a thread of the
939 2009-12-21 Doug Evans <dje@google.com>
941 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
943 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
944 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
945 warning ifndef __NR_tkill. Move setting of errno there too.
946 Delete unnecessary resetting of errno after syscall.
947 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
949 * configure.ac: Check for dladdr.
950 * config.in: Regenerate.
951 * configure: Regenerate.
952 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
953 (try_thread_db_load): Update.
955 * linux-low.c (my_waitpid): Delete unnecessary prototype.
957 2009-12-18 Doug Evans <dje@google.com>
959 * event-loop.c: Include unistd.h if it exists.
961 * linux-low.c (my_waitpid): Move definition away from being in
962 between linux_tracefork_child/linux_test_for_tracefork.
964 * gdb_proc_service.h (psaddr_t): Fix type.
965 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
966 signature to match glibc.
968 2009-12-16 Doug Evans <dje@google.com>
970 * linux-low.c (linux_read_memory): Fix argument to read.
972 2009-11-26 Pedro Alves <pedro@codesourcery.com>
974 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
975 events, don't leave current_inferior pointing at null.
977 2009-11-26 Pedro Alves <pedro@codesourcery.com>
979 * win32-low.c (LOG): Delete.
980 (OUTMSG): Output to stderr.
981 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
982 on compile time LOG macro.
983 (win32_wait): Fix debug output.
985 2009-11-26 Pedro Alves <pedro@codesourcery.com>
987 * win32-low.c (win32_add_one_solib): If the dll name is
988 "ntdll.dll", prepend the system directory to the dll path.
990 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
992 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
994 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
995 Vladimir Prus <vladimir@codesourcery.com>
997 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
998 * configure.ac: Check for __mcoldfire__ and set
999 gdb_cv_m68k_is_coldfire.
1000 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
1001 reg-cf.o and reg-m68k.o.
1002 * configure: Regenerated.
1004 2009-11-16 Pedro Alves <pedro@codesourcery.com>
1006 * linux-low.c (linux_remove_process): Add `detaching' parameter.
1007 Pass it to thread_db_free.
1008 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
1009 proper `detaching' argument to linux_remove_process.
1010 * linux-low.h (thread_db_free): Add `detaching' parameter.
1011 * thread-db.c (thread_db_init): Pass false as `detaching' argument
1013 (thread_db_free): Add `detaching' parameter. Only
1014 call td_ta_clear_event if detaching from process.
1016 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
1018 * thread-db.c (thread_db_free): Fix typo.
1020 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
1023 * thread-db.c (thread_db_free): Call td_ta_clear_event.
1025 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
1027 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
1028 with an i686 compiler.
1029 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
1031 * configure: Rebuilt.
1033 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1037 * server.c (handle_search_memory_1): Correct read_addr initialization
1038 in loop for searching subsequent chunks.
1040 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
1042 * configure.ac: New --with-libthread-db option.
1043 * thread-db.c: Allow direct dependence on libthread_db.
1044 (thread_db_free): Adjust.
1045 * config.in: Regenerate.
1046 * configure: Likewise.
1048 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
1051 * thread-db.c (attach_thread): New function.
1052 (maybe_attach_thread): Return success/failure.
1053 (find_new_threads_callback): Adjust.
1054 (thread_db_find_new_threads): Loop until no new threads.
1056 2009-10-13 Pedro Alves <pedro@codesourcery.com>
1058 * proc-service.c (ps_lgetregs): Formatting.
1060 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
1062 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
1063 * configure.ac: Adjust.
1064 * linux-low.h (struct process_info_private): Move members to struct
1066 (thread_db_free, thread_db_handle_monitor_command): New prototype.
1067 * linux-low.c (linux_remove_process): Adjust.
1068 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
1069 * server.c (handle_query): Move code ...
1070 (handle_monitor_command): ... here. New function.
1071 * target.h (struct target_ops): New member.
1072 * thread-db.c (struct thread_db): New.
1073 (libthread_db_search_path): New variable.
1074 (thread_db_create_event, thread_db_enable_reporting)
1075 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
1076 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
1077 (try_thread_db_load_1, dladdr_to_soname): New functions.
1078 (try_thread_db_load, thread_db_load_search): New functions.
1079 (thread_db_init): Search for libthread_db.
1080 (thread_db_free): New function.
1081 (thread_db_handle_monitor_command): Likewise.
1082 * config.in: Regenerate.
1083 * configure: Regenerate.
1085 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1087 * spu-low.c (spu_kill): Wait for inferior to terminate.
1088 Call clear_inferiors.
1089 (spu_detach): Call clear_inferiors.
1091 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1093 * aclocal.m4: Regenerate.
1094 * config.in: Likewise.
1095 * configure: Likewise.
1097 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1099 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1100 (parse_spufs_run): New function.
1101 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1102 (ppc_breakpoint_at): Handle SPU breakpoints.
1104 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1106 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1107 (SPUFS_MAGIC): Define.
1108 (spu_enumerate_spu_ids): New function.
1109 (linux_qxfer_spu): New function.
1110 (linux_target_ops): Install linux_qxfer_spu.
1112 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1114 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1115 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1116 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1117 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1118 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1119 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1120 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1121 (init_registers_powerpc_cell32l): Add prototype.
1122 (init_registers_powerpc_cell64l): Likewise.
1123 (ppc_arch_setup): Detect Cell/B.E. architecture.
1125 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1127 * Makefile.in (datarootdir): New variable.
1129 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1131 * linux-low.c (linux_write_memory): Update debugging output.
1132 * Makefile.in (clean): Add new descriptions.
1133 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1134 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1135 * configure.srv: Add new files for arm*-*-linux*.
1136 * linux-arm-low.c: Add new declarations.
1137 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1138 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1139 (HWCAP_VFPv3D16): New.
1140 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1141 instead of __IWMMXT__.
1142 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1143 (arm_arch_setup): New.
1144 (target_regsets): Remove #ifdef. Add VFP regset.
1145 (the_low_target): Use arm_arch_setup.
1147 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1149 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1150 the main thread again.
1152 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1154 Adding Neutrino gdbserver.
1155 * configure: Regenerated.
1156 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1157 * configure.srv (i[34567]86-*-nto*): New target.
1158 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1159 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1160 (nto_comctrl) [__QNX__]: New function.
1161 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1163 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1165 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1168 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1169 Pedro Alves <pedro@codesourcery.com>
1171 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1172 don't support CONTEXT_EXTENDED_REGISTERS.
1173 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1174 (the_low_target): Install them.
1175 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1176 failing with ERROR_PIPE_NOT_CONNECTED.
1178 2009-06-30 Doug Evans <dje@google.com>
1179 Pierre Muller <muller@ics.u-strasbg.fr>
1181 Add h/w watchpoint support to x86-linux, win32-i386.
1182 * Makefile.in (SFILES): Add i386-low.c
1183 (i386_low_h): Define.
1184 (i386-low.o): Add dependencies.
1185 (linux-x86-low.o): Add i386-low.h dependency.
1186 (win32-i386-low.o): Ditto.
1187 * i386-low.c: New file.
1188 * i386-low.h: New file.
1189 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1190 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1191 * linux-low.c (linux_add_process): Initialize arch_private.
1192 (linux_remove_process): Free arch_private.
1193 (add_lwp): Initialize arch_private.
1194 (delete_lwp): Free arch_private.
1195 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1197 * linux-low.h (process_info_private): New member arch_private.
1198 (lwp_info): New member arch_private.
1199 (linux_target_ops): New members new_process, new_thread,
1201 (ptid_of): New macro.
1202 * linux-x86-low.c: Include stddef.h, i386-low.h.
1203 (arch_process_info): New struct.
1204 (arch_lwp_info): New struct.
1205 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1206 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1207 (i386_dr_low_get_status): New function.
1208 (x86_insert_point, x86_remove_point): New functions.
1209 (x86_stopped_by_watchpoint): New function.
1210 (x86_stopped_data_address): New function.
1211 (x86_linux_new_process, x86_linux_new_thread): New functions.
1212 (x86_linux_prepare_to_resume): New function.
1213 (the_low_target): Add entries for insert_point, remove_point,
1214 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1216 * server.c (debug_hw_points): New global.
1217 (monitor_show_help): Document set debug-hw-points.
1218 (handle_query): Process "set debug-hw-points".
1219 * server.h (debug_hw_points): Declare.
1220 (paddress): Declare.
1221 * utils.c (NUMCELLS, CELLSIZE): New macros.
1222 (get_sell, xsnprintf, paddress): New functions.
1223 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1224 remove_point, stopped_by_watchpoint, stopped_data_address.
1225 * win32-i386-low.c: Include i386-low.h.
1226 (debug_reg_state): Replaces dr.
1227 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1228 (i386_dr_low_get_status): New function.
1229 (i386_insert_point, i386_remove_point): New functions.
1230 (i386_stopped_by_watchpoint): New function.
1231 (i386_stopped_data_address): New function.
1232 (i386_initial_stuff): Update.
1233 (get_thread_context,set_thread_context,i386_thread_added): Update.
1234 (the_low_target): Add entries for insert_point,
1235 remove_point, stopped_by_watchpoint, stopped_data_address.
1236 * win32-low.c (win32_insert_watchpoint): New function.
1237 (win32_remove_watchpoint): New function.
1238 (win32_stopped_by_watchpoint): New function.
1239 (win32_stopped_data_address): New function.
1240 (win32_target_ops): Add entries for insert_watchpoint,
1241 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1242 * win32-low.h (win32_target_ops): New members insert_point,
1243 remove_point, stopped_by_watchpoint, stopped_data_address.
1245 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1247 * server.c (process_serial_event): Re-return unsupported, not
1248 error, if the type isn't recognized. Re-allow supporting only
1249 insert or remove packets. Also call require_running for
1250 breakpoints. Add missing break statement to default case. Tidy.
1251 * target.h (struct target_ops): Rename insert_watchpoint to
1252 insert_point, and remove_watchpoint to remove_point.
1254 * linux-low.h (struct linux_target_ops): Likewise.
1255 * linux-low.c (linux_insert_watchpoint): Rename to ...
1256 (linux_insert_point): ... this. Adjust.
1257 (linux_remove_watchpoint): Rename to ...
1258 (linux_remove_point): ... this. Adjust.
1259 (linux_target_ops): Adjust.
1260 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1261 (cris_insert_point): ... this.
1262 (cris_remove_watchpoint): Rename to ...
1263 (cris_remove_point): ... this.
1264 (the_low_target): Adjust.
1266 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1268 * server.c (handle_v_kill): Pass signal_pid to
1269 kill_inferior if multi_process is zero.
1271 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1273 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1274 * target.h (target_ops): Comment for *_watchpoint to make it clear
1275 the functions can get types '0' and '1'.
1277 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1279 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1280 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1281 * regcache.c (get_regcache): Likewise.
1282 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1283 * win32-low.c (child_fetch_inferior_registers): Remove check for
1286 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1287 Pedro Alves <pedro@codesourcery.com>
1289 * target.h (struct target_ops) <supports_multi_process>: New
1291 (target_supports_multi_process): New.
1292 * server.c (handle_query): Even if GDB reports support, only
1293 enable multi-process if the target also supports it. Report
1294 multi-process support only if the target backend supports it.
1295 * linux-low.c (linux_supports_multi_process): New function.
1296 (linux_target_ops): Install it as target_supports_multi_process
1299 2009-05-24 Doug Evans <dje@google.com>
1301 Global renaming of find_thread_pid to find_thread_ptid.
1302 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1303 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1304 All callers updated.
1306 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1307 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1310 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1311 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1312 (linux_resume_one_lwp): Ditto.
1314 2009-05-23 Doug Evans <dje@google.com>
1316 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1317 from struct inferior_list_entry * to struct lwp_info *.
1318 All callers updated.
1320 2009-05-13 Doug Evans <dje@google.com>
1322 * linux-x86-low.c: Don't include assert.h.
1323 (x86_siginfo_fixup): Use fatal, not assert.
1324 (x86_arch_setup): Fix comment.
1326 2009-05-12 Doug Evans <dje@google.com>
1328 Biarch support for i386/amd64 gdbserver.
1329 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1330 Add linux-x86-low.c.
1331 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1332 (linux-x86-low.o): Add.
1333 * linux-x86-64-low.c: Delete.
1334 * linux-i386-low.c: Delete.
1335 * linux-x86-low.c: New file.
1336 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1338 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1340 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1341 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1342 (linux_child_pid_to_exec_file): New function.
1343 (elf_64_header_p, elf_64_file_p): New functions.
1344 (siginfo_fixup): New function.
1345 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1346 give target a chance to convert layout.
1347 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1348 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1350 2009-05-07 Doug Evans <dje@google.com>
1352 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1353 (regsets_store_inferior_registers): Ditto.
1355 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1359 * linux-low.c (must_set_ptrace_flags): Delete.
1360 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1362 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1363 `lwp->must_set_ptrace_flags' instead.
1364 (linux_wait_for_event_1): Set ptrace options here.
1365 (linux_wait_1): ... not here.
1367 2009-04-30 Doug Evans <dje@google.com>
1369 * inferiors.c (started_inferior_callback): New function.
1370 (attached_inferior_callback): New function.
1371 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1372 * server.c (print_started_pid, print_attached_pid): New functions.
1373 (detach_or_kill_for_exit): New function.
1374 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1375 * server.h (have_started_inferiors_p): Declare.
1376 (have_attached_inferiors_p): Declare.
1378 * inferiors.c (remove_process): Fix memory leak, free process.
1379 * linux-low.c (linux_remove_process): New function.
1380 (linux_kill): Call it instead of remove_process.
1381 (linux_detach, linux_wait_1): Ditto.
1383 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1385 * configure.srv: Add x86 Windows CE target.
1387 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1389 * inferiors.c (get_thread_process): Make global.
1390 * server.h (get_thread_process): Add prototype.
1391 * thread-db.c (find_one_thread): Use get_thread_process
1392 instead of current_process.
1393 (thread_db_get_tls_address): Do not crash if called when
1394 thread layer is not yet initialized.
1396 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1398 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1399 * spu-low.c (current_tid): Rename to ...
1400 (current_ptid): ... this.
1401 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1402 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1403 ptid_get_lwp (current_ptid) instead of current_tid.
1404 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1405 instead of current_tid. Use find_process_pid to verify pid
1406 argument is valid. Pass proper argument to remove_process.
1407 (spu_thread_alive): Compare current_ptid instead of current_tid.
1408 (spu_resume): Likewise.
1410 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1412 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1415 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1417 Implement the multiprocess extensions, and add linux multiprocess
1420 * server.h (ULONGEST): Declare.
1421 (struct ptid, ptid_t): New.
1422 (minus_one_ptid, null_ptid): Declare.
1423 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1424 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1425 (struct inferior_list_entry): Change `id' type from unsigned from
1427 (struct sym_cache, struct breakpoint, struct
1428 process_info_private): Forward declare.
1429 (struct process_info): Declare.
1430 (current_process): Declare.
1431 (all_processes): Declare.
1432 (initialize_inferiors): Declare.
1433 (add_thread): Adjust to use ptid_t.
1434 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1435 (add_process, remove_process, find_thread_pid): Declare.
1436 (find_inferior_id): Adjust to use ptid_t.
1437 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1438 (multi_process): Declare.
1439 (push_event): Adjust to use ptid_t.
1440 (read_ptid, write_ptid): Declare.
1441 (prepare_resume_reply): Adjust to use ptid_t.
1442 (clear_symbol_cache): Declare.
1443 * inferiors.c (all_processes): New.
1444 (null_ptid, minus_one_ptid): New.
1445 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1446 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1447 (add_thread): Change unsigned long to ptid. Remove gdb_id
1449 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1450 (gdb_id_to_thread): Rename to ...
1451 (find_thread_pid): ... this. Change unsigned long to ptid.
1452 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1453 (loaded_dll, pull_pid_from_list): Adjust.
1454 (add_process, remove_process, find_process_pid)
1455 (get_thread_process, current_process, initialize_inferiors): New.
1456 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1457 (struct target_waitstatus) <related_pid>: Ditto.
1458 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1460 (struct target_ops) <join>: Add `pid' argument.
1461 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1462 (struct target_ops) <wait>: Add `ptid' field. Change return type
1464 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1465 (mywait): Add `ptid' argument. Change return type to ptid_t.
1466 (target_pid_to_str): Declare.
1467 * target.c (set_desired_inferior): Adjust to use ptids.
1468 (mywait): Add new `ptid' argument. Adjust.
1469 (target_pid_to_str): New.
1470 * mem-break.h (free_all_breakpoints): Declare.
1471 * mem-break.c (breakpoints): Delelete.
1472 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1473 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1474 to use per-process breakpoint list.
1475 (free_all_breakpoints): New.
1476 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1477 (symbol_cache, all_symbols_looked_up): Delete.
1479 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1481 (prepare_resume_reply): Change ptid argument's type from unsigned
1482 long to ptid_t. Adjust. Implement W;process and X;process.
1483 (free_sym_cache, clear_symbol_cache): New.
1484 (look_up_one_symbol): Adjust to per-process symbol cache. *
1485 * server.c (cont_thread, general_thread, step_thread): Change type
1488 (multi_process): New.
1489 (last_ptid): Change type to ptid_t.
1490 (struct vstop_notif) <ptid>: Change type to ptid_t.
1491 (queue_stop_reply, push_event): Change `ptid' argument's type to
1493 (discard_queued_stop_replies): Add `pid' argument.
1494 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1495 changes. Don't reference the `attached' global.
1496 (attach_inferior): Adjust to mywait interface changes.
1497 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1498 features. Handle and report "multiprocess+". Handle
1500 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1502 (handle_v_kill): New.
1503 (handle_v_stopped): Adjust to use target_pid_to_str.
1504 (handle_v_requests): Allow multiple attaches and runs when
1505 multiprocess extensions are in effect. Handle "vKill".
1506 (myresume): Adjust to use ptids.
1507 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1508 (handle_status): Adjust to discard_queued_stop_replies interface
1510 (first_thread_of, kill_inferior_callback)
1511 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1512 (main): Call initialize_inferiors. Adjust to use ptids, killing
1513 and detaching from all inferiors. Handle multiprocess packet
1515 * linux-low.h: Include gdb_proc_service.h.
1516 (struct process_info_private): New.
1517 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1518 <lwpid_of>: Use ptid_get_lwp.
1519 (get_lwp_thread): Adjust.
1520 (struct lwp_info): Add `dead' member.
1521 (find_lwp_pid): Declare.
1522 * linux-low.c (thread_db_active): Delete.
1523 (new_inferior): Adjust comment.
1524 (inferior_pid): Delete.
1525 (linux_add_process): New.
1526 (handle_extended_wait): Adjust.
1527 (add_lwp): Change unsigned long to ptid.
1528 (linux_create_inferior): Add process to processes table. Adjust
1529 to use ptids. Don't set new_inferior here.
1530 (linux_attach_lwp): Rename to ...
1531 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1532 it. Adjust to use ptids.
1533 (linux_attach_lwp): New.
1534 (linux_attach): Add process to processes table. Don't set
1536 (struct counter): New.
1537 (second_thread_of_pid_p, last_thread_of_process_p): New.
1538 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1540 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1541 processes. Remove process from process table.
1542 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1543 to multiple processes.
1544 (any_thread_of): New.
1545 (linux_detach): Add `pid' argument, and handle it. Remove process
1546 from processes table.
1547 (linux_join): Add `pid' argument. Handle it.
1548 (linux_thread_alive): Change unsighed long argument to ptid_t.
1549 Consider dead lwps as not being alive.
1550 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1551 threads we're not interested in.
1552 (same_lwp, find_lwp_pid): New.
1553 (linux_wait_for_lwp): Change `pid' argument's type from int to
1555 (linux_wait_for_event): Rename to ...
1556 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1557 from int to ptid_t. Adjust.
1558 (linux_wait_for_event): New.
1559 (linux_wait_1): Add `ptid' argument. Change return type to
1560 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1561 that exit from the process table.
1562 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1564 (mark_lwp_dead): New.
1565 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1566 stopping all threads, mark its main lwp as dead.
1567 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1569 (fetch_register, usr_store_inferior_registers)
1570 (regsets_fetch_inferior_registers)
1571 (regsets_store_inferior_registers, linux_read_memory)
1572 (linux_write_memory): Inline `inferior_pid'.
1573 (linux_look_up_symbols): Adjust to use per-process
1575 (linux_request_interrupt): Adjust to use ptids.
1576 (linux_read_auxv): Inline `inferior_pid'.
1577 (initialize_low): Don't reference thread_db_active.
1578 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1579 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1580 (ps_getpid): Return the pid of the current inferior.
1581 * thread-db.c (proc_handle, thread_agent): Delete.
1582 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1584 (find_one_thread): Change argument type to ptid_t. Adjust to
1586 (maybe_attach_thread): Adjust to per-process data and ptids.
1587 (thread_db_find_new_threads): Ditto.
1588 (thread_db_init): Ditto.
1589 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1590 processes table. Adjust to use ptids.
1591 (spu_kill, spu_detach): Adjust interface. Remove process from
1593 (spu_join, spu_thread_alive): Adjust interface.
1594 (spu_wait): Adjust interface. Remove process from processes
1595 table. Adjust to use ptids.
1596 * win32-low.c (current_inferior_tid): Delete.
1597 (current_inferior_ptid): New.
1598 (debug_event_ptid): New.
1599 (thread_rec): Take a ptid. Adjust.
1600 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1601 (child_delete_thread): Ditto.
1602 (do_initial_child_stuff): Add `attached' argument. Add process to
1604 (child_fetch_inferior_registers, child_store_inferior_registers):
1606 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1607 (win32_attach): Pass 1 to do_initial_child_stuff.
1608 (win32_kill): Adjust interface. Remove process from processes
1610 (win32_detach): Ditto.
1611 (win32_join): Adjust interface.
1612 (win32_thread_alive): Take a ptid.
1613 (win32_resume): Adjust to use ptids.
1614 (get_child_debug_event): Ditto.
1615 (win32_wait): Adjust interface. Remove exiting process from
1618 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1620 Non-stop mode support.
1622 * server.h (non_stop): Declare.
1623 (gdb_client_data, handler_func): Declare.
1624 (delete_file_handler, add_file_handler, start_event_loop):
1626 (handle_serial_event, handle_target_event, push_event)
1627 (putpkt_notif): Declare.
1628 * target.h (enum resume_kind): New.
1629 (struct thread_resume): Replace `step' field by `kind' field.
1630 (TARGET_WNOHANG): Define.
1631 (struct target_ops) <wait>: Add `options' argument.
1632 <supports_non_stop, async, start_non_stop>: New fields.
1633 (target_supports_non_stop, target_async): New.
1634 (start_non_stop): Declare.
1635 (mywait): Add `options' argument.
1636 * target.c (mywait): Add `options' argument. Print child exit
1638 (start_non_stop): New.
1639 * server.c (non_stop, own_buf, mem_buf): New globals.
1640 (struct vstop_notif): New.
1641 (notif_queue): New global.
1642 (queue_stop_reply, push_event, discard_queued_stop_replies)
1643 (send_next_stop_reply): New.
1644 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1646 (attach_inferior): In non-stop mode, don't wait for the target
1648 (handle_general_set): Handle QNonStop.
1649 (handle_query): When handling qC, return the current general
1650 thread, instead of the first thread of the list.
1651 (handle_query): If the backend supports non-stop mode, include
1652 QNonStop+ in the qSupported query response.
1653 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1655 (handle_v_attach, handle_v_run): Handle non-stop mode.
1656 (handle_v_stopped): New.
1657 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1658 (myresume): Adjust to use resume_kind. Handle non-stop.
1659 (queue_stop_reply_callback): New.
1660 (handle_status): Handle non-stop mode.
1661 (main): Clear non_stop flag on reconnection. Use the event-loop.
1662 Refactor serial protocol handling from here ...
1663 (process_serial_event): ... to this new function. When GDB
1664 selects any thread, select one here. In non-stop mode, wait until
1665 GDB acks all pending events before exiting.
1666 (handle_serial_event, handle_target_event): New.
1667 * remote-utils.c (remote_open): Install remote_desc in the event
1669 (remote_close): Remove remote_desc from the event loop.
1670 (putpkt_binary): Rename to...
1671 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1672 (putpkt_binary): New as wrapper around putpkt_binary_1.
1673 (putpkt_notif): New.
1674 (prepare_resume_reply): In non-stop mode, don't change the
1676 * event-loop.c: New.
1677 * Makefile.in (OBJ): Add event-loop.o.
1678 (event-loop.o): New rule.
1680 * linux-low.h (pid_of): Moved here.
1682 (get_lwp_thread): Use lwpid_of.
1683 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1684 * linux-low.c (pid_of): Delete.
1685 (inferior_pid): Use lwpid_of.
1686 (linux_event_pipe): New.
1687 (target_is_async_p): New.
1689 (handle_extended_wait): Use lwpid_of.
1690 (add_lwp): Don't set lwpid field.
1691 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1692 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1693 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1694 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1695 first. Adjust to linux_wait_for_event interface changes. Use
1697 (linux_detach): Don't delete the main lwp here.
1698 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1699 (status_pending_p): Don't consider explicitly suspended lwps.
1700 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1701 pointer. Add OPTIONS argument. Change return type to int. Use
1702 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1703 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1704 pointer. Add status pointer argument. Return a pid instead of a
1705 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1706 changes. In non-stop mode, don't switch to a random thread.
1707 (linux_wait): Rename to...
1708 (linux_wait_1): ... this. Add target_options argument, and handle
1709 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1710 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1711 clean exit and signal exit code. Don't stop all threads in
1712 non-stop mode. In all-stop mode, only stop all threads when
1713 reporting a stop to GDB. Handle explicit thread stop requests.
1714 (async_file_flush, async_file_mark): New.
1716 (send_sigstop): Use lwpid_of.
1717 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1718 interface changes. In non-stop mode, don't switch to a random
1720 (linux_resume_one_lwp): Use lwpid_of.
1721 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1722 (linux_resume_one_thread): ... this. Handle resume_stop. In
1723 non-stop mode, don't look for pending flag in all threads.
1724 (resume_status_pending_p): Don't consider explicitly suspended
1726 (my_waitpid): Reimplement. Emulate __WALL.
1727 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1729 (sigchld_handler, linux_supports_non_stop, linux_async)
1730 (linux_start_non_stop): New.
1731 (linux_target_ops): Register linux_supports_non_stop, linux_async
1732 and linux_start_non_stop.
1733 (initialize_low): Install SIGCHLD handler.
1734 * thread-db.c (thread_db_create_event, find_one_thread)
1735 (thread_db_get_tls_address): Use lwpid_of.
1736 * win32-low.c (win32_detach): Adjust to use resume_kind.
1737 (win32_wait): Add `options' argument.
1738 * spu-low.c (spu_resume): Adjust to use resume_kind.
1739 (spu_wait): Add `options' argument.
1741 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1743 Decouple target code from remote protocol.
1745 * target.h (enum target_waitkind): New.
1746 (struct target_waitstatus): New.
1747 (struct target_ops) <wait>: Return an unsigned long. Take a
1748 target_waitstatus pointer instead of a char pointer.
1750 * target.c (mywait): Change prototype to return an unsigned long.
1751 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1752 * server.h (thread_from_wait, old_thread_from_wait): Delete
1754 (prepare_resume_reply): Change prototype to take a
1756 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1757 (last_status, last_ptid): New.
1758 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1759 pid instead of a signal.
1760 (attach_inferior): Remove "status" and "signal" parameters.
1762 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1764 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1765 (handle_v_requests, myresume): Remove "status" and "signal"
1767 (handle_status): New.
1768 (main): Delete local `status'. Adjust.
1769 * remote-utils.c: Include target.h.
1770 (prepare_resume_reply): Change prototype to take a
1771 target_waitstatus. Adjust.
1773 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1775 * spu-low.c (spu_wait): Adjust.
1776 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1778 (win32_wait): Adjust.
1780 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1782 * target.h (struct thread_resume): Delete leave_stopped member.
1783 (struct target_ops): Add a `n' argument to the `resume' callback.
1784 * server.c (start_inferior): Adjust.
1785 (handle_v_cont, myresume): Adjust.
1786 * linux-low.c (check_removed_breakpoint): Adjust to resume
1787 interface change, and to removed leave_stopped field.
1788 (resume_ptr): Delete.
1789 (struct thread_resume_array): New.
1790 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1791 resume interface change.
1792 (linux_continue_one_thread, linux_queue_one_thread)
1793 (resume_status_pending_p): Check if the resume field is NULL
1794 instead of checking the leave_stopped member.
1795 (linux_resume): Adjust to the target resume interface change.
1796 * spu-low.c (spu_resume): Adjust to the target resume interface
1798 * win32-low.c (win32_detach, win32_resume): Ditto.
1800 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1802 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1804 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1806 (linux_continue_one_thread): Only preserve the stepping flag if
1807 there's a pending breakpoint.
1809 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1811 * server.c (main): After the inferior having exited, call
1812 remote_close before exiting gdbserver.
1814 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1816 Fix size of FPSCR in Power 7 processors.
1817 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1818 (PPC_FEATURE_HAS_DFP): New #define.
1819 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1822 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1824 * server.c (handle_query) Whitespace and formatting.
1826 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1828 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1829 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1830 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1831 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1832 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1833 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1834 Makefile.in, configure.ac: Fix whitespace throughout.
1835 * configure: Regenerate.
1837 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1839 * inferiors.c (find_inferior): Make it safe for the callback
1840 function to delete the currently iterated inferior.
1842 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1844 * Makefile.in (linuw_low_h): Move higher.
1845 (thread-db.o): Depend on $(linux_low_h).
1847 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1849 Rename "process" to "lwp" throughout.
1851 * linux-low.c (all_processes): Rename to...
1852 (all_lwps): ... this.
1853 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1854 (add_process): Rename to ...
1855 (add_lwp): ... this. Adjust.
1856 (linux_create_inferior): Adjust.
1857 (linux_attach_lwp): Adjust.
1858 (linux_attach): Adjust.
1859 (linux_kill_one_process): Rename to ...
1860 (linux_kill_one_lwp): ... this. Adjust.
1861 (linux_kill): Adjust.
1862 (linux_detach_one_process): Rename to ...
1863 (linux_detach_one_lwp): ... this. Adjust.
1864 (linux_detach): Adjust.
1865 (check_removed_breakpoint): Adjust.
1866 (status_pending_p): Adjust.
1867 (linux_wait_for_process): Rename to ...
1868 (linux_wait_for_lwp): ... this. Adjust.
1869 (linux_wait_for_event): Adjust.
1870 (send_sigstop): Adjust.
1871 (wait_for_sigstop): Adjust.
1872 (stop_all_processes): Rename to ...
1873 (stop_all_lwps): ... this.
1874 (linux_resume_one_process): Rename to ...
1875 (linux_resume_one_lwp): ... this. Adjust.
1876 (linux_set_resume_request, linux_continue_one_thread)
1877 (linux_queue_one_thread, resume_status_pending_p)
1878 (usr_store_inferior_registers, regsets_store_inferior_registers)
1879 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1881 * linux-low.h (get_process): Rename to ...
1882 (get_lwp): ... this. Adjust.
1883 (get_thread_process): Rename to ...
1884 (get_thread_lwp): ... this. Adjust.
1885 (get_process_thread): Rename to ...
1886 (get_lwp_thread): ... this. Adjust.
1887 (struct process_info): Rename to ...
1888 (struct lwp_info): ... this.
1889 (all_processes): Rename to ...
1890 (all_lwps): ... this.
1891 * proc-service.c (ps_lgetregs): Adjust.
1892 * thread-db.c (thread_db_create_event, find_one_thread)
1893 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1895 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1897 * server.c (handle_query): Handle "qAttached".
1899 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1901 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1902 GPLv3, update license URL.
1904 2009-03-01 Doug Evans <dje@google.com>
1906 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1907 (server_h): Add gdb_signals.h.
1908 (signals.o): Update.
1909 * server.h (target_signal_from_host,target_signal_to_host_p)
1910 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1912 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1914 * remote-utils.c (getpkt): Also generate remote-debug
1915 information if noack_mode is set.
1917 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1919 * server.c (handle_query): Report qXfer:siginfo:read and
1920 qXfer:siginfo:write as supported and handle them.
1921 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1922 * linux-low.c (linux_xfer_siginfo): New.
1923 (linux_target_ops): Set it.
1925 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1927 * server.c (gdbserver_usage): Mention --remote-debug.
1928 (main): Accept '--remote-debug' switch.
1930 2009-01-18 Doug Evans <dje@google.com>
1932 * regcache.c (new_register_cache): No need to check result of xcalloc.
1933 * server.c (handle_search_memory): Back out calls to xmalloc,
1934 result is checked and error is returned to user upon failure.
1935 (handle_query): Ditto. Add more checks for result of malloc.
1936 (handle_v_cont): Check result of malloc, report error back to
1938 (handle_v_run): Ditto. Call freeargv.
1939 * server.h (freeargv): Declare.
1940 * utils.c (freeargv): New fn.
1942 2009-01-15 Doug Evans <dje@google.com>
1944 * gdbreplay.c (perror_with_name): Make arg const char *.
1945 * server.h (target_signal_to_name): Make return type const char *.
1946 * thread-db.c (thread_db_err_str): Make return type const char *.
1947 * utils.c (perror_with_name): Make arg const char *.
1949 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1951 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1952 when handling a EXIT_PROCESS_DEBUG_EVENT.
1954 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1956 * gdbreplay.c (gdbreplay_version): Update copyright year.
1957 * server.c (gdbserver_version): Likewise.
1959 2009-01-05 Doug Evans <dje@google.com>
1961 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1962 (handle_extended_wait): Improve comment.
1964 2008-12-13 Doug Evans <dje@google.com>
1966 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1967 * server.h (ATTR_MALLOC): New macro.
1968 (xmalloc,xcalloc,xstrdup): Declare.
1969 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1970 * inferiors.c: Ditto.
1971 * linux-low.c: Ditto.
1972 * mem-break.c: Ditto.
1973 * regcache.c: Ditto.
1974 * remote-utils.c: Ditto.
1977 * win32-low.c: Ditto.
1979 2008-12-12 Doug Evans <dje@google.com>
1981 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1982 in debugging printf.
1984 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1986 2008-12-09 Doug Evans <dje@google.com>
1988 * linux-low.h (struct process_info): Delete member tid, unused.
1989 * thread-db.c (find_one_thread): Update.
1990 (maybe_attach_thread): Update.
1992 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1994 * target.h (struct target_ops): Add qxfer_osdata member.
1995 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1997 (linux_qxfer_osdata): New functions.
1998 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
2000 * server.c (handle_query): Handle "qXfer:osdata:read:".
2001 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
2002 (buffer_xml_printf): New functions.
2003 * server.h (struct buffer): New.
2004 (buffer_grow_str, buffer_grow_str0): New macros.
2005 (buffer_grow, buffer_free, buffer_init, buffer_finish)
2006 (buffer_xml_printf): Declare.
2008 2008-11-24 Doug Evans <dje@google.com>
2010 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
2012 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
2014 * server.c (handle_v_run): Always use the supplied argument list.
2016 2008-11-19 Bob Wilson <bob.wilson@acm.org>
2018 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
2019 (xtensa_regmap_table): Add entry for scompare1.
2021 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
2023 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
2024 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
2025 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
2026 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
2027 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
2028 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
2029 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
2030 XML target descriptions.
2031 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
2032 when inferior is running on an ISA 2.05 or later processor. Add
2033 special case to return offset for full 64-bit slot of FPSCR when
2036 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
2038 * Makefile.in (SFILES, clean): Added sparc64 files.
2039 (reg-sparc64.o, reg-sparc64.c): New.
2040 * configure.srv (sparc*-*-linux*): New configuration.
2041 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
2042 syscall arguments for SPARC.
2043 (regsets_store_inferior_registers): Likewise.
2044 * linux-sparc-low.c: New file.
2046 2008-10-21 Doug Evans <dje@google.com>
2048 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
2049 (READLINE_DIR,READLINE_DEP): Delete.
2050 (INTERNAL_CFLAGS): Update.
2051 (LINTFLAGS): Update.
2053 2008-10-10 Pedro Alves <pedro@codesourcery.com>
2055 * server.c (handle_v_run): If GDB didn't specify an argv, use the
2056 whole argv from the last run, not just argv[0].
2058 2008-09-08 Pedro Alves <pedro@codesourcery.com>
2060 * regcache.c (new_register_cache): Return NULL if the register
2061 cache size isn't known yet.
2062 (free_register_cache): Avoid dereferencing a NULL regcache.
2064 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2066 * configure.srv: Merge MIPS and MIPS64.
2068 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
2070 * Makefile.in (uninstall): Apply $(EXEEXT) too.
2072 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
2074 * Makefile.in: Add required vsx dependencies.
2076 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
2077 Declare init_registers_powerpc_vsx32l.
2078 Declare init_registers_powerpc_vsx64l.
2079 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2080 (ppc_arch_setup): Check for VSX in hwcap.
2081 (ppc_fill_vsxregset): New function.
2082 (ppc_store_vsxregset): New function.
2083 Add new VSX entry in regset_info target_regsets.
2085 * configure.srv: Add new VSX dependencies.
2087 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2089 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2090 (remote_open): Set or clear transport_is_reliable.
2091 (putpkt_binary): Don't expect acks in noack mode.
2092 (getpkt): Don't send ack/nac in noack mode.
2093 * server.c (handle_general_set): Handle QStartNoAckMode.
2094 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2096 (main): Reset noack_mode on every connection.
2097 * server.h (noack_mode): Declare.
2099 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2101 * Makefile.in (GDBREPLAY_OBS): New variable.
2102 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2104 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2105 Daniel Jacobowitz <dan@codesourcery.com>
2107 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2108 (usr_store_inferior_registers): Likewise.
2109 (regsets_store_inferior_registers): Likewise.
2111 2008-07-31 Rolf Jansen <rj@surtec.com>
2112 Pedro Alves <pedro@codesourcery.com>
2114 * configure.ac: Check for memmem declaration.
2115 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2116 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2117 (disable_packet_qfThreadInfo): Unconditionally compile.
2118 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2119 * configure, config.in: Regenerate.
2121 2008-07-28 Doug Kwan <dougkwan@google.com>
2123 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2124 (linux_write_memory): Remove declaration of errno.
2126 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2128 * linux-low.c (handle_extended_wait): Do not use "status"
2129 variable uninitialized.
2131 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2133 * server.c (handle_v_attach): Inhibit reporting dll changes.
2135 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2137 * remote-utils.c (prepare_resume_reply): If requested, don't
2138 output "thread:TID" in the T stop reply.
2140 * server.c (disable_packet_vCont, disable_packet_Tthread)
2141 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2142 (handle_query): If requested, disable support for qC, qfThreadInfo
2144 (handle_v_requests): If requested, disable support for vCont.
2145 (gdbserver_show_disableable): New.
2146 (main): Handle --disable-packet and --disable-packet=LIST.
2148 * server.h (disable_packet_vCont, disable_packet_Tthread)
2149 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2151 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2153 * server.c (gdbserver_usage): Mention --version.
2155 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2157 * Makefile.in (gdbreplay.o): New rule.
2159 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2161 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2162 message, not gdbserver.
2164 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2165 Nathan Sidwell <nathan@codesourcery.com>
2166 Joseph Myers <joseph@codesourcery.com>
2168 * acinclude.m4: Include ../../config/acx.m4.
2169 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2170 * configure, config.in: Regenerate.
2171 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2172 * server.c (gdbserver_version): Print PKGVERSION.
2173 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2174 (main): Adjust gdbserver_usage calls.
2175 * gdbreplay.c (version, host_name): Add declarations.
2176 (gdbreplay_version, gdbreplay_usage): New.
2177 (main): Accept --version and --help options.
2179 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2181 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2182 (arm_breakpoint_at): Handle Thumb.
2183 (the_low_target): Add comment.
2185 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2187 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2189 2008-05-09 Doug Evans <dje@google.com>
2191 * server.h (decode_search_memory_packet): Declare.
2192 * remote-utils.c (decode_search_memory_packet): New fn.
2193 * server.c (handle_search_memory_1): New fn.
2194 (handle_search_memory): New fn.
2195 (handle_query): Process qSearch:memory packets.
2197 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2199 * regcache.c (registers_length): Remove.
2200 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2201 full register packet.
2202 * regcache.h (registers_length): Remove prototype.
2203 * server.h (PBUFSIZ): Define to 16384.
2205 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2207 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2208 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2209 powerpc-64l.o, and powerpc-altivec64l.o.
2210 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2211 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2212 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2213 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2214 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2217 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2218 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2219 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2220 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2221 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2222 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2223 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2224 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2225 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2226 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2229 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2230 (init_registers_powerpc_32l): ... this new prototype.
2231 (init_registers_powerpc_32): Remove, replace by ...
2232 (init_registers_powerpc_altivec32l): ... this new prototype.
2233 (init_registers_powerpc_e500): Remove, replace by ...
2234 (init_registers_powerpc_e500l): ... this new prototype.
2235 (init_registers_ppc64): Remove, replace by ...
2236 (init_registers_powerpc_64l): ... this new prototype.
2237 (init_registers_powerpc_64): Remove, replace by ...
2238 (init_registers_powerpc_altivec64l): ... this new prototype.
2239 (ppc_num_regs): Set to 73.
2240 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2241 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2242 (ppc_cannot_store_register): Handle orig_r3 and trap.
2243 (ppc_arch_setup): Update init_registers_... calls.
2244 (ppc_fill_gregset): Handle orig_r3 and trap.
2246 * inferiors.c (clear_inferiors): Reset current_inferior.
2248 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2250 * acinclude.m4: Add override.m4.
2251 * configure: Regenerate.
2253 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2255 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2256 initial call to init_register_ppc64.
2258 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2260 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2261 powerpc*-*-linux* case.
2262 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2264 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2266 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2267 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2269 * linux-ppc-low.c: Include <elf.h>.
2270 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2271 (ppc_hwcap): New global variable.
2272 (ppc_regmap): Remove __SPE__ #ifdef sections.
2273 (ppc_regmap_e500): New global variable.
2274 (ppc_cannot_store_register): Update __SPE__ special case.
2275 (ppc_get_hwcap): New function.
2276 (ppc_arch_setup): Use it to determine whether inferior supports
2277 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2278 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2279 Do not access registers if target does not support AltiVec.
2280 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2281 Do not access registers if target does not support SPE.
2282 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2284 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2286 * linux-low.c (disabled_regsets, num_regsets): New.
2287 (use_regsets_p): Delete.
2288 (linux_wait_for_process): Clear disabled_regsets.
2289 (regsets_fetch_inferior_registers): Check and set it.
2290 (regsets_store_inferior_registers): Likewise.
2291 (linux_fetch_registers, linux_store_registers): Do not use
2293 (initialize_low): Allocate disabled_regsets.
2295 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2297 * Makefile.in (LIBOBJS): New.
2299 (memmem.o): New rule.
2300 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2301 * configure: Regenerated.
2303 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2305 * server.c (handle_query): Never return "unsupported" for
2306 qXfer:features:read queries.
2308 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2310 * server.c (get_features_xml): Fix inverted condition.
2311 (handle_query): Always support qXfer:feature:read.
2313 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2315 * server.c (wrapper_argv): New.
2316 (start_inferior): Handle wrapper_argv. If set, expect an extra
2318 (gdbserver_usage): Document --wrapper.
2319 (main): Parse --wrapper.
2321 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2323 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2324 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2325 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2326 (ppc_set_pc): Likewise.
2327 (ppc_arch_setup): New function.
2328 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2329 of collect_register.
2330 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2332 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2334 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2335 instead of linux-ppc64-low.o.
2336 * linux-ppc64-low.c: Remove file.
2337 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2338 (linux-ppc64-low.o): Remove rule.
2340 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2341 (init_registers_powerpc_64): Likewise.
2342 (ppc_regmap): Conditionally define depending on __powerpc64__.
2343 (ppc_cannot_store_register): Do not special-case "fpscr" when
2344 compiled on __powerpc64__.
2345 (ppc_collect_ptrace_register): New function.
2346 (ppc_supply_ptrace_register): New function.
2347 (ppc_breakpoint): Change type to "unsigned int".
2348 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2349 (the_low_target): Conditionally provide initializers for the
2350 arch_setup member depending on __powerpc64__. Install
2351 collect_ptrace_register and supply_ptrace_register members.
2353 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2355 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2356 * server.c (gdbserver_xmltarget): Define.
2357 (get_features_xml): Use it to replace "target.xml" and arch_string.
2359 * configure.srv: Remove srv_xmltarget. Add XML files that were
2360 mentioned there to srv_xmlfiles instead. Remove conditional tests
2361 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2362 srv_xmlfiles and srv_regobj to include all possible choices.
2363 * configure.ac (srv_xmltarget): Remove.
2364 (srv_xmlfiles): Do not add "target.xml".
2365 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2366 checks for supplementary target information.
2367 * configure: Regenerate.
2368 * Makefile.in (XML_TARGET): Remove.
2369 (target.xml): Remove rule.
2370 (clean): Do not clean up target.xml.
2371 (.PRECIOUS): Do not mention target.xml.
2373 * target.h (struct target_ops): Remove arch_string member.
2374 * linux-low.c (linux_arch_string): Remove.
2375 (linux_target_ops): Remove arch_string initializer.
2376 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2377 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2378 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2379 * spu-low.c (spu_arch_string): Remove.
2380 (spu_target_ops): Remove arch_string initializer.
2381 * win32-low.c (win32_arch_string): Remove.
2382 (win32_target_ops): Remove arch_string initializer.
2383 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2384 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2385 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2387 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2389 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2390 by collect_ptrace_register and supply_ptrace_register hooks.
2391 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2392 instead of checking for the_low_target.left_pad_xfer.
2393 (usr_store_inferior_registers): Use collect_ptrace_register callback
2394 instead of checking for the_low_target.left_pad_xfer.
2396 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2397 (s390_supply_ptrace_register): Likewise.
2398 (s390_fill_gregset): Call s390_collect_ptrace_register.
2399 (the_low_target): Update.
2401 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2402 (ppc_supply_ptrace_register): Likewise.
2403 (the_low_target): Update.
2405 * linux-i386-low.c (the_low_target): Update.
2406 * linux-x86-64-low.c (the_low_target): Update.
2408 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2410 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2411 reg-s390.o and reg-s390x.o.
2413 * linux-low.c (new_inferior): New global variable.
2414 (linux_create_inferior, linux_attach): Set it.
2415 (linux_wait_for_process): Call the_low_target.arch_setup after the
2416 target has stopped for the first time.
2417 (initialize_low): Do not call the_low_target.arch_setup.
2419 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2420 (s390_set_pc): Likewise.
2421 (s390_arch_setup): New function.
2422 (the_low_target): Use s390_arch_setup as arch_setup routine.
2424 * regcache.c (realloc_register_cache): New function.
2425 (set_register_cache): Call it for each existing regcache.
2427 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2429 * server.h (init_registers): Remove prototype.
2431 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2432 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2433 instead of init_registers ().
2434 * linux-arm-low.c (init_registers_arm): Add prototype.
2435 (init_registers_arm_with_iwmmxt): Likewise.
2436 (the_low_target): Add initializer for arch_setup field.
2437 * linux-cris-low.c (init_registers_cris): Add prototype.
2438 (the_low_target): Add initializer for arch_setup field.
2439 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2440 (the_low_target): Add initializer for arch_setup field.
2441 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2442 (the_low_target): Add initializer for arch_setup field.
2443 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2444 (the_low_target): Add initializer for arch_setup field.
2445 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2446 (the_low_target): Add initializer for arch_setup field.
2447 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2448 (the_low_target): Add initializer for arch_setup field.
2449 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2450 (init_registers_mips64_linux): Likewise.
2451 (the_low_target): Add initializer for arch_setup field.
2452 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2453 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2454 (the_low_target): Add initializer for arch_setup field.
2455 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2456 (init_registers_powerpc_64): Likewise.
2457 (the_low_target): Add initializer for arch_setup field.
2458 * linux-s390-low.c (init_registers_s390): Add prototype.
2459 (init_registers_s390x): Likewise.
2460 (the_low_target): Add initializer for arch_setup field.
2461 * linux-sh-low.c (init_registers_sh): Add prototype.
2462 (the_low_target): Add initializer for arch_setup field.
2463 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2464 (the_low_target): Add initializer for arch_setup field.
2465 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2466 (the_low_target): Add initializer for arch_setup field.
2468 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2469 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2470 instead of init_registers ().
2471 * win32-arm-low.c (init_registers_arm): Add prototype.
2472 (the_low_target): Add initializer for arch_setup field.
2473 * win32-i386-low.c (init_registers_i386): Add prototype.
2474 (the_low_target): Add initializer for arch_setup field.
2476 * spu-low.c (init_registers_spu): Add prototype.
2477 (initialize_low): Call initialie_registers_spu () instead of
2478 initialize_registers ().
2480 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2482 * server.c (handle_v_requests): When handling the vRun and vAttach
2483 packets, if already debugging a process, don't kill it. Return an
2486 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2488 * server.c (handle_query): Correct length check.
2490 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2492 * win32-low.c (do_initial_child_stuff): Add process handle
2493 parameter. Set current_process_handle and current_process_id from the
2494 parameters. Clear globals.
2495 (win32_create_inferior): Don't set current_process_handle and
2496 current_process_id here. Instead pass them on the call to
2497 do_initial_child_stuff.
2498 (win32_attach): Likewise.
2499 (win32_clear_inferiors): New.
2500 (win32_kill): Don't close the current process handle or the
2501 current thread handle here. Instead call win32_clear_inferiors.
2502 (win32_detach): Don't open a new handle to the process. Call
2503 win32_clear_inferiors.
2504 (win32_join): Don't rely on current_process_handle; open a new
2505 handle using the process id.
2506 (win32_wait): Call win32_clear_inferiors when the inferior process
2509 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2511 * server.c (monitor_show_help): Add "exit".
2513 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2515 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2516 (clean): Add reg-xtensa.c.
2517 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2518 * configure.srv (xtensa*-*-linux*) New target.
2519 * linux-xtensa-low.c: New.
2520 * xtensa-xtregs.c: New.
2522 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2524 * hostio.c: Don't include errno.h.
2525 (errno_to_fileio_errno): Move to hostio-errno.
2526 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2527 error number outputting to the target->hostio_last_error callback.
2528 (hostio_packet_error): Use FILEIO_EINVAL directly.
2529 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2530 calls to hostio_error.
2531 * hostio-errno.c: New.
2532 * server.h (hostio_last_error_from_errno): Declare.
2533 * target.h (target_ops): Add hostio_last_error member.
2534 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2535 as hostio_last_error handler.
2536 * spu-low.c (spu_target_ops): Likewise.
2537 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2538 (wince_hostio_last_error): New functions.
2539 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2540 as hostio_last_error handler.
2541 (win32_target_ops) [!_WIN32_WCE]: Register
2542 hostio_last_error_from_errno as hostio_last_error handler.
2543 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2544 (hostio-errno.o): New rule.
2545 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2546 * configure.srv (srv_hostio_err_objs): New variable. Default to
2548 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2549 * configure: Regenerate.
2551 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2553 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2554 (linux_kill, linux_detach): Clean up the process list.
2555 * remote-utils.c (remote_open): Improve port number parsing.
2556 (putpkt_binary, input_interrupt): Only send interrupts if the target
2558 * server.c (extended_protocol): Make static.
2559 (attached): Define earlier.
2560 (exit_requested, response_needed, program_argv): New variables.
2561 (target_running): New.
2562 (start_inferior): Clear attached here.
2563 (attach_inferior): Set attached here.
2564 (require_running): Define.
2565 (handle_query): Use require_running and target_running. Implement
2567 (handle_v_attach, handle_v_run): New.
2568 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2569 (gdbserver_usage): Update.
2570 (main): Redo argument parsing. Handle --debug and --multi. Handle
2571 --attach along with other options or after the port. Save
2572 program_argv. Support no initial program. Resynchronize
2573 communication with GDB after an error. Handle "monitor exit".
2574 Use require_running and target_running. Always allow the extended
2575 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2576 restart in extended mode.
2577 * README: Refer to the GDB manual. Update --attach usage.
2579 2007-12-20 Andreas Schwab <schwab@suse.de>
2581 * linux-low.c (STACK_SIZE): Define.
2582 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2583 (linux_test_for_tracefork): Likewise.
2585 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2587 * linux-low.c (linux_wait_for_event): Update messages. Do not
2588 reinsert auto-delete breakpoints.
2589 * mem-break.c (struct breakpoint): Change return type of handler to
2591 (set_breakpoint_at): Update handler type.
2592 (reinsert_breakpoint_handler): Return 1 instead of calling
2594 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2596 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2597 * mem-break.h (set_breakpoint_at): Update handler type.
2598 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2599 * win32-low.c (auto_delete_breakpoint): New.
2600 (get_child_debug_event): Use it.
2602 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2604 * configure.ac: Check for pread and pwrite.
2605 * hostio.c (handle_pread): Fall back to lseek and read.
2606 (handle_pwrite): Fall back to lseek and write.
2607 * config.in, configure: Regenerated.
2609 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2611 * server.c (myresume): Add own_buf argument.
2612 (main): Update calls.
2614 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2616 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2617 * remote-utils.c (remote_open): Do not call disable_async_io.
2618 (block_async_io): Delete.
2619 (unblock_async_io): Make static.
2620 (initialize_async_io): New.
2621 * server.c (handle_v_cont): Handle async I/O here.
2622 (myresume): Likewise. Move other common resume tasks here...
2623 (main): ... from here. Call initialize_async_io. Disable async
2624 I/O before the main loop.
2625 * server.h (initialize_async_io): Declare.
2626 (block_async_io, unblock_async_io): Delete prototypes.
2627 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2629 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2631 * remote-utils.c (readchar): Allow binary data in received messages.
2633 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2635 * win32-low.c (attaching): New global.
2636 (win32_create_inferior): Clear the `attaching' global.
2637 (win32_attach): Set the `attaching' global.
2638 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2639 attaching. Only set a breakpoint at the entry point if not
2642 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2644 * server.c (main): Don't report dll events on the initial
2645 connection on attaches.
2647 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2649 * server.c (main): Relax numerical bases supported for the pid of
2650 the --attach command line argument.
2652 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2654 * win32-low.c (win32_attach): Call OpenProcess before
2655 DebugActiveProcess, not after. Add last error output to error
2658 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2660 * win32-low.c (win32_get_thread_context)
2661 (win32_set_thread_context): New functions.
2662 (thread_rec): Use win32_get_thread_context.
2663 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2664 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2667 2007-12-03 Leo Zayas
2668 Pedro Alves <pedro_alves@portugalmail.pt>
2670 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2672 (child_add_thread): Minor cleanup.
2673 (child_continue): Resume artificially suspended threads before
2674 calling ContinueDebugEvent.
2675 (suspend_one_thread): New.
2676 (fake_breakpoint_event): New.
2677 (get_child_debug_event): Change return type to int. Check here if
2678 gdb sent an interrupt request. If a soft interrupt was requested,
2679 fake a breakpoint event. Return 0 if there is no event to handle,
2681 (win32_wait): Don't check here if gdb sent an interrupt request.
2682 Ensure there is a valid event to handle.
2683 (win32_request_interrupt): Add soft interruption method as last
2686 2007-12-03 Leo Zayas
2687 Pedro Alves <pedro_alves@portugalmail.pt>
2689 * win32-low.h (win32_thread_info): Add descriptions to the
2690 structure members. Replace `suspend_count' counter by a
2692 * win32-low.c (thread_rec): Update condition of when to get the
2693 context from the inferior. Rely on ContextFlags being set if it
2694 has already been retrieved. Only suspend the inferior thread if
2695 we haven't already. Warn if that fails.
2696 (continue_one_thread): s/suspend_count/suspended/. Only call
2697 ResumeThread once. Warn if that fails.
2699 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2701 * win32-low.c (win32_wait): Don't read from the inferior when it
2704 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2706 * Makefile.in (win32_low_h): New variable.
2707 (win32-low.o): Add dependency on $(win32_low_h).
2708 (win32-arm-low.o, win32-i386-low.o): New rules.
2710 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2712 * hostio.c: Correct copyright year.
2714 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2716 * Makefile.in (OBS): Add hostio.o.
2717 (hostio.o): New rule.
2718 * server.h (handle_vFile): Declare.
2719 * hostio.c: New file.
2720 * server.c (handle_v_requests): Take packet_len and new_packet_len
2721 for binary packets. Call handle_vFile.
2722 (main): Update call to handle_v_requests.
2724 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2726 * linux-low.c: Include <sched.h>.
2728 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2730 * linux-low.c (linux_tracefork_grandchild): New.
2731 (linux_tracefork_child): Use clone.
2732 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2734 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2736 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2738 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2740 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2742 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2744 * inferiors.c (change_inferior_id): Delete.
2745 (add_pid_to_list, pull_pid_from_list): New.
2746 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2747 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2748 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2749 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2750 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2751 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2752 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2753 (using_threads): Always set to 1.
2754 (handle_extended_wait): New.
2755 (add_process): Do not set TID.
2756 (linux_create_inferior): Set must_set_ptrace_flags.
2757 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2758 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2759 (linux_thread_alive): Rename TID argument to LWPID.
2760 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2761 (linux_wait_for_event): Do not use TID or check using_threads. Update
2762 call to dead_thread_notify. Call handle_extended_wait.
2763 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2764 (send_sigstop): Delete sigstop_sent.
2765 (wait_for_sigstop): Avoid TID.
2766 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2767 (linux_test_for_tracefork): New.
2768 (linux_lookup_signals): Use thread_db_active and
2769 linux_supports_tracefork_flag.
2770 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2771 * linux-low.h (get_process_thread): Avoid TID.
2772 (struct process_ifo): Move thread_known and tid to the end. Remove
2774 (linux_attach_lwp, thread_db_init): Update prototypes.
2775 * server.h (change_inferior_id): Delete prototype.
2776 (add_pid_to_list, pull_pid_from_list): New prototypes.
2777 * thread-db.c (thread_db_use_events): New.
2778 (find_first_thread): Rename to...
2779 (find_one_thread): ...this. Update callers and messages. Do not
2780 call fatal. Check thread_db_use_events. Do not call
2781 change_inferior_id or new_thread_notify.
2782 (maybe_attach_thread): Update. Do not call new_thread_notify.
2783 (thread_db_init): Set thread_db_use_events. Check use_events.
2784 * utils.c (fatal, warning): Correct message prefix.
2786 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2788 * Makefile.in (clean): Remove new files.
2789 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2790 (powerpc-64.o, powerpc-64.c): New rules.
2791 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2792 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2794 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2796 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2797 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2798 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2799 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2800 (target_regsets): Add AltiVec and SPE register sets.
2801 * configure.ac: Check for AltiVec and SPE.
2802 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2803 (ppc_fill_vrregset, ppc_store_vrregset): New.
2804 (target_regsets): Add AltiVec register set.
2805 * configure: Regenerated.
2807 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2809 * linux-low.c (O_LARGEFILE): Define.
2810 (linux_read_memory): Use /proc/PID/mem.
2811 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2812 * configure, config.in: Regenerated.
2814 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2816 * linux-low.c (linux_wait_for_event): Do not pass signals while
2819 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2821 * win32-low.c (create_process): New.
2822 (win32_create_inferior): Use create_process instead of
2823 CreateProcess. If create_process failed retry appending an ".exe"
2824 suffix. Store the GetLastError result immediatelly after
2825 create_process calls and use it on the call to error.
2827 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2829 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2831 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2833 * configure.ac: Switch license to GPLv3.
2835 2007-08-01 Michael Snyder <msnyder@access-company.com>
2837 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2839 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2841 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2843 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2844 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2845 CloseToolhelp32Snapshot.
2846 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2847 CloseToolhelp32Snapshot.
2849 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2851 * server.c (main): Check for inferior exit before main loop.
2853 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2855 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2856 instead of on tmp_desc.
2858 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2859 Daniel Jacobowitz <dan@codesourcery.com>
2861 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2862 (add_thread): Minor cleanups.
2863 (clear_inferiors): Move lower in the file. Clear the DLL
2865 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2866 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2867 (xml_escape_text): New.
2868 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2870 (handle_v_cont): Report errors.
2871 (gdbserver_version): Update.
2872 (main): Correct size of own_buf. Do not report initial DLL events.
2873 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2874 (unloaded_dll, xml_escape_text): New.
2875 * win32-low.c (enum target_waitkind): Update comments.
2876 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2877 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2878 (win32_EnumProcessModules, win32_GetModuleInformation)
2879 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2880 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2881 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2882 (win32_Module32First, win32_Module32Next, load_toolhelp)
2883 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2884 (get_child_debug_event): Handle DLL events.
2885 (win32_wait): Likewise.
2887 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2889 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2890 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2892 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2894 * win32-low.c (handle_output_debug_string): Ignore event if not
2897 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2899 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2901 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2903 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2905 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2907 * inferiors.c (change_inferior_id): Add comment.
2908 * linux-low.c (check_removed_breakpoint): Add an early
2909 prototype. Improve debug output.
2910 (linux_attach): Doc update.
2911 (linux_detach_one_process, linux_detach): Clean up before releasing
2913 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2914 * linux-low.h (struct process_info): Doc improvement.
2915 * mem-break.c (delete_all_breakpoints): New.
2916 * mem-break.h (delete_all_breakpoints): New prototype.
2917 * thread-db.c (find_first_thread): New.
2918 (thread_db_create_event): Call it instead of
2919 thread_db_find_new_threads. Clean up unused variables.
2920 (maybe_attach_thread): Remove first thread handling.
2921 (thread_db_find_new_threads): Use find_first_thread.
2922 (thread_db_get_tls_address): Likewise.
2924 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2926 * thread-db.c (thread_db_find_new_threads): Add prototype.
2927 (thread_db_create_event): Check for the main thread before adding
2929 (maybe_attach_thread): Only enable event reporting if TID == 0.
2930 (thread_db_get_tls_address): Check for new threads.
2932 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2934 * linux-low.c (linux_create_inferior): Try execv before execvp.
2935 * spu-low.c (spu_create_inferior): Likewise.
2937 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2939 * linux-low.c (linux_create_inferior): Change execv to execvp.
2940 * spu-low.c (spu_create_inferior): Likewies.
2942 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2944 * Makefile.in (clean): Clean new files instead of deleted ones.
2945 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2946 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2948 * configure.srv: Specify XML files and new regformats for MIPS and
2950 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2951 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2952 an entry for the restart register.
2953 (mips_cannot_fetch_register, mips_cannot_store_register)
2954 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2955 register names to match the XML descriptions.
2956 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2957 restart register instead of $0.
2959 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2960 Markus Deuling <deuling@de.ibm.com>
2962 * remote-utils.c (decode_xfer_write): New function.
2963 * server.h (decode_xfer_write): Add prototype.
2964 * server.c (handle_query): Add PACKET_LEN argument. Support
2965 qXfer:spu:read and qXfer:spu:write packets.
2966 (main): Pass packet_len to handle_query.
2967 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2968 * target.h (target_ops): Add qxfer_spu.
2970 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2972 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2973 accessing non-seekable spufs files.
2975 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2977 * server.c (handle_query): Add reply for qC packet.
2979 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2980 Leo Zayas <lerele@champenstudios@com>
2982 * server.h (check_remote_input_interrupt_request): New function.
2983 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2984 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2985 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2986 (check_remote_input_interrupt_request): New function.
2987 * server.h (check_remote_input_interrupt_request): Declare.
2988 * win32-low.c (winapi_DebugBreakProcess,
2989 winapi_GenerateConsoleCtrlEvent): New typedefs.
2990 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2992 (win32_wait): Check for remote interrupt request
2993 with check_remote_input_interrupt_request.
2994 (win32_request_interrupt): New function.
2995 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2997 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2999 * win32-low.c (debug_registers_changed,
3000 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
3001 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
3002 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
3003 (thread_rec): Get context using the low target.
3004 (child_add_thread): Call thread_added on the low target,
3005 which does the same thing.
3007 (do_initial_child_stuff): Remove debug registers references.
3008 Set context using the low target. Resume threads after
3009 setting the contexts.
3010 (child_continue): Remove dead variable. Remove debug
3011 registers references.
3012 (child_fetch_inferior_registers): Go through the low target.
3013 (do_child_store_inferior_registers): Remove.
3014 (child_store_inferior_registers): Go through the low target.
3015 (win32_resume): Remove debug registers references.
3016 Set context using the low target.
3017 (handle_exception): Change return type to void. Don't record
3018 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
3019 first chance exception.
3020 (get_child_debug_event): Change return type to void. Remove
3021 goto loop. Always return after waiting for debug event.
3022 (win32_wait): Convert to switch statement. Handle spurious
3025 * win32-i386-low.c (debug_registers_changed,
3026 debug_registers_used): New.
3027 (initial_stuff): Rename to ...
3028 (i386_initial_stuff): ... this. Clear debug registers
3030 (store_debug_registers): Delete.
3031 (i386_get_thread_context): New.
3032 (load_debug_registers): Delete.
3033 (i386_set_thread_context): New.
3034 (i386_thread_added): New.
3035 (single_step): Rename to ...
3036 (i386_single_step): ... this.
3037 (do_fetch_inferior_registers): Rename to ...
3038 (i386_fetch_inferior_register): ... this.
3039 (i386_store_inferior_register): New.
3040 (the_low_target): Adapt to new interface.
3042 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
3043 (arm_get_thread_context): New.
3044 (arm_set_thread_context): New.
3046 (do_fetch_inferior_registers): Rename to ...
3047 (arm_fetch_inferior_register): ... this.
3048 (arm_store_inferior_register): New.
3049 (arm_wince_breakpoint): Reimplement as unsigned long.
3050 (arm_wince_breakpoint_len): Define.
3051 (the_low_target): Adapt to new interface.
3053 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
3054 load_debug_registers. Add get_thread_context, set_thread_context,
3055 thread_added and store_inferior_register. Rename
3056 fetch_inferior_registers to fetch_inferior_register.
3057 (regptr): Remove declaration.
3059 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3061 * linux-low.c (linux_detach): Change return type to int. Return 0.
3062 * spu-low.c (spu_detach): Likewise.
3064 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3066 * target.h (target_ops): Change return type of detach to int.
3068 (join_inferior): New.
3069 * server.c (main): Don't skip detach support on mingw32.
3070 If the inferior doesn't support detaching return error.
3071 Call join_inferior instead of using waitpid.
3072 * linux-low.c (linux_join): New.
3073 (linux_target_op): Add linux_join.
3074 * spu-low.c (spu_join): New.
3075 (spu_target_ops): Add spu_join.
3076 * win32-low.c (win32_detach): Adapt to new interface.
3077 Reopen current_process_handle before detaching. Issue a child
3078 resume before detaching.
3080 (win32_target_op): Add win32_join.
3082 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3084 * win32-low.c (win32-attach): Fix return value.
3085 * target.h (target_ops): Describe ATTACH return values.
3087 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3089 * win32-low.c (GETPROCADDRESS): Define.
3090 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3091 (winapi_DebugSetProcessKillOnExit): Likewise.
3092 (win32_create_inferior): Force usage of ansi CreateProcessA.
3093 (win32_attach): Use GETPROCADDRESS.
3094 (win32_detach): Likewise.
3096 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3098 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3100 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3102 * win32-low.c: Commit leftover changes from 2007-03-29.
3104 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3106 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3107 fields short instead of int. Add explicit padding.
3108 (i387_cache_to_fsave): Remove unnecessary casts.
3109 (i387_fsave_to_cache): Doc fix.
3110 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3112 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3114 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3115 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3117 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3119 * configure.srv (arm*-*-mingw32ce*): Move near the other
3122 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3124 * configure.ac: Add errno checking.
3125 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3126 sys/file.h and malloc.h.
3127 (AC_CHECK_DECLS): Add perror.
3128 (srv_mingwce): Handle.
3129 * configure.srv (i[34567]86-*-cygwin*): Add
3130 win32-i386-low.o to srv_tgtobj.
3131 (i[34567]86-*-mingw*): Likewise.
3132 (arm*-*-mingw32ce*): Add case.
3133 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3134 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3135 [__MINGW32CE__] (strerror): New function.
3136 [__MINGW32CE__] (errno): Define to GetLastError.
3137 [__MINGW32CE__] (COUNTOF): New macro.
3138 (remote_open): Remove extra close call.
3139 * mem-break.c (delete_breakpoint_at): New function.
3140 * mem-break.h (delete_breakpoint_at): Declare.
3141 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3142 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3143 [USE_WIN32API] (read, write): Add char* casts.
3144 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3145 * server.h: Include wincecompat.h on Windows CE.
3146 [HAVE_ERRNO_H]: Check.
3147 (perror): Declare if not declared.
3148 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3149 (perror_with_name): Remove errno declaration.
3150 * wincecompat.h: New.
3151 * wincecompat.c: New.
3153 * win32-arm-low.c: New.
3154 * win32-i386-low.c: New.
3155 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3156 (OUTMSG2): Make it safe.
3158 (COUNTOF): New macro.
3159 (NUM_REGS): Get it from the low target.
3160 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3161 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3162 (thread_rec): Let low target handle debug registers.
3163 (child_add_thread): Likewise.
3164 (child_init_thread_list): Likewise.
3165 (continue_one_thread): Likewise.
3167 (do_child_fetch_inferior_registers): Move to ...
3168 * win32-i386-low.c: ... here, and rename to ...
3169 (do_fetch_inferior_registers): ... this.
3170 * win32-low.c (child_fetch_inferior_registers):
3171 Go through the low target.
3172 (do_child_store_inferior_registers): Use regptr.
3173 (strwinerror): New function.
3174 (win32_create_inferior): Handle Windows CE.
3175 Use strwinerror instead of strerror on Windows error
3176 codes. Add program to the error output.
3177 Don't close the main thread handle on Windows CE.
3178 (win32_attach): Use coredll.dll on Windows CE.
3179 (win32_kill): Close current process and current
3181 (win32_detach): Use coredll.dll on Windows CE.
3182 (win32_resume): Let low target handle debug registers, and
3184 (handle_exception): Add/Remove initial breakpoint. Avoid
3185 non-existant WSTOPSIG on Windows CE.
3186 (win32_read_inferior_memory): Cast to remove warning.
3187 (win32_arch_string): Go through the low target.
3188 (initialize_low): Call set_breakpoint_data with the low
3189 target's breakpoint.
3190 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3191 FOP_REGNUM, mappings): Move to ...
3192 * win32-i386-low.c: ... here.
3193 * win32-low.c (win32_thread_info): Move to ...
3194 * win32-low.h: ... here.
3195 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3196 win32-arm-low.c and wincecompat.c.
3197 (all:): Add $EXEEXT.
3198 (install-only:): Likewise.
3199 (gdbserver:): Likewise.
3200 (gdbreplay:): Likewise.
3201 * config.in: Regenerate.
3202 * configure: Regenerate.
3204 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3206 * win32-low.c: Rename typedef thread_info to
3207 win32_thread_info throughout.
3209 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3211 * win32-i386-low.c: Rename to ...
3212 * win32-low.c: ... this.
3213 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3214 * Makefile.in: Likewise.
3216 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3218 * remote-utils.c (monitor_output): Constify msg parameter.
3219 * server.h (monitor_output): Likewise.
3220 * win32-i386-low.c (handle_output_debug_string): New.
3221 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3222 handle_output_debug_string.
3223 (get_child_debug_event): Likewise.
3225 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3227 * server.c (main): Correct strtoul check.
3229 2007-03-27 Jon Ringle <jon@ringle.org>
3231 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3233 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3235 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3237 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3239 * terminal.h: Check HAVE_SGTTY_H.
3241 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3243 * remote-utils.c (remote_open): Print out the assigned port number.
3245 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3247 * remote-utils.c (monitor_output): New function.
3248 * server.c (debug_threads): Define here.
3249 (monitor_show_help): New function.
3250 (handle_query): Handle qRcmd.
3251 (main): Do not handle 'd' packet.
3252 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3253 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3256 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3258 * Makefile.in (EXEEXT): New.
3259 (clean): Use $(EXEEXT).
3261 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3263 * target.h (target_ops): Rename send_signal to request_interrupt,
3264 and remove enum target_signal parameter.
3265 * linux-low.c (linux_request_interrupt): Rename from
3266 linux_send_signal, and always send SIGINT.
3267 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3268 and always send SIGINT.
3269 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3271 (input_interrupt): Likewise.
3273 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3275 * server.c (get_features_xml): Check if target implemented
3277 * win32-i386-low.c (win32_arch_string): New.
3278 (win32_target_ops): Add win32_arch_string as arch_string member.
3280 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3282 * spu-low.c (spu_arch_string): New.
3283 (spu_target_ops): Add spu_arch_string.
3285 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3287 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3288 * configure.ac: Do not check for terminal.h.
3289 * configure, config.in: Regenerated.
3291 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3293 * Makefile.in (OBS): Add $(XML_BUILTIN).
3294 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3296 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3297 (arm-with-iwmmxt.c): New.
3298 * config.in, configure: Regenerate.
3299 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3300 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3301 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3302 (arm*-*-linux*): Add iWMMXt and regset support.
3303 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3304 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3305 (arm_store_wmmxregset, target_regsets): New.
3306 * server.c (get_features_xml): Take annex argument. Check builtin
3308 (handle_query): Handle multiple annexes.
3310 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3312 * remote-utils.c [USE_WIN32API] (read, write): Define.
3313 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3316 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3318 * linux-i386-low.c (the_low_target): Set arch_string.
3319 * linux-x86-64-low.c (the_low_target): Likewise.
3320 * linux-low.c (linux_arch_string): New.
3321 (linux_target_ops): Add it.
3322 * linux-low.h (struct linux_target_ops): Add arch_string.
3323 * server.c (write_qxfer_response): Use const void * for DATA.
3324 (get_features_xml): New.
3325 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3326 * target.h (struct target_ops): Add arch_string method.
3328 2007-01-03 Denis Pilat <denis.pilat@st.com>
3329 Daniel Jacobowitz <dan@codesourcery.com>
3331 * linux-low.c (linux_kill): Handle being called with no threads.
3332 * win32-i386-low.c (win32_kill): Likewise.
3333 (get_child_debug_event): Clear current_process_handle.
3335 2006-12-30 Denis PILAT <denis.pilat@st.com>
3336 Daniel Jacobowitz <dan@codesourcery.com>
3338 * remote-utils.c (remote_open): Check the type of specified
3339 serial port devices before opening them.
3340 * server.c (main): Kill the inferior if an error occurs during
3341 the first remote_open.
3343 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3345 * README: Update supported targets.
3347 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3349 * Makefile.in (clean): Remove reg-mips64.c.
3350 (reg-mips64.c, reg-mips64.o): New rules.
3351 * configure.srv: Handle mips64. Include regset support for mips.
3352 * linux-mips-low.c (union mips_register): New.
3353 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3354 (mips_breakpoint, mips_breakpoint_at): Use int.
3355 (mips_collect_register, mips_supply_register)
3356 (mips_collect_register_32bit, mips_supply_register_32bit)
3357 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3358 (mips_store_fpregset, target_regsets): New.
3359 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3361 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3363 * configure.srv: Add target "spu*-*-*".
3364 * Makefile.in (clean): Remove reg-spu.c.
3365 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3366 * spu-low.c: New file.
3368 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3370 * configure.ac: Correct td_thr_tls_get_addr test.
3371 * configure: Regenerated.
3373 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3375 * linux-low.c (linux_wait_for_event): Reformat. Use the
3377 * remote-utils.c (decode_address_to_semicolon): New.
3378 * server.c (pass_signals, handle_general_set): New.
3379 (handle_query): Mention QPassSignals for qSupported.
3380 (main): Call handle_general_set.
3381 * server.h (pass_signals, decode_address_to_semicolon): New.
3383 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3385 * server.c (handle_query): Correct error handling for read_auxv.
3387 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3389 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3390 and srv_linux_thread_db to yes.
3391 * linux-s390-low.c (s390_fill_gregset): New function.
3392 (target_regsets): Define data structure.
3394 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3396 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3397 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3398 * config.in, configure: Regenerated.
3399 * inferiors.c (gdb_id_to_thread): New function.
3400 (gdb_id_to_thread_id): Use it.
3401 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3402 * linux-low.h (struct process_info): Add th member.
3403 (thread_db_get_tls_address): New prototype.
3404 * remote-utils.c (decode_address): Make non-static.
3405 * server.c (handle_query): Handle qGetTLSAddr.
3406 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3407 * target.h (struct target_ops): Add get_tls_address.
3408 * thread-db.c (maybe_attach_thread): Save the thread handle.
3409 (thread_db_get_tls_address): New.
3411 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3413 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3414 (linux_resume_one_process): Take a siginfo_t *. Update all
3415 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3416 (struct pending_signals): Add a siginfo_t.
3417 (linux_wait_for_process): Always set last_status.
3418 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3419 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3420 * linux-low.h (struct process_info): Add last_status.
3422 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3424 * remote-utils.c (try_rle): New function.
3425 (putpkt_binary): Use it.
3427 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3429 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3430 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3431 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3432 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3433 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3436 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3438 * server.c (terminal_fd): New variable.
3439 (old_foreground_pgrp): Likewise.
3440 (restore_old_foreground_pgrp): New function.
3441 (start_inferior): Record the terminal file descriptor in terminal_fd
3442 and its original foreground group in old_foreground_pgrp. Register
3443 restore_old_foreground_pgrp with atexit().
3445 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3447 * server.c (handle_query): Correct qPart to qXfer.
3449 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3451 * configure.ac: Check for more headers which are missing on
3452 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3453 * configure.srv: Add Cygwin and mingw32.
3454 * remote-utils.c: Don't include headers unconditionally which
3455 are missing on mingw32. Include <winsock.h> for mingw32.
3456 (remote_open): Adjust for mingw32 support. Flush
3457 standard error after writing to it.
3458 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3459 (unblock_async_io, enable_async_io, disable_async_io)
3460 (readchar, getpkt): Update for Winsock support.
3461 (prepare_resume_reply): Expect a protocol signal number.
3462 * server.c: Disable <sys/wait.h> on mingw32.
3463 (start_inferior): Adjust for mingw32 support. Flush
3464 standard error after writing to it.
3465 (attach_inferior): Likewise. Use protocol signal
3467 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3469 * win32-i386-low.c: New file.
3470 * Makefile.in (XM_CLIBS): Set.
3471 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3472 (win32-i386-low.o): New dependency rule.
3473 * linux-low.c (linux_wait): Use target signal numbers.
3474 * target.h (struct target_ops): Doc fix.
3475 * server.h (target_signal_to_name): New prototype.
3476 * gdbreplay.c: Don't include headers unconditionally which
3477 are missing on mingw32. Include <winsock.h> for mingw32.
3478 (remote_close, remote_open): Adjust for Winsock support.
3479 * configure, config.in: Regenerated.
3481 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3483 * server.c (decode_xfer_read, write_qxfer_response): New.
3484 (handle_query): Take a packet length argument. Handle
3485 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3486 the qSupported response.
3487 (main): Update call to handle_query.
3489 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3491 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3492 (putpkt_binary): Renamed from putpkt and adjusted for binary
3494 (putpkt): New wrapper for putpkt_binary.
3495 (readchar): Don't mask off the high bit.
3496 (decode_X_packet): New function.
3497 * server.c (main): Call putpkt_binary if a handler sets the packet
3498 length. Save the length of the incoming packet. Handle 'X'.
3499 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3501 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3503 * server.c (handle_query): Handle qSupported.
3505 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3507 * remote-utils.c (all_symbols_looked_up): New variable.
3508 (look_up_one_symbol): Check it.
3509 * server.h (look_up_one_symbol): New declaration.
3510 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3512 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3514 * Makefile.in (linux-arm-low.o): Update dependencies.
3515 * linux-arm-low.c: Include "gdb_proc_service.h".
3516 (PTRACE_GET_THREAD_AREA): Define.
3517 (ps_get_thread_area): New function.
3519 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3521 * configure.srv (m68k*-*-uclinux*): New target.
3522 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3523 (linux_resume_one_process): Remove extraneous cast.
3524 (linux_read_offsets): New.
3525 (linux_target_op): Add linux_read_offsets on mmuless systems.
3526 * server.c (handle_query): Add qOffsets logic.
3527 * target.h (struct target_ops): Add read_offsets.
3529 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3531 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3532 (PTRACE_GET_THREAD_AREA): Define.
3533 (ps_get_thread_area): New function.
3534 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3535 (linux-x86-64-low.o): Update.
3537 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3539 * configure.ac: Remove checks for prfpregset_t.
3540 * gdb_proc_service.h: New file.
3541 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3542 new "gdb_proc_service.h".
3543 * proc-service.c: Likewise.
3544 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3545 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3546 * Makefile.in (gdb_proc_service_h): Updated.
3547 * configure, config.in: Regenerated.
3549 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3551 * remote-utils.c (prepare_resume_reply): Move declaration
3552 of gdb_id_from_wait to the top of the block.
3554 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3556 * linux-low.c (regsets_store_inferior_registers): Read the regset
3557 from the target before filling it.
3559 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3561 * server.c (attach_inferior): Return SIGTRAP for a successful
3564 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3566 * Makefile.in (OBS): Add version.o.
3567 (STAGESTUFF): Delete.
3568 (version.o): Add dependencies.
3569 (version.c): Replace rule.
3570 (clean): Remove version.c.
3571 * server.c (gdbserver_version): New.
3572 (gdbserver_usage): Use printf.
3573 (main): Handle --version and --help.
3574 * server.h (version, host_name): Add declarations.
3576 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3588 * linux-x86-64-low.c:
3591 * linux-ppc64-low.c:
3600 * linux-crisv32-low.c:
3612 * gdbserver.1: Add (C) after Copyright. Update the FSF
3615 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3617 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3618 (arm_breakpoint_at): Recognize both breakpoints.
3619 (the_low_target): Use the correct breakpoint instruction.
3621 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3623 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3624 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3625 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3626 (the_low_target): Update.
3628 2005-10-25 Andreas Schwab <schwab@suse.de>
3630 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3632 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3633 (ia64_num_regs): Reduce to 462.
3635 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3637 * acinclude.m4: Correct quoting.
3638 * aclocal.m4: Regenerated.
3640 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3641 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3642 (thread_db_init): Call thread_db_err_str.
3643 * configure.ac: Check for TD_VERSION.
3644 * config.in, configure: Regenerated.
3646 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3648 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3650 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3652 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3653 is not available. Define HAVE_PTRACE_GETREGS if it is.
3654 * config.in, configure: Regenerated.
3655 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3656 * linux-i386-low.c, linux-m68k-low.c: Update to use
3657 HAVE_PTRACE_GETREGS.
3658 * linux-low.c (regsets_fetch_inferior_registers)
3659 (regsets_store_inferior_registers): Only return 0 if we processed
3661 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3662 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3664 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3666 * inferiors.c (struct thread_info): Add gdb_id.
3667 (add_thread): Add gdb_id argument.
3668 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3669 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3670 calls to add_thread.
3671 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3672 * server.c (handle_query): Use thread_to_gdb_id.
3673 (handle_v_cont, main): Use gdb_id_to_thread_id.
3674 * server.h (add_thread): Update prototype.
3675 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3678 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3680 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3681 left-padded registers.
3682 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3683 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3685 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3687 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3688 * configure: Regenerate.
3689 * config.in: Regenerate.
3690 * server.h (NEED_DECLARATION_STRERROR):
3691 Replace with !HAVE_DECL_STRERROR.
3693 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3695 * linux-low.c (linux_wait, linux_send_signal): Don't test
3696 an unsigned long variable for > 0 if it could be MAX_ULONG.
3697 * server.c (myresume): Likewise.
3698 * target.c (set_desired_inferior): Likewise.
3700 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3702 * configure.ac: Simplify and improve check for socklen_t.
3703 * configure, config.in: Regenerate.
3705 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3707 * acconfig.h: Remove.
3708 * configure.ac: Add a test for socklen_t. Use three-argument
3709 AC_DEFINE throughout.
3710 * config.in: Regenerated using autoheader 2.59.
3711 * configure: Regenerated.
3713 * gdbreplay.c (socklen_t): Provide a default.
3714 (remote_open): Use socklen_t.
3715 * remote-utils.c (socklen_t): Provide a default.
3716 (remote_open): Use socklen_t.
3717 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3720 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3722 * linux-low.c (linux_read_memory, linux_write_memory)
3723 (linux_read_auxv): Likewise.
3724 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3725 (check_mem_write): Likewise.
3726 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3728 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3729 (registers_from_string, register_data): Likewise.
3730 * server.c (handle_query, main): Likewise.
3731 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3732 (decode_M_packet): Likewise.
3733 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3734 * target.h (struct target_ops): Update read_memory, write_memory,
3736 (read_inferior_memory, write_inferior_memory): Update.
3737 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3739 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3740 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3741 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3742 linux-s390-low.c, linux-sh-low.c: Update for changes in
3743 read_inferior_memory and the_low_target->breakpoint.
3745 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3747 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3748 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3749 * configure.srv: Add powerpc64-*-linux*.
3750 * linux-ppc64-low.c: New file.
3752 2005-05-23 Orjan Friberg <orjanf@axis.com>
3754 * linux-cris-low.c: New file with support for CRIS.
3755 * linux-crisv32-low.c: Ditto for CRISv32.
3756 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3757 (clean): Add reg-cris.c and reg-crisv32.c.
3758 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3759 reg-crisv32.o, and reg-crisv32.c to make rules.
3760 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3763 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3765 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3766 of sizeof (PTRACE_XFER_TYPE).
3767 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3769 2005-05-12 Orjan Friberg <orjanf@axis.com>
3771 * target.h (struct target_ops): Add insert_watchpoint,
3772 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3773 pointers for hardware watchpoint support.
3774 * linux-low.h (struct linux_target_ops): Ditto.
3775 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3776 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3777 to linux_target_ops.
3778 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3780 * server.c (main): Recognize 'Z' and 'z' packets.
3782 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3784 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3785 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3786 (the_low_target): Add new members.
3788 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3790 * proc-service.c (ps_lgetregs): Search all_processes instead of
3793 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3795 * server.c (start_inferior): Change return type to int.
3796 (attach_inferior): Change sigptr to int *.
3797 (handle_v_cont, handle_v_requests): Change signal to int *.
3798 (main): Change signal to int.
3800 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3802 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3803 * configure.srv: Add m32r*-*-linux*.
3804 * linux-m32r-low.c: New file.
3806 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3808 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3810 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3812 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3813 Take unsigned long arguments for PIDs.
3814 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3815 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3816 (wait_for_sigstop, linux_resume_one_process)
3817 (regsets_fetch_inferior_registers, linux_send_signal)
3818 (linux_read_auxv): Likewise. Update the types of variables holding
3819 PIDs. Update format string specifiers.
3820 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3821 * remote-utils.c (prepare_resume_reply): Likewise.
3822 * server.c (cont_thread, general_thread, step_thread)
3823 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3825 (handle_query): Update format specifiers.
3826 (handle_v_cont, main): Use strtoul for thread IDs.
3827 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3828 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3829 (general_thread, step_thread, thread_from_wait)
3830 (old_thread_from_wait): Update.
3831 * target.h (struct thread_resume): Use unsigned long for THREAD.
3832 (struct target_ops): Use unsigned long for arguments to attach and
3835 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3837 * acinclude.m4: Include bfd/bfd.m4 directly.
3838 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3839 <agriffis@toolchain.org>.
3840 * aclocal.m4, configure: Regenerated.
3842 2005-01-07 Andrew Cagney <cagney@gnu.org>
3844 * configure.ac: Rename configure.in, require autoconf 2.59.
3845 * configure: Re-generate.
3847 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3849 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3851 * aclocal.m4: Regenerated.
3852 * configure: Regenerated.
3854 2004-11-21 Andreas Schwab <schwab@suse.de>
3856 * linux-m68k-low.c (m68k_num_gregs): Define.
3857 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3858 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3859 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3860 (m68k_breakpoint_at): New. Add to the_low_target.
3862 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3863 srv_linux_thread_db to yes.
3865 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3867 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3868 (ARCH_SET_FS): Likewise.
3869 (ARCH_GET_FS): Likewise.
3870 (ARCH_GET_GS): Likewise.
3872 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3874 * linux-i386-low.c (ps_get_thread_area): New.
3875 * linux-x86-64-low.c (ps_get_thread_area): New.
3876 * linux-low.c: Include <sys/syscall.h>.
3877 (linux_kill_one_process): Don't kill the first thread here.
3878 (linux_kill): Kill the first thread here.
3879 (kill_lwp): New function.
3880 (send_sigstop, linux_send_signal): Use it.
3881 * proc-service.c: Clean up #ifdefs.
3882 (fpregset_info): Delete.
3883 (ps_lgetregs): Update and enable implementation.
3884 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3886 * remote-utils.c (struct sym_cache, symbol_cache): New.
3887 (input_interrupt): Print a clearer message.
3888 (async_io_enabled): New variable.
3889 (enable_async_io, disable_async_io): Use it. Update comments.
3890 (look_up_one_symbol): Use the symbol cache.
3891 * thread-db.c (thread_db_look_up_symbols): New function.
3892 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3894 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3896 * configure.in: Test for -rdynamic.
3897 * configure: Regenerated.
3898 * Makefile (INTERNAL_LDFLAGS): New.
3899 (gdbserver, gdbreplay): Use it.
3901 2004-09-02 Andrew Cagney <cagney@gnu.org>
3903 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3905 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3907 * linux-low.c (linux_wait): Clear all_processes list also.
3909 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3911 * linux-low.c: Include <errno.h>. Remove extern declaration of
3914 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3916 * gdbreplay.c, server.h, utils.c: Update copyright years.
3918 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3920 * server.c (main): Print child status or termination signal from
3921 variable 'signal', not 'sig'.
3923 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3925 * linux-low.c (linux_read_memory): Change return type to
3926 int. Check for and return error from ptrace().
3927 * target.c (read_inferior_memory): Change return type to int. Pass
3928 back return status from the_target->read_memory().
3929 * target.h (struct target_ops): Adapt *read_memory() prototype.
3931 (read_inferior_memory): Adapt prototype.
3932 * server.c (main): Return an error packet if
3933 read_inferior_memory() returns an error.
3935 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3937 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3938 Unify with other clean targets.
3940 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3942 * server.c (handle_v_cont): Call set_desired_inferior.
3944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3946 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3948 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3950 * linux-low.c (linux_wait): Unblock async I/O.
3951 (linux_resume): Block and enable async I/O.
3952 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3953 * server.h (block_async_io, unblock_async_io): Add prototypes.
3955 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3957 * remote-utils.c (remote_open): Print a status notice after
3959 * server.c (attach_inferior): Print a status notice after
3962 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3964 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3966 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3968 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3970 * server.c, target.h: Update copyright years.
3972 2004-02-25 Roland McGrath <roland@redhat.com>
3974 * target.h (struct target_ops): New member `read_auxv'.
3975 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3976 * linux-low.c (linux_read_auxv): New function.
3977 (linux_target_ops): Initialize `read_auxv' member to that.
3979 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3981 Committed by Jim Blandy <jimb@redhat.com>.
3983 * linux-s390-low.c (s390_num_regs): Update.
3984 (s390_regmap): Remove control registers. Use __s390x__ predefine
3985 instead of GPR_SIZE to distiguish s390 and s390x targets.
3987 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3989 * linux-low.c: Update copyright year.
3990 (check_removed_breakpoint): Clear pending_is_breakpoint.
3991 (linux_set_resume_request, linux_queue_one_thread)
3992 (resume_status_pending_p): New functions.
3993 (linux_continue_one_thread): Use process->resume.
3994 (linux_resume): Only resume threads if there are no pending events.
3995 * linux-low.h (struct process_info): Add resume request
3998 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
4000 * regcache.c (new_register_cache): Clear the allocated register
4001 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4003 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
4005 * linux-low.c (linux_resume): Take a struct thread_resume *
4007 (linux_wait): Update call.
4008 (resume_ptr): New static variable.
4009 (linux_continue_one_thread): Renamed from
4010 linux_continue_one_process. Use resume_ptr.
4011 (linux_resume): Use linux_continue_one_thread.
4012 * server.c (handle_v_cont, handle_v_requests): New functions.
4013 (myresume): New function.
4014 (main): Handle 'v' case.
4015 * target.h (struct thread_resume): New type.
4016 (struct target_ops): Change argument of "resume" to struct
4018 (myresume): Delete macro.
4020 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
4022 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
4023 (uninstall): Support DESTDIR.
4025 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
4027 * configure.srv: Add xscale*linux copy of arm*linux entry.
4029 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
4031 * linux-arm-low.c (arm_reinsert_addr): New function.
4032 (the_low_target): Add arm_reinsert_addr.
4034 2003-07-08 Mark Kettenis <kettenis@gnu.org>
4036 * mem-break.c: Remove whitespace at end of file.
4038 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4040 * configure.in: Check whether we need to prototype strerror.
4041 * server.h: Optionally prototype strerror.
4042 * gdbreplay.c (perror_with_name): Use strerror.
4043 * linux-low.c (linux_attach_lwp): Use strerror.
4044 * utils.c (perror_with_name): Use strerror.
4045 * config.in, configure: Regenerated.
4047 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
4049 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
4050 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
4052 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
4054 * Makefile.in (SFILES): Update.
4055 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
4056 low-sun3.c: Remove files.
4058 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
4060 * linux-low.c: Move comment to linux_thread_alive where it belonged.
4061 (linux_detach_one_process, linux_detach): New functions.
4062 (linux_target_ops): Add linux_detach.
4063 * server.c (main): Handle 'D' packet.
4064 * target.h (struct target_ops): Add "detach" member.
4065 (detach_inferior): Define.
4067 2003-06-13 Mark Kettenis <kettenis@gnu.org>
4069 From Kelley Cook <kelleycook@wideopenwest.com>:
4070 * configure.srv: Accept i[34567]86 variants.
4072 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
4074 * linux-low.c (linux_wait_for_event): Correct comment typos.
4075 (linux_resume_one_process): Call check_removed_breakpoint.
4076 (linux_send_signal): New function.
4077 (linux_target_ops): Add linux_send_signal.
4078 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4080 * target.h (struct target_ops): Add send_signal.
4082 2003-05-29 Jim Blandy <jimb@redhat.com>
4084 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4085 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4086 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4087 away part of the register's value.
4089 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4091 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4092 (linux_wait_for_event, linux_init_signals): Likewise.
4094 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4096 * configure.in: Check for stdlib.h.
4097 * configure: Regenerated.
4098 * config.in: Regenerated.
4100 2003-01-04 Andreas Schwab <schwab@suse.de>
4102 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4104 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4106 * Makefile.in: Remove obsolete code.
4108 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4110 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4111 defined(PT_FPR0_HI).
4113 2002-11-17 Stuart Hughes <seh@zee2.com>
4115 * linux-arm-low.c (arm_num_regs): Increase.
4116 (arm_regmap): Include status register.
4118 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4120 * linux-low.c (register_addr): Remove incorrect -1 check.
4122 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4124 * linux-low.c (linux_create_inferior): Call setpgid. Return
4126 (unstopped_p, linux_signal_pid): Remove.
4127 (linux_target_ops): Remove linux_signal_pid.
4128 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4129 global instead of target method.
4130 * target.h (struct target_ops): Remove signal_pid. Update comment
4131 for create_inferior.
4132 * server.c (signal_pid): New variable.
4133 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4134 gdbserver. Set the child to be the foreground process group.
4135 (attach_inferior): Set signal_pid.
4137 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4139 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4141 2002-08-20 Jim Blandy <jimb@redhat.com>
4143 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4146 2002-08-01 Andrew Cagney <cagney@redhat.com>
4148 * Makefile.in: Make chill references obsolete.
4150 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4152 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4153 * configure: Regenerate.
4154 * config.in: Regenerate.
4156 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4158 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4159 (perror_with_name, remote_close, remote_open, expect, play): Static.
4161 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4163 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4164 byte offsets instead of an array of indexes.
4165 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4167 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4169 * regcache.c: Add comment.
4171 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4173 * thread-db.c: New file.
4174 * proc-service.c: New file.
4175 * acinclude.m4: New file.
4176 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4177 proc-service.o, and thread-db.o.
4178 (linux-low.o): Add USE_THREAD_DB.
4179 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4180 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4181 * aclocal.m4: Regenerated.
4182 * config.in: Regenerated.
4183 * configure: Regenerated.
4184 * configure.in: Check for proc_service.h, sys/procfs.h,
4185 thread_db.h, and linux/elf.h headrs.
4186 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4187 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4188 Check for -lthread_db and thread support.
4189 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4190 PowerPC, and SuperH.
4191 * i387-fp.c: Constify arguments.
4192 * i387-fp.h: Likewise.
4193 * inferiors.c: (struct thread_info): Renamed from
4194 `struct inferior_info'. Remove PID member. Use generic inferior
4195 list header. All uses updated.
4196 (inferiors, signal_pid): Removed.
4197 (all_threads): New variable.
4198 (get_thread): Define.
4199 (add_inferior_to_list): New function.
4200 (for_each_inferior): New function.
4201 (change_inferior_id): New function.
4202 (add_inferior): Removed.
4203 (remove_inferior): New function.
4204 (add_thread): New function.
4205 (free_one_thread): New function.
4206 (remove_thread): New function.
4207 (clear_inferiors): Use for_each_inferior and free_one_thread.
4208 (find_inferior): New function.
4209 (find_inferior_id): New function.
4210 (inferior_target_data): Update argument type.
4211 (set_inferior_target_data): Likewise.
4212 (inferior_regcache_data): Likewise.
4213 (set_inferior_regcache_data): Likewise.
4214 * linux-low.c (linux_bp_reinsert): Remove.
4215 (all_processes, stopping_threads, using_thrads)
4216 (struct pending_signals, debug_threads, pid_of): New.
4217 (inferior_pid): Replace with macro.
4218 (struct inferior_linux_data): Remove.
4219 (get_stop_pc, add_process): New functions.
4220 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4221 Use add_process and add_thread.
4222 (linux_attach_lwp): New function, based on old linux_attach. Use
4223 add_process and add_thread. Set stop_expected for new threads.
4224 (linux_attach): New function.
4225 (linux_kill_one_process): New function.
4226 (linux_kill): Kill all LWPs.
4227 (linux_thread_alive): Use find_inferior_id.
4228 (check_removed_breakpoints, status_pending_p): New functions.
4229 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4230 Update. Use WNOHANG. Wait for cloned processes also. Update process
4231 struct for the found process.
4232 (linux_wait_for_event): New function.
4233 (linux_wait): Use it. Support LWPs.
4234 (send_sigstop, wait_for_sigstop, stop_all_processes)
4235 (linux_resume_one_process, linux_continue_one_process): New functions.
4236 (linux_resume): Support LWPs.
4237 (REGISTER_RAW_SIZE): Remove.
4238 (fetch_register): Use register_size instead. Call supply_register.
4239 (usr_store_inferior_registers): Likewise. Call collect_register.
4241 (regsets_fetch_inferior_registers): Improve error message.
4242 (regsets_store_inferior_registers): Add debugging.
4243 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4244 (unstopped_p, linux_signal_pid): New functions.
4245 (linux_target_ops): Add linux_signal_pid.
4246 (linux_init_signals): New function.
4247 (initialize_low): Call it. Initialize using_threads.
4248 * regcache.c (inferior_regcache_data): Add valid
4250 (get_regcache): Fetch registers lazily. Add fetch argument
4251 and update all callers.
4252 (regcache_invalidate_one, regcache_invalidate): New
4254 (new_register_cache): Renamed from create_register_cache.
4255 Return the new regcache.
4256 (free_register_cache): Change argument to a void *.
4257 (registers_to_string, registers_from_string): Call get_regcache
4258 with fetch flag set.
4259 (register_data): Make static. Pass fetch flag to get_regcache.
4260 (supply_register): Call get_regcache with fetch flag clear.
4261 (collect_register): Call get_regcache with fetch flag set.
4262 (collect_register_as_string): New function.
4263 * regcache.h: Update.
4264 * remote-utils.c (putpkt): Flush after debug output and use
4266 Handle input interrupts while waiting for an ACK.
4267 (input_interrupt): Use signal_pid method.
4268 (getpkt): Flush after debug output and use stderr.
4269 (outreg): Use collect_register_as_string.
4270 (new_thread_notify, dead_thread_notify): New functions.
4271 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4273 (look_up_one_symbol): Flush after debug output.
4274 * server.c (step_thread, server_waiting): New variables.
4275 (start_inferior): Don't use signal_pid. Update call to mywait.
4276 (attach_inferior): Update call to mywait.
4277 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4278 (main): Don't fetch/store registers explicitly. Use
4279 set_desired_inferior. Support proposed ``Hs'' packet. Update
4282 (struct inferior_list, struct_inferior_list_entry): New.
4283 * target.c (set_desired_inferior): New.
4284 (write_inferior_memory): Constify.
4285 (mywait): New function.
4287 (struct target_ops): New signal_pid method.
4288 (mywait): Removed macro, added prototype.
4290 * linux-low.h (regset_func): Removed.
4291 (regset_fill_func, regset_store_func): New.
4292 (enum regset_type): New.
4293 (struct regset_info): Add type field. Use new operation types.
4294 (struct linux_target_ops): stop_pc renamed to get_pc.
4295 Add decr_pc_after_break and breakpoint_at.
4296 (get_process, get_thread_proess, get_process_thread)
4297 (strut process_info, all_processes, linux_attach_lwp)
4298 (thread_db_init): New.
4300 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4301 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4302 (the_low_target): Add new members.
4303 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4304 (i386_store_fpxregset): Constify.
4305 (target_regsets): Add new kind identifier.
4306 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4307 (i386_set_pc): Add debugging.
4308 (i386_breakpoint_at): New function.
4309 (the_low_target): Add new members.
4310 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4311 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4312 (mips_breakpoint_at): New.
4313 (the_low_target): Add new members.
4314 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4315 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4316 (the_low_target): Add new members.
4317 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4318 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4319 (the_low_target): Add new members.
4320 * linux-x86-64-low.c (target_regsets): Add new kind
4323 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4325 From Martin Pool <mbp@samba.org>:
4326 * server.c (gdbserver_usage): New function.
4329 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4331 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4334 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4336 * Makefile.in: Remove obsolete code.
4338 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4340 * linux-low.c (regsets_fetch_inferior_registers),
4341 (regsets_store_inferior_registers): Removed cast to int from
4343 * regcache.h: Added declaration of struct inferior_info.
4345 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4347 * inferiors.c (struct inferior_info): Add regcache_data.
4348 (add_inferior): Call create_register_cache.
4349 (clear_inferiors): Call free_register_cache.
4350 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4351 * regcache.c (struct inferior_regcache_data): New.
4352 (registers): Remove.
4353 (get_regcache): New function.
4354 (create_register_cache, free_register_cache): New functions.
4355 (set_register_cache): Don't initialize the register cache here.
4356 (registers_to_string, registers_from_string, register_data): Call
4358 * regcache.h: Add prototypes.
4359 * server.h: Likewise.
4361 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4363 * mem-break.c: New file.
4364 * mem-break.h: New file.
4365 * Makefile.in: Add mem-break.o rule; update server.h
4367 * inferiors.c (struct inferior_info): Add target_data
4369 (clear_inferiors): Free target_data member if set.
4370 (inferior_target_data, set_inferior_target_data): New functions.
4371 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4372 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4373 * linux-low.c (linux_bp_reinsert): New variable.
4374 (struct inferior_linux_data): New.
4375 (linux_create_inferior): Use set_inferior_target_data.
4376 (linux_attach): Likewise. Call add_inferior.
4377 (linux_wait_for_one_inferior): New function.
4378 (linux_wait): Call it.
4379 (linux_write_memory): Add const.
4380 (initialize_low): Call set_breakpoint_data.
4381 * linux-low.h (struct linux_target_ops): Add breakpoint
4383 * server.c (attach_inferior): Remove extra add_inferior
4385 * server.h: Include mem-break.h. Update inferior.c
4387 * target.c (read_inferior_memory)
4388 (write_inferior_memory): New functions.
4389 * target.h (read_inferior_memory)
4390 (write_inferior_memory): Change macros to prototypes.
4391 (struct target_ops): Update comments. Add const to write_memory
4394 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4396 * linux-low.c (usr_store_inferior_registers): Support
4397 registers which are allowed to fail to store.
4398 * linux-low.h (linux_target_ops): Likewise.
4399 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4400 (ppc_cannot_store_register): FPSCR may not be storable.
4402 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4404 * server.h: Include <string.h> if HAVE_STRING_H.
4405 * ChangeLog: Correct paths in last ChangeLog entry.
4407 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4409 * linux-low.h: Remove obsolete prototypes.
4410 (struct linux_target_ops): New.
4411 (extern the_low_target): New.
4412 * linux-low.c (num_regs, regmap): Remove declarations.
4413 (register_addr): Use the_low_target explicitly.
4414 (fetch_register): Likewise.
4415 (usr_fetch_inferior_registers): Likewise.
4416 (usr_store_inferior_registers): Likewise.
4417 * linux-arm-low.c (num_regs): Remove.
4418 (arm_num_regs): Define.
4419 (arm_regmap): Renamed from regmap, made static.
4420 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4422 (arm_cannot_store_register): Renamed from cannot_store_register,
4424 (the_low_target): New.
4425 * linux-i386-low.c (num_regs): Remove.
4426 (i386_num_regs): Define.
4427 (i386_regmap): Renamed from regmap, made static.
4428 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4430 (i386_cannot_store_register): Renamed from cannot_store_register,
4432 (the_low_target): New.
4433 * linux-ia64-low.c (num_regs): Remove.
4434 (ia64_num_regs): Define.
4435 (ia64_regmap): Renamed from regmap, made static.
4436 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4438 (ia64_cannot_store_register): Renamed from cannot_store_register,
4440 (the_low_target): New.
4441 * linux-m68k-low.c (num_regs): Remove.
4442 (m68k_num_regs): Define.
4443 (m68k_regmap): Renamed from regmap, made static.
4444 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4446 (m68k_cannot_store_register): Renamed from cannot_store_register,
4448 (the_low_target): New.
4449 * linux-mips-low.c (num_regs): Remove.
4450 (mips_num_regs): Define.
4451 (mips_regmap): Renamed from regmap, made static.
4452 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4454 (mips_cannot_store_register): Renamed from cannot_store_register,
4456 (the_low_target): New.
4457 * linux-ppc-low.c (num_regs): Remove.
4458 (ppc_num_regs): Define.
4459 (ppc_regmap): Renamed from regmap, made static.
4460 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4462 (ppc_cannot_store_register): Renamed from cannot_store_register,
4464 (the_low_target): New.
4465 * linux-s390-low.c (num_regs): Remove.
4466 (s390_num_regs): Define.
4467 (s390_regmap): Renamed from regmap, made static.
4468 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4470 (s390_cannot_store_register): Renamed from cannot_store_register,
4472 (the_low_target): New.
4473 * linux-sh-low.c (num_regs): Remove.
4474 (sh_num_regs): Define.
4475 (sh_regmap): Renamed from regmap, made static.
4476 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4478 (sh_cannot_store_register): Renamed from cannot_store_register,
4480 (the_low_target): New.
4481 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4482 (the_low_target): New.
4484 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4486 * Makefile.in: Add stamp-h target.
4487 * configure.in: Create stamp-h.
4488 * configure: Regenerated.
4490 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4492 * inferiors.c: New file.
4493 * target.c: New file.
4494 * target.h: New file.
4495 * Makefile.in: Add target.o and inferiors.o. Update
4497 * linux-low.c (inferior_pid): New static variable,
4498 moved from server.c.
4499 (linux_create_inferior): Renamed from create_inferior.
4500 Call add_inferior. Return 0 on success instead of a PID.
4501 (linux_attach): Renamed from myattach.
4502 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4503 (linux_thread_alive): Renamed from mythread_alive.
4504 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4506 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4507 (regsets_store_inferior_registers): Correct error message.
4508 Add missing ``return 0''.
4509 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4510 (linux_store_registers): Renamed from store_inferior_registers.
4511 (linux_read_memory): Renamed from read_inferior_memory.
4512 (linux_write_memory): Renamed from write_inferior_memory.
4513 (linux_target_ops): New structure.
4514 (initialize_low): Call set_target_ops ().
4515 * remote-utils.c (unhexify): New function.
4516 (hexify): New function.
4517 (input_interrupt): Send signals to ``signal_pid''.
4518 * server.c (inferior_pid): Remove.
4519 (start_inferior): Update create_inferior call.
4520 (attach_inferior): Call add_inferior.
4521 (handle_query): New function.
4522 (main): Call handle_query for `q' packets.
4523 * server.h: Include "target.h". Remove obsolete prototypes.
4524 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4528 * Makefile.in: Add WARN_CFLAGS. Update configury
4530 * configure.in: Check for <string.h>
4531 * configure: Regenerate.
4532 * config.in: Regenerate.
4533 * gdbreplay.c: Include needed system headers.
4534 (remote_open): Remove strchr prototype.
4535 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4536 * regcache.c (supply_register): Change buf argument to const void *.
4537 (supply_register_by_name): Likewise.
4538 (collect_register): Change buf argument to void *.
4539 (collect_register_by_name): Likewise.
4540 * regcache.h: Add missing prototypes.
4541 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4542 * server.c (handle_query): New function.
4543 (attached): New static variable, moved out of main.
4544 (main): Quiet longjmp clobber warnings.
4545 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4546 * utils.c (error): Remove NORETURN.