1 2010-04-12 Pedro Alves <pedro@codesourcery.com>
3 * server.h (buffer_xml_printf): Remove redundant `;'.
5 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7 * regcache.c (set_register_cache): Invalidate regcaches before
8 changing the register cache layout.
9 (regcache_invalidate_one): Allow a NULL regcache.
10 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11 regcaches before changing the register cache layout or the target
14 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
16 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17 variable warning on Linux/x86-64.
19 2010-04-11 Pedro Alves <pedro@codesourcery.com>
21 GDBserver disconnected tracing support.
23 * linux-low.c (linux_remove_process): Delete.
24 (add_lwp): Don't set last_resume_kind here.
25 (linux_kill): Use `mourn'.
26 (linux_detach): Use `thread_db_detach', and `mourn'.
28 (linux_attach_lwp_1): Adjust comment.
29 (linux_attach): last_resume_kind moved the thread_info; adjust.
30 (status_pending_p_callback): Adjust.
31 (linux_wait_for_event_1): Adjust.
32 (count_events_callback, select_singlestep_lwp_callback)
33 (select_event_lwp_callback, cancel_breakpoints_callback)
34 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
35 (proceed_one_lwp): Adjust.
36 (linux_async): Add debug output.
37 (linux_thread_stopped): New.
38 (linux_pause_all): New.
39 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
41 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
42 (thread_db_free): Delete declaration.
43 (thread_db_detach, thread_db_mourn): Declare.
44 * thread-db.c (thread_db_init): Use thread_db_mourn.
45 (thread_db_free): Delete, split in two.
46 (disable_thread_event_reporting): New.
47 (thread_db_detach): New.
48 (thread_db_mourn): New.
50 * server.h (struct thread_info) <last_resume_kind>: New field.
51 <attached>: Add comment.
52 <gdb_detached>: New field.
53 (handler_func): Change return type to int.
54 (handle_serial_event, handle_target_event): Ditto.
55 (gdb_connected): Declare.
57 (disconnected_tracing): Declare.
58 (stop_tracing): Declare.
60 * server.c (handle_query) <qSupported>: Report support for
62 (queue_stop_reply_callback): Account for running threads.
63 (gdb_wants_thread_stopped): New.
64 (gdb_wants_all_threads_stopped): New.
65 (gdb_reattached_process): New.
66 (handle_status): Clear the `gdb_detached' flag of all processes.
67 In all-stop, stop all threads.
68 (main): Be sure to leave tfind mode. Handle disconnected tracing.
69 (process_serial_event): If the remote connection breaks, or if an
70 exit was forced with "monitor exit", force an event loop exit.
71 Handle disconnected tracing on detach.
72 (handle_serial_event): Adjust.
73 (handle_target_event): If GDB isn't connected, forward events back
74 to the inferior, unless the last process exited, in which case,
75 exit gdbserver. Adjust interface.
77 * remote-utils.c (remote_open): Don't block in accept. Instead
78 register an event loop source on the listen socket file
79 descriptor. Refactor bits into ...
80 (listen_desc): ... this new global.
81 (gdb_connected): ... this new function.
82 (enable_async_notification): ... this new function.
83 (handle_accept_event): ... this new function.
84 (remote_close): Clear remote_desc.
86 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
88 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
90 (mourn_inferior): Define.
91 (target_process_qsupported): Avoid the dangling else problem.
92 (thread_stopped): Define.
94 (target_waitstatus_to_string): Declare.
95 * target.c (target_waitstatus_to_string): New.
97 * tracepoint.c (tracing): Make extern.
98 (disconnected_tracing): New.
99 (stop_tracing): Make extern. Handle tracing stops due to GDB
101 (cmd_qtdisconnected): New.
102 (cmd_qtstatus): Report disconnected tracing status in trace reply.
103 (handle_tracepoint_general_set): Handle QTDisconnected.
105 * event-loop.c (event_handler_func): Change return type to int.
106 (process_event): Bail out if the event handler wants the event
108 (handle_file_event): Ditto.
109 (start_event_loop): Bail out if the event handler wants the event
112 * nto-low.c (nto_target_ops): Adjust.
113 * spu-low.c (spu_wait): Don't remove the process here.
114 (spu_target_ops): Adjust.
115 * win32-low.c (win32_wait): Don't remove the process here.
116 (win32_target_ops): Adjust.
118 2010-04-11 Pedro Alves <pedro@codesourcery.com>
120 * regcache.c (realloc_register_cache): Invalidate inferior's
121 regcache before recreating it.
123 2010-04-09 Pedro Alves <pedro@codesourcery.com>
125 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
127 2010-04-09 Stan Shebs <stan@codesourcery.com>
128 Pedro Alves <pedro@codesourcery.com>
130 * server.h (LONGEST): New.
131 (struct thread_info) <while_stepping>: New field.
132 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
134 (initialize_tracepoint, handle_tracepoint_general_set)
135 (handle_tracepoint_query, tracepoint_finished_step)
136 (tracepoint_was_hit, release_while_stepping_state_list):
137 (current_traceframe): Declare.
138 * server.c (handle_general_set): Handle tracepoint packets.
141 (handle_search_memory_1): Use read_memory.
142 (handle_query): Report support for conditional tracepoints, trace
143 state variables, and tracepoint sources. Handle tracepoint
145 (main): Initialize the tracepoints module.
146 (process_serial_event): Handle traceframe reads/writes.
148 * linux-low.c (handle_tracepoints): New.
149 (linux_wait_1): Call it.
150 (linux_resume_one_lwp): Handle while-stepping.
151 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
152 (linux_target_ops): Install them.
153 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
155 * linux-x86-low.c (x86_supports_tracepoints): New.
156 (the_low_target). Install it.
158 * mem-break.h (delete_breakpoint): Declare.
159 * mem-break.c (delete_breakpoint): Make external.
161 * target.h (struct target_ops): Add `supports_tracepoints',
162 `read_pc', and `write_pc' fields.
163 (target_supports_tracepoints): Define.
164 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
167 * regcache.h (struct regcache) <registers_owned>: New field.
168 (init_register_cache, regcache_cpy): Declare.
169 (regcache_read_pc, regcache_write_pc): Declare.
170 (register_cache_size): Declare.
171 (supply_regblock): Declare.
172 * regcache.c (init_register_cache): New.
173 (new_register_cache): Use it.
175 (register_cache_size): New.
176 (supply_regblock): New.
177 (regcache_read_pc, regcache_write_pc): New.
181 * Makefile.in (OBS): Add tracepoint.o.
182 (tracepoint.o): New rule.
184 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
186 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
188 (i386-mmx.c): Likewise.
189 (i386-mmx-linux.o): Likewise.
190 (i386-mmx-linux.c): Likewise.
192 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
193 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
194 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
195 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
197 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
198 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
199 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
201 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
203 * Makefile.in (clean): Updated.
205 (i386-avx.c): Likewise.
206 (i386-avx-linux.o): Likewise.
207 (i386-avx-linux.c): Likewise.
208 (amd64-avx.o): Likewise.
209 (amd64-avx.c): Likewise.
210 (amd64-avx-linux.o): Likewise.
211 (amd64-avx-linux.c): Likewise.
213 * configure.srv (srv_i386_regobj): Add i386-avx.o.
214 (srv_i386_linux_regobj): Add i386-avx-linux.o.
215 (srv_amd64_regobj): Add amd64-avx.o.
216 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
217 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
218 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
219 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
220 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
221 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
222 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
224 * i387-fp.c: Include "i386-xstate.h".
226 (i387_cache_to_xsave): Likewise.
227 (i387_xsave_to_cache): Likewise.
228 (x86_xcr0): Likewise.
230 * i387-fp.h (i387_cache_to_xsave): Likewise.
231 (i387_xsave_to_cache): Likewise.
232 (x86_xcr0): Likewise.
234 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
235 * linux-crisv32-low.c (target_regsets): Likewise.
236 * linux-m68k-low.c (target_regsets): Likewise.
237 * linux-mips-low.c (target_regsets): Likewise.
238 * linux-ppc-low.c (target_regsets): Likewise.
239 * linux-s390-low.c (target_regsets): Likewise.
240 * linux-sh-low.c (target_regsets): Likewise.
241 * linux-sparc-low.c (target_regsets): Likewise.
242 * linux-xtensa-low.c (target_regsets): Likewise.
244 * linux-low.c: Include <sys/uio.h>.
245 (regsets_fetch_inferior_registers): Support nt_type.
246 (regsets_store_inferior_registers): Likewise.
247 (linux_process_qsupported): New.
248 (linux_target_ops): Add linux_process_qsupported.
250 * linux-low.h (regset_info): Add nt_type.
251 (linux_target_ops): Add process_qsupported.
253 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
255 (init_registers_i386_avx_linux): New.
256 (init_registers_amd64_avx_linux): Likewise.
257 (xmltarget_i386_linux_no_xml): Likewise.
258 (xmltarget_amd64_linux_no_xml): Likewise.
259 (PTRACE_GETREGSET): Likewise.
260 (PTRACE_SETREGSET): Likewise.
261 (x86_fill_xstateregset): Likewise.
262 (x86_store_xstateregset): Likewise.
264 (x86_linux_update_xmltarget): Likewise.
265 (x86_linux_process_qsupported): Likewise.
266 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
267 (x86_arch_setup): Don't call init_registers_amd64_linux nor
268 init_registers_i386_linux here. Call
269 x86_linux_update_xmltarget.
270 (the_low_target): Add x86_linux_process_qsupported.
272 * server.c (handle_query): Call target_process_qsupported.
274 * target.h (target_ops): Add process_qsupported.
275 (target_process_qsupported): New.
277 2010-04-03 Pedro Alves <pedro@codesourcery.com>
279 * inferiors.c (add_thread): Set last_status kind to
280 TARGET_WAITKIND_IGNORE.
281 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
282 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
283 (linux_wait_1): Move `thread' local definition to block that uses
284 it. Don't NULL initialize `event_child'.
285 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
286 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
287 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
289 2010-04-01 Pedro Alves <pedro@codesourcery.com>
291 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
292 an extended waitstatus, or by a watchpoint.
293 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
294 thread was stepping or has been stopped by a watchpoint.
296 2010-04-01 Pedro Alves <pedro@codesourcery.com>
298 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
299 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
300 of another, then delete the previous, and validate all
302 (validate_inserted_breakpoint): New.
303 (delete_disabled_breakpoints): New.
304 (validate_breakpoints): New.
305 (check_mem_read): Validate breakpoints before trusting their
306 shadow. Delete disabled breakpoints.
307 (check_mem_write): Validate breakpoints before trusting they
308 should be inserted. Delete disabled breakpoints.
309 * mem-break.h (validate_breakpoints):
310 * server.c (handle_query): Validate breakpoints when we see a
313 2010-04-01 Pedro Alves <pedro@codesourcery.com>
315 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
316 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
317 if we could tell there's a GDB breakpoint at stop_pc.
318 (need_step_over_p): Don't do a step over if we find a GDB
319 breakpoint at the resume PC.
321 * mem-break.c (struct raw_breakpoint): New.
322 (enum bkpt_type): New type `gdb_breakpoint'.
323 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
324 fields. New field `raw'.
325 (find_raw_breakpoint_at): New.
326 (set_raw_breakpoint_at): Handle refcounting. Create a raw
328 (set_breakpoint_at): Adjust.
329 (delete_raw_breakpoint): New.
330 (release_breakpoint): New.
331 (delete_breakpoint): Rename to...
332 (delete_breakpoint_1): ... this. Add proc parameter. Use
333 release_breakpoint. Return ENOENT.
334 (delete_breakpoint): Reimplement.
335 (find_breakpoint_at): Delete.
336 (find_gdb_breakpoint_at): New.
337 (delete_breakpoint_at): Delete.
338 (set_gdb_breakpoint_at): New.
339 (delete_gdb_breakpoint_at): New.
340 (gdb_breakpoint_here): New.
341 (set_reinsert_breakpoint): Use release_breakpoint.
342 (uninsert_breakpoint): Rename to ...
343 (uninsert_raw_breakpoint): ... this.
344 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
345 (reinsert_raw_breakpoint): Change parameter type to
347 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
349 (check_breakpoints): Adjust. Use release_breakpoint.
350 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
351 (breakpoint_inserted_here): Ditto.
352 (check_mem_read): Adjust to iterate over raw breakpoints instead.
353 Don't trust the breakpoint's shadow if it is not inserted.
354 (check_mem_write): Adjust to iterate over raw breakpoints instead.
355 (delete_all_breakpoints): Adjust.
356 (free_all_breakpoints): Mark all breakpoints as uninserted, and
357 use delete_breakpoint_1.
359 * mem-break.h (breakpoints_supported): Delete declaration.
360 (set_gdb_breakpoint_at): Declare.
361 (gdb_breakpoint_here): Declare.
362 (delete_breakpoint_at): Delete.
363 (delete_gdb_breakpoint_at): Declare.
365 * server.h (struct raw_breakpoint): Forward declare.
366 (struct process_info): New field `raw_breakpoints'.
368 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
371 2010-03-24 Pedro Alves <pedro@codesourcery.com>
373 * linux-low.c (status_pending_p_callback): Fix comment.
374 (linux_wait_for_event_1): Move most of the internal breakpoint
375 handling from here...
376 (linux_wait_1): ... to here.
377 (count_events_callback): New.
378 (select_singlestep_lwp_callback): New.
379 (select_event_lwp_callback): New.
380 (cancel_breakpoints_callback): New.
381 (select_event_lwp): New.
382 (linux_wait_1): Simplify internal breakpoint handling. Give equal
383 priority to all LWPs that have had events that should be reported
384 to the client. Cancel breakpoints when about to reporting the
385 event to the client, not while stopping lwps. No longer cancel
386 finished single-steps here.
387 (cancel_finished_single_step): Delete.
388 (cancel_finished_single_steps): Delete.
390 2010-03-24 Pedro Alves <pedro@codesourcery.com>
392 * mem-break.c (enum bkpt_type): New.
393 (struct breakpoint): New field `type'.
394 (set_breakpoint_at): Change return type to struct breakpoint
395 pointer. Set type to `other_breakpoint' by default.
396 (delete_breakpoint): Rewrite, supporting more than one breakpoint
397 in the breakpoint list.
398 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
399 (reinsert_breakpoint): Rename to ...
400 (reinsert_raw_breakpoint): ... this.
401 (reinsert_breakpoints_at): Adjust.
402 * mem-break.h (struct breakpoint): Declare.
403 (set_breakpoint_at): Change return type to struct breakpoint
406 2010-03-24 Pedro Alves <pedro@codesourcery.com>
408 * server.c (handle_query): Assign, not compare.
410 2010-03-24 Pedro Alves <pedro@codesourcery.com>
412 Teach linux gdbserver to step-over-breakpoints.
414 * linux-low.c (can_hardware_single_step): New.
415 (supports_breakpoints): New.
416 (handle_extended_wait): If stopping threads, read the stop pc of
419 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
420 low target doesn't support retrieving the PC.
421 (add_lwp): Set last_resume_kind to resume_continue.
422 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
423 (linux_attach): Don't clear stop_expected. Set the lwp's
424 last_resume_kind to resume_stop.
425 (linux_detach_one_lwp): Don't check for removed breakpoints.
426 (check_removed_breakpoint): Delete.
427 (status_pending_p): Rename to ...
428 (status_pending_p_callback): ... this. Don't check for removed
429 breakpoints. Don't consider threads that are stopped from GDB's
431 (linux_wait_for_lwp): Always read the stop_pc here.
432 (cancel_breakpoint): New.
433 (step_over_bkpt): New global.
434 (linux_wait_for_event_1): Implement stepping over breakpoints.
435 (gdb_wants_lwp_stopped): New.
436 (gdb_wants_all_stopped): New.
437 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
438 single-step traps here. Store the thread's last reported target
440 (send_sigstop): Don't clear stop_expected. Always set it,
442 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
443 (cancel_finished_single_step): New.
444 (cancel_finished_single_steps): New.
445 (wait_for_sigstop): Don't cancel finished single-step traps here.
446 (linux_resume_one_lwp): Don't check for removed breakpoints.
447 Don't set `step' on non-hardware step archs.
448 (linux_set_resume_request): Ignore resume_stop requests if already
449 stopping or stopped. Set the lwp's last_resume_kind.
450 (resume_status_pending_p): Don't check for removed breakpoints.
451 (need_step_over_p): New.
452 (start_step_over): New.
453 (finish_step_over): New.
454 (linux_resume_one_thread): Always queue a sigstop for resume_stop
455 requests. Clear the thread's last reported target waitstatus.
456 Don't use the `suspended' flag. Don't consider pending breakpoints.
457 (linux_resume): Start a step-over if necessary.
458 (proceed_one_lwp): New.
459 (proceed_all_lwps): New.
460 (unstop_all_lwps): New.
461 * linux-low.h (struct lwp_info): Rewrite comment for the
462 `suspended' flag. Add the `stop_pc' field. Delete the
463 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
464 Add `'last_resume_kind' and `need_step_over' fields.
465 * inferiors.c (struct thread_info): Delete, moved elsewhere.
466 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
467 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
468 (set_raw_breakpoint_at): New.
469 (set_breakpoint_at): Rewrite to use it.
470 (reinsert_breakpoint_handler): Delete.
471 (set_reinsert_breakpoint): New.
472 (reinsert_breakpoint_by_bp): Delete.
473 (delete_reinsert_breakpoints): New.
474 (uninsert_breakpoint): Rewrite.
475 (uninsert_breakpoints_at): New.
476 (reinsert_breakpoint): Rewrite.
477 (reinsert_breakpoints_at): New.
478 (check_breakpoints): Rewrite.
479 (breakpoint_here): New.
480 (breakpoint_inserted_here): New.
481 (check_mem_read): Adjust.
482 * mem-break.h (breakpoints_supported, breakpoint_here)
483 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
484 (reinsert_breakpoint_by_bp): Delete declaration.
485 (delete_reinsert_breakpoints): Declare.
486 (reinsert_breakpoint): Delete declaration.
487 (reinsert_breakpoints_at): Declare.
488 (uninsert_breakpoint): Delete declaration.
489 (uninsert_breakpoints_at): Declare.
490 (check_breakpoints): Adjust prototype.
491 * server.h: Adjust include order.
492 (struct thread_info): Declare here. Add a `last_status' field.
494 2010-03-23 Michael Snyder <msnyder@vmware.com>
496 * server.c (crc32): New function.
497 (handle_query): Add handling for 'qCRC:' request.
499 2010-03-23 Pedro Alves <pedro@codesourcery.com>
501 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
502 lwp had been stopped by a watchpoint.
504 2010-03-16 Pedro Alves <pedro@codesourcery.com>
506 * server.h (internal_error): Declare.
507 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
508 * utils.c (internal_error): New function.
510 2010-03-15 Andreas Schwab <schwab@redhat.com>
512 * configure.srv: Fix typo setting srv_regobj.
514 2010-03-15 Pedro Alves <pedro@codesourcery.com>
516 * linux-low.c (fetch_register): Avoid passing a non string literal
518 (usr_store_inferior_registers): Ditto.
520 2010-03-14 Pedro Alves <pedro@codesourcery.com>
522 * linux-low.c (linux_write_memory): Bail out early if peeking
525 2010-03-14 Pedro Alves <pedro@codesourcery.com>
527 * linux-low.h (struct lwp_info): New fields
528 `stopped_by_watchpoint' and `stopped_data_address'.
529 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
530 here, and cache them in the lwp object.
531 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
533 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
535 (linux_stopped_by_watchpoint): Rewrite.
536 (linux_stopped_data_address): Rewrite.
538 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
540 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
541 switching the current inferior, not before.
543 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
545 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
546 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
547 i386-linux.c and amd64-linux.c.
548 (reg-i386.o): Removed.
549 (reg-i386.c): Likewise.
550 (reg-i386-linux.o): Likewise.
551 (reg-i386-linux.c): Likewise.
552 (reg-x86-64.o): Likewise.
553 (reg-x86-64.c): Likewise.
554 (reg-x86-64-linux.o): Likewise.
555 (reg-x86-64-linux.c): Likewise.
558 (i386-linux.o): Likewise.
559 (i386-linux.c): Likewise.
562 (amd64-linux.o): Likewise.
563 (amd64-linux.c): Likewise.
565 * configure.srv (srv_i386_regobj): New.
566 (srv_i386_linux_regobj): Likewise.
567 (srv_amd64_regobj): Likewise.
568 (srv_amd64_linux_regobj): Likewise.
569 (srv_i386_32bit_xmlfiles): Likewise.
570 (srv_i386_64bit_xmlfiles): Likewise.
571 (srv_i386_xmlfiles): Likewise.
572 (srv_amd64_xmlfiles): Likewise.
573 (srv_i386_linux_xmlfiles): Likewise.
574 (srv_amd64_linux_xmlfiles): Likewise.
575 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
576 srv_xmlfiles to $srv_i386_xmlfiles.
577 (i[34567]86-*-mingw32ce*): Likewise.
578 (i[34567]86-*-mingw*): Likewise.
579 (i[34567]86-*-nto*): Likewise.
580 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
581 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
582 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
583 (x86_64-*-linux*): Likewise.
585 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
586 (init_registers_amd64_linux): New.
587 (x86_arch_setup): Replace init_registers_x86_64_linux with
588 init_registers_amd64_linux.
590 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
592 * configure.ac: Check for libdl. If it is not available link against
594 * configure: Regenerate.
596 2010-02-22 Pedro Alves <pedro@codesourcery.com>
600 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
601 handing a read watchpoint.
602 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
604 2010-02-12 Doug Evans <dje@google.com>
606 * linux-low.c (linux_supports_tracefork_flag): Document.
607 (linux_look_up_symbols): Add comment.
609 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
611 * regcache.c (supply_register): Clear regcache if buf is NULL.
613 2010-02-02 Nicolas Roche <roche@sourceware.org>
614 Joel Brobecker <brobecker@adacore.com>
616 * inferiors.c (find_inferior): Add function documentation.
617 (unloaded_dll): Handle the case where the unloaded dll has not
618 been previously registered in the dll list.
620 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
622 * linux-arm-low.c (thumb_breakpoint_len): Delete.
623 (thumb2_breakpoint): New.
624 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
626 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
628 * linux-low.c (get_stop_pc): Check for SIGTRAP.
629 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
632 2010-01-21 Pedro Alves <pedro@codesourcery.com>
634 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
636 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
638 * linux-s390-low.c (s390_collect_ptrace_register)
639 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
641 2010-01-21 Doug Evans <dje@google.com>
643 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
644 (PTRACE_ARG4_TYPE): New macro.
645 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
646 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
647 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
648 (usr_store_inferior_registers): Ditto.
649 (linux_read_memory, linux_write_memory): Ditto.
650 (linux_test_for_tracefork): Ditto.
652 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
653 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
655 2010-01-21 Pedro Alves <pedro@codesourcery.com>
657 * proc-service.c (ps_lgetregs): Don't refetch registers from the
660 2010-01-21 Pedro Alves <pedro@codesourcery.com>
662 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
663 prototype to take a regcache. Adjust.
665 2010-01-20 Pedro Alves <pedro@codesourcery.com>
667 * regcache.h (struct thread_info): Forward declare.
668 (struct regcache): New.
669 (new_register_cache): Adjust prototype.
670 (get_thread_regcache): Declare.
671 (free_register_cache): Adjust prototype.
672 (registers_to_string, registers_from_string): Ditto.
673 (supply_register, supply_register_by_name, collect_register)
674 (collect_register_as_string, collect_register_by_name): Ditto.
675 * regcache.c (struct inferior_regcache_data): Delete.
676 (get_regcache): Rename to ...
677 (get_thread_regcache): ... this. Adjust. Switch inferior before
679 (regcache_invalidate_one): Adjust.
680 (regcache_invalidate): Fix prototype.
681 (new_register_cache): Return the new register cache.
682 (free_register_cache): Change prototype.
683 (realloc_register_cache): Adjust.
684 (registers_to_string): Change prototype to take a regcache. Adjust.
685 (registers_from_string): Ditto.
686 (register_data): Ditto.
687 (supply_register): Ditto.
688 (supply_register_by_name): Ditto.
689 (collect_register): Ditto.
690 (collect_register_as_string): Ditto.
691 (collect_register_by_name): Ditto.
692 * server.c (process_serial_event): Adjust.
693 * linux-low.h (regset_fill_func, regset_store_func): Change
695 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
697 * linux-low.c (get_stop_pc): Adjust.
698 (check_removed_breakpoint): Adjust.
699 (linux_wait_for_event): Adjust.
700 (linux_resume_one_lwp): Adjust.
701 (fetch_register): Add regcache parameter. Adjust.
702 (usr_store_inferior_registers): Ditto.
703 (regsets_fetch_inferior_registers): Ditto.
704 (regsets_store_inferior_registers): Ditto.
705 (linux_fetch_registers, linux_store_registers): Ditto.
706 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
708 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
709 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
710 prototype to take a regcache.
711 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
712 * remote-utils.c (convert_ascii_to_int, outreg)
713 (prepare_resume_reply): Change prototype to take a regcache.
715 * target.h (struct target_ops) <fetch_registers, store_registers>:
716 Change prototype to take a regcache.
717 (fetch_inferior_registers, store_inferior_registers): Change
718 prototype to take a regcache. Adjust.
719 * proc-service.c (ps_lgetregs): Adjust.
720 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
721 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
722 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
723 take a regcache. Adjust.
724 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
725 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
726 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
727 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
728 * linux-cris-low.c (cris_get_pc, cris_set_pc)
729 (cris_cannot_fetch_register):
730 (cris_breakpoint_at): Change prototype to take a regcache.
732 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
733 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
734 to take a regcache. Adjust.
735 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
737 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
738 take a regcache. Adjust.
739 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
740 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
741 (m68k_set_pc): Change prototype to take a regcache. Adjust.
742 * linux-mips-low.c (mips_get_pc):
743 (mips_set_pc): Change prototype to take a regcache. Adjust.
744 (mips_reinsert_addr): Adjust.
745 (mips_collect_register): Change prototype to take a regcache.
747 (mips_supply_register):
748 (mips_collect_register_32bit, mips_supply_register_32bit)
749 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
750 (mips_store_fpregset): Ditto.
751 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
753 (parse_spufs_run): Adjust.
754 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
755 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
756 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
757 take a regcache. Adjust.
758 * linux-s390-low.c (s390_collect_ptrace_register)
759 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
760 (s390_set_pc): Change prototype to take a regcache. Adjust.
761 (s390_arch_setup): Adjust.
762 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
763 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
764 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
765 (sparc_fill_gregset, sparc_store_gregset_from_stack)
766 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
768 (sparc_breakpoint_at): Adjust.
769 * linux-xtensa-low.c (xtensa_fill_gregset):
770 (xtensa_store_gregset):
771 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
772 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
773 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
774 prototype to take a regcache. Adjust.
775 * win32-arm-low.c (arm_fetch_inferior_register)
776 (arm_store_inferior_register): Change prototype to take a
778 * win32-i386-low.c (i386_fetch_inferior_register)
779 (i386_store_inferior_register): Change prototype to take a
781 * win32-low.c (child_fetch_inferior_registers)
782 (child_store_inferior_registers): Change prototype to take a
784 (win32_wait): Adjust.
785 (win32_fetch_inferior_registers): Change prototype to take a
787 (win32_store_inferior_registers): Adjust.
788 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
789 store_inferior_register>: Change prototype to take a regcache.
791 2010-01-20 Doug Evans <dje@google.com>
793 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
795 (linux_wait_for_event1, linux_init_signals): Ditto.
796 (W_STOPCODE): Provide definition if missing.
798 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
800 * linux-low.c (linux_core_of_thread): New.
801 (compare_ints, show_process, list_threads): New.
802 (linux_qxfer_osdata): Report threads and cores.
803 (linux_target_op): Register linux_core_of_thread.
804 * remote-utils.c (prepare_resume_reply): Report the core.
805 (buffer_xml_printf): Support %d specifier.
806 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
808 (handle_query): Handle qXfer:threads. Announce availability
810 * target.h (struct target_ops): New field core_of_thread.
812 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
814 * Makefile.in (clean): Remove new generated files.
815 (reg-s390.o, reg-s390.c): Remove rules.
816 (reg-s390x.o, reg-s390x.c): Likewise.
817 (s390-linux32.o, s390-linux32.c): Add rules.
818 (s390-linux64.o, s390-linux64.c): Likewise.
819 (s390x-linux64.o, s390x-linux64.c): Likewise.
820 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
821 * linux-s390-low.c: Include <elf.h>.
822 (HWCAP_S390_HIGH_GPRS): Define if undefined.
823 (init_registers_s390): Remove prototype.
824 (init_registers_s390x): Likewise.
825 (init_registers_s390_linux32): Add prototype.
826 (init_registers_s390_linux64): Likewise.
827 (init_registers_s390x_linux64): Likewise.
828 (s390_num_regs_3264): New define.
829 (s390_regmap_3264): New global variable.
830 (s390_cannot_fetch_register): Remove obsolete check.
831 (s390_cannot_store_register): Likewise.
832 (s390_collect_ptrace_register): Handle upper/lower register halves.
833 (s390_supply_ptrace_register): Likewise.
834 (s390_fill_gregset): Update to register number changes.
835 (s390_get_hwcap): New routine.
836 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
837 Install appropriate regmap and register set.
839 2010-01-01 Joel Brobecker <brobecker@adacore.com>
841 * server.c (gdbserver_version): Update copyright year to 2010.
842 * gdbreplay.c (gdbreplay_version): Likewise.
844 2009-12-28 Doug Evans <dje@google.com>
846 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
847 elf/external.h. Include <elf.h> instead but only if necessary.
849 2009-12-28 Pedro Alves <pedro@codesourcery.com>
851 * linux-low.c (linux_remove_process): Remove `detaching'
852 parameter. Don't release/detach from thread_db here.
853 (linux_kill): Release/detach from thread_db here, ...
854 (linux_detach): ... and here, before actually detaching.
855 (linux_wait_1): ... and here, when a process exits.
856 * thread-db.c (any_thread_of): New.
857 (thread_db_free): Switch the current inferior to a thread of the
860 2009-12-21 Doug Evans <dje@google.com>
862 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
864 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
865 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
866 warning ifndef __NR_tkill. Move setting of errno there too.
867 Delete unnecessary resetting of errno after syscall.
868 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
870 * configure.ac: Check for dladdr.
871 * config.in: Regenerate.
872 * configure: Regenerate.
873 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
874 (try_thread_db_load): Update.
876 * linux-low.c (my_waitpid): Delete unnecessary prototype.
878 2009-12-18 Doug Evans <dje@google.com>
880 * event-loop.c: Include unistd.h if it exists.
882 * linux-low.c (my_waitpid): Move definition away from being in
883 between linux_tracefork_child/linux_test_for_tracefork.
885 * gdb_proc_service.h (psaddr_t): Fix type.
886 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
887 signature to match glibc.
889 2009-12-16 Doug Evans <dje@google.com>
891 * linux-low.c (linux_read_memory): Fix argument to read.
893 2009-11-26 Pedro Alves <pedro@codesourcery.com>
895 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
896 events, don't leave current_inferior pointing at null.
898 2009-11-26 Pedro Alves <pedro@codesourcery.com>
900 * win32-low.c (LOG): Delete.
901 (OUTMSG): Output to stderr.
902 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
903 on compile time LOG macro.
904 (win32_wait): Fix debug output.
906 2009-11-26 Pedro Alves <pedro@codesourcery.com>
908 * win32-low.c (win32_add_one_solib): If the dll name is
909 "ntdll.dll", prepend the system directory to the dll path.
911 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
913 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
915 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
916 Vladimir Prus <vladimir@codesourcery.com>
918 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
919 * configure.ac: Check for __mcoldfire__ and set
920 gdb_cv_m68k_is_coldfire.
921 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
922 reg-cf.o and reg-m68k.o.
923 * configure: Regenerated.
925 2009-11-16 Pedro Alves <pedro@codesourcery.com>
927 * linux-low.c (linux_remove_process): Add `detaching' parameter.
928 Pass it to thread_db_free.
929 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
930 proper `detaching' argument to linux_remove_process.
931 * linux-low.h (thread_db_free): Add `detaching' parameter.
932 * thread-db.c (thread_db_init): Pass false as `detaching' argument
934 (thread_db_free): Add `detaching' parameter. Only
935 call td_ta_clear_event if detaching from process.
937 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
939 * thread-db.c (thread_db_free): Fix typo.
941 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
944 * thread-db.c (thread_db_free): Call td_ta_clear_event.
946 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
948 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
949 with an i686 compiler.
950 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
952 * configure: Rebuilt.
954 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
958 * server.c (handle_search_memory_1): Correct read_addr initialization
959 in loop for searching subsequent chunks.
961 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
963 * configure.ac: New --with-libthread-db option.
964 * thread-db.c: Allow direct dependence on libthread_db.
965 (thread_db_free): Adjust.
966 * config.in: Regenerate.
967 * configure: Likewise.
969 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
972 * thread-db.c (attach_thread): New function.
973 (maybe_attach_thread): Return success/failure.
974 (find_new_threads_callback): Adjust.
975 (thread_db_find_new_threads): Loop until no new threads.
977 2009-10-13 Pedro Alves <pedro@codesourcery.com>
979 * proc-service.c (ps_lgetregs): Formatting.
981 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
983 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
984 * configure.ac: Adjust.
985 * linux-low.h (struct process_info_private): Move members to struct
987 (thread_db_free, thread_db_handle_monitor_command): New prototype.
988 * linux-low.c (linux_remove_process): Adjust.
989 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
990 * server.c (handle_query): Move code ...
991 (handle_monitor_command): ... here. New function.
992 * target.h (struct target_ops): New member.
993 * thread-db.c (struct thread_db): New.
994 (libthread_db_search_path): New variable.
995 (thread_db_create_event, thread_db_enable_reporting)
996 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
997 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
998 (try_thread_db_load_1, dladdr_to_soname): New functions.
999 (try_thread_db_load, thread_db_load_search): New functions.
1000 (thread_db_init): Search for libthread_db.
1001 (thread_db_free): New function.
1002 (thread_db_handle_monitor_command): Likewise.
1003 * config.in: Regenerate.
1004 * configure: Regenerate.
1006 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
1008 * spu-low.c (spu_kill): Wait for inferior to terminate.
1009 Call clear_inferiors.
1010 (spu_detach): Call clear_inferiors.
1012 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1014 * aclocal.m4: Regenerate.
1015 * config.in: Likewise.
1016 * configure: Likewise.
1018 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1020 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1021 (parse_spufs_run): New function.
1022 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1023 (ppc_breakpoint_at): Handle SPU breakpoints.
1025 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1027 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1028 (SPUFS_MAGIC): Define.
1029 (spu_enumerate_spu_ids): New function.
1030 (linux_qxfer_spu): New function.
1031 (linux_target_ops): Install linux_qxfer_spu.
1033 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1035 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1036 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1037 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1038 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1039 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1040 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1041 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1042 (init_registers_powerpc_cell32l): Add prototype.
1043 (init_registers_powerpc_cell64l): Likewise.
1044 (ppc_arch_setup): Detect Cell/B.E. architecture.
1046 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1048 * Makefile.in (datarootdir): New variable.
1050 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1052 * linux-low.c (linux_write_memory): Update debugging output.
1053 * Makefile.in (clean): Add new descriptions.
1054 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1055 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1056 * configure.srv: Add new files for arm*-*-linux*.
1057 * linux-arm-low.c: Add new declarations.
1058 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1059 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1060 (HWCAP_VFPv3D16): New.
1061 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1062 instead of __IWMMXT__.
1063 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1064 (arm_arch_setup): New.
1065 (target_regsets): Remove #ifdef. Add VFP regset.
1066 (the_low_target): Use arm_arch_setup.
1068 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1070 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1071 the main thread again.
1073 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1075 Adding Neutrino gdbserver.
1076 * configure: Regenerated.
1077 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1078 * configure.srv (i[34567]86-*-nto*): New target.
1079 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1080 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1081 (nto_comctrl) [__QNX__]: New function.
1082 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1084 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1086 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1089 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1090 Pedro Alves <pedro@codesourcery.com>
1092 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1093 don't support CONTEXT_EXTENDED_REGISTERS.
1094 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1095 (the_low_target): Install them.
1096 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1097 failing with ERROR_PIPE_NOT_CONNECTED.
1099 2009-06-30 Doug Evans <dje@google.com>
1100 Pierre Muller <muller@ics.u-strasbg.fr>
1102 Add h/w watchpoint support to x86-linux, win32-i386.
1103 * Makefile.in (SFILES): Add i386-low.c
1104 (i386_low_h): Define.
1105 (i386-low.o): Add dependencies.
1106 (linux-x86-low.o): Add i386-low.h dependency.
1107 (win32-i386-low.o): Ditto.
1108 * i386-low.c: New file.
1109 * i386-low.h: New file.
1110 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1111 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1112 * linux-low.c (linux_add_process): Initialize arch_private.
1113 (linux_remove_process): Free arch_private.
1114 (add_lwp): Initialize arch_private.
1115 (delete_lwp): Free arch_private.
1116 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1118 * linux-low.h (process_info_private): New member arch_private.
1119 (lwp_info): New member arch_private.
1120 (linux_target_ops): New members new_process, new_thread,
1122 (ptid_of): New macro.
1123 * linux-x86-low.c: Include stddef.h, i386-low.h.
1124 (arch_process_info): New struct.
1125 (arch_lwp_info): New struct.
1126 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1127 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1128 (i386_dr_low_get_status): New function.
1129 (x86_insert_point, x86_remove_point): New functions.
1130 (x86_stopped_by_watchpoint): New function.
1131 (x86_stopped_data_address): New function.
1132 (x86_linux_new_process, x86_linux_new_thread): New functions.
1133 (x86_linux_prepare_to_resume): New function.
1134 (the_low_target): Add entries for insert_point, remove_point,
1135 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1137 * server.c (debug_hw_points): New global.
1138 (monitor_show_help): Document set debug-hw-points.
1139 (handle_query): Process "set debug-hw-points".
1140 * server.h (debug_hw_points): Declare.
1141 (paddress): Declare.
1142 * utils.c (NUMCELLS, CELLSIZE): New macros.
1143 (get_sell, xsnprintf, paddress): New functions.
1144 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1145 remove_point, stopped_by_watchpoint, stopped_data_address.
1146 * win32-i386-low.c: Include i386-low.h.
1147 (debug_reg_state): Replaces dr.
1148 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1149 (i386_dr_low_get_status): New function.
1150 (i386_insert_point, i386_remove_point): New functions.
1151 (i386_stopped_by_watchpoint): New function.
1152 (i386_stopped_data_address): New function.
1153 (i386_initial_stuff): Update.
1154 (get_thread_context,set_thread_context,i386_thread_added): Update.
1155 (the_low_target): Add entries for insert_point,
1156 remove_point, stopped_by_watchpoint, stopped_data_address.
1157 * win32-low.c (win32_insert_watchpoint): New function.
1158 (win32_remove_watchpoint): New function.
1159 (win32_stopped_by_watchpoint): New function.
1160 (win32_stopped_data_address): New function.
1161 (win32_target_ops): Add entries for insert_watchpoint,
1162 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1163 * win32-low.h (win32_target_ops): New members insert_point,
1164 remove_point, stopped_by_watchpoint, stopped_data_address.
1166 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1168 * server.c (process_serial_event): Re-return unsupported, not
1169 error, if the type isn't recognized. Re-allow supporting only
1170 insert or remove packets. Also call require_running for
1171 breakpoints. Add missing break statement to default case. Tidy.
1172 * target.h (struct target_ops): Rename insert_watchpoint to
1173 insert_point, and remove_watchpoint to remove_point.
1175 * linux-low.h (struct linux_target_ops): Likewise.
1176 * linux-low.c (linux_insert_watchpoint): Rename to ...
1177 (linux_insert_point): ... this. Adjust.
1178 (linux_remove_watchpoint): Rename to ...
1179 (linux_remove_point): ... this. Adjust.
1180 (linux_target_ops): Adjust.
1181 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1182 (cris_insert_point): ... this.
1183 (cris_remove_watchpoint): Rename to ...
1184 (cris_remove_point): ... this.
1185 (the_low_target): Adjust.
1187 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1189 * server.c (handle_v_kill): Pass signal_pid to
1190 kill_inferior if multi_process is zero.
1192 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1194 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1195 * target.h (target_ops): Comment for *_watchpoint to make it clear
1196 the functions can get types '0' and '1'.
1198 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1200 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1201 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1202 * regcache.c (get_regcache): Likewise.
1203 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1204 * win32-low.c (child_fetch_inferior_registers): Remove check for
1207 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1208 Pedro Alves <pedro@codesourcery.com>
1210 * target.h (struct target_ops) <supports_multi_process>: New
1212 (target_supports_multi_process): New.
1213 * server.c (handle_query): Even if GDB reports support, only
1214 enable multi-process if the target also supports it. Report
1215 multi-process support only if the target backend supports it.
1216 * linux-low.c (linux_supports_multi_process): New function.
1217 (linux_target_ops): Install it as target_supports_multi_process
1220 2009-05-24 Doug Evans <dje@google.com>
1222 Global renaming of find_thread_pid to find_thread_ptid.
1223 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1224 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1225 All callers updated.
1227 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1228 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1231 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1232 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1233 (linux_resume_one_lwp): Ditto.
1235 2009-05-23 Doug Evans <dje@google.com>
1237 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1238 from struct inferior_list_entry * to struct lwp_info *.
1239 All callers updated.
1241 2009-05-13 Doug Evans <dje@google.com>
1243 * linux-x86-low.c: Don't include assert.h.
1244 (x86_siginfo_fixup): Use fatal, not assert.
1245 (x86_arch_setup): Fix comment.
1247 2009-05-12 Doug Evans <dje@google.com>
1249 Biarch support for i386/amd64 gdbserver.
1250 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1251 Add linux-x86-low.c.
1252 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1253 (linux-x86-low.o): Add.
1254 * linux-x86-64-low.c: Delete.
1255 * linux-i386-low.c: Delete.
1256 * linux-x86-low.c: New file.
1257 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1259 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1261 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1262 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1263 (linux_child_pid_to_exec_file): New function.
1264 (elf_64_header_p, elf_64_file_p): New functions.
1265 (siginfo_fixup): New function.
1266 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1267 give target a chance to convert layout.
1268 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1269 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1271 2009-05-07 Doug Evans <dje@google.com>
1273 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1274 (regsets_store_inferior_registers): Ditto.
1276 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1280 * linux-low.c (must_set_ptrace_flags): Delete.
1281 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1283 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1284 `lwp->must_set_ptrace_flags' instead.
1285 (linux_wait_for_event_1): Set ptrace options here.
1286 (linux_wait_1): ... not here.
1288 2009-04-30 Doug Evans <dje@google.com>
1290 * inferiors.c (started_inferior_callback): New function.
1291 (attached_inferior_callback): New function.
1292 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1293 * server.c (print_started_pid, print_attached_pid): New functions.
1294 (detach_or_kill_for_exit): New function.
1295 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1296 * server.h (have_started_inferiors_p): Declare.
1297 (have_attached_inferiors_p): Declare.
1299 * inferiors.c (remove_process): Fix memory leak, free process.
1300 * linux-low.c (linux_remove_process): New function.
1301 (linux_kill): Call it instead of remove_process.
1302 (linux_detach, linux_wait_1): Ditto.
1304 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1306 * configure.srv: Add x86 Windows CE target.
1308 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1310 * inferiors.c (get_thread_process): Make global.
1311 * server.h (get_thread_process): Add prototype.
1312 * thread-db.c (find_one_thread): Use get_thread_process
1313 instead of current_process.
1314 (thread_db_get_tls_address): Do not crash if called when
1315 thread layer is not yet initialized.
1317 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1319 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1320 * spu-low.c (current_tid): Rename to ...
1321 (current_ptid): ... this.
1322 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1323 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1324 ptid_get_lwp (current_ptid) instead of current_tid.
1325 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1326 instead of current_tid. Use find_process_pid to verify pid
1327 argument is valid. Pass proper argument to remove_process.
1328 (spu_thread_alive): Compare current_ptid instead of current_tid.
1329 (spu_resume): Likewise.
1331 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1333 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1336 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1338 Implement the multiprocess extensions, and add linux multiprocess
1341 * server.h (ULONGEST): Declare.
1342 (struct ptid, ptid_t): New.
1343 (minus_one_ptid, null_ptid): Declare.
1344 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1345 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1346 (struct inferior_list_entry): Change `id' type from unsigned from
1348 (struct sym_cache, struct breakpoint, struct
1349 process_info_private): Forward declare.
1350 (struct process_info): Declare.
1351 (current_process): Declare.
1352 (all_processes): Declare.
1353 (initialize_inferiors): Declare.
1354 (add_thread): Adjust to use ptid_t.
1355 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1356 (add_process, remove_process, find_thread_pid): Declare.
1357 (find_inferior_id): Adjust to use ptid_t.
1358 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1359 (multi_process): Declare.
1360 (push_event): Adjust to use ptid_t.
1361 (read_ptid, write_ptid): Declare.
1362 (prepare_resume_reply): Adjust to use ptid_t.
1363 (clear_symbol_cache): Declare.
1364 * inferiors.c (all_processes): New.
1365 (null_ptid, minus_one_ptid): New.
1366 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1367 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1368 (add_thread): Change unsigned long to ptid. Remove gdb_id
1370 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1371 (gdb_id_to_thread): Rename to ...
1372 (find_thread_pid): ... this. Change unsigned long to ptid.
1373 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1374 (loaded_dll, pull_pid_from_list): Adjust.
1375 (add_process, remove_process, find_process_pid)
1376 (get_thread_process, current_process, initialize_inferiors): New.
1377 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1378 (struct target_waitstatus) <related_pid>: Ditto.
1379 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1381 (struct target_ops) <join>: Add `pid' argument.
1382 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1383 (struct target_ops) <wait>: Add `ptid' field. Change return type
1385 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1386 (mywait): Add `ptid' argument. Change return type to ptid_t.
1387 (target_pid_to_str): Declare.
1388 * target.c (set_desired_inferior): Adjust to use ptids.
1389 (mywait): Add new `ptid' argument. Adjust.
1390 (target_pid_to_str): New.
1391 * mem-break.h (free_all_breakpoints): Declare.
1392 * mem-break.c (breakpoints): Delelete.
1393 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1394 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1395 to use per-process breakpoint list.
1396 (free_all_breakpoints): New.
1397 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1398 (symbol_cache, all_symbols_looked_up): Delete.
1400 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1402 (prepare_resume_reply): Change ptid argument's type from unsigned
1403 long to ptid_t. Adjust. Implement W;process and X;process.
1404 (free_sym_cache, clear_symbol_cache): New.
1405 (look_up_one_symbol): Adjust to per-process symbol cache. *
1406 * server.c (cont_thread, general_thread, step_thread): Change type
1409 (multi_process): New.
1410 (last_ptid): Change type to ptid_t.
1411 (struct vstop_notif) <ptid>: Change type to ptid_t.
1412 (queue_stop_reply, push_event): Change `ptid' argument's type to
1414 (discard_queued_stop_replies): Add `pid' argument.
1415 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1416 changes. Don't reference the `attached' global.
1417 (attach_inferior): Adjust to mywait interface changes.
1418 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1419 features. Handle and report "multiprocess+". Handle
1421 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1423 (handle_v_kill): New.
1424 (handle_v_stopped): Adjust to use target_pid_to_str.
1425 (handle_v_requests): Allow multiple attaches and runs when
1426 multiprocess extensions are in effect. Handle "vKill".
1427 (myresume): Adjust to use ptids.
1428 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1429 (handle_status): Adjust to discard_queued_stop_replies interface
1431 (first_thread_of, kill_inferior_callback)
1432 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1433 (main): Call initialize_inferiors. Adjust to use ptids, killing
1434 and detaching from all inferiors. Handle multiprocess packet
1436 * linux-low.h: Include gdb_proc_service.h.
1437 (struct process_info_private): New.
1438 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1439 <lwpid_of>: Use ptid_get_lwp.
1440 (get_lwp_thread): Adjust.
1441 (struct lwp_info): Add `dead' member.
1442 (find_lwp_pid): Declare.
1443 * linux-low.c (thread_db_active): Delete.
1444 (new_inferior): Adjust comment.
1445 (inferior_pid): Delete.
1446 (linux_add_process): New.
1447 (handle_extended_wait): Adjust.
1448 (add_lwp): Change unsigned long to ptid.
1449 (linux_create_inferior): Add process to processes table. Adjust
1450 to use ptids. Don't set new_inferior here.
1451 (linux_attach_lwp): Rename to ...
1452 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1453 it. Adjust to use ptids.
1454 (linux_attach_lwp): New.
1455 (linux_attach): Add process to processes table. Don't set
1457 (struct counter): New.
1458 (second_thread_of_pid_p, last_thread_of_process_p): New.
1459 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1461 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1462 processes. Remove process from process table.
1463 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1464 to multiple processes.
1465 (any_thread_of): New.
1466 (linux_detach): Add `pid' argument, and handle it. Remove process
1467 from processes table.
1468 (linux_join): Add `pid' argument. Handle it.
1469 (linux_thread_alive): Change unsighed long argument to ptid_t.
1470 Consider dead lwps as not being alive.
1471 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1472 threads we're not interested in.
1473 (same_lwp, find_lwp_pid): New.
1474 (linux_wait_for_lwp): Change `pid' argument's type from int to
1476 (linux_wait_for_event): Rename to ...
1477 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1478 from int to ptid_t. Adjust.
1479 (linux_wait_for_event): New.
1480 (linux_wait_1): Add `ptid' argument. Change return type to
1481 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1482 that exit from the process table.
1483 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1485 (mark_lwp_dead): New.
1486 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1487 stopping all threads, mark its main lwp as dead.
1488 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1490 (fetch_register, usr_store_inferior_registers)
1491 (regsets_fetch_inferior_registers)
1492 (regsets_store_inferior_registers, linux_read_memory)
1493 (linux_write_memory): Inline `inferior_pid'.
1494 (linux_look_up_symbols): Adjust to use per-process
1496 (linux_request_interrupt): Adjust to use ptids.
1497 (linux_read_auxv): Inline `inferior_pid'.
1498 (initialize_low): Don't reference thread_db_active.
1499 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1500 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1501 (ps_getpid): Return the pid of the current inferior.
1502 * thread-db.c (proc_handle, thread_agent): Delete.
1503 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1505 (find_one_thread): Change argument type to ptid_t. Adjust to
1507 (maybe_attach_thread): Adjust to per-process data and ptids.
1508 (thread_db_find_new_threads): Ditto.
1509 (thread_db_init): Ditto.
1510 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1511 processes table. Adjust to use ptids.
1512 (spu_kill, spu_detach): Adjust interface. Remove process from
1514 (spu_join, spu_thread_alive): Adjust interface.
1515 (spu_wait): Adjust interface. Remove process from processes
1516 table. Adjust to use ptids.
1517 * win32-low.c (current_inferior_tid): Delete.
1518 (current_inferior_ptid): New.
1519 (debug_event_ptid): New.
1520 (thread_rec): Take a ptid. Adjust.
1521 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1522 (child_delete_thread): Ditto.
1523 (do_initial_child_stuff): Add `attached' argument. Add process to
1525 (child_fetch_inferior_registers, child_store_inferior_registers):
1527 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1528 (win32_attach): Pass 1 to do_initial_child_stuff.
1529 (win32_kill): Adjust interface. Remove process from processes
1531 (win32_detach): Ditto.
1532 (win32_join): Adjust interface.
1533 (win32_thread_alive): Take a ptid.
1534 (win32_resume): Adjust to use ptids.
1535 (get_child_debug_event): Ditto.
1536 (win32_wait): Adjust interface. Remove exiting process from
1539 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1541 Non-stop mode support.
1543 * server.h (non_stop): Declare.
1544 (gdb_client_data, handler_func): Declare.
1545 (delete_file_handler, add_file_handler, start_event_loop):
1547 (handle_serial_event, handle_target_event, push_event)
1548 (putpkt_notif): Declare.
1549 * target.h (enum resume_kind): New.
1550 (struct thread_resume): Replace `step' field by `kind' field.
1551 (TARGET_WNOHANG): Define.
1552 (struct target_ops) <wait>: Add `options' argument.
1553 <supports_non_stop, async, start_non_stop>: New fields.
1554 (target_supports_non_stop, target_async): New.
1555 (start_non_stop): Declare.
1556 (mywait): Add `options' argument.
1557 * target.c (mywait): Add `options' argument. Print child exit
1559 (start_non_stop): New.
1560 * server.c (non_stop, own_buf, mem_buf): New globals.
1561 (struct vstop_notif): New.
1562 (notif_queue): New global.
1563 (queue_stop_reply, push_event, discard_queued_stop_replies)
1564 (send_next_stop_reply): New.
1565 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1567 (attach_inferior): In non-stop mode, don't wait for the target
1569 (handle_general_set): Handle QNonStop.
1570 (handle_query): When handling qC, return the current general
1571 thread, instead of the first thread of the list.
1572 (handle_query): If the backend supports non-stop mode, include
1573 QNonStop+ in the qSupported query response.
1574 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1576 (handle_v_attach, handle_v_run): Handle non-stop mode.
1577 (handle_v_stopped): New.
1578 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1579 (myresume): Adjust to use resume_kind. Handle non-stop.
1580 (queue_stop_reply_callback): New.
1581 (handle_status): Handle non-stop mode.
1582 (main): Clear non_stop flag on reconnection. Use the event-loop.
1583 Refactor serial protocol handling from here ...
1584 (process_serial_event): ... to this new function. When GDB
1585 selects any thread, select one here. In non-stop mode, wait until
1586 GDB acks all pending events before exiting.
1587 (handle_serial_event, handle_target_event): New.
1588 * remote-utils.c (remote_open): Install remote_desc in the event
1590 (remote_close): Remove remote_desc from the event loop.
1591 (putpkt_binary): Rename to...
1592 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1593 (putpkt_binary): New as wrapper around putpkt_binary_1.
1594 (putpkt_notif): New.
1595 (prepare_resume_reply): In non-stop mode, don't change the
1597 * event-loop.c: New.
1598 * Makefile.in (OBJ): Add event-loop.o.
1599 (event-loop.o): New rule.
1601 * linux-low.h (pid_of): Moved here.
1603 (get_lwp_thread): Use lwpid_of.
1604 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1605 * linux-low.c (pid_of): Delete.
1606 (inferior_pid): Use lwpid_of.
1607 (linux_event_pipe): New.
1608 (target_is_async_p): New.
1610 (handle_extended_wait): Use lwpid_of.
1611 (add_lwp): Don't set lwpid field.
1612 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1613 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1614 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1615 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1616 first. Adjust to linux_wait_for_event interface changes. Use
1618 (linux_detach): Don't delete the main lwp here.
1619 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1620 (status_pending_p): Don't consider explicitly suspended lwps.
1621 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1622 pointer. Add OPTIONS argument. Change return type to int. Use
1623 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1624 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1625 pointer. Add status pointer argument. Return a pid instead of a
1626 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1627 changes. In non-stop mode, don't switch to a random thread.
1628 (linux_wait): Rename to...
1629 (linux_wait_1): ... this. Add target_options argument, and handle
1630 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1631 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1632 clean exit and signal exit code. Don't stop all threads in
1633 non-stop mode. In all-stop mode, only stop all threads when
1634 reporting a stop to GDB. Handle explicit thread stop requests.
1635 (async_file_flush, async_file_mark): New.
1637 (send_sigstop): Use lwpid_of.
1638 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1639 interface changes. In non-stop mode, don't switch to a random
1641 (linux_resume_one_lwp): Use lwpid_of.
1642 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1643 (linux_resume_one_thread): ... this. Handle resume_stop. In
1644 non-stop mode, don't look for pending flag in all threads.
1645 (resume_status_pending_p): Don't consider explicitly suspended
1647 (my_waitpid): Reimplement. Emulate __WALL.
1648 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1650 (sigchld_handler, linux_supports_non_stop, linux_async)
1651 (linux_start_non_stop): New.
1652 (linux_target_ops): Register linux_supports_non_stop, linux_async
1653 and linux_start_non_stop.
1654 (initialize_low): Install SIGCHLD handler.
1655 * thread-db.c (thread_db_create_event, find_one_thread)
1656 (thread_db_get_tls_address): Use lwpid_of.
1657 * win32-low.c (win32_detach): Adjust to use resume_kind.
1658 (win32_wait): Add `options' argument.
1659 * spu-low.c (spu_resume): Adjust to use resume_kind.
1660 (spu_wait): Add `options' argument.
1662 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1664 Decouple target code from remote protocol.
1666 * target.h (enum target_waitkind): New.
1667 (struct target_waitstatus): New.
1668 (struct target_ops) <wait>: Return an unsigned long. Take a
1669 target_waitstatus pointer instead of a char pointer.
1671 * target.c (mywait): Change prototype to return an unsigned long.
1672 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1673 * server.h (thread_from_wait, old_thread_from_wait): Delete
1675 (prepare_resume_reply): Change prototype to take a
1677 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1678 (last_status, last_ptid): New.
1679 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1680 pid instead of a signal.
1681 (attach_inferior): Remove "status" and "signal" parameters.
1683 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1685 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1686 (handle_v_requests, myresume): Remove "status" and "signal"
1688 (handle_status): New.
1689 (main): Delete local `status'. Adjust.
1690 * remote-utils.c: Include target.h.
1691 (prepare_resume_reply): Change prototype to take a
1692 target_waitstatus. Adjust.
1694 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1696 * spu-low.c (spu_wait): Adjust.
1697 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1699 (win32_wait): Adjust.
1701 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1703 * target.h (struct thread_resume): Delete leave_stopped member.
1704 (struct target_ops): Add a `n' argument to the `resume' callback.
1705 * server.c (start_inferior): Adjust.
1706 (handle_v_cont, myresume): Adjust.
1707 * linux-low.c (check_removed_breakpoint): Adjust to resume
1708 interface change, and to removed leave_stopped field.
1709 (resume_ptr): Delete.
1710 (struct thread_resume_array): New.
1711 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1712 resume interface change.
1713 (linux_continue_one_thread, linux_queue_one_thread)
1714 (resume_status_pending_p): Check if the resume field is NULL
1715 instead of checking the leave_stopped member.
1716 (linux_resume): Adjust to the target resume interface change.
1717 * spu-low.c (spu_resume): Adjust to the target resume interface
1719 * win32-low.c (win32_detach, win32_resume): Ditto.
1721 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1723 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1725 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1727 (linux_continue_one_thread): Only preserve the stepping flag if
1728 there's a pending breakpoint.
1730 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1732 * server.c (main): After the inferior having exited, call
1733 remote_close before exiting gdbserver.
1735 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1737 Fix size of FPSCR in Power 7 processors.
1738 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1739 (PPC_FEATURE_HAS_DFP): New #define.
1740 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1743 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1745 * server.c (handle_query) Whitespace and formatting.
1747 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1749 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1750 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1751 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1752 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1753 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1754 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1755 Makefile.in, configure.ac: Fix whitespace throughout.
1756 * configure: Regenerate.
1758 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1760 * inferiors.c (find_inferior): Make it safe for the callback
1761 function to delete the currently iterated inferior.
1763 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1765 * Makefile.in (linuw_low_h): Move higher.
1766 (thread-db.o): Depend on $(linux_low_h).
1768 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1770 Rename "process" to "lwp" throughout.
1772 * linux-low.c (all_processes): Rename to...
1773 (all_lwps): ... this.
1774 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1775 (add_process): Rename to ...
1776 (add_lwp): ... this. Adjust.
1777 (linux_create_inferior): Adjust.
1778 (linux_attach_lwp): Adjust.
1779 (linux_attach): Adjust.
1780 (linux_kill_one_process): Rename to ...
1781 (linux_kill_one_lwp): ... this. Adjust.
1782 (linux_kill): Adjust.
1783 (linux_detach_one_process): Rename to ...
1784 (linux_detach_one_lwp): ... this. Adjust.
1785 (linux_detach): Adjust.
1786 (check_removed_breakpoint): Adjust.
1787 (status_pending_p): Adjust.
1788 (linux_wait_for_process): Rename to ...
1789 (linux_wait_for_lwp): ... this. Adjust.
1790 (linux_wait_for_event): Adjust.
1791 (send_sigstop): Adjust.
1792 (wait_for_sigstop): Adjust.
1793 (stop_all_processes): Rename to ...
1794 (stop_all_lwps): ... this.
1795 (linux_resume_one_process): Rename to ...
1796 (linux_resume_one_lwp): ... this. Adjust.
1797 (linux_set_resume_request, linux_continue_one_thread)
1798 (linux_queue_one_thread, resume_status_pending_p)
1799 (usr_store_inferior_registers, regsets_store_inferior_registers)
1800 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1802 * linux-low.h (get_process): Rename to ...
1803 (get_lwp): ... this. Adjust.
1804 (get_thread_process): Rename to ...
1805 (get_thread_lwp): ... this. Adjust.
1806 (get_process_thread): Rename to ...
1807 (get_lwp_thread): ... this. Adjust.
1808 (struct process_info): Rename to ...
1809 (struct lwp_info): ... this.
1810 (all_processes): Rename to ...
1811 (all_lwps): ... this.
1812 * proc-service.c (ps_lgetregs): Adjust.
1813 * thread-db.c (thread_db_create_event, find_one_thread)
1814 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1816 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1818 * server.c (handle_query): Handle "qAttached".
1820 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1822 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1823 GPLv3, update license URL.
1825 2009-03-01 Doug Evans <dje@google.com>
1827 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1828 (server_h): Add gdb_signals.h.
1829 (signals.o): Update.
1830 * server.h (target_signal_from_host,target_signal_to_host_p)
1831 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1833 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1835 * remote-utils.c (getpkt): Also generate remote-debug
1836 information if noack_mode is set.
1838 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1840 * server.c (handle_query): Report qXfer:siginfo:read and
1841 qXfer:siginfo:write as supported and handle them.
1842 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1843 * linux-low.c (linux_xfer_siginfo): New.
1844 (linux_target_ops): Set it.
1846 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1848 * server.c (gdbserver_usage): Mention --remote-debug.
1849 (main): Accept '--remote-debug' switch.
1851 2009-01-18 Doug Evans <dje@google.com>
1853 * regcache.c (new_register_cache): No need to check result of xcalloc.
1854 * server.c (handle_search_memory): Back out calls to xmalloc,
1855 result is checked and error is returned to user upon failure.
1856 (handle_query): Ditto. Add more checks for result of malloc.
1857 (handle_v_cont): Check result of malloc, report error back to
1859 (handle_v_run): Ditto. Call freeargv.
1860 * server.h (freeargv): Declare.
1861 * utils.c (freeargv): New fn.
1863 2009-01-15 Doug Evans <dje@google.com>
1865 * gdbreplay.c (perror_with_name): Make arg const char *.
1866 * server.h (target_signal_to_name): Make return type const char *.
1867 * thread-db.c (thread_db_err_str): Make return type const char *.
1868 * utils.c (perror_with_name): Make arg const char *.
1870 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1872 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1873 when handling a EXIT_PROCESS_DEBUG_EVENT.
1875 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1877 * gdbreplay.c (gdbreplay_version): Update copyright year.
1878 * server.c (gdbserver_version): Likewise.
1880 2009-01-05 Doug Evans <dje@google.com>
1882 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1883 (handle_extended_wait): Improve comment.
1885 2008-12-13 Doug Evans <dje@google.com>
1887 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1888 * server.h (ATTR_MALLOC): New macro.
1889 (xmalloc,xcalloc,xstrdup): Declare.
1890 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1891 * inferiors.c: Ditto.
1892 * linux-low.c: Ditto.
1893 * mem-break.c: Ditto.
1894 * regcache.c: Ditto.
1895 * remote-utils.c: Ditto.
1898 * win32-low.c: Ditto.
1900 2008-12-12 Doug Evans <dje@google.com>
1902 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1903 in debugging printf.
1905 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1907 2008-12-09 Doug Evans <dje@google.com>
1909 * linux-low.h (struct process_info): Delete member tid, unused.
1910 * thread-db.c (find_one_thread): Update.
1911 (maybe_attach_thread): Update.
1913 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1915 * target.h (struct target_ops): Add qxfer_osdata member.
1916 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1918 (linux_qxfer_osdata): New functions.
1919 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1921 * server.c (handle_query): Handle "qXfer:osdata:read:".
1922 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1923 (buffer_xml_printf): New functions.
1924 * server.h (struct buffer): New.
1925 (buffer_grow_str, buffer_grow_str0): New macros.
1926 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1927 (buffer_xml_printf): Declare.
1929 2008-11-24 Doug Evans <dje@google.com>
1931 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1933 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1935 * server.c (handle_v_run): Always use the supplied argument list.
1937 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1939 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1940 (xtensa_regmap_table): Add entry for scompare1.
1942 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1944 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1945 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1946 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1947 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1948 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1949 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1950 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1951 XML target descriptions.
1952 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1953 when inferior is running on an ISA 2.05 or later processor. Add
1954 special case to return offset for full 64-bit slot of FPSCR when
1957 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1959 * Makefile.in (SFILES, clean): Added sparc64 files.
1960 (reg-sparc64.o, reg-sparc64.c): New.
1961 * configure.srv (sparc*-*-linux*): New configuration.
1962 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1963 syscall arguments for SPARC.
1964 (regsets_store_inferior_registers): Likewise.
1965 * linux-sparc-low.c: New file.
1967 2008-10-21 Doug Evans <dje@google.com>
1969 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1970 (READLINE_DIR,READLINE_DEP): Delete.
1971 (INTERNAL_CFLAGS): Update.
1972 (LINTFLAGS): Update.
1974 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1976 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1977 whole argv from the last run, not just argv[0].
1979 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1981 * regcache.c (new_register_cache): Return NULL if the register
1982 cache size isn't known yet.
1983 (free_register_cache): Avoid dereferencing a NULL regcache.
1985 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1987 * configure.srv: Merge MIPS and MIPS64.
1989 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1991 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1993 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1995 * Makefile.in: Add required vsx dependencies.
1997 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1998 Declare init_registers_powerpc_vsx32l.
1999 Declare init_registers_powerpc_vsx64l.
2000 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
2001 (ppc_arch_setup): Check for VSX in hwcap.
2002 (ppc_fill_vsxregset): New function.
2003 (ppc_store_vsxregset): New function.
2004 Add new VSX entry in regset_info target_regsets.
2006 * configure.srv: Add new VSX dependencies.
2008 2008-08-12 Pedro Alves <pedro@codesourcery.com>
2010 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
2011 (remote_open): Set or clear transport_is_reliable.
2012 (putpkt_binary): Don't expect acks in noack mode.
2013 (getpkt): Don't send ack/nac in noack mode.
2014 * server.c (handle_general_set): Handle QStartNoAckMode.
2015 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2017 (main): Reset noack_mode on every connection.
2018 * server.h (noack_mode): Declare.
2020 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2022 * Makefile.in (GDBREPLAY_OBS): New variable.
2023 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2025 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2026 Daniel Jacobowitz <dan@codesourcery.com>
2028 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2029 (usr_store_inferior_registers): Likewise.
2030 (regsets_store_inferior_registers): Likewise.
2032 2008-07-31 Rolf Jansen <rj@surtec.com>
2033 Pedro Alves <pedro@codesourcery.com>
2035 * configure.ac: Check for memmem declaration.
2036 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2037 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2038 (disable_packet_qfThreadInfo): Unconditionally compile.
2039 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2040 * configure, config.in: Regenerate.
2042 2008-07-28 Doug Kwan <dougkwan@google.com>
2044 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2045 (linux_write_memory): Remove declaration of errno.
2047 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2049 * linux-low.c (handle_extended_wait): Do not use "status"
2050 variable uninitialized.
2052 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2054 * server.c (handle_v_attach): Inhibit reporting dll changes.
2056 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2058 * remote-utils.c (prepare_resume_reply): If requested, don't
2059 output "thread:TID" in the T stop reply.
2061 * server.c (disable_packet_vCont, disable_packet_Tthread)
2062 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2063 (handle_query): If requested, disable support for qC, qfThreadInfo
2065 (handle_v_requests): If requested, disable support for vCont.
2066 (gdbserver_show_disableable): New.
2067 (main): Handle --disable-packet and --disable-packet=LIST.
2069 * server.h (disable_packet_vCont, disable_packet_Tthread)
2070 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2072 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2074 * server.c (gdbserver_usage): Mention --version.
2076 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2078 * Makefile.in (gdbreplay.o): New rule.
2080 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2082 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2083 message, not gdbserver.
2085 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2086 Nathan Sidwell <nathan@codesourcery.com>
2087 Joseph Myers <joseph@codesourcery.com>
2089 * acinclude.m4: Include ../../config/acx.m4.
2090 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2091 * configure, config.in: Regenerate.
2092 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2093 * server.c (gdbserver_version): Print PKGVERSION.
2094 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2095 (main): Adjust gdbserver_usage calls.
2096 * gdbreplay.c (version, host_name): Add declarations.
2097 (gdbreplay_version, gdbreplay_usage): New.
2098 (main): Accept --version and --help options.
2100 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2102 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2103 (arm_breakpoint_at): Handle Thumb.
2104 (the_low_target): Add comment.
2106 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2108 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2110 2008-05-09 Doug Evans <dje@google.com>
2112 * server.h (decode_search_memory_packet): Declare.
2113 * remote-utils.c (decode_search_memory_packet): New fn.
2114 * server.c (handle_search_memory_1): New fn.
2115 (handle_search_memory): New fn.
2116 (handle_query): Process qSearch:memory packets.
2118 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2120 * regcache.c (registers_length): Remove.
2121 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2122 full register packet.
2123 * regcache.h (registers_length): Remove prototype.
2124 * server.h (PBUFSIZ): Define to 16384.
2126 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2128 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2129 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2130 powerpc-64l.o, and powerpc-altivec64l.o.
2131 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2132 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2133 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2134 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2135 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2138 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2139 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2140 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2141 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2142 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2143 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2144 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2145 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2146 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2147 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2150 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2151 (init_registers_powerpc_32l): ... this new prototype.
2152 (init_registers_powerpc_32): Remove, replace by ...
2153 (init_registers_powerpc_altivec32l): ... this new prototype.
2154 (init_registers_powerpc_e500): Remove, replace by ...
2155 (init_registers_powerpc_e500l): ... this new prototype.
2156 (init_registers_ppc64): Remove, replace by ...
2157 (init_registers_powerpc_64l): ... this new prototype.
2158 (init_registers_powerpc_64): Remove, replace by ...
2159 (init_registers_powerpc_altivec64l): ... this new prototype.
2160 (ppc_num_regs): Set to 73.
2161 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2162 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2163 (ppc_cannot_store_register): Handle orig_r3 and trap.
2164 (ppc_arch_setup): Update init_registers_... calls.
2165 (ppc_fill_gregset): Handle orig_r3 and trap.
2167 * inferiors.c (clear_inferiors): Reset current_inferior.
2169 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2171 * acinclude.m4: Add override.m4.
2172 * configure: Regenerate.
2174 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2176 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2177 initial call to init_register_ppc64.
2179 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2181 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2182 powerpc*-*-linux* case.
2183 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2185 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2187 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2188 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2190 * linux-ppc-low.c: Include <elf.h>.
2191 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2192 (ppc_hwcap): New global variable.
2193 (ppc_regmap): Remove __SPE__ #ifdef sections.
2194 (ppc_regmap_e500): New global variable.
2195 (ppc_cannot_store_register): Update __SPE__ special case.
2196 (ppc_get_hwcap): New function.
2197 (ppc_arch_setup): Use it to determine whether inferior supports
2198 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2199 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2200 Do not access registers if target does not support AltiVec.
2201 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2202 Do not access registers if target does not support SPE.
2203 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2205 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2207 * linux-low.c (disabled_regsets, num_regsets): New.
2208 (use_regsets_p): Delete.
2209 (linux_wait_for_process): Clear disabled_regsets.
2210 (regsets_fetch_inferior_registers): Check and set it.
2211 (regsets_store_inferior_registers): Likewise.
2212 (linux_fetch_registers, linux_store_registers): Do not use
2214 (initialize_low): Allocate disabled_regsets.
2216 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2218 * Makefile.in (LIBOBJS): New.
2220 (memmem.o): New rule.
2221 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2222 * configure: Regenerated.
2224 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2226 * server.c (handle_query): Never return "unsupported" for
2227 qXfer:features:read queries.
2229 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2231 * server.c (get_features_xml): Fix inverted condition.
2232 (handle_query): Always support qXfer:feature:read.
2234 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2236 * server.c (wrapper_argv): New.
2237 (start_inferior): Handle wrapper_argv. If set, expect an extra
2239 (gdbserver_usage): Document --wrapper.
2240 (main): Parse --wrapper.
2242 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2244 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2245 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2246 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2247 (ppc_set_pc): Likewise.
2248 (ppc_arch_setup): New function.
2249 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2250 of collect_register.
2251 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2253 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2255 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2256 instead of linux-ppc64-low.o.
2257 * linux-ppc64-low.c: Remove file.
2258 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2259 (linux-ppc64-low.o): Remove rule.
2261 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2262 (init_registers_powerpc_64): Likewise.
2263 (ppc_regmap): Conditionally define depending on __powerpc64__.
2264 (ppc_cannot_store_register): Do not special-case "fpscr" when
2265 compiled on __powerpc64__.
2266 (ppc_collect_ptrace_register): New function.
2267 (ppc_supply_ptrace_register): New function.
2268 (ppc_breakpoint): Change type to "unsigned int".
2269 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2270 (the_low_target): Conditionally provide initializers for the
2271 arch_setup member depending on __powerpc64__. Install
2272 collect_ptrace_register and supply_ptrace_register members.
2274 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2276 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2277 * server.c (gdbserver_xmltarget): Define.
2278 (get_features_xml): Use it to replace "target.xml" and arch_string.
2280 * configure.srv: Remove srv_xmltarget. Add XML files that were
2281 mentioned there to srv_xmlfiles instead. Remove conditional tests
2282 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2283 srv_xmlfiles and srv_regobj to include all possible choices.
2284 * configure.ac (srv_xmltarget): Remove.
2285 (srv_xmlfiles): Do not add "target.xml".
2286 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2287 checks for supplementary target information.
2288 * configure: Regenerate.
2289 * Makefile.in (XML_TARGET): Remove.
2290 (target.xml): Remove rule.
2291 (clean): Do not clean up target.xml.
2292 (.PRECIOUS): Do not mention target.xml.
2294 * target.h (struct target_ops): Remove arch_string member.
2295 * linux-low.c (linux_arch_string): Remove.
2296 (linux_target_ops): Remove arch_string initializer.
2297 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2298 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2299 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2300 * spu-low.c (spu_arch_string): Remove.
2301 (spu_target_ops): Remove arch_string initializer.
2302 * win32-low.c (win32_arch_string): Remove.
2303 (win32_target_ops): Remove arch_string initializer.
2304 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2305 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2306 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2308 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2310 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2311 by collect_ptrace_register and supply_ptrace_register hooks.
2312 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2313 instead of checking for the_low_target.left_pad_xfer.
2314 (usr_store_inferior_registers): Use collect_ptrace_register callback
2315 instead of checking for the_low_target.left_pad_xfer.
2317 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2318 (s390_supply_ptrace_register): Likewise.
2319 (s390_fill_gregset): Call s390_collect_ptrace_register.
2320 (the_low_target): Update.
2322 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2323 (ppc_supply_ptrace_register): Likewise.
2324 (the_low_target): Update.
2326 * linux-i386-low.c (the_low_target): Update.
2327 * linux-x86-64-low.c (the_low_target): Update.
2329 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2331 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2332 reg-s390.o and reg-s390x.o.
2334 * linux-low.c (new_inferior): New global variable.
2335 (linux_create_inferior, linux_attach): Set it.
2336 (linux_wait_for_process): Call the_low_target.arch_setup after the
2337 target has stopped for the first time.
2338 (initialize_low): Do not call the_low_target.arch_setup.
2340 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2341 (s390_set_pc): Likewise.
2342 (s390_arch_setup): New function.
2343 (the_low_target): Use s390_arch_setup as arch_setup routine.
2345 * regcache.c (realloc_register_cache): New function.
2346 (set_register_cache): Call it for each existing regcache.
2348 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2350 * server.h (init_registers): Remove prototype.
2352 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2353 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2354 instead of init_registers ().
2355 * linux-arm-low.c (init_registers_arm): Add prototype.
2356 (init_registers_arm_with_iwmmxt): Likewise.
2357 (the_low_target): Add initializer for arch_setup field.
2358 * linux-cris-low.c (init_registers_cris): Add prototype.
2359 (the_low_target): Add initializer for arch_setup field.
2360 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2361 (the_low_target): Add initializer for arch_setup field.
2362 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2363 (the_low_target): Add initializer for arch_setup field.
2364 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2365 (the_low_target): Add initializer for arch_setup field.
2366 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2367 (the_low_target): Add initializer for arch_setup field.
2368 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2369 (the_low_target): Add initializer for arch_setup field.
2370 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2371 (init_registers_mips64_linux): Likewise.
2372 (the_low_target): Add initializer for arch_setup field.
2373 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2374 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2375 (the_low_target): Add initializer for arch_setup field.
2376 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2377 (init_registers_powerpc_64): Likewise.
2378 (the_low_target): Add initializer for arch_setup field.
2379 * linux-s390-low.c (init_registers_s390): Add prototype.
2380 (init_registers_s390x): Likewise.
2381 (the_low_target): Add initializer for arch_setup field.
2382 * linux-sh-low.c (init_registers_sh): Add prototype.
2383 (the_low_target): Add initializer for arch_setup field.
2384 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2385 (the_low_target): Add initializer for arch_setup field.
2386 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2387 (the_low_target): Add initializer for arch_setup field.
2389 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2390 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2391 instead of init_registers ().
2392 * win32-arm-low.c (init_registers_arm): Add prototype.
2393 (the_low_target): Add initializer for arch_setup field.
2394 * win32-i386-low.c (init_registers_i386): Add prototype.
2395 (the_low_target): Add initializer for arch_setup field.
2397 * spu-low.c (init_registers_spu): Add prototype.
2398 (initialize_low): Call initialie_registers_spu () instead of
2399 initialize_registers ().
2401 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2403 * server.c (handle_v_requests): When handling the vRun and vAttach
2404 packets, if already debugging a process, don't kill it. Return an
2407 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2409 * server.c (handle_query): Correct length check.
2411 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2413 * win32-low.c (do_initial_child_stuff): Add process handle
2414 parameter. Set current_process_handle and current_process_id from the
2415 parameters. Clear globals.
2416 (win32_create_inferior): Don't set current_process_handle and
2417 current_process_id here. Instead pass them on the call to
2418 do_initial_child_stuff.
2419 (win32_attach): Likewise.
2420 (win32_clear_inferiors): New.
2421 (win32_kill): Don't close the current process handle or the
2422 current thread handle here. Instead call win32_clear_inferiors.
2423 (win32_detach): Don't open a new handle to the process. Call
2424 win32_clear_inferiors.
2425 (win32_join): Don't rely on current_process_handle; open a new
2426 handle using the process id.
2427 (win32_wait): Call win32_clear_inferiors when the inferior process
2430 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2432 * server.c (monitor_show_help): Add "exit".
2434 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2436 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2437 (clean): Add reg-xtensa.c.
2438 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2439 * configure.srv (xtensa*-*-linux*) New target.
2440 * linux-xtensa-low.c: New.
2441 * xtensa-xtregs.c: New.
2443 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2445 * hostio.c: Don't include errno.h.
2446 (errno_to_fileio_errno): Move to hostio-errno.
2447 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2448 error number outputting to the target->hostio_last_error callback.
2449 (hostio_packet_error): Use FILEIO_EINVAL directly.
2450 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2451 calls to hostio_error.
2452 * hostio-errno.c: New.
2453 * server.h (hostio_last_error_from_errno): Declare.
2454 * target.h (target_ops): Add hostio_last_error member.
2455 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2456 as hostio_last_error handler.
2457 * spu-low.c (spu_target_ops): Likewise.
2458 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2459 (wince_hostio_last_error): New functions.
2460 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2461 as hostio_last_error handler.
2462 (win32_target_ops) [!_WIN32_WCE]: Register
2463 hostio_last_error_from_errno as hostio_last_error handler.
2464 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2465 (hostio-errno.o): New rule.
2466 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2467 * configure.srv (srv_hostio_err_objs): New variable. Default to
2469 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2470 * configure: Regenerate.
2472 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2474 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2475 (linux_kill, linux_detach): Clean up the process list.
2476 * remote-utils.c (remote_open): Improve port number parsing.
2477 (putpkt_binary, input_interrupt): Only send interrupts if the target
2479 * server.c (extended_protocol): Make static.
2480 (attached): Define earlier.
2481 (exit_requested, response_needed, program_argv): New variables.
2482 (target_running): New.
2483 (start_inferior): Clear attached here.
2484 (attach_inferior): Set attached here.
2485 (require_running): Define.
2486 (handle_query): Use require_running and target_running. Implement
2488 (handle_v_attach, handle_v_run): New.
2489 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2490 (gdbserver_usage): Update.
2491 (main): Redo argument parsing. Handle --debug and --multi. Handle
2492 --attach along with other options or after the port. Save
2493 program_argv. Support no initial program. Resynchronize
2494 communication with GDB after an error. Handle "monitor exit".
2495 Use require_running and target_running. Always allow the extended
2496 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2497 restart in extended mode.
2498 * README: Refer to the GDB manual. Update --attach usage.
2500 2007-12-20 Andreas Schwab <schwab@suse.de>
2502 * linux-low.c (STACK_SIZE): Define.
2503 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2504 (linux_test_for_tracefork): Likewise.
2506 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2508 * linux-low.c (linux_wait_for_event): Update messages. Do not
2509 reinsert auto-delete breakpoints.
2510 * mem-break.c (struct breakpoint): Change return type of handler to
2512 (set_breakpoint_at): Update handler type.
2513 (reinsert_breakpoint_handler): Return 1 instead of calling
2515 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2517 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2518 * mem-break.h (set_breakpoint_at): Update handler type.
2519 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2520 * win32-low.c (auto_delete_breakpoint): New.
2521 (get_child_debug_event): Use it.
2523 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2525 * configure.ac: Check for pread and pwrite.
2526 * hostio.c (handle_pread): Fall back to lseek and read.
2527 (handle_pwrite): Fall back to lseek and write.
2528 * config.in, configure: Regenerated.
2530 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2532 * server.c (myresume): Add own_buf argument.
2533 (main): Update calls.
2535 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2537 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2538 * remote-utils.c (remote_open): Do not call disable_async_io.
2539 (block_async_io): Delete.
2540 (unblock_async_io): Make static.
2541 (initialize_async_io): New.
2542 * server.c (handle_v_cont): Handle async I/O here.
2543 (myresume): Likewise. Move other common resume tasks here...
2544 (main): ... from here. Call initialize_async_io. Disable async
2545 I/O before the main loop.
2546 * server.h (initialize_async_io): Declare.
2547 (block_async_io, unblock_async_io): Delete prototypes.
2548 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2550 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2552 * remote-utils.c (readchar): Allow binary data in received messages.
2554 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2556 * win32-low.c (attaching): New global.
2557 (win32_create_inferior): Clear the `attaching' global.
2558 (win32_attach): Set the `attaching' global.
2559 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2560 attaching. Only set a breakpoint at the entry point if not
2563 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2565 * server.c (main): Don't report dll events on the initial
2566 connection on attaches.
2568 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2570 * server.c (main): Relax numerical bases supported for the pid of
2571 the --attach command line argument.
2573 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2575 * win32-low.c (win32_attach): Call OpenProcess before
2576 DebugActiveProcess, not after. Add last error output to error
2579 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2581 * win32-low.c (win32_get_thread_context)
2582 (win32_set_thread_context): New functions.
2583 (thread_rec): Use win32_get_thread_context.
2584 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2585 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2588 2007-12-03 Leo Zayas
2589 Pedro Alves <pedro_alves@portugalmail.pt>
2591 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2593 (child_add_thread): Minor cleanup.
2594 (child_continue): Resume artificially suspended threads before
2595 calling ContinueDebugEvent.
2596 (suspend_one_thread): New.
2597 (fake_breakpoint_event): New.
2598 (get_child_debug_event): Change return type to int. Check here if
2599 gdb sent an interrupt request. If a soft interrupt was requested,
2600 fake a breakpoint event. Return 0 if there is no event to handle,
2602 (win32_wait): Don't check here if gdb sent an interrupt request.
2603 Ensure there is a valid event to handle.
2604 (win32_request_interrupt): Add soft interruption method as last
2607 2007-12-03 Leo Zayas
2608 Pedro Alves <pedro_alves@portugalmail.pt>
2610 * win32-low.h (win32_thread_info): Add descriptions to the
2611 structure members. Replace `suspend_count' counter by a
2613 * win32-low.c (thread_rec): Update condition of when to get the
2614 context from the inferior. Rely on ContextFlags being set if it
2615 has already been retrieved. Only suspend the inferior thread if
2616 we haven't already. Warn if that fails.
2617 (continue_one_thread): s/suspend_count/suspended/. Only call
2618 ResumeThread once. Warn if that fails.
2620 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2622 * win32-low.c (win32_wait): Don't read from the inferior when it
2625 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2627 * Makefile.in (win32_low_h): New variable.
2628 (win32-low.o): Add dependency on $(win32_low_h).
2629 (win32-arm-low.o, win32-i386-low.o): New rules.
2631 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2633 * hostio.c: Correct copyright year.
2635 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2637 * Makefile.in (OBS): Add hostio.o.
2638 (hostio.o): New rule.
2639 * server.h (handle_vFile): Declare.
2640 * hostio.c: New file.
2641 * server.c (handle_v_requests): Take packet_len and new_packet_len
2642 for binary packets. Call handle_vFile.
2643 (main): Update call to handle_v_requests.
2645 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2647 * linux-low.c: Include <sched.h>.
2649 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2651 * linux-low.c (linux_tracefork_grandchild): New.
2652 (linux_tracefork_child): Use clone.
2653 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2655 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2657 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2659 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2661 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2663 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2665 * inferiors.c (change_inferior_id): Delete.
2666 (add_pid_to_list, pull_pid_from_list): New.
2667 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2668 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2669 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2670 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2671 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2672 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2673 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2674 (using_threads): Always set to 1.
2675 (handle_extended_wait): New.
2676 (add_process): Do not set TID.
2677 (linux_create_inferior): Set must_set_ptrace_flags.
2678 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2679 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2680 (linux_thread_alive): Rename TID argument to LWPID.
2681 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2682 (linux_wait_for_event): Do not use TID or check using_threads. Update
2683 call to dead_thread_notify. Call handle_extended_wait.
2684 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2685 (send_sigstop): Delete sigstop_sent.
2686 (wait_for_sigstop): Avoid TID.
2687 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2688 (linux_test_for_tracefork): New.
2689 (linux_lookup_signals): Use thread_db_active and
2690 linux_supports_tracefork_flag.
2691 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2692 * linux-low.h (get_process_thread): Avoid TID.
2693 (struct process_ifo): Move thread_known and tid to the end. Remove
2695 (linux_attach_lwp, thread_db_init): Update prototypes.
2696 * server.h (change_inferior_id): Delete prototype.
2697 (add_pid_to_list, pull_pid_from_list): New prototypes.
2698 * thread-db.c (thread_db_use_events): New.
2699 (find_first_thread): Rename to...
2700 (find_one_thread): ...this. Update callers and messages. Do not
2701 call fatal. Check thread_db_use_events. Do not call
2702 change_inferior_id or new_thread_notify.
2703 (maybe_attach_thread): Update. Do not call new_thread_notify.
2704 (thread_db_init): Set thread_db_use_events. Check use_events.
2705 * utils.c (fatal, warning): Correct message prefix.
2707 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2709 * Makefile.in (clean): Remove new files.
2710 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2711 (powerpc-64.o, powerpc-64.c): New rules.
2712 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2713 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2715 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2717 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2718 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2719 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2720 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2721 (target_regsets): Add AltiVec and SPE register sets.
2722 * configure.ac: Check for AltiVec and SPE.
2723 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2724 (ppc_fill_vrregset, ppc_store_vrregset): New.
2725 (target_regsets): Add AltiVec register set.
2726 * configure: Regenerated.
2728 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2730 * linux-low.c (O_LARGEFILE): Define.
2731 (linux_read_memory): Use /proc/PID/mem.
2732 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2733 * configure, config.in: Regenerated.
2735 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2737 * linux-low.c (linux_wait_for_event): Do not pass signals while
2740 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2742 * win32-low.c (create_process): New.
2743 (win32_create_inferior): Use create_process instead of
2744 CreateProcess. If create_process failed retry appending an ".exe"
2745 suffix. Store the GetLastError result immediatelly after
2746 create_process calls and use it on the call to error.
2748 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2750 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2752 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2754 * configure.ac: Switch license to GPLv3.
2756 2007-08-01 Michael Snyder <msnyder@access-company.com>
2758 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2760 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2762 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2764 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2765 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2766 CloseToolhelp32Snapshot.
2767 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2768 CloseToolhelp32Snapshot.
2770 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2772 * server.c (main): Check for inferior exit before main loop.
2774 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2776 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2777 instead of on tmp_desc.
2779 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2780 Daniel Jacobowitz <dan@codesourcery.com>
2782 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2783 (add_thread): Minor cleanups.
2784 (clear_inferiors): Move lower in the file. Clear the DLL
2786 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2787 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2788 (xml_escape_text): New.
2789 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2791 (handle_v_cont): Report errors.
2792 (gdbserver_version): Update.
2793 (main): Correct size of own_buf. Do not report initial DLL events.
2794 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2795 (unloaded_dll, xml_escape_text): New.
2796 * win32-low.c (enum target_waitkind): Update comments.
2797 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2798 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2799 (win32_EnumProcessModules, win32_GetModuleInformation)
2800 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2801 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2802 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2803 (win32_Module32First, win32_Module32Next, load_toolhelp)
2804 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2805 (get_child_debug_event): Handle DLL events.
2806 (win32_wait): Likewise.
2808 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2810 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2811 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2813 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2815 * win32-low.c (handle_output_debug_string): Ignore event if not
2818 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2820 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2822 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2824 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2826 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2828 * inferiors.c (change_inferior_id): Add comment.
2829 * linux-low.c (check_removed_breakpoint): Add an early
2830 prototype. Improve debug output.
2831 (linux_attach): Doc update.
2832 (linux_detach_one_process, linux_detach): Clean up before releasing
2834 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2835 * linux-low.h (struct process_info): Doc improvement.
2836 * mem-break.c (delete_all_breakpoints): New.
2837 * mem-break.h (delete_all_breakpoints): New prototype.
2838 * thread-db.c (find_first_thread): New.
2839 (thread_db_create_event): Call it instead of
2840 thread_db_find_new_threads. Clean up unused variables.
2841 (maybe_attach_thread): Remove first thread handling.
2842 (thread_db_find_new_threads): Use find_first_thread.
2843 (thread_db_get_tls_address): Likewise.
2845 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2847 * thread-db.c (thread_db_find_new_threads): Add prototype.
2848 (thread_db_create_event): Check for the main thread before adding
2850 (maybe_attach_thread): Only enable event reporting if TID == 0.
2851 (thread_db_get_tls_address): Check for new threads.
2853 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2855 * linux-low.c (linux_create_inferior): Try execv before execvp.
2856 * spu-low.c (spu_create_inferior): Likewise.
2858 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2860 * linux-low.c (linux_create_inferior): Change execv to execvp.
2861 * spu-low.c (spu_create_inferior): Likewies.
2863 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2865 * Makefile.in (clean): Clean new files instead of deleted ones.
2866 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2867 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2869 * configure.srv: Specify XML files and new regformats for MIPS and
2871 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2872 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2873 an entry for the restart register.
2874 (mips_cannot_fetch_register, mips_cannot_store_register)
2875 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2876 register names to match the XML descriptions.
2877 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2878 restart register instead of $0.
2880 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2881 Markus Deuling <deuling@de.ibm.com>
2883 * remote-utils.c (decode_xfer_write): New function.
2884 * server.h (decode_xfer_write): Add prototype.
2885 * server.c (handle_query): Add PACKET_LEN argument. Support
2886 qXfer:spu:read and qXfer:spu:write packets.
2887 (main): Pass packet_len to handle_query.
2888 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2889 * target.h (target_ops): Add qxfer_spu.
2891 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2893 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2894 accessing non-seekable spufs files.
2896 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2898 * server.c (handle_query): Add reply for qC packet.
2900 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2901 Leo Zayas <lerele@champenstudios@com>
2903 * server.h (check_remote_input_interrupt_request): New function.
2904 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2905 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2906 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2907 (check_remote_input_interrupt_request): New function.
2908 * server.h (check_remote_input_interrupt_request): Declare.
2909 * win32-low.c (winapi_DebugBreakProcess,
2910 winapi_GenerateConsoleCtrlEvent): New typedefs.
2911 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2913 (win32_wait): Check for remote interrupt request
2914 with check_remote_input_interrupt_request.
2915 (win32_request_interrupt): New function.
2916 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2918 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2920 * win32-low.c (debug_registers_changed,
2921 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2922 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2923 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2924 (thread_rec): Get context using the low target.
2925 (child_add_thread): Call thread_added on the low target,
2926 which does the same thing.
2928 (do_initial_child_stuff): Remove debug registers references.
2929 Set context using the low target. Resume threads after
2930 setting the contexts.
2931 (child_continue): Remove dead variable. Remove debug
2932 registers references.
2933 (child_fetch_inferior_registers): Go through the low target.
2934 (do_child_store_inferior_registers): Remove.
2935 (child_store_inferior_registers): Go through the low target.
2936 (win32_resume): Remove debug registers references.
2937 Set context using the low target.
2938 (handle_exception): Change return type to void. Don't record
2939 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2940 first chance exception.
2941 (get_child_debug_event): Change return type to void. Remove
2942 goto loop. Always return after waiting for debug event.
2943 (win32_wait): Convert to switch statement. Handle spurious
2946 * win32-i386-low.c (debug_registers_changed,
2947 debug_registers_used): New.
2948 (initial_stuff): Rename to ...
2949 (i386_initial_stuff): ... this. Clear debug registers
2951 (store_debug_registers): Delete.
2952 (i386_get_thread_context): New.
2953 (load_debug_registers): Delete.
2954 (i386_set_thread_context): New.
2955 (i386_thread_added): New.
2956 (single_step): Rename to ...
2957 (i386_single_step): ... this.
2958 (do_fetch_inferior_registers): Rename to ...
2959 (i386_fetch_inferior_register): ... this.
2960 (i386_store_inferior_register): New.
2961 (the_low_target): Adapt to new interface.
2963 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2964 (arm_get_thread_context): New.
2965 (arm_set_thread_context): New.
2967 (do_fetch_inferior_registers): Rename to ...
2968 (arm_fetch_inferior_register): ... this.
2969 (arm_store_inferior_register): New.
2970 (arm_wince_breakpoint): Reimplement as unsigned long.
2971 (arm_wince_breakpoint_len): Define.
2972 (the_low_target): Adapt to new interface.
2974 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2975 load_debug_registers. Add get_thread_context, set_thread_context,
2976 thread_added and store_inferior_register. Rename
2977 fetch_inferior_registers to fetch_inferior_register.
2978 (regptr): Remove declaration.
2980 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2982 * linux-low.c (linux_detach): Change return type to int. Return 0.
2983 * spu-low.c (spu_detach): Likewise.
2985 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2987 * target.h (target_ops): Change return type of detach to int.
2989 (join_inferior): New.
2990 * server.c (main): Don't skip detach support on mingw32.
2991 If the inferior doesn't support detaching return error.
2992 Call join_inferior instead of using waitpid.
2993 * linux-low.c (linux_join): New.
2994 (linux_target_op): Add linux_join.
2995 * spu-low.c (spu_join): New.
2996 (spu_target_ops): Add spu_join.
2997 * win32-low.c (win32_detach): Adapt to new interface.
2998 Reopen current_process_handle before detaching. Issue a child
2999 resume before detaching.
3001 (win32_target_op): Add win32_join.
3003 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3005 * win32-low.c (win32-attach): Fix return value.
3006 * target.h (target_ops): Describe ATTACH return values.
3008 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3010 * win32-low.c (GETPROCADDRESS): Define.
3011 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
3012 (winapi_DebugSetProcessKillOnExit): Likewise.
3013 (win32_create_inferior): Force usage of ansi CreateProcessA.
3014 (win32_attach): Use GETPROCADDRESS.
3015 (win32_detach): Likewise.
3017 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3019 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3021 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3023 * win32-low.c: Commit leftover changes from 2007-03-29.
3025 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3027 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3028 fields short instead of int. Add explicit padding.
3029 (i387_cache_to_fsave): Remove unnecessary casts.
3030 (i387_fsave_to_cache): Doc fix.
3031 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3033 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3035 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3036 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3038 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3040 * configure.srv (arm*-*-mingw32ce*): Move near the other
3043 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3045 * configure.ac: Add errno checking.
3046 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3047 sys/file.h and malloc.h.
3048 (AC_CHECK_DECLS): Add perror.
3049 (srv_mingwce): Handle.
3050 * configure.srv (i[34567]86-*-cygwin*): Add
3051 win32-i386-low.o to srv_tgtobj.
3052 (i[34567]86-*-mingw*): Likewise.
3053 (arm*-*-mingw32ce*): Add case.
3054 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3055 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3056 [__MINGW32CE__] (strerror): New function.
3057 [__MINGW32CE__] (errno): Define to GetLastError.
3058 [__MINGW32CE__] (COUNTOF): New macro.
3059 (remote_open): Remove extra close call.
3060 * mem-break.c (delete_breakpoint_at): New function.
3061 * mem-break.h (delete_breakpoint_at): Declare.
3062 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3063 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3064 [USE_WIN32API] (read, write): Add char* casts.
3065 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3066 * server.h: Include wincecompat.h on Windows CE.
3067 [HAVE_ERRNO_H]: Check.
3068 (perror): Declare if not declared.
3069 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3070 (perror_with_name): Remove errno declaration.
3071 * wincecompat.h: New.
3072 * wincecompat.c: New.
3074 * win32-arm-low.c: New.
3075 * win32-i386-low.c: New.
3076 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3077 (OUTMSG2): Make it safe.
3079 (COUNTOF): New macro.
3080 (NUM_REGS): Get it from the low target.
3081 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3082 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3083 (thread_rec): Let low target handle debug registers.
3084 (child_add_thread): Likewise.
3085 (child_init_thread_list): Likewise.
3086 (continue_one_thread): Likewise.
3088 (do_child_fetch_inferior_registers): Move to ...
3089 * win32-i386-low.c: ... here, and rename to ...
3090 (do_fetch_inferior_registers): ... this.
3091 * win32-low.c (child_fetch_inferior_registers):
3092 Go through the low target.
3093 (do_child_store_inferior_registers): Use regptr.
3094 (strwinerror): New function.
3095 (win32_create_inferior): Handle Windows CE.
3096 Use strwinerror instead of strerror on Windows error
3097 codes. Add program to the error output.
3098 Don't close the main thread handle on Windows CE.
3099 (win32_attach): Use coredll.dll on Windows CE.
3100 (win32_kill): Close current process and current
3102 (win32_detach): Use coredll.dll on Windows CE.
3103 (win32_resume): Let low target handle debug registers, and
3105 (handle_exception): Add/Remove initial breakpoint. Avoid
3106 non-existant WSTOPSIG on Windows CE.
3107 (win32_read_inferior_memory): Cast to remove warning.
3108 (win32_arch_string): Go through the low target.
3109 (initialize_low): Call set_breakpoint_data with the low
3110 target's breakpoint.
3111 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3112 FOP_REGNUM, mappings): Move to ...
3113 * win32-i386-low.c: ... here.
3114 * win32-low.c (win32_thread_info): Move to ...
3115 * win32-low.h: ... here.
3116 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3117 win32-arm-low.c and wincecompat.c.
3118 (all:): Add $EXEEXT.
3119 (install-only:): Likewise.
3120 (gdbserver:): Likewise.
3121 (gdbreplay:): Likewise.
3122 * config.in: Regenerate.
3123 * configure: Regenerate.
3125 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3127 * win32-low.c: Rename typedef thread_info to
3128 win32_thread_info throughout.
3130 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3132 * win32-i386-low.c: Rename to ...
3133 * win32-low.c: ... this.
3134 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3135 * Makefile.in: Likewise.
3137 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3139 * remote-utils.c (monitor_output): Constify msg parameter.
3140 * server.h (monitor_output): Likewise.
3141 * win32-i386-low.c (handle_output_debug_string): New.
3142 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3143 handle_output_debug_string.
3144 (get_child_debug_event): Likewise.
3146 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3148 * server.c (main): Correct strtoul check.
3150 2007-03-27 Jon Ringle <jon@ringle.org>
3152 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3154 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3156 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3158 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3160 * terminal.h: Check HAVE_SGTTY_H.
3162 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3164 * remote-utils.c (remote_open): Print out the assigned port number.
3166 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3168 * remote-utils.c (monitor_output): New function.
3169 * server.c (debug_threads): Define here.
3170 (monitor_show_help): New function.
3171 (handle_query): Handle qRcmd.
3172 (main): Do not handle 'd' packet.
3173 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3174 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3177 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3179 * Makefile.in (EXEEXT): New.
3180 (clean): Use $(EXEEXT).
3182 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3184 * target.h (target_ops): Rename send_signal to request_interrupt,
3185 and remove enum target_signal parameter.
3186 * linux-low.c (linux_request_interrupt): Rename from
3187 linux_send_signal, and always send SIGINT.
3188 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3189 and always send SIGINT.
3190 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3192 (input_interrupt): Likewise.
3194 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3196 * server.c (get_features_xml): Check if target implemented
3198 * win32-i386-low.c (win32_arch_string): New.
3199 (win32_target_ops): Add win32_arch_string as arch_string member.
3201 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3203 * spu-low.c (spu_arch_string): New.
3204 (spu_target_ops): Add spu_arch_string.
3206 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3208 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3209 * configure.ac: Do not check for terminal.h.
3210 * configure, config.in: Regenerated.
3212 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3214 * Makefile.in (OBS): Add $(XML_BUILTIN).
3215 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3217 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3218 (arm-with-iwmmxt.c): New.
3219 * config.in, configure: Regenerate.
3220 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3221 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3222 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3223 (arm*-*-linux*): Add iWMMXt and regset support.
3224 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3225 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3226 (arm_store_wmmxregset, target_regsets): New.
3227 * server.c (get_features_xml): Take annex argument. Check builtin
3229 (handle_query): Handle multiple annexes.
3231 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3233 * remote-utils.c [USE_WIN32API] (read, write): Define.
3234 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3237 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3239 * linux-i386-low.c (the_low_target): Set arch_string.
3240 * linux-x86-64-low.c (the_low_target): Likewise.
3241 * linux-low.c (linux_arch_string): New.
3242 (linux_target_ops): Add it.
3243 * linux-low.h (struct linux_target_ops): Add arch_string.
3244 * server.c (write_qxfer_response): Use const void * for DATA.
3245 (get_features_xml): New.
3246 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3247 * target.h (struct target_ops): Add arch_string method.
3249 2007-01-03 Denis Pilat <denis.pilat@st.com>
3250 Daniel Jacobowitz <dan@codesourcery.com>
3252 * linux-low.c (linux_kill): Handle being called with no threads.
3253 * win32-i386-low.c (win32_kill): Likewise.
3254 (get_child_debug_event): Clear current_process_handle.
3256 2006-12-30 Denis PILAT <denis.pilat@st.com>
3257 Daniel Jacobowitz <dan@codesourcery.com>
3259 * remote-utils.c (remote_open): Check the type of specified
3260 serial port devices before opening them.
3261 * server.c (main): Kill the inferior if an error occurs during
3262 the first remote_open.
3264 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3266 * README: Update supported targets.
3268 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3270 * Makefile.in (clean): Remove reg-mips64.c.
3271 (reg-mips64.c, reg-mips64.o): New rules.
3272 * configure.srv: Handle mips64. Include regset support for mips.
3273 * linux-mips-low.c (union mips_register): New.
3274 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3275 (mips_breakpoint, mips_breakpoint_at): Use int.
3276 (mips_collect_register, mips_supply_register)
3277 (mips_collect_register_32bit, mips_supply_register_32bit)
3278 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3279 (mips_store_fpregset, target_regsets): New.
3280 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3282 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3284 * configure.srv: Add target "spu*-*-*".
3285 * Makefile.in (clean): Remove reg-spu.c.
3286 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3287 * spu-low.c: New file.
3289 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3291 * configure.ac: Correct td_thr_tls_get_addr test.
3292 * configure: Regenerated.
3294 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3296 * linux-low.c (linux_wait_for_event): Reformat. Use the
3298 * remote-utils.c (decode_address_to_semicolon): New.
3299 * server.c (pass_signals, handle_general_set): New.
3300 (handle_query): Mention QPassSignals for qSupported.
3301 (main): Call handle_general_set.
3302 * server.h (pass_signals, decode_address_to_semicolon): New.
3304 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3306 * server.c (handle_query): Correct error handling for read_auxv.
3308 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3310 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3311 and srv_linux_thread_db to yes.
3312 * linux-s390-low.c (s390_fill_gregset): New function.
3313 (target_regsets): Define data structure.
3315 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3317 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3318 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3319 * config.in, configure: Regenerated.
3320 * inferiors.c (gdb_id_to_thread): New function.
3321 (gdb_id_to_thread_id): Use it.
3322 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3323 * linux-low.h (struct process_info): Add th member.
3324 (thread_db_get_tls_address): New prototype.
3325 * remote-utils.c (decode_address): Make non-static.
3326 * server.c (handle_query): Handle qGetTLSAddr.
3327 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3328 * target.h (struct target_ops): Add get_tls_address.
3329 * thread-db.c (maybe_attach_thread): Save the thread handle.
3330 (thread_db_get_tls_address): New.
3332 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3334 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3335 (linux_resume_one_process): Take a siginfo_t *. Update all
3336 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3337 (struct pending_signals): Add a siginfo_t.
3338 (linux_wait_for_process): Always set last_status.
3339 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3340 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3341 * linux-low.h (struct process_info): Add last_status.
3343 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3345 * remote-utils.c (try_rle): New function.
3346 (putpkt_binary): Use it.
3348 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3350 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3351 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3352 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3353 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3354 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3357 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3359 * server.c (terminal_fd): New variable.
3360 (old_foreground_pgrp): Likewise.
3361 (restore_old_foreground_pgrp): New function.
3362 (start_inferior): Record the terminal file descriptor in terminal_fd
3363 and its original foreground group in old_foreground_pgrp. Register
3364 restore_old_foreground_pgrp with atexit().
3366 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3368 * server.c (handle_query): Correct qPart to qXfer.
3370 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3372 * configure.ac: Check for more headers which are missing on
3373 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3374 * configure.srv: Add Cygwin and mingw32.
3375 * remote-utils.c: Don't include headers unconditionally which
3376 are missing on mingw32. Include <winsock.h> for mingw32.
3377 (remote_open): Adjust for mingw32 support. Flush
3378 standard error after writing to it.
3379 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3380 (unblock_async_io, enable_async_io, disable_async_io)
3381 (readchar, getpkt): Update for Winsock support.
3382 (prepare_resume_reply): Expect a protocol signal number.
3383 * server.c: Disable <sys/wait.h> on mingw32.
3384 (start_inferior): Adjust for mingw32 support. Flush
3385 standard error after writing to it.
3386 (attach_inferior): Likewise. Use protocol signal
3388 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3390 * win32-i386-low.c: New file.
3391 * Makefile.in (XM_CLIBS): Set.
3392 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3393 (win32-i386-low.o): New dependency rule.
3394 * linux-low.c (linux_wait): Use target signal numbers.
3395 * target.h (struct target_ops): Doc fix.
3396 * server.h (target_signal_to_name): New prototype.
3397 * gdbreplay.c: Don't include headers unconditionally which
3398 are missing on mingw32. Include <winsock.h> for mingw32.
3399 (remote_close, remote_open): Adjust for Winsock support.
3400 * configure, config.in: Regenerated.
3402 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3404 * server.c (decode_xfer_read, write_qxfer_response): New.
3405 (handle_query): Take a packet length argument. Handle
3406 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3407 the qSupported response.
3408 (main): Update call to handle_query.
3410 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3412 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3413 (putpkt_binary): Renamed from putpkt and adjusted for binary
3415 (putpkt): New wrapper for putpkt_binary.
3416 (readchar): Don't mask off the high bit.
3417 (decode_X_packet): New function.
3418 * server.c (main): Call putpkt_binary if a handler sets the packet
3419 length. Save the length of the incoming packet. Handle 'X'.
3420 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3422 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3424 * server.c (handle_query): Handle qSupported.
3426 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3428 * remote-utils.c (all_symbols_looked_up): New variable.
3429 (look_up_one_symbol): Check it.
3430 * server.h (look_up_one_symbol): New declaration.
3431 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3433 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3435 * Makefile.in (linux-arm-low.o): Update dependencies.
3436 * linux-arm-low.c: Include "gdb_proc_service.h".
3437 (PTRACE_GET_THREAD_AREA): Define.
3438 (ps_get_thread_area): New function.
3440 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3442 * configure.srv (m68k*-*-uclinux*): New target.
3443 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3444 (linux_resume_one_process): Remove extraneous cast.
3445 (linux_read_offsets): New.
3446 (linux_target_op): Add linux_read_offsets on mmuless systems.
3447 * server.c (handle_query): Add qOffsets logic.
3448 * target.h (struct target_ops): Add read_offsets.
3450 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3452 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3453 (PTRACE_GET_THREAD_AREA): Define.
3454 (ps_get_thread_area): New function.
3455 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3456 (linux-x86-64-low.o): Update.
3458 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3460 * configure.ac: Remove checks for prfpregset_t.
3461 * gdb_proc_service.h: New file.
3462 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3463 new "gdb_proc_service.h".
3464 * proc-service.c: Likewise.
3465 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3466 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3467 * Makefile.in (gdb_proc_service_h): Updated.
3468 * configure, config.in: Regenerated.
3470 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3472 * remote-utils.c (prepare_resume_reply): Move declaration
3473 of gdb_id_from_wait to the top of the block.
3475 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3477 * linux-low.c (regsets_store_inferior_registers): Read the regset
3478 from the target before filling it.
3480 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3482 * server.c (attach_inferior): Return SIGTRAP for a successful
3485 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3487 * Makefile.in (OBS): Add version.o.
3488 (STAGESTUFF): Delete.
3489 (version.o): Add dependencies.
3490 (version.c): Replace rule.
3491 (clean): Remove version.c.
3492 * server.c (gdbserver_version): New.
3493 (gdbserver_usage): Use printf.
3494 (main): Handle --version and --help.
3495 * server.h (version, host_name): Add declarations.
3497 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3509 * linux-x86-64-low.c:
3512 * linux-ppc64-low.c:
3521 * linux-crisv32-low.c:
3533 * gdbserver.1: Add (C) after Copyright. Update the FSF
3536 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3538 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3539 (arm_breakpoint_at): Recognize both breakpoints.
3540 (the_low_target): Use the correct breakpoint instruction.
3542 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3544 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3545 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3546 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3547 (the_low_target): Update.
3549 2005-10-25 Andreas Schwab <schwab@suse.de>
3551 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3553 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3554 (ia64_num_regs): Reduce to 462.
3556 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3558 * acinclude.m4: Correct quoting.
3559 * aclocal.m4: Regenerated.
3561 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3562 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3563 (thread_db_init): Call thread_db_err_str.
3564 * configure.ac: Check for TD_VERSION.
3565 * config.in, configure: Regenerated.
3567 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3569 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3571 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3573 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3574 is not available. Define HAVE_PTRACE_GETREGS if it is.
3575 * config.in, configure: Regenerated.
3576 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3577 * linux-i386-low.c, linux-m68k-low.c: Update to use
3578 HAVE_PTRACE_GETREGS.
3579 * linux-low.c (regsets_fetch_inferior_registers)
3580 (regsets_store_inferior_registers): Only return 0 if we processed
3582 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3583 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3585 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3587 * inferiors.c (struct thread_info): Add gdb_id.
3588 (add_thread): Add gdb_id argument.
3589 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3590 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3591 calls to add_thread.
3592 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3593 * server.c (handle_query): Use thread_to_gdb_id.
3594 (handle_v_cont, main): Use gdb_id_to_thread_id.
3595 * server.h (add_thread): Update prototype.
3596 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3599 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3601 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3602 left-padded registers.
3603 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3604 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3606 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3608 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3609 * configure: Regenerate.
3610 * config.in: Regenerate.
3611 * server.h (NEED_DECLARATION_STRERROR):
3612 Replace with !HAVE_DECL_STRERROR.
3614 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3616 * linux-low.c (linux_wait, linux_send_signal): Don't test
3617 an unsigned long variable for > 0 if it could be MAX_ULONG.
3618 * server.c (myresume): Likewise.
3619 * target.c (set_desired_inferior): Likewise.
3621 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3623 * configure.ac: Simplify and improve check for socklen_t.
3624 * configure, config.in: Regenerate.
3626 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3628 * acconfig.h: Remove.
3629 * configure.ac: Add a test for socklen_t. Use three-argument
3630 AC_DEFINE throughout.
3631 * config.in: Regenerated using autoheader 2.59.
3632 * configure: Regenerated.
3634 * gdbreplay.c (socklen_t): Provide a default.
3635 (remote_open): Use socklen_t.
3636 * remote-utils.c (socklen_t): Provide a default.
3637 (remote_open): Use socklen_t.
3638 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3641 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3643 * linux-low.c (linux_read_memory, linux_write_memory)
3644 (linux_read_auxv): Likewise.
3645 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3646 (check_mem_write): Likewise.
3647 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3649 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3650 (registers_from_string, register_data): Likewise.
3651 * server.c (handle_query, main): Likewise.
3652 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3653 (decode_M_packet): Likewise.
3654 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3655 * target.h (struct target_ops): Update read_memory, write_memory,
3657 (read_inferior_memory, write_inferior_memory): Update.
3658 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3660 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3661 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3662 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3663 linux-s390-low.c, linux-sh-low.c: Update for changes in
3664 read_inferior_memory and the_low_target->breakpoint.
3666 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3668 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3669 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3670 * configure.srv: Add powerpc64-*-linux*.
3671 * linux-ppc64-low.c: New file.
3673 2005-05-23 Orjan Friberg <orjanf@axis.com>
3675 * linux-cris-low.c: New file with support for CRIS.
3676 * linux-crisv32-low.c: Ditto for CRISv32.
3677 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3678 (clean): Add reg-cris.c and reg-crisv32.c.
3679 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3680 reg-crisv32.o, and reg-crisv32.c to make rules.
3681 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3684 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3686 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3687 of sizeof (PTRACE_XFER_TYPE).
3688 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3690 2005-05-12 Orjan Friberg <orjanf@axis.com>
3692 * target.h (struct target_ops): Add insert_watchpoint,
3693 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3694 pointers for hardware watchpoint support.
3695 * linux-low.h (struct linux_target_ops): Ditto.
3696 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3697 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3698 to linux_target_ops.
3699 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3701 * server.c (main): Recognize 'Z' and 'z' packets.
3703 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3705 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3706 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3707 (the_low_target): Add new members.
3709 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3711 * proc-service.c (ps_lgetregs): Search all_processes instead of
3714 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3716 * server.c (start_inferior): Change return type to int.
3717 (attach_inferior): Change sigptr to int *.
3718 (handle_v_cont, handle_v_requests): Change signal to int *.
3719 (main): Change signal to int.
3721 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3723 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3724 * configure.srv: Add m32r*-*-linux*.
3725 * linux-m32r-low.c: New file.
3727 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3729 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3731 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3733 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3734 Take unsigned long arguments for PIDs.
3735 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3736 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3737 (wait_for_sigstop, linux_resume_one_process)
3738 (regsets_fetch_inferior_registers, linux_send_signal)
3739 (linux_read_auxv): Likewise. Update the types of variables holding
3740 PIDs. Update format string specifiers.
3741 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3742 * remote-utils.c (prepare_resume_reply): Likewise.
3743 * server.c (cont_thread, general_thread, step_thread)
3744 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3746 (handle_query): Update format specifiers.
3747 (handle_v_cont, main): Use strtoul for thread IDs.
3748 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3749 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3750 (general_thread, step_thread, thread_from_wait)
3751 (old_thread_from_wait): Update.
3752 * target.h (struct thread_resume): Use unsigned long for THREAD.
3753 (struct target_ops): Use unsigned long for arguments to attach and
3756 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3758 * acinclude.m4: Include bfd/bfd.m4 directly.
3759 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3760 <agriffis@toolchain.org>.
3761 * aclocal.m4, configure: Regenerated.
3763 2005-01-07 Andrew Cagney <cagney@gnu.org>
3765 * configure.ac: Rename configure.in, require autoconf 2.59.
3766 * configure: Re-generate.
3768 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3770 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3772 * aclocal.m4: Regenerated.
3773 * configure: Regenerated.
3775 2004-11-21 Andreas Schwab <schwab@suse.de>
3777 * linux-m68k-low.c (m68k_num_gregs): Define.
3778 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3779 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3780 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3781 (m68k_breakpoint_at): New. Add to the_low_target.
3783 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3784 srv_linux_thread_db to yes.
3786 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3788 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3789 (ARCH_SET_FS): Likewise.
3790 (ARCH_GET_FS): Likewise.
3791 (ARCH_GET_GS): Likewise.
3793 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3795 * linux-i386-low.c (ps_get_thread_area): New.
3796 * linux-x86-64-low.c (ps_get_thread_area): New.
3797 * linux-low.c: Include <sys/syscall.h>.
3798 (linux_kill_one_process): Don't kill the first thread here.
3799 (linux_kill): Kill the first thread here.
3800 (kill_lwp): New function.
3801 (send_sigstop, linux_send_signal): Use it.
3802 * proc-service.c: Clean up #ifdefs.
3803 (fpregset_info): Delete.
3804 (ps_lgetregs): Update and enable implementation.
3805 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3807 * remote-utils.c (struct sym_cache, symbol_cache): New.
3808 (input_interrupt): Print a clearer message.
3809 (async_io_enabled): New variable.
3810 (enable_async_io, disable_async_io): Use it. Update comments.
3811 (look_up_one_symbol): Use the symbol cache.
3812 * thread-db.c (thread_db_look_up_symbols): New function.
3813 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3815 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3817 * configure.in: Test for -rdynamic.
3818 * configure: Regenerated.
3819 * Makefile (INTERNAL_LDFLAGS): New.
3820 (gdbserver, gdbreplay): Use it.
3822 2004-09-02 Andrew Cagney <cagney@gnu.org>
3824 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3826 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3828 * linux-low.c (linux_wait): Clear all_processes list also.
3830 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3832 * linux-low.c: Include <errno.h>. Remove extern declaration of
3835 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3837 * gdbreplay.c, server.h, utils.c: Update copyright years.
3839 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3841 * server.c (main): Print child status or termination signal from
3842 variable 'signal', not 'sig'.
3844 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3846 * linux-low.c (linux_read_memory): Change return type to
3847 int. Check for and return error from ptrace().
3848 * target.c (read_inferior_memory): Change return type to int. Pass
3849 back return status from the_target->read_memory().
3850 * target.h (struct target_ops): Adapt *read_memory() prototype.
3852 (read_inferior_memory): Adapt prototype.
3853 * server.c (main): Return an error packet if
3854 read_inferior_memory() returns an error.
3856 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3858 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3859 Unify with other clean targets.
3861 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3863 * server.c (handle_v_cont): Call set_desired_inferior.
3865 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3867 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3869 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3871 * linux-low.c (linux_wait): Unblock async I/O.
3872 (linux_resume): Block and enable async I/O.
3873 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3874 * server.h (block_async_io, unblock_async_io): Add prototypes.
3876 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3878 * remote-utils.c (remote_open): Print a status notice after
3880 * server.c (attach_inferior): Print a status notice after
3883 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3885 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3887 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3889 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3891 * server.c, target.h: Update copyright years.
3893 2004-02-25 Roland McGrath <roland@redhat.com>
3895 * target.h (struct target_ops): New member `read_auxv'.
3896 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3897 * linux-low.c (linux_read_auxv): New function.
3898 (linux_target_ops): Initialize `read_auxv' member to that.
3900 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3902 Committed by Jim Blandy <jimb@redhat.com>.
3904 * linux-s390-low.c (s390_num_regs): Update.
3905 (s390_regmap): Remove control registers. Use __s390x__ predefine
3906 instead of GPR_SIZE to distiguish s390 and s390x targets.
3908 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3910 * linux-low.c: Update copyright year.
3911 (check_removed_breakpoint): Clear pending_is_breakpoint.
3912 (linux_set_resume_request, linux_queue_one_thread)
3913 (resume_status_pending_p): New functions.
3914 (linux_continue_one_thread): Use process->resume.
3915 (linux_resume): Only resume threads if there are no pending events.
3916 * linux-low.h (struct process_info): Add resume request
3919 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3921 * regcache.c (new_register_cache): Clear the allocated register
3922 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3924 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3926 * linux-low.c (linux_resume): Take a struct thread_resume *
3928 (linux_wait): Update call.
3929 (resume_ptr): New static variable.
3930 (linux_continue_one_thread): Renamed from
3931 linux_continue_one_process. Use resume_ptr.
3932 (linux_resume): Use linux_continue_one_thread.
3933 * server.c (handle_v_cont, handle_v_requests): New functions.
3934 (myresume): New function.
3935 (main): Handle 'v' case.
3936 * target.h (struct thread_resume): New type.
3937 (struct target_ops): Change argument of "resume" to struct
3939 (myresume): Delete macro.
3941 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3943 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3944 (uninstall): Support DESTDIR.
3946 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3948 * configure.srv: Add xscale*linux copy of arm*linux entry.
3950 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3952 * linux-arm-low.c (arm_reinsert_addr): New function.
3953 (the_low_target): Add arm_reinsert_addr.
3955 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3957 * mem-break.c: Remove whitespace at end of file.
3959 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3961 * configure.in: Check whether we need to prototype strerror.
3962 * server.h: Optionally prototype strerror.
3963 * gdbreplay.c (perror_with_name): Use strerror.
3964 * linux-low.c (linux_attach_lwp): Use strerror.
3965 * utils.c (perror_with_name): Use strerror.
3966 * config.in, configure: Regenerated.
3968 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3970 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3971 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3973 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3975 * Makefile.in (SFILES): Update.
3976 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3977 low-sun3.c: Remove files.
3979 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3981 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3982 (linux_detach_one_process, linux_detach): New functions.
3983 (linux_target_ops): Add linux_detach.
3984 * server.c (main): Handle 'D' packet.
3985 * target.h (struct target_ops): Add "detach" member.
3986 (detach_inferior): Define.
3988 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3990 From Kelley Cook <kelleycook@wideopenwest.com>:
3991 * configure.srv: Accept i[34567]86 variants.
3993 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3995 * linux-low.c (linux_wait_for_event): Correct comment typos.
3996 (linux_resume_one_process): Call check_removed_breakpoint.
3997 (linux_send_signal): New function.
3998 (linux_target_ops): Add linux_send_signal.
3999 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
4001 * target.h (struct target_ops): Add send_signal.
4003 2003-05-29 Jim Blandy <jimb@redhat.com>
4005 * linux-low.c (usr_store_inferior_registers): Transfer buf in
4006 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
4007 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
4008 away part of the register's value.
4010 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
4012 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4013 (linux_wait_for_event, linux_init_signals): Likewise.
4015 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4017 * configure.in: Check for stdlib.h.
4018 * configure: Regenerated.
4019 * config.in: Regenerated.
4021 2003-01-04 Andreas Schwab <schwab@suse.de>
4023 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4025 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4027 * Makefile.in: Remove obsolete code.
4029 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4031 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4032 defined(PT_FPR0_HI).
4034 2002-11-17 Stuart Hughes <seh@zee2.com>
4036 * linux-arm-low.c (arm_num_regs): Increase.
4037 (arm_regmap): Include status register.
4039 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4041 * linux-low.c (register_addr): Remove incorrect -1 check.
4043 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4045 * linux-low.c (linux_create_inferior): Call setpgid. Return
4047 (unstopped_p, linux_signal_pid): Remove.
4048 (linux_target_ops): Remove linux_signal_pid.
4049 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4050 global instead of target method.
4051 * target.h (struct target_ops): Remove signal_pid. Update comment
4052 for create_inferior.
4053 * server.c (signal_pid): New variable.
4054 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4055 gdbserver. Set the child to be the foreground process group.
4056 (attach_inferior): Set signal_pid.
4058 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4060 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4062 2002-08-20 Jim Blandy <jimb@redhat.com>
4064 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4067 2002-08-01 Andrew Cagney <cagney@redhat.com>
4069 * Makefile.in: Make chill references obsolete.
4071 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4073 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4074 * configure: Regenerate.
4075 * config.in: Regenerate.
4077 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4079 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4080 (perror_with_name, remote_close, remote_open, expect, play): Static.
4082 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4084 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4085 byte offsets instead of an array of indexes.
4086 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4088 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4090 * regcache.c: Add comment.
4092 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4094 * thread-db.c: New file.
4095 * proc-service.c: New file.
4096 * acinclude.m4: New file.
4097 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4098 proc-service.o, and thread-db.o.
4099 (linux-low.o): Add USE_THREAD_DB.
4100 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4101 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4102 * aclocal.m4: Regenerated.
4103 * config.in: Regenerated.
4104 * configure: Regenerated.
4105 * configure.in: Check for proc_service.h, sys/procfs.h,
4106 thread_db.h, and linux/elf.h headrs.
4107 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4108 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4109 Check for -lthread_db and thread support.
4110 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4111 PowerPC, and SuperH.
4112 * i387-fp.c: Constify arguments.
4113 * i387-fp.h: Likewise.
4114 * inferiors.c: (struct thread_info): Renamed from
4115 `struct inferior_info'. Remove PID member. Use generic inferior
4116 list header. All uses updated.
4117 (inferiors, signal_pid): Removed.
4118 (all_threads): New variable.
4119 (get_thread): Define.
4120 (add_inferior_to_list): New function.
4121 (for_each_inferior): New function.
4122 (change_inferior_id): New function.
4123 (add_inferior): Removed.
4124 (remove_inferior): New function.
4125 (add_thread): New function.
4126 (free_one_thread): New function.
4127 (remove_thread): New function.
4128 (clear_inferiors): Use for_each_inferior and free_one_thread.
4129 (find_inferior): New function.
4130 (find_inferior_id): New function.
4131 (inferior_target_data): Update argument type.
4132 (set_inferior_target_data): Likewise.
4133 (inferior_regcache_data): Likewise.
4134 (set_inferior_regcache_data): Likewise.
4135 * linux-low.c (linux_bp_reinsert): Remove.
4136 (all_processes, stopping_threads, using_thrads)
4137 (struct pending_signals, debug_threads, pid_of): New.
4138 (inferior_pid): Replace with macro.
4139 (struct inferior_linux_data): Remove.
4140 (get_stop_pc, add_process): New functions.
4141 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4142 Use add_process and add_thread.
4143 (linux_attach_lwp): New function, based on old linux_attach. Use
4144 add_process and add_thread. Set stop_expected for new threads.
4145 (linux_attach): New function.
4146 (linux_kill_one_process): New function.
4147 (linux_kill): Kill all LWPs.
4148 (linux_thread_alive): Use find_inferior_id.
4149 (check_removed_breakpoints, status_pending_p): New functions.
4150 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4151 Update. Use WNOHANG. Wait for cloned processes also. Update process
4152 struct for the found process.
4153 (linux_wait_for_event): New function.
4154 (linux_wait): Use it. Support LWPs.
4155 (send_sigstop, wait_for_sigstop, stop_all_processes)
4156 (linux_resume_one_process, linux_continue_one_process): New functions.
4157 (linux_resume): Support LWPs.
4158 (REGISTER_RAW_SIZE): Remove.
4159 (fetch_register): Use register_size instead. Call supply_register.
4160 (usr_store_inferior_registers): Likewise. Call collect_register.
4162 (regsets_fetch_inferior_registers): Improve error message.
4163 (regsets_store_inferior_registers): Add debugging.
4164 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4165 (unstopped_p, linux_signal_pid): New functions.
4166 (linux_target_ops): Add linux_signal_pid.
4167 (linux_init_signals): New function.
4168 (initialize_low): Call it. Initialize using_threads.
4169 * regcache.c (inferior_regcache_data): Add valid
4171 (get_regcache): Fetch registers lazily. Add fetch argument
4172 and update all callers.
4173 (regcache_invalidate_one, regcache_invalidate): New
4175 (new_register_cache): Renamed from create_register_cache.
4176 Return the new regcache.
4177 (free_register_cache): Change argument to a void *.
4178 (registers_to_string, registers_from_string): Call get_regcache
4179 with fetch flag set.
4180 (register_data): Make static. Pass fetch flag to get_regcache.
4181 (supply_register): Call get_regcache with fetch flag clear.
4182 (collect_register): Call get_regcache with fetch flag set.
4183 (collect_register_as_string): New function.
4184 * regcache.h: Update.
4185 * remote-utils.c (putpkt): Flush after debug output and use
4187 Handle input interrupts while waiting for an ACK.
4188 (input_interrupt): Use signal_pid method.
4189 (getpkt): Flush after debug output and use stderr.
4190 (outreg): Use collect_register_as_string.
4191 (new_thread_notify, dead_thread_notify): New functions.
4192 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4194 (look_up_one_symbol): Flush after debug output.
4195 * server.c (step_thread, server_waiting): New variables.
4196 (start_inferior): Don't use signal_pid. Update call to mywait.
4197 (attach_inferior): Update call to mywait.
4198 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4199 (main): Don't fetch/store registers explicitly. Use
4200 set_desired_inferior. Support proposed ``Hs'' packet. Update
4203 (struct inferior_list, struct_inferior_list_entry): New.
4204 * target.c (set_desired_inferior): New.
4205 (write_inferior_memory): Constify.
4206 (mywait): New function.
4208 (struct target_ops): New signal_pid method.
4209 (mywait): Removed macro, added prototype.
4211 * linux-low.h (regset_func): Removed.
4212 (regset_fill_func, regset_store_func): New.
4213 (enum regset_type): New.
4214 (struct regset_info): Add type field. Use new operation types.
4215 (struct linux_target_ops): stop_pc renamed to get_pc.
4216 Add decr_pc_after_break and breakpoint_at.
4217 (get_process, get_thread_proess, get_process_thread)
4218 (strut process_info, all_processes, linux_attach_lwp)
4219 (thread_db_init): New.
4221 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4222 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4223 (the_low_target): Add new members.
4224 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4225 (i386_store_fpxregset): Constify.
4226 (target_regsets): Add new kind identifier.
4227 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4228 (i386_set_pc): Add debugging.
4229 (i386_breakpoint_at): New function.
4230 (the_low_target): Add new members.
4231 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4232 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4233 (mips_breakpoint_at): New.
4234 (the_low_target): Add new members.
4235 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4236 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4237 (the_low_target): Add new members.
4238 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4239 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4240 (the_low_target): Add new members.
4241 * linux-x86-64-low.c (target_regsets): Add new kind
4244 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4246 From Martin Pool <mbp@samba.org>:
4247 * server.c (gdbserver_usage): New function.
4250 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4252 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4255 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4257 * Makefile.in: Remove obsolete code.
4259 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4261 * linux-low.c (regsets_fetch_inferior_registers),
4262 (regsets_store_inferior_registers): Removed cast to int from
4264 * regcache.h: Added declaration of struct inferior_info.
4266 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4268 * inferiors.c (struct inferior_info): Add regcache_data.
4269 (add_inferior): Call create_register_cache.
4270 (clear_inferiors): Call free_register_cache.
4271 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4272 * regcache.c (struct inferior_regcache_data): New.
4273 (registers): Remove.
4274 (get_regcache): New function.
4275 (create_register_cache, free_register_cache): New functions.
4276 (set_register_cache): Don't initialize the register cache here.
4277 (registers_to_string, registers_from_string, register_data): Call
4279 * regcache.h: Add prototypes.
4280 * server.h: Likewise.
4282 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4284 * mem-break.c: New file.
4285 * mem-break.h: New file.
4286 * Makefile.in: Add mem-break.o rule; update server.h
4288 * inferiors.c (struct inferior_info): Add target_data
4290 (clear_inferiors): Free target_data member if set.
4291 (inferior_target_data, set_inferior_target_data): New functions.
4292 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4293 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4294 * linux-low.c (linux_bp_reinsert): New variable.
4295 (struct inferior_linux_data): New.
4296 (linux_create_inferior): Use set_inferior_target_data.
4297 (linux_attach): Likewise. Call add_inferior.
4298 (linux_wait_for_one_inferior): New function.
4299 (linux_wait): Call it.
4300 (linux_write_memory): Add const.
4301 (initialize_low): Call set_breakpoint_data.
4302 * linux-low.h (struct linux_target_ops): Add breakpoint
4304 * server.c (attach_inferior): Remove extra add_inferior
4306 * server.h: Include mem-break.h. Update inferior.c
4308 * target.c (read_inferior_memory)
4309 (write_inferior_memory): New functions.
4310 * target.h (read_inferior_memory)
4311 (write_inferior_memory): Change macros to prototypes.
4312 (struct target_ops): Update comments. Add const to write_memory
4315 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4317 * linux-low.c (usr_store_inferior_registers): Support
4318 registers which are allowed to fail to store.
4319 * linux-low.h (linux_target_ops): Likewise.
4320 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4321 (ppc_cannot_store_register): FPSCR may not be storable.
4323 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4325 * server.h: Include <string.h> if HAVE_STRING_H.
4326 * ChangeLog: Correct paths in last ChangeLog entry.
4328 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4330 * linux-low.h: Remove obsolete prototypes.
4331 (struct linux_target_ops): New.
4332 (extern the_low_target): New.
4333 * linux-low.c (num_regs, regmap): Remove declarations.
4334 (register_addr): Use the_low_target explicitly.
4335 (fetch_register): Likewise.
4336 (usr_fetch_inferior_registers): Likewise.
4337 (usr_store_inferior_registers): Likewise.
4338 * linux-arm-low.c (num_regs): Remove.
4339 (arm_num_regs): Define.
4340 (arm_regmap): Renamed from regmap, made static.
4341 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4343 (arm_cannot_store_register): Renamed from cannot_store_register,
4345 (the_low_target): New.
4346 * linux-i386-low.c (num_regs): Remove.
4347 (i386_num_regs): Define.
4348 (i386_regmap): Renamed from regmap, made static.
4349 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4351 (i386_cannot_store_register): Renamed from cannot_store_register,
4353 (the_low_target): New.
4354 * linux-ia64-low.c (num_regs): Remove.
4355 (ia64_num_regs): Define.
4356 (ia64_regmap): Renamed from regmap, made static.
4357 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4359 (ia64_cannot_store_register): Renamed from cannot_store_register,
4361 (the_low_target): New.
4362 * linux-m68k-low.c (num_regs): Remove.
4363 (m68k_num_regs): Define.
4364 (m68k_regmap): Renamed from regmap, made static.
4365 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4367 (m68k_cannot_store_register): Renamed from cannot_store_register,
4369 (the_low_target): New.
4370 * linux-mips-low.c (num_regs): Remove.
4371 (mips_num_regs): Define.
4372 (mips_regmap): Renamed from regmap, made static.
4373 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4375 (mips_cannot_store_register): Renamed from cannot_store_register,
4377 (the_low_target): New.
4378 * linux-ppc-low.c (num_regs): Remove.
4379 (ppc_num_regs): Define.
4380 (ppc_regmap): Renamed from regmap, made static.
4381 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4383 (ppc_cannot_store_register): Renamed from cannot_store_register,
4385 (the_low_target): New.
4386 * linux-s390-low.c (num_regs): Remove.
4387 (s390_num_regs): Define.
4388 (s390_regmap): Renamed from regmap, made static.
4389 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4391 (s390_cannot_store_register): Renamed from cannot_store_register,
4393 (the_low_target): New.
4394 * linux-sh-low.c (num_regs): Remove.
4395 (sh_num_regs): Define.
4396 (sh_regmap): Renamed from regmap, made static.
4397 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4399 (sh_cannot_store_register): Renamed from cannot_store_register,
4401 (the_low_target): New.
4402 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4403 (the_low_target): New.
4405 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4407 * Makefile.in: Add stamp-h target.
4408 * configure.in: Create stamp-h.
4409 * configure: Regenerated.
4411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4413 * inferiors.c: New file.
4414 * target.c: New file.
4415 * target.h: New file.
4416 * Makefile.in: Add target.o and inferiors.o. Update
4418 * linux-low.c (inferior_pid): New static variable,
4419 moved from server.c.
4420 (linux_create_inferior): Renamed from create_inferior.
4421 Call add_inferior. Return 0 on success instead of a PID.
4422 (linux_attach): Renamed from myattach.
4423 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4424 (linux_thread_alive): Renamed from mythread_alive.
4425 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4427 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4428 (regsets_store_inferior_registers): Correct error message.
4429 Add missing ``return 0''.
4430 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4431 (linux_store_registers): Renamed from store_inferior_registers.
4432 (linux_read_memory): Renamed from read_inferior_memory.
4433 (linux_write_memory): Renamed from write_inferior_memory.
4434 (linux_target_ops): New structure.
4435 (initialize_low): Call set_target_ops ().
4436 * remote-utils.c (unhexify): New function.
4437 (hexify): New function.
4438 (input_interrupt): Send signals to ``signal_pid''.
4439 * server.c (inferior_pid): Remove.
4440 (start_inferior): Update create_inferior call.
4441 (attach_inferior): Call add_inferior.
4442 (handle_query): New function.
4443 (main): Call handle_query for `q' packets.
4444 * server.h: Include "target.h". Remove obsolete prototypes.
4445 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4447 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4449 * Makefile.in: Add WARN_CFLAGS. Update configury
4451 * configure.in: Check for <string.h>
4452 * configure: Regenerate.
4453 * config.in: Regenerate.
4454 * gdbreplay.c: Include needed system headers.
4455 (remote_open): Remove strchr prototype.
4456 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4457 * regcache.c (supply_register): Change buf argument to const void *.
4458 (supply_register_by_name): Likewise.
4459 (collect_register): Change buf argument to void *.
4460 (collect_register_by_name): Likewise.
4461 * regcache.h: Add missing prototypes.
4462 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4463 * server.c (handle_query): New function.
4464 (attached): New static variable, moved out of main.
4465 (main): Quiet longjmp clobber warnings.
4466 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4467 * utils.c (error): Remove NORETURN.