1 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
3 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
4 variable warning on Linux/x86-64.
6 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8 GDBserver disconnected tracing support.
10 * linux-low.c (linux_remove_process): Delete.
11 (add_lwp): Don't set last_resume_kind here.
12 (linux_kill): Use `mourn'.
13 (linux_detach): Use `thread_db_detach', and `mourn'.
15 (linux_attach_lwp_1): Adjust comment.
16 (linux_attach): last_resume_kind moved the thread_info; adjust.
17 (status_pending_p_callback): Adjust.
18 (linux_wait_for_event_1): Adjust.
19 (count_events_callback, select_singlestep_lwp_callback)
20 (select_event_lwp_callback, cancel_breakpoints_callback)
21 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
22 (proceed_one_lwp): Adjust.
23 (linux_async): Add debug output.
24 (linux_thread_stopped): New.
25 (linux_pause_all): New.
26 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
28 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
29 (thread_db_free): Delete declaration.
30 (thread_db_detach, thread_db_mourn): Declare.
31 * thread-db.c (thread_db_init): Use thread_db_mourn.
32 (thread_db_free): Delete, split in two.
33 (disable_thread_event_reporting): New.
34 (thread_db_detach): New.
35 (thread_db_mourn): New.
37 * server.h (struct thread_info) <last_resume_kind>: New field.
38 <attached>: Add comment.
39 <gdb_detached>: New field.
40 (handler_func): Change return type to int.
41 (handle_serial_event, handle_target_event): Ditto.
42 (gdb_connected): Declare.
44 (disconnected_tracing): Declare.
45 (stop_tracing): Declare.
47 * server.c (handle_query) <qSupported>: Report support for
49 (queue_stop_reply_callback): Account for running threads.
50 (gdb_wants_thread_stopped): New.
51 (gdb_wants_all_threads_stopped): New.
52 (gdb_reattached_process): New.
53 (handle_status): Clear the `gdb_detached' flag of all processes.
54 In all-stop, stop all threads.
55 (main): Be sure to leave tfind mode. Handle disconnected tracing.
56 (process_serial_event): If the remote connection breaks, or if an
57 exit was forced with "monitor exit", force an event loop exit.
58 Handle disconnected tracing on detach.
59 (handle_serial_event): Adjust.
60 (handle_target_event): If GDB isn't connected, forward events back
61 to the inferior, unless the last process exited, in which case,
62 exit gdbserver. Adjust interface.
64 * remote-utils.c (remote_open): Don't block in accept. Instead
65 register an event loop source on the listen socket file
66 descriptor. Refactor bits into ...
67 (listen_desc): ... this new global.
68 (gdb_connected): ... this new function.
69 (enable_async_notification): ... this new function.
70 (handle_accept_event): ... this new function.
71 (remote_close): Clear remote_desc.
73 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
75 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
77 (mourn_inferior): Define.
78 (target_process_qsupported): Avoid the dangling else problem.
79 (thread_stopped): Define.
81 (target_waitstatus_to_string): Declare.
82 * target.c (target_waitstatus_to_string): New.
84 * tracepoint.c (tracing): Make extern.
85 (disconnected_tracing): New.
86 (stop_tracing): Make extern. Handle tracing stops due to GDB
88 (cmd_qtdisconnected): New.
89 (cmd_qtstatus): Report disconnected tracing status in trace reply.
90 (handle_tracepoint_general_set): Handle QTDisconnected.
92 * event-loop.c (event_handler_func): Change return type to int.
93 (process_event): Bail out if the event handler wants the event
95 (handle_file_event): Ditto.
96 (start_event_loop): Bail out if the event handler wants the event
99 * nto-low.c (nto_target_ops): Adjust.
100 * spu-low.c (spu_wait): Don't remove the process here.
101 (spu_target_ops): Adjust.
102 * win32-low.c (win32_wait): Don't remove the process here.
103 (win32_target_ops): Adjust.
105 2010-04-11 Pedro Alves <pedro@codesourcery.com>
107 * regcache.c (realloc_register_cache): Invalidate inferior's
108 regcache before recreating it.
110 2010-04-09 Pedro Alves <pedro@codesourcery.com>
112 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
114 2010-04-09 Stan Shebs <stan@codesourcery.com>
115 Pedro Alves <pedro@codesourcery.com>
117 * server.h (LONGEST): New.
118 (struct thread_info) <while_stepping>: New field.
119 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
121 (initialize_tracepoint, handle_tracepoint_general_set)
122 (handle_tracepoint_query, tracepoint_finished_step)
123 (tracepoint_was_hit, release_while_stepping_state_list):
124 (current_traceframe): Declare.
125 * server.c (handle_general_set): Handle tracepoint packets.
128 (handle_search_memory_1): Use read_memory.
129 (handle_query): Report support for conditional tracepoints, trace
130 state variables, and tracepoint sources. Handle tracepoint
132 (main): Initialize the tracepoints module.
133 (process_serial_event): Handle traceframe reads/writes.
135 * linux-low.c (handle_tracepoints): New.
136 (linux_wait_1): Call it.
137 (linux_resume_one_lwp): Handle while-stepping.
138 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
139 (linux_target_ops): Install them.
140 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
142 * linux-x86-low.c (x86_supports_tracepoints): New.
143 (the_low_target). Install it.
145 * mem-break.h (delete_breakpoint): Declare.
146 * mem-break.c (delete_breakpoint): Make external.
148 * target.h (struct target_ops): Add `supports_tracepoints',
149 `read_pc', and `write_pc' fields.
150 (target_supports_tracepoints): Define.
151 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
154 * regcache.h (struct regcache) <registers_owned>: New field.
155 (init_register_cache, regcache_cpy): Declare.
156 (regcache_read_pc, regcache_write_pc): Declare.
157 (register_cache_size): Declare.
158 (supply_regblock): Declare.
159 * regcache.c (init_register_cache): New.
160 (new_register_cache): Use it.
162 (register_cache_size): New.
163 (supply_regblock): New.
164 (regcache_read_pc, regcache_write_pc): New.
168 * Makefile.in (OBS): Add tracepoint.o.
169 (tracepoint.o): New rule.
171 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
173 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
175 (i386-mmx.c): Likewise.
176 (i386-mmx-linux.o): Likewise.
177 (i386-mmx-linux.c): Likewise.
179 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
180 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
181 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
182 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
184 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
185 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
186 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
188 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
190 * Makefile.in (clean): Updated.
192 (i386-avx.c): Likewise.
193 (i386-avx-linux.o): Likewise.
194 (i386-avx-linux.c): Likewise.
195 (amd64-avx.o): Likewise.
196 (amd64-avx.c): Likewise.
197 (amd64-avx-linux.o): Likewise.
198 (amd64-avx-linux.c): Likewise.
200 * configure.srv (srv_i386_regobj): Add i386-avx.o.
201 (srv_i386_linux_regobj): Add i386-avx-linux.o.
202 (srv_amd64_regobj): Add amd64-avx.o.
203 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
204 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
205 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
206 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
207 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
208 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
209 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
211 * i387-fp.c: Include "i386-xstate.h".
213 (i387_cache_to_xsave): Likewise.
214 (i387_xsave_to_cache): Likewise.
215 (x86_xcr0): Likewise.
217 * i387-fp.h (i387_cache_to_xsave): Likewise.
218 (i387_xsave_to_cache): Likewise.
219 (x86_xcr0): Likewise.
221 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
222 * linux-crisv32-low.c (target_regsets): Likewise.
223 * linux-m68k-low.c (target_regsets): Likewise.
224 * linux-mips-low.c (target_regsets): Likewise.
225 * linux-ppc-low.c (target_regsets): Likewise.
226 * linux-s390-low.c (target_regsets): Likewise.
227 * linux-sh-low.c (target_regsets): Likewise.
228 * linux-sparc-low.c (target_regsets): Likewise.
229 * linux-xtensa-low.c (target_regsets): Likewise.
231 * linux-low.c: Include <sys/uio.h>.
232 (regsets_fetch_inferior_registers): Support nt_type.
233 (regsets_store_inferior_registers): Likewise.
234 (linux_process_qsupported): New.
235 (linux_target_ops): Add linux_process_qsupported.
237 * linux-low.h (regset_info): Add nt_type.
238 (linux_target_ops): Add process_qsupported.
240 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
242 (init_registers_i386_avx_linux): New.
243 (init_registers_amd64_avx_linux): Likewise.
244 (xmltarget_i386_linux_no_xml): Likewise.
245 (xmltarget_amd64_linux_no_xml): Likewise.
246 (PTRACE_GETREGSET): Likewise.
247 (PTRACE_SETREGSET): Likewise.
248 (x86_fill_xstateregset): Likewise.
249 (x86_store_xstateregset): Likewise.
251 (x86_linux_update_xmltarget): Likewise.
252 (x86_linux_process_qsupported): Likewise.
253 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
254 (x86_arch_setup): Don't call init_registers_amd64_linux nor
255 init_registers_i386_linux here. Call
256 x86_linux_update_xmltarget.
257 (the_low_target): Add x86_linux_process_qsupported.
259 * server.c (handle_query): Call target_process_qsupported.
261 * target.h (target_ops): Add process_qsupported.
262 (target_process_qsupported): New.
264 2010-04-03 Pedro Alves <pedro@codesourcery.com>
266 * inferiors.c (add_thread): Set last_status kind to
267 TARGET_WAITKIND_IGNORE.
268 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
269 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
270 (linux_wait_1): Move `thread' local definition to block that uses
271 it. Don't NULL initialize `event_child'.
272 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
273 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
274 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
276 2010-04-01 Pedro Alves <pedro@codesourcery.com>
278 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
279 an extended waitstatus, or by a watchpoint.
280 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
281 thread was stepping or has been stopped by a watchpoint.
283 2010-04-01 Pedro Alves <pedro@codesourcery.com>
285 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
286 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
287 of another, then delete the previous, and validate all
289 (validate_inserted_breakpoint): New.
290 (delete_disabled_breakpoints): New.
291 (validate_breakpoints): New.
292 (check_mem_read): Validate breakpoints before trusting their
293 shadow. Delete disabled breakpoints.
294 (check_mem_write): Validate breakpoints before trusting they
295 should be inserted. Delete disabled breakpoints.
296 * mem-break.h (validate_breakpoints):
297 * server.c (handle_query): Validate breakpoints when we see a
300 2010-04-01 Pedro Alves <pedro@codesourcery.com>
302 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
303 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
304 if we could tell there's a GDB breakpoint at stop_pc.
305 (need_step_over_p): Don't do a step over if we find a GDB
306 breakpoint at the resume PC.
308 * mem-break.c (struct raw_breakpoint): New.
309 (enum bkpt_type): New type `gdb_breakpoint'.
310 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
311 fields. New field `raw'.
312 (find_raw_breakpoint_at): New.
313 (set_raw_breakpoint_at): Handle refcounting. Create a raw
315 (set_breakpoint_at): Adjust.
316 (delete_raw_breakpoint): New.
317 (release_breakpoint): New.
318 (delete_breakpoint): Rename to...
319 (delete_breakpoint_1): ... this. Add proc parameter. Use
320 release_breakpoint. Return ENOENT.
321 (delete_breakpoint): Reimplement.
322 (find_breakpoint_at): Delete.
323 (find_gdb_breakpoint_at): New.
324 (delete_breakpoint_at): Delete.
325 (set_gdb_breakpoint_at): New.
326 (delete_gdb_breakpoint_at): New.
327 (gdb_breakpoint_here): New.
328 (set_reinsert_breakpoint): Use release_breakpoint.
329 (uninsert_breakpoint): Rename to ...
330 (uninsert_raw_breakpoint): ... this.
331 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
332 (reinsert_raw_breakpoint): Change parameter type to
334 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
336 (check_breakpoints): Adjust. Use release_breakpoint.
337 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
338 (breakpoint_inserted_here): Ditto.
339 (check_mem_read): Adjust to iterate over raw breakpoints instead.
340 Don't trust the breakpoint's shadow if it is not inserted.
341 (check_mem_write): Adjust to iterate over raw breakpoints instead.
342 (delete_all_breakpoints): Adjust.
343 (free_all_breakpoints): Mark all breakpoints as uninserted, and
344 use delete_breakpoint_1.
346 * mem-break.h (breakpoints_supported): Delete declaration.
347 (set_gdb_breakpoint_at): Declare.
348 (gdb_breakpoint_here): Declare.
349 (delete_breakpoint_at): Delete.
350 (delete_gdb_breakpoint_at): Declare.
352 * server.h (struct raw_breakpoint): Forward declare.
353 (struct process_info): New field `raw_breakpoints'.
355 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
358 2010-03-24 Pedro Alves <pedro@codesourcery.com>
360 * linux-low.c (status_pending_p_callback): Fix comment.
361 (linux_wait_for_event_1): Move most of the internal breakpoint
362 handling from here...
363 (linux_wait_1): ... to here.
364 (count_events_callback): New.
365 (select_singlestep_lwp_callback): New.
366 (select_event_lwp_callback): New.
367 (cancel_breakpoints_callback): New.
368 (select_event_lwp): New.
369 (linux_wait_1): Simplify internal breakpoint handling. Give equal
370 priority to all LWPs that have had events that should be reported
371 to the client. Cancel breakpoints when about to reporting the
372 event to the client, not while stopping lwps. No longer cancel
373 finished single-steps here.
374 (cancel_finished_single_step): Delete.
375 (cancel_finished_single_steps): Delete.
377 2010-03-24 Pedro Alves <pedro@codesourcery.com>
379 * mem-break.c (enum bkpt_type): New.
380 (struct breakpoint): New field `type'.
381 (set_breakpoint_at): Change return type to struct breakpoint
382 pointer. Set type to `other_breakpoint' by default.
383 (delete_breakpoint): Rewrite, supporting more than one breakpoint
384 in the breakpoint list.
385 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
386 (reinsert_breakpoint): Rename to ...
387 (reinsert_raw_breakpoint): ... this.
388 (reinsert_breakpoints_at): Adjust.
389 * mem-break.h (struct breakpoint): Declare.
390 (set_breakpoint_at): Change return type to struct breakpoint
393 2010-03-24 Pedro Alves <pedro@codesourcery.com>
395 * server.c (handle_query): Assign, not compare.
397 2010-03-24 Pedro Alves <pedro@codesourcery.com>
399 Teach linux gdbserver to step-over-breakpoints.
401 * linux-low.c (can_hardware_single_step): New.
402 (supports_breakpoints): New.
403 (handle_extended_wait): If stopping threads, read the stop pc of
406 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
407 low target doesn't support retrieving the PC.
408 (add_lwp): Set last_resume_kind to resume_continue.
409 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
410 (linux_attach): Don't clear stop_expected. Set the lwp's
411 last_resume_kind to resume_stop.
412 (linux_detach_one_lwp): Don't check for removed breakpoints.
413 (check_removed_breakpoint): Delete.
414 (status_pending_p): Rename to ...
415 (status_pending_p_callback): ... this. Don't check for removed
416 breakpoints. Don't consider threads that are stopped from GDB's
418 (linux_wait_for_lwp): Always read the stop_pc here.
419 (cancel_breakpoint): New.
420 (step_over_bkpt): New global.
421 (linux_wait_for_event_1): Implement stepping over breakpoints.
422 (gdb_wants_lwp_stopped): New.
423 (gdb_wants_all_stopped): New.
424 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
425 single-step traps here. Store the thread's last reported target
427 (send_sigstop): Don't clear stop_expected. Always set it,
429 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
430 (cancel_finished_single_step): New.
431 (cancel_finished_single_steps): New.
432 (wait_for_sigstop): Don't cancel finished single-step traps here.
433 (linux_resume_one_lwp): Don't check for removed breakpoints.
434 Don't set `step' on non-hardware step archs.
435 (linux_set_resume_request): Ignore resume_stop requests if already
436 stopping or stopped. Set the lwp's last_resume_kind.
437 (resume_status_pending_p): Don't check for removed breakpoints.
438 (need_step_over_p): New.
439 (start_step_over): New.
440 (finish_step_over): New.
441 (linux_resume_one_thread): Always queue a sigstop for resume_stop
442 requests. Clear the thread's last reported target waitstatus.
443 Don't use the `suspended' flag. Don't consider pending breakpoints.
444 (linux_resume): Start a step-over if necessary.
445 (proceed_one_lwp): New.
446 (proceed_all_lwps): New.
447 (unstop_all_lwps): New.
448 * linux-low.h (struct lwp_info): Rewrite comment for the
449 `suspended' flag. Add the `stop_pc' field. Delete the
450 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
451 Add `'last_resume_kind' and `need_step_over' fields.
452 * inferiors.c (struct thread_info): Delete, moved elsewhere.
453 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
454 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
455 (set_raw_breakpoint_at): New.
456 (set_breakpoint_at): Rewrite to use it.
457 (reinsert_breakpoint_handler): Delete.
458 (set_reinsert_breakpoint): New.
459 (reinsert_breakpoint_by_bp): Delete.
460 (delete_reinsert_breakpoints): New.
461 (uninsert_breakpoint): Rewrite.
462 (uninsert_breakpoints_at): New.
463 (reinsert_breakpoint): Rewrite.
464 (reinsert_breakpoints_at): New.
465 (check_breakpoints): Rewrite.
466 (breakpoint_here): New.
467 (breakpoint_inserted_here): New.
468 (check_mem_read): Adjust.
469 * mem-break.h (breakpoints_supported, breakpoint_here)
470 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
471 (reinsert_breakpoint_by_bp): Delete declaration.
472 (delete_reinsert_breakpoints): Declare.
473 (reinsert_breakpoint): Delete declaration.
474 (reinsert_breakpoints_at): Declare.
475 (uninsert_breakpoint): Delete declaration.
476 (uninsert_breakpoints_at): Declare.
477 (check_breakpoints): Adjust prototype.
478 * server.h: Adjust include order.
479 (struct thread_info): Declare here. Add a `last_status' field.
481 2010-03-23 Michael Snyder <msnyder@vmware.com>
483 * server.c (crc32): New function.
484 (handle_query): Add handling for 'qCRC:' request.
486 2010-03-23 Pedro Alves <pedro@codesourcery.com>
488 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
489 lwp had been stopped by a watchpoint.
491 2010-03-16 Pedro Alves <pedro@codesourcery.com>
493 * server.h (internal_error): Declare.
494 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
495 * utils.c (internal_error): New function.
497 2010-03-15 Andreas Schwab <schwab@redhat.com>
499 * configure.srv: Fix typo setting srv_regobj.
501 2010-03-15 Pedro Alves <pedro@codesourcery.com>
503 * linux-low.c (fetch_register): Avoid passing a non string literal
505 (usr_store_inferior_registers): Ditto.
507 2010-03-14 Pedro Alves <pedro@codesourcery.com>
509 * linux-low.c (linux_write_memory): Bail out early if peeking
512 2010-03-14 Pedro Alves <pedro@codesourcery.com>
514 * linux-low.h (struct lwp_info): New fields
515 `stopped_by_watchpoint' and `stopped_data_address'.
516 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
517 here, and cache them in the lwp object.
518 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
520 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
522 (linux_stopped_by_watchpoint): Rewrite.
523 (linux_stopped_data_address): Rewrite.
525 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
527 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
528 switching the current inferior, not before.
530 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
532 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
533 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
534 i386-linux.c and amd64-linux.c.
535 (reg-i386.o): Removed.
536 (reg-i386.c): Likewise.
537 (reg-i386-linux.o): Likewise.
538 (reg-i386-linux.c): Likewise.
539 (reg-x86-64.o): Likewise.
540 (reg-x86-64.c): Likewise.
541 (reg-x86-64-linux.o): Likewise.
542 (reg-x86-64-linux.c): Likewise.
545 (i386-linux.o): Likewise.
546 (i386-linux.c): Likewise.
549 (amd64-linux.o): Likewise.
550 (amd64-linux.c): Likewise.
552 * configure.srv (srv_i386_regobj): New.
553 (srv_i386_linux_regobj): Likewise.
554 (srv_amd64_regobj): Likewise.
555 (srv_amd64_linux_regobj): Likewise.
556 (srv_i386_32bit_xmlfiles): Likewise.
557 (srv_i386_64bit_xmlfiles): Likewise.
558 (srv_i386_xmlfiles): Likewise.
559 (srv_amd64_xmlfiles): Likewise.
560 (srv_i386_linux_xmlfiles): Likewise.
561 (srv_amd64_linux_xmlfiles): Likewise.
562 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
563 srv_xmlfiles to $srv_i386_xmlfiles.
564 (i[34567]86-*-mingw32ce*): Likewise.
565 (i[34567]86-*-mingw*): Likewise.
566 (i[34567]86-*-nto*): Likewise.
567 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
568 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
569 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
570 (x86_64-*-linux*): Likewise.
572 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
573 (init_registers_amd64_linux): New.
574 (x86_arch_setup): Replace init_registers_x86_64_linux with
575 init_registers_amd64_linux.
577 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
579 * configure.ac: Check for libdl. If it is not available link against
581 * configure: Regenerate.
583 2010-02-22 Pedro Alves <pedro@codesourcery.com>
587 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
588 handing a read watchpoint.
589 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
591 2010-02-12 Doug Evans <dje@google.com>
593 * linux-low.c (linux_supports_tracefork_flag): Document.
594 (linux_look_up_symbols): Add comment.
596 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
598 * regcache.c (supply_register): Clear regcache if buf is NULL.
600 2010-02-02 Nicolas Roche <roche@sourceware.org>
601 Joel Brobecker <brobecker@adacore.com>
603 * inferiors.c (find_inferior): Add function documentation.
604 (unloaded_dll): Handle the case where the unloaded dll has not
605 been previously registered in the dll list.
607 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
609 * linux-arm-low.c (thumb_breakpoint_len): Delete.
610 (thumb2_breakpoint): New.
611 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
613 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
615 * linux-low.c (get_stop_pc): Check for SIGTRAP.
616 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
619 2010-01-21 Pedro Alves <pedro@codesourcery.com>
621 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
623 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
625 * linux-s390-low.c (s390_collect_ptrace_register)
626 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
628 2010-01-21 Doug Evans <dje@google.com>
630 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
631 (PTRACE_ARG4_TYPE): New macro.
632 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
633 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
634 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
635 (usr_store_inferior_registers): Ditto.
636 (linux_read_memory, linux_write_memory): Ditto.
637 (linux_test_for_tracefork): Ditto.
639 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
640 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
642 2010-01-21 Pedro Alves <pedro@codesourcery.com>
644 * proc-service.c (ps_lgetregs): Don't refetch registers from the
647 2010-01-21 Pedro Alves <pedro@codesourcery.com>
649 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
650 prototype to take a regcache. Adjust.
652 2010-01-20 Pedro Alves <pedro@codesourcery.com>
654 * regcache.h (struct thread_info): Forward declare.
655 (struct regcache): New.
656 (new_register_cache): Adjust prototype.
657 (get_thread_regcache): Declare.
658 (free_register_cache): Adjust prototype.
659 (registers_to_string, registers_from_string): Ditto.
660 (supply_register, supply_register_by_name, collect_register)
661 (collect_register_as_string, collect_register_by_name): Ditto.
662 * regcache.c (struct inferior_regcache_data): Delete.
663 (get_regcache): Rename to ...
664 (get_thread_regcache): ... this. Adjust. Switch inferior before
666 (regcache_invalidate_one): Adjust.
667 (regcache_invalidate): Fix prototype.
668 (new_register_cache): Return the new register cache.
669 (free_register_cache): Change prototype.
670 (realloc_register_cache): Adjust.
671 (registers_to_string): Change prototype to take a regcache. Adjust.
672 (registers_from_string): Ditto.
673 (register_data): Ditto.
674 (supply_register): Ditto.
675 (supply_register_by_name): Ditto.
676 (collect_register): Ditto.
677 (collect_register_as_string): Ditto.
678 (collect_register_by_name): Ditto.
679 * server.c (process_serial_event): Adjust.
680 * linux-low.h (regset_fill_func, regset_store_func): Change
682 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
684 * linux-low.c (get_stop_pc): Adjust.
685 (check_removed_breakpoint): Adjust.
686 (linux_wait_for_event): Adjust.
687 (linux_resume_one_lwp): Adjust.
688 (fetch_register): Add regcache parameter. Adjust.
689 (usr_store_inferior_registers): Ditto.
690 (regsets_fetch_inferior_registers): Ditto.
691 (regsets_store_inferior_registers): Ditto.
692 (linux_fetch_registers, linux_store_registers): Ditto.
693 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
695 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
696 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
697 prototype to take a regcache.
698 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
699 * remote-utils.c (convert_ascii_to_int, outreg)
700 (prepare_resume_reply): Change prototype to take a regcache.
702 * target.h (struct target_ops) <fetch_registers, store_registers>:
703 Change prototype to take a regcache.
704 (fetch_inferior_registers, store_inferior_registers): Change
705 prototype to take a regcache. Adjust.
706 * proc-service.c (ps_lgetregs): Adjust.
707 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
708 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
709 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
710 take a regcache. Adjust.
711 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
712 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
713 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
714 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
715 * linux-cris-low.c (cris_get_pc, cris_set_pc)
716 (cris_cannot_fetch_register):
717 (cris_breakpoint_at): Change prototype to take a regcache.
719 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
720 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
721 to take a regcache. Adjust.
722 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
724 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
725 take a regcache. Adjust.
726 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
727 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
728 (m68k_set_pc): Change prototype to take a regcache. Adjust.
729 * linux-mips-low.c (mips_get_pc):
730 (mips_set_pc): Change prototype to take a regcache. Adjust.
731 (mips_reinsert_addr): Adjust.
732 (mips_collect_register): Change prototype to take a regcache.
734 (mips_supply_register):
735 (mips_collect_register_32bit, mips_supply_register_32bit)
736 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
737 (mips_store_fpregset): Ditto.
738 * linux-ppc-low.c (ppc_supply_ptrace_register, ppc_supply_ptrace_register):
740 (parse_spufs_run): Adjust.
741 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
742 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
743 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
744 take a regcache. Adjust.
745 * linux-s390-low.c (s390_collect_ptrace_register)
746 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
747 (s390_set_pc): Change prototype to take a regcache. Adjust.
748 (s390_arch_setup): Adjust.
749 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
750 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
751 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
752 (sparc_fill_gregset, sparc_store_gregset_from_stack)
753 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
755 (sparc_breakpoint_at): Adjust.
756 * linux-xtensa-low.c (xtensa_fill_gregset):
757 (xtensa_store_gregset):
758 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
759 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
760 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
761 prototype to take a regcache. Adjust.
762 * win32-arm-low.c (arm_fetch_inferior_register)
763 (arm_store_inferior_register): Change prototype to take a
765 * win32-i386-low.c (i386_fetch_inferior_register)
766 (i386_store_inferior_register): Change prototype to take a
768 * win32-low.c (child_fetch_inferior_registers)
769 (child_store_inferior_registers): Change prototype to take a
771 (win32_wait): Adjust.
772 (win32_fetch_inferior_registers): Change prototype to take a
774 (win32_store_inferior_registers): Adjust.
775 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
776 store_inferior_register>: Change prototype to take a regcache.
778 2010-01-20 Doug Evans <dje@google.com>
780 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
782 (linux_wait_for_event1, linux_init_signals): Ditto.
783 (W_STOPCODE): Provide definition if missing.
785 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
787 * linux-low.c (linux_core_of_thread): New.
788 (compare_ints, show_process, list_threads): New.
789 (linux_qxfer_osdata): Report threads and cores.
790 (linux_target_op): Register linux_core_of_thread.
791 * remote-utils.c (prepare_resume_reply): Report the core.
792 (buffer_xml_printf): Support %d specifier.
793 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
795 (handle_query): Handle qXfer:threads. Announce availability
797 * target.h (struct target_ops): New field core_of_thread.
799 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
801 * Makefile.in (clean): Remove new generated files.
802 (reg-s390.o, reg-s390.c): Remove rules.
803 (reg-s390x.o, reg-s390x.c): Likewise.
804 (s390-linux32.o, s390-linux32.c): Add rules.
805 (s390-linux64.o, s390-linux64.c): Likewise.
806 (s390x-linux64.o, s390x-linux64.c): Likewise.
807 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
808 * linux-s390-low.c: Include <elf.h>.
809 (HWCAP_S390_HIGH_GPRS): Define if undefined.
810 (init_registers_s390): Remove prototype.
811 (init_registers_s390x): Likewise.
812 (init_registers_s390_linux32): Add prototype.
813 (init_registers_s390_linux64): Likewise.
814 (init_registers_s390x_linux64): Likewise.
815 (s390_num_regs_3264): New define.
816 (s390_regmap_3264): New global variable.
817 (s390_cannot_fetch_register): Remove obsolete check.
818 (s390_cannot_store_register): Likewise.
819 (s390_collect_ptrace_register): Handle upper/lower register halves.
820 (s390_supply_ptrace_register): Likewise.
821 (s390_fill_gregset): Update to register number changes.
822 (s390_get_hwcap): New routine.
823 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
824 Install appropriate regmap and register set.
826 2010-01-01 Joel Brobecker <brobecker@adacore.com>
828 * server.c (gdbserver_version): Update copyright year to 2010.
829 * gdbreplay.c (gdbreplay_version): Likewise.
831 2009-12-28 Doug Evans <dje@google.com>
833 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
834 elf/external.h. Include <elf.h> instead but only if necessary.
836 2009-12-28 Pedro Alves <pedro@codesourcery.com>
838 * linux-low.c (linux_remove_process): Remove `detaching'
839 parameter. Don't release/detach from thread_db here.
840 (linux_kill): Release/detach from thread_db here, ...
841 (linux_detach): ... and here, before actually detaching.
842 (linux_wait_1): ... and here, when a process exits.
843 * thread-db.c (any_thread_of): New.
844 (thread_db_free): Switch the current inferior to a thread of the
847 2009-12-21 Doug Evans <dje@google.com>
849 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
851 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
852 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
853 warning ifndef __NR_tkill. Move setting of errno there too.
854 Delete unnecessary resetting of errno after syscall.
855 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
857 * configure.ac: Check for dladdr.
858 * config.in: Regenerate.
859 * configure: Regenerate.
860 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
861 (try_thread_db_load): Update.
863 * linux-low.c (my_waitpid): Delete unnecessary prototype.
865 2009-12-18 Doug Evans <dje@google.com>
867 * event-loop.c: Include unistd.h if it exists.
869 * linux-low.c (my_waitpid): Move definition away from being in
870 between linux_tracefork_child/linux_test_for_tracefork.
872 * gdb_proc_service.h (psaddr_t): Fix type.
873 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
874 signature to match glibc.
876 2009-12-16 Doug Evans <dje@google.com>
878 * linux-low.c (linux_read_memory): Fix argument to read.
880 2009-11-26 Pedro Alves <pedro@codesourcery.com>
882 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
883 events, don't leave current_inferior pointing at null.
885 2009-11-26 Pedro Alves <pedro@codesourcery.com>
887 * win32-low.c (LOG): Delete.
888 (OUTMSG): Output to stderr.
889 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
890 on compile time LOG macro.
891 (win32_wait): Fix debug output.
893 2009-11-26 Pedro Alves <pedro@codesourcery.com>
895 * win32-low.c (win32_add_one_solib): If the dll name is
896 "ntdll.dll", prepend the system directory to the dll path.
898 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
900 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
902 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
903 Vladimir Prus <vladimir@codesourcery.com>
905 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
906 * configure.ac: Check for __mcoldfire__ and set
907 gdb_cv_m68k_is_coldfire.
908 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
909 reg-cf.o and reg-m68k.o.
910 * configure: Regenerated.
912 2009-11-16 Pedro Alves <pedro@codesourcery.com>
914 * linux-low.c (linux_remove_process): Add `detaching' parameter.
915 Pass it to thread_db_free.
916 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
917 proper `detaching' argument to linux_remove_process.
918 * linux-low.h (thread_db_free): Add `detaching' parameter.
919 * thread-db.c (thread_db_init): Pass false as `detaching' argument
921 (thread_db_free): Add `detaching' parameter. Only
922 call td_ta_clear_event if detaching from process.
924 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
926 * thread-db.c (thread_db_free): Fix typo.
928 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
931 * thread-db.c (thread_db_free): Call td_ta_clear_event.
933 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
935 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
936 with an i686 compiler.
937 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
939 * configure: Rebuilt.
941 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
945 * server.c (handle_search_memory_1): Correct read_addr initialization
946 in loop for searching subsequent chunks.
948 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
950 * configure.ac: New --with-libthread-db option.
951 * thread-db.c: Allow direct dependence on libthread_db.
952 (thread_db_free): Adjust.
953 * config.in: Regenerate.
954 * configure: Likewise.
956 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
959 * thread-db.c (attach_thread): New function.
960 (maybe_attach_thread): Return success/failure.
961 (find_new_threads_callback): Adjust.
962 (thread_db_find_new_threads): Loop until no new threads.
964 2009-10-13 Pedro Alves <pedro@codesourcery.com>
966 * proc-service.c (ps_lgetregs): Formatting.
968 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
970 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
971 * configure.ac: Adjust.
972 * linux-low.h (struct process_info_private): Move members to struct
974 (thread_db_free, thread_db_handle_monitor_command): New prototype.
975 * linux-low.c (linux_remove_process): Adjust.
976 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
977 * server.c (handle_query): Move code ...
978 (handle_monitor_command): ... here. New function.
979 * target.h (struct target_ops): New member.
980 * thread-db.c (struct thread_db): New.
981 (libthread_db_search_path): New variable.
982 (thread_db_create_event, thread_db_enable_reporting)
983 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
984 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
985 (try_thread_db_load_1, dladdr_to_soname): New functions.
986 (try_thread_db_load, thread_db_load_search): New functions.
987 (thread_db_init): Search for libthread_db.
988 (thread_db_free): New function.
989 (thread_db_handle_monitor_command): Likewise.
990 * config.in: Regenerate.
991 * configure: Regenerate.
993 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
995 * spu-low.c (spu_kill): Wait for inferior to terminate.
996 Call clear_inferiors.
997 (spu_detach): Call clear_inferiors.
999 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1001 * aclocal.m4: Regenerate.
1002 * config.in: Likewise.
1003 * configure: Likewise.
1005 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1007 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
1008 (parse_spufs_run): New function.
1009 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
1010 (ppc_breakpoint_at): Handle SPU breakpoints.
1012 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1014 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
1015 (SPUFS_MAGIC): Define.
1016 (spu_enumerate_spu_ids): New function.
1017 (linux_qxfer_spu): New function.
1018 (linux_target_ops): Install linux_qxfer_spu.
1020 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
1022 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
1023 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
1024 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
1025 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
1026 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
1027 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
1028 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
1029 (init_registers_powerpc_cell32l): Add prototype.
1030 (init_registers_powerpc_cell64l): Likewise.
1031 (ppc_arch_setup): Detect Cell/B.E. architecture.
1033 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1035 * Makefile.in (datarootdir): New variable.
1037 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1039 * linux-low.c (linux_write_memory): Update debugging output.
1040 * Makefile.in (clean): Add new descriptions.
1041 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
1042 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
1043 * configure.srv: Add new files for arm*-*-linux*.
1044 * linux-arm-low.c: Add new declarations.
1045 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
1046 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
1047 (HWCAP_VFPv3D16): New.
1048 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
1049 instead of __IWMMXT__.
1050 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
1051 (arm_arch_setup): New.
1052 (target_regsets): Remove #ifdef. Add VFP regset.
1053 (the_low_target): Use arm_arch_setup.
1055 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1057 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
1058 the main thread again.
1060 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
1062 Adding Neutrino gdbserver.
1063 * configure: Regenerated.
1064 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
1065 * configure.srv (i[34567]86-*-nto*): New target.
1066 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
1067 * remote-utils.c [__QNX__]: Include sys/iomgr.h
1068 (nto_comctrl) [__QNX__]: New function.
1069 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
1071 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
1073 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
1076 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
1077 Pedro Alves <pedro@codesourcery.com>
1079 * win32-i386-low.c (i386_get_thread_context): Handle systems that
1080 don't support CONTEXT_EXTENDED_REGISTERS.
1081 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
1082 (the_low_target): Install them.
1083 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
1084 failing with ERROR_PIPE_NOT_CONNECTED.
1086 2009-06-30 Doug Evans <dje@google.com>
1087 Pierre Muller <muller@ics.u-strasbg.fr>
1089 Add h/w watchpoint support to x86-linux, win32-i386.
1090 * Makefile.in (SFILES): Add i386-low.c
1091 (i386_low_h): Define.
1092 (i386-low.o): Add dependencies.
1093 (linux-x86-low.o): Add i386-low.h dependency.
1094 (win32-i386-low.o): Ditto.
1095 * i386-low.c: New file.
1096 * i386-low.h: New file.
1097 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
1098 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
1099 * linux-low.c (linux_add_process): Initialize arch_private.
1100 (linux_remove_process): Free arch_private.
1101 (add_lwp): Initialize arch_private.
1102 (delete_lwp): Free arch_private.
1103 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
1105 * linux-low.h (process_info_private): New member arch_private.
1106 (lwp_info): New member arch_private.
1107 (linux_target_ops): New members new_process, new_thread,
1109 (ptid_of): New macro.
1110 * linux-x86-low.c: Include stddef.h, i386-low.h.
1111 (arch_process_info): New struct.
1112 (arch_lwp_info): New struct.
1113 (x86_linux_dr_get, x86_linux_dr_set): New functions.
1114 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1115 (i386_dr_low_get_status): New function.
1116 (x86_insert_point, x86_remove_point): New functions.
1117 (x86_stopped_by_watchpoint): New function.
1118 (x86_stopped_data_address): New function.
1119 (x86_linux_new_process, x86_linux_new_thread): New functions.
1120 (x86_linux_prepare_to_resume): New function.
1121 (the_low_target): Add entries for insert_point, remove_point,
1122 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
1124 * server.c (debug_hw_points): New global.
1125 (monitor_show_help): Document set debug-hw-points.
1126 (handle_query): Process "set debug-hw-points".
1127 * server.h (debug_hw_points): Declare.
1128 (paddress): Declare.
1129 * utils.c (NUMCELLS, CELLSIZE): New macros.
1130 (get_sell, xsnprintf, paddress): New functions.
1131 * win32-arm-low.c (the_low_target): Add entries for insert_point,
1132 remove_point, stopped_by_watchpoint, stopped_data_address.
1133 * win32-i386-low.c: Include i386-low.h.
1134 (debug_reg_state): Replaces dr.
1135 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
1136 (i386_dr_low_get_status): New function.
1137 (i386_insert_point, i386_remove_point): New functions.
1138 (i386_stopped_by_watchpoint): New function.
1139 (i386_stopped_data_address): New function.
1140 (i386_initial_stuff): Update.
1141 (get_thread_context,set_thread_context,i386_thread_added): Update.
1142 (the_low_target): Add entries for insert_point,
1143 remove_point, stopped_by_watchpoint, stopped_data_address.
1144 * win32-low.c (win32_insert_watchpoint): New function.
1145 (win32_remove_watchpoint): New function.
1146 (win32_stopped_by_watchpoint): New function.
1147 (win32_stopped_data_address): New function.
1148 (win32_target_ops): Add entries for insert_watchpoint,
1149 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
1150 * win32-low.h (win32_target_ops): New members insert_point,
1151 remove_point, stopped_by_watchpoint, stopped_data_address.
1153 2009-06-25 Pedro Alves <pedro@codesourcery.com>
1155 * server.c (process_serial_event): Re-return unsupported, not
1156 error, if the type isn't recognized. Re-allow supporting only
1157 insert or remove packets. Also call require_running for
1158 breakpoints. Add missing break statement to default case. Tidy.
1159 * target.h (struct target_ops): Rename insert_watchpoint to
1160 insert_point, and remove_watchpoint to remove_point.
1162 * linux-low.h (struct linux_target_ops): Likewise.
1163 * linux-low.c (linux_insert_watchpoint): Rename to ...
1164 (linux_insert_point): ... this. Adjust.
1165 (linux_remove_watchpoint): Rename to ...
1166 (linux_remove_point): ... this. Adjust.
1167 (linux_target_ops): Adjust.
1168 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
1169 (cris_insert_point): ... this.
1170 (cris_remove_watchpoint): Rename to ...
1171 (cris_remove_point): ... this.
1172 (the_low_target): Adjust.
1174 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
1176 * server.c (handle_v_kill): Pass signal_pid to
1177 kill_inferior if multi_process is zero.
1179 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
1181 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
1182 * target.h (target_ops): Comment for *_watchpoint to make it clear
1183 the functions can get types '0' and '1'.
1185 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
1187 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
1188 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
1189 * regcache.c (get_regcache): Likewise.
1190 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
1191 * win32-low.c (child_fetch_inferior_registers): Remove check for
1194 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
1195 Pedro Alves <pedro@codesourcery.com>
1197 * target.h (struct target_ops) <supports_multi_process>: New
1199 (target_supports_multi_process): New.
1200 * server.c (handle_query): Even if GDB reports support, only
1201 enable multi-process if the target also supports it. Report
1202 multi-process support only if the target backend supports it.
1203 * linux-low.c (linux_supports_multi_process): New function.
1204 (linux_target_ops): Install it as target_supports_multi_process
1207 2009-05-24 Doug Evans <dje@google.com>
1209 Global renaming of find_thread_pid to find_thread_ptid.
1210 * server.h (find_thread_ptid): Renamed from find_thread_pid.
1211 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
1212 All callers updated.
1214 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
1215 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
1218 * linux-low.c (get_stop_pc): Print pc if debug_threads.
1219 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
1220 (linux_resume_one_lwp): Ditto.
1222 2009-05-23 Doug Evans <dje@google.com>
1224 * linux-low.c (linux_resume_one_lwp): Change type of first arg
1225 from struct inferior_list_entry * to struct lwp_info *.
1226 All callers updated.
1228 2009-05-13 Doug Evans <dje@google.com>
1230 * linux-x86-low.c: Don't include assert.h.
1231 (x86_siginfo_fixup): Use fatal, not assert.
1232 (x86_arch_setup): Fix comment.
1234 2009-05-12 Doug Evans <dje@google.com>
1236 Biarch support for i386/amd64 gdbserver.
1237 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
1238 Add linux-x86-low.c.
1239 (linux-i386-low.o, linux-x86-64-low.o): Delete.
1240 (linux-x86-low.o): Add.
1241 * linux-x86-64-low.c: Delete.
1242 * linux-i386-low.c: Delete.
1243 * linux-x86-low.c: New file.
1244 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
1246 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
1248 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
1249 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
1250 (linux_child_pid_to_exec_file): New function.
1251 (elf_64_header_p, elf_64_file_p): New functions.
1252 (siginfo_fixup): New function.
1253 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
1254 give target a chance to convert layout.
1255 * linux-low.h (linux_target_ops): New member siginfo_fixup.
1256 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
1258 2009-05-07 Doug Evans <dje@google.com>
1260 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
1261 (regsets_store_inferior_registers): Ditto.
1263 2009-05-06 Pedro Alves <pedro@codesourcery.com>
1267 * linux-low.c (must_set_ptrace_flags): Delete.
1268 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
1270 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
1271 `lwp->must_set_ptrace_flags' instead.
1272 (linux_wait_for_event_1): Set ptrace options here.
1273 (linux_wait_1): ... not here.
1275 2009-04-30 Doug Evans <dje@google.com>
1277 * inferiors.c (started_inferior_callback): New function.
1278 (attached_inferior_callback): New function.
1279 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
1280 * server.c (print_started_pid, print_attached_pid): New functions.
1281 (detach_or_kill_for_exit): New function.
1282 (main): Call it instead of for_each_inferior (kill_inferior_callback).
1283 * server.h (have_started_inferiors_p): Declare.
1284 (have_attached_inferiors_p): Declare.
1286 * inferiors.c (remove_process): Fix memory leak, free process.
1287 * linux-low.c (linux_remove_process): New function.
1288 (linux_kill): Call it instead of remove_process.
1289 (linux_detach, linux_wait_1): Ditto.
1291 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
1293 * configure.srv: Add x86 Windows CE target.
1295 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1297 * inferiors.c (get_thread_process): Make global.
1298 * server.h (get_thread_process): Add prototype.
1299 * thread-db.c (find_one_thread): Use get_thread_process
1300 instead of current_process.
1301 (thread_db_get_tls_address): Do not crash if called when
1302 thread layer is not yet initialized.
1304 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
1306 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
1307 * spu-low.c (current_tid): Rename to ...
1308 (current_ptid): ... this.
1309 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
1310 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
1311 ptid_get_lwp (current_ptid) instead of current_tid.
1312 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
1313 instead of current_tid. Use find_process_pid to verify pid
1314 argument is valid. Pass proper argument to remove_process.
1315 (spu_thread_alive): Compare current_ptid instead of current_tid.
1316 (spu_resume): Likewise.
1318 2009-04-02 Pedro Alves <pedro@codesourcery.com>
1320 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
1323 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1325 Implement the multiprocess extensions, and add linux multiprocess
1328 * server.h (ULONGEST): Declare.
1329 (struct ptid, ptid_t): New.
1330 (minus_one_ptid, null_ptid): Declare.
1331 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1332 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
1333 (struct inferior_list_entry): Change `id' type from unsigned from
1335 (struct sym_cache, struct breakpoint, struct
1336 process_info_private): Forward declare.
1337 (struct process_info): Declare.
1338 (current_process): Declare.
1339 (all_processes): Declare.
1340 (initialize_inferiors): Declare.
1341 (add_thread): Adjust to use ptid_t.
1342 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
1343 (add_process, remove_process, find_thread_pid): Declare.
1344 (find_inferior_id): Adjust to use ptid_t.
1345 (cont_thread, general_thread, step_thread): Change type to ptid_t.
1346 (multi_process): Declare.
1347 (push_event): Adjust to use ptid_t.
1348 (read_ptid, write_ptid): Declare.
1349 (prepare_resume_reply): Adjust to use ptid_t.
1350 (clear_symbol_cache): Declare.
1351 * inferiors.c (all_processes): New.
1352 (null_ptid, minus_one_ptid): New.
1353 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
1354 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
1355 (add_thread): Change unsigned long to ptid. Remove gdb_id
1357 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
1358 (gdb_id_to_thread): Rename to ...
1359 (find_thread_pid): ... this. Change unsigned long to ptid.
1360 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
1361 (loaded_dll, pull_pid_from_list): Adjust.
1362 (add_process, remove_process, find_process_pid)
1363 (get_thread_process, current_process, initialize_inferiors): New.
1364 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
1365 (struct target_waitstatus) <related_pid>: Ditto.
1366 (struct target_ops) <kill, detach>: Add `pid' argument. Change
1368 (struct target_ops) <join>: Add `pid' argument.
1369 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
1370 (struct target_ops) <wait>: Add `ptid' field. Change return type
1372 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
1373 (mywait): Add `ptid' argument. Change return type to ptid_t.
1374 (target_pid_to_str): Declare.
1375 * target.c (set_desired_inferior): Adjust to use ptids.
1376 (mywait): Add new `ptid' argument. Adjust.
1377 (target_pid_to_str): New.
1378 * mem-break.h (free_all_breakpoints): Declare.
1379 * mem-break.c (breakpoints): Delelete.
1380 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
1381 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
1382 to use per-process breakpoint list.
1383 (free_all_breakpoints): New.
1384 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
1385 (symbol_cache, all_symbols_looked_up): Delete.
1387 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
1389 (prepare_resume_reply): Change ptid argument's type from unsigned
1390 long to ptid_t. Adjust. Implement W;process and X;process.
1391 (free_sym_cache, clear_symbol_cache): New.
1392 (look_up_one_symbol): Adjust to per-process symbol cache. *
1393 * server.c (cont_thread, general_thread, step_thread): Change type
1396 (multi_process): New.
1397 (last_ptid): Change type to ptid_t.
1398 (struct vstop_notif) <ptid>: Change type to ptid_t.
1399 (queue_stop_reply, push_event): Change `ptid' argument's type to
1401 (discard_queued_stop_replies): Add `pid' argument.
1402 (start_inferior): Adjust to use ptids. Adjust to mywait interface
1403 changes. Don't reference the `attached' global.
1404 (attach_inferior): Adjust to mywait interface changes.
1405 (handle_query): Adjust to use ptids. Parse GDB's qSupported
1406 features. Handle and report "multiprocess+". Handle
1408 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
1410 (handle_v_kill): New.
1411 (handle_v_stopped): Adjust to use target_pid_to_str.
1412 (handle_v_requests): Allow multiple attaches and runs when
1413 multiprocess extensions are in effect. Handle "vKill".
1414 (myresume): Adjust to use ptids.
1415 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
1416 (handle_status): Adjust to discard_queued_stop_replies interface
1418 (first_thread_of, kill_inferior_callback)
1419 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
1420 (main): Call initialize_inferiors. Adjust to use ptids, killing
1421 and detaching from all inferiors. Handle multiprocess packet
1423 * linux-low.h: Include gdb_proc_service.h.
1424 (struct process_info_private): New.
1425 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
1426 <lwpid_of>: Use ptid_get_lwp.
1427 (get_lwp_thread): Adjust.
1428 (struct lwp_info): Add `dead' member.
1429 (find_lwp_pid): Declare.
1430 * linux-low.c (thread_db_active): Delete.
1431 (new_inferior): Adjust comment.
1432 (inferior_pid): Delete.
1433 (linux_add_process): New.
1434 (handle_extended_wait): Adjust.
1435 (add_lwp): Change unsigned long to ptid.
1436 (linux_create_inferior): Add process to processes table. Adjust
1437 to use ptids. Don't set new_inferior here.
1438 (linux_attach_lwp): Rename to ...
1439 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
1440 it. Adjust to use ptids.
1441 (linux_attach_lwp): New.
1442 (linux_attach): Add process to processes table. Don't set
1444 (struct counter): New.
1445 (second_thread_of_pid_p, last_thread_of_process_p): New.
1446 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
1448 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
1449 processes. Remove process from process table.
1450 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
1451 to multiple processes.
1452 (any_thread_of): New.
1453 (linux_detach): Add `pid' argument, and handle it. Remove process
1454 from processes table.
1455 (linux_join): Add `pid' argument. Handle it.
1456 (linux_thread_alive): Change unsighed long argument to ptid_t.
1457 Consider dead lwps as not being alive.
1458 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
1459 threads we're not interested in.
1460 (same_lwp, find_lwp_pid): New.
1461 (linux_wait_for_lwp): Change `pid' argument's type from int to
1463 (linux_wait_for_event): Rename to ...
1464 (linux_wait_for_event_1): ... this. Change `pid' argument's type
1465 from int to ptid_t. Adjust.
1466 (linux_wait_for_event): New.
1467 (linux_wait_1): Add `ptid' argument. Change return type to
1468 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
1469 that exit from the process table.
1470 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
1472 (mark_lwp_dead): New.
1473 (wait_for_sigstop): Adjust to use ptids. If a process exits while
1474 stopping all threads, mark its main lwp as dead.
1475 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
1477 (fetch_register, usr_store_inferior_registers)
1478 (regsets_fetch_inferior_registers)
1479 (regsets_store_inferior_registers, linux_read_memory)
1480 (linux_write_memory): Inline `inferior_pid'.
1481 (linux_look_up_symbols): Adjust to use per-process
1483 (linux_request_interrupt): Adjust to use ptids.
1484 (linux_read_auxv): Inline `inferior_pid'.
1485 (initialize_low): Don't reference thread_db_active.
1486 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
1487 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
1488 (ps_getpid): Return the pid of the current inferior.
1489 * thread-db.c (proc_handle, thread_agent): Delete.
1490 (thread_db_create_event, thread_db_enable_reporting): Adjust to
1492 (find_one_thread): Change argument type to ptid_t. Adjust to
1494 (maybe_attach_thread): Adjust to per-process data and ptids.
1495 (thread_db_find_new_threads): Ditto.
1496 (thread_db_init): Ditto.
1497 * spu-low.c (spu_create_inferior, spu_attach): Add process to
1498 processes table. Adjust to use ptids.
1499 (spu_kill, spu_detach): Adjust interface. Remove process from
1501 (spu_join, spu_thread_alive): Adjust interface.
1502 (spu_wait): Adjust interface. Remove process from processes
1503 table. Adjust to use ptids.
1504 * win32-low.c (current_inferior_tid): Delete.
1505 (current_inferior_ptid): New.
1506 (debug_event_ptid): New.
1507 (thread_rec): Take a ptid. Adjust.
1508 (child_add_thread): Add `pid' argument. Adjust to use ptids.
1509 (child_delete_thread): Ditto.
1510 (do_initial_child_stuff): Add `attached' argument. Add process to
1512 (child_fetch_inferior_registers, child_store_inferior_registers):
1514 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
1515 (win32_attach): Pass 1 to do_initial_child_stuff.
1516 (win32_kill): Adjust interface. Remove process from processes
1518 (win32_detach): Ditto.
1519 (win32_join): Adjust interface.
1520 (win32_thread_alive): Take a ptid.
1521 (win32_resume): Adjust to use ptids.
1522 (get_child_debug_event): Ditto.
1523 (win32_wait): Adjust interface. Remove exiting process from
1526 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1528 Non-stop mode support.
1530 * server.h (non_stop): Declare.
1531 (gdb_client_data, handler_func): Declare.
1532 (delete_file_handler, add_file_handler, start_event_loop):
1534 (handle_serial_event, handle_target_event, push_event)
1535 (putpkt_notif): Declare.
1536 * target.h (enum resume_kind): New.
1537 (struct thread_resume): Replace `step' field by `kind' field.
1538 (TARGET_WNOHANG): Define.
1539 (struct target_ops) <wait>: Add `options' argument.
1540 <supports_non_stop, async, start_non_stop>: New fields.
1541 (target_supports_non_stop, target_async): New.
1542 (start_non_stop): Declare.
1543 (mywait): Add `options' argument.
1544 * target.c (mywait): Add `options' argument. Print child exit
1546 (start_non_stop): New.
1547 * server.c (non_stop, own_buf, mem_buf): New globals.
1548 (struct vstop_notif): New.
1549 (notif_queue): New global.
1550 (queue_stop_reply, push_event, discard_queued_stop_replies)
1551 (send_next_stop_reply): New.
1552 (start_inferior): Adjust to use resume_kind. Adjust to mywait
1554 (attach_inferior): In non-stop mode, don't wait for the target
1556 (handle_general_set): Handle QNonStop.
1557 (handle_query): When handling qC, return the current general
1558 thread, instead of the first thread of the list.
1559 (handle_query): If the backend supports non-stop mode, include
1560 QNonStop+ in the qSupported query response.
1561 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
1563 (handle_v_attach, handle_v_run): Handle non-stop mode.
1564 (handle_v_stopped): New.
1565 (handle_v_requests): Report support for vCont;t. Handle vStopped.
1566 (myresume): Adjust to use resume_kind. Handle non-stop.
1567 (queue_stop_reply_callback): New.
1568 (handle_status): Handle non-stop mode.
1569 (main): Clear non_stop flag on reconnection. Use the event-loop.
1570 Refactor serial protocol handling from here ...
1571 (process_serial_event): ... to this new function. When GDB
1572 selects any thread, select one here. In non-stop mode, wait until
1573 GDB acks all pending events before exiting.
1574 (handle_serial_event, handle_target_event): New.
1575 * remote-utils.c (remote_open): Install remote_desc in the event
1577 (remote_close): Remove remote_desc from the event loop.
1578 (putpkt_binary): Rename to...
1579 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
1580 (putpkt_binary): New as wrapper around putpkt_binary_1.
1581 (putpkt_notif): New.
1582 (prepare_resume_reply): In non-stop mode, don't change the
1584 * event-loop.c: New.
1585 * Makefile.in (OBJ): Add event-loop.o.
1586 (event-loop.o): New rule.
1588 * linux-low.h (pid_of): Moved here.
1590 (get_lwp_thread): Use lwpid_of.
1591 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
1592 * linux-low.c (pid_of): Delete.
1593 (inferior_pid): Use lwpid_of.
1594 (linux_event_pipe): New.
1595 (target_is_async_p): New.
1597 (handle_extended_wait): Use lwpid_of.
1598 (add_lwp): Don't set lwpid field.
1599 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
1600 (linux_kill_one_lwp): If killing a running lwp, stop it first.
1601 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
1602 (linux_detach_one_lwp): If detaching from a running lwp, stop it
1603 first. Adjust to linux_wait_for_event interface changes. Use
1605 (linux_detach): Don't delete the main lwp here.
1606 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
1607 (status_pending_p): Don't consider explicitly suspended lwps.
1608 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
1609 pointer. Add OPTIONS argument. Change return type to int. Use
1610 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
1611 (linux_wait_for_event): Take an integer pid instead of a lwp_info
1612 pointer. Add status pointer argument. Return a pid instead of a
1613 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
1614 changes. In non-stop mode, don't switch to a random thread.
1615 (linux_wait): Rename to...
1616 (linux_wait_1): ... this. Add target_options argument, and handle
1617 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
1618 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
1619 clean exit and signal exit code. Don't stop all threads in
1620 non-stop mode. In all-stop mode, only stop all threads when
1621 reporting a stop to GDB. Handle explicit thread stop requests.
1622 (async_file_flush, async_file_mark): New.
1624 (send_sigstop): Use lwpid_of.
1625 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
1626 interface changes. In non-stop mode, don't switch to a random
1628 (linux_resume_one_lwp): Use lwpid_of.
1629 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
1630 (linux_resume_one_thread): ... this. Handle resume_stop. In
1631 non-stop mode, don't look for pending flag in all threads.
1632 (resume_status_pending_p): Don't consider explicitly suspended
1634 (my_waitpid): Reimplement. Emulate __WALL.
1635 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1637 (sigchld_handler, linux_supports_non_stop, linux_async)
1638 (linux_start_non_stop): New.
1639 (linux_target_ops): Register linux_supports_non_stop, linux_async
1640 and linux_start_non_stop.
1641 (initialize_low): Install SIGCHLD handler.
1642 * thread-db.c (thread_db_create_event, find_one_thread)
1643 (thread_db_get_tls_address): Use lwpid_of.
1644 * win32-low.c (win32_detach): Adjust to use resume_kind.
1645 (win32_wait): Add `options' argument.
1646 * spu-low.c (spu_resume): Adjust to use resume_kind.
1647 (spu_wait): Add `options' argument.
1649 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1651 Decouple target code from remote protocol.
1653 * target.h (enum target_waitkind): New.
1654 (struct target_waitstatus): New.
1655 (struct target_ops) <wait>: Return an unsigned long. Take a
1656 target_waitstatus pointer instead of a char pointer.
1658 * target.c (mywait): Change prototype to return an unsigned long.
1659 Take a target_waitstatus pointer instead of a char pointer. Adjust.
1660 * server.h (thread_from_wait, old_thread_from_wait): Delete
1662 (prepare_resume_reply): Change prototype to take a
1664 * server.c (thread_from_wait, old_thread_from_wait): Delete.
1665 (last_status, last_ptid): New.
1666 (start_inferior): Remove "statusptr" argument. Adjust. Return a
1667 pid instead of a signal.
1668 (attach_inferior): Remove "status" and "signal" parameters.
1670 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
1672 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
1673 (handle_v_requests, myresume): Remove "status" and "signal"
1675 (handle_status): New.
1676 (main): Delete local `status'. Adjust.
1677 * remote-utils.c: Include target.h.
1678 (prepare_resume_reply): Change prototype to take a
1679 target_waitstatus. Adjust.
1681 * linux-low.c (linux_wait): Adjust to new target_ops->wait
1683 * spu-low.c (spu_wait): Adjust.
1684 * win32-low.c (enum target_waitkind, struct target_waitstatus):
1686 (win32_wait): Adjust.
1688 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1690 * target.h (struct thread_resume): Delete leave_stopped member.
1691 (struct target_ops): Add a `n' argument to the `resume' callback.
1692 * server.c (start_inferior): Adjust.
1693 (handle_v_cont, myresume): Adjust.
1694 * linux-low.c (check_removed_breakpoint): Adjust to resume
1695 interface change, and to removed leave_stopped field.
1696 (resume_ptr): Delete.
1697 (struct thread_resume_array): New.
1698 (linux_set_resume_request): Add new `arg' parameter. Adjust to
1699 resume interface change.
1700 (linux_continue_one_thread, linux_queue_one_thread)
1701 (resume_status_pending_p): Check if the resume field is NULL
1702 instead of checking the leave_stopped member.
1703 (linux_resume): Adjust to the target resume interface change.
1704 * spu-low.c (spu_resume): Adjust to the target resume interface
1706 * win32-low.c (win32_detach, win32_resume): Ditto.
1708 2009-04-01 Pedro Alves <pedro@codesourcery.com>
1710 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
1712 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
1714 (linux_continue_one_thread): Only preserve the stepping flag if
1715 there's a pending breakpoint.
1717 2009-03-31 Pedro Alves <pedro@codesourcery.com>
1719 * server.c (main): After the inferior having exited, call
1720 remote_close before exiting gdbserver.
1722 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
1724 Fix size of FPSCR in Power 7 processors.
1725 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
1726 (PPC_FEATURE_HAS_DFP): New #define.
1727 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
1730 2009-03-23 Pedro Alves <pedro@codesourcery.com>
1732 * server.c (handle_query) Whitespace and formatting.
1734 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1736 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
1737 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
1738 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
1739 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
1740 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
1741 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
1742 Makefile.in, configure.ac: Fix whitespace throughout.
1743 * configure: Regenerate.
1745 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1747 * inferiors.c (find_inferior): Make it safe for the callback
1748 function to delete the currently iterated inferior.
1750 2009-03-22 Pedro Alves <pedro@codesourcery.com>
1752 * Makefile.in (linuw_low_h): Move higher.
1753 (thread-db.o): Depend on $(linux_low_h).
1755 2009-03-17 Pedro Alves <pedro@codesourcery.com>
1757 Rename "process" to "lwp" throughout.
1759 * linux-low.c (all_processes): Rename to...
1760 (all_lwps): ... this.
1761 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
1762 (add_process): Rename to ...
1763 (add_lwp): ... this. Adjust.
1764 (linux_create_inferior): Adjust.
1765 (linux_attach_lwp): Adjust.
1766 (linux_attach): Adjust.
1767 (linux_kill_one_process): Rename to ...
1768 (linux_kill_one_lwp): ... this. Adjust.
1769 (linux_kill): Adjust.
1770 (linux_detach_one_process): Rename to ...
1771 (linux_detach_one_lwp): ... this. Adjust.
1772 (linux_detach): Adjust.
1773 (check_removed_breakpoint): Adjust.
1774 (status_pending_p): Adjust.
1775 (linux_wait_for_process): Rename to ...
1776 (linux_wait_for_lwp): ... this. Adjust.
1777 (linux_wait_for_event): Adjust.
1778 (send_sigstop): Adjust.
1779 (wait_for_sigstop): Adjust.
1780 (stop_all_processes): Rename to ...
1781 (stop_all_lwps): ... this.
1782 (linux_resume_one_process): Rename to ...
1783 (linux_resume_one_lwp): ... this. Adjust.
1784 (linux_set_resume_request, linux_continue_one_thread)
1785 (linux_queue_one_thread, resume_status_pending_p)
1786 (usr_store_inferior_registers, regsets_store_inferior_registers)
1787 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
1789 * linux-low.h (get_process): Rename to ...
1790 (get_lwp): ... this. Adjust.
1791 (get_thread_process): Rename to ...
1792 (get_thread_lwp): ... this. Adjust.
1793 (get_process_thread): Rename to ...
1794 (get_lwp_thread): ... this. Adjust.
1795 (struct process_info): Rename to ...
1796 (struct lwp_info): ... this.
1797 (all_processes): Rename to ...
1798 (all_lwps): ... this.
1799 * proc-service.c (ps_lgetregs): Adjust.
1800 * thread-db.c (thread_db_create_event, find_one_thread)
1801 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
1803 2009-03-14 Pedro Alves <pedro@codesourcery.com>
1805 * server.c (handle_query): Handle "qAttached".
1807 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
1809 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
1810 GPLv3, update license URL.
1812 2009-03-01 Doug Evans <dje@google.com>
1814 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
1815 (server_h): Add gdb_signals.h.
1816 (signals.o): Update.
1817 * server.h (target_signal_from_host,target_signal_to_host_p)
1818 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
1820 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
1822 * remote-utils.c (getpkt): Also generate remote-debug
1823 information if noack_mode is set.
1825 2009-02-06 Pedro Alves <pedro@codesourcery.com>
1827 * server.c (handle_query): Report qXfer:siginfo:read and
1828 qXfer:siginfo:write as supported and handle them.
1829 * target.h (struct target_ops) <qxfer_siginfo>: New field.
1830 * linux-low.c (linux_xfer_siginfo): New.
1831 (linux_target_ops): Set it.
1833 2009-01-26 Pedro Alves <pedro@codesourcery.com>
1835 * server.c (gdbserver_usage): Mention --remote-debug.
1836 (main): Accept '--remote-debug' switch.
1838 2009-01-18 Doug Evans <dje@google.com>
1840 * regcache.c (new_register_cache): No need to check result of xcalloc.
1841 * server.c (handle_search_memory): Back out calls to xmalloc,
1842 result is checked and error is returned to user upon failure.
1843 (handle_query): Ditto. Add more checks for result of malloc.
1844 (handle_v_cont): Check result of malloc, report error back to
1846 (handle_v_run): Ditto. Call freeargv.
1847 * server.h (freeargv): Declare.
1848 * utils.c (freeargv): New fn.
1850 2009-01-15 Doug Evans <dje@google.com>
1852 * gdbreplay.c (perror_with_name): Make arg const char *.
1853 * server.h (target_signal_to_name): Make return type const char *.
1854 * thread-db.c (thread_db_err_str): Make return type const char *.
1855 * utils.c (perror_with_name): Make arg const char *.
1857 2009-01-14 Pedro Alves <pedro@codesourcery.com>
1859 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
1860 when handling a EXIT_PROCESS_DEBUG_EVENT.
1862 2009-01-06 Joel Brobecker <brobecker@adacore.com>
1864 * gdbreplay.c (gdbreplay_version): Update copyright year.
1865 * server.c (gdbserver_version): Likewise.
1867 2009-01-05 Doug Evans <dje@google.com>
1869 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
1870 (handle_extended_wait): Improve comment.
1872 2008-12-13 Doug Evans <dje@google.com>
1874 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
1875 * server.h (ATTR_MALLOC): New macro.
1876 (xmalloc,xcalloc,xstrdup): Declare.
1877 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
1878 * inferiors.c: Ditto.
1879 * linux-low.c: Ditto.
1880 * mem-break.c: Ditto.
1881 * regcache.c: Ditto.
1882 * remote-utils.c: Ditto.
1885 * win32-low.c: Ditto.
1887 2008-12-12 Doug Evans <dje@google.com>
1889 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
1890 in debugging printf.
1892 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
1894 2008-12-09 Doug Evans <dje@google.com>
1896 * linux-low.h (struct process_info): Delete member tid, unused.
1897 * thread-db.c (find_one_thread): Update.
1898 (maybe_attach_thread): Update.
1900 2008-12-02 Pedro Alves <pedro@codesourcery.com>
1902 * target.h (struct target_ops): Add qxfer_osdata member.
1903 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
1905 (linux_qxfer_osdata): New functions.
1906 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
1908 * server.c (handle_query): Handle "qXfer:osdata:read:".
1909 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
1910 (buffer_xml_printf): New functions.
1911 * server.h (struct buffer): New.
1912 (buffer_grow_str, buffer_grow_str0): New macros.
1913 (buffer_grow, buffer_free, buffer_init, buffer_finish)
1914 (buffer_xml_printf): Declare.
1916 2008-11-24 Doug Evans <dje@google.com>
1918 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
1920 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
1922 * server.c (handle_v_run): Always use the supplied argument list.
1924 2008-11-19 Bob Wilson <bob.wilson@acm.org>
1926 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
1927 (xtensa_regmap_table): Add entry for scompare1.
1929 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
1931 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
1932 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
1933 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
1934 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
1935 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
1936 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
1937 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
1938 XML target descriptions.
1939 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
1940 when inferior is running on an ISA 2.05 or later processor. Add
1941 special case to return offset for full 64-bit slot of FPSCR when
1944 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
1946 * Makefile.in (SFILES, clean): Added sparc64 files.
1947 (reg-sparc64.o, reg-sparc64.c): New.
1948 * configure.srv (sparc*-*-linux*): New configuration.
1949 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
1950 syscall arguments for SPARC.
1951 (regsets_store_inferior_registers): Likewise.
1952 * linux-sparc-low.c: New file.
1954 2008-10-21 Doug Evans <dje@google.com>
1956 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
1957 (READLINE_DIR,READLINE_DEP): Delete.
1958 (INTERNAL_CFLAGS): Update.
1959 (LINTFLAGS): Update.
1961 2008-10-10 Pedro Alves <pedro@codesourcery.com>
1963 * server.c (handle_v_run): If GDB didn't specify an argv, use the
1964 whole argv from the last run, not just argv[0].
1966 2008-09-08 Pedro Alves <pedro@codesourcery.com>
1968 * regcache.c (new_register_cache): Return NULL if the register
1969 cache size isn't known yet.
1970 (free_register_cache): Avoid dereferencing a NULL regcache.
1972 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
1974 * configure.srv: Merge MIPS and MIPS64.
1976 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
1978 * Makefile.in (uninstall): Apply $(EXEEXT) too.
1980 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
1982 * Makefile.in: Add required vsx dependencies.
1984 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
1985 Declare init_registers_powerpc_vsx32l.
1986 Declare init_registers_powerpc_vsx64l.
1987 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
1988 (ppc_arch_setup): Check for VSX in hwcap.
1989 (ppc_fill_vsxregset): New function.
1990 (ppc_store_vsxregset): New function.
1991 Add new VSX entry in regset_info target_regsets.
1993 * configure.srv: Add new VSX dependencies.
1995 2008-08-12 Pedro Alves <pedro@codesourcery.com>
1997 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
1998 (remote_open): Set or clear transport_is_reliable.
1999 (putpkt_binary): Don't expect acks in noack mode.
2000 (getpkt): Don't send ack/nac in noack mode.
2001 * server.c (handle_general_set): Handle QStartNoAckMode.
2002 (handle_query): If connected by tcp pass QStartNoAckMode+ in
2004 (main): Reset noack_mode on every connection.
2005 * server.h (noack_mode): Declare.
2007 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009 * Makefile.in (GDBREPLAY_OBS): New variable.
2010 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
2012 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
2013 Daniel Jacobowitz <dan@codesourcery.com>
2015 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
2016 (usr_store_inferior_registers): Likewise.
2017 (regsets_store_inferior_registers): Likewise.
2019 2008-07-31 Rolf Jansen <rj@surtec.com>
2020 Pedro Alves <pedro@codesourcery.com>
2022 * configure.ac: Check for memmem declaration.
2023 * server.c [HAVE_MALLOC_H]: Include malloc.h.
2024 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
2025 (disable_packet_qfThreadInfo): Unconditionally compile.
2026 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
2027 * configure, config.in: Regenerate.
2029 2008-07-28 Doug Kwan <dougkwan@google.com>
2031 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
2032 (linux_write_memory): Remove declaration of errno.
2034 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
2036 * linux-low.c (handle_extended_wait): Do not use "status"
2037 variable uninitialized.
2039 2008-07-07 Pedro Alves <pedro@codesourcery.com>
2041 * server.c (handle_v_attach): Inhibit reporting dll changes.
2043 2008-06-27 Pedro Alves <pedro@codesourcery.com>
2045 * remote-utils.c (prepare_resume_reply): If requested, don't
2046 output "thread:TID" in the T stop reply.
2048 * server.c (disable_packet_vCont, disable_packet_Tthread)
2049 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
2050 (handle_query): If requested, disable support for qC, qfThreadInfo
2052 (handle_v_requests): If requested, disable support for vCont.
2053 (gdbserver_show_disableable): New.
2054 (main): Handle --disable-packet and --disable-packet=LIST.
2056 * server.h (disable_packet_vCont, disable_packet_Tthread)
2057 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
2059 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
2061 * server.c (gdbserver_usage): Mention --version.
2063 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
2065 * Makefile.in (gdbreplay.o): New rule.
2067 2008-06-06 Joseph Myers <joseph@codesourcery.com>
2069 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
2070 message, not gdbserver.
2072 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
2073 Nathan Sidwell <nathan@codesourcery.com>
2074 Joseph Myers <joseph@codesourcery.com>
2076 * acinclude.m4: Include ../../config/acx.m4.
2077 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2078 * configure, config.in: Regenerate.
2079 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
2080 * server.c (gdbserver_version): Print PKGVERSION.
2081 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
2082 (main): Adjust gdbserver_usage calls.
2083 * gdbreplay.c (version, host_name): Add declarations.
2084 (gdbreplay_version, gdbreplay_usage): New.
2085 (main): Accept --version and --help options.
2087 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
2089 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
2090 (arm_breakpoint_at): Handle Thumb.
2091 (the_low_target): Add comment.
2093 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
2095 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
2097 2008-05-09 Doug Evans <dje@google.com>
2099 * server.h (decode_search_memory_packet): Declare.
2100 * remote-utils.c (decode_search_memory_packet): New fn.
2101 * server.c (handle_search_memory_1): New fn.
2102 (handle_search_memory): New fn.
2103 (handle_query): Process qSearch:memory packets.
2105 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
2107 * regcache.c (registers_length): Remove.
2108 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
2109 full register packet.
2110 * regcache.h (registers_length): Remove prototype.
2111 * server.h (PBUFSIZ): Define to 16384.
2113 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
2115 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
2116 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
2117 powerpc-64l.o, and powerpc-altivec64l.o.
2118 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
2119 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
2120 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
2121 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
2122 rs6000/power-linux.xml, and rs6000/power64-linux.xml
2125 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
2126 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
2127 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
2128 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
2129 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
2130 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
2131 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
2132 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
2133 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
2134 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
2137 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
2138 (init_registers_powerpc_32l): ... this new prototype.
2139 (init_registers_powerpc_32): Remove, replace by ...
2140 (init_registers_powerpc_altivec32l): ... this new prototype.
2141 (init_registers_powerpc_e500): Remove, replace by ...
2142 (init_registers_powerpc_e500l): ... this new prototype.
2143 (init_registers_ppc64): Remove, replace by ...
2144 (init_registers_powerpc_64l): ... this new prototype.
2145 (init_registers_powerpc_64): Remove, replace by ...
2146 (init_registers_powerpc_altivec64l): ... this new prototype.
2147 (ppc_num_regs): Set to 73.
2148 (PT_ORIG_R3, PT_TRAP): Define if necessary.
2149 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
2150 (ppc_cannot_store_register): Handle orig_r3 and trap.
2151 (ppc_arch_setup): Update init_registers_... calls.
2152 (ppc_fill_gregset): Handle orig_r3 and trap.
2154 * inferiors.c (clear_inferiors): Reset current_inferior.
2156 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2158 * acinclude.m4: Add override.m4.
2159 * configure: Regenerate.
2161 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2163 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
2164 initial call to init_register_ppc64.
2166 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
2168 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
2169 powerpc*-*-linux* case.
2170 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
2172 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
2174 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
2175 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
2177 * linux-ppc-low.c: Include <elf.h>.
2178 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
2179 (ppc_hwcap): New global variable.
2180 (ppc_regmap): Remove __SPE__ #ifdef sections.
2181 (ppc_regmap_e500): New global variable.
2182 (ppc_cannot_store_register): Update __SPE__ special case.
2183 (ppc_get_hwcap): New function.
2184 (ppc_arch_setup): Use it to determine whether inferior supports
2185 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
2186 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
2187 Do not access registers if target does not support AltiVec.
2188 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
2189 Do not access registers if target does not support SPE.
2190 (target_regsets): Unconditionally include AltiVec and SPE regsets.
2192 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2194 * linux-low.c (disabled_regsets, num_regsets): New.
2195 (use_regsets_p): Delete.
2196 (linux_wait_for_process): Clear disabled_regsets.
2197 (regsets_fetch_inferior_registers): Check and set it.
2198 (regsets_store_inferior_registers): Likewise.
2199 (linux_fetch_registers, linux_store_registers): Do not use
2201 (initialize_low): Allocate disabled_regsets.
2203 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
2205 * Makefile.in (LIBOBJS): New.
2207 (memmem.o): New rule.
2208 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
2209 * configure: Regenerated.
2211 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
2213 * server.c (handle_query): Never return "unsupported" for
2214 qXfer:features:read queries.
2216 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
2218 * server.c (get_features_xml): Fix inverted condition.
2219 (handle_query): Always support qXfer:feature:read.
2221 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
2223 * server.c (wrapper_argv): New.
2224 (start_inferior): Handle wrapper_argv. If set, expect an extra
2226 (gdbserver_usage): Document --wrapper.
2227 (main): Parse --wrapper.
2229 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2231 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
2232 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
2233 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
2234 (ppc_set_pc): Likewise.
2235 (ppc_arch_setup): New function.
2236 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
2237 of collect_register.
2238 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
2240 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2242 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
2243 instead of linux-ppc64-low.o.
2244 * linux-ppc64-low.c: Remove file.
2245 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
2246 (linux-ppc64-low.o): Remove rule.
2248 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
2249 (init_registers_powerpc_64): Likewise.
2250 (ppc_regmap): Conditionally define depending on __powerpc64__.
2251 (ppc_cannot_store_register): Do not special-case "fpscr" when
2252 compiled on __powerpc64__.
2253 (ppc_collect_ptrace_register): New function.
2254 (ppc_supply_ptrace_register): New function.
2255 (ppc_breakpoint): Change type to "unsigned int".
2256 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
2257 (the_low_target): Conditionally provide initializers for the
2258 arch_setup member depending on __powerpc64__. Install
2259 collect_ptrace_register and supply_ptrace_register members.
2261 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
2263 * regcache.h (gdbserver_xmltarget): Add extern declaration.
2264 * server.c (gdbserver_xmltarget): Define.
2265 (get_features_xml): Use it to replace "target.xml" and arch_string.
2267 * configure.srv: Remove srv_xmltarget. Add XML files that were
2268 mentioned there to srv_xmlfiles instead. Remove conditional tests
2269 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
2270 srv_xmlfiles and srv_regobj to include all possible choices.
2271 * configure.ac (srv_xmltarget): Remove.
2272 (srv_xmlfiles): Do not add "target.xml".
2273 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
2274 checks for supplementary target information.
2275 * configure: Regenerate.
2276 * Makefile.in (XML_TARGET): Remove.
2277 (target.xml): Remove rule.
2278 (clean): Do not clean up target.xml.
2279 (.PRECIOUS): Do not mention target.xml.
2281 * target.h (struct target_ops): Remove arch_string member.
2282 * linux-low.c (linux_arch_string): Remove.
2283 (linux_target_ops): Remove arch_string initializer.
2284 * linux-low.h (struct linux_target_ops): Remove arch_string member.
2285 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
2286 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
2287 * spu-low.c (spu_arch_string): Remove.
2288 (spu_target_ops): Remove arch_string initializer.
2289 * win32-low.c (win32_arch_string): Remove.
2290 (win32_target_ops): Remove arch_string initializer.
2291 * win32-low.h (struct win32_target_ops): Remove arch_string member.
2292 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
2293 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
2295 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2297 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
2298 by collect_ptrace_register and supply_ptrace_register hooks.
2299 * linux-low.c (fetch_register): Use supply_ptrace_register callback
2300 instead of checking for the_low_target.left_pad_xfer.
2301 (usr_store_inferior_registers): Use collect_ptrace_register callback
2302 instead of checking for the_low_target.left_pad_xfer.
2304 * linux-s390-low.c (s390_collect_ptrace_register): New function.
2305 (s390_supply_ptrace_register): Likewise.
2306 (s390_fill_gregset): Call s390_collect_ptrace_register.
2307 (the_low_target): Update.
2309 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
2310 (ppc_supply_ptrace_register): Likewise.
2311 (the_low_target): Update.
2313 * linux-i386-low.c (the_low_target): Update.
2314 * linux-x86-64-low.c (the_low_target): Update.
2316 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2318 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
2319 reg-s390.o and reg-s390x.o.
2321 * linux-low.c (new_inferior): New global variable.
2322 (linux_create_inferior, linux_attach): Set it.
2323 (linux_wait_for_process): Call the_low_target.arch_setup after the
2324 target has stopped for the first time.
2325 (initialize_low): Do not call the_low_target.arch_setup.
2327 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
2328 (s390_set_pc): Likewise.
2329 (s390_arch_setup): New function.
2330 (the_low_target): Use s390_arch_setup as arch_setup routine.
2332 * regcache.c (realloc_register_cache): New function.
2333 (set_register_cache): Call it for each existing regcache.
2335 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
2337 * server.h (init_registers): Remove prototype.
2339 * linux-low.h (struct linux_target_ops): Add arch_setup field.
2340 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
2341 instead of init_registers ().
2342 * linux-arm-low.c (init_registers_arm): Add prototype.
2343 (init_registers_arm_with_iwmmxt): Likewise.
2344 (the_low_target): Add initializer for arch_setup field.
2345 * linux-cris-low.c (init_registers_cris): Add prototype.
2346 (the_low_target): Add initializer for arch_setup field.
2347 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
2348 (the_low_target): Add initializer for arch_setup field.
2349 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
2350 (the_low_target): Add initializer for arch_setup field.
2351 * linux-ia64-low.c (init_registers_ia64): Add prototype.
2352 (the_low_target): Add initializer for arch_setup field.
2353 * linux-m32r-low.c (init_registers_m32r): Add prototype.
2354 (the_low_target): Add initializer for arch_setup field.
2355 * linux-m68k-low.c (init_registers_m68k): Add prototype.
2356 (the_low_target): Add initializer for arch_setup field.
2357 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
2358 (init_registers_mips64_linux): Likewise.
2359 (the_low_target): Add initializer for arch_setup field.
2360 * linux-ppc-low.c (init_registers_ppc): Add prototype.
2361 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
2362 (the_low_target): Add initializer for arch_setup field.
2363 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
2364 (init_registers_powerpc_64): Likewise.
2365 (the_low_target): Add initializer for arch_setup field.
2366 * linux-s390-low.c (init_registers_s390): Add prototype.
2367 (init_registers_s390x): Likewise.
2368 (the_low_target): Add initializer for arch_setup field.
2369 * linux-sh-low.c (init_registers_sh): Add prototype.
2370 (the_low_target): Add initializer for arch_setup field.
2371 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
2372 (the_low_target): Add initializer for arch_setup field.
2373 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
2374 (the_low_target): Add initializer for arch_setup field.
2376 * win32-low.h (struct win32_target_ops): Add arch_setup field.
2377 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
2378 instead of init_registers ().
2379 * win32-arm-low.c (init_registers_arm): Add prototype.
2380 (the_low_target): Add initializer for arch_setup field.
2381 * win32-i386-low.c (init_registers_i386): Add prototype.
2382 (the_low_target): Add initializer for arch_setup field.
2384 * spu-low.c (init_registers_spu): Add prototype.
2385 (initialize_low): Call initialie_registers_spu () instead of
2386 initialize_registers ().
2388 2008-02-19 Pedro Alves <pedro@codesourcery.com>
2390 * server.c (handle_v_requests): When handling the vRun and vAttach
2391 packets, if already debugging a process, don't kill it. Return an
2394 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
2396 * server.c (handle_query): Correct length check.
2398 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
2400 * win32-low.c (do_initial_child_stuff): Add process handle
2401 parameter. Set current_process_handle and current_process_id from the
2402 parameters. Clear globals.
2403 (win32_create_inferior): Don't set current_process_handle and
2404 current_process_id here. Instead pass them on the call to
2405 do_initial_child_stuff.
2406 (win32_attach): Likewise.
2407 (win32_clear_inferiors): New.
2408 (win32_kill): Don't close the current process handle or the
2409 current thread handle here. Instead call win32_clear_inferiors.
2410 (win32_detach): Don't open a new handle to the process. Call
2411 win32_clear_inferiors.
2412 (win32_join): Don't rely on current_process_handle; open a new
2413 handle using the process id.
2414 (win32_wait): Call win32_clear_inferiors when the inferior process
2417 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
2419 * server.c (monitor_show_help): Add "exit".
2421 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
2423 * Makefile.in (SFILES): Add linux-xtensa-low.c.
2424 (clean): Add reg-xtensa.c.
2425 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
2426 * configure.srv (xtensa*-*-linux*) New target.
2427 * linux-xtensa-low.c: New.
2428 * xtensa-xtregs.c: New.
2430 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
2432 * hostio.c: Don't include errno.h.
2433 (errno_to_fileio_errno): Move to hostio-errno.
2434 * hostio.c: (hostio_error): Remove the error parameter. Defer the
2435 error number outputting to the target->hostio_last_error callback.
2436 (hostio_packet_error): Use FILEIO_EINVAL directly.
2437 (handle_open, handle_pread, hostio_error, handle_unlink): Update
2438 calls to hostio_error.
2439 * hostio-errno.c: New.
2440 * server.h (hostio_last_error_from_errno): Declare.
2441 * target.h (target_ops): Add hostio_last_error member.
2442 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
2443 as hostio_last_error handler.
2444 * spu-low.c (spu_target_ops): Likewise.
2445 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
2446 (wince_hostio_last_error): New functions.
2447 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
2448 as hostio_last_error handler.
2449 (win32_target_ops) [!_WIN32_WCE]: Register
2450 hostio_last_error_from_errno as hostio_last_error handler.
2451 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
2452 (hostio-errno.o): New rule.
2453 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
2454 * configure.srv (srv_hostio_err_objs): New variable. Default to
2456 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
2457 * configure: Regenerate.
2459 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2461 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
2462 (linux_kill, linux_detach): Clean up the process list.
2463 * remote-utils.c (remote_open): Improve port number parsing.
2464 (putpkt_binary, input_interrupt): Only send interrupts if the target
2466 * server.c (extended_protocol): Make static.
2467 (attached): Define earlier.
2468 (exit_requested, response_needed, program_argv): New variables.
2469 (target_running): New.
2470 (start_inferior): Clear attached here.
2471 (attach_inferior): Set attached here.
2472 (require_running): Define.
2473 (handle_query): Use require_running and target_running. Implement
2475 (handle_v_attach, handle_v_run): New.
2476 (handle_v_requests): Use require_running. Handle vAttach and vRun.
2477 (gdbserver_usage): Update.
2478 (main): Redo argument parsing. Handle --debug and --multi. Handle
2479 --attach along with other options or after the port. Save
2480 program_argv. Support no initial program. Resynchronize
2481 communication with GDB after an error. Handle "monitor exit".
2482 Use require_running and target_running. Always allow the extended
2483 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
2484 restart in extended mode.
2485 * README: Refer to the GDB manual. Update --attach usage.
2487 2007-12-20 Andreas Schwab <schwab@suse.de>
2489 * linux-low.c (STACK_SIZE): Define.
2490 (linux_tracefork_child): Use it. Use __clone2 on ia64.
2491 (linux_test_for_tracefork): Likewise.
2493 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
2495 * linux-low.c (linux_wait_for_event): Update messages. Do not
2496 reinsert auto-delete breakpoints.
2497 * mem-break.c (struct breakpoint): Change return type of handler to
2499 (set_breakpoint_at): Update handler type.
2500 (reinsert_breakpoint_handler): Return 1 instead of calling
2502 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
2504 (check_breakpoints): Delete auto-delete breakpoints and return 2.
2505 * mem-break.h (set_breakpoint_at): Update handler type.
2506 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
2507 * win32-low.c (auto_delete_breakpoint): New.
2508 (get_child_debug_event): Use it.
2510 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
2512 * configure.ac: Check for pread and pwrite.
2513 * hostio.c (handle_pread): Fall back to lseek and read.
2514 (handle_pwrite): Fall back to lseek and write.
2515 * config.in, configure: Regenerated.
2517 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
2519 * server.c (myresume): Add own_buf argument.
2520 (main): Update calls.
2522 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
2524 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
2525 * remote-utils.c (remote_open): Do not call disable_async_io.
2526 (block_async_io): Delete.
2527 (unblock_async_io): Make static.
2528 (initialize_async_io): New.
2529 * server.c (handle_v_cont): Handle async I/O here.
2530 (myresume): Likewise. Move other common resume tasks here...
2531 (main): ... from here. Call initialize_async_io. Disable async
2532 I/O before the main loop.
2533 * server.h (initialize_async_io): Declare.
2534 (block_async_io, unblock_async_io): Delete prototypes.
2535 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
2537 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
2539 * remote-utils.c (readchar): Allow binary data in received messages.
2541 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2543 * win32-low.c (attaching): New global.
2544 (win32_create_inferior): Clear the `attaching' global.
2545 (win32_attach): Set the `attaching' global.
2546 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
2547 attaching. Only set a breakpoint at the entry point if not
2550 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2552 * server.c (main): Don't report dll events on the initial
2553 connection on attaches.
2555 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2557 * server.c (main): Relax numerical bases supported for the pid of
2558 the --attach command line argument.
2560 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2562 * win32-low.c (win32_attach): Call OpenProcess before
2563 DebugActiveProcess, not after. Add last error output to error
2566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
2568 * win32-low.c (win32_get_thread_context)
2569 (win32_set_thread_context): New functions.
2570 (thread_rec): Use win32_get_thread_context.
2571 (continue_one_thread, win32_resume): Use win32_set_thread_context.
2572 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
2575 2007-12-03 Leo Zayas
2576 Pedro Alves <pedro_alves@portugalmail.pt>
2578 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
2580 (child_add_thread): Minor cleanup.
2581 (child_continue): Resume artificially suspended threads before
2582 calling ContinueDebugEvent.
2583 (suspend_one_thread): New.
2584 (fake_breakpoint_event): New.
2585 (get_child_debug_event): Change return type to int. Check here if
2586 gdb sent an interrupt request. If a soft interrupt was requested,
2587 fake a breakpoint event. Return 0 if there is no event to handle,
2589 (win32_wait): Don't check here if gdb sent an interrupt request.
2590 Ensure there is a valid event to handle.
2591 (win32_request_interrupt): Add soft interruption method as last
2594 2007-12-03 Leo Zayas
2595 Pedro Alves <pedro_alves@portugalmail.pt>
2597 * win32-low.h (win32_thread_info): Add descriptions to the
2598 structure members. Replace `suspend_count' counter by a
2600 * win32-low.c (thread_rec): Update condition of when to get the
2601 context from the inferior. Rely on ContextFlags being set if it
2602 has already been retrieved. Only suspend the inferior thread if
2603 we haven't already. Warn if that fails.
2604 (continue_one_thread): s/suspend_count/suspended/. Only call
2605 ResumeThread once. Warn if that fails.
2607 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2609 * win32-low.c (win32_wait): Don't read from the inferior when it
2612 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
2614 * Makefile.in (win32_low_h): New variable.
2615 (win32-low.o): Add dependency on $(win32_low_h).
2616 (win32-arm-low.o, win32-i386-low.o): New rules.
2618 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2620 * hostio.c: Correct copyright year.
2622 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
2624 * Makefile.in (OBS): Add hostio.o.
2625 (hostio.o): New rule.
2626 * server.h (handle_vFile): Declare.
2627 * hostio.c: New file.
2628 * server.c (handle_v_requests): Take packet_len and new_packet_len
2629 for binary packets. Call handle_vFile.
2630 (main): Update call to handle_v_requests.
2632 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
2634 * linux-low.c: Include <sched.h>.
2636 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
2638 * linux-low.c (linux_tracefork_grandchild): New.
2639 (linux_tracefork_child): Use clone.
2640 (linux_test_for_tracefork): Use clone; allocate and free a stack.
2642 2007-10-31 Joel Brobecker <brobecker@adacore.com>
2644 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
2646 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
2648 * linux-low.c (handle_extended_wait): Handle unexpected signals.
2650 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
2652 * inferiors.c (change_inferior_id): Delete.
2653 (add_pid_to_list, pull_pid_from_list): New.
2654 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
2655 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
2656 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
2657 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
2658 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
2659 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
2660 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
2661 (using_threads): Always set to 1.
2662 (handle_extended_wait): New.
2663 (add_process): Do not set TID.
2664 (linux_create_inferior): Set must_set_ptrace_flags.
2665 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
2666 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
2667 (linux_thread_alive): Rename TID argument to LWPID.
2668 (linux_wait_for_process): Handle unknown processes. Do not use TID.
2669 (linux_wait_for_event): Do not use TID or check using_threads. Update
2670 call to dead_thread_notify. Call handle_extended_wait.
2671 (linux_create_inferior): Use PTRACE_SETOPTIONS.
2672 (send_sigstop): Delete sigstop_sent.
2673 (wait_for_sigstop): Avoid TID.
2674 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
2675 (linux_test_for_tracefork): New.
2676 (linux_lookup_signals): Use thread_db_active and
2677 linux_supports_tracefork_flag.
2678 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
2679 * linux-low.h (get_process_thread): Avoid TID.
2680 (struct process_ifo): Move thread_known and tid to the end. Remove
2682 (linux_attach_lwp, thread_db_init): Update prototypes.
2683 * server.h (change_inferior_id): Delete prototype.
2684 (add_pid_to_list, pull_pid_from_list): New prototypes.
2685 * thread-db.c (thread_db_use_events): New.
2686 (find_first_thread): Rename to...
2687 (find_one_thread): ...this. Update callers and messages. Do not
2688 call fatal. Check thread_db_use_events. Do not call
2689 change_inferior_id or new_thread_notify.
2690 (maybe_attach_thread): Update. Do not call new_thread_notify.
2691 (thread_db_init): Set thread_db_use_events. Check use_events.
2692 * utils.c (fatal, warning): Correct message prefix.
2694 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
2696 * Makefile.in (clean): Remove new files.
2697 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
2698 (powerpc-64.o, powerpc-64.c): New rules.
2699 * configure.srv: Use alternate register sets for powerpc64-*-linux*
2700 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
2702 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
2704 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
2705 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
2706 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
2707 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
2708 (target_regsets): Add AltiVec and SPE register sets.
2709 * configure.ac: Check for AltiVec and SPE.
2710 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
2711 (ppc_fill_vrregset, ppc_store_vrregset): New.
2712 (target_regsets): Add AltiVec register set.
2713 * configure: Regenerated.
2715 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
2717 * linux-low.c (O_LARGEFILE): Define.
2718 (linux_read_memory): Use /proc/PID/mem.
2719 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
2720 * configure, config.in: Regenerated.
2722 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
2724 * linux-low.c (linux_wait_for_event): Do not pass signals while
2727 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2729 * win32-low.c (create_process): New.
2730 (win32_create_inferior): Use create_process instead of
2731 CreateProcess. If create_process failed retry appending an ".exe"
2732 suffix. Store the GetLastError result immediatelly after
2733 create_process calls and use it on the call to error.
2735 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
2737 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
2739 2007-08-23 Joel Brobecker <brobecker@adacore.com>
2741 * configure.ac: Switch license to GPLv3.
2743 2007-08-01 Michael Snyder <msnyder@access-company.com>
2745 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
2747 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
2749 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
2751 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
2752 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
2753 CloseToolhelp32Snapshot.
2754 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
2755 CloseToolhelp32Snapshot.
2757 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
2759 * server.c (main): Check for inferior exit before main loop.
2761 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
2763 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
2764 instead of on tmp_desc.
2766 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
2767 Daniel Jacobowitz <dan@codesourcery.com>
2769 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
2770 (add_thread): Minor cleanups.
2771 (clear_inferiors): Move lower in the file. Clear the DLL
2773 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
2774 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
2775 (xml_escape_text): New.
2776 * server.c (handle_query): Handle qXfer:libraries:read. Report it
2778 (handle_v_cont): Report errors.
2779 (gdbserver_version): Update.
2780 (main): Correct size of own_buf. Do not report initial DLL events.
2781 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
2782 (unloaded_dll, xml_escape_text): New.
2783 * win32-low.c (enum target_waitkind): Update comments.
2784 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
2785 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
2786 (win32_EnumProcessModules, win32_GetModuleInformation)
2787 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
2788 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
2789 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
2790 (win32_Module32First, win32_Module32Next, load_toolhelp)
2791 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
2792 (get_child_debug_event): Handle DLL events.
2793 (win32_wait): Likewise.
2795 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
2797 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
2798 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
2800 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2802 * win32-low.c (handle_output_debug_string): Ignore event if not
2805 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
2807 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
2809 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
2811 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
2813 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
2815 * inferiors.c (change_inferior_id): Add comment.
2816 * linux-low.c (check_removed_breakpoint): Add an early
2817 prototype. Improve debug output.
2818 (linux_attach): Doc update.
2819 (linux_detach_one_process, linux_detach): Clean up before releasing
2821 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
2822 * linux-low.h (struct process_info): Doc improvement.
2823 * mem-break.c (delete_all_breakpoints): New.
2824 * mem-break.h (delete_all_breakpoints): New prototype.
2825 * thread-db.c (find_first_thread): New.
2826 (thread_db_create_event): Call it instead of
2827 thread_db_find_new_threads. Clean up unused variables.
2828 (maybe_attach_thread): Remove first thread handling.
2829 (thread_db_find_new_threads): Use find_first_thread.
2830 (thread_db_get_tls_address): Likewise.
2832 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2834 * thread-db.c (thread_db_find_new_threads): Add prototype.
2835 (thread_db_create_event): Check for the main thread before adding
2837 (maybe_attach_thread): Only enable event reporting if TID == 0.
2838 (thread_db_get_tls_address): Check for new threads.
2840 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
2842 * linux-low.c (linux_create_inferior): Try execv before execvp.
2843 * spu-low.c (spu_create_inferior): Likewise.
2845 2007-06-13 Mike Frysinger <vapier@gentoo.org>
2847 * linux-low.c (linux_create_inferior): Change execv to execvp.
2848 * spu-low.c (spu_create_inferior): Likewies.
2850 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
2852 * Makefile.in (clean): Clean new files instead of deleted ones.
2853 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
2854 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
2856 * configure.srv: Specify XML files and new regformats for MIPS and
2858 * linux-mips-low.c (mips_num_regs): Set to only used registers.
2859 (mips_regmap): Do not fetch $0. Remove unused registers. Add
2860 an entry for the restart register.
2861 (mips_cannot_fetch_register, mips_cannot_store_register)
2862 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
2863 register names to match the XML descriptions.
2864 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
2865 restart register instead of $0.
2867 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2868 Markus Deuling <deuling@de.ibm.com>
2870 * remote-utils.c (decode_xfer_write): New function.
2871 * server.h (decode_xfer_write): Add prototype.
2872 * server.c (handle_query): Add PACKET_LEN argument. Support
2873 qXfer:spu:read and qXfer:spu:write packets.
2874 (main): Pass packet_len to handle_query.
2875 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
2876 * target.h (target_ops): Add qxfer_spu.
2878 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
2880 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
2881 accessing non-seekable spufs files.
2883 2007-05-16 Markus Deuling <deuling@de.ibm.com>
2885 * server.c (handle_query): Add reply for qC packet.
2887 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2888 Leo Zayas <lerele@champenstudios@com>
2890 * server.h (check_remote_input_interrupt_request): New function.
2891 * remote_utils.c (INVALID_DESCRIPTOR): New define.
2892 (remote_desc): Initialize with INVALID_DESCRIPTOR.
2893 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
2894 (check_remote_input_interrupt_request): New function.
2895 * server.h (check_remote_input_interrupt_request): Declare.
2896 * win32-low.c (winapi_DebugBreakProcess,
2897 winapi_GenerateConsoleCtrlEvent): New typedefs.
2898 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
2900 (win32_wait): Check for remote interrupt request
2901 with check_remote_input_interrupt_request.
2902 (win32_request_interrupt): New function.
2903 (win32_target_op): Set request_interrupt to win32_request_interrupt.
2905 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2907 * win32-low.c (debug_registers_changed,
2908 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
2909 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
2910 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
2911 (thread_rec): Get context using the low target.
2912 (child_add_thread): Call thread_added on the low target,
2913 which does the same thing.
2915 (do_initial_child_stuff): Remove debug registers references.
2916 Set context using the low target. Resume threads after
2917 setting the contexts.
2918 (child_continue): Remove dead variable. Remove debug
2919 registers references.
2920 (child_fetch_inferior_registers): Go through the low target.
2921 (do_child_store_inferior_registers): Remove.
2922 (child_store_inferior_registers): Go through the low target.
2923 (win32_resume): Remove debug registers references.
2924 Set context using the low target.
2925 (handle_exception): Change return type to void. Don't record
2926 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
2927 first chance exception.
2928 (get_child_debug_event): Change return type to void. Remove
2929 goto loop. Always return after waiting for debug event.
2930 (win32_wait): Convert to switch statement. Handle spurious
2933 * win32-i386-low.c (debug_registers_changed,
2934 debug_registers_used): New.
2935 (initial_stuff): Rename to ...
2936 (i386_initial_stuff): ... this. Clear debug registers
2938 (store_debug_registers): Delete.
2939 (i386_get_thread_context): New.
2940 (load_debug_registers): Delete.
2941 (i386_set_thread_context): New.
2942 (i386_thread_added): New.
2943 (single_step): Rename to ...
2944 (i386_single_step): ... this.
2945 (do_fetch_inferior_registers): Rename to ...
2946 (i386_fetch_inferior_register): ... this.
2947 (i386_store_inferior_register): New.
2948 (the_low_target): Adapt to new interface.
2950 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
2951 (arm_get_thread_context): New.
2952 (arm_set_thread_context): New.
2954 (do_fetch_inferior_registers): Rename to ...
2955 (arm_fetch_inferior_register): ... this.
2956 (arm_store_inferior_register): New.
2957 (arm_wince_breakpoint): Reimplement as unsigned long.
2958 (arm_wince_breakpoint_len): Define.
2959 (the_low_target): Adapt to new interface.
2961 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
2962 load_debug_registers. Add get_thread_context, set_thread_context,
2963 thread_added and store_inferior_register. Rename
2964 fetch_inferior_registers to fetch_inferior_register.
2965 (regptr): Remove declaration.
2967 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2969 * linux-low.c (linux_detach): Change return type to int. Return 0.
2970 * spu-low.c (spu_detach): Likewise.
2972 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2974 * target.h (target_ops): Change return type of detach to int.
2976 (join_inferior): New.
2977 * server.c (main): Don't skip detach support on mingw32.
2978 If the inferior doesn't support detaching return error.
2979 Call join_inferior instead of using waitpid.
2980 * linux-low.c (linux_join): New.
2981 (linux_target_op): Add linux_join.
2982 * spu-low.c (spu_join): New.
2983 (spu_target_ops): Add spu_join.
2984 * win32-low.c (win32_detach): Adapt to new interface.
2985 Reopen current_process_handle before detaching. Issue a child
2986 resume before detaching.
2988 (win32_target_op): Add win32_join.
2990 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2992 * win32-low.c (win32-attach): Fix return value.
2993 * target.h (target_ops): Describe ATTACH return values.
2995 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
2997 * win32-low.c (GETPROCADDRESS): Define.
2998 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
2999 (winapi_DebugSetProcessKillOnExit): Likewise.
3000 (win32_create_inferior): Force usage of ansi CreateProcessA.
3001 (win32_attach): Use GETPROCADDRESS.
3002 (win32_detach): Likewise.
3004 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
3006 * win32-low.c (win32_wait): Don't use WSTOPSIG.
3008 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
3010 * win32-low.c: Commit leftover changes from 2007-03-29.
3012 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3014 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
3015 fields short instead of int. Add explicit padding.
3016 (i387_cache_to_fsave): Remove unnecessary casts.
3017 (i387_fsave_to_cache): Doc fix.
3018 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
3020 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
3022 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
3023 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
3025 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3027 * configure.srv (arm*-*-mingw32ce*): Move near the other
3030 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
3032 * configure.ac: Add errno checking.
3033 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
3034 sys/file.h and malloc.h.
3035 (AC_CHECK_DECLS): Add perror.
3036 (srv_mingwce): Handle.
3037 * configure.srv (i[34567]86-*-cygwin*): Add
3038 win32-i386-low.o to srv_tgtobj.
3039 (i[34567]86-*-mingw*): Likewise.
3040 (arm*-*-mingw32ce*): Add case.
3041 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3042 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
3043 [__MINGW32CE__] (strerror): New function.
3044 [__MINGW32CE__] (errno): Define to GetLastError.
3045 [__MINGW32CE__] (COUNTOF): New macro.
3046 (remote_open): Remove extra close call.
3047 * mem-break.c (delete_breakpoint_at): New function.
3048 * mem-break.h (delete_breakpoint_at): Declare.
3049 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
3050 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
3051 [USE_WIN32API] (read, write): Add char* casts.
3052 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
3053 * server.h: Include wincecompat.h on Windows CE.
3054 [HAVE_ERRNO_H]: Check.
3055 (perror): Declare if not declared.
3056 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
3057 (perror_with_name): Remove errno declaration.
3058 * wincecompat.h: New.
3059 * wincecompat.c: New.
3061 * win32-arm-low.c: New.
3062 * win32-i386-low.c: New.
3063 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
3064 (OUTMSG2): Make it safe.
3066 (COUNTOF): New macro.
3067 (NUM_REGS): Get it from the low target.
3068 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
3069 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
3070 (thread_rec): Let low target handle debug registers.
3071 (child_add_thread): Likewise.
3072 (child_init_thread_list): Likewise.
3073 (continue_one_thread): Likewise.
3075 (do_child_fetch_inferior_registers): Move to ...
3076 * win32-i386-low.c: ... here, and rename to ...
3077 (do_fetch_inferior_registers): ... this.
3078 * win32-low.c (child_fetch_inferior_registers):
3079 Go through the low target.
3080 (do_child_store_inferior_registers): Use regptr.
3081 (strwinerror): New function.
3082 (win32_create_inferior): Handle Windows CE.
3083 Use strwinerror instead of strerror on Windows error
3084 codes. Add program to the error output.
3085 Don't close the main thread handle on Windows CE.
3086 (win32_attach): Use coredll.dll on Windows CE.
3087 (win32_kill): Close current process and current
3089 (win32_detach): Use coredll.dll on Windows CE.
3090 (win32_resume): Let low target handle debug registers, and
3092 (handle_exception): Add/Remove initial breakpoint. Avoid
3093 non-existant WSTOPSIG on Windows CE.
3094 (win32_read_inferior_memory): Cast to remove warning.
3095 (win32_arch_string): Go through the low target.
3096 (initialize_low): Call set_breakpoint_data with the low
3097 target's breakpoint.
3098 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
3099 FOP_REGNUM, mappings): Move to ...
3100 * win32-i386-low.c: ... here.
3101 * win32-low.c (win32_thread_info): Move to ...
3102 * win32-low.h: ... here.
3103 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
3104 win32-arm-low.c and wincecompat.c.
3105 (all:): Add $EXEEXT.
3106 (install-only:): Likewise.
3107 (gdbserver:): Likewise.
3108 (gdbreplay:): Likewise.
3109 * config.in: Regenerate.
3110 * configure: Regenerate.
3112 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3114 * win32-low.c: Rename typedef thread_info to
3115 win32_thread_info throughout.
3117 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
3119 * win32-i386-low.c: Rename to ...
3120 * win32-low.c: ... this.
3121 * configure.srv: Replace win32-i386-low.o with win32-low.o.
3122 * Makefile.in: Likewise.
3124 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
3126 * remote-utils.c (monitor_output): Constify msg parameter.
3127 * server.h (monitor_output): Likewise.
3128 * win32-i386-low.c (handle_output_debug_string): New.
3129 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
3130 handle_output_debug_string.
3131 (get_child_debug_event): Likewise.
3133 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
3135 * server.c (main): Correct strtoul check.
3137 2007-03-27 Jon Ringle <jon@ringle.org>
3139 * linux-low.c: Check __ARCH_HAS_MMU__ also.
3141 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
3143 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
3145 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3147 * terminal.h: Check HAVE_SGTTY_H.
3149 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
3151 * remote-utils.c (remote_open): Print out the assigned port number.
3153 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
3155 * remote-utils.c (monitor_output): New function.
3156 * server.c (debug_threads): Define here.
3157 (monitor_show_help): New function.
3158 (handle_query): Handle qRcmd.
3159 (main): Do not handle 'd' packet.
3160 * server.h (debug_threads, remote_debug, monitor_output): Declare.
3161 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
3164 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3166 * Makefile.in (EXEEXT): New.
3167 (clean): Use $(EXEEXT).
3169 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3171 * target.h (target_ops): Rename send_signal to request_interrupt,
3172 and remove enum target_signal parameter.
3173 * linux-low.c (linux_request_interrupt): Rename from
3174 linux_send_signal, and always send SIGINT.
3175 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
3176 and always send SIGINT.
3177 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
3179 (input_interrupt): Likewise.
3181 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
3183 * server.c (get_features_xml): Check if target implemented
3185 * win32-i386-low.c (win32_arch_string): New.
3186 (win32_target_ops): Add win32_arch_string as arch_string member.
3188 2007-02-22 Markus Deuling <deuling@de.ibm.com>
3190 * spu-low.c (spu_arch_string): New.
3191 (spu_target_ops): Add spu_arch_string.
3193 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
3195 * remote-utils.c: Remove HAVE_TERMINAL_H check.
3196 * configure.ac: Do not check for terminal.h.
3197 * configure, config.in: Regenerated.
3199 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3201 * Makefile.in (OBS): Add $(XML_BUILTIN).
3202 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
3204 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
3205 (arm-with-iwmmxt.c): New.
3206 * config.in, configure: Regenerate.
3207 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
3208 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
3209 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
3210 (arm*-*-linux*): Add iWMMXt and regset support.
3211 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
3212 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
3213 (arm_store_wmmxregset, target_regsets): New.
3214 * server.c (get_features_xml): Take annex argument. Check builtin
3216 (handle_query): Handle multiple annexes.
3218 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3220 * remote-utils.c [USE_WIN32API] (read, write): Define.
3221 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
3224 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
3226 * linux-i386-low.c (the_low_target): Set arch_string.
3227 * linux-x86-64-low.c (the_low_target): Likewise.
3228 * linux-low.c (linux_arch_string): New.
3229 (linux_target_ops): Add it.
3230 * linux-low.h (struct linux_target_ops): Add arch_string.
3231 * server.c (write_qxfer_response): Use const void * for DATA.
3232 (get_features_xml): New.
3233 (handle_query): Handle qXfer:features:read. Report it for qSupported.
3234 * target.h (struct target_ops): Add arch_string method.
3236 2007-01-03 Denis Pilat <denis.pilat@st.com>
3237 Daniel Jacobowitz <dan@codesourcery.com>
3239 * linux-low.c (linux_kill): Handle being called with no threads.
3240 * win32-i386-low.c (win32_kill): Likewise.
3241 (get_child_debug_event): Clear current_process_handle.
3243 2006-12-30 Denis PILAT <denis.pilat@st.com>
3244 Daniel Jacobowitz <dan@codesourcery.com>
3246 * remote-utils.c (remote_open): Check the type of specified
3247 serial port devices before opening them.
3248 * server.c (main): Kill the inferior if an error occurs during
3249 the first remote_open.
3251 2006-12-05 Markus Deuling <deuling@de.ibm.com>
3253 * README: Update supported targets.
3255 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
3257 * Makefile.in (clean): Remove reg-mips64.c.
3258 (reg-mips64.c, reg-mips64.o): New rules.
3259 * configure.srv: Handle mips64. Include regset support for mips.
3260 * linux-mips-low.c (union mips_register): New.
3261 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
3262 (mips_breakpoint, mips_breakpoint_at): Use int.
3263 (mips_collect_register, mips_supply_register)
3264 (mips_collect_register_32bit, mips_supply_register_32bit)
3265 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
3266 (mips_store_fpregset, target_regsets): New.
3267 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
3269 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
3271 * configure.srv: Add target "spu*-*-*".
3272 * Makefile.in (clean): Remove reg-spu.c.
3273 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
3274 * spu-low.c: New file.
3276 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3278 * configure.ac: Correct td_thr_tls_get_addr test.
3279 * configure: Regenerated.
3281 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
3283 * linux-low.c (linux_wait_for_event): Reformat. Use the
3285 * remote-utils.c (decode_address_to_semicolon): New.
3286 * server.c (pass_signals, handle_general_set): New.
3287 (handle_query): Mention QPassSignals for qSupported.
3288 (main): Call handle_general_set.
3289 * server.h (pass_signals, decode_address_to_semicolon): New.
3291 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
3293 * server.c (handle_query): Correct error handling for read_auxv.
3295 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
3297 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
3298 and srv_linux_thread_db to yes.
3299 * linux-s390-low.c (s390_fill_gregset): New function.
3300 (target_regsets): Define data structure.
3302 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
3304 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
3305 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
3306 * config.in, configure: Regenerated.
3307 * inferiors.c (gdb_id_to_thread): New function.
3308 (gdb_id_to_thread_id): Use it.
3309 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
3310 * linux-low.h (struct process_info): Add th member.
3311 (thread_db_get_tls_address): New prototype.
3312 * remote-utils.c (decode_address): Make non-static.
3313 * server.c (handle_query): Handle qGetTLSAddr.
3314 * server.h (gdb_id_to_thread, decode_address): New prototypes.
3315 * target.h (struct target_ops): Add get_tls_address.
3316 * thread-db.c (maybe_attach_thread): Save the thread handle.
3317 (thread_db_get_tls_address): New.
3319 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
3321 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
3322 (linux_resume_one_process): Take a siginfo_t *. Update all
3323 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
3324 (struct pending_signals): Add a siginfo_t.
3325 (linux_wait_for_process): Always set last_status.
3326 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
3327 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
3328 * linux-low.h (struct process_info): Add last_status.
3330 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
3332 * remote-utils.c (try_rle): New function.
3333 (putpkt_binary): Use it.
3335 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
3337 * Makefile.in (clean): Clean reg-x86-64-linux.c.
3338 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
3339 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
3340 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
3341 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
3344 2006-08-08 Richard Sandiford <richard@codesourcery.com>
3346 * server.c (terminal_fd): New variable.
3347 (old_foreground_pgrp): Likewise.
3348 (restore_old_foreground_pgrp): New function.
3349 (start_inferior): Record the terminal file descriptor in terminal_fd
3350 and its original foreground group in old_foreground_pgrp. Register
3351 restore_old_foreground_pgrp with atexit().
3353 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
3355 * server.c (handle_query): Correct qPart to qXfer.
3357 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
3359 * configure.ac: Check for more headers which are missing on
3360 Windows. Automatically supply -lwsock32 and USE_WIN32API.
3361 * configure.srv: Add Cygwin and mingw32.
3362 * remote-utils.c: Don't include headers unconditionally which
3363 are missing on mingw32. Include <winsock.h> for mingw32.
3364 (remote_open): Adjust for mingw32 support. Flush
3365 standard error after writing to it.
3366 (remote_close, putpkt_binary, input_interrupt, block_async_io)
3367 (unblock_async_io, enable_async_io, disable_async_io)
3368 (readchar, getpkt): Update for Winsock support.
3369 (prepare_resume_reply): Expect a protocol signal number.
3370 * server.c: Disable <sys/wait.h> on mingw32.
3371 (start_inferior): Adjust for mingw32 support. Flush
3372 standard error after writing to it.
3373 (attach_inferior): Likewise. Use protocol signal
3375 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
3377 * win32-i386-low.c: New file.
3378 * Makefile.in (XM_CLIBS): Set.
3379 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
3380 (win32-i386-low.o): New dependency rule.
3381 * linux-low.c (linux_wait): Use target signal numbers.
3382 * target.h (struct target_ops): Doc fix.
3383 * server.h (target_signal_to_name): New prototype.
3384 * gdbreplay.c: Don't include headers unconditionally which
3385 are missing on mingw32. Include <winsock.h> for mingw32.
3386 (remote_close, remote_open): Adjust for Winsock support.
3387 * configure, config.in: Regenerated.
3389 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
3391 * server.c (decode_xfer_read, write_qxfer_response): New.
3392 (handle_query): Take a packet length argument. Handle
3393 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
3394 the qSupported response.
3395 (main): Update call to handle_query.
3397 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
3399 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
3400 (putpkt_binary): Renamed from putpkt and adjusted for binary
3402 (putpkt): New wrapper for putpkt_binary.
3403 (readchar): Don't mask off the high bit.
3404 (decode_X_packet): New function.
3405 * server.c (main): Call putpkt_binary if a handler sets the packet
3406 length. Save the length of the incoming packet. Handle 'X'.
3407 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
3409 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
3411 * server.c (handle_query): Handle qSupported.
3413 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3415 * remote-utils.c (all_symbols_looked_up): New variable.
3416 (look_up_one_symbol): Check it.
3417 * server.h (look_up_one_symbol): New declaration.
3418 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
3420 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
3422 * Makefile.in (linux-arm-low.o): Update dependencies.
3423 * linux-arm-low.c: Include "gdb_proc_service.h".
3424 (PTRACE_GET_THREAD_AREA): Define.
3425 (ps_get_thread_area): New function.
3427 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
3429 * configure.srv (m68k*-*-uclinux*): New target.
3430 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
3431 (linux_resume_one_process): Remove extraneous cast.
3432 (linux_read_offsets): New.
3433 (linux_target_op): Add linux_read_offsets on mmuless systems.
3434 * server.c (handle_query): Add qOffsets logic.
3435 * target.h (struct target_ops): Add read_offsets.
3437 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3439 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
3440 (PTRACE_GET_THREAD_AREA): Define.
3441 (ps_get_thread_area): New function.
3442 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
3443 (linux-x86-64-low.o): Update.
3445 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
3447 * configure.ac: Remove checks for prfpregset_t.
3448 * gdb_proc_service.h: New file.
3449 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
3450 new "gdb_proc_service.h".
3451 * proc-service.c: Likewise.
3452 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
3453 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
3454 * Makefile.in (gdb_proc_service_h): Updated.
3455 * configure, config.in: Regenerated.
3457 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3459 * remote-utils.c (prepare_resume_reply): Move declaration
3460 of gdb_id_from_wait to the top of the block.
3462 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
3464 * linux-low.c (regsets_store_inferior_registers): Read the regset
3465 from the target before filling it.
3467 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
3469 * server.c (attach_inferior): Return SIGTRAP for a successful
3472 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
3474 * Makefile.in (OBS): Add version.o.
3475 (STAGESTUFF): Delete.
3476 (version.o): Add dependencies.
3477 (version.c): Replace rule.
3478 (clean): Remove version.c.
3479 * server.c (gdbserver_version): New.
3480 (gdbserver_usage): Use printf.
3481 (main): Handle --version and --help.
3482 * server.h (version, host_name): Add declarations.
3484 2005-12-23 Eli Zaretskii <eliz@gnu.org>
3496 * linux-x86-64-low.c:
3499 * linux-ppc64-low.c:
3508 * linux-crisv32-low.c:
3520 * gdbserver.1: Add (C) after Copyright. Update the FSF
3523 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
3525 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
3526 (arm_breakpoint_at): Recognize both breakpoints.
3527 (the_low_target): Use the correct breakpoint instruction.
3529 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
3531 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
3532 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
3533 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
3534 (the_low_target): Update.
3536 2005-10-25 Andreas Schwab <schwab@suse.de>
3538 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
3540 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
3541 (ia64_num_regs): Reduce to 462.
3543 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
3545 * acinclude.m4: Correct quoting.
3546 * aclocal.m4: Regenerated.
3548 Suggested by SZOKOVACS Robert <szo@ies.hu>:
3549 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
3550 (thread_db_init): Call thread_db_err_str.
3551 * configure.ac: Check for TD_VERSION.
3552 * config.in, configure: Regenerated.
3554 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3556 * server.h (error, fatal, warning): Add ATTR_FORMAT.
3558 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3560 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
3561 is not available. Define HAVE_PTRACE_GETREGS if it is.
3562 * config.in, configure: Regenerated.
3563 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
3564 * linux-i386-low.c, linux-m68k-low.c: Update to use
3565 HAVE_PTRACE_GETREGS.
3566 * linux-low.c (regsets_fetch_inferior_registers)
3567 (regsets_store_inferior_registers): Only return 0 if we processed
3569 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
3570 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
3572 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3574 * inferiors.c (struct thread_info): Add gdb_id.
3575 (add_thread): Add gdb_id argument.
3576 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
3577 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
3578 calls to add_thread.
3579 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
3580 * server.c (handle_query): Use thread_to_gdb_id.
3581 (handle_v_cont, main): Use gdb_id_to_thread_id.
3582 * server.h (add_thread): Update prototype.
3583 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
3586 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
3588 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
3589 left-padded registers.
3590 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
3591 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
3593 2005-07-01 Steve Ellcey <sje@cup.hp.com>
3595 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
3596 * configure: Regenerate.
3597 * config.in: Regenerate.
3598 * server.h (NEED_DECLARATION_STRERROR):
3599 Replace with !HAVE_DECL_STRERROR.
3601 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
3603 * linux-low.c (linux_wait, linux_send_signal): Don't test
3604 an unsigned long variable for > 0 if it could be MAX_ULONG.
3605 * server.c (myresume): Likewise.
3606 * target.c (set_desired_inferior): Likewise.
3608 2005-06-13 Mark Kettenis <kettenis@gnu.org>
3610 * configure.ac: Simplify and improve check for socklen_t.
3611 * configure, config.in: Regenerate.
3613 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
3615 * acconfig.h: Remove.
3616 * configure.ac: Add a test for socklen_t. Use three-argument
3617 AC_DEFINE throughout.
3618 * config.in: Regenerated using autoheader 2.59.
3619 * configure: Regenerated.
3621 * gdbreplay.c (socklen_t): Provide a default.
3622 (remote_open): Use socklen_t.
3623 * remote-utils.c (socklen_t): Provide a default.
3624 (remote_open): Use socklen_t.
3625 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
3628 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
3630 * linux-low.c (linux_read_memory, linux_write_memory)
3631 (linux_read_auxv): Likewise.
3632 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
3633 (check_mem_write): Likewise.
3634 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
3636 * regcache.c (struct inferior_rgcache_data, registers_to_string)
3637 (registers_from_string, register_data): Likewise.
3638 * server.c (handle_query, main): Likewise.
3639 * server.h (convert_ascii_to_int, convert_int_to_ascii)
3640 (decode_M_packet): Likewise.
3641 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
3642 * target.h (struct target_ops): Update read_memory, write_memory,
3644 (read_inferior_memory, write_inferior_memory): Update.
3645 * linux-low.h (struct linux_target_ops): Change type of breakpoint
3647 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
3648 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
3649 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
3650 linux-s390-low.c, linux-sh-low.c: Update for changes in
3651 read_inferior_memory and the_low_target->breakpoint.
3653 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
3655 * Makefile.in (SFILES): Add linux-ppc64-low.c.
3656 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
3657 * configure.srv: Add powerpc64-*-linux*.
3658 * linux-ppc64-low.c: New file.
3660 2005-05-23 Orjan Friberg <orjanf@axis.com>
3662 * linux-cris-low.c: New file with support for CRIS.
3663 * linux-crisv32-low.c: Ditto for CRISv32.
3664 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
3665 (clean): Add reg-cris.c and reg-crisv32.c.
3666 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
3667 reg-crisv32.o, and reg-crisv32.c to make rules.
3668 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
3671 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
3673 * linux-low.c (fetch_register): Ensure buffer size is a multiple
3674 of sizeof (PTRACE_XFER_TYPE).
3675 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
3677 2005-05-12 Orjan Friberg <orjanf@axis.com>
3679 * target.h (struct target_ops): Add insert_watchpoint,
3680 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
3681 pointers for hardware watchpoint support.
3682 * linux-low.h (struct linux_target_ops): Ditto.
3683 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
3684 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
3685 to linux_target_ops.
3686 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
3688 * server.c (main): Recognize 'Z' and 'z' packets.
3690 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
3692 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
3693 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
3694 (the_low_target): Add new members.
3696 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3698 * proc-service.c (ps_lgetregs): Search all_processes instead of
3701 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
3703 * server.c (start_inferior): Change return type to int.
3704 (attach_inferior): Change sigptr to int *.
3705 (handle_v_cont, handle_v_requests): Change signal to int *.
3706 (main): Change signal to int.
3708 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
3710 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
3711 * configure.srv: Add m32r*-*-linux*.
3712 * linux-m32r-low.c: New file.
3714 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
3716 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
3718 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
3720 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
3721 Take unsigned long arguments for PIDs.
3722 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
3723 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
3724 (wait_for_sigstop, linux_resume_one_process)
3725 (regsets_fetch_inferior_registers, linux_send_signal)
3726 (linux_read_auxv): Likewise. Update the types of variables holding
3727 PIDs. Update format string specifiers.
3728 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
3729 * remote-utils.c (prepare_resume_reply): Likewise.
3730 * server.c (cont_thread, general_thread, step_thread)
3731 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
3733 (handle_query): Update format specifiers.
3734 (handle_v_cont, main): Use strtoul for thread IDs.
3735 * server.h (struct inferior_list_entry): Use unsigned long for ID.
3736 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
3737 (general_thread, step_thread, thread_from_wait)
3738 (old_thread_from_wait): Update.
3739 * target.h (struct thread_resume): Use unsigned long for THREAD.
3740 (struct target_ops): Use unsigned long for arguments to attach and
3743 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3745 * acinclude.m4: Include bfd/bfd.m4 directly.
3746 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
3747 <agriffis@toolchain.org>.
3748 * aclocal.m4, configure: Regenerated.
3750 2005-01-07 Andrew Cagney <cagney@gnu.org>
3752 * configure.ac: Rename configure.in, require autoconf 2.59.
3753 * configure: Re-generate.
3755 2004-12-08 Daniel Jacobowitz <dan@debian.org>
3757 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
3759 * aclocal.m4: Regenerated.
3760 * configure: Regenerated.
3762 2004-11-21 Andreas Schwab <schwab@suse.de>
3764 * linux-m68k-low.c (m68k_num_gregs): Define.
3765 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
3766 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
3767 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
3768 (m68k_breakpoint_at): New. Add to the_low_target.
3770 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
3771 srv_linux_thread_db to yes.
3773 2004-10-20 Joel Brobecker <brobecker@gnat.com>
3775 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
3776 (ARCH_SET_FS): Likewise.
3777 (ARCH_GET_FS): Likewise.
3778 (ARCH_GET_GS): Likewise.
3780 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3782 * linux-i386-low.c (ps_get_thread_area): New.
3783 * linux-x86-64-low.c (ps_get_thread_area): New.
3784 * linux-low.c: Include <sys/syscall.h>.
3785 (linux_kill_one_process): Don't kill the first thread here.
3786 (linux_kill): Kill the first thread here.
3787 (kill_lwp): New function.
3788 (send_sigstop, linux_send_signal): Use it.
3789 * proc-service.c: Clean up #ifdefs.
3790 (fpregset_info): Delete.
3791 (ps_lgetregs): Update and enable implementation.
3792 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
3794 * remote-utils.c (struct sym_cache, symbol_cache): New.
3795 (input_interrupt): Print a clearer message.
3796 (async_io_enabled): New variable.
3797 (enable_async_io, disable_async_io): Use it. Update comments.
3798 (look_up_one_symbol): Use the symbol cache.
3799 * thread-db.c (thread_db_look_up_symbols): New function.
3800 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
3802 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3804 * configure.in: Test for -rdynamic.
3805 * configure: Regenerated.
3806 * Makefile (INTERNAL_LDFLAGS): New.
3807 (gdbserver, gdbreplay): Use it.
3809 2004-09-02 Andrew Cagney <cagney@gnu.org>
3811 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
3813 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
3815 * linux-low.c (linux_wait): Clear all_processes list also.
3817 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3819 * linux-low.c: Include <errno.h>. Remove extern declaration of
3822 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
3824 * gdbreplay.c, server.h, utils.c: Update copyright years.
3826 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3828 * server.c (main): Print child status or termination signal from
3829 variable 'signal', not 'sig'.
3831 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
3833 * linux-low.c (linux_read_memory): Change return type to
3834 int. Check for and return error from ptrace().
3835 * target.c (read_inferior_memory): Change return type to int. Pass
3836 back return status from the_target->read_memory().
3837 * target.h (struct target_ops): Adapt *read_memory() prototype.
3839 (read_inferior_memory): Adapt prototype.
3840 * server.c (main): Return an error packet if
3841 read_inferior_memory() returns an error.
3843 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
3845 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
3846 Unify with other clean targets.
3848 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3850 * server.c (handle_v_cont): Call set_desired_inferior.
3852 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3854 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
3856 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3858 * linux-low.c (linux_wait): Unblock async I/O.
3859 (linux_resume): Block and enable async I/O.
3860 * remote-utils.c (block_async_io, unblock_async_io): New functions.
3861 * server.h (block_async_io, unblock_async_io): Add prototypes.
3863 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3865 * remote-utils.c (remote_open): Print a status notice after
3867 * server.c (attach_inferior): Print a status notice after
3870 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
3872 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
3874 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
3876 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
3878 * server.c, target.h: Update copyright years.
3880 2004-02-25 Roland McGrath <roland@redhat.com>
3882 * target.h (struct target_ops): New member `read_auxv'.
3883 * server.c (handle_query): Handle qPart:auxv:read: query using that.
3884 * linux-low.c (linux_read_auxv): New function.
3885 (linux_target_ops): Initialize `read_auxv' member to that.
3887 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3889 Committed by Jim Blandy <jimb@redhat.com>.
3891 * linux-s390-low.c (s390_num_regs): Update.
3892 (s390_regmap): Remove control registers. Use __s390x__ predefine
3893 instead of GPR_SIZE to distiguish s390 and s390x targets.
3895 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
3897 * linux-low.c: Update copyright year.
3898 (check_removed_breakpoint): Clear pending_is_breakpoint.
3899 (linux_set_resume_request, linux_queue_one_thread)
3900 (resume_status_pending_p): New functions.
3901 (linux_continue_one_thread): Use process->resume.
3902 (linux_resume): Only resume threads if there are no pending events.
3903 * linux-low.h (struct process_info): Add resume request
3906 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
3908 * regcache.c (new_register_cache): Clear the allocated register
3909 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3911 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
3913 * linux-low.c (linux_resume): Take a struct thread_resume *
3915 (linux_wait): Update call.
3916 (resume_ptr): New static variable.
3917 (linux_continue_one_thread): Renamed from
3918 linux_continue_one_process. Use resume_ptr.
3919 (linux_resume): Use linux_continue_one_thread.
3920 * server.c (handle_v_cont, handle_v_requests): New functions.
3921 (myresume): New function.
3922 (main): Handle 'v' case.
3923 * target.h (struct thread_resume): New type.
3924 (struct target_ops): Change argument of "resume" to struct
3926 (myresume): Delete macro.
3928 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
3930 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
3931 (uninstall): Support DESTDIR.
3933 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
3935 * configure.srv: Add xscale*linux copy of arm*linux entry.
3937 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
3939 * linux-arm-low.c (arm_reinsert_addr): New function.
3940 (the_low_target): Add arm_reinsert_addr.
3942 2003-07-08 Mark Kettenis <kettenis@gnu.org>
3944 * mem-break.c: Remove whitespace at end of file.
3946 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3948 * configure.in: Check whether we need to prototype strerror.
3949 * server.h: Optionally prototype strerror.
3950 * gdbreplay.c (perror_with_name): Use strerror.
3951 * linux-low.c (linux_attach_lwp): Use strerror.
3952 * utils.c (perror_with_name): Use strerror.
3953 * config.in, configure: Regenerated.
3955 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
3957 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
3958 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
3960 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
3962 * Makefile.in (SFILES): Update.
3963 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
3964 low-sun3.c: Remove files.
3966 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
3968 * linux-low.c: Move comment to linux_thread_alive where it belonged.
3969 (linux_detach_one_process, linux_detach): New functions.
3970 (linux_target_ops): Add linux_detach.
3971 * server.c (main): Handle 'D' packet.
3972 * target.h (struct target_ops): Add "detach" member.
3973 (detach_inferior): Define.
3975 2003-06-13 Mark Kettenis <kettenis@gnu.org>
3977 From Kelley Cook <kelleycook@wideopenwest.com>:
3978 * configure.srv: Accept i[34567]86 variants.
3980 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
3982 * linux-low.c (linux_wait_for_event): Correct comment typos.
3983 (linux_resume_one_process): Call check_removed_breakpoint.
3984 (linux_send_signal): New function.
3985 (linux_target_ops): Add linux_send_signal.
3986 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
3988 * target.h (struct target_ops): Add send_signal.
3990 2003-05-29 Jim Blandy <jimb@redhat.com>
3992 * linux-low.c (usr_store_inferior_registers): Transfer buf in
3993 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
3994 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
3995 away part of the register's value.
3997 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
3999 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
4000 (linux_wait_for_event, linux_init_signals): Likewise.
4002 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
4004 * configure.in: Check for stdlib.h.
4005 * configure: Regenerated.
4006 * config.in: Regenerated.
4008 2003-01-04 Andreas Schwab <schwab@suse.de>
4010 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
4012 2003-01-02 Andrew Cagney <ac131313@redhat.com>
4014 * Makefile.in: Remove obsolete code.
4016 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
4018 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
4019 defined(PT_FPR0_HI).
4021 2002-11-17 Stuart Hughes <seh@zee2.com>
4023 * linux-arm-low.c (arm_num_regs): Increase.
4024 (arm_regmap): Include status register.
4026 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
4028 * linux-low.c (register_addr): Remove incorrect -1 check.
4030 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
4032 * linux-low.c (linux_create_inferior): Call setpgid. Return
4034 (unstopped_p, linux_signal_pid): Remove.
4035 (linux_target_ops): Remove linux_signal_pid.
4036 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
4037 global instead of target method.
4038 * target.h (struct target_ops): Remove signal_pid. Update comment
4039 for create_inferior.
4040 * server.c (signal_pid): New variable.
4041 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4042 gdbserver. Set the child to be the foreground process group.
4043 (attach_inferior): Set signal_pid.
4045 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
4047 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
4049 2002-08-20 Jim Blandy <jimb@redhat.com>
4051 * Makefile.in (LDFLAGS): Allow the configure script to establish a
4054 2002-08-01 Andrew Cagney <cagney@redhat.com>
4056 * Makefile.in: Make chill references obsolete.
4058 2002-07-24 Kevin Buettner <kevinb@redhat.com>
4060 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
4061 * configure: Regenerate.
4062 * config.in: Regenerate.
4064 2002-07-09 David O'Brien <obrien@FreeBSD.org>
4066 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
4067 (perror_with_name, remote_close, remote_open, expect, play): Static.
4069 2002-07-04 Michal Ludvig <mludvig@suse.cz>
4071 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
4072 byte offsets instead of an array of indexes.
4073 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
4075 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
4077 * regcache.c: Add comment.
4079 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
4081 * thread-db.c: New file.
4082 * proc-service.c: New file.
4083 * acinclude.m4: New file.
4084 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
4085 proc-service.o, and thread-db.o.
4086 (linux-low.o): Add USE_THREAD_DB.
4087 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
4088 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
4089 * aclocal.m4: Regenerated.
4090 * config.in: Regenerated.
4091 * configure: Regenerated.
4092 * configure.in: Check for proc_service.h, sys/procfs.h,
4093 thread_db.h, and linux/elf.h headrs.
4094 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
4095 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
4096 Check for -lthread_db and thread support.
4097 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
4098 PowerPC, and SuperH.
4099 * i387-fp.c: Constify arguments.
4100 * i387-fp.h: Likewise.
4101 * inferiors.c: (struct thread_info): Renamed from
4102 `struct inferior_info'. Remove PID member. Use generic inferior
4103 list header. All uses updated.
4104 (inferiors, signal_pid): Removed.
4105 (all_threads): New variable.
4106 (get_thread): Define.
4107 (add_inferior_to_list): New function.
4108 (for_each_inferior): New function.
4109 (change_inferior_id): New function.
4110 (add_inferior): Removed.
4111 (remove_inferior): New function.
4112 (add_thread): New function.
4113 (free_one_thread): New function.
4114 (remove_thread): New function.
4115 (clear_inferiors): Use for_each_inferior and free_one_thread.
4116 (find_inferior): New function.
4117 (find_inferior_id): New function.
4118 (inferior_target_data): Update argument type.
4119 (set_inferior_target_data): Likewise.
4120 (inferior_regcache_data): Likewise.
4121 (set_inferior_regcache_data): Likewise.
4122 * linux-low.c (linux_bp_reinsert): Remove.
4123 (all_processes, stopping_threads, using_thrads)
4124 (struct pending_signals, debug_threads, pid_of): New.
4125 (inferior_pid): Replace with macro.
4126 (struct inferior_linux_data): Remove.
4127 (get_stop_pc, add_process): New functions.
4128 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
4129 Use add_process and add_thread.
4130 (linux_attach_lwp): New function, based on old linux_attach. Use
4131 add_process and add_thread. Set stop_expected for new threads.
4132 (linux_attach): New function.
4133 (linux_kill_one_process): New function.
4134 (linux_kill): Kill all LWPs.
4135 (linux_thread_alive): Use find_inferior_id.
4136 (check_removed_breakpoints, status_pending_p): New functions.
4137 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
4138 Update. Use WNOHANG. Wait for cloned processes also. Update process
4139 struct for the found process.
4140 (linux_wait_for_event): New function.
4141 (linux_wait): Use it. Support LWPs.
4142 (send_sigstop, wait_for_sigstop, stop_all_processes)
4143 (linux_resume_one_process, linux_continue_one_process): New functions.
4144 (linux_resume): Support LWPs.
4145 (REGISTER_RAW_SIZE): Remove.
4146 (fetch_register): Use register_size instead. Call supply_register.
4147 (usr_store_inferior_registers): Likewise. Call collect_register.
4149 (regsets_fetch_inferior_registers): Improve error message.
4150 (regsets_store_inferior_registers): Add debugging.
4151 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
4152 (unstopped_p, linux_signal_pid): New functions.
4153 (linux_target_ops): Add linux_signal_pid.
4154 (linux_init_signals): New function.
4155 (initialize_low): Call it. Initialize using_threads.
4156 * regcache.c (inferior_regcache_data): Add valid
4158 (get_regcache): Fetch registers lazily. Add fetch argument
4159 and update all callers.
4160 (regcache_invalidate_one, regcache_invalidate): New
4162 (new_register_cache): Renamed from create_register_cache.
4163 Return the new regcache.
4164 (free_register_cache): Change argument to a void *.
4165 (registers_to_string, registers_from_string): Call get_regcache
4166 with fetch flag set.
4167 (register_data): Make static. Pass fetch flag to get_regcache.
4168 (supply_register): Call get_regcache with fetch flag clear.
4169 (collect_register): Call get_regcache with fetch flag set.
4170 (collect_register_as_string): New function.
4171 * regcache.h: Update.
4172 * remote-utils.c (putpkt): Flush after debug output and use
4174 Handle input interrupts while waiting for an ACK.
4175 (input_interrupt): Use signal_pid method.
4176 (getpkt): Flush after debug output and use stderr.
4177 (outreg): Use collect_register_as_string.
4178 (new_thread_notify, dead_thread_notify): New functions.
4179 (prepare_resume_reply): Check using_threads. Set thread_from_wait
4181 (look_up_one_symbol): Flush after debug output.
4182 * server.c (step_thread, server_waiting): New variables.
4183 (start_inferior): Don't use signal_pid. Update call to mywait.
4184 (attach_inferior): Update call to mywait.
4185 (handle_query): Handle qfThreadInfo and qsThreadInfo.
4186 (main): Don't fetch/store registers explicitly. Use
4187 set_desired_inferior. Support proposed ``Hs'' packet. Update
4190 (struct inferior_list, struct_inferior_list_entry): New.
4191 * target.c (set_desired_inferior): New.
4192 (write_inferior_memory): Constify.
4193 (mywait): New function.
4195 (struct target_ops): New signal_pid method.
4196 (mywait): Removed macro, added prototype.
4198 * linux-low.h (regset_func): Removed.
4199 (regset_fill_func, regset_store_func): New.
4200 (enum regset_type): New.
4201 (struct regset_info): Add type field. Use new operation types.
4202 (struct linux_target_ops): stop_pc renamed to get_pc.
4203 Add decr_pc_after_break and breakpoint_at.
4204 (get_process, get_thread_proess, get_process_thread)
4205 (strut process_info, all_processes, linux_attach_lwp)
4206 (thread_db_init): New.
4208 * linux-arm-low.c (arm_get_pc, arm_set_pc,
4209 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
4210 (the_low_target): Add new members.
4211 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
4212 (i386_store_fpxregset): Constify.
4213 (target_regsets): Add new kind identifier.
4214 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
4215 (i386_set_pc): Add debugging.
4216 (i386_breakpoint_at): New function.
4217 (the_low_target): Add new members.
4218 * linux-mips-low.c (mips_get_pc, mips_set_pc)
4219 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
4220 (mips_breakpoint_at): New.
4221 (the_low_target): Add new members.
4222 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
4223 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
4224 (the_low_target): Add new members.
4225 * linux-sh-low.c (sh_get_pc, sh_set_pc)
4226 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
4227 (the_low_target): Add new members.
4228 * linux-x86-64-low.c (target_regsets): Add new kind
4231 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
4233 From Martin Pool <mbp@samba.org>:
4234 * server.c (gdbserver_usage): New function.
4237 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
4239 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
4242 2002-05-04 Andrew Cagney <ac131313@redhat.com>
4244 * Makefile.in: Remove obsolete code.
4246 2002-04-24 Michal Ludvig <mludvig@suse.cz>
4248 * linux-low.c (regsets_fetch_inferior_registers),
4249 (regsets_store_inferior_registers): Removed cast to int from
4251 * regcache.h: Added declaration of struct inferior_info.
4253 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4255 * inferiors.c (struct inferior_info): Add regcache_data.
4256 (add_inferior): Call create_register_cache.
4257 (clear_inferiors): Call free_register_cache.
4258 (inferior_regcache_data, set_inferior_regcache_data): New functions.
4259 * regcache.c (struct inferior_regcache_data): New.
4260 (registers): Remove.
4261 (get_regcache): New function.
4262 (create_register_cache, free_register_cache): New functions.
4263 (set_register_cache): Don't initialize the register cache here.
4264 (registers_to_string, registers_from_string, register_data): Call
4266 * regcache.h: Add prototypes.
4267 * server.h: Likewise.
4269 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
4271 * mem-break.c: New file.
4272 * mem-break.h: New file.
4273 * Makefile.in: Add mem-break.o rule; update server.h
4275 * inferiors.c (struct inferior_info): Add target_data
4277 (clear_inferiors): Free target_data member if set.
4278 (inferior_target_data, set_inferior_target_data): New functions.
4279 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
4280 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
4281 * linux-low.c (linux_bp_reinsert): New variable.
4282 (struct inferior_linux_data): New.
4283 (linux_create_inferior): Use set_inferior_target_data.
4284 (linux_attach): Likewise. Call add_inferior.
4285 (linux_wait_for_one_inferior): New function.
4286 (linux_wait): Call it.
4287 (linux_write_memory): Add const.
4288 (initialize_low): Call set_breakpoint_data.
4289 * linux-low.h (struct linux_target_ops): Add breakpoint
4291 * server.c (attach_inferior): Remove extra add_inferior
4293 * server.h: Include mem-break.h. Update inferior.c
4295 * target.c (read_inferior_memory)
4296 (write_inferior_memory): New functions.
4297 * target.h (read_inferior_memory)
4298 (write_inferior_memory): Change macros to prototypes.
4299 (struct target_ops): Update comments. Add const to write_memory
4302 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
4304 * linux-low.c (usr_store_inferior_registers): Support
4305 registers which are allowed to fail to store.
4306 * linux-low.h (linux_target_ops): Likewise.
4307 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
4308 (ppc_cannot_store_register): FPSCR may not be storable.
4310 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4312 * server.h: Include <string.h> if HAVE_STRING_H.
4313 * ChangeLog: Correct paths in last ChangeLog entry.
4315 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4317 * linux-low.h: Remove obsolete prototypes.
4318 (struct linux_target_ops): New.
4319 (extern the_low_target): New.
4320 * linux-low.c (num_regs, regmap): Remove declarations.
4321 (register_addr): Use the_low_target explicitly.
4322 (fetch_register): Likewise.
4323 (usr_fetch_inferior_registers): Likewise.
4324 (usr_store_inferior_registers): Likewise.
4325 * linux-arm-low.c (num_regs): Remove.
4326 (arm_num_regs): Define.
4327 (arm_regmap): Renamed from regmap, made static.
4328 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
4330 (arm_cannot_store_register): Renamed from cannot_store_register,
4332 (the_low_target): New.
4333 * linux-i386-low.c (num_regs): Remove.
4334 (i386_num_regs): Define.
4335 (i386_regmap): Renamed from regmap, made static.
4336 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
4338 (i386_cannot_store_register): Renamed from cannot_store_register,
4340 (the_low_target): New.
4341 * linux-ia64-low.c (num_regs): Remove.
4342 (ia64_num_regs): Define.
4343 (ia64_regmap): Renamed from regmap, made static.
4344 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
4346 (ia64_cannot_store_register): Renamed from cannot_store_register,
4348 (the_low_target): New.
4349 * linux-m68k-low.c (num_regs): Remove.
4350 (m68k_num_regs): Define.
4351 (m68k_regmap): Renamed from regmap, made static.
4352 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
4354 (m68k_cannot_store_register): Renamed from cannot_store_register,
4356 (the_low_target): New.
4357 * linux-mips-low.c (num_regs): Remove.
4358 (mips_num_regs): Define.
4359 (mips_regmap): Renamed from regmap, made static.
4360 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
4362 (mips_cannot_store_register): Renamed from cannot_store_register,
4364 (the_low_target): New.
4365 * linux-ppc-low.c (num_regs): Remove.
4366 (ppc_num_regs): Define.
4367 (ppc_regmap): Renamed from regmap, made static.
4368 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
4370 (ppc_cannot_store_register): Renamed from cannot_store_register,
4372 (the_low_target): New.
4373 * linux-s390-low.c (num_regs): Remove.
4374 (s390_num_regs): Define.
4375 (s390_regmap): Renamed from regmap, made static.
4376 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
4378 (s390_cannot_store_register): Renamed from cannot_store_register,
4380 (the_low_target): New.
4381 * linux-sh-low.c (num_regs): Remove.
4382 (sh_num_regs): Define.
4383 (sh_regmap): Renamed from regmap, made static.
4384 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
4386 (sh_cannot_store_register): Renamed from cannot_store_register,
4388 (the_low_target): New.
4389 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
4390 (the_low_target): New.
4392 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4394 * Makefile.in: Add stamp-h target.
4395 * configure.in: Create stamp-h.
4396 * configure: Regenerated.
4398 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4400 * inferiors.c: New file.
4401 * target.c: New file.
4402 * target.h: New file.
4403 * Makefile.in: Add target.o and inferiors.o. Update
4405 * linux-low.c (inferior_pid): New static variable,
4406 moved from server.c.
4407 (linux_create_inferior): Renamed from create_inferior.
4408 Call add_inferior. Return 0 on success instead of a PID.
4409 (linux_attach): Renamed from myattach.
4410 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
4411 (linux_thread_alive): Renamed from mythread_alive.
4412 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
4414 (linux_resume): Renamed from myresume. Add missing ``return 0''.
4415 (regsets_store_inferior_registers): Correct error message.
4416 Add missing ``return 0''.
4417 (linux_fetch_registers): Renamed from fetch_inferior_registers.
4418 (linux_store_registers): Renamed from store_inferior_registers.
4419 (linux_read_memory): Renamed from read_inferior_memory.
4420 (linux_write_memory): Renamed from write_inferior_memory.
4421 (linux_target_ops): New structure.
4422 (initialize_low): Call set_target_ops ().
4423 * remote-utils.c (unhexify): New function.
4424 (hexify): New function.
4425 (input_interrupt): Send signals to ``signal_pid''.
4426 * server.c (inferior_pid): Remove.
4427 (start_inferior): Update create_inferior call.
4428 (attach_inferior): Call add_inferior.
4429 (handle_query): New function.
4430 (main): Call handle_query for `q' packets.
4431 * server.h: Include "target.h". Remove obsolete prototypes.
4432 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
4434 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
4436 * Makefile.in: Add WARN_CFLAGS. Update configury
4438 * configure.in: Check for <string.h>
4439 * configure: Regenerate.
4440 * config.in: Regenerate.
4441 * gdbreplay.c: Include needed system headers.
4442 (remote_open): Remove strchr prototype.
4443 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
4444 * regcache.c (supply_register): Change buf argument to const void *.
4445 (supply_register_by_name): Likewise.
4446 (collect_register): Change buf argument to void *.
4447 (collect_register_by_name): Likewise.
4448 * regcache.h: Add missing prototypes.
4449 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
4450 * server.c (handle_query): New function.
4451 (attached): New static variable, moved out of main.
4452 (main): Quiet longjmp clobber warnings.
4453 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
4454 * utils.c (error): Remove NORETURN.