1 2015-01-14 Yao Qi <yao@codesourcery.com>
3 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6 (PT_ORIG_R3, PT_TRAP): Likewise.
7 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11 2015-01-10 Joel Brobecker <brobecker@adacore.com>
13 * i387-fp.c (i387_cache_to_xsave): In look over
14 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
15 zmmh_low_space field by use of zmmh_high_space.
17 2015-01-09 Pedro Alves <palves@redhat.com>
19 * linux-low.c (step_over_bkpt): Move higher up in the file.
20 (handle_extended_wait): Don't store the stop_pc here.
21 (get_stop_pc): Adjust comments and rename to ...
22 (check_stopped_by_breakpoint): ... this. Record whether the LWP
23 stopped for a software breakpoint or hardware breakpoint.
24 (thread_still_has_status_pending_p): New function.
25 (status_pending_p_callback): Use
26 thread_still_has_status_pending_p. If the event is no longer
27 interesting, resume the LWP.
28 (handle_tracepoints): Add assert.
29 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
30 (wstatus_maybe_breakpoint): New function.
31 (cancel_breakpoint): Delete function.
32 (check_stopped_by_watchpoint): New function, factored out from
33 linux_low_filter_event.
34 (lp_status_maybe_breakpoint): Delete function.
35 (linux_low_filter_event): Remove filter_ptid argument.
36 Leave thread group exits pending here. Store the LWP's stop PC.
37 Always leave events pending.
38 (linux_wait_for_event_filtered): Pull all events out of the
39 kernel, and leave them all pending.
40 (count_events_callback, select_event_lwp_callback): Consider all
42 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
43 (select_event_lwp): Only give preference to the stepping LWP in
44 all-stop mode. Adjust comments.
45 (ignore_event): New function.
46 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
47 references to cancel_breakpoints. Adjust to renames. Also give
48 equal priority to all LWPs that have had events in non-stop mode.
49 If reporting a software breakpoint event, unadjust the LWP's PC.
50 (linux_wait): If linux_wait_1 returned an ignored event, retry.
51 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
53 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
54 (resume_status_pending_p): Use thread_still_has_status_pending_p.
55 (linux_stopped_by_watchpoint): Adjust.
56 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
57 * linux-low.h (enum lwp_stop_reason): New.
58 (struct lwp_info) <stop_pc>: Adjust comment.
59 <stopped_by_watchpoint>: Delete field.
60 <stop_reason>: New field.
61 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
62 * mem-break.c (software_breakpoint_inserted_here)
63 (hardware_breakpoint_inserted_here): New function.
64 * mem-break.h (software_breakpoint_inserted_here)
65 (hardware_breakpoint_inserted_here): Declare.
66 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
67 (cancel_breakpoints): Delete.
68 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
69 (upload_fast_traceframes): Remove references to
72 2015-01-09 Pedro Alves <palves@redhat.com>
74 * thread-db.c (find_new_threads_callback): Ignore thread if the
75 kernel thread ID is -1.
77 2015-01-09 Pedro Alves <palves@redhat.com>
79 * linux-low.c (linux_attach_fail_reason_string): Move to
80 nat/linux-ptrace.c, and rename.
81 (linux_attach_lwp): Update comment.
82 (attach_proc_task_lwp_callback): New function.
83 (linux_attach): Adjust to rename and use
84 linux_proc_attach_tgid_threads.
85 (linux_attach_fail_reason_string): Delete declaration.
87 2015-01-01 Joel Brobecker <brobecker@adacore.com>
89 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
90 * server.c (gdbserver_version): Likewise.
92 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
94 * remote-utils.c: Include ctype.h.
95 (input_interrupt): Explicitly handle the case when the char
96 received is the NUL byte. Improve the printing of non-ASCII
99 2014-12-16 Joel Brobecker <brobecker@adacore.com>
101 * linux-low.c (linux_low_filter_event): Update call to
102 linux_enable_event_reporting following the addition of
103 a new parameter to that function.
105 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
108 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
109 (AARCH64_FPCR_REGNO): Likewise.
110 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
111 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
112 (aarch64_store_fpregset): Likewise.
114 2014-12-15 Joel Brobecker <brobecker@adacore.com>
116 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
117 Remove FIXME comment about assumption about N.
119 2014-12-13 Joel Brobecker <brobecker@adacore.com>
121 * configure.ac: If large-file support is disabled in GDBserver,
122 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
123 * configure: Regenerate.
125 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
127 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
128 warning upon ENODATA from ptrace.
129 * linux-s390-low.c (s390_store_tdb): New.
130 (s390_regsets): Add regset for NT_S390_TDB.
132 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
134 * linux-low.c (regsets_store_inferior_registers): Skip regsets
135 without a fill_function.
136 * linux-s390-low.c (s390_fill_last_break): Remove.
137 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
138 (s390_arch_setup): Use regset's size instead of fill_function for
141 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
143 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
144 the regset's store function when ptrace returned an error.
145 * regcache.c (get_thread_regcache): Invalidate register cache
146 before fetching inferior's registers.
148 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
150 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
151 while-loop as for-loop.
152 (regsets_store_inferior_registers): Likewise.
154 2014-11-28 Yao Qi <yao@codesourcery.com>
156 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
157 * config.in, configure: Re-generate.
158 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
161 2014-11-21 Yao Qi <yao@codesourcery.com>
163 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
164 (AC_CHECK_HEADERS): Remove malloc.h.
165 * configure: Re-generated.
166 * config.in: Re-generated.
167 * server.h: Don't include alloca.h and malloc.h.
168 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
169 Don't include malloc.h.
171 2014-11-17 Joel Brobecker <brobecker@adacore.com>
173 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
174 corresponding ERRNO check in same block.
176 2014-11-12 Pedro Alves <palves@redhat.com>
178 * server.c (cont_thread): Update comment.
179 (start_inferior, attach_inferior): No longer clear cont_thread.
180 (handle_v_cont): No longer set cont_thread.
181 (captured_main): Clear cont_thread each time a GDB connects.
183 2014-11-12 Pedro Alves <palves@redhat.com>
185 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
186 thread, and don't resume all threads if the Hc thread has exited.
188 2014-11-12 Pedro Alves <palves@redhat.com>
190 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
191 the process group instead of to a specific LWP.
193 2014-10-15 Pedro Alves <palves@redhat.com>
196 * win32-arm-low.c (arm_set_thread_context): Remove current_event
198 (arm_set_thread_context): Delete.
199 (the_low_target): Adjust.
200 * win32-i386-low.c (debug_registers_changed)
201 (debug_registers_used): Delete.
202 (update_debug_registers_callback): New function.
203 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
204 needing to update their debug registers.
205 (win32_get_current_dr): New function.
206 (x86_dr_low_get_addr, x86_dr_low_get_control)
207 (x86_dr_low_get_status): Fetch the debug register from the thread
209 (i386_initial_stuff): Adjust.
210 (i386_get_thread_context): Remove current_event parameter. Don't
211 clear debug_registers_changed nor copy DR values to
213 (i386_set_thread_context): Delete.
214 (i386_prepare_to_resume): New function.
215 (i386_thread_added): Mark the thread as needing to update irs
217 (the_low_target): Remove i386_set_thread_context and install
218 i386_prepare_to_resume.
219 * win32-low.c (win32_get_thread_context): Adjust.
220 (win32_set_thread_context): Use SetThreadContext
222 (win32_prepare_to_resume): New function.
223 (win32_require_context): New function, factored out from ...
224 (thread_rec): ... this.
225 (continue_one_thread): Call win32_prepare_to_resume on each thread
226 we're about to continue.
227 (win32_resume): Call win32_prepare_to_resume on the event thread.
228 * win32-low.h (struct win32_thread_info)
229 <debug_registers_changed>: New field.
230 (struct win32_target_ops): Change prototype of set_thread_context,
231 delete set_thread_context and add prepare_to_resume.
232 (win32_require_context): New declaration.
234 2014-10-08 Gary Benson <gbenson@redhat.com>
236 * server.h: Do not include common-exceptions.h.
238 2014-10-08 Gary Benson <gbenson@redhat.com>
240 * server.h: Do not include cleanups.h.
242 2014-09-30 James Hogan <james.hogan@imgtec.com>
244 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
247 2014-09-23 Yao Qi <yao@codesourcery.com>
249 * linux-low.c (lp_status_maybe_breakpoint): New function.
250 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
251 (count_events_callback): Likewise.
252 (select_event_lwp_callback): Likewise.
253 (cancel_breakpoints_callback): Likewise.
255 2014-09-19 Don Breazeal <donb@codesourcery.com>
257 * linux-low.c (handle_extended_wait): Call
258 linux_ptrace_get_extended_event.
259 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
260 linux_is_extended_waitstatus.
262 2014-09-16 Joel Brobecker <brobecker@adacore.com>
264 * Makefile.in (CPPFLAGS): Define.
265 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
266 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
268 2014-09-16 Gary Benson <gbenson@redhat.com>
270 * inferiors.h (current_inferior): Renamed as...
271 (current_thread): New variable. All uses updated.
272 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
273 (maybe_move_out_of_jump_pad): Likewise.
274 (cancel_breakpoint): Likewise.
275 (linux_low_filter_event): Likewise.
276 (wait_for_sigstop): Likewise.
277 (linux_resume_one_lwp): Likewise.
278 (need_step_over_p): Likewise.
279 (start_step_over): Likewise.
280 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
281 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
282 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
283 and save_inferior as saved_thread.
284 * regcache.c (get_thread_regcache): Renamed saved_inferior as
286 (regcache_invalidate_thread): Likewise.
287 * remote-utils.c (prepare_resume_reply): Likewise.
288 * thread-db.c (thread_db_get_tls_address): Likewise.
289 (disable_thread_event_reporting): Likewise.
290 (remove_thread_event_breakpoints): Likewise.
291 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
293 * target.h (set_desired_inferior): Renamed as...
294 (set_desired_thread): New declaration. All uses updated.
295 * server.c (myresume): Updated comment to reference thread instead
297 (handle_serial_event): Likewise.
298 (handle_target_event): Likewise.
300 2014-09-12 Tom Tromey <tromey@redhat.com>
301 Gary Benson <gbenson@redhat.com>
303 * regcache.h: Include common-regcache.h.
304 (regcache_read_pc): Don't declare.
305 * regcache.c (get_thread_regcache_for_ptid): New function.
307 2014-09-11 Tom Tromey <tromey@redhat.com>
308 Gary Benson <gbenson@redhat.com>
310 * symbol.c: New file.
311 * Makefile.in (SFILES): Add symbol.c.
314 2014-09-11 Gary Benson <gbenson@redhat.com>
316 * target.c (target_stop_ptid, target_continue_ptid): New
319 2014-09-11 Tom Tromey <tromey@redhat.com>
320 Gary Benson <gbenson@redhat.com>
322 * target.h: Include target/target.h.
323 * target.c (target_read_memory, target_read_uint32)
324 (target_write_memory): New functions.
326 2014-09-11 Gary Benson <gbenson@redhat.com>
328 * server.h (debug_hw_points): Don't declare.
329 * server.c (debug_hw_points): Don't define. Replace all uses
330 with show_debug_regs.
331 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
332 all uses with show_debug_regs.
334 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
336 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
337 endianness into account.
338 (ppc_supply_ptrace_register): Likewise.
340 2014-09-03 James Hogan <james.hogan@imgtec.com>
342 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
343 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
345 2014-09-03 Gary Benson <gbenson@redhat.com>
347 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
348 ALL_DEBUG_ADDRESS_REGISTERS.
350 2014-09-02 Gary Benson <gbenson@redhat.com>
352 * i386-low.h: Renamed as...
353 * x86-low.h: New file. All type, function and variable name
354 prefixes changed from "i386_" to "x86_". All references updated.
355 * i386-low.c: Renamed as...
356 * x86-low.c: New file. All type, function and variable name
357 prefixes changed from "i386_" to "x86_". All references updated.
359 2014-09-02 Gary Benson <gbenson@redhat.com>
361 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
362 (x86_linux_new_thread): Likewise.
364 2014-08-29 Gary Benson <gbenson@redhat.com>
366 * server.h (setjmp.h): Do not include.
367 (toplevel): Do not declare.
368 (common-exceptions.h): Include.
369 (cleanups.h): Likewise.
370 * server.c (toplevel): Do not define.
371 (exit_code): New static global.
372 (detach_or_kill_for_exit_cleanup): New function.
373 (main): New function. Original main renamed to...
374 (captured_main): New function.
375 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
377 2014-08-29 Gary Benson <gbenson@redhat.com>
379 * Makefile.in (SFILES): Add common/common-exceptions.c.
380 (OBS): Add common-exceptions.o.
381 (common-exceptions.o): New rule.
382 * utils.c (prepare_to_throw_exception): New function.
384 2014-08-29 Gary Benson <gbenson@redhat.com>
386 * config.in: Regenerate.
387 * configure: Likewise.
389 2014-08-29 Gary Benson <gbenson@redhat.com>
391 * Makefile.in (SFILES): Add common/cleanups.c.
393 (cleanups.o): New rule.
395 2014-08-29 Gary Benson <gbenson@redhat.com>
397 * utils.c (internal_vwarning): New function.
399 2014-08-28 Gary Benson <gbenson@redhat.com>
401 * utils.h (fatal): Remove declaration.
402 * utils.c (fatal): Remove function.
404 2014-08-28 Gary Benson <gbenson@redhat.com>
406 * tracepoint.c (gdb_agent_init): Replace fatal with
408 (initialize_tracepoint): Likewise.
410 2014-08-28 Gary Benson <gbenson@redhat.com>
412 * remote-utils.c (remote_prepare): Replace fatal with error.
414 2014-08-28 Gary Benson <gbenson@redhat.com>
416 * linux-low.c (linux_async): Replace fatal with warning.
418 (linux_start_non_stop): Return -1 if linux_async failed.
420 2014-08-28 Gary Benson <gbenson@redhat.com>
422 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
424 (i386_dr_low_get_addr): Remove vague comment.
425 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
428 2014-08-28 Gary Benson <gbenson@redhat.com>
430 * inferiors.c (get_thread_process): Replace check with gdb_assert.
431 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
433 (linux_resume_one_lwp): Likewise.
434 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
436 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
438 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
439 (init_register_cache): Replace fatal with gdb_assert_not_reached.
440 (find_register_by_name): Replace fatal with internal_error.
441 (find_regno): Likewise.
442 * tdesc.c (init_target_desc): Replace check with gdb_assert.
443 * thread-db.c (thread_db_create_event): Likewise.
444 (thread_db_load_search): Likewise.
445 (try_thread_db_load_1): Likewise.
446 * tracepoint.c (get_jump_space_head): Replace fatal with
448 (claim_trampoline_space): Likewise.
449 (have_fast_tracepoint_trampoline_buffer): Likewise.
450 (cmd_qtstart): Likewise.
451 (stop_tracing): Likewise.
452 (fast_tracepoint_collecting): Likewise.
453 (target_malloc): Likewise.
454 (download_tracepoint): Likewise.
455 (download_trace_state_variables): Replace check with gdb_assert.
456 (upload_fast_traceframes): Replace fatal with internal_error.
458 2014-08-19 Tom Tromey <tromey@redhat.com>
459 Gary Benson <gbenson@redhat.com>
461 * Makefile.in (SFILES): Add common/common-debug.c.
462 (OBS): Add common-debug.o.
463 (common-debug.o): New rule.
464 * debug.h (debug_printf): Don't declare.
465 * debug.c (debug_printf): Renamed and rewritten as...
466 (debug_vprintf): New function.
468 2014-08-19 Gary Benson <gbenson@redhat.com>
470 * utils.h: Do not include print-utils.h.
472 2014-08-19 Tom Tromey <tromey@redhat.com>
473 Gary Benson <gbenson@redhat.com>
475 * server.h: Add static assertion.
476 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
478 2014-08-19 Tom Tromey <tromey@redhat.com>
479 Gary Benson <gbenson@redhat.com>
481 * Makefile.in (SFILES): Add common/errors.c.
483 (IPA_OBS): Add errors-ipa.o.
484 (errors.o): New rule.
485 (errors-ipa.o): Likewise.
486 * utils.h (perror_with_name, error, warning): Don't declare.
487 * utils.c (warning): Renamed and rewritten as...
488 (vwarning): New function.
489 (error): Renamed and rewritten as...
490 (verror): New function.
491 (internal_error): Renamed and rewritten as...
492 (internal_verror): New function.
494 2014-08-07 Gary Benson <gbenson@redhat.com>
496 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
497 * configure: Regenerate.
498 * config.in: Likewise.
499 * server.h: Do not include errno.h.
500 * event-loop.c: Likewise.
501 * hostio-errno.c: Likewise.
502 * linux-low.c: Likewise.
503 * remote-utils.c: Likewise.
504 * spu-low.c: Likewise.
506 * gdbreplay.c: Unconditionally include errno.h.
508 2014-08-07 Gary Benson <gbenson@redhat.com>
510 * server.h: Do not include string.h.
511 * event-loop.c: Likewise.
512 * linux-low.c: Likewise.
513 * regcache.c: Likewise.
514 * remote-utils.c: Likewise.
515 * spu-low.c: Likewise.
518 2014-08-07 Gary Benson <gbenson@redhat.com>
520 * server.h: Do not include gdb_assert.h.
522 2014-08-07 Gary Benson <gbenson@redhat.com>
524 * server.h: Do not include common-utils.h.
526 2014-08-07 Gary Benson <gbenson@redhat.com>
528 * server.h: Do not include ptid.h.
531 2014-08-07 Gary Benson <gbenson@redhat.com>
533 * server.h: Do not include gdb_locale.h.
535 2014-08-07 Gary Benson <gbenson@redhat.com>
537 * server.h: Do not include gdb/signals.h.
538 * win32-low.c: Likewise.
540 2014-08-07 Gary Benson <gbenson@redhat.com>
542 * server.h: Do not include pathmax.h.
544 2014-08-07 Gary Benson <gbenson@redhat.com>
546 * server.h: Do not include libiberty.h.
547 * linux-bfin-low.c: Likewise.
549 2014-08-07 Gary Benson <gbenson@redhat.com>
551 * server.h: Do not include ansidecl.h.
553 2014-08-07 Gary Benson <gbenson@redhat.com>
555 * linux-x86-low.c: Do not include stddef.h.
556 * lynx-ppc-low.c: Likewise.
557 * tracepoint.c: Likewise.
559 2014-08-07 Gary Benson <gbenson@redhat.com>
561 * server.h: Do not include stdarg.h.
562 * nto-low.c: Likewise.
564 2014-08-07 Gary Benson <gbenson@redhat.com>
566 * server.h: Do not include stdlib.h.
567 * inferiors.c: Likewise.
568 * linux-low.c: Likewise.
569 * regcache.c: Likewise.
570 * spu-low.c: Likewise.
571 * tracepoint.c: Likewise.
574 2014-08-07 Gary Benson <gbenson@redhat.com>
576 * server.h: Do not include stdio.h.
577 * linux-low.c: Likewise.
578 * remote-utils.c: Likewise.
579 * spu-low.c: Likewise.
581 * wincecompat.c: Likewise.
583 2014-08-06 Gary Benson <gbenson@redhat.com>
585 * regcache.c (init_register_cache): Move conditionals inside if.
587 2014-08-06 Gary Benson <gbenson@redhat.com>
589 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
591 2014-07-31 Gary Benson <gbenson@redhat.com>
593 * ax.h: Do not include server.h.
594 * gdbthread.h: Likewise.
595 * lynx-low.h: Likewise.
598 2014-07-30 Gary Benson <gbenson@redhat.com>
600 * server.h: Include common-defs.h.
601 Do not include config.h or build-gnulib-gdbserver/config.h.
603 2014-07-30 Gary Benson <gbenson@redhat.com>
605 * hostio-errno.c: Move server.h to top of includes list.
606 * inferiors.c: Likewise.
607 * linux-x86-low.c: Likewise.
608 * notif.c: Include server.h.
610 2014-07-24 Tom Tromey <tromey@redhat.com>
611 Gary Benson <gbenson@redhat.com>
613 * server.h (CORE_ADDR): Now unsigned.
615 2014-07-16 Pedro Alves <palves@redhat.com>
617 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
619 2014-07-15 Pedro Alves <palves@redhat.com>
621 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
624 2014-07-11 Pedro Alves <palves@redhat.com>
626 * linux-low.c (kill_wait_lwp): New function, based on
627 kill_one_lwp_callback, but use my_waitpid directly.
628 (kill_one_lwp_callback, linux_kill): Use it.
630 2014-06-23 Pedro Alves <palves@redhat.com>
632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
633 before setting DR0..DR3.
635 2014-06-20 Gary Benson <gbenson@redhat.com>
637 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
638 * configure: Regenerated.
639 * config.in: Likewise.
641 2014-06-20 Gary Benson <gbenson@redhat.com>
643 * Makefile.in (SFILES): Update locations for files moved
645 (object file files): Reordered.
647 2014-06-20 Gary Benson <gbenson@redhat.com>
649 * i386-low.h (i386_dr_low_can_set_addr): Removed.
650 (i386_dr_low_set_addr): Likewise.
651 (i386_dr_low_get_addr): Likewise.
652 (i386_dr_low_can_set_control): Likewise.
653 (i386_dr_low_set_control): Likewise.
654 (i386_dr_low_get_control): Likewise.
655 (i386_dr_low_get_status): Likewise.
656 (i386_get_debug_register_length): Likewise.
657 * linux-x86-low.c (i386_dr_low_set_addr):
658 Changed signature. Made static.
659 (i386_dr_low_get_addr): Likewise.
660 (i386_dr_low_set_control): Likewise.
661 (i386_dr_low_get_control): Likewise.
662 (i386_dr_low_get_status): Likewise.
663 (i386_dr_low): New global variable.
664 * win32-i386-low.c (i386_dr_low_set_addr):
665 Changed signature. Made static.
666 (i386_dr_low_get_addr): Likewise.
667 (i386_dr_low_set_control): Likewise.
668 (i386_dr_low_get_control): Likewise.
669 (i386_dr_low_get_status): Likewise.
670 (i386_dr_low): New global variable.
672 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
674 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
675 * Makefile.in (AR, AR_FLAGS): Define.
676 * configure: Regenerate.
678 2014-06-19 Gary Benson <gbenson@redhat.com>
680 * Makefile.in (i386-dregs.o): New rule.
681 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
682 * i386-low.c (target.h): Remove include.
683 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
684 (DR_CONTROL_SHIFT): Likewise.
685 (DR_CONTROL_SIZE): Likewise.
686 (DR_RW_EXECUTE): Likewise.
687 (DR_RW_WRITE): Likewise.
688 (DR_RW_READ): Likewise.
689 (DR_RW_IORW): Likewise.
690 (DR_LEN_1): Likewise.
691 (DR_LEN_2): Likewise.
692 (DR_LEN_4): Likewise.
693 (DR_LEN_8): Likewise.
694 (DR_LOCAL_ENABLE_SHIFT): Likewise.
695 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
696 (DR_ENABLE_SIZE): Likewise.
697 (DR_LOCAL_SLOWDOWN): Likewise.
698 (DR_GLOBAL_SLOWDOWN): Likewise.
699 (DR_CONTROL_RESERVED): Likewise.
700 (I386_DR_CONTROL_MASK): Likewise.
701 (I386_DR_VACANT): Likewise.
702 (I386_DR_LOCAL_ENABLE): Likewise.
703 (I386_DR_GLOBAL_ENABLE): Likewise.
704 (I386_DR_DISABLE): Likewise.
705 (I386_DR_SET_RW_LEN): Likewise.
706 (I386_DR_GET_RW_LEN): Likewise.
707 (I386_DR_WATCH_HIT): Likewise.
708 (i386_wp_op_t): Likewise.
709 (i386_show_dr): Likewise.
710 (i386_length_and_rw_bits): Likewise.
711 (i386_insert_aligned_watchpoint): Likewise.
712 (i386_remove_aligned_watchpoint): Likewise.
713 (i386_handle_nonaligned_watchpoint): Likewise.
714 i386_update_inferior_debug_regs(): Likewise.
715 (i386_dr_insert_watchpoint): Likewise.
716 (i386_dr_remove_watchpoint): Likewise.
717 (i386_dr_region_ok_for_watchpoint): Likewise.
718 (i386_dr_stopped_data_address): Likewise.
719 (i386_dr_stopped_by_watchpoint): Likewise.
721 2014-06-19 Gary Benson <gbenson@redhat.com>
723 * i386-low.c (i386_dr_show): Renamed to
724 i386_show_dr and made static. All uses updated.
725 (i386_dr_length_and_rw_bits): Renamed to
726 i386_length_and_rw_bits and made static.
728 (i386_dr_insert_aligned_watchpoint): Renamed to
729 i386_insert_aligned_watchpoint and made static.
731 (i386_dr_remove_aligned_watchpoint): Renamed to
732 i386_remove_aligned_watchpoint and made static.
734 (i386_dr_update_inferior_debug_regs): Renamed to
735 i386_update_inferior_debug_regs and made static.
738 2014-06-18 Gary Benson <gbenson@redhat.com>
740 * i386-low.h (i386_dr_low_can_set_addr): New macro.
741 (i386_dr_low_can_set_control): Likewise.
742 (i386_get_debug_register_length): Likewise.
743 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
744 (i386_dr_low_can_set_control): Likewise.
745 (i386_get_debug_register_length): Likewise.
747 2014-06-17 Gary Benson <gbenson@redhat.com>
749 * i386-low.h (i386-dregs.h): New include.
750 (DR_FIRSTADDR): Now in i386-dregs.h.
751 (DR_LASTADDR): Likewise.
752 (DR_NADDR): Likewise.
753 (DR_STATUS): Likewise.
754 (DR_CONTROL): Likewise.
755 (i386_debug_reg_state): Likewise.
756 (i386_dr_insert_watchpoint): Likewise.
757 (i386_dr_remove_watchpoint): Likewise.
758 (i386_dr_region_ok_for_watchpoint): Likewise.
759 (i386_dr_stopped_data_address): Likewise.
760 (i386_dr_stopped_by_watchpoint): Likewise.
761 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
763 2014-06-18 Gary Benson <gbenson@redhat.com>
765 * i386-low.h (i386_low_insert_watchpoint): Renamed to
766 i386_dr_insert_watchpoint.
767 (i386_low_remove_watchpoint): Renamed to
768 i386_dr_remove_watchpoint.
769 (i386_low_region_ok_for_watchpoint): Renamed to
770 i386_dr_region_ok_for_watchpoint.
771 (i386_low_stopped_data_address): Renamed to
772 i386_dr_stopped_data_address.
773 (i386_low_stopped_by_watchpoint): Renamed to
774 i386_dr_stopped_by_watchpoint.
775 * i386-low.c (i386_show_dr): Renamed to
776 i386_dr_show and made nonstatic. All uses updated.
777 (i386_length_and_rw_bits): Renamed to
778 i386_dr_length_and_rw_bits and made nonstatic.
780 (i386_insert_aligned_watchpoint): Renamed to
781 i386_dr_insert_aligned_watchpoint and made nonstatic.
783 (i386_remove_aligned_watchpoint): Renamed to
784 i386_dr_remove_aligned_watchpoint and made nonstatic.
786 (i386_update_inferior_debug_regs): Renamed to
787 i386_dr_update_inferior_debug_regs and made nonstatic.
789 (i386_low_insert_watchpoint): Renamed to
790 i386_dr_insert_watchpoint. All uses updated.
791 (i386_low_remove_watchpoint): Renamed to
792 i386_dr_remove_watchpoint. All uses updated.
793 (i386_low_region_ok_for_watchpoint): Renamed to
794 i386_dr_region_ok_for_watchpoint. All uses updated.
795 (i386_low_stopped_data_address): Renamed to
796 i386_dr_stopped_data_address. All uses updated.
797 (i386_low_stopped_by_watchpoint): Renamed to
798 i386_dr_stopped_by_watchpoint. All uses updated.
800 2014-06-18 Gary Benson <gbenson@redhat.com>
802 * i386-low.c (i386_dr_low_can_set_addr): New macro.
803 (i386_dr_low_can_set_control): Likewise.
804 (i386_insert_aligned_watchpoint): New check.
806 2014-06-18 Gary Benson <gbenson@redhat.com>
808 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
811 2014-06-18 Gary Benson <gbenson@redhat.com>
813 * i386-low.c (i386_length_and_rw_bits): Use internal_error
814 instead of fatal and error.
815 (i386_handle_nonaligned_watchpoint): Likewise.
817 2014-06-18 Gary Benson <gbenson@redhat.com>
819 * i386-low.c (i386_get_debug_register_length): New macro.
820 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
821 (i386_show_dr): Use debug_printf instead of fprintf. Use
822 phex to format values.
824 2014-06-18 Gary Benson <gbenson@redhat.com>
826 * i386-low.h: Comment changes.
827 * i386-low.c: Likewise.
829 2014-06-18 Gary Benson <gbenson@redhat.com>
831 * i386-low.c: Whitespace changes.
833 2014-06-12 Tom Tromey <tromey@redhat.com>
835 * utils.c (freeargv): Remove.
837 2014-06-12 Tom Tromey <tromey@redhat.com>
839 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
840 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
841 (parse_debug_format_options): Likewise.
842 (gdbserver_usage): Likewise.
843 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
844 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
845 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
847 ($(LIBGNU)): Depend on libiberty.
848 (all-lib): Recurse into all subdirs.
849 (install-only): Invoke "install" target in subdirs.
850 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
852 * configure: Rebuild.
853 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
854 for vasprintf, vsnprintf, or gettimeofday.
855 * configure.srv: Don't add safe-ctype.o or lbasename.o to
858 2014-06-05 Joel Brobecker <brobecker@adacore.com>
860 * development.sh: Delete.
861 * Makefile.in (config.status): Adjust dependency on development.sh.
862 * configure.ac: Adjust development.sh source call.
863 * configure: Regenerate.
865 2014-06-02 Pedro Alves <palves@redhat.com>
867 * ax.c (gdb_free_agent_expr): New function.
868 * ax.h (gdb_free_agent_expr): New declaration.
869 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
871 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
873 (clear_breakpoint_conditions_and_commands): New function.
874 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
875 (clear_breakpoint_conditions_and_commands): New declaration.
877 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
879 * linux-aarch64-low.c (asm/ptrace.h): Include.
881 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
883 Fix TLS access for -static -pthread.
884 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
885 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
886 (thread_db_load_search, try_thread_db_load_1): Initialize it.
888 2014-05-20 Pedro Alves <palves@redhat.com>
890 * linux-aarch64-low.c (aarch64_insert_point)
891 (aarch64_remove_point): No longer check whether the type is
892 supported here. Adjust to new interface.
893 (the_low_target): Install aarch64_supports_z_point_type as
894 supports_z_point_type method.
895 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
896 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
897 instead of a Z packet char. Adjust.
898 (arm_supports_z_point_type): New function.
899 (arm_insert_point, arm_remove_point): Adjust to new interface.
900 (the_low_target): Install arm_supports_z_point_type.
901 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
902 (cris_insert_point, cris_remove_point): Adjust to new interface.
903 Don't check whether the type is supported here.
904 (the_low_target): Install cris_supports_z_point_type.
905 * linux-low.c (linux_supports_z_point_type): New function.
906 (linux_insert_point, linux_remove_point): Adjust to new interface.
907 * linux-low.h (struct linux_target_ops) <insert_point,
908 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
909 raw_breakpoint pointer parameter.
910 <supports_z_point_type>: New method.
911 * linux-mips-low.c (mips_supports_z_point_type): New function.
912 (mips_insert_point, mips_remove_point): Adjust to new interface.
913 Use mips_supports_z_point_type.
914 (the_low_target): Install mips_supports_z_point_type.
915 * linux-ppc-low.c (the_low_target): Install NULL as
916 supports_z_point_type method.
917 * linux-s390-low.c (the_low_target): Install NULL as
918 supports_z_point_type method.
919 * linux-sparc-low.c (the_low_target): Install NULL as
920 supports_z_point_type method.
921 * linux-x86-low.c (x86_supports_z_point_type): New function.
922 (x86_insert_point): Adjust to new insert_point interface. Use
923 insert_memory_breakpoint. Adjust to new
924 i386_low_insert_watchpoint interface.
925 (x86_remove_point): Adjust to remove_point interface. Use
926 remove_memory_breakpoint. Adjust to new
927 i386_low_remove_watchpoint interface.
928 (the_low_target): Install x86_supports_z_point_type.
929 * lynx-low.c (lynx_target_ops): Install NULL as
930 supports_z_point_type callback.
931 * nto-low.c (nto_supports_z_point_type): New.
932 (nto_insert_point, nto_remove_point): Adjust to new interface.
933 (nto_target_ops): Install nto_supports_z_point_type.
934 * mem-break.c: Adjust intro comment.
935 (struct raw_breakpoint) <raw_type, size>: New fields.
936 <inserted>: Update comment.
937 <shlib_disabled>: Delete field.
938 (enum bkpt_type) <gdb_breakpoint>: Delete value.
939 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
940 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
941 (raw_bkpt_type_to_target_hw_bp_type): New function.
942 (find_enabled_raw_code_breakpoint_at): New function.
943 (find_raw_breakpoint_at): New type and size parameters. Use them.
944 (insert_memory_breakpoint): New function, based off
945 set_raw_breakpoint_at.
946 (remove_memory_breakpoint): New function.
947 (set_raw_breakpoint_at): Reimplement.
948 (set_breakpoint): New, based on set_breakpoint_at.
949 (set_breakpoint_at): Reimplement.
950 (delete_raw_breakpoint): Go through the_target->remove_point
951 instead of assuming memory breakpoints.
952 (find_gdb_breakpoint_at): Delete.
953 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
954 (find_gdb_breakpoint): New function.
955 (set_gdb_breakpoint_at): Delete.
956 (z_type_supported): New function.
957 (set_gdb_breakpoint_1): New function, loosely based off
958 set_gdb_breakpoint_at.
959 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
960 (delete_gdb_breakpoint_at): Delete.
961 (delete_gdb_breakpoint_1): New function, loosely based off
962 delete_gdb_breakpoint_at.
963 (delete_gdb_breakpoint): New function.
964 (clear_gdb_breakpoint_conditions): Rename to ...
965 (clear_breakpoint_conditions): ... this. Don't handle a NULL
967 (add_condition_to_breakpoint): Make static.
968 (add_breakpoint_condition): Take a struct breakpoint pointer
969 instead of an address. Adjust.
970 (gdb_condition_true_at_breakpoint): Rename to ...
971 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
973 (gdb_condition_true_at_breakpoint): Reimplement.
974 (add_breakpoint_commands): Take a struct breakpoint pointer
975 instead of an address. Adjust.
976 (gdb_no_commands_at_breakpoint): Rename to ...
977 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
978 parameter. Return true if no breakpoint was found. Change debug
980 (gdb_no_commands_at_breakpoint): Reimplement.
981 (run_breakpoint_commands): Rename to ...
982 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
983 and change return type to boolean.
984 (run_breakpoint_commands): New function.
985 (gdb_breakpoint_here): Also check for Z1 breakpoints.
986 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
987 breakpoint. Go through the_target->remove_point instead of
988 assuming memory breakpoint.
989 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
990 software and hardware breakpoints.
991 (reinsert_raw_breakpoint): Go through the_target->insert_point
992 instead of assuming memory breakpoint.
993 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
994 software and hardware breakpoints.
995 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
996 Check both software and hardware breakpoints.
997 (validate_inserted_breakpoint): Assert the breakpoint is a
998 software breakpoint. Set the inserted flag to -1 instead of
999 setting shlib_disabled.
1000 (delete_disabled_breakpoints): Adjust.
1001 (validate_breakpoints): Only validate software breakpoints.
1002 Adjust to inserted flag change.
1003 (check_mem_read, check_mem_write): Skip breakpoint types other
1004 than software breakpoints. Adjust to inserted flag change.
1005 * mem-break.h (enum raw_bkpt_type): New enum.
1006 (raw_breakpoint, struct process_info): Forward declare.
1007 (Z_packet_to_target_hw_bp_type): Delete declaration.
1008 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1009 (set_gdb_breakpoint, delete_gdb_breakpoint)
1010 (clear_breakpoint_conditions): New declarations.
1011 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1012 (breakpoint_inserted_here): Update comment.
1013 (add_breakpoint_condition, add_breakpoint_commands): Replace
1014 address parameter with a breakpoint pointer parameter.
1015 (gdb_breakpoint_here): Update comment.
1016 (delete_gdb_breakpoint_at): Delete.
1017 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1018 * server.c (process_point_options): Take a struct breakpoint
1019 pointer instead of an address. Adjust.
1020 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1021 delete_gdb_breakpoint.
1022 * spu-low.c (spu_target_ops): Install NULL as
1023 supports_z_point_type method.
1024 * target.h: Include mem-break.h.
1025 (struct target_ops) <prepare_to_access_memory>: Update comment.
1026 <supports_z_point_type>: New field.
1027 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1028 instead of a char. Also take a raw breakpoint pointer.
1029 * win32-arm-low.c (the_low_target): Install NULL as
1030 supports_z_point_type.
1031 * win32-i386-low.c (i386_supports_z_point_type): New function.
1032 (i386_insert_point, i386_remove_point): Adjust to new interface.
1033 (the_low_target): Install i386_supports_z_point_type.
1034 * win32-low.c (win32_supports_z_point_type): New function.
1035 (win32_insert_point, win32_remove_point): Adjust to new interface.
1036 (win32_target_ops): Install win32_supports_z_point_type.
1037 * win32-low.h (struct win32_target_ops):
1038 <supports_z_point_type>: New method.
1039 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1040 instead of a char. Also take a raw breakpoint pointer.
1042 2014-05-20 Pedro Alves <palves@redhat.com>
1044 * mem-break.h: Include break-common.h.
1045 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1046 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1047 (Z_packet_to_target_hw_bp_type): New declaration.
1048 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1049 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1050 (Z_PACKET_ACCESS_WP): Delete macros.
1051 (Z_packet_to_hw_type): Delete function.
1052 * i386-low.h: Don't include break-common.h here.
1053 (Z_packet_to_hw_type): Delete declaration.
1054 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1055 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1056 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1057 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1058 * linux-aarch64-low.c: Don't include break-common.h here.
1059 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1060 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1061 (Z_packet_to_target_hw_bp_type): Delete function.
1062 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1064 (mips_insert_point, mips_remove_point): Use
1065 Z_packet_to_target_hw_bp_type.
1067 2014-05-20 Pedro Alves <palves@redhat.com>
1069 * linux-aarch64-low.c: Include break-common.h.
1070 (enum target_point_type): Delete.
1071 (Z_packet_to_point_type): Rename to ...
1072 (Z_packet_to_target_hw_bp_type): ... this, and return a
1073 target_hw_bp_type instead.
1074 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1075 instead of an enum target_point_type.
1076 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1078 (aarch64_dr_state_insert_one_point)
1079 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1080 (aarch64_handle_aligned_watchpoint)
1081 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1082 Take an enum target_hw_bp_type instead of an enum
1084 (aarch64_supports_z_point_type): New function.
1085 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1086 use Z_packet_to_target_hw_bp_type.
1088 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1090 * configure.ac: Only use -Werror by default when DEVELOPMENT
1092 * configure: Regenerate.
1094 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1096 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1097 * linux-x86-low.c (X86_64_USER_REGS): New.
1098 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1100 2014-04-28 Yao Qi <yao@codesourcery.com>
1102 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1105 2014-04-25 Pedro Alves <palves@redhat.com>
1108 * linux-low.c (linux_attach_fail_reason_string): New function.
1109 (linux_attach_lwp): Delete.
1110 (linux_attach_lwp_1): Rename to ...
1111 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1112 argument. Remove "initial" parameter. Return int instead of
1113 void. Don't error or warn here.
1114 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1115 failure to attach to the tgid. Call warning when failing to
1117 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1118 argument. Remove "initial" parameter. Return int instead of
1119 void. Don't error or warn here.
1120 (linux_attach_fail_reason_string): New declaration.
1121 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1122 interface change. Use linux_attach_fail_reason_string.
1124 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1125 Walfred Tedeschi <walfred.tedeschi@intel.com>
1127 * Makefile.in: Added rules to handle new files
1128 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1129 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1130 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1131 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1132 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1133 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1135 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1136 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1137 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1138 i386/x32-avx512.xml.
1139 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1140 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1141 i386/x32-avx512-linux.xml.
1142 * i387-fp.c (num_avx512_k_registers): New constant for number
1144 (num_avx512_zmmh_low_registers): New constant for number of
1145 lower ZMM registers (0-15).
1146 (num_avx512_zmmh_high_registers): New constant for number of
1147 higher ZMM registers (16-31).
1148 (num_avx512_ymmh_registers): New contant for number of higher
1149 YMM registers (ymm16-31 added by avx521 on x86_64).
1150 (num_avx512_xmm_registers): New constant for number of higher
1151 XMM registers (xmm16-31 added by AVX512 on x86_64).
1152 (struct i387_xsave): Add space for AVX512 registers.
1153 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1154 Add code to handle AVX512 registers.
1155 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1156 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1157 prototypei from generated file.
1158 (tdesc_amd64_avx512_linux): Likewise.
1159 (init_registers_x32_avx512_linux): Likewise.
1160 (tdesc_x32_avx512_linux): Likewise.
1161 (init_registers_i386_avx512_linux): Likewise.
1162 (tdesc_i386_avx512_linux): Likewise.
1163 (x86_64_regmap): Add AVX512 registers.
1164 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1166 (initialize_low_arch): Add code to initialize AVX512 registers.
1168 2014-04-23 Pedro Alves <palves@redhat.com>
1170 * mem-break.c (find_gdb_breakpoint_at): Make static.
1171 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1173 2014-04-23 Pedro Alves <palves@redhat.com>
1175 * i386-low.c: Don't include break-common.h here.
1176 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1177 prototype to take target_hw_bp_type as argument instead of a Z
1179 * i386-low.h: Include break-common.h here.
1180 (Z_packet_to_hw_type): Declare.
1181 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1183 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1184 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1185 (x86_remove_point): Convert the packet number to a
1186 target_hw_bp_type before calling i386_low_remove_watchpoint.
1187 * win32-i386-low.c (i386_insert_point): Convert the packet number
1188 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1189 (i386_remove_point): Convert the packet number to a
1190 target_hw_bp_type before calling i386_low_remove_watchpoint.
1192 2014-04-23 Pedro Alves <palves@redhat.com>
1194 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1196 2014-04-10 Pedro Alves <palves@redhat.com>
1198 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1199 Check if the condition or command is NULL before checking if the
1200 breakpoint is known. On success, return true.
1201 * mem-break.h (add_breakpoint_condition): Document return.
1202 (add_breakpoint_commands): Add describing comment.
1203 * server.c (skip_to_semicolon): New function.
1204 (process_point_options): Use it.
1206 2014-04-09 Pedro Alves <palves@redhat.com>
1208 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1211 2014-02-27 Pedro Alves <palves@redhat.com>
1214 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1216 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1218 (last_thread_of_process_p): Take a PID argument instead of a
1220 (linux_wait_for_lwp): Delete.
1221 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1223 (linux_low_filter_event): New function, party factored out from
1224 linux_wait_for_event.
1225 (linux_wait_for_event): Rename to ...
1226 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1227 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1228 sigsuspend. Check for zombie leaders.
1229 (linux_wait_for_event): Reimplement as wrapper around
1230 linux_wait_for_event_filtered.
1231 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1232 a normal or signal exit is seen, it's the whole process exiting.
1233 (wait_for_sigstop): No longer a for_each_inferior callback.
1234 Rewrite on top of linux_wait_for_event_filtered.
1235 (stop_all_lwps): Call wait_for_sigstop directly.
1236 * server.c (resume, handle_target_event): Handle
1237 TARGET_WAITKIND_NO_RESUMED.
1239 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1241 * win32-low.c (psapi_get_dll_name,
1242 * win32_CreateToolhelp32Snapshot): Delete.
1243 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1244 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1246 (handle_load_dll): Add function description.
1247 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1249 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1251 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1253 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1254 base address when calling win32_add_one_solib.
1255 (handle_load_dll): Delete local variable load_addr.
1256 Remove 0x1000 offset applied to DLL base address when calling
1257 win32_add_one_solib.
1258 (handle_unload_dll): Add comment.
1260 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1262 * win32-low.c (win32_add_all_dlls): Renames
1263 win32_ensure_ntdll_loaded. Rewrite function documentation.
1264 Adjust implementation to always load all DLLs.
1265 Add 0x1000 offset to DLL base address when calling
1266 win32_add_one_solib.
1267 (child_initialization_done): New static global.
1268 (do_initial_child_stuff): Set child_initialization_done to
1269 zero during child initialization, and 1 after. Replace call
1270 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1272 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1273 (handle_unload_dll): Add function documentation.
1274 (get_child_debug_event): Ignore load and unload DLL events
1275 during child initialization.
1277 2014-02-20 Doug Evans <dje@google.com>
1279 Remove global all_lwps.
1280 * inferiors.h (ptid_of): Move here from linux-low.h.
1281 (pid_of, lwpid_of): Ditto.
1282 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1283 parameter is a struct thread_info * now.
1284 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1285 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1286 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1288 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1289 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1290 * linux-arm-low.c (update_registers_callback): Update, "entry"
1291 parameter is a struct thread_info * now.
1292 Fetch lwpid from current_inferior directly.
1293 (arm_insert_point): Pass &all_threads to find_inferior instead of
1295 (arm_remove_point): Ditto.
1296 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1297 (arm_prepare_to_resume): Fetch pid from thread.
1298 (arm_read_description): Fetch lwpid from current_inferior directly.
1299 * linux-low.c (all_lwps): Delete.
1300 (delete_lwp): Delete call to remove_inferior.
1301 (handle_extended_wait): Fetch lwpid from thread.
1302 (add_lwp): Don't set lwp->entry.id. Remove call to
1303 add_inferior_to_list.
1304 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1305 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1306 (kill_one_lwp_callback): Ditto.
1307 (linux_kill): Don't dereference NULL pointer.
1308 Fetch ptid,lwpid from thread.
1309 (get_detach_signal): Fetch ptid from thread.
1310 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1311 Simplify call to regcache_invalidate_thread.
1312 (delete_lwp_callback): Update, "entry" parameter is a
1313 struct thread_info * now. Fetch pid from thread.
1314 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1315 (status_pending_p_callback): Update, "entry" parameter is a
1316 struct thread_info * now. Fetch ptid from thread.
1317 (find_lwp_pid): Update, "entry" parameter is a
1318 struct thread_info * now.
1319 (linux_wait_for_lwp): Fetch pid from thread.
1320 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1321 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1322 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1323 (dequeue_one_deferred_signal): Ditto.
1324 (cancel_breakpoint): Fetch ptid from current_inferior.
1325 (linux_wait_for_event): Pass &all_threads to find_inferior,
1326 not &all_lwps. Fetch ptid, lwpid from thread.
1327 (count_events_callback): Update, "entry" parameter is a
1328 struct thread_info * now.
1329 (select_singlestep_lwp_callback): Ditto.
1330 (select_event_lwp_callback): Ditto.
1331 (cancel_breakpoints_callback): Ditto.
1332 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1334 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1335 (unsuspend_one_lwp): Update, "entry" parameter is a
1336 struct thread_info * now.
1337 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1339 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1340 Fetch lwpid from thread, not lwp.
1341 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1342 Pass &all_threads to find_inferior, not &all_lwps.
1343 (send_sigstop): Fetch lwpid from thread, not lwp.
1344 (send_sigstop_callback): Update, "entry" parameter is a
1345 struct thread_info * now.
1346 (suspend_and_send_sigstop_callback): Ditto.
1347 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1348 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1349 struct thread_info * now.
1350 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1352 (lwp_running): Update, "entry" parameter is a
1353 struct thread_info * now.
1354 (stop_all_lwps): Fetch ptid from thread.
1355 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1356 (linux_resume_one_lwp): Fetch lwpid from thread.
1357 (linux_set_resume_request): Update, "entry" parameter is a
1358 struct thread_info * now. Fetch pid, lwpid from thread.
1359 (resume_status_pending_p): Update, "entry" parameter is a
1360 struct thread_info * now.
1361 (need_step_over_p): Ditto. Fetch lwpid from thread.
1362 (start_step_over): Fetch lwpid from thread.
1363 (linux_resume_one_thread): Update, "entry" parameter is a
1364 struct thread_info * now. Fetch lwpid from thread.
1365 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1366 (proceed_one_lwp): Update, "entry" parameter is a
1367 struct thread_info * now. Fetch lwpid from thread.
1368 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1369 struct thread_info * now.
1370 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1371 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1372 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1374 (regsets_store_inferior_registers): Ditto.
1375 (fetch_register, store_register): Ditto.
1376 (linux_read_memory, linux_write_memory): Ditto.
1377 (linux_request_interrupt): Ditto.
1378 (linux_read_auxv): Ditto.
1379 (linux_xfer_siginfo): Ditto.
1380 (linux_qxfer_spu): Ditto.
1381 (linux_qxfer_libraries_svr4): Ditto.
1382 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1383 moved to inferiors.h.
1385 (get_thread_lwp): Update.
1386 (struct lwp_info): Delete member "entry". Simplify comment for
1389 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1390 current_inferior directly.
1391 (update_watch_registers_callback): Update, "entry" parameter is a
1392 struct thread_info * now. Fetch pid from thread.
1393 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1394 (mips_insert_point): Fetch lwpid from current_inferior.
1395 Pass &all_threads to find_inferior, not &all_lwps.
1396 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1397 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1399 (mips_stopped_data_address): Ditto.
1400 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1402 * linux-tile-low.c (tile_arch_setup): Ditto.
1403 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1404 (update_debug_registers_callback): Update, "entry" parameter is a
1405 struct thread_info * now. Fetch pid from thread.
1406 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1407 Pass &all_threads to find_inferior, not &all_lwps.
1408 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1409 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1410 Pass &all_threads to find_inferior, not &all_lwps.
1411 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1412 (i386_dr_low_get_status): Ditto.
1413 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1414 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1415 (x86_linux_read_description): Ditto.
1416 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1418 2014-02-20 Doug Evans <dje@google.com>
1420 * inferiors.c (get_first_inferior): Fix buglet.
1422 2014-02-19 Doug Evans <dje@google.com>
1424 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1425 * inferiors.c (add_thread): Change result type to struct thread_info *.
1426 All callers updated.
1427 (add_lwp): Call add_thread here instead of in callers.
1428 All callers updated.
1429 * linux-low.h (get_lwp_thread): Rewrite.
1430 (struct lwp_info): New member "thread".
1432 2014-02-19 Doug Evans <dje@google.com>
1434 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1435 All callers updated.
1437 2014-02-19 Doug Evans <dje@google.com>
1439 * inferiors.c (add_thread): Fix whitespace.
1441 2014-02-19 Doug Evans <dje@google.com>
1443 * dll.c (clear_dlls): Replace accessing list implemention details
1445 * gdbthread.h (get_first_thread): Declare.
1446 * inferiors.c (for_each_inferior_with_data): New function.
1447 (get_first_thread): New function.
1448 (find_thread_ptid): Simplify.
1449 (get_first_inferior): New function.
1450 (clear_list): Delete.
1451 (one_inferior_p): New function.
1452 (clear_inferior_list): New function.
1453 (clear_inferiors): Update.
1454 * inferiors.h (for_each_inferior_with_data): Declare.
1455 (clear_inferior_list): Declare.
1456 (one_inferior_p): Declare.
1457 (get_first_inferior): Declare.
1458 * linux-low.c (linux_wait_for_event): Replace accessing list
1459 implemention details with API function.
1460 * server.c (target_running): Ditto.
1461 (accumulate_file_name_length): New function.
1462 (emit_dll_description): New function.
1463 (handle_qxfer_libraries): Replace accessing list implemention
1464 details with API function.
1465 (handle_qxfer_threads_worker): New function.
1466 (handle_qxfer_threads_proper): Replace accessing list implemention
1467 details with API function.
1468 (handle_query): Ditto.
1469 (visit_actioned_threads_callback_ftype): New typedef.
1470 (visit_actioned_threads_data): New struct.
1471 (visit_actioned_threads): Rewrite to be find_inferior callback.
1472 (resume): Call find_inferior.
1473 (handle_status): Replace accessing list implemention
1474 details with API function.
1475 (process_serial_event): Replace accessing list implemention details
1477 * target.c (set_desired_inferior): Replace accessing list implemention
1478 details with API function.
1479 * tracepoint.c (same_process_p): New function.
1480 (gdb_agent_about_to_close): Replace accessing list implemention
1481 details with API function.
1482 * win32-low.c (child_delete_thread): Replace accessing list
1483 implemention details with API function.
1484 (match_dll_by_basename): New function.
1485 (dll_is_loaded_by_basename): New function.
1486 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1487 details call to dll_is_loaded_by_basename.
1489 2014-02-19 Doug Evans <dje@google.com>
1491 * dll.h (struct dll_info): Add comment.
1492 * gdbthread.h (struct thread_info): Add comment.
1493 (current_ptid): Simplify.
1494 * inferiors.c (add_process): Update.
1495 (remove_process): Update.
1496 * inferiors.h (struct process_info): Rename member "head" to "entry".
1497 * linux-low.c (delete_lwp): Update.
1499 (last_thread_of_process_p): Update.
1500 (kill_one_lwp_callback, linux_kill): Update.
1501 (status_pending_p_callback): Update.
1502 (wait_for_sigstop): Update. Simplify read of ptid.
1503 (start_step_over): Update.
1504 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1505 (get_lwp_thread): Update.
1506 (struct lwp_info): Rename member "head" to "entry".
1507 * regcache.h (inferior_list_entry): Delete.
1508 * server.c (kill_inferior_callback): Update.
1509 (detach_or_kill_inferior_callback): Update.
1510 (print_started_pid): Update.
1511 (print_attached_pid): Update.
1512 (process_serial_event): Simplify read of ptid.
1513 * thread-db.c (thread_db_create_event): Update.
1514 (thread_db_get_tls_address): Update.
1515 * win32-low.c (current_inferior_ptid): Simplify.
1517 2014-02-19 Tom Tromey <tromey@redhat.com>
1519 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1521 (target_supports_btrace): Update.
1523 2014-02-14 Yao Qi <yao@codesourcery.com>
1525 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1526 (rsp-low-ipa.o): New target.
1528 2014-02-12 Tom Tromey <tromey@redhat.com>
1530 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1531 convert_ascii_to_int.
1532 * regcache.c (registers_to_string): Likewise.
1533 * remote-utils.c (decode_M_packet): Likewise.
1534 * server.c (process_serial_event): Likewise.
1536 2014-02-12 Tom Tromey <tromey@redhat.com>
1538 * server.c (handle_query, handle_v_run): Use hex2bin, not
1540 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1542 2014-02-12 Tom Tromey <tromey@redhat.com>
1544 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1545 convert_int_to_ascii.
1546 * regcache.c (registers_to_string, collect_register_as_string):
1548 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1550 * server.c (process_serial_event): Likewise.
1551 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1552 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1554 2014-02-12 Tom Tromey <tromey@redhat.com>
1556 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1557 bin2hex, not hexify.
1558 * tracepoint.c (cmd_qtstatus): Likewise.
1560 2014-02-12 Tom Tromey <tromey@redhat.com>
1562 * remote-utils.c (monitor_output): Pass explicit length to
1565 2014-02-12 Tom Tromey <tromey@redhat.com>
1567 * tracepoint.c: Include rsp-low.h.
1568 * server.c: Include rsp-low.h.
1569 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1570 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1572 * remote-utils.c: Include rsp-low.h.
1573 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1574 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1575 (convert_int_to_ascii, convert_ascii_to_int): Move to
1577 * regcache.c: Include rsp-low.h.
1578 * ax.c: Include rsp-low.h.
1579 * Makefile.in (SFILES): Add common/rsp-low.c.
1580 (OBS): Add rsp-low.o.
1581 (rsp-low.o): New target.
1583 2014-02-12 Tom Tromey <tromey@redhat.com>
1585 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1586 Include print-utils.h.
1587 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1588 (plongest, thirty_two, phex_nz): Remove.
1589 * Makefile.in (SFILES): Add common/print-utils.c.
1590 (OBS): Add print-utils.o.
1591 (print-utils-ipa.o): New target.
1592 (print-utils.o): New target.
1593 (IPA_OBJS): Add print-utils-ipa.o.
1595 2014-02-06 Tom Tromey <tromey@redhat.com>
1597 * Makefile.in (SFILES): Fix indentation.
1599 2014-02-05 Doug Evans <dje@google.com>
1601 * linux-low.c (linux_wait_for_event): Improve comment.
1602 (linux_wait_1): Keep current_inferior in sync with event_child.
1604 2014-01-22 Doug Evans <dje@google.com>
1606 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1608 2014-01-22 Doug Evans <dje@google.com>
1610 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1611 * configure: Regenerate.
1612 * config.in: Regenerate.
1613 * Makefile.in (SFILES): Add debug.c.
1615 * debug.c: New file.
1616 * debug.h: New file.
1617 * linux-aarch64-low.c (*): Update all debugging printfs to use
1618 debug_printf instead of fprintf.
1619 * linux-arm-low.c (*): Ditto.
1620 * linux-cris-low.c (*): Ditto.
1621 * linux-crisv32-low.c (*): Ditto.
1622 * linux-m32r-low.c (*): Ditto.
1623 * linux-sparc-low.c (*): Ditto.
1624 * linux-x86.c (*): Ditto.
1625 * linux-low.c (*): Ditto.
1626 (linux_wait_1): Add calls to debug_enter, debug_exit.
1627 (linux_wait): Remove redundant debugging printf.
1628 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1629 (linux_resume, unstop_all_lwps): Ditto.
1630 * mem-break.c (*): Update all debugging printfs to use
1631 debug_printf instead of fprintf.
1632 * remote-utils.c (*): Ditto.
1633 * thread-db.c (*): Ditto.
1634 * server.c #include <ctype.h>, "gdb_vecs.h".
1635 (debug_threads): Moved to debug.c.
1636 (*): Update all debugging printfs to use debug_printf instead of
1638 (start_inferior): Replace call to fflush with call to debug_flush.
1639 (monitor_show_help): Mention set debug-format.
1640 (parse_debug_format_options): New function.
1641 (handle_monitor_command): Handle "monitor set debug-format".
1642 (gdbserver_usage): Mention --debug-format.
1643 (main): Parse --debug-format.
1644 * server.h (debug_threads): Declaration moved to debug.h.
1646 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1647 trace_debug_1 that uses debug_printf.
1648 (tracepoint_look_up_symbols): Update all debugging printfs to use
1649 debug_printf instead of fprintf.
1651 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1653 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1656 2014-01-17 Pedro Alves <palves@redhat.com>
1659 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1660 defined after including gdb_proc_service.h.
1662 2014-01-16 Doug Evans <dje@google.com>
1664 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1665 (match_dll): Use it.
1667 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1669 * target.h (target_ops) <read_btrace>: Change parameters and
1670 return type to allow error reporting.
1671 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1672 trace reading errors on.
1673 * linux-low.c (linux_low_read_btrace): Pass trace reading
1675 (linux_low_disable_btrace): New.
1677 2014-01-15 Doug Evans <dje@google.com>
1679 * inferiors.c (thread_id_to_gdb_id): Delete.
1680 * inferiors.h (thread_id_to_gdb_id): Delete.
1682 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1684 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1685 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1688 2014-01-08 Pedro Alves <palves@redhat.com>
1690 * server.c (handle_status): Don't discard previous queued stop
1691 replies or thread's pending status here.
1692 (main) <disconnection>: Do it here instead.
1694 2014-01-08 Pedro Alves <palves@redhat.com>
1696 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1697 * server.c (visit_actioned_threads, handle_pending_status): New
1699 (handle_v_cont): Factor out parts to ...
1700 (resume): ... this new function. If in all-stop, and a thread
1701 being resumed has a pending status, report it without actually
1703 (myresume): Adjust to use the new 'resume' function.
1704 (clear_pending_status_callback, set_pending_status_callback)
1705 (find_status_pending_thread_callback): New functions.
1706 (handle_status): Handle the case of multiple threads having
1707 interesting statuses to report. Report threads' real last signal
1708 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1709 with an interesting thread to report the status for, instead of
1710 always reporting the status of the first thread.
1712 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1714 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1715 * gdbreplay.c (gdbreplay_version): Likewise.
1717 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1719 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1720 iov.iov_len with the real length in use.
1722 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1724 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1725 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1726 for all targets that use win32-low.c.
1727 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1728 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1730 2013-12-13 Pedro Alves <palves@redhat.com>
1732 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1733 if equal to TARGET_WAITKIND_LOADED.
1734 * win32-low.c (cached_status): New static global.
1735 (win32_wait): Add declaration.
1736 (do_initial_child_stuff): Flush all initial pending debug events
1737 up to the initial breakpoint.
1738 (win32_wait): If CACHED_STATUS was set, return that instead
1739 of doing a real wait. Remove the code resuming the execution
1740 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1741 during the initial phase. Also remove the code changing
1742 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1743 TARGET_WAITKIND_STOPPED.
1745 2013-12-11 Yao Qi <yao@codesourcery.com>
1747 * notif.c (handle_notif_ack): Return 0 if no notification
1750 2013-11-20 Doug Evans <dje@google.com>
1752 * linux-low.c (linux_set_resume_request): Fix comment.
1754 2013-11-20 Doug Evans <dje@google.com>
1756 * linux-low.c (resume_status_pending_p): Tweak comment.
1758 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1760 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1761 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1762 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1763 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1764 (srv_amd64_regobj): Add amd64-mpx.o.
1765 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1766 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1767 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1768 * i387-fp.c (num_pl_bnd_register) Added constant.
1769 (num_pl_bnd_cfg_registers) Added constant.
1770 (struct i387_xsave) Added reserved area and MPX fields.
1771 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1772 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1774 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1775 (init_registers_amd64_mpx_linux): Declare new function.
1776 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1777 (x86_64_regmap): Add MPX registers.
1778 (x86_linux_read_description): Add MPX case.
1779 (initialize_low_arch): Initialize MPX targets.
1781 2013-11-18 Tom Tromey <tromey@redhat.com>
1783 * configure: Rebuild.
1784 * configure.ac: Don't check for stdlib.h.
1785 * gdbreplay.c: Unconditionally include stdlib.h.
1787 2013-11-18 Tom Tromey <tromey@redhat.com>
1789 * config.in: Rebuild.
1790 * configure: Rebuild.
1791 * configure.ac: Don't use AC_HEADER_DIRENT.
1793 2013-11-18 Tom Tromey <tromey@redhat.com>
1795 * server.h: Don't check HAVE_STRING_H.
1796 * gdbreplay.c: Don't check HAVE_STRING_H.
1797 * configure: Rebuild.
1799 2013-11-18 Tom Tromey <tromey@redhat.com>
1801 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1804 2013-11-08 Tom Tromey <tromey@redhat.com>
1806 * configure, config.in: Rebuild.
1807 * configure.ac: Remove unused configury.
1809 2013-11-08 Tom Tromey <tromey@redhat.com>
1811 * acinclude.m4: Include common.m4, codeset.m4.
1812 * configure, config.in: Rebuild.
1813 * configure.ac: Use GDB_AC_COMMON.
1815 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1817 * linux-s390-low.c (HWCAP_S390_TE): New define.
1818 (s390_arch_setup): Consider the TE field in the HWCAP for
1819 determining 'have_regset_tdb'.
1821 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1824 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1827 2013-10-02 Pedro Alves <palves@redhat.com>
1829 * server.c (process_serial_event): Don't output "GDBserver
1830 exiting" if GDB is connected through stdio.
1831 * target.c (mywait): Likewise, be silent if GDB is connected
1834 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1836 * lynx-low.c (lynx_add_threads_after_attach): New function.
1837 (lynx_attach): Remove call to add_thread. Add call to
1838 lynx_add_threads_after_attach instead.
1840 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1842 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1843 * config.in, configure: Regenerated.
1845 2013-09-18 Yao Qi <yao@codesourcery.com>
1848 * server.c (start_inferior): Clear 'resume_info'.
1850 2013-09-16 Jiong Wang <jiwang@tilera.com>
1852 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1855 2013-09-16 Jiong Wang <jiwang@tilera.com>
1857 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1858 linux-tile-low.o to srv_tgtobj.
1860 2013-09-16 Will Newton <will.newton@linaro.org>
1862 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1865 2013-09-06 Pedro Alves <palves@redhat.com>
1867 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1868 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1869 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1870 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1871 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1872 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1874 2013-09-06 Pedro Alves <palves@redhat.com>
1876 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1877 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1879 2013-09-06 Pedro Alves <palves@redhat.com>
1881 * linux-amd64-ipa.c: Include tracepoint.h.
1882 * linux-i386-ipa.c: Include tracepoint.h.
1884 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1886 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1887 (ps_get_thread_area): New function.
1889 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1891 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1892 (initialize_low_arch): Call init_registers_crisv32 rather than
1893 init_register_crisv32.
1895 2013-09-05 Pedro Alves <palves@redhat.com>
1897 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1899 * hostio.h: ... this new file.
1900 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1901 win32-low.c: Include hostio.h.
1903 2013-09-05 Pedro Alves <palves@redhat.com>
1905 * server.h (gdb_client_data, handler_func, callback_handler_func)
1906 (delete_file_handler, add_file_handler, append_callback_event)
1907 (delete_callback_event, start_event_loop, initialize_event_loop):
1908 Move to event-loop.h and include it.
1909 * event-loop.h: New file.
1911 2013-09-05 Pedro Alves <palves@redhat.com>
1913 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1914 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1915 (loaded_dll, unloaded_dll): Move to ...
1916 * dll.h: ... this new file.
1917 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1919 2013-09-05 Pedro Alves <palves@redhat.com>
1921 * server.h (current_process, get_thread_process, all_processes)
1922 (add_inferior_to_list, for_each_inferior, current_inferior)
1923 (remove_inferior, add_process, remove_process, find_process_pid)
1924 (have_started_inferiors_p, have_attached_inferiors_p)
1925 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1926 (clear_inferiors, find_inferior, find_inferior_id)
1927 (inferior_target_data, set_inferior_target_data)
1928 (inferior_regcache_data, set_inferior_regcache_data): Move to
1929 inferiors.h, and include it.
1930 * inferiors.h: New file.
1932 2013-09-05 Pedro Alves <palves@redhat.com>
1934 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1938 2013-09-05 Pedro Alves <palves@redhat.com>
1940 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1942 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1943 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1944 (handle_tracepoint_general_set, handle_tracepoint_query)
1945 (tracepoint_finished_step, tracepoint_was_hit)
1946 (release_while_stepping_state_list, current_traceframe)
1947 (in_readonly_region, traceframe_read_mem)
1948 (fetch_traceframe_registers, traceframe_read_sdata)
1949 (traceframe_read_info, struct fast_tpoint_collect_status)
1950 (fast_tracepoint_collecting, force_unlock_trace_buffer)
1951 (handle_tracepoit_bkpts, initialize_low_tracepoint)
1952 (supply_fast_tracepoint_registers)
1953 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
1954 (ipa_tdesc, claim_trampoline_space)
1955 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
1956 (agent_mem_read, agent_get_trace_state_variable_value)
1957 (agent_set_trace_state_variable_value, agent_tsv_read)
1958 (agent_mem_read_string, get_raw_reg_func_addr)
1959 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
1960 * tracepoint.h: ... this new file.
1962 2013-09-05 Pedro Alves <palves@redhat.com>
1964 * server.h (perror_with_name, error, fatal, warning, paddress)
1965 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
1967 * utils.h: New file.
1969 2013-09-05 Pedro Alves <palves@redhat.com>
1971 * server.h (remote_debug, noack_mode, transport_is_reliable)
1972 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
1973 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
1974 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
1975 (write_enn, initialize_async_io, enable_async_io)
1976 (disable_async_io, check_remote_input_interrupt_request)
1977 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
1978 (dead_thread_notify, prepare_resume_reply)
1979 (decode_address_to_semicolon, decode_address, decode_m_packet)
1980 (decode_M_packet, decode_X_packet, decode_xfer_write)
1981 (decode_search_memory_packet, unhexify, hexify)
1982 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
1983 (look_up_one_symbol, relocate_instruction)
1984 (monitor_output): Move to remote-utils.h, and include it.
1985 * remote-utils.h: New file.
1987 2013-09-05 Pedro Alves <palves@redhat.com>
1989 * server.h (_): Delete.
1991 2013-09-02 Pedro Alves <palves@redhat.com>
1993 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
1994 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
1996 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
1998 2013-09-02 Pierre Muller <muller@sourceware.org>
2000 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2001 or WriteProcessMemory complete successfully and handle
2002 ERROR_PARTIAL_COPY error.
2004 2013-09-02 Pedro Alves <palves@redhat.com>
2006 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2007 error instead of EIO.
2009 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2012 * linux-low.c: Include filestuff.h.
2013 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2014 * lynx-low.c: Include filestuff.h.
2015 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2016 * server.c: Include filestuff.h.
2017 (main): Call notice_open_fds.
2018 * spu-low.c: Include filestuff.h.
2019 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2021 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2023 * Makefile.in: Explain why ../target and ../nat are not
2024 listed as include file search paths.
2025 (linux-waitpid.o): New object file rule.
2026 * configure.srv (srv_native_linux_obj): New variable.
2027 Replace all occurrences of linux native object files with
2028 $srv_native_linux_obj.
2029 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2030 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2031 (linux_enable_event_reporting): Remove declaration.
2032 (my_waitpid): Moved to common/linux-waitpid.c.
2033 (linux_wait_for_event): Pass ptid when calling
2034 linux_enable_event_reporting.
2035 (linux_supports_tracefork_flag): Remove.
2036 (linux_enable_event_reporting): Likewise.
2037 (linux_tracefork_grandchild): Remove.
2038 (STACK_SIZE): Moved to common/linux-ptrace.c.
2039 (linux_tracefork_child): Remove.
2040 (linux_test_for_tracefork): Remove.
2041 (linux_look_up_symbols): Call linux_supports_traceclone.
2042 (initialize_low): Remove call to linux_test_for_tracefork.
2043 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2044 common/linux-ptrace.h.
2045 (PTRACE_TYPE_ARG4): Likewise.
2046 Include linux-ptrace.h.
2048 2013-08-21 Pedro Alves <palves@redhat.com>
2050 * config.in: Renegerate.
2052 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2054 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2055 (SFILES): Remove $(srcdir)/common/target-common.c and
2056 add $(srcdir)/target/waitstatus.c.
2057 (OBS): Remove target-common.o and add waitstatus.o.
2058 (server_h): Remove $(srcdir)/../common/target-common.h and
2059 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2060 and $(srcdir)/../target/waitstatus.h.
2061 (target-common.o): Remove.
2062 (waitstatus.o): New target object file.
2063 * target.h: Do not include target-common.h and
2064 include target/resume.h, target/wait.h and
2065 target/waitstatus.h.
2067 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2069 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2070 to PTRACE_TYPE_ARG3.
2071 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2072 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2074 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2075 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2077 2013-07-27 Jie Zhang <jie@codesourcery.com>
2078 Daniel Jacobowitz <dan@codesourcery.com>
2079 Yao Qi <yao@codesourcery.com>
2081 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2082 (mips-linux-watch.o): New rule.
2083 (mips_linux_watch_h): New variable.
2084 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2086 * linux-mips-low.c: Include mips-linux-watch.h.
2087 (struct arch_process_info, struct arch_lwp_info): New.
2088 (update_watch_registers_callback): New function.
2089 (mips_linux_new_process, mips_linux_new_thread) New functions.
2090 (mips_linux_prepare_to_resume, mips_insert_point): New
2092 (mips_remove_point, mips_stopped_by_watchpoint): New
2094 (rsp_bp_type_to_target_hw_bp_type): New function.
2095 (mips_stopped_data_address): New function.
2096 (the_low_target): Add watchpoint support functions.
2098 2013-07-27 Yao Qi <yao@codesourcery.com>
2100 * i386-low.c: Include break-common.h.
2101 (enum target_hw_bp_type): Remove.
2103 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2105 * Makefile.in (SFILES): /common/target-common.c.
2106 (OBS): Add target-common.o.
2107 (server_h): Add $(srcdir)/../common/target-common.h.
2108 (target-common.o): New target.
2109 * server.c (queue_stop_reply_callback): Free
2110 status string after use.
2111 * target.c (target_waitstatus_to_string): Remove.
2112 * target.h: Include target-common.h.
2113 (resume_kind): Likewise.
2114 (target_waitkind): Likewise.
2115 (target_waitstatus): Likewise.
2116 (TARGET_WNOHANG): Likewise.
2118 2013-07-04 Yao Qi <yao@codesourcery.com>
2120 * Makefile.in (host_alias): Use @host_noncanonical@.
2121 (target_alias): Use @target_noncanonical@.
2122 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2123 ACX_NONCANONICAL_HOST.
2124 * configure: Regenerated.
2127 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2129 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2130 * configure: Rebuild.
2131 * Makefile.in (version_host, version_target): Get from configure.
2132 (version.c): Use $(version_host) and $(version_target).
2134 2013-07-03 Pedro Alves <palves@redhat.com>
2136 * Makefile.in (config.status): Depend on development.sh.
2137 * acinclude.m4: Include libmcheck.m4.
2138 * configure: Regenerate.
2140 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2142 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2143 attribute inside the parentheses.
2144 (winapi_DebugSetProcessKillOnExit): Ditto.
2145 (winapi_DebugBreakProcess): Ditto.
2146 (winapi_GenerateConsoleCtrlEvent): Ditto.
2148 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2150 * notif.h (notif_event): Add a dummy member to avoid compiler
2153 2013-07-01 Pedro Alves <palves@redhat.com>
2155 * hostio.c (HOSTIO_PATH_MAX): Define.
2156 (require_filename, handle_open, handle_unlink, handle_readlink):
2159 2013-07-01 Pedro Alves <palves@redhat.com>
2161 * server.h: Include "pathmax.h".
2162 * linux-low.c: Don't include sys/param.h.
2163 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2165 * win32-low.c: Don't include sys/param.h.
2166 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2168 2013-07-01 Pedro Alves <palves@redhat.com>
2170 * event-loop.c: Don't check HAVE_UNISTD_H before including
2172 * gdbreplay.c: Likewise.
2173 * remote-utils.c: Likewise.
2174 * server.c: Likewise.
2175 * configure.ac: Don't check for unistd.h.
2176 * configure: Regenerate.
2178 2013-06-28 Tom Tromey <tromey@redhat.com>
2180 * Makefile.in (version.c): Use version.in, not
2183 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2185 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2186 * configure: Rebuild.
2187 * Makefile.in (version_host, version_target): Get from configure.
2188 (version.c): Use $(version_host) and $(version_target).
2190 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2192 Fix trace-status to output user name without trailing colon.
2193 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2195 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2197 Fix trace-status to output proper start-time and stop-time.
2198 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2199 output start time and stop time in hex as gdb expects.
2201 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2203 * tracepoint.c (build_traceframe_info_xml): Output trace state
2204 variables present in the trace buffer.
2206 2013-06-24 Tom Tromey <tromey@redhat.com>
2208 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2210 (version.o): Remove.
2211 * gdbreplay.c: Include version.h.
2212 (version, host_name): Don't declare.
2213 * server.h: Include version.h.
2214 (version, host_name): Don't declare.
2216 2013-06-12 Pedro Alves <palves@redhat.com>
2218 * linux-x86-low.c (linux_is_elf64): Delete global.
2219 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2220 with local linux_pid_exe_is_elf_64_file use.
2222 2013-06-11 Pedro Alves <palves@redhat.com>
2224 * linux-low.c (regset_disabled, disable_regset): New functions.
2225 (regsets_fetch_inferior_registers)
2226 (regsets_store_inferior_registers): Use them.
2227 (initialize_regsets_info); Don't allocate the disabled_regsets
2229 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2232 2013-06-11 Pedro Alves <palves@redhat.com>
2234 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2237 2013-06-11 Pedro Alves <palves@redhat.com>
2239 * linux-x86-low.c (initialize_low_arch): Call
2240 init_registers_x32_avx_linux.
2242 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2244 Fix compatibility with Android Bionic.
2245 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2248 2013-06-07 Pedro Alves <palves@redhat.com>
2251 * Makefile.in (OBS): Add tdesc.o.
2252 (IPA_OBJS): Add tdesc-ipa.o.
2253 (tdesc-ipa.o): New rule.
2254 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2256 * linux-low.c (new_inferior): Delete.
2257 (disabled_regsets, num_regsets): Delete.
2258 (linux_add_process): Adjust to set the new per-process
2260 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2261 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2262 was a stop. When calling arch_setup, switch the current inferior
2263 to the thread that got an event.
2264 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2265 (regsets_fetch_inferior_registers)
2266 (regsets_store_inferior_registers): New regsets_info parameter.
2268 (linux_register_in_regsets): New regs_info parameter. Adjust to
2270 (register_addr, fetch_register, store_register): New usrregs_info
2271 parameter. Adjust to use it.
2272 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2273 parameter regs_info. Adjust to use it.
2274 (linux_fetch_registers): Get the current inferior's regs_info, and
2276 (linux_store_registers): Ditto.
2277 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2278 (initialize_low): Don't initialize the target_regsets here. Call
2279 initialize_low_arch.
2280 * linux-low.h (target_regsets): Delete declaration.
2281 (struct regsets_info): New.
2282 (struct usrregs_info): New.
2283 (struct regs_info): New.
2284 (struct process_info_private) <new_inferior>: New field.
2285 (struct linux_target_ops): Delete the num_regs, regmap, and
2286 regset_bitmap fields. New field regs_info.
2287 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2288 * i387-fp.c (num_xmm_registers): Delete.
2289 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2290 calls to new interface.
2291 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2292 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2293 Infer the number of xmm registers from the regcache's target
2295 * i387-fp.h (num_xmm_registers): Delete.
2296 * inferiors.c (add_thread): Don't install the thread's regcache
2298 * proc-service.c (gregset_info): Fetch the current inferior's
2299 regs_info. Adjust to use it.
2300 * regcache.c: Include tdesc.h.
2301 (register_bytes, reg_defs, num_registers)
2302 (gdbserver_expedite_regs): Delete.
2303 (get_thread_regcache): If the thread doesn't have a regcache yet,
2304 create one, instead of aborting gdbserver.
2305 (regcache_invalidate_one): Rename to ...
2306 (regcache_invalidate_thread): ... this.
2307 (regcache_invalidate_one): New.
2308 (regcache_invalidate): Only invalidate registers of the current
2310 (init_register_cache): Add target_desc parameter, and use it.
2311 (new_register_cache): Ditto. Assert the target description has a
2312 non zero registers_size.
2313 (regcache_cpy): Add assertions. Adjust.
2314 (realloc_register_cache, set_register_cache): Delete.
2315 (registers_to_string, registers_from_string): Adjust.
2316 (find_register_by_name, find_regno, find_register_by_number)
2317 (register_cache_size): Add target_desc parameter, and use it.
2318 (free_register_cache_thread, free_register_cache_thread_one)
2319 (regcache_release, register_cache_size): New.
2320 (register_size): Add target_desc parameter, and use it.
2321 (register_data, supply_register, supply_register_zeroed)
2322 (supply_regblock, supply_register_by_name, collect_register)
2323 (collect_register_as_string, collect_register_by_name): Adjust.
2324 * regcache.h (struct target_desc): Forward declare.
2325 (struct regcache) <tdesc>: New field.
2326 (init_register_cache, new_register_cache): Add target_desc
2328 (regcache_invalidate_thread): Declare.
2329 (regcache_invalidate_one): Delete declaration.
2330 (regcache_release): Declare.
2331 (find_register_by_number, register_cache_size, register_size)
2332 (find_regno): Add target_desc parameter.
2333 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2335 * remote-utils.c: Include tdesc.h.
2336 (outreg, prepare_resume_reply): Adjust.
2337 * server.c: Include tdesc.h.
2338 (gdbserver_xmltarget): Delete declaration.
2339 (get_features_xml, process_serial_event): Adjust.
2340 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2342 (struct process_info) <tdesc>: New field.
2343 (ipa_tdesc): Declare.
2344 * tdesc.c: New file.
2345 * tdesc.h: New file.
2346 * tracepoint.c: Include tdesc.h.
2347 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2348 (get_context_regcache): Adjust to pass ipa_tdesc down.
2349 (do_action_at_tracepoint): Adjust to get the register cache size
2350 from the context regcache's description.
2351 (traceframe_walk_blocks): Adjust to get the register cache size
2352 from the current trace frame's description.
2353 (traceframe_get_pc): Adjust to get current trace frame's
2354 description and pass it down.
2355 (gdb_collect): Adjust to get the register cache size from the
2357 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2358 (gdbserver_xmltarget): Delete.
2359 (initialize_low_tracepoint): Set the ipa's target description.
2360 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2361 (initialize_low_tracepoint): Set the ipa's target description.
2362 * linux-x86-low.c: Include tdesc.h.
2363 [__x86_64__] (is_64bit_tdesc): New.
2364 (ps_get_thread_area, x86_get_thread_area): Use it.
2365 (i386_cannot_store_register): Rename to ...
2366 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2367 (i386_cannot_fetch_register): Rename to ...
2368 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2369 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2371 (target_regsets): Rename to ...
2372 (x86_regsets): ... this.
2373 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2375 (x86_siginfo_fixup): Use is_64bit_tdesc.
2376 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2377 (tdesc_x32_avx_linux, tdesc_x32_linux)
2378 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2380 (x86_linux_update_xmltarget): Delete.
2381 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2382 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2383 (AMD64_LINUX_USER64_CS): New.
2384 (x86_linux_read_description): New, based on
2385 x86_linux_update_xmltarget.
2386 (same_process_callback): New.
2387 (x86_arch_setup_process_callback): New.
2388 (x86_linux_update_xmltarget): New.
2389 (x86_regsets_info): New.
2390 (amd64_linux_regs_info): New.
2391 (i386_linux_usrregs_info): New.
2392 (i386_linux_regs_info): New.
2393 (x86_linux_regs_info): New.
2394 (x86_arch_setup): Reimplement.
2395 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2396 (x86_emit_ops): Ditto.
2397 (the_low_target): Adjust. Install x86_linux_regs_info,
2398 x86_cannot_fetch_register, and x86_cannot_store_register.
2399 (initialize_low_arch): New.
2400 * linux-ia64-low.c (tdesc_ia64): Declare.
2401 (ia64_fetch_register): Adjust.
2402 (ia64_usrregs_info, regs_info): New globals.
2403 (ia64_regs_info): New function.
2404 (the_low_target): Adjust.
2405 (initialize_low_arch): New function.
2406 * linux-sparc-low.c (tdesc_sparc64): Declare.
2407 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2409 (sparc_arch_setup): New function.
2410 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2411 (the_low_target): Adjust.
2412 (initialize_low_arch): New function.
2413 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2414 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2415 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2416 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2417 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2418 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2419 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2420 (tdesc_powerpc_isa205_vsx64l): Declare.
2421 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2422 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2423 (ppc_set_pc, ppc_get_hwcap): Adjust.
2424 (ppc_usrregs_info): Forward declare.
2425 (!__powerpc64__) ppc_regmap_adjusted: New global.
2426 (ppc_arch_setup): Adjust to the current process'es target
2428 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2429 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2430 (ppc_store_evrregset): Adjust.
2431 (target_regsets): Rename to ...
2432 (ppc_regsets): ... this, and make static.
2433 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2434 (ppc_regs_info): New function.
2435 (the_low_target): Adjust.
2436 (initialize_low_arch): New function.
2437 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2438 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2439 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2440 (tdesc_s390x_linux64v2): Declare.
2441 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2442 (s390_fill_gregset, s390_store_last_break): Adjust.
2443 (target_regsets): Rename to ...
2444 (s390_regsets): ... this, and make static.
2445 (s390_get_pc, s390_set_pc): Adjust.
2446 (s390_get_hwcap): New target_desc parameter, and use it.
2447 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2448 (s390_arch_setup): Adjust to set the current process'es target
2449 description. Don't adjust the regmap.
2450 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2451 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2452 (regs_info_3264): New globals.
2453 (s390_regs_info): New function.
2454 (the_low_target): Adjust.
2455 (initialize_low_arch): New function.
2456 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2457 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2458 [__mips64] (init_registers_mips_linux)
2459 (init_registers_mips_dsp_linux): Delete defines.
2460 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2461 (have_dsp): New global.
2462 (mips_read_description): New, based on mips_arch_setup.
2463 (mips_arch_setup): Reimplement.
2464 (get_usrregs_info): New function.
2465 (mips_cannot_fetch_register, mips_cannot_store_register)
2466 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2467 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2468 (target_regsets): Rename to ...
2469 (mips_regsets): ... this, and make static.
2470 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2471 (dsp_regs_info, regs_info): New globals.
2472 (mips_regs_info): New function.
2473 (the_low_target): Adjust.
2474 (initialize_low_arch): New function.
2475 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2476 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2478 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2479 (arm_read_description): New, with bits factored from
2481 (arm_arch_setup): Reimplement.
2482 (target_regsets): Rename to ...
2483 (arm_regsets): ... this, and make static.
2484 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2485 (arm_regs_info): New function.
2486 (the_low_target): Adjust.
2487 (initialize_low_arch): New function.
2488 * linux-m68k-low.c (tdesc_m68k): Declare.
2489 (target_regsets): Rename to ...
2490 (m68k_regsets): ... this, and make static.
2491 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2492 (m68k_regs_info): New function.
2493 (m68k_arch_setup): New function.
2494 (the_low_target): Adjust.
2495 (initialize_low_arch): New function.
2496 * linux-sh-low.c (tdesc_sharch): Declare.
2497 (target_regsets): Rename to ...
2498 (sh_regsets): ... this, and make static.
2499 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2500 (sh_regs_info, sh_arch_setup): New functions.
2501 (the_low_target): Adjust.
2502 (initialize_low_arch): New function.
2503 * linux-bfin-low.c (tdesc_bfin): Declare.
2504 (bfin_arch_setup): New function.
2505 (bfin_usrregs_info, regs_info): New globals.
2506 (bfin_regs_info): New function.
2507 (the_low_target): Adjust.
2508 (initialize_low_arch): New function.
2509 * linux-cris-low.c (tdesc_cris): Declare.
2510 (cris_arch_setup): New function.
2511 (cris_usrregs_info, regs_info): New globals.
2512 (cris_regs_info): New function.
2513 (the_low_target): Adjust.
2514 (initialize_low_arch): New function.
2515 * linux-cris-low.c (tdesc_crisv32): Declare.
2516 (cris_arch_setup): New function.
2517 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2518 (cris_regs_info): New function.
2519 (the_low_target): Adjust.
2520 (initialize_low_arch): New function.
2521 * linux-m32r-low.c (tdesc_m32r): Declare.
2522 (m32r_arch_setup): New function.
2523 (m32r_usrregs_info, regs_info): New globals.
2524 (m32r_regs_info): Adjust.
2525 (initialize_low_arch): New function.
2526 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2527 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2528 (tic6x_usrregs_info): Forward declare.
2529 (tic6x_read_description): New function, based on ...
2530 (tic6x_arch_setup): ... this. Reimplement.
2531 (target_regsets): Rename to ...
2532 (tic6x_regsets): ... this, and make static.
2533 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2534 (tic6x_regs_info): New function.
2535 (the_low_target): Adjust.
2536 (initialize_low_arch): New function.
2537 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2538 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2539 (target_regsets): Rename to ...
2540 (xtensa_regsets): ... this, and make static.
2541 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2543 (xtensa_arch_setup, xtensa_regs_info): New functions.
2544 (the_low_target): Adjust.
2545 (initialize_low_arch): New function.
2546 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2547 (nios2_arch_setup): Set the current process'es tdesc.
2548 (target_regsets): Rename to ...
2549 (nios2_regsets): ... this.
2550 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2551 (nios2_regs_info): New function.
2552 (the_low_target): Adjust.
2553 (initialize_low_arch): New function.
2554 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2555 (aarch64_arch_setup): Set the current process'es tdesc.
2556 (target_regsets): Rename to ...
2557 (aarch64_regsets): ... this.
2558 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2559 (aarch64_regs_info): New function.
2560 (the_low_target): Adjust.
2561 (initialize_low_arch): New function.
2562 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2564 (target_regsets): Rename to ...
2565 (tile_regsets): ... this.
2566 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2567 (tile_regs_info): New function.
2568 (tile_arch_setup): Set the current process'es tdesc.
2569 (the_low_target): Adjust.
2570 (initialize_low_arch): New function.
2571 * spu-low.c (tdesc_spu): Declare.
2572 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2573 * win32-arm-low.c (tdesc_arm): Declare.
2574 (arm_arch_setup): New function.
2575 (the_low_target): Install arm_arch_setup instead of
2577 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2578 (init_windows_x86): Rename to ...
2579 (i386_arch_setup): ... this. Set `win32_tdesc'.
2580 (the_low_target): Adjust.
2581 * win32-low.c (win32_tdesc): New global.
2582 (child_add_thread): Don't create the thread cache here.
2583 (do_initial_child_stuff): Set the new process'es tdesc.
2584 * win32-low.h (struct target_desc): Forward declare.
2585 (win32_tdesc): Declare.
2586 * lynx-i386-low.c (tdesc_i386): Declare global.
2587 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2588 * lynx-low.c (lynx_tdesc): New global.
2589 (lynx_add_process): Set the new process'es tdesc.
2590 * lynx-low.h (struct target_desc): Forward declare.
2591 (lynx_tdesc): Declare global.
2592 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2593 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2594 * nto-low.c (nto_tdesc): New global.
2595 (do_attach): Set the new process'es tdesc.
2596 * nto-low.h (struct target_desc): Forward declare.
2597 (nto_tdesc): Declare.
2598 * nto-x86-low.c (tdesc_i386): Declare.
2599 (nto_x86_arch_setup): Set `nto_tdesc'.
2601 2013-06-04 Gary Benson <gbenson@redhat.com>
2603 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2604 to qSupported response when appropriate.
2605 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2606 with nonzero-length annex.
2607 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2608 arguments supplied in annex.
2610 2013-05-31 Doug Evans <dje@google.com>
2613 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2614 64 bits in 64-cross-32 environment.
2616 2013-05-28 Pedro Alves <palves@redhat.com>
2618 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2619 (aarch64-without-fpu.c): Delete rule.
2620 * configure.srv (aarch64*-*-linux*): Remove references to
2621 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2622 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2625 2013-05-24 Pedro Alves <palves@redhat.com>
2627 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2628 instead of strchr/decode_address. Error if the range isn't split
2629 with a ','. Don't assume there's be a ':' in the action.
2631 2013-05-23 Yao Qi <yao@codesourcery.com>
2632 Pedro Alves <palves@redhat.com>
2634 * linux-low.c (lwp_in_step_range): New function.
2635 (linux_wait_1): If the thread was range stepping and stopped
2636 outside the stepping range, report the stop to GDB. Otherwise,
2637 continue stepping. Add range stepping debug output.
2638 (linux_set_resume_request): Copy the step range from the resume
2640 (linux_supports_range_stepping): New.
2641 (linux_target_ops) <supports_range_stepping>: Set to
2642 linux_supports_range_stepping.
2643 * linux-low.h (struct linux_target_ops)
2644 <supports_range_stepping>: New field.
2645 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2646 * linux-x86-low.c (x86_supports_range_stepping): New.
2647 (the_low_target) <supports_range_stepping>: Set to
2648 x86_supports_range_stepping.
2649 * server.c (handle_v_cont): Handle 'r' action.
2650 (handle_v_requests): Append ";r" if the target supports range
2652 * target.h (struct thread_resume) <step_range_start,
2653 step_range_end>: New fields.
2654 (struct target_ops) <supports_range_stepping>:
2656 (target_supports_range_stepping): New macro.
2658 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2660 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2661 confusion in comment.
2663 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2665 * lynx-low.c (struct process_info_private): New type.
2666 (lynx_add_process): New function.
2667 (lynx_create_inferior, lynx_attach): Replace calls to
2668 add_process by calls to lynx_add_process.
2669 (lynx_resume): If PTID is null, then try using
2670 current_process()->private->last_wait_event_ptid.
2672 (lynx_clear_inferiors): Delete. The contents of that function
2673 has been inlined in lynx_mourn;
2674 (lynx_wait_1): Save the ptid in the process's private data.
2675 (lynx_mourn): Free the process' private data. Replace call
2676 to lynx_clear_inferiors by call to clear_inferiors.
2678 2013-05-17 Yao Qi <yao@codesourcery.com>
2680 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2683 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2685 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2686 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2687 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2688 PT_TEXT_END_ADDR guards. Update comments.
2689 (linux_target_op) <read_offsets>: Conditionally define to
2690 linux_read_offsets if the target is UCLIBC and if it defines
2691 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2693 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2694 Andrew Jenner <andrew@codesourcery.com>
2696 * Makefile.in (SFILES): Add linux-nios2-low.c.
2697 (clean): Add action to delete nios2-linux.c.
2698 (nios2-linux.c): New rule.
2699 * configure.srv: Add nios2*-*-linux*.
2700 * linux-nios2-low.c: New.
2702 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2704 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2706 2013-04-25 Hui Zhu <hui@codesourcery.com>
2709 * ax.c (ax_printf): Add fflush.
2711 2013-04-22 Tom Tromey <tromey@redhat.com>
2713 * Makefile.in (SFILES): Add filestuff.c.
2714 (OBS): Add filestuff.o.
2715 (filestuff.o): New target.
2716 * config.in, configure: Rebuild.
2717 * configure.ac: Check for fdwalk, pipe2.
2719 2013-04-17 Pedro Alves <palves@redhat.com>
2721 * configure.ac (USE_THREAD_DB): Delete variable.
2722 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2723 Don't AC_SUBST USE_THREAD_DB.
2724 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2725 * config.in, configure: Regenerate.
2727 2013-04-16 Pedro Alves <palves@redhat.com>
2729 * linux-low.h (struct lwp_info) <thread_known>: Move under
2730 the USE_THREAD_DB #ifdef.
2732 2013-04-16 Pedro Alves <palves@redhat.com>
2734 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2735 (linux-low.o): Delete rule.
2736 * linux-low.h: Always include "gdb_thread_db.h" instead of
2737 conditionally including thread_db.h.
2738 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2741 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2743 * Makefile.in (install-only): Fix make install regression.
2745 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2747 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2748 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2750 * gdbserver.1: Remove.
2752 2013-03-22 Pedro Alves <palves@redhat.com>
2754 * linux-low.c (handle_extended_wait): Don't call
2755 linux_enable_event_reporting.
2757 2013-03-15 Tony Theodore <tonyt@logyst.com>
2760 * Makefile.in (SHELL): Use @SHELL@.
2762 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2764 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2767 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2769 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2770 Remove extraneous NULL element.
2772 2013-03-13 Yao Qi <yao@codesourcery.com>
2774 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2775 'V' block in trace frame.
2777 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2779 * target.h (struct target_ops): Add btrace ops.
2780 (target_supports_btrace): New macro.
2781 (target_enable_btrace): New macro.
2782 (target_disable_btrace): New macro.
2783 (target_read_btrace): New macro.
2784 * gdbthread.h (struct thread_info): Add btrace field.
2785 * server.c: Include btrace-common.h.
2786 (handle_btrace_general_set): New function.
2787 (handle_btrace_enable): New function.
2788 (handle_btrace_disable): New function.
2789 (handle_general_set): Call handle_btrace_general_set.
2790 (handle_qxfer_btrace): New function.
2791 (struct qxfer qxfer_packets[]): Add btrace entry.
2792 * inferiors.c (remove_thread): Disable btrace.
2793 * linux-low: Include linux-btrace.h.
2794 (linux_low_enable_btrace): New function.
2795 (linux_low_read_btrace): New function.
2796 (linux_target_ops): Add btrace ops.
2797 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2798 Add srv_linux_btrace=yes.
2799 (x86_64-*-linux*): Add linux-btrace.o.
2800 Add srv_linux_btrace=yes.
2801 * configure.ac: Define HAVE_LINUX_BTRACE.
2802 * config.in: Regenerated.
2803 * configure: Regenerated.
2805 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2807 * server.c (handle_qxfer): Preserve error message if -3 is
2809 (qxfer): Document the -3 return value.
2811 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2813 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2814 (linux_btrace_h): New variable.
2815 (linux-btrace.o): New rule.
2817 2013-03-08 Stan Shebs <stan@codesourcery.com>
2818 Hafiz Abid Qadeer <abidh@codesourcery.com>
2820 * tracepoint.c (trace_buffer_size): New global.
2821 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2822 (init_trace_buffer): Change to one-argument function. Allocate
2823 trace buffer memory.
2824 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2825 handle QTBuffer:size packet.
2826 (cmd_bigqtbuffer_size): New function.
2827 (initialize_tracepoint): Call init_trace_buffer with
2828 DEFAULT_TRACE_BUFFER_SIZE.
2829 * server.c (handle_query): Add QTBuffer:size in the
2832 2013-03-07 Yao Qi <yao@codesourcery.com>
2834 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2835 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2837 (cmd_qtsp): Adjust condition. Do post increment.
2838 Set cur_action and cur_step_action back to 0.
2840 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2843 * linux-low.c (linux_write_memory): Return early success if LEN is
2846 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2848 * configure.srv: Add x86_64-*-cygwin* as target.
2850 2013-02-28 Tom Tromey <tromey@redhat.com>
2852 * configure.ac: Invoke AC_SYS_LARGEFILE.
2853 * configure, config.in: Rebuild.
2855 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2857 * win32-low.c: Throughout, fix format strings and casts of
2858 printf-like functions to avoid type related warnings on all
2860 (get_child_debug_event): Print dwDebugEventCode as hex since
2861 that's how it's usually documented.
2863 2013-02-28 Yao Qi <yao@codesourcery.com>
2865 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2868 2013-02-27 Jiong Wang <jiwang@tilera.com>
2870 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2871 (reg-tilegx32.c): New rule.
2872 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2873 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2874 different register info initializer according to elf class.
2875 (init_registers_tilgx32): New function. The tilegx32 register info
2877 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2878 (tile_store_gregset): Likewise.
2880 2013-02-27 Yao Qi <yao@codesourcery.com>
2882 * server.c (process_point_options): Print debug message when
2883 debug_threads is true.
2885 2013-02-26 Yao Qi <yao@codesourcery.com>
2887 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2889 2013-02-19 Pedro Alves <palves@redhat.com>
2890 Kai Tietz <ktietz@redhat.com>
2894 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2895 instead of strtoul to extract address from packet.
2896 (process_serial_event) <'z'>: Likewise.
2898 2013-02-18 Yao Qi <yao@codesourcery.com>
2900 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2902 2013-02-14 Pedro Alves <palves@redhat.com>
2906 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2907 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2909 2013-02-14 Pedro Alves <palves@redhat.com>
2911 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2913 2013-02-14 Pedro Alves <palves@redhat.com>
2915 * tracepoint.c (save_string): Delete.
2916 (add_tracepoint_action): Use savestring instead of save_string.
2918 2013-02-12 Pedro Alves <palves@redhat.com>
2920 * linux-xtensa-low.c: Ditto.
2921 * xtensa-xtregs.c: Ditto.
2923 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2925 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2928 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2930 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2931 aarch64_num_wp_regs and aarch64_num_bp_regs to
2932 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2934 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2936 * linux-aarch64-low.c (ps_get_thread_area): Replace
2937 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2939 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2940 Marcus Shawcroft <marcus.shawcroft@arm.com>
2941 Nigel Stephens <nigel.stephens@arm.com>
2942 Yufeng Zhang <yufeng.zhang@arm.com>
2944 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2945 (aarch64.c, aarch64-without-fpu.c): New targets.
2946 * configure.srv (aarch64*-*-linux*): New.
2947 * linux-aarch64-low.c: New file.
2949 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2951 * linux-low.c (handle_extended_wait, linux_create_inferior)
2952 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
2953 (dequeue_one_deferred_signal, linux_resume_one_thread)
2954 (fetch_register, linux_write_memory, linux_enable_event_reporting)
2955 (linux_tracefork_grandchild, linux_test_for_tracefork)
2956 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
2957 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
2958 where the argument is 0.
2960 2013-01-25 Yao Qi <yao@codesourcery.com>
2962 * event-loop.c: Include "queue.h".
2963 (gdb_event_p): New typedef.
2964 (struct gdb_event) <next_event>: Remove.
2965 (event_queue): Change to QUEUE(gdb_event_p).
2966 (async_queue_event): Remove.
2967 (gdb_event_xfree): New.
2968 (initialize_event_loop): New.
2969 (process_event): Use API from QUEUE.
2970 (wait_for_event): Likewise.
2971 * server.c (main): Call initialize_event_loop.
2972 * server.h (initialize_event_loop): Declare.
2974 2013-01-18 Yao Qi <yao@codesourcery.com>
2976 * ax.h (struct eval_agent_expr_context): New.
2977 (gdb_eval_agent_expr): Update declaration.
2978 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
2979 TFRAME. Add new argument CTX.
2980 * server.h (struct eval_agent_expr_context): Declare.
2981 (agent_mem_read, agent_tsv_read): Update declaration.
2982 (agent_mem_read_string): Likewise.
2983 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
2984 (add_traceframe_block): Add new argument TPOINT.
2985 Increase TPOINT->traceframe_usage.
2986 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
2987 eval_tracepoint_agent_expr.
2988 (condition_true_at_tracepoint): Likewise.
2989 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
2990 (agent_mem_read_string, agent_tsv_read): Likewise.
2992 2013-01-16 Yao Qi <yao@codesourcery.com>
2994 * linux-low.c (linux_resume_one_lwp): Don't check
2995 'lwp->bp_reinsert != 0'.
2997 2013-01-07 Joel Brobecker <brobecker@adacore.com>
2998 Pedro Alves <palves@redhat.com>
3000 * lynx-low.c (ptrace_request_to_str): Define a temporary
3001 macro and use it to simplify this function's implementation.
3003 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3005 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3008 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3010 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3012 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3014 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3016 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3018 * lynx-low.c (lynx_resume): Use the resume_info parameter
3019 to determine the ptid for the lynx_ptrace call, unless
3020 it is equal to minus_one_ptid, in which case we use the
3021 ptid of the current_inferior.
3022 (lynx_wait_1): After having received a thread create/exit
3023 event, resume the inferior's execution using the signaling
3024 thread's ptid, rather than the old ptid.
3026 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3028 * lynx-low.c (lynx_resume): Delete variable ret.
3030 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3032 * gdbreplay.c (gdbreplay_version): Update copyright year.
3033 * server.c (gdbserver_version): Likewise.
3035 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3037 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3040 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3042 * lynx-low.c (ptrace_request_to_str): Add handling for
3045 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3047 * lynx-low.c (lynx_attach): Delete variable new_process.
3049 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3051 * lynx-low.c (lynx_create_inferior): Delete variable
3054 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3056 * lynx-low.c (ptrace_request_to_str): Do not handle
3057 PTRACE_GETTHREADLIST if this macro does not exist.
3059 2012-12-15 Yao Qi <yao@codesourcery.com>
3061 * Makefile.in (OBS): Add notif.o.
3062 * notif.c, notif.h: New.
3063 * server.c: Include "notif.h".
3064 (struct vstop_notif) <next>: Remove.
3066 (queue_stop_reply): Update.
3067 (push_event, send_next_stop_reply): Remove.
3068 (discard_queued_stop_replies): Update.
3069 (notif_stop): New variable.
3070 (handle_v_stopped): Remove.
3071 (handle_v_requests): Don't call handle_v_stopped. Call
3072 handle_ack_notif instead.
3073 (queue_stop_reply_callback): Call notif_event_enque instead
3074 of queue_stop_reply.
3075 (handle_status): Don't call send_next_stop_reply, call
3076 notif_write_event instead.
3077 (kill_inferior_callback): Likewise.
3078 (detach_or_kill_inferior_callback): Likewise.
3079 (main): Call initialize_notif.
3080 (process_serial_event): Call QUEUE_is_empty.
3081 (handle_target_event): Call notif_push instead of push event.
3082 * server.h (push_event): Remove declaration.
3084 2012-12-10 Tom Tromey <tromey@redhat.com>
3086 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3087 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3090 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3091 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3092 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3093 (amd64-linux-ipa.o, ax.o): Rewrite.
3094 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3095 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3096 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3097 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3098 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3099 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3100 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3101 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3102 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3103 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3104 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3105 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3106 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3107 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3108 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3109 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3110 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3111 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3112 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3113 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3114 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3115 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3116 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3117 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3118 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3119 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3120 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3121 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3122 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3123 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3124 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3125 (reg-tilegx.o): Remove.
3126 (all_object_files): New macro.
3127 Include .deps files.
3128 * aclocal.m4, configure: Rebuild.
3129 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3130 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3131 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3133 2012-12-05 Tom Tromey <tromey@redhat.com>
3136 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3138 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3140 * configure.ac: Check for linux/perf_event.h.
3141 * config.in: Regenerated.
3142 * configure: Regenerated.
3144 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3146 * hostio.c (handle_readlink): Decrease buffer size
3147 parameter passed to readlink by one byte.
3149 2012-11-26 Yao Qi <yao@codesourcery.com>
3151 * configure.ac (build_warnings): Append '-Wempty-body'.
3152 * configure: Regenerated.
3153 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3156 2012-11-15 Pierre Muller <muller@sourceware.org>
3158 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3159 * config.in: Regenerate.
3160 * configure: Regenerate.
3161 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3162 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3163 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3164 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3166 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3167 instead of <sys/wait.h> header.
3168 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3170 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3172 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3173 (various make rules): Remove -DGDBSERVER
3175 2012-11-09 Yao Qi <yao@codesourcery.com>
3177 * spu-low.c (current_ptid): Move it to ..
3178 * gdbthread.h: ... here. New.
3179 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3180 * server.c (myresume, process_serial_event): Likewise.
3181 * thread-db.c (thread_db_find_new_threads): Likewise.
3182 * tracepoint.c (run_inferior_command): Likewise.
3184 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3186 * server.c (handle_search_memory_1): Include access length in
3189 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3191 * linux-crisv32-low.c: Fix compile errors.
3193 2012-09-04 Yao Qi <yao@codesourcery.com>
3195 * tracepoint.c (cmd_qtsv): Adjust debug message.
3196 Don't check CUR_TPOINT.
3198 2012-08-28 Yao Qi <yao@codesourcery.com>
3200 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3201 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3202 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3203 Remove declarations of xmalloc, xreallloc, xstrdup and
3205 * Makefile.in (libiberty_h): New.
3206 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3207 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3209 2012-08-23 Yao Qi <yao@codesourcery.com>
3211 * server.h: Remove declaration of 'xsnprintf'.
3213 2012-08-22 Keith Seitz <keiths@redhat.com>
3215 * server.h: Include build-gnulib-gbserver/config.h.
3216 * gdbreplay.c: Likewise.
3218 2012-08-08 Doug Evans <dje@google.com>
3220 * Makefile.in (SFILES): Add gdb_vecs.c.
3221 (OBS): Add gdb_vecs.o.
3222 (gdb_vecs_h, host_defs_h): New variables.
3223 (thread-db.o): Add $(gdb_vecs_h) dependency.
3224 (gdb_vecs.o): New rule.
3225 * thread-db.c: #include "gdb_vecs.h".
3226 (thread_db_load_search): Use a vector to iterate over path elements.
3227 Handle text appearing after "$pdir".
3229 * configure.ac: Add check for strstr.
3230 * config.in: Regenerate.
3231 * configure: Regenerate.
3233 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3235 * hostio.c (handle_pread): If pread fails, fall back to attempting
3237 (handle_pwrite): Likewise for pwrite.
3239 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3241 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3242 between unsupported TYPE and unimplementable ADDR/LEN combination.
3243 (arm_insert_point): Act on new return value.
3245 2012-07-31 Pedro Alves <palves@redhat.com>
3247 * server.c (process_point_options): Only skip tokens if we find
3248 one that is unrecognized. Don't treat 'X' specially while
3249 skipping unrecognized tokens.
3251 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3253 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3254 to 4-byte-align HW breakpoint addresses for Thumb.
3256 2012-07-27 Yao Qi <yao@codesourcery.com>
3260 * server.h: Declare gdb_agent_about_to_close.
3261 * target.c (kill_inferior): Include "agent.h".
3262 New. Send command 'kill'.
3263 * target.h (kill_inferior): Removed macro.
3264 * tracepoint.c (gdb_agent_about_to_close): New.
3265 (gdb_agent_helper_thread): Handle command 'close'.
3266 Wait endlessly until the inferior stops.
3267 Install gdb_agent_remove_socket to atexit hook.
3268 (agent_socket_name): New static variable.
3269 (gdb_agent_socket_init): Replace local variable 'name' with
3270 'agent_socket_name'.
3271 (gdb_agent_remove_socket): New.
3273 2012-07-27 Yao Qi <yao@codesourcery.com>
3275 * server.c (process_point_options): Stop at 'X' when parsing.
3277 2012-07-19 Michael Eager <eager@eagercon.com>
3279 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3281 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3282 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3283 hardware breakpoint.
3285 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3287 * gdbserver/linux-low.c (initialize_low): Call
3288 linux_ptrace_init_warnings.
3290 2012-07-02 Doug Evans <dje@google.com>
3292 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3295 2012-07-02 Stan Shebs <stan@codesourcery.com>
3297 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3298 (ax.o): Add it to build rule.
3300 (OBS): Add format.o.
3301 (IPA_OBS): Add format.o.
3302 * server.c (handle_query): Claim support for breakpoint commands.
3303 (process_point_options): Add command case.
3304 (process_serial_event): Leave running if there are printfs in
3306 * mem-break.h (any_persistent_commands): Declare.
3307 (add_breakpoint_commands): Declare.
3308 (gdb_no_commands_at_breakpoint): Declare.
3309 (run_breakpoint_commands): Declare.
3310 * mem-break.c (struct point_command_list): New struct.
3311 (struct breakpoint): New field command_list.
3312 (any_persistent_commands): New function.
3313 (add_commands_to_breakpoint): New function.
3314 (add_breakpoint_commands): New function.
3315 (gdb_no_commands_at_breakpoint): New function.
3316 (run_breakpoint_commands): New function.
3317 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3319 * ax.c: Include format.h.
3320 (ax_printf): New function.
3321 (gdb_eval_agent_expr): Add printf opcode.
3323 2012-06-13 Yao Qi <yao@codesourcery.com>
3325 * server.c (start_inferior): Remove duplicated writes to fields
3326 'last_resume_kind' and 'last_status' of 'current_inferior'.
3328 2012-06-12 Yao Qi <yao@codesourcery.com>
3329 Pedro Alves <palves@redhat.com>
3331 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3333 * server.c (handle_v_cont): Extend comment.
3335 2012-06-11 Yao Qi <yao@codesourcery.com>
3337 * linux-low.c (linux_attach): Add 'static'.
3339 2012-06-06 Yao Qi <yao@codesourcery.com>
3341 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3343 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3345 Fix gcc -flto compilation warning.
3346 * server.c (main): Make variable multi_mode and attach volatile.
3348 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3350 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3351 if the platform doesn't know about it.
3353 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3355 * Makefile.in (SFILES): Add linux-tile-low.c.
3356 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3357 * configure.srv: Handle tilegx-*-linux*.
3358 * linux-tile-low.c: New file.
3360 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3362 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3364 2012-05-24 Pedro Alves <palves@redhat.com>
3368 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3370 2012-05-24 Pedro Alves <palves@redhat.com>
3374 Replace target_signal with gdb_signal throughout.
3376 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3378 * linux-low.c (linux_store_registers): Avoid the copying sequence
3379 when no data has been retrieved by ptrace.
3381 2012-05-22 Will Deacon <will.deacon@arm.com>
3383 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3384 Include asm/ptrace.h.
3385 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3388 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3390 * linux-low.c (linux_store_registers): Don't re-retrieve data
3391 with ptrace that has already been obtained from /proc. Always
3392 copy any data retrieved with ptrace to the buffer supplied.
3394 2012-05-11 Yao Qi <yao@codesourcery.com>
3395 Pedro Alves <palves@redhat.com>
3397 * linux-low.c (enum stopping_threads_kind): New.
3398 (stopping_threads): Change type to `enum stopping_threads_kind'.
3399 (handle_extended_wait): If stopping and suspending threads, leave
3400 the new_lwp suspended too.
3401 (linux_wait_for_event): Adjust.
3402 (stop_all_lwps): Set `stopping_threads' to
3403 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3404 whether we're suspending threads or just stopping them. Assert no
3407 2012-04-29 Yao Qi <yao@codesourcery.com>
3409 * server.h: Move some code to ...
3410 * gdbthread.h: ... here. New.
3411 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3412 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3413 (nto-low.o, win32-low.o): Likewise.
3414 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3415 * regcache.c, remote-utils.c, server.c: Likewise.
3416 * target.c, tracepoint.c, win32-low.c: Likewise.
3418 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3420 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3421 (PTRACE_ARG4_TYPE): Likewise.
3422 (PTRACE_XFER_TYPE): Likewise.
3423 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3424 ptrace to PTRACE_ARG3_TYPE.
3425 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3426 (PTRACE_ARG4_TYPE): Likewise.
3427 (PTRACE_XFER_TYPE): Likewise.
3428 (linux_detach_one_lwp): Cast fourth argument of
3429 ptrace to long then PTRACE_ARG4_TYPE.
3430 (regsets_fetch_inferior_registers): Cast third argument of
3431 ptrace to long then PTRACE_ARG3_TYPE.
3432 (regsets_store_inferior_registers): Likewise.
3434 2012-04-20 Pedro Alves <palves@redhat.com>
3436 * configure: Regenerate.
3438 2012-04-19 Pedro Alves <palves@redhat.com>
3440 * Makefile.in (GNULIB_BUILDDIR): New.
3441 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3442 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3443 (all, install-only, uninstall, clean-info, all-lib, clean): No
3444 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3445 (maintainer-clean realclean distclean): Use subdir_do.
3447 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3448 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3449 * acinclude.m4: Include acx_configure_dir.m4.
3450 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3451 calls. Call AC_PROG_RANLIB. Configure gnulib using
3454 (GNULIB_STDINT_H): Adjust.
3455 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3456 * gdbreplay.c: Include build-gnulib/config.h.
3457 * server.h: Likewise.
3458 * aclocal.m4: Regenerate.
3459 * config.in: Regenerate.
3460 * configure: Regenerate.
3462 2012-04-19 Pedro Alves <palves@redhat.com>
3464 * Makefile.in (LIBGNU, INCGNU): Adjust.
3465 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3466 (all, install-only, uninstall, clean-info, all-lib, clean)
3467 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3468 * configure.ac: Adjust AC_OUTPUT output.
3469 * aclocal.m4: Regenerate.
3470 * configure: Regenerate.
3472 2012-04-19 Pedro Alves <palves@redhat.com>
3474 * Makefile.in (generated_files): New.
3475 (server_h): Remove the explicit dependency on config.h, and depend
3476 on $generated_files.
3478 2012-04-19 Pedro Alves <palves@redhat.com>
3480 * Makefile.in (INCGNU): Add -Ignulib.
3482 2012-04-19 Pedro Alves <palves@redhat.com>
3484 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3485 (INCGNU): ... this, and spell out -I here.
3486 (GNULIB_LIB): Rename to ...
3488 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3490 2012-04-19 Pedro Alves <palves@redhat.com>
3492 * config.in: Regenerate.
3494 2012-04-19 Pedro Alves <palves@redhat.com>
3496 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3497 * server.h (memmem): Remove declaration.
3498 * config.in: Regenerate.
3499 * configure: Regenerate.
3501 2012-04-19 Yao Qi <yao@codesourcery.com>
3503 * Makefile.in (SFILES): Add common/vec.c.
3507 2012-04-19 Yao Qi <yao@codesourcery.com>
3509 * remote-utils.c (prepare_resume_reply): Replace with macro
3510 target_core_of_thread.
3511 * server.c (handle_qxfer_threads_proper): Likewise.
3512 * target.h (traget_core_of_thread): New macro.
3514 2012-04-18 Pedro Alves <palves@redhat.com>
3516 * aclocal.m4: Regenerate.
3517 * configure: Regenerate.
3519 2012-04-16 Yao Qi <yao@codesourcery.com>
3521 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3522 duplicated on address.
3524 2012-04-16 Yao Qi <yao@codesourcery.com>
3526 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3527 (struct tracepoint_action_ops) <send>: New field.
3528 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3529 (agent_expr_send, x_tracepoint_action_send): New.
3530 (l_tracepoint_action_send): New.
3531 (cmd_qtdp): Download and install tracepoint
3532 according to `use_agent'.
3533 (run_inferior_command): Add one more parameter `len'.
3535 (tracepoint_send_agent): New.
3536 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3538 2012-04-16 Yao Qi <yao@codesourcery.com>
3540 * tracepoint.c (download_tracepoints): Moved to ...
3541 (cmd_qtstart): ... here.
3543 2012-04-14 Yao Qi <yao@codesourcery.com>
3545 * tracepoint.c: Include inttypes.h.
3546 (struct collect_memory_action): Use sized types.
3547 (struct tracepoint): Likewise.
3548 (cmd_qtdp, stop_tracing): Update print specifiers.
3549 (cmd_qtp, response_tracepoint): Likewise.
3550 (collect_data_at_tracepoint): Likewise.
3551 (collect_data_at_step): Likewise.
3553 2012-04-14 Yao Qi <yao@codesourcery.com>
3555 Import gnulib module inttypes.
3556 * aclocal.m4, config.in, configure: Regenerated.
3558 2012-04-14 Yao Qi <yao@codesourcery.com>
3560 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3561 Makefile and config.status at last.
3563 2012-04-13 Yao Qi <yao@codesourcery.com>
3565 * tracepoint.c: Include stdint.h unconditionally.
3567 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3569 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3570 on BFD_HAVE_SYS_PROCFS_TYPE.
3571 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3572 * configure: Regenerate.
3573 * config.in: Likewise.
3575 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3577 * Makefile.in (clean): Also remove x32.c x32-linux.c
3578 x32-avx.c x32-avx-linux.c.
3579 (x32.o): New target.
3581 (x32-linux.o): Likewise.
3582 (x32-linux.c): Likewise.
3583 (x32-avx.o): Likewise.
3584 (x32-avx.c): Likewise.
3585 (x32-avx-linux.o): Likewise.
3586 (x32-avx-linux.c): Likewise.
3588 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3589 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3590 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3591 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3592 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3593 i386/x32-avx-linux.xml.
3595 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3596 (init_registers_x32_avx_linux): Likwise.
3597 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3598 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3600 2012-04-13 Pedro Alves <palves@redhat.com>
3602 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3603 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3604 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3605 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3608 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3610 * linux-x86-low.c (compat_x32_clock_t): New.
3611 (compat_x32_siginfo_t): Likewise.
3612 (compat_x32_siginfo_from_siginfo): Likewise.
3613 (siginfo_from_compat_x32_siginfo): Likewise.
3614 (linux_is_elf64): Likewise.
3615 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3616 and siginfo_from_compat_x32_siginfo for x32.
3617 (x86_arch_setup): Set linux_is_elf64.
3619 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3622 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3624 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3625 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3626 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3627 compatible with process.
3629 2012-04-12 Yao Qi <yao@codesourcery.com>
3631 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3632 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3633 (install-only, install-info, clean): Handle sub dir gnulib.
3634 (all-lib, am--refresh): New targets.
3635 (memmem.o): Remove target.
3636 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3637 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3638 (AC_REPLACE_FUNCS): Remove memmem.
3639 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3640 (AC_OUTPUT): Generate Makefile in gnulib/.
3641 * aclocal.m4, config.in, configure: Regenerated.
3643 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3645 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3647 2012-04-05 Pedro Alves <palves@redhat.com>
3649 -Werror=strict-aliasing
3651 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3654 2012-04-04 Pedro Alves <palves@redhat.com>
3656 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3657 (sparc_store_gregset_from_stack, sparc_store_gregset)
3658 (sparc_breakpoint_at): Fix formatting.
3660 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3662 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3664 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3665 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3666 * config.in: Regenerate.
3667 * configure: Likewise.
3669 2012-03-29 Pedro Alves <palves@redhat.com>
3671 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3672 Correct ptrace arguments.
3674 2012-03-28 Pedro Alves <palves@redhat.com>
3676 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3677 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3678 (IA64_FR1_REGNUM): New defines.
3679 (ia64_fetch_register): New.
3680 (the_low_target): Install it.
3681 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3683 * linux-low.c (linux_fetch_registers): Try the
3684 the_low_target.fetch_register hook first.
3686 * linux-arm-low.c (the_low_target): Adjust.
3687 * linux-bfin-low.c (the_low_target): Adjust.
3688 * linux-cris-low.c (the_low_target): Adjust.
3689 * linux-crisv32-low.c (the_low_target): Adjust.
3690 * linux-m32r-low.c (the_low_target): Adjust.
3691 * linux-m68k-low.c (the_low_target): Adjust.
3692 * linux-mips-low.c (the_low_target): Adjust.
3693 * linux-ppc-low.c (the_low_target): Adjust.
3694 * linux-s390-low.c (the_low_target): Adjust.
3695 * linux-sh-low.c (the_low_target): Adjust.
3696 * linux-sparc-low.c (the_low_target): Adjust.
3697 * linux-tic6x-low.c (the_low_target): Adjust.
3698 * linux-x86-low.c (the_low_target): Adjust.
3699 * linux-xtensa-low.c (the_low_target): Adjust.
3701 2012-03-26 Pedro Alves <palves@redhat.com>
3703 * server.c (handle_qxfer_libraries): Don't bail early if
3704 the_target->qxfer_libraries_svr4 is not NULL.
3706 2012-03-26 Pedro Alves <palves@redhat.com>
3708 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3710 2012-03-23 Pedro Alves <palves@redhat.com>
3712 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3713 "library-list-svr4" element's start tag when the the DSO list is
3716 2012-03-23 Pedro Alves <palves@redhat.com>
3718 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3719 a variable whose type size is the same as the inferior's pointer
3722 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3724 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3726 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3727 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3728 * linux-low.h: Include <signal.h>.
3729 (struct siginfo): Remove forward declaration.
3730 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3733 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3735 * .gitignore: Ignore more files.
3737 2012-03-19 Pedro Alves <palves@redhat.com>
3738 Jan Kratochvil <jan.kratochvil@redhat.com>
3740 * server.c (cont_thread, general_thread): Add describing comments.
3741 (start_inferior): Clear `cont_thread'.
3742 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3745 2012-03-15 Yao Qi <yao@codesourcery.com>
3747 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3749 (cmd_qtdp): ... here.
3751 2012-03-15 Yao Qi <yao@codesourcery.com>
3753 * tracepoint.c (struct tracepoint_action_ops): New.
3754 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3755 (m_tracepoint_action_download): New.
3756 (r_tracepoint_action_download): New.
3757 (x_tracepoint_action_download): New.
3758 (l_tracepoint_action_download): New.
3759 (add_tracepoint_action): Install `action->ops' according type.
3760 (download_tracepoint_1): Move code `download' function pointer
3761 of various tracepoint_action_ops.
3763 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3765 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3766 linux_ptrace_attach_warnings.
3768 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3770 * Makefile.in (linux-ptrace.o): New.
3771 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3772 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3773 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3774 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3775 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3777 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3779 2012-03-08 Yao Qi <yao@codesourcery.com>
3780 Pedro Alves <palves@redhat.com>
3782 Fix PR server/13392.
3783 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3785 * tracepoint.c (remove_tracepoint): New.
3786 (cmd_qtdp): Call remove_tracepoint when failed to install.
3788 2012-03-07 Pedro Alves <palves@redhat.com>
3790 * linux-low.c (get_detach_signal): New.
3791 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3792 Pass on pending signals to PTRACE_DETACH. Check the result of the
3794 * server.c (program_signals, program_signals_p): New.
3795 (handle_general_set): Handle QProgramSignals.
3796 * server.h (program_signals, program_signals_p): Declare.
3798 2012-03-05 Pedro Alves <palves@redhat.com>
3799 Jan Kratochvil <jan.kratochvil@redhat.com>
3801 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3804 2012-03-03 Yao Qi <yao@codesourcery.com>
3806 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3807 agent_look_up_symbols.
3809 2012-03-03 Yao Qi <yao@codesourcery.com>
3811 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3812 (linux-x86-low.o): Likewise.
3813 * server.h: Remove in_process_agent_loaded.
3814 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3818 2012-03-03 Yao Qi <yao@codesourcery.com>
3820 * tracepoint.c (gdb_agent_capability): New global.
3821 (in_process_agent_loaded_ust): Renamed to
3822 `in_process_agent_supports_ust'.
3824 (in_process_agent_supports_ust): Call agent_capability_check.
3825 (clear_installed_tracepoints): Assert that agent supports
3828 2012-03-03 Yao Qi <yao@codesourcery.com>
3830 * linux-low.c (linux_supports_agent): New.
3831 (linux_target_ops): Initialize field `supports_agent' with
3832 linux_supports_agent.
3833 * target.h (struct target_ops) <supports_agent>: New.
3834 (target_supports_agent): New macro.
3835 * server.c (handle_general_set): Handle packet 'QAgent'.
3836 (handle_query): Send `QAgent+'.
3837 * Makefile.in (server.o): Depends on agent.h.
3839 2012-03-03 Yao Qi <yao@codesourcery.com>
3841 * Makefile.in (OBS): Add agent.o.
3842 Add new rule for agent.o.
3843 Track dependence of tracepoint.c on agent.h.
3844 * tracepoint.c (run_inferior_command_1):
3845 (run_inferior_command): Call agent_run_command.
3846 (gdb_ust_connect_sync_socket): Deleted. Move it to
3848 (resume_thread, stop_thread): Likewise.
3849 (gdb_ust_socket_init): Renamed to ...
3850 (gdb_agent_socket_init): ... New.
3851 (gdb_ust_thread): Renamed to ...
3852 (gdb_agent_helper_thread): ... New.
3853 (gdb_ust_init): Move some code to ...
3854 (gdb_agent_init): ... here. New.
3855 [HAVE_UST]: Call gdb_ust_init.
3856 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3857 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3858 * config.in, configure: Regenerated.
3860 2012-03-02 Pedro Alves <palves@redhat.com>
3862 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3863 * linux-low.c (struct simple_pid_list): New.
3864 (stopped_pids): New a struct simple_pid_list pointer.
3865 (add_to_pid_list, pull_pid_from_list): New.
3866 (handle_extended_wait): Don't assume the first signal new children
3867 report is SIGSTOP. Adjust call to pull_pid_from_list.
3868 (linux_wait_for_lwp): Adjust.
3870 2012-03-02 Yao Qi <yao@codesourcery.com>
3872 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3875 2012-03-02 Yao Qi <yao@codesourcery.com>
3877 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3878 `stop_pc' and `tpoint'. Update caller.
3880 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3882 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3883 * linux-low.c (use_linux_regsets): New macro.
3884 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3885 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3886 (linux_register_in_regsets): New function.
3887 (usr_fetch_inferior_registers): Skip registers covered by
3889 (usr_store_inferior_registers): Likewise.
3890 (usr_fetch_inferior_registers): New macro.
3891 (usr_store_inferior_registers): Likewise.
3892 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3893 (linux_store_registers): Likewise.
3894 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3896 (init_registers_mips64_dsp_linux): Likewise.
3897 (init_registers_mips_linux): New macro.
3898 (init_registers_mips_dsp_linux): Likewise.
3899 (mips_dsp_num_regs): Likewise.
3900 (DSP_BASE, DSP_CONTROL): New fallback macros.
3901 (mips_base_regs): New macro.
3902 (mips_regmap): Use it. Fix the size.
3903 (mips_dsp_regmap): New variable.
3904 (mips_dsp_regset_bitmap): Likewise.
3905 (mips_arch_setup): New function.
3906 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3908 (mips_cannot_store_register): Likewise.
3909 (the_low_target): Update .arch_setup, .num_regs and .regmap
3910 initializers. Add .regset_bitmap initializer.
3911 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3913 * linux-bfin-low.c (the_low_target): Likewise.
3914 * linux-cris-low.c (the_low_target): Likewise.
3915 * linux-crisv32-low.c (the_low_target): Likewise.
3916 * linux-ia64-low.c (the_low_target): Likewise.
3917 * linux-m32r-low.c (the_low_target): Likewise.
3918 * linux-m68k-low.c (the_low_target): Likewise.
3919 * linux-ppc-low.c (the_low_target): Likewise.
3920 * linux-s390-low.c (the_low_target): Likewise.
3921 * linux-sh-low.c (the_low_target): Likewise.
3922 * linux-sparc-low.c (the_low_target): Likewise.
3923 * linux-tic6x-low.c (the_low_target): Likewise.
3924 * linux-x86-low.c (the_low_target): Likewise.
3925 * linux-xtensa-low.c (the_low_target): Likewise.
3926 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3927 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3928 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3930 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3931 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3933 2012-02-29 Yao Qi <yao@codesourcery.com>
3934 Pedro Alves <palves@redhat.com>
3936 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3937 `step_over_finished' is true.
3939 2012-02-27 Pedro Alves <palves@redhat.com>
3941 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3942 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3944 2012-02-27 Pedro Alves <palves@redhat.com>
3947 * linux-low.c (pid_is_stopped): New.
3948 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3950 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
3952 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
3955 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
3957 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
3959 2012-02-24 Luis Machado <lgustavo@codesourcery>
3961 * server.c (handle_query): Advertise support for target-side
3962 breakpoint condition evaluation.
3963 (process_point_options): New function.
3964 (process_serial_event): When inserting a breakpoint, check for
3965 a target-side condition that should be evaluated.
3967 * mem-break.c: Include regcache.h and ax.h.
3968 (point_cond_list_t): New data structure.
3969 (breakpoint) <cond_list>: New field.
3970 (find_gdb_breakpoint_at): Make non-static.
3971 (delete_gdb_breakpoint_at): Clear any target-side
3973 (clear_gdb_breakpoint_conditions): New function.
3974 (add_condition_to_breakpoint): Likewise.
3975 (add_breakpoint_condition): Likewise.
3976 (gdb_condition_true_at_breakpoint): Likewise.
3977 (gdb_breakpoint_here): Return result directly instead
3978 of going through a local variable.
3980 * mem-break.h (find_gdb_breakpoint_at): New prototype.
3981 (clear_gdb_breakpoint_conditions): Likewise.
3982 (add_breakpoint_condition): Likewise.
3983 (gdb_condition_true_at_breakpoint): Likewise.
3985 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
3986 (need_step_over_p): Take target-side breakpoint condition into
3989 2012-02-24 Luis Machado <lgustavo@codesourcery>
3991 * server.h: Include tracepoint.h.
3992 (agent_mem_read, agent_get_trace_state_variable_value,
3993 agent_set_trace_state_variable_value,
3994 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
3995 get_set_tsv_func_addr): New prototypes.
3997 * ax.h: New include file.
3998 * ax.c: New source file.
4000 * tracepoint.c: Include ax.h.
4001 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4002 agent_expr, eval_result_type): Move to ax.h.
4003 (parse_agent_expr): Rename to ...
4004 (gdb_parse_agent_expr): ... this, make it non-static and move
4006 (unparse_agent_expr) Rename to ...
4007 (gdb_unparse_agent_expr): ... this, make it non-static and move
4009 (eval_agent_expr): Rename to ...
4010 (eval_tracepoint_agent_expr): ... this.
4011 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4012 forward declarations.
4013 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4014 (agent_get_trace_state_variable_value): New function.
4015 (agent_set_trace_state_variable_value): New function.
4016 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4017 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4018 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4019 (condition_true_at_tracepoint): Likewise.
4020 (parse_agent_expr): Rename to ...
4021 (gdb_parse_agent_expr): ... this and move to ax.c.
4022 (unparse_agent_expr): Rename to ...
4023 (gdb_unparse_agent_expr): ... this and move to ax.c.
4024 (gdb_agent_op_name): Move to ax.c.
4025 (eval_agent_expr): Rename to ...
4026 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4028 (eval_tracepoint_agent_expr): New function.
4029 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4031 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4033 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4034 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4035 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4036 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4037 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4038 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4039 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4040 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4041 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4042 (compile_bytecodes): Remove forward declaration.
4043 (is_goto_target): Move to ax.c.
4044 (compile_bytecodes): Move to ax.c and call
4045 agent_get_trace_state_variable_value (...) and
4046 agent_set_trace_state_variable_value (...).
4048 * Makefile.in: Update ax.c and IPA dependencies.
4050 2012-02-24 Pedro Alves <palves@redhat.com>
4052 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4053 (cmd_bigqtbuffer_circular): ... this. Only handle
4054 'QTBuffer:circular:'.
4055 (handle_tracepoint_general_set): Adjust.
4057 2012-02-16 Yao Qi <yao@codesourcery.com>
4059 * inferiors.c: Move code to ...
4060 * dll.c: .... here. New.
4061 * server.h: Declare clear_dlls.
4062 * Makefile.in (SFILES): Add dll.c.
4066 2012-02-11 Yao Qi <yao@codesourcery.com>
4068 * server.c: (handle_monitor_command): Add a new parameter
4070 (handle_query): Update caller.
4072 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4074 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4075 * configure, config.in: Regenerate.
4076 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4079 2012-02-02 Pedro Alves <palves@redhat.com>
4081 Try SIGKILL first, then PTRACE_KILL.
4082 * linux-low.c (linux_kill_one_lwp): New.
4083 (linux_kill_one_lwp): Rename to ...
4084 (kill_one_lwp_callback): ... this. Use the new
4087 2012-02-02 Pedro Alves <palves@redhat.com>
4089 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4092 2012-01-27 Pedro Alves <palves@redhat.com>
4094 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4095 (elf_64_file_p): Make static.
4096 (linux_pid_exe_is_elf_64_file): New.
4097 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4098 Delete declarations.
4099 (linux_pid_exe_is_elf_64_file): Declare.
4100 * linux-x86-low.c (x86_arch_setup): Use
4101 linux_pid_exe_is_elf_64_file.
4103 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4105 * linux-low.c (linux_wait_for_event_1): Rename to ...
4106 (linux_wait_for_event): ... here and merge it with former
4107 linux_wait_for_event - new variable wait_ptid, use it.
4108 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4110 2012-01-23 Pedro Alves <palves@redhat.com>
4112 * server.c (main): Avoid yet another case of infinite loop while
4113 detaching/killing after a longjmp.
4115 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4118 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4120 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4122 * hostio.c (handle_readlink): New function.
4123 (handle_vFile): Call it to handle "vFile:readlink" packets.
4125 2012-01-20 Pedro Alves <palves@redhat.com>
4126 Ulrich Weigand <ulrich.weigand@linaro.org>
4128 * server.c (handle_v_requests): Only support vAttach and vRun to
4129 start multiple processes when in extended protocol mode.
4131 2012-01-17 Pedro Alves <palves@redhat.com>
4133 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4134 memalign plus mprotect to allocate the scratch buffer.
4136 2012-01-13 Pedro Alves <palves@redhat.com>
4138 * server.c (attach_inferior): Clear `cont_thread'.
4140 2012-01-13 Pedro Alves <palves@redhat.com>
4142 * server.c (main): Avoid infinite loop while detaching/killing
4145 2012-01-09 Doug Evans <dje@google.com>
4147 * server.c (start_inferior): Set last_ptid in --wrapper case.
4149 2012-01-06 Yao Qi <yao@codesourcery.com>
4151 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4153 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4155 2012-01-04 Yao Qi <yao@codesourcery.com>
4157 * tracepoint.c (cmd_qtdp): Print debug message
4158 for static tracepoint.
4160 2012-01-04 Yao Qi <yao@codesourcery.com>
4162 * tracepoint.c (trace_vdebug): Differentiate debug message
4163 between gdbserver and IPA.
4165 2012-01-03 Yao Qi <yao@codesourcery.com>
4167 * tracepoint.c (tracepoint_was_hit): Don't collect for
4170 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4172 * terminal.h: Reformat copyright header.
4174 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4176 * server.c (gdbserver_version): Update copyright year.
4177 * gdbreplay.c (gdbreplay_version): Likewise.
4179 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4181 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4184 2011-12-18 Hui Zhu <teawater@gmail.com>
4185 * linux-low.c (linux_create_inferior): Save return value to ret.
4187 2011-12-18 Hui Zhu <teawater@gmail.com>
4189 * linux-low.c (linux_create_inferior): Save return value to ret.
4191 2011-12-16 Doug Evans <dje@google.com>
4193 * linux-low.c (linux_create_inferior): If stdio connection,
4194 redirect stdin from /dev/null, stdout to stderr.
4195 * remote-utils.c (remote_is_stdio): New static global.
4196 (remote_connection_is_stdio): New function.
4197 (remote_prepare): Handle stdio connection.
4198 (remote_open): Ditto.
4199 (remote_close): Don't close stdin for stdio connections.
4200 (read_prim,write_prim): New functions. Replace all calls to
4201 read/write to these.
4202 * server.c (main): Watch for "-" argument. Move call to
4203 remote_prepare before start_inferior.
4204 * server.h (STDIO_CONNECTION_NAME): New macro.
4205 (remote_connection_is_stdio): Declare.
4207 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4208 in debugging output.
4210 2011-12-15 Yao Qi <yao@codesourcery.com>
4212 * tracepoint.c: Include sys/syscall.h.
4213 (gdb_ust_thread): Remove preprocessor conditional.
4215 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4217 * linux-low.c (linux_detach_one_lwp): Call
4218 the_low_target.prepare_to_resume before detaching.
4220 2011-12-14 Yao Qi <yao@codesourcery.com>
4222 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4225 2011-12-14 Yao Qi <yao@codesourcery.com>
4227 * i386-low.c (i386_low_stopped_data_address): Initialize local
4230 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4234 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4235 DR_CONTROL unless necessary. Extend comments.
4236 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4237 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4239 2011-12-13 Yao Qi <yao@codesourcery.com>
4241 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4243 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4245 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4247 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4248 Print new debug message for such case.
4250 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4252 Fix overlapping memcpy.
4253 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4254 the read_inferior_memory transfer.
4255 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4256 write_inferior_memory transfer.
4257 (set_fast_tracepoint_jump): New variable buf. Use it for the
4258 read_inferior_memory and write_inferior_memory transfers.
4259 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4260 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4261 Use it for the write_inferior_memory transfer.
4262 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4265 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4267 * linux-low.c (fetch_register, store_register): Make code
4268 consistent, fix formatting.
4270 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4272 * linux-low.c (usr_store_inferior_registers): Factor out code
4273 to handle individual registers into...
4274 (store_register): ... this new function.
4276 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4278 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4279 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4280 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4281 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4282 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4283 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4284 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4285 (srv_xmlfiles): Add new XML files.
4287 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4289 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4290 (init_registers_s390_linux32v1): Add prototype.
4291 (init_registers_s390_linux32v2): Likewise.
4292 (init_registers_s390_linux64v1): Likewise.
4293 (init_registers_s390_linux64v2): Likewise.
4294 (init_registers_s390x_linux64v1): Likewise.
4295 (init_registers_s390x_linux64v2): Likewise.
4296 (s390_num_regs): Increment to 52.
4297 (s390_regmap): Add orig_r2 register.
4298 (s390_num_regs_3264): Increment to 68.
4299 (s390_regmap_3264): Add orig_r2 register.
4300 (s390_collect_ptrace_register): Handle orig_r2 register.
4301 (s390_supply_ptrace_register): Likewise.
4302 (s390_fill_last_break): New function.
4303 (s390_store_last_break): Likewise.
4304 (s390_fill_system_call): New function.
4305 (s390_store_system_call): Likewise.
4306 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4308 (s390_check_regset): New function.
4309 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4310 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4311 Update target_regsets for available register sets.
4313 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4314 Jan Kratochvil <jan.kratochvil@redhat.com>
4316 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4317 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4319 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4320 * linux-low.h (struct process_info_private): New member r_debug.
4321 * server.c (handle_qxfer_libraries): Call
4322 the_target->qxfer_libraries_svr4.
4323 (handle_qxfer_libraries_svr4): New function.
4324 (qxfer_packets): New entry "libraries-svr4".
4325 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4326 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4327 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4328 PACKET_qXfer_libraries_svr4.
4330 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4332 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4333 PSW address/mask between 8-byte and 16-byte formats.
4334 (s390_supply_ptrace_register): Likewise.
4335 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4336 basic addressing mode bit.
4338 2011-11-24 Stan Shebs <stan@codesourcery.com>
4340 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4342 2011-11-17 Stan Shebs <stan@codesourcery.com>
4344 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4345 (tracing_start_time): New global.
4346 (tracing_stop_time): New global.
4347 (tracing_user_name): New global.
4348 (tracing_notes): New global.
4349 (tracing_stop_note): New global.
4350 (cmd_qtstart): Set traceframe_usage, start_time.
4351 (stop_tracing): Set stop_time.
4352 (cmd_qtstatus): Report additional status.
4353 (cmd_qtp): New function.
4354 (handle_tracepoint_query): Call it.
4355 (cmd_qtnotes): New function.
4356 (handle_tracepoint_general_set): Call it.
4357 (get_timestamp): Rename from tsv_get_timestamp.
4359 2011-11-14 Stan Shebs <stan@codesourcery.com>
4360 Kwok Cheung Yeung <kcy@codesourcery.com>
4362 * linux-x86-low.c (small_jump_insn): New.
4363 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4364 trampoline and error message, build a trampoline and issue a small
4365 jump instruction to it.
4366 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4367 trampoline and error message.
4368 (x86_get_min_fast_tracepoint_insn_len): New.
4369 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4370 * linux-low.h (struct linux_target_ops): Add arguments to
4371 install_fast_tracepoint_jump_pad operation, add new operation.
4372 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4374 (linux_get_min_fast_tracepoint_insn_len): New function.
4375 (linux_target_op): Add new operation.
4376 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4377 (gdb_trampoline_buffer_end): Ditto.
4378 (gdb_trampoline_buffer_error): Ditto.
4379 (struct ipa_sym_addresses): Add fields for new IPA variables.
4380 (symbol_list): Add entries for new IPA variables.
4381 (struct tracepoint): Add fields to hold the address range of the
4382 trampoline used by the tracepoint.
4383 (trampoline_buffer_head): New static variable.
4384 (trampoline_buffer_tail): Ditto.
4385 (claim_trampoline_space): New function.
4386 (have_fast_tracepoint_trampoline_buffer): New function.
4387 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4389 (install_fast_tracepoint): Ditto, also add error buffer argument.
4390 (cmd_qtminftpilen): New function.
4391 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4392 (fast_tracepoint_from_trampoline_address): New function.
4393 (fast_tracepoint_collecting): Handle trampoline as part of jump
4395 (set_trampoline_buffer_space): New function.
4396 (initialize_tracepoint): Initialize new IPA variables.
4397 * target.h (struct target_ops): Add arguments to
4398 install_fast_tracepoint_jump_pad operation, add new
4399 get_min_fast_tracepoint_insn_len operation.
4400 (target_get_min_fast_tracepoint_insn_len): New.
4401 (install_fast_tracepoint_jump_pad): Add arguments.
4402 * server.h (IPA_BUFSIZ): Define.
4403 * linux-i386-ipa.c: Include extra header files.
4404 (initialize_fast_tracepoint_trampoline_buffer): New function.
4405 (initialize_low_tracepoint): Call it.
4406 * server.h (set_trampoline_buffer_space): Declare.
4407 (claim_trampoline_space): Ditto.
4408 (have_fast_tracepoint_trampoline_buffer): Ditto.
4410 2011-11-14 Yao Qi <yao@codesourcery.com>
4412 * server.c (handle_query): Handle InstallInTrace for qSupported.
4413 * tracepoint.c (add_tracepoint): Sort list.
4414 (install_tracepoint, download_tracepoint): New.
4415 (cmd_qtdp): Call them to install and download tracepoints.
4416 (sort_tracepoints): Removed.
4417 (cmd_qtstart): Update.
4419 2011-11-14 Yao Qi <yao@codesourcery.com>
4421 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4422 * mem-break.h: Declare.
4423 * tracepoint.c (cmd_qtstart): Move some code to ...
4424 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4426 (download_tracepoints): Move some code to ...
4427 (download_tracepoint_1): ... here. New.
4429 2011-11-08 Yao Qi <yao@codesourcery.com>
4431 * remote-utils.c (relocate_instruction): A comment fix.
4433 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4435 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4436 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4437 dr_status_mirror and dr_control_mirror from debug_reg_state.
4438 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4439 (i386_initial_stuff): Remove use of deleted globals.
4440 (i386_get_thread_context, i386_set_thread_context,
4441 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4442 from debug_reg_state.
4444 2011-11-05 Yao Qi <yao@codesourcery.com>
4446 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4447 address as TPOINT's.
4449 2011-11-02 Stan Shebs <stan@codesourcery.com>
4451 * tracepoint.c (agent_mem_read_string): New function.
4452 (eval_agent_expr): Call it for tracenz.
4453 * server.c (handle_query): Report support for tracenz.
4455 2011-11-02 Yao Qi <yao@codesourcery.com>
4457 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4459 2011-11-02 Yao Qi <yao@codesourcery.com>
4461 * target.h: Fix a typo in comment.
4463 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4465 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4466 clobber the breakpoints' shadows with fast tracepoint jumps.
4467 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4468 * target.c (write_inferior_memory): Also pass MYADDR down to
4471 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4473 * configure.ac: Check support for personality routine.
4474 * configure: Regenerate.
4475 * config.in: Likewise.
4476 * linux-low.c: Include <sys/personality.h>.
4477 Define ADDR_NO_RANDOMIZE if necessary.
4478 (linux_create_inferior): Disable address space randomization when
4479 forking inferior, if requested.
4480 (linux_supports_disable_randomization): New function.
4481 (linux_target_ops): Install it.
4482 * server.h (disable_randomization): Declare.
4483 * server.c (disable_randomization): New global variable.
4484 (handle_general_set): Handle QDisableRandomization.
4485 (handle_query): Likewise for qSupported.
4486 (main): Support --disable-randomization and --no-disable-randomization
4487 command line arguments.
4488 * target.h (struct target_ops): Add supports_disable_randomization.
4489 (target_supports_disable_randomization): New macro.
4491 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4493 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4495 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4496 [!PT_GETDSBT] (target_loadmap): New definition.
4497 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4498 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4499 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4500 and PT_GETDSBT to LINUX_LOADMAP.
4501 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4502 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4504 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4506 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4507 (arm_linux_hwbp_cap): New static variable.
4508 (arm_linux_get_hwbp_cap): Replace by ...
4509 (arm_linux_init_hwbp_cap): ... this new function.
4510 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4511 (arm_linux_get_hw_watchpoint_count): Likewise.
4512 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4513 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4514 (arm_prepare_to_resume): Use perror_with_name instead of error.
4516 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4518 * linux-arm-low.c: Include <signal.h>.
4519 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4520 (struct arm_linux_hwbp_cap): New data type.
4521 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4522 (struct arm_linux_hw_breakpoint): New data type.
4523 (MAX_BPTS, MAX_WPTS): Define.
4524 (struct arch_process_info, struct arch_lwp_info): New data types.
4525 (arm_linux_get_hwbp_cap): New function.
4526 (arm_linux_get_hw_breakpoint_count): Likewise.
4527 (arm_linux_get_hw_watchpoint_count): Likewise.
4528 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4529 (arm_hwbp_control_initialize): Likewise.
4530 (arm_hwbp_control_is_enabled): Likewise.
4531 (arm_hwbp_control_is_initialized): Likewise.
4532 (arm_hwbp_control_disable): Likewise.
4533 (arm_linux_hw_breakpoint_equal): Likewise.
4534 (arm_linux_hw_point_initialize): Likewise.
4535 (struct update_registers_data): New data structure.
4536 (update_registers_callback: New function.
4537 (arm_insert_point): Likewise.
4538 (arm_remove_point): Likewise.
4539 (arm_stopped_by_watchpoint): Likewise.
4540 (arm_stopped_data_address): Likewise.
4541 (arm_new_process): Likewise.
4542 (arm_new_thread): Likewise.
4543 (arm_prepare_to_resume): Likewise.
4544 (the_low_target): Register arm_insert_point, arm_remove_point,
4545 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4546 arm_new_thread, and arm_prepare_to_resume.
4548 2011-09-15 Stan Shebs <stan@codesourcery.com>
4550 * server.h (struct emit_ops): Add compare-goto fields.
4551 * tracepoint.c (gdb_agent_op_sizes): New table.
4552 (emit_eq_goto): New function.
4553 (emit_ne_goto): New function.
4554 (emit_lt_goto): New function.
4555 (emit_le_goto): New function.
4556 (emit_gt_goto): New function.
4557 (emit_ge_goto): New function.
4558 (is_goto_target): New function.
4559 (compile_bytecodes): Recognize special cases of compare-goto
4560 combinations and call specialized emitters for them.
4561 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4562 (amd64_emit_ne_goto): New function.
4563 (amd64_emit_lt_goto): New function.
4564 (amd64_emit_le_goto): New function.
4565 (amd64_emit_gt_goto): New function.
4566 (amd64_emit_ge_goto): New function.
4567 (amd64_emit_ops): Add the new functions.
4568 (i386_emit_eq_goto): New function.
4569 (i386_emit_ne_goto): New function.
4570 (i386_emit_lt_goto): New function.
4571 (i386_emit_le_goto): New function.
4572 (i386_emit_gt_goto): New function.
4573 (i386_emit_ge_goto): New function.
4574 (i386_emit_ops): Add the new functions.
4576 2011-09-08 Stan Shebs <stan@codesourcery.com>
4578 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4579 (i386_emit_epilogue): Restore %ebx.
4581 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4583 * server.c (step_thread): Remove definition.
4584 (process_serial_event): Don't handle Hs.
4585 * server.h (step_thread): Remove declaration.
4586 * target.c (set_desired_inferior): Remove use of step_thread.
4588 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4590 * linux-low.c: Include linux-procfs.h.
4591 (linux_attach_lwp_1): Update comments.
4592 (linux_attach): Scan for existing threads when attaching to a
4593 process that is the tgid.
4594 * Makefile.in: Update dependencies.
4596 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4598 * configure.srv: Add linux-procfs.o dependencies.
4600 2011-08-14 Yao Qi <yao@codesourcery.com>
4602 * target.h (struct target_ops): Fix indent.
4603 * win32-low.c (win32_target_ops): Fix comment.
4605 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4606 Yao Qi <yao@codesourcery.com>
4608 * Makefile.in (clean): Remove tic6x-*.c files.
4609 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4610 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4611 (tic6x-c64xp-linux.c): Likewise.
4612 * configure.srv: Add support for tic6x-*-uclinux.
4613 * linux-tic6x-low.c: New.
4614 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4616 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4617 Yao Qi <yao@codesourcery.com>
4619 * target.h (struct target_ops): Add read_loadmap.
4620 * linux-low.c (struct target_loadseg): New type.
4621 (struct target_loadmap): New type.
4622 (linux_read_loadmap): New function.
4623 (linux_target_ops): Add linux_read_loadmap.
4624 * server.c (handle_query): Support qXfer:fdpic:read packet.
4625 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4628 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4630 * win32-low.c: Include <stdint.h>.
4632 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4634 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4635 to the inferior here.
4636 (i386_remove_aligned_watchpoint): Ditto.
4637 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4638 fit part of the watchpoint in the debug registers.
4639 (i386_update_inferior_debug_regs): New.
4640 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4641 registers, and only update the inferior on success.
4642 (i386_low_remove_watchpoint): Ditto.
4644 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4646 * linux-low.c (compare_ints, unique, list_threads, show_process,
4647 linux_core_of_thread): Delete.
4648 (linux_target_ops): Change linux_core_of_thread to
4649 linux_common_core_of_thread.
4650 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4651 * utils.c (malloc_failure): Change type of argument.
4652 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4653 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4654 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4655 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4656 (IPA_OBJS): Add common-utils-ipa.o.
4657 (ptid_h, linux_osdata_h): New macros.
4658 (server_h): Add common/common-utils.h, common/xml-utils.h,
4659 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4661 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4662 ptid.o, buffer.o): New rules.
4663 (linux-low.o): Add common/linux-osdata.h as a dependency.
4664 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4665 * configure.ac: Add AC_HEADER_DIRENT check.
4666 * config.in: Regenerate.
4667 * configure: Regenerate.
4668 * remote-utils.c (xml_escape_text): Delete.
4669 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4670 buffer_xml_printf): Move to common/buffer.c.
4671 * server.c (main): Remove call to initialize_inferiors.
4672 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4673 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4674 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4675 internal_error, gdb_assert, gdb_assert_fail): Delete.
4676 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4677 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4679 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4680 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4681 initialize_inferiors): Delete.
4683 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4685 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4688 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4690 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4692 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4694 2011-05-26 Yao Qi <yao@codesourcery.com>
4696 * Makefile.in (thread-db.o): Track dependence to
4697 common/gdb_thread_db.h.
4698 * thread-db.c: include gdb_thread_db.h from right place.
4700 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4702 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4703 __FILE__ and __LINE__ to internal_error.
4705 2011-05-13 Doug Evans <dje@google.com>
4707 * thread-db.c (try_thread_db_load_from_sdir): New function.
4708 (try_thread_db_load_from_dir): New function.
4709 (thread_db_load_search): Handle $sdir, ignore $pdir.
4710 Remove trying of system directories if search of
4711 libthread-db-search-path fails, that is now done via $sdir.
4713 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4715 * server.c (handle_query): Add EnableDisableTracepoints to the list
4716 of supported features.
4717 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4719 (cmd_qtenable_disable): New.
4720 (cmd_qtstart): Install tracepoints even if disabled.
4721 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4722 receiving a QTEnable or QTDisable packet.
4723 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4724 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4726 (gdb_probe): Skip data collection if static tracepoint is disabled.
4728 2011-05-10 Doug Evans <dje@google.com>
4730 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4732 2011-05-04 Doug Evans <dje@google.com>
4734 * linux-low.c (linux_join): Skip process lookup.
4735 * spu-low.c (spu_join): Ditto.
4736 * server.c (join_inferiors_callback): Delete.
4737 (process_serial_event): For 'D' packet (detach) call join_inferior
4740 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4742 * README: Don't mention xscale*-*-linux*.
4743 * configure.srv (xscale*-*-linux*): Don't handle target.
4745 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4747 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4749 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4750 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4751 (i386_emit_void_call_2): Likewise.
4753 2011-04-26 Yao Qi <yao@codesourcery.com>
4755 * linux-low.c: Move common macros to linux-ptrace.h.
4756 Include linux-ptrace.h.
4757 * Makefile.in (linux_ptrace_h): New.
4758 (linux-low.o): Depends on linux-ptrace.h.
4760 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4762 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4763 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4764 (remote_prepare): New function with most of the TCP code from ...
4765 (remote_open): ... here. Detect PORT here unconditionally. Move also
4766 setting transport_is_reliable.
4767 * server.c (run_once): New variable.
4768 (gdbserver_usage): Document it.
4769 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4770 the first run if RUN_ONCE.
4771 * server.h (run_once, remote_prepare): New declarations.
4773 2011-04-19 Tom Tromey <tromey@redhat.com>
4775 * win32-low.c (handle_load_dll): Remove duplicate "the".
4777 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4779 Remove support for old Cygwin 1.5 versions.
4780 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4781 function to avoid warning.
4782 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4785 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4787 * gdbserver/server.h (Macro _): Define it if not available.
4789 2011-03-14 Michael Snyder <msnyder@vmware.com>
4791 * hostio.c (handle_close): Remove unnecessary null test.
4793 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4795 * Makefile.in (maintainer-clean realclean distclean): Remove
4796 "make ... subdir_do" command.
4798 2011-03-10 Michael Snyder <msnyder@vmware.com>
4800 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4802 * server.c (handle_v_run): Free alloced buffer on early return.
4804 2011-03-09 Yao Qi <yao@codesourcery.com>
4807 2011-03-04 Yao Qi <yao@codesourcery.com>
4809 * Makefile.in: Remove GNU make feature --directory.
4811 2011-03-05 Yao Qi <yao@codesourcery.com>
4813 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4814 (subdir_do): New make target. Copied from gdb/Makefile.
4815 (maintainer-clean, realclean, distclean, clean): Call corresponding
4816 make targets in common/Makefile.
4818 2011-02-11 Yao Qi <yao@codesourcery.com>
4820 * configure.ac: Call AC_PROG_RANLIB.
4821 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4822 * configure: Regenerate.
4824 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4826 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4828 2011-03-06 Yao Qi <yao@codesourcery.com>
4830 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4832 2011-03-05 Yao Qi <yao@codesourcery.com>
4834 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4835 (subdir_do): New make target. Copied from gdb/Makefile.
4836 (maintainer-clean, realclean, distclean, clean): Call corresponding
4837 make targets in common/Makefile.
4839 2011-03-04 Yao Qi <yao@codesourcery.com>
4841 * Makefile.in: Remove GNU make feature --directory.
4843 2011-03-04 Michael Snyder <msnyder@vmware.com>
4845 * server.c (queue_stop_reply): Call xmalloc not malloc.
4847 2011-03-02 Michael Snyder <msnyder@vmware.com>
4849 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4851 2011-02-28 Michael Snyder <msnyder@vmware.com>
4853 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4854 (cmd_qtframe): Ditto.
4855 (cmd_qtbuffer): Ditto.
4856 (cmd_bigqtbuffer): Ditto.
4858 * utils.c (decimal2str): Initialize 'width' to nine, then
4861 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4863 * hostio.c (require_data): Free *data, not data.
4865 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4867 * hostio.c (require_data): Use free, not xfree.
4869 2011-02-27 Michael Snyder <msnyder@vmware.com>
4871 * server.c (handle_query): Discard unused value.
4873 * hostio.c (require_data): Free malloc memory before returning
4876 2011-02-26 Michael Snyder <msnyder@vmware.com>
4878 * linux-low.c (list_threads): Call closedir for dirent.
4880 2011-02-27 Michael Snyder <msnyder@vmware.com>
4882 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4883 a case statement falls through.
4885 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4887 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4890 2011-02-26 Michael Snyder <msnyder@vmware.com>
4892 * utils.c (decimal2str): Eliminate dead code and dead param.
4893 (pulongest): Drop dead param from call to decimal2str.
4896 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4898 Revert the following patch (not approved yet):
4899 2011-02-21 Hui Zhu <teawater@gmail.com>
4900 * tracepoint.c (tp_printf): New function.
4901 (eval_agent_expr): Handle gdb_agent_op_printf.
4903 2011-02-21 Hui Zhu <teawater@gmail.com>
4905 * tracepoint.c (tp_printf): New function.
4906 (eval_agent_expr): Handle gdb_agent_op_printf.
4908 2011-02-18 Tom Tromey <tromey@redhat.com>
4910 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4911 (tracepoint.o): Likewise.
4912 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4913 (gdb_agent_op_names): Likewise.
4915 2011-02-18 Tom Tromey <tromey@redhat.com>
4917 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4918 gdb_agent_op_rot>: New constants.
4919 (gdb_agent_op_names): Add pick and roll.
4920 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4923 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4925 * aclocal.m4: Regenerated with aclocal-1.11.1.
4927 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4929 * server.c (handle_qxfer_traceframe_info): New.
4930 (qxfer_packets): Register "traceframe-info".
4931 (handle_query): Report support for qXfer:traceframe-info:read+.
4932 * tracepoint.c (match_blocktype): New.
4933 (traceframe_find_block_type): Rename to ...
4934 (traceframe_walk_blocks): ... this. Add callback filter argument,
4936 (traceframe_find_block_type): New, reimplemented on top of
4937 traceframe_walk_blocks.
4938 (build_traceframe_info_xml): New.
4939 (traceframe_read_info): New.
4940 * server.h (traceframe_read_info): Declare.
4942 2011-02-11 Yao Qi <yao@codesourcery.com>
4944 * configure.ac: Call AC_PROG_RANLIB.
4945 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4946 * configure: Regenerate.
4948 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4950 * server.c (gdb_read_memory): Change return semantics to allow
4952 (handle_search_memory_1): Adjust.
4953 (process_serial_event) <'m' packet>: Handle partial transfers.
4954 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
4956 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4958 * regcache.c (init_register_cache): Initialize
4959 regcache->register_status.
4960 (free_register_cache): Release regcache->register_status.
4961 (regcache_cpy): Copy register_status.
4962 (registers_to_string): Print 'x's for unavailable registers.
4963 (supply_register): Mark the register's status valid or
4964 unavailable, depending on whether a buffer was passed in or not.
4965 (supply_register_zeroed): New.
4966 (supply_regblock): Mark the registers' status valid or
4967 unavailable, depending on whether a buffer was passed in or not.
4968 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
4969 (struct regcache): New `register_status' field.
4970 (supply_register_zeroed): Declare.
4971 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
4972 supply_register_zeroed, rather than passing a NULL buffer to
4974 * tracepoint.c (fetch_traceframe_registers): Update comment.
4976 2011-01-28 Pedro Alves <pedro@codesourcery.com>
4978 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
4981 2011-01-25 Pedro Alves <pedro@codesourcery.com>
4983 * server.h (decode_xfer_write): Change prototype.
4984 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
4985 and don't extract the annex here.
4986 * server.c (decode_xfer_read): Remove `annex' parameter,
4987 and don't extract the annex here.
4989 (struct qxfer): New.
4990 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
4991 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
4992 (handle_qxfer_statictrace): New functions, abstracted out from
4993 handle_query, and made to use the struct qxfer interface.
4994 (handle_threads_qxfer_proper): Rename to ...
4995 (handle_qxfer_threads_proper): ... this.
4996 (handle_threads_qxfer): Rename to ...
4997 (handle_qxfer_threads): ... this. Adjust.
4998 (qxfer_packets): New array.
4999 (handle_qxfer): New function.
5000 (handle_query): Use handle_qxfer.
5002 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5004 * gdbreplay.c: Shorten lines of >= 80 columns.
5005 * linux-low.c: Ditto.
5006 * linux-ppc-low.c: Ditto.
5007 * linux-s390-low.c: Ditto.
5008 * linux-sparc-low.c: Ditto.
5009 * linux-x86-low.c: Ditto.
5010 * linux-xtensa-low.c: Ditto.
5011 * mem-break.c: Ditto.
5013 * regcache.h: Ditto.
5014 * remote-utils.c: Ditto.
5017 * thread-db.c: Ditto.
5018 * tracepoint.c: Ditto.
5020 * win32-low.h: Ditto.
5022 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5024 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5027 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5029 * server.c (gdbserver_version): Update copyright year in version
5031 * gdbreplay.c (gdbreplay_version): Ditto.
5033 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5035 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5036 * linux-bfin-low.c: New file.
5037 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5038 PT_DATA_ADDR for BFIN targets.
5039 * Makefile.in (SFILES): Add linux-bfin-low.c.
5040 (clean): Remove reg-bfin.c.
5041 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5042 * README: Mention supported Blackfin targets.
5044 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5046 * .gitignore: New file.
5048 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5050 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5052 2010-10-22 Jie Zhang <jie@codesourcery.com>
5054 * Makefile.in: Add FLAGS_TO_PASS variable.
5055 (install): Remove dependency of install-only and recursively
5056 invoke make for install-only.
5058 2010-10-04 Doug Evans <dje@google.com>
5060 * Makefile.in (uninstall): Use $(DESTDIR).
5062 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5066 * linux-x86-low.c (compat_siginfo_from_siginfo)
5067 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5068 si_code is < 0. Check for si_code == SI_TIMER before checking for
5071 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5073 * lynx-i386-low.c: New file.
5074 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5076 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5078 * lynx-low.c (ptrace_request_to_str): Remove handling for
5079 request values that have been removed in LynxOS 5.x.
5081 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5083 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5086 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5088 * configure.ac: Add --enable-inprocess-agent option.
5089 * configure: Rebuilt.
5091 2010-09-06 Yao Qi <yao@codesourcery.com>
5093 * linux-low.c (linux_kill): Remove unused variable.
5094 (linux_stabilize_threads): Likewise.
5095 * server.c (start_inferior): Likewise.
5096 (queue_stop_reply_callback): Likewise.
5097 * tracepoint.c (do_action_at_tracepoint): Likewise.
5099 2010-09-06 Yao Qi <yao@codesourcery.com>
5101 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5104 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5106 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5108 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5110 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5113 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5115 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5116 gdbserver/lynx-ppc-low.c: New files.
5117 * Makefile.in (lynx_low_h): New variable.
5118 (lynx-low.o, lynx-ppc-low.o): New rules.
5119 * configure.ac: On LynxOS, link with -lnetinet.
5120 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5121 * configure: regenerate.
5123 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5125 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5126 * configure.ac: Add check for vasprintf and vsnprintf.
5127 * configure, config.in: Regenerate.
5128 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5130 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5132 * gdbreplay.c: Move include of alloca.h up, next to include of
5134 * server.h: Add include of malloc.h.
5135 * mem-break.c: Remove include of malloc.h.
5136 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5138 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5140 * Makefile.in (memmem.o): Build with -Wno-error.
5142 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5144 * utils.c (xsnprintf): Make non-static.
5145 * server.h: Add xsnprintf declaration.
5146 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5147 replace calls to snprintf by calls to xsnprintf throughout.
5149 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5151 * configure.ac: Add configure check for alloca.
5152 * configure, config.in: Regenerate.
5153 * server.h: Include alloca.h if it exists.
5154 * gdbreplay.c: Include alloca.h if it exists.
5156 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5158 * linux-low.c (__SIGRTMIN): Define if not already defined.
5159 (linux_create_inferior): Check for __ANDROID__ rather than
5161 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5162 are already deferred.
5163 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5164 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5165 stopped and already has a pending signal to report.
5166 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5167 a pending signal to report or is moving out of a jump pad.
5168 (linux_init_signals): Check for __ANDROID__ rather than
5171 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5173 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5174 debug_threads check. Avoid a linear search when not doing debug
5177 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5179 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5180 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5181 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5182 (process_event): Change local fd's type to gdb_fildes_t.
5183 (create_file_handler): Adjust prototype.
5184 (delete_file_handler): Adjust prototype.
5185 (handle_file_event): Adjust prototype. Use pfildes.
5186 (create_file_event): Adjsut prototype.
5187 * remote-utils.c (remote_desc, listen_desc): Change type to
5189 * server.h: New gdb_fildes_t typedef.
5190 [USE_WIN32API]: Include winsock2.h.
5191 (delete_file_handler, add_file_handler): Adjust prototypes.
5193 * utils.c (pfildes): New.
5195 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5197 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5198 * configure: Regenerate.
5200 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5202 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5203 (linux_done_accessing_memory): ... this.
5204 (linux_target_ops): Adjust.
5205 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5206 * nto-low.c (nto_target_ops): Adjust comment.
5207 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5208 * spu-low.c (spu_target_ops): Adjust comment.
5209 * target.h (target_ops): Rename unprepare_to_access_memory field
5210 to done_accessing_memory.
5211 (unprepare_to_access_memory): Rename to ...
5212 (done_accessing_memory): ... this.
5214 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5216 * linux-low.c (linux_prepare_to_access_memory): New.
5217 (linux_unprepare_to_access_memory): New.
5218 (linux_target_ops): Install them.
5219 * server.c (read_memory): Rename to ...
5220 (gdb_read_memory): ... this. Use
5221 prepare_to_access_memory/prepare_to_access_memory.
5222 (write_memory): Rename to ...
5223 (gdb_write_memory): ... this. Use
5224 prepare_to_access_memory/prepare_to_access_memory.
5225 (handle_search_memory_1): Adjust.
5226 (process_serial_event): Adjust.
5227 * target.h (struct target_ops): New fields
5228 prepare_to_access_memory and unprepare_to_access_memory.
5229 (prepare_to_access_memory, unprepare_to_access_memory): New.
5230 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5231 prepare_to_access_memory/prepare_to_access_memory.
5232 * nto-low.c (nto_target_ops): Adjust.
5233 * spu-low.c (spu_target_ops): Adjust.
5234 * win32-low.c (win32_target_ops): Adjust.
5236 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5238 * Makefile.in (WARN_CFLAGS): Get it from configure.
5239 (WERROR_CFLAGS): New.
5240 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5241 * configure.ac: Introduce --enable-werror, which adds -Werror to
5242 the compiler command line. Enabled by default. Disable with
5243 --disable-werror. Add -Wdeclaration-after-statement
5244 Wpointer-arith and -Wformat-nonliteral to warning flags.
5245 * configure: Regenerate.
5247 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5249 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5251 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5253 * gdbreplay.c (remote_error): New.
5255 (expect): Use gdbchar. Check for error reading from GDB.
5256 Clarify sync error output.
5257 (play): Check for errors writing to GDB.
5258 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5259 * remote-utils.c (getpkt): Check for errors writing to the remote
5262 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5264 * linux-low.c (linux_wait_1): Move non-debugging code out of
5265 `debug_threads' control.
5267 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5269 * linux-low.c (linux_wait_1): Don't set last_status here.
5270 * server.c (push_event, queue_stop_reply_callback): Assert we're
5271 not pushing a TARGET_WAITKIND_IGNORE event.
5272 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5273 (myresume, handle_target_event): Set the thread's last_resume_kind
5274 and last_status from the target returned status.
5276 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5280 * linux-x86-low.c (update_debug_registers_callback): New.
5281 (i386_dr_low_set_addr): Use it.
5282 (i386_dr_low_get_addr): New.
5283 (i386_dr_low_set_control): Use update_debug_registers_callback.
5284 (i386_dr_low_get_control): New.
5285 (i386_dr_low_get_status): Adjust.
5286 * linux-low.c (linux_stop_lwp): New.
5287 * linux-low.h (linux_stop_lwp): Declare.
5289 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5290 argument instead of a i386_debug_reg_state.
5291 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5292 a i386_debug_reg_state.
5293 (i386_insert_aligned_watchpoint): Adjust.
5294 (i386_remove_aligned_watchpoint): Adjust.
5295 (i386_low_stopped_data_address): Read the debug registers from the
5296 inferior instead of from the mirrors.
5297 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5298 (i386_dr_low_get_addr): Declare.
5299 (i386_dr_low_get_control): Declare.
5300 (i386_dr_low_get_status): Change prototype.
5302 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5303 (i386_dr_low_get_addr): New.
5304 (i386_dr_low_get_control): New.
5305 (i386_dr_low_get_status): Adjust prototype. Return
5307 (i386_initial_stuff): Clear dr_status_mirror and
5309 (i386_get_thread_context): Adjust.
5310 (i386_set_thread_context): Adjust.
5311 (i386_thread_added): Adjust.
5313 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5315 * linux-low.h (linux_thread_area): Delete declaration.
5317 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5319 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5320 after its termination.
5322 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5324 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5325 (gdb_wants_all_stopped): Delete.
5326 (linux_wait_1): Don't call them.
5327 * server.c (handle_v_cont): Tag all threads as want-stopped.
5328 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5329 stopped as "client-wants-stopped".
5331 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5333 * Makefile.in (signals_h): New.
5334 (server_h): Depend on it.
5335 (server.o): Don't depend on $(signals_def).
5336 (signals.o): Depend on $(signals_def).
5338 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5340 * Makefile.in (signals_def): New.
5341 (server_h): Append include/gdb/signals.h and signals_def.
5342 (server.o): Append signals_def.
5344 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5346 * server.c (handle_target_event): Use target_signal_to_host for
5347 resume_info.sig initialization.
5348 * target.h (struct thread_resume) <sig>: New comment.
5350 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5352 * server.c (handle_query): strcpy() the returned string from paddress()
5353 instead of sprintf().
5354 * utils.c (paddress): Return phex_nz().
5356 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5358 * server.c (handle_v_cont): Call mourn_inferior if process
5360 (myresume): Likewise.
5362 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5364 Static tracepoints, and integration with UST.
5366 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5367 * mem-break.c (uninsert_all_breakpoints)
5368 (reinsert_all_breakpoints): New.
5369 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5370 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5371 (gdb_agent_ust_loaded, helper_thread_id)
5372 (gdb_agent_helper_thread_id): New macros.
5373 (struct ipa_sym_addresses): Add addr_ust_loaded,
5374 addr_helper_thread_id, addr_cmd_buf.
5375 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5376 (in_process_agent_loaded_ust): New.
5377 (write_e_ust_not_loaded): New.
5378 (maybe_write_ipa_ust_not_loaded): New.
5379 (struct collect_static_trace_data_action): New.
5380 (enum tracepoint_type) <static_tracepoint>: New.
5381 (struct tracepoint) <handle>: Mention static tracepoints.
5382 (struct static_tracepoint_ctx): New.
5383 (CMD_BUF_SIZE): New.
5384 (add_tracepoint_action): Handle static tracepoint actions.
5385 (unprobe_marker_at): New.
5386 (clear_installed_tracepoints): Handle static tracepoints.
5387 (cmd_qtdp): Handle static tracepoints.
5388 (probe_marker_at): New.
5389 (cmd_qtstart): Handle static tracepoints.
5390 (response_tracepoint): Handle static tracepoints.
5391 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5392 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5393 (get_context_regcache): Handle static tracepoints.
5394 (do_action_at_tracepoint): Handle static tracepoint actions.
5395 (traceframe_find_block_type): Handle static trace data blocks.
5396 (traceframe_read_sdata): New.
5397 (download_tracepoints): Download static tracepoint actions.
5398 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5399 (GDB_PROBE_NAME): New.
5404 (ust_marker_to_static_tracepoint): New.
5406 (collect_ust_data_at_tracepoint): New.
5407 (gdb_ust_probe): New.
5408 (UNIX_PATH_MAX, SOCK_DIR): New.
5409 (gdb_ust_connect_sync_socket): New.
5410 (resume_thread, stop_thread): New.
5411 (run_inferior_command): New.
5412 (init_named_socket): New.
5413 (gdb_ust_socket_init): New.
5414 (cstr_to_hexstr): New.
5416 (first_marker, next_marker): New.
5417 (response_ust_marker): New.
5418 (cmd_qtfstm, cmd_qtsstm): New.
5419 (unprobe_marker_at, probe_marker_at): New.
5420 (cmd_qtstmat, gdb_ust_thread): New.
5421 (gdb_ust_init): New.
5422 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5423 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5425 (x86_64_st_collect_regmap): New.
5426 (X86_64_NUM_ST_COLLECT_GREGS): New.
5427 (AMD64_RIP_REGNUM): New.
5428 (supply_static_tracepoint_registers): New.
5429 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5431 (i386_st_collect_regmap): New.
5432 (i386_NUM_ST_COLLECT_GREGS): New.
5433 (supply_static_tracepoint_registers): New.
5434 * server.c (handle_query): Handle qXfer:statictrace:read.
5435 <qSupported>: Report support for StaticTracepoints, and
5436 qXfer:statictrace:read features.
5437 * server.h (traceframe_read_sdata)
5438 (supply_static_tracepoint_registers): Declare.
5439 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5440 (unpack_varlen_hex): Include in IPA build.
5441 * Makefile.in (ustlibs, ustinc): New.
5442 (IPA_OBJS): Add remote-utils-ipa.o.
5443 ($(IPA_LIB)): Link -ldl and -lpthread.
5445 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5446 * config.in, configure: Regenerate.
5448 2010-06-20 Ian Lance Taylor <iant@google.com>
5449 Pedro Alves <pedro@codesourcery.com>
5451 * linux-x86-low.c (always_true): Delete.
5452 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5453 trying to fool the compiler with always_true.
5455 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5457 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5458 conditions in gdbserver.
5460 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5462 * spu-low.c (spu_read_memory): Wrap around local store limit.
5463 (spu_write_memory): Likewise.
5465 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5467 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5468 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5470 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5472 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5473 uses with LONGEST uses.
5475 2010-06-14 Stan Shebs <stan@codesourcery.com>
5476 Pedro Alves <pedro@codesourcery.com>
5480 * linux-x86-low.c: Include limits.h.
5485 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5486 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5487 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5488 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5489 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5490 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5491 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5492 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5493 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5494 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5495 (amd64_emit_void_call_2): New.
5496 (amd64_emit_ops): New.
5497 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5498 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5499 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5500 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5501 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5502 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5503 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5504 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5505 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5506 (i386_emit_stack_adjust, i386_emit_int_call_1)
5507 (i386_emit_void_call_2): New.
5508 (i386_emit_ops): New.
5509 (x86_emit_ops): New.
5510 (the_low_target): Install x86_emit_ops.
5511 * server.h (struct emit_ops): New.
5512 (get_raw_reg_func_addr): Declare.
5513 (current_insn_ptr, emit_error): Declare.
5514 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5515 (set_trace_state_variable_value): New defines.
5516 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5517 addr_get_trace_state_variable_value and
5518 addr_set_trace_state_variable_value.
5519 (symbol_list): New fields for get_raw_reg,
5520 get_trace_state_variable_value and set_trace_state_variable_value.
5521 (condfn): New typedef.
5522 (struct tracepoint): New field `compiled_cond'.
5523 (do_action_at_tracepoint): Clear compiled_cond.
5524 (get_trace_state_variable_value, set_trace_state_variable_value):
5526 (condition_true_at_tracepoint): If there's a compiled condition,
5528 (current_insn_ptr, emit_error): New globals.
5529 (struct bytecode_address): New.
5530 (get_raw_reg_func_addr): New.
5531 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5532 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5533 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5534 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5535 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5536 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5537 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5538 (compile_tracepoint_condition, compile_bytecodes): New.
5539 * target.h (emit_ops): Forward declare.
5540 (struct target_ops): New field emit_ops.
5541 (target_emit_ops): New.
5542 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5543 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5544 * linux-low.c (linux_emit_ops): New.
5545 (linux_target_ops): Install it.
5546 * linux-low.h (struct linux_target_ops): New field emit_ops.
5548 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5550 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5551 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5553 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5554 Stan Shebs <stan@codesourcery.com>
5556 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5557 (all): Depend on $(extra_libraries).
5558 (install-only): Install the IPA.
5559 (IPA_OBJS, IPA_LIB): New.
5560 (clean): Remove the IPA lib.
5561 (IPAGENT_CFLAGS): New.
5562 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5563 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5564 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5565 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5566 * configure.ac: Check for atomic builtins support in the compiler.
5567 (IPA_DEPFILES, extra_libraries): Define.
5568 * configure.srv (ipa_obj): Add description.
5569 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5570 (i[34567]86-*-linux*): Set ipa_obj.
5571 (x86_64-*-linux*): Set ipa_obj.
5572 * linux-low.c (stabilizing_threads): New.
5573 (supports_fast_tracepoints): New.
5574 (linux_detach): Stabilize threads before detaching.
5575 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5576 the lwp is either not stabilizing, or is moving out of a jump pad.
5577 (linux_fast_tracepoint_collecting): New.
5578 (maybe_move_out_of_jump_pad): New.
5579 (enqueue_one_deferred_signal): New.
5580 (dequeue_one_deferred_signal): New.
5581 (linux_wait_for_event_1): If moving out of a jump pad, defer
5582 pending signals to later.
5583 (linux_stabilize_threads): New.
5584 (linux_wait_1): Check if threads need moving out of jump pads, and
5586 (stuck_in_jump_pad_callback): New.
5587 (move_out_of_jump_pad_callback): New.
5589 (linux_resume_one_lwp): Handle moving out of jump pads.
5590 (linux_set_resume_request): Dequeue deferred signals.
5591 (need_step_over_p): Also step over fast tracepoint jumps.
5592 (start_step_over): Also uninsert fast tracepoint jumps.
5593 (finish_step_over): Also reinsert fast tracepoint jumps.
5594 (linux_install_fast_tracepoint_jump): New.
5595 (linux_target_ops): Install linux_stabilize_threads and
5596 linux_install_fast_tracepoint_jump_pad.
5597 * linux-low.h (linux_target_ops) <get_thread_area,
5598 install_fast_tracepoint_jump_pad>: New fields.
5599 (struct lwp_info) <collecting_fast_tracepoint,
5600 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5601 (linux_get_thread_area): Declare.
5602 * linux-x86-low.c (jump_insn): New.
5603 (x86_get_thread_area): New.
5604 (append_insns): New.
5606 (amd64_install_fast_tracepoint_jump_pad): New.
5607 (i386_install_fast_tracepoint_jump_pad): New.
5608 (x86_install_fast_tracepoint_jump_pad): New.
5609 (the_low_target): Install x86_get_thread_area and
5610 x86_install_fast_tracepoint_jump_pad.
5611 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5612 (struct fast_tracepoint_jump): New.
5613 (fast_tracepoint_jump_insn): New.
5614 (fast_tracepoint_jump_shadow): New.
5615 (find_fast_tracepoint_jump_at): New.
5616 (fast_tracepoint_jump_here): New.
5617 (delete_fast_tracepoint_jump): New.
5618 (set_fast_tracepoint_jump): New.
5619 (uninsert_fast_tracepoint_jumps_at): New.
5620 (reinsert_fast_tracepoint_jumps_at): New.
5621 (set_breakpoint_at): Use write_inferior_memory.
5622 (uninsert_raw_breakpoint): Use write_inferior_memory.
5623 (check_mem_read): Mask out fast tracepoint jumps.
5624 (check_mem_write): Mask out fast tracepoint jumps.
5625 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5626 (set_fast_tracepoint_jump): Declare.
5627 (delete_fast_tracepoint_jump)
5628 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5629 (reinsert_fast_tracepoint_jumps_at): Declare.
5630 * regcache.c: Don't compile many functions when building the
5631 in-process agent library.
5632 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5633 the register buffer in the heap.
5634 (free_register_cache): If the register buffer isn't owned by the
5635 regcache, don't free it.
5636 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5637 pre-existing register caches.
5638 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5640 (convert_ascii_to_int): : Constify `from' parameter type.
5641 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5642 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5643 the needed buffer in-place.
5644 (relocate_instruction): New.
5645 * server.c (handle_query) <qSymbols>: If the target supports
5646 tracepoints, give it a chance of looking up symbols. Report
5647 support for fast tracepoints.
5648 (handle_status): Stabilize threads.
5649 (process_serial_event): Adjust.
5650 * server.h (struct fast_tracepoint_jump): Forward declare.
5651 (struct process_info) <fast_tracepoint_jumps>: New field.
5652 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5653 (decode_X_packet, decode_M_packet): Adjust.
5654 (relocate_instruction): Declare.
5655 (in_process_agent_loaded): Declare.
5656 (tracepoint_look_up_symbols): Declare.
5657 (struct fast_tpoint_collect_status): Declare.
5658 (fast_tracepoint_collecting): Declare.
5659 (force_unlock_trace_buffer): Declare.
5660 (handle_tracepoint_bkpts): Declare.
5661 (initialize_low_tracepoint)
5662 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5663 * target.h (struct target_ops) <stabilize_threads,
5664 install_fast_tracepoint_jump_pad>: New fields.
5665 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5666 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5667 [HAVE_STDINT_H]: Include stdint.h.
5668 (trace_debug_1): Rename to ...
5669 (trace_vdebug): ... this.
5670 (trace_debug): Rename to ...
5671 (trace_debug_1): ... this. Add `level' parameter.
5673 (ATTR_USED, ATTR_NOINLINE): New.
5674 (IP_AGENT_EXPORT): New.
5675 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5676 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5677 (about_to_request_buffer_space, trace_buffer_is_full)
5678 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5679 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5680 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5681 (traceframe_write_count, traceframes_created)
5682 (trace_state_variables)
5683 New renaming defines.
5684 (struct ipa_sym_addresses): New.
5685 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5687 (ipa_sym_addrs): New.
5688 (all_tracepoint_symbols_looked_up): New.
5689 (in_process_agent_loaded): New.
5690 (write_e_ipa_not_loaded): New.
5691 (maybe_write_ipa_not_loaded): New.
5692 (tracepoint_look_up_symbols): New.
5693 (debug_threads) [IN_PROCESS_AGENT]: New.
5694 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5695 (UNKNOWN_SIDE_EFFECTS): New.
5696 (stop_tracing): New.
5697 (flush_trace_buffer): New.
5698 (stop_tracing_bkpt): New.
5699 (flush_trace_buffer_bkpt): New.
5700 (read_inferior_integer): New.
5701 (read_inferior_uinteger): New.
5702 (read_inferior_data_pointer): New.
5703 (write_inferior_data_pointer): New.
5704 (write_inferior_integer): New.
5705 (write_inferior_uinteger): New.
5706 (struct collect_static_trace_data_action): Delete.
5707 (enum tracepoint_type): New.
5708 (struct tracepoint) <type>: New field `type'.
5709 <actions_str, step_actions, step_actions_str>: Only include in
5711 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5712 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5713 (tracepoints): Use IP_AGENT_EXPORT.
5714 (last_tracepoint): Don't include in the IPA.
5715 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5716 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5717 (alloced_trace_state_variables): New.
5718 (trace_state_variables): Use IP_AGENT_EXPORT.
5719 (traceframe_t): Delete unused variable.
5720 (circular_trace_buffer): Don't include in the IPA.
5721 (trace_buffer_start): Delete.
5722 (struct trace_buffer_control): New.
5723 (trace_buffer_free): Delete.
5724 (struct ipa_trace_buffer_control): New.
5725 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5726 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5728 (trace_buffer_ctrl): New.
5729 (TRACE_BUFFER_CTRL_CURR): New.
5730 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5731 Reimplement as macros.
5732 (trace_buffer_wrap): Delete.
5733 (traceframe_write_count, traceframe_read_count)
5734 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5735 (struct tracepoint_hit_ctx) <type>: New field.
5736 (struct fast_tracepoint_ctx): New.
5737 (memory_barrier): New.
5739 (record_tracepoint_error): Update atomically in the IPA.
5740 (clear_inferior_trace_buffer): New.
5741 (about_to_request_buffer_space): New.
5742 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5743 updating the same buffer.
5744 (add_tracepoint): Default the tracepoint's type to trap
5745 tracepoint, and orig_size to -1.
5746 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5748 (create_trace_state_variable): New parameter `gdb'. Handle it.
5749 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5750 (cmd_qtdp): Handle fast tracepoints.
5752 (max_jump_pad_size): New.
5753 (gdb_jump_pad_head): New.
5754 (get_jump_space_head): New.
5755 (claim_jump_space): New.
5756 (sort_tracepoints): New.
5757 (MAX_JUMP_SIZE): New.
5758 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5760 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5761 support. Upload fast traceframes, and delete internal IPA
5763 (stop_tracing_handler): New.
5764 (flush_trace_buffer_handler): New.
5765 (cmd_qtstop): Upload fast tracepoints.
5766 (response_tracepoint): Handle fast tracepoints.
5767 (tracepoint_finished_step): Upload fast traceframes. Set the
5768 tracepoint hit context's tracepoint type.
5769 (handle_tracepoint_bkpts): New.
5770 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5771 type. Add comment about fast tracepoints.
5772 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5773 non-existing action_str field.
5774 (get_context_regcache): Handle fast tracepoints.
5775 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5777 (fast_tracepoint_from_jump_pad_address): New.
5778 (fast_tracepoint_from_ipa_tpoint_address): New.
5779 (collecting_t): New.
5780 (force_unlock_trace_buffer): New.
5781 (fast_tracepoint_collecting): New.
5784 (write_inferior_data_ptr): New.
5785 (target_tp_heap): New.
5786 (target_malloc): New.
5787 (download_agent_expr): New.
5789 (download_tracepoints): New.
5790 (download_trace_state_variables): New.
5791 (upload_fast_traceframes): New.
5792 (IPA_FIRST_TRACEFRAME): New.
5793 (IPA_NEXT_TRACEFRAME_1): New.
5794 (IPA_NEXT_TRACEFRAME): New.
5795 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5796 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5797 (gdb_jump_pad_buffer_end): New.
5798 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5799 (initialize_tracepoint): Adjust.
5800 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5801 buffer. Initialize the low module.
5802 * utils.c (PREFIX, TOOLNAME): New.
5803 (malloc_failure): Use PREFIX.
5804 (error): In the IPA, an error causes an exit.
5805 (fatal, warning): Use PREFIX.
5806 (internal_error): Use TOOLNAME.
5807 (NUMCELLS): Increase to 10.
5808 * configure, config.in: Regenerate.
5810 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5812 * server.c (handle_query) <qSupported>: Do two passes over the
5813 qSupported string to avoid nesting strtok.
5815 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5817 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5819 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5821 * configure: Regenerate.
5822 * proc-service.list: New.
5824 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5826 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5829 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5831 * gdbreplay.c (remote_open): Check error return from socket() call by
5832 its equality to -1 not by it being negative.
5833 * remote-utils.c (remote_open): Likewise.
5835 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5837 * config.h: Regenerate.
5839 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5841 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5842 doesn't provide PTRACE_GET_THREAD_AREA.
5844 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5846 * linux-m68k-low.c: Include <asm/ptrace.h>
5847 (ps_get_thread_area): Implement.
5849 2010-05-03 Doug Evans <dje@google.com>
5851 * event-loop.c (struct callback_event): New struct.
5852 (callback_list): New global.
5853 (append_callback_event, delete_callback_event): New functions.
5854 (process_callback): New function.
5855 (start_event_loop): Call it.
5856 * remote-utils.c (NOT_SCHEDULED): Define.
5857 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5858 moved out of readchar.
5859 (readchar): Rewrite. Call reschedule before returning.
5860 (reset_readchar): New function.
5861 (remote_close): Call it.
5862 (process_remaining, reschedule): New functions.
5863 * server.h (callback_handler_func): New typedef.
5864 (append_callback_event, delete_callback_event): Declare.
5866 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5868 * proc-service.c (ps_pglobal_lookup): Use
5869 thread_db_look_up_one_symbol.
5870 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5871 parameter. Use it instead of all_symbols_looked_up.
5872 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5874 (all_symbols_looked_up): Don't declare.
5875 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5876 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5878 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5879 Set all_symbols_looked_up here.
5880 (thread_db_look_up_one_symbol): New.
5881 (thread_db_get_tls_address): Adjust.
5882 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5883 thread_db object on the heap, and tentatively set it in the
5885 (thread_db_init): Don't set all_symbols_looked_up here.
5886 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5888 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5890 * linux-low.c (linux_kill, linux_detach): Adjust.
5891 (status_pending_p_callback): Remove redundant statement. Check
5892 for !TARGET_WAITIKIND_IGNORE, instead of
5893 TARGET_WAITKIND_STOPPED.
5894 (handle_tracepoints): Make sure LWP is locked. Adjust.
5895 (linux_wait_for_event_1): Adjust.
5896 (linux_cancel_breakpoints): New.
5897 (unsuspend_one_lwp): New.
5898 (unsuspend_all_lwps): New.
5899 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5900 (send_sigstop_callback): Change return type to int, add new
5901 `except' parameter and handle it.
5902 (suspend_and_send_sigstop_callback): New.
5903 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5904 pass them down. If SUSPEND, also increment the lwp's suspend
5906 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5907 (need_step_over_p): Don't consider suspended LWPs.
5908 (start_step_over): Adjust.
5909 (proceed_one_lwp): Change return type to int, add new `except'
5910 parameter and handle it.
5911 (unsuspend_and_proceed_one_lwp): New.
5912 (proceed_all_lwps): Use find_inferior instead of
5914 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5915 also decrement the suspend count of LWPs. Pass `except' down,
5916 instead of hacking its suspend count.
5917 (linux_pause_all): Add `freeze' parameter. Adjust.
5918 (linux_unpause_all): New.
5919 (linux_target_ops): Install linux_unpause_all.
5920 * server.c (handle_status): Adjust.
5921 * target.h (struct target_ops): New fields `unpause_all' and
5922 `cancel_breakpoints'. Add new parameter to `pause_all'.
5923 (pause_all): Add new `freeze' parameter.
5925 (cancel_breakpoints): New.
5926 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5928 (cmd_qtstart): Pause threads.
5929 (stop_tracing): Pause threads, and cancel breakpoints.
5930 * win32-low.c (win32_target_ops): Adjust.
5932 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5934 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5935 the inferior right away from here...
5936 (linux_wait_1): ... to here, and adjust to check the thread's
5937 last_resume_kind instead of the lwp's step or stop_expected flags.
5939 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5941 * README: Use consistent `GDB' and `GDBserver' spellings.
5943 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5945 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5946 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5947 (linux_detach_one_lwp): Assume the lwp is stopped.
5948 (any_thread_of): Delete.
5949 (linux_detach): Stop all lwps here. Don't blindly delete all
5951 (delete_lwp_callback): New.
5952 (linux_mourn): Delete all lwps of the process that is gone.
5953 (linux_wait_1): Don't delete the last lwp of the process here.
5954 * mem-break.h (mark_breakpoints_out): Declare.
5955 * mem-break.c (mark_breakpoints_out): New.
5956 (free_all_breakpoints): Use it.
5957 * server.c (handle_target_event): If the process is gone, mark
5959 * thread-db.c (struct thread_db) <create_bp>: New field.
5960 (thread_db_enable_reporting): Fix prototype. Store a thread event
5961 breakpoint reference in the thread_db struct.
5962 (thread_db_load_search): Clear the thread_db object.
5963 (try_thread_db_load_1): Ditto.
5964 (switch_to_process): New.
5965 (disable_thread_event_reporting): Use it.
5966 (remove_thread_event_breakpoints): New.
5967 (thread_db_detach, thread_db_mourn): Use it.
5969 2010-05-01 Pedro Alves <pedro@codesourcery.com>
5971 * linux-low.c (linux_enable_event_reporting): New.
5972 (linux_wait_for_event_1, handle_extended_wait): Use it.
5974 2010-04-30 Pedro Alves <pedro@codesourcery.com>
5976 * linux-low.c (linux_kill_one_lwp, linux_kill)
5977 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
5978 (send_sigstop): Take an lwp_info as parameter instead. Queue a
5979 SIGSTOP even if the LWP is stopped.
5980 (send_sigstop_callback): New.
5981 (stop_all_lwps): Use send_sigstop_callback instead.
5982 (linux_resume_one_thread): Adjust.
5983 (proceed_one_lwp): Still proceed an LWP that the client has
5984 requested to stop, if we haven't reported it as stopped yet. Make
5985 sure that LWPs the client want stopped, have a pending SIGSTOP.
5987 2010-04-26 Doug Evans <dje@google.com>
5989 * server.c (handle_general_set): Make static.
5991 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
5992 Print received char after testing for error/eof instead of before.
5993 (input_interrupt): Tweak comment.
5995 2010-04-23 Doug Evans <dje@google.com>
5997 * server.c (start_inferior): Print inferior argv if --debug.
5999 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6001 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6002 * nto-x86-low.c: Include server.h
6004 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6006 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6007 be consistent with other sources of this directory.
6008 (init_registers_amd64): Correct name of source file of this function
6011 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6013 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6016 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6018 * win32-i386-low.c: Add 64-bit support.
6019 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6020 (init_registers_amd64): Declare.
6021 (mappings): Add 64-bit version of array.
6022 (init_windows_x86): New function.
6023 (the_low_target): Change init_arch field to init_windows_x86.
6025 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6027 * win32-low.c: Adapt to support also 64-bit architecture.
6028 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6029 (get_image_name): Use SIZE_T type for local variable `done'.
6030 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6031 (toolhelp_get_dll_name): Idem.
6032 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6033 Use uintptr_t typecast to avoid warning.
6034 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6035 (handle_exception): Use phex_nz to avoid warning.
6036 (win32_wait): Remove unused local variable `process'.
6038 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6040 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6043 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6045 * configure.ac: Use `ws2_32' library for srv_mingw.
6046 * configure: Regenerate.
6047 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6048 * remote-utils.c: Likewise.
6050 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6052 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6053 if __x86_64__ is defined.
6055 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6057 * configure: Regenerate.
6059 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6061 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6062 * target.h (target_ops): New get_tib_address field.
6063 * win32-low.h (win32_thread_info): Add thread_local_base field.
6064 * win32-low.c (child_add_thread): Add tlb argument.
6065 Set thread_local_base field to TLB.
6066 (get_child_debug_event): Adapt to child_add_thread change.
6067 (win32_get_tib_address): New function.
6068 (win32_target_ops): Set get_tib_address field to
6069 win32_get_tib_address.
6070 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6072 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6074 * linux-low.c (linux_mourn): Also remove the process.
6075 * server.c (handle_target_event): Don't remove the process here.
6076 * nto-low.c (nto_mourn): New.
6077 (nto_target_ops): Install it.
6078 * spu-low.c (spu_mourn): New.
6079 (spu_target_ops): Install it.
6080 * win32-low.c (win32_mourn): New.
6081 (win32_target_ops): Install it.
6083 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6085 * server.h (buffer_xml_printf): Remove redundant `;'.
6087 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6089 * regcache.c (set_register_cache): Invalidate regcaches before
6090 changing the register cache layout.
6091 (regcache_invalidate_one): Allow a NULL regcache.
6092 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6093 regcaches before changing the register cache layout or the target
6096 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6098 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6099 variable warning on Linux/x86-64.
6101 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6103 GDBserver disconnected tracing support.
6105 * linux-low.c (linux_remove_process): Delete.
6106 (add_lwp): Don't set last_resume_kind here.
6107 (linux_kill): Use `mourn'.
6108 (linux_detach): Use `thread_db_detach', and `mourn'.
6110 (linux_attach_lwp_1): Adjust comment.
6111 (linux_attach): last_resume_kind moved the thread_info; adjust.
6112 (status_pending_p_callback): Adjust.
6113 (linux_wait_for_event_1): Adjust.
6114 (count_events_callback, select_singlestep_lwp_callback)
6115 (select_event_lwp_callback, cancel_breakpoints_callback)
6116 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6117 (proceed_one_lwp): Adjust.
6118 (linux_async): Add debug output.
6119 (linux_thread_stopped): New.
6120 (linux_pause_all): New.
6121 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6123 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6124 (thread_db_free): Delete declaration.
6125 (thread_db_detach, thread_db_mourn): Declare.
6126 * thread-db.c (thread_db_init): Use thread_db_mourn.
6127 (thread_db_free): Delete, split in two.
6128 (disable_thread_event_reporting): New.
6129 (thread_db_detach): New.
6130 (thread_db_mourn): New.
6132 * server.h (struct thread_info) <last_resume_kind>: New field.
6133 <attached>: Add comment.
6134 <gdb_detached>: New field.
6135 (handler_func): Change return type to int.
6136 (handle_serial_event, handle_target_event): Ditto.
6137 (gdb_connected): Declare.
6139 (disconnected_tracing): Declare.
6140 (stop_tracing): Declare.
6142 * server.c (handle_query) <qSupported>: Report support for
6143 disconnected tracing.
6144 (queue_stop_reply_callback): Account for running threads.
6145 (gdb_wants_thread_stopped): New.
6146 (gdb_wants_all_threads_stopped): New.
6147 (gdb_reattached_process): New.
6148 (handle_status): Clear the `gdb_detached' flag of all processes.
6149 In all-stop, stop all threads.
6150 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6151 (process_serial_event): If the remote connection breaks, or if an
6152 exit was forced with "monitor exit", force an event loop exit.
6153 Handle disconnected tracing on detach.
6154 (handle_serial_event): Adjust.
6155 (handle_target_event): If GDB isn't connected, forward events back
6156 to the inferior, unless the last process exited, in which case,
6157 exit gdbserver. Adjust interface.
6159 * remote-utils.c (remote_open): Don't block in accept. Instead
6160 register an event loop source on the listen socket file
6161 descriptor. Refactor bits into ...
6162 (listen_desc): ... this new global.
6163 (gdb_connected): ... this new function.
6164 (enable_async_notification): ... this new function.
6165 (handle_accept_event): ... this new function.
6166 (remote_close): Clear remote_desc.
6168 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6170 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6172 (mourn_inferior): Define.
6173 (target_process_qsupported): Avoid the dangling else problem.
6174 (thread_stopped): Define.
6175 (pause_all): Define.
6176 (target_waitstatus_to_string): Declare.
6177 * target.c (target_waitstatus_to_string): New.
6179 * tracepoint.c (tracing): Make extern.
6180 (disconnected_tracing): New.
6181 (stop_tracing): Make extern. Handle tracing stops due to GDB
6183 (cmd_qtdisconnected): New.
6184 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6185 (handle_tracepoint_general_set): Handle QTDisconnected.
6187 * event-loop.c (event_handler_func): Change return type to int.
6188 (process_event): Bail out if the event handler wants the event
6190 (handle_file_event): Ditto.
6191 (start_event_loop): Bail out if the event handler wants the event
6194 * nto-low.c (nto_target_ops): Adjust.
6195 * spu-low.c (spu_wait): Don't remove the process here.
6196 (spu_target_ops): Adjust.
6197 * win32-low.c (win32_wait): Don't remove the process here.
6198 (win32_target_ops): Adjust.
6200 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6202 * regcache.c (realloc_register_cache): Invalidate inferior's
6203 regcache before recreating it.
6205 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6207 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6209 2010-04-09 Stan Shebs <stan@codesourcery.com>
6210 Pedro Alves <pedro@codesourcery.com>
6212 * server.h (LONGEST): New.
6213 (struct thread_info) <while_stepping>: New field.
6214 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6216 (initialize_tracepoint, handle_tracepoint_general_set)
6217 (handle_tracepoint_query, tracepoint_finished_step)
6218 (tracepoint_was_hit, release_while_stepping_state_list):
6219 (current_traceframe): Declare.
6220 * server.c (handle_general_set): Handle tracepoint packets.
6222 (write_memory): New.
6223 (handle_search_memory_1): Use read_memory.
6224 (handle_query): Report support for conditional tracepoints, trace
6225 state variables, and tracepoint sources. Handle tracepoint
6227 (main): Initialize the tracepoints module.
6228 (process_serial_event): Handle traceframe reads/writes.
6230 * linux-low.c (handle_tracepoints): New.
6231 (linux_wait_1): Call it.
6232 (linux_resume_one_lwp): Handle while-stepping.
6233 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6234 (linux_target_ops): Install them.
6235 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6237 * linux-x86-low.c (x86_supports_tracepoints): New.
6238 (the_low_target). Install it.
6240 * mem-break.h (delete_breakpoint): Declare.
6241 * mem-break.c (delete_breakpoint): Make external.
6243 * target.h (struct target_ops): Add `supports_tracepoints',
6244 `read_pc', and `write_pc' fields.
6245 (target_supports_tracepoints): Define.
6246 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6249 * regcache.h (struct regcache) <registers_owned>: New field.
6250 (init_register_cache, regcache_cpy): Declare.
6251 (regcache_read_pc, regcache_write_pc): Declare.
6252 (register_cache_size): Declare.
6253 (supply_regblock): Declare.
6254 * regcache.c (init_register_cache): New.
6255 (new_register_cache): Use it.
6256 (regcache_cpy): New.
6257 (register_cache_size): New.
6258 (supply_regblock): New.
6259 (regcache_read_pc, regcache_write_pc): New.
6261 * tracepoint.c: New.
6263 * Makefile.in (OBS): Add tracepoint.o.
6264 (tracepoint.o): New rule.
6266 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6268 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6270 (i386-mmx.c): Likewise.
6271 (i386-mmx-linux.o): Likewise.
6272 (i386-mmx-linux.c): Likewise.
6274 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6275 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6276 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6277 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6279 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6280 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6281 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6283 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6285 * Makefile.in (clean): Updated.
6287 (i386-avx.c): Likewise.
6288 (i386-avx-linux.o): Likewise.
6289 (i386-avx-linux.c): Likewise.
6290 (amd64-avx.o): Likewise.
6291 (amd64-avx.c): Likewise.
6292 (amd64-avx-linux.o): Likewise.
6293 (amd64-avx-linux.c): Likewise.
6295 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6296 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6297 (srv_amd64_regobj): Add amd64-avx.o.
6298 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6299 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6300 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6301 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6302 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6303 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6304 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6306 * i387-fp.c: Include "i386-xstate.h".
6308 (i387_cache_to_xsave): Likewise.
6309 (i387_xsave_to_cache): Likewise.
6310 (x86_xcr0): Likewise.
6312 * i387-fp.h (i387_cache_to_xsave): Likewise.
6313 (i387_xsave_to_cache): Likewise.
6314 (x86_xcr0): Likewise.
6316 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6317 * linux-crisv32-low.c (target_regsets): Likewise.
6318 * linux-m68k-low.c (target_regsets): Likewise.
6319 * linux-mips-low.c (target_regsets): Likewise.
6320 * linux-ppc-low.c (target_regsets): Likewise.
6321 * linux-s390-low.c (target_regsets): Likewise.
6322 * linux-sh-low.c (target_regsets): Likewise.
6323 * linux-sparc-low.c (target_regsets): Likewise.
6324 * linux-xtensa-low.c (target_regsets): Likewise.
6326 * linux-low.c: Include <sys/uio.h>.
6327 (regsets_fetch_inferior_registers): Support nt_type.
6328 (regsets_store_inferior_registers): Likewise.
6329 (linux_process_qsupported): New.
6330 (linux_target_ops): Add linux_process_qsupported.
6332 * linux-low.h (regset_info): Add nt_type.
6333 (linux_target_ops): Add process_qsupported.
6335 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6337 (init_registers_i386_avx_linux): New.
6338 (init_registers_amd64_avx_linux): Likewise.
6339 (xmltarget_i386_linux_no_xml): Likewise.
6340 (xmltarget_amd64_linux_no_xml): Likewise.
6341 (PTRACE_GETREGSET): Likewise.
6342 (PTRACE_SETREGSET): Likewise.
6343 (x86_fill_xstateregset): Likewise.
6344 (x86_store_xstateregset): Likewise.
6345 (use_xml): Likewise.
6346 (x86_linux_update_xmltarget): Likewise.
6347 (x86_linux_process_qsupported): Likewise.
6348 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6349 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6350 init_registers_i386_linux here. Call
6351 x86_linux_update_xmltarget.
6352 (the_low_target): Add x86_linux_process_qsupported.
6354 * server.c (handle_query): Call target_process_qsupported.
6356 * target.h (target_ops): Add process_qsupported.
6357 (target_process_qsupported): New.
6359 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6361 * inferiors.c (add_thread): Set last_status kind to
6362 TARGET_WAITKIND_IGNORE.
6363 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6364 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6365 (linux_wait_1): Move `thread' local definition to block that uses
6366 it. Don't NULL initialize `event_child'.
6367 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6368 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6369 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6371 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6373 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6374 an extended waitstatus, or by a watchpoint.
6375 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6376 thread was stepping or has been stopped by a watchpoint.
6378 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6380 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6381 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6382 of another, then delete the previous, and validate all
6384 (validate_inserted_breakpoint): New.
6385 (delete_disabled_breakpoints): New.
6386 (validate_breakpoints): New.
6387 (check_mem_read): Validate breakpoints before trusting their
6388 shadow. Delete disabled breakpoints.
6389 (check_mem_write): Validate breakpoints before trusting they
6390 should be inserted. Delete disabled breakpoints.
6391 * mem-break.h (validate_breakpoints):
6392 * server.c (handle_query): Validate breakpoints when we see a
6395 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6397 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6398 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6399 if we could tell there's a GDB breakpoint at stop_pc.
6400 (need_step_over_p): Don't do a step over if we find a GDB
6401 breakpoint at the resume PC.
6403 * mem-break.c (struct raw_breakpoint): New.
6404 (enum bkpt_type): New type `gdb_breakpoint'.
6405 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6406 fields. New field `raw'.
6407 (find_raw_breakpoint_at): New.
6408 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6410 (set_breakpoint_at): Adjust.
6411 (delete_raw_breakpoint): New.
6412 (release_breakpoint): New.
6413 (delete_breakpoint): Rename to...
6414 (delete_breakpoint_1): ... this. Add proc parameter. Use
6415 release_breakpoint. Return ENOENT.
6416 (delete_breakpoint): Reimplement.
6417 (find_breakpoint_at): Delete.
6418 (find_gdb_breakpoint_at): New.
6419 (delete_breakpoint_at): Delete.
6420 (set_gdb_breakpoint_at): New.
6421 (delete_gdb_breakpoint_at): New.
6422 (gdb_breakpoint_here): New.
6423 (set_reinsert_breakpoint): Use release_breakpoint.
6424 (uninsert_breakpoint): Rename to ...
6425 (uninsert_raw_breakpoint): ... this.
6426 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6427 (reinsert_raw_breakpoint): Change parameter type to
6429 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6431 (check_breakpoints): Adjust. Use release_breakpoint.
6432 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6433 (breakpoint_inserted_here): Ditto.
6434 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6435 Don't trust the breakpoint's shadow if it is not inserted.
6436 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6437 (delete_all_breakpoints): Adjust.
6438 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6439 use delete_breakpoint_1.
6441 * mem-break.h (breakpoints_supported): Delete declaration.
6442 (set_gdb_breakpoint_at): Declare.
6443 (gdb_breakpoint_here): Declare.
6444 (delete_breakpoint_at): Delete.
6445 (delete_gdb_breakpoint_at): Declare.
6447 * server.h (struct raw_breakpoint): Forward declare.
6448 (struct process_info): New field `raw_breakpoints'.
6450 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6453 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6455 * linux-low.c (status_pending_p_callback): Fix comment.
6456 (linux_wait_for_event_1): Move most of the internal breakpoint
6457 handling from here...
6458 (linux_wait_1): ... to here.
6459 (count_events_callback): New.
6460 (select_singlestep_lwp_callback): New.
6461 (select_event_lwp_callback): New.
6462 (cancel_breakpoints_callback): New.
6463 (select_event_lwp): New.
6464 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6465 priority to all LWPs that have had events that should be reported
6466 to the client. Cancel breakpoints when about to reporting the
6467 event to the client, not while stopping lwps. No longer cancel
6468 finished single-steps here.
6469 (cancel_finished_single_step): Delete.
6470 (cancel_finished_single_steps): Delete.
6472 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6474 * mem-break.c (enum bkpt_type): New.
6475 (struct breakpoint): New field `type'.
6476 (set_breakpoint_at): Change return type to struct breakpoint
6477 pointer. Set type to `other_breakpoint' by default.
6478 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6479 in the breakpoint list.
6480 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6481 (reinsert_breakpoint): Rename to ...
6482 (reinsert_raw_breakpoint): ... this.
6483 (reinsert_breakpoints_at): Adjust.
6484 * mem-break.h (struct breakpoint): Declare.
6485 (set_breakpoint_at): Change return type to struct breakpoint
6488 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6490 * server.c (handle_query): Assign, not compare.
6492 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6494 Teach linux gdbserver to step-over-breakpoints.
6496 * linux-low.c (can_hardware_single_step): New.
6497 (supports_breakpoints): New.
6498 (handle_extended_wait): If stopping threads, read the stop pc of
6501 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6502 low target doesn't support retrieving the PC.
6503 (add_lwp): Set last_resume_kind to resume_continue.
6504 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6505 (linux_attach): Don't clear stop_expected. Set the lwp's
6506 last_resume_kind to resume_stop.
6507 (linux_detach_one_lwp): Don't check for removed breakpoints.
6508 (check_removed_breakpoint): Delete.
6509 (status_pending_p): Rename to ...
6510 (status_pending_p_callback): ... this. Don't check for removed
6511 breakpoints. Don't consider threads that are stopped from GDB's
6513 (linux_wait_for_lwp): Always read the stop_pc here.
6514 (cancel_breakpoint): New.
6515 (step_over_bkpt): New global.
6516 (linux_wait_for_event_1): Implement stepping over breakpoints.
6517 (gdb_wants_lwp_stopped): New.
6518 (gdb_wants_all_stopped): New.
6519 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6520 single-step traps here. Store the thread's last reported target
6522 (send_sigstop): Don't clear stop_expected. Always set it,
6524 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6525 (cancel_finished_single_step): New.
6526 (cancel_finished_single_steps): New.
6527 (wait_for_sigstop): Don't cancel finished single-step traps here.
6528 (linux_resume_one_lwp): Don't check for removed breakpoints.
6529 Don't set `step' on non-hardware step archs.
6530 (linux_set_resume_request): Ignore resume_stop requests if already
6531 stopping or stopped. Set the lwp's last_resume_kind.
6532 (resume_status_pending_p): Don't check for removed breakpoints.
6533 (need_step_over_p): New.
6534 (start_step_over): New.
6535 (finish_step_over): New.
6536 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6537 requests. Clear the thread's last reported target waitstatus.
6538 Don't use the `suspended' flag. Don't consider pending breakpoints.
6539 (linux_resume): Start a step-over if necessary.
6540 (proceed_one_lwp): New.
6541 (proceed_all_lwps): New.
6542 (unstop_all_lwps): New.
6543 * linux-low.h (struct lwp_info): Rewrite comment for the
6544 `suspended' flag. Add the `stop_pc' field. Delete the
6545 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6546 Add `'last_resume_kind' and `need_step_over' fields.
6547 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6548 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6549 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6550 (set_raw_breakpoint_at): New.
6551 (set_breakpoint_at): Rewrite to use it.
6552 (reinsert_breakpoint_handler): Delete.
6553 (set_reinsert_breakpoint): New.
6554 (reinsert_breakpoint_by_bp): Delete.
6555 (delete_reinsert_breakpoints): New.
6556 (uninsert_breakpoint): Rewrite.
6557 (uninsert_breakpoints_at): New.
6558 (reinsert_breakpoint): Rewrite.
6559 (reinsert_breakpoints_at): New.
6560 (check_breakpoints): Rewrite.
6561 (breakpoint_here): New.
6562 (breakpoint_inserted_here): New.
6563 (check_mem_read): Adjust.
6564 * mem-break.h (breakpoints_supported, breakpoint_here)
6565 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6566 (reinsert_breakpoint_by_bp): Delete declaration.
6567 (delete_reinsert_breakpoints): Declare.
6568 (reinsert_breakpoint): Delete declaration.
6569 (reinsert_breakpoints_at): Declare.
6570 (uninsert_breakpoint): Delete declaration.
6571 (uninsert_breakpoints_at): Declare.
6572 (check_breakpoints): Adjust prototype.
6573 * server.h: Adjust include order.
6574 (struct thread_info): Declare here. Add a `last_status' field.
6576 2010-03-23 Michael Snyder <msnyder@vmware.com>
6578 * server.c (crc32): New function.
6579 (handle_query): Add handling for 'qCRC:' request.
6581 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6583 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6584 lwp had been stopped by a watchpoint.
6586 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6588 * server.h (internal_error): Declare.
6589 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6590 * utils.c (internal_error): New function.
6592 2010-03-15 Andreas Schwab <schwab@redhat.com>
6594 * configure.srv: Fix typo setting srv_regobj.
6596 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6598 * linux-low.c (fetch_register): Avoid passing a non string literal
6600 (usr_store_inferior_registers): Ditto.
6602 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6604 * linux-low.c (linux_write_memory): Bail out early if peeking
6607 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6609 * linux-low.h (struct lwp_info): New fields
6610 `stopped_by_watchpoint' and `stopped_data_address'.
6611 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6612 here, and cache them in the lwp object.
6613 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6615 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6617 (linux_stopped_by_watchpoint): Rewrite.
6618 (linux_stopped_data_address): Rewrite.
6620 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6622 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6623 switching the current inferior, not before.
6625 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6627 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6628 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6629 i386-linux.c and amd64-linux.c.
6630 (reg-i386.o): Removed.
6631 (reg-i386.c): Likewise.
6632 (reg-i386-linux.o): Likewise.
6633 (reg-i386-linux.c): Likewise.
6634 (reg-x86-64.o): Likewise.
6635 (reg-x86-64.c): Likewise.
6636 (reg-x86-64-linux.o): Likewise.
6637 (reg-x86-64-linux.c): Likewise.
6640 (i386-linux.o): Likewise.
6641 (i386-linux.c): Likewise.
6642 (amd64.o): Likewise.
6643 (amd64.c): Likewise.
6644 (amd64-linux.o): Likewise.
6645 (amd64-linux.c): Likewise.
6647 * configure.srv (srv_i386_regobj): New.
6648 (srv_i386_linux_regobj): Likewise.
6649 (srv_amd64_regobj): Likewise.
6650 (srv_amd64_linux_regobj): Likewise.
6651 (srv_i386_32bit_xmlfiles): Likewise.
6652 (srv_i386_64bit_xmlfiles): Likewise.
6653 (srv_i386_xmlfiles): Likewise.
6654 (srv_amd64_xmlfiles): Likewise.
6655 (srv_i386_linux_xmlfiles): Likewise.
6656 (srv_amd64_linux_xmlfiles): Likewise.
6657 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6658 srv_xmlfiles to $srv_i386_xmlfiles.
6659 (i[34567]86-*-mingw32ce*): Likewise.
6660 (i[34567]86-*-mingw*): Likewise.
6661 (i[34567]86-*-nto*): Likewise.
6662 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6663 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6664 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6665 (x86_64-*-linux*): Likewise.
6667 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6668 (init_registers_amd64_linux): New.
6669 (x86_arch_setup): Replace init_registers_x86_64_linux with
6670 init_registers_amd64_linux.
6672 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6674 * configure.ac: Check for libdl. If it is not available link against
6675 static libthread_db.
6676 * configure: Regenerate.
6678 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6682 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6683 handing a read watchpoint.
6684 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6686 2010-02-12 Doug Evans <dje@google.com>
6688 * linux-low.c (linux_supports_tracefork_flag): Document.
6689 (linux_look_up_symbols): Add comment.
6691 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6693 * regcache.c (supply_register): Clear regcache if buf is NULL.
6695 2010-02-02 Nicolas Roche <roche@sourceware.org>
6696 Joel Brobecker <brobecker@adacore.com>
6698 * inferiors.c (find_inferior): Add function documentation.
6699 (unloaded_dll): Handle the case where the unloaded dll has not
6700 been previously registered in the dll list.
6702 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6704 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6705 (thumb2_breakpoint): New.
6706 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6708 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6710 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6711 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6714 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6716 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6718 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6720 * linux-s390-low.c (s390_collect_ptrace_register)
6721 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6723 2010-01-21 Doug Evans <dje@google.com>
6725 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6726 (PTRACE_ARG4_TYPE): New macro.
6727 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6728 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6729 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6730 (usr_store_inferior_registers): Ditto.
6731 (linux_read_memory, linux_write_memory): Ditto.
6732 (linux_test_for_tracefork): Ditto.
6734 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6735 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6737 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6739 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6742 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6744 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6745 prototype to take a regcache. Adjust.
6747 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6749 * regcache.h (struct thread_info): Forward declare.
6750 (struct regcache): New.
6751 (new_register_cache): Adjust prototype.
6752 (get_thread_regcache): Declare.
6753 (free_register_cache): Adjust prototype.
6754 (registers_to_string, registers_from_string): Ditto.
6755 (supply_register, supply_register_by_name, collect_register)
6756 (collect_register_as_string, collect_register_by_name): Ditto.
6757 * regcache.c (struct inferior_regcache_data): Delete.
6758 (get_regcache): Rename to ...
6759 (get_thread_regcache): ... this. Adjust. Switch inferior before
6761 (regcache_invalidate_one): Adjust.
6762 (regcache_invalidate): Fix prototype.
6763 (new_register_cache): Return the new register cache.
6764 (free_register_cache): Change prototype.
6765 (realloc_register_cache): Adjust.
6766 (registers_to_string): Change prototype to take a regcache. Adjust.
6767 (registers_from_string): Ditto.
6768 (register_data): Ditto.
6769 (supply_register): Ditto.
6770 (supply_register_by_name): Ditto.
6771 (collect_register): Ditto.
6772 (collect_register_as_string): Ditto.
6773 (collect_register_by_name): Ditto.
6774 * server.c (process_serial_event): Adjust.
6775 * linux-low.h (regset_fill_func, regset_store_func): Change
6777 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6779 * linux-low.c (get_stop_pc): Adjust.
6780 (check_removed_breakpoint): Adjust.
6781 (linux_wait_for_event): Adjust.
6782 (linux_resume_one_lwp): Adjust.
6783 (fetch_register): Add regcache parameter. Adjust.
6784 (usr_store_inferior_registers): Ditto.
6785 (regsets_fetch_inferior_registers): Ditto.
6786 (regsets_store_inferior_registers): Ditto.
6787 (linux_fetch_registers, linux_store_registers): Ditto.
6788 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6790 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6792 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6793 prototype to take a regcache.
6794 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6795 * remote-utils.c (convert_ascii_to_int, outreg)
6796 (prepare_resume_reply): Change prototype to take a regcache.
6798 * target.h (struct target_ops) <fetch_registers, store_registers>:
6799 Change prototype to take a regcache.
6800 (fetch_inferior_registers, store_inferior_registers): Change
6801 prototype to take a regcache. Adjust.
6802 * proc-service.c (ps_lgetregs): Adjust.
6803 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6804 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6805 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6806 take a regcache. Adjust.
6807 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6808 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6809 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6810 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6811 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6812 (cris_cannot_fetch_register):
6813 (cris_breakpoint_at): Change prototype to take a regcache.
6815 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6816 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6817 to take a regcache. Adjust.
6818 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6820 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6821 take a regcache. Adjust.
6822 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6823 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6824 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6825 * linux-mips-low.c (mips_get_pc):
6826 (mips_set_pc): Change prototype to take a regcache. Adjust.
6827 (mips_reinsert_addr): Adjust.
6828 (mips_collect_register): Change prototype to take a regcache.
6830 (mips_supply_register):
6831 (mips_collect_register_32bit, mips_supply_register_32bit)
6832 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6833 (mips_store_fpregset): Ditto.
6834 * linux-ppc-low.c (ppc_supply_ptrace_register)
6835 (ppc_supply_ptrace_register): Ditto.
6836 (parse_spufs_run): Adjust.
6837 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6838 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6839 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6840 take a regcache. Adjust.
6841 * linux-s390-low.c (s390_collect_ptrace_register)
6842 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6843 (s390_set_pc): Change prototype to take a regcache. Adjust.
6844 (s390_arch_setup): Adjust.
6845 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6846 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6847 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6848 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6849 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6851 (sparc_breakpoint_at): Adjust.
6852 * linux-xtensa-low.c (xtensa_fill_gregset):
6853 (xtensa_store_gregset):
6854 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6855 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6856 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6857 prototype to take a regcache. Adjust.
6858 * win32-arm-low.c (arm_fetch_inferior_register)
6859 (arm_store_inferior_register): Change prototype to take a
6861 * win32-i386-low.c (i386_fetch_inferior_register)
6862 (i386_store_inferior_register): Change prototype to take a
6864 * win32-low.c (child_fetch_inferior_registers)
6865 (child_store_inferior_registers): Change prototype to take a
6867 (win32_wait): Adjust.
6868 (win32_fetch_inferior_registers): Change prototype to take a
6870 (win32_store_inferior_registers): Adjust.
6871 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6872 store_inferior_register>: Change prototype to take a regcache.
6874 2010-01-20 Doug Evans <dje@google.com>
6876 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6878 (linux_wait_for_event1, linux_init_signals): Ditto.
6879 (W_STOPCODE): Provide definition if missing.
6881 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6883 * linux-low.c (linux_core_of_thread): New.
6884 (compare_ints, show_process, list_threads): New.
6885 (linux_qxfer_osdata): Report threads and cores.
6886 (linux_target_op): Register linux_core_of_thread.
6887 * remote-utils.c (prepare_resume_reply): Report the core.
6888 (buffer_xml_printf): Support %d specifier.
6889 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6891 (handle_query): Handle qXfer:threads. Announce availability
6893 * target.h (struct target_ops): New field core_of_thread.
6895 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6897 * Makefile.in (clean): Remove new generated files.
6898 (reg-s390.o, reg-s390.c): Remove rules.
6899 (reg-s390x.o, reg-s390x.c): Likewise.
6900 (s390-linux32.o, s390-linux32.c): Add rules.
6901 (s390-linux64.o, s390-linux64.c): Likewise.
6902 (s390x-linux64.o, s390x-linux64.c): Likewise.
6903 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6904 * linux-s390-low.c: Include <elf.h>.
6905 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6906 (init_registers_s390): Remove prototype.
6907 (init_registers_s390x): Likewise.
6908 (init_registers_s390_linux32): Add prototype.
6909 (init_registers_s390_linux64): Likewise.
6910 (init_registers_s390x_linux64): Likewise.
6911 (s390_num_regs_3264): New define.
6912 (s390_regmap_3264): New global variable.
6913 (s390_cannot_fetch_register): Remove obsolete check.
6914 (s390_cannot_store_register): Likewise.
6915 (s390_collect_ptrace_register): Handle upper/lower register halves.
6916 (s390_supply_ptrace_register): Likewise.
6917 (s390_fill_gregset): Update to register number changes.
6918 (s390_get_hwcap): New routine.
6919 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6920 Install appropriate regmap and register set.
6922 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6924 * server.c (gdbserver_version): Update copyright year to 2010.
6925 * gdbreplay.c (gdbreplay_version): Likewise.
6927 2009-12-28 Doug Evans <dje@google.com>
6929 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6930 elf/external.h. Include <elf.h> instead but only if necessary.
6932 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6934 * linux-low.c (linux_remove_process): Remove `detaching'
6935 parameter. Don't release/detach from thread_db here.
6936 (linux_kill): Release/detach from thread_db here, ...
6937 (linux_detach): ... and here, before actually detaching.
6938 (linux_wait_1): ... and here, when a process exits.
6939 * thread-db.c (any_thread_of): New.
6940 (thread_db_free): Switch the current inferior to a thread of the
6943 2009-12-21 Doug Evans <dje@google.com>
6945 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6947 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6948 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6949 warning ifndef __NR_tkill. Move setting of errno there too.
6950 Delete unnecessary resetting of errno after syscall.
6951 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
6953 * configure.ac: Check for dladdr.
6954 * config.in: Regenerate.
6955 * configure: Regenerate.
6956 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
6957 (try_thread_db_load): Update.
6959 * linux-low.c (my_waitpid): Delete unnecessary prototype.
6961 2009-12-18 Doug Evans <dje@google.com>
6963 * event-loop.c: Include unistd.h if it exists.
6965 * linux-low.c (my_waitpid): Move definition away from being in
6966 between linux_tracefork_child/linux_test_for_tracefork.
6968 * gdb_proc_service.h (psaddr_t): Fix type.
6969 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
6970 signature to match glibc.
6972 2009-12-16 Doug Evans <dje@google.com>
6974 * linux-low.c (linux_read_memory): Fix argument to read.
6976 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6978 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
6979 events, don't leave current_inferior pointing at null.
6981 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6983 * win32-low.c (LOG): Delete.
6984 (OUTMSG): Output to stderr.
6985 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
6986 on compile time LOG macro.
6987 (win32_wait): Fix debug output.
6989 2009-11-26 Pedro Alves <pedro@codesourcery.com>
6991 * win32-low.c (win32_add_one_solib): If the dll name is
6992 "ntdll.dll", prepend the system directory to the dll path.
6994 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
6996 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
6998 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
6999 Vladimir Prus <vladimir@codesourcery.com>
7001 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7002 * configure.ac: Check for __mcoldfire__ and set
7003 gdb_cv_m68k_is_coldfire.
7004 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7005 reg-cf.o and reg-m68k.o.
7006 * configure: Regenerated.
7008 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7010 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7011 Pass it to thread_db_free.
7012 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7013 proper `detaching' argument to linux_remove_process.
7014 * linux-low.h (thread_db_free): Add `detaching' parameter.
7015 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7017 (thread_db_free): Add `detaching' parameter. Only
7018 call td_ta_clear_event if detaching from process.
7020 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7022 * thread-db.c (thread_db_free): Fix typo.
7024 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7027 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7029 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7031 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7032 with an i686 compiler.
7033 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7035 * configure: Rebuilt.
7037 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7041 * server.c (handle_search_memory_1): Correct read_addr initialization
7042 in loop for searching subsequent chunks.
7044 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7046 * configure.ac: New --with-libthread-db option.
7047 * thread-db.c: Allow direct dependence on libthread_db.
7048 (thread_db_free): Adjust.
7049 * config.in: Regenerate.
7050 * configure: Likewise.
7052 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7055 * thread-db.c (attach_thread): New function.
7056 (maybe_attach_thread): Return success/failure.
7057 (find_new_threads_callback): Adjust.
7058 (thread_db_find_new_threads): Loop until no new threads.
7060 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7062 * proc-service.c (ps_lgetregs): Formatting.
7064 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7066 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7067 * configure.ac: Adjust.
7068 * linux-low.h (struct process_info_private): Move members to struct
7070 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7071 * linux-low.c (linux_remove_process): Adjust.
7072 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7073 * server.c (handle_query): Move code ...
7074 (handle_monitor_command): ... here. New function.
7075 * target.h (struct target_ops): New member.
7076 * thread-db.c (struct thread_db): New.
7077 (libthread_db_search_path): New variable.
7078 (thread_db_create_event, thread_db_enable_reporting)
7079 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7080 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7081 (try_thread_db_load_1, dladdr_to_soname): New functions.
7082 (try_thread_db_load, thread_db_load_search): New functions.
7083 (thread_db_init): Search for libthread_db.
7084 (thread_db_free): New function.
7085 (thread_db_handle_monitor_command): Likewise.
7086 * config.in: Regenerate.
7087 * configure: Regenerate.
7089 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7091 * spu-low.c (spu_kill): Wait for inferior to terminate.
7092 Call clear_inferiors.
7093 (spu_detach): Call clear_inferiors.
7095 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7097 * aclocal.m4: Regenerate.
7098 * config.in: Likewise.
7099 * configure: Likewise.
7101 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7103 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7104 (parse_spufs_run): New function.
7105 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7106 (ppc_breakpoint_at): Handle SPU breakpoints.
7108 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7110 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7111 (SPUFS_MAGIC): Define.
7112 (spu_enumerate_spu_ids): New function.
7113 (linux_qxfer_spu): New function.
7114 (linux_target_ops): Install linux_qxfer_spu.
7116 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7118 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7119 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7120 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7121 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7122 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7123 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7124 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7125 (init_registers_powerpc_cell32l): Add prototype.
7126 (init_registers_powerpc_cell64l): Likewise.
7127 (ppc_arch_setup): Detect Cell/B.E. architecture.
7129 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7131 * Makefile.in (datarootdir): New variable.
7133 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7135 * linux-low.c (linux_write_memory): Update debugging output.
7136 * Makefile.in (clean): Add new descriptions.
7137 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7138 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7139 * configure.srv: Add new files for arm*-*-linux*.
7140 * linux-arm-low.c: Add new declarations.
7141 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7142 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7143 (HWCAP_VFPv3D16): New.
7144 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7145 instead of __IWMMXT__.
7146 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7147 (arm_arch_setup): New.
7148 (target_regsets): Remove #ifdef. Add VFP regset.
7149 (the_low_target): Use arm_arch_setup.
7151 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7153 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7154 the main thread again.
7156 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7158 Adding Neutrino gdbserver.
7159 * configure: Regenerated.
7160 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7161 * configure.srv (i[34567]86-*-nto*): New target.
7162 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7163 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7164 (nto_comctrl) [__QNX__]: New function.
7165 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7167 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7169 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7172 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7173 Pedro Alves <pedro@codesourcery.com>
7175 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7176 don't support CONTEXT_EXTENDED_REGISTERS.
7177 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7178 (the_low_target): Install them.
7179 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7180 failing with ERROR_PIPE_NOT_CONNECTED.
7182 2009-06-30 Doug Evans <dje@google.com>
7183 Pierre Muller <muller@ics.u-strasbg.fr>
7185 Add h/w watchpoint support to x86-linux, win32-i386.
7186 * Makefile.in (SFILES): Add i386-low.c
7187 (i386_low_h): Define.
7188 (i386-low.o): Add dependencies.
7189 (linux-x86-low.o): Add i386-low.h dependency.
7190 (win32-i386-low.o): Ditto.
7191 * i386-low.c: New file.
7192 * i386-low.h: New file.
7193 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7194 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7195 * linux-low.c (linux_add_process): Initialize arch_private.
7196 (linux_remove_process): Free arch_private.
7197 (add_lwp): Initialize arch_private.
7198 (delete_lwp): Free arch_private.
7199 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7201 * linux-low.h (process_info_private): New member arch_private.
7202 (lwp_info): New member arch_private.
7203 (linux_target_ops): New members new_process, new_thread,
7205 (ptid_of): New macro.
7206 * linux-x86-low.c: Include stddef.h, i386-low.h.
7207 (arch_process_info): New struct.
7208 (arch_lwp_info): New struct.
7209 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7210 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7211 (i386_dr_low_get_status): New function.
7212 (x86_insert_point, x86_remove_point): New functions.
7213 (x86_stopped_by_watchpoint): New function.
7214 (x86_stopped_data_address): New function.
7215 (x86_linux_new_process, x86_linux_new_thread): New functions.
7216 (x86_linux_prepare_to_resume): New function.
7217 (the_low_target): Add entries for insert_point, remove_point,
7218 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7220 * server.c (debug_hw_points): New global.
7221 (monitor_show_help): Document set debug-hw-points.
7222 (handle_query): Process "set debug-hw-points".
7223 * server.h (debug_hw_points): Declare.
7224 (paddress): Declare.
7225 * utils.c (NUMCELLS, CELLSIZE): New macros.
7226 (get_sell, xsnprintf, paddress): New functions.
7227 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7228 remove_point, stopped_by_watchpoint, stopped_data_address.
7229 * win32-i386-low.c: Include i386-low.h.
7230 (debug_reg_state): Replaces dr.
7231 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7232 (i386_dr_low_get_status): New function.
7233 (i386_insert_point, i386_remove_point): New functions.
7234 (i386_stopped_by_watchpoint): New function.
7235 (i386_stopped_data_address): New function.
7236 (i386_initial_stuff): Update.
7237 (get_thread_context,set_thread_context,i386_thread_added): Update.
7238 (the_low_target): Add entries for insert_point,
7239 remove_point, stopped_by_watchpoint, stopped_data_address.
7240 * win32-low.c (win32_insert_watchpoint): New function.
7241 (win32_remove_watchpoint): New function.
7242 (win32_stopped_by_watchpoint): New function.
7243 (win32_stopped_data_address): New function.
7244 (win32_target_ops): Add entries for insert_watchpoint,
7245 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7246 * win32-low.h (win32_target_ops): New members insert_point,
7247 remove_point, stopped_by_watchpoint, stopped_data_address.
7249 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7251 * server.c (process_serial_event): Re-return unsupported, not
7252 error, if the type isn't recognized. Re-allow supporting only
7253 insert or remove packets. Also call require_running for
7254 breakpoints. Add missing break statement to default case. Tidy.
7255 * target.h (struct target_ops): Rename insert_watchpoint to
7256 insert_point, and remove_watchpoint to remove_point.
7258 * linux-low.h (struct linux_target_ops): Likewise.
7259 * linux-low.c (linux_insert_watchpoint): Rename to ...
7260 (linux_insert_point): ... this. Adjust.
7261 (linux_remove_watchpoint): Rename to ...
7262 (linux_remove_point): ... this. Adjust.
7263 (linux_target_ops): Adjust.
7264 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7265 (cris_insert_point): ... this.
7266 (cris_remove_watchpoint): Rename to ...
7267 (cris_remove_point): ... this.
7268 (the_low_target): Adjust.
7270 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7272 * server.c (handle_v_kill): Pass signal_pid to
7273 kill_inferior if multi_process is zero.
7275 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7277 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7278 * target.h (target_ops): Comment for *_watchpoint to make it clear
7279 the functions can get types '0' and '1'.
7281 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7283 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7284 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7285 * regcache.c (get_regcache): Likewise.
7286 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7287 * win32-low.c (child_fetch_inferior_registers): Remove check for
7290 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7291 Pedro Alves <pedro@codesourcery.com>
7293 * target.h (struct target_ops) <supports_multi_process>: New
7295 (target_supports_multi_process): New.
7296 * server.c (handle_query): Even if GDB reports support, only
7297 enable multi-process if the target also supports it. Report
7298 multi-process support only if the target backend supports it.
7299 * linux-low.c (linux_supports_multi_process): New function.
7300 (linux_target_ops): Install it as target_supports_multi_process
7303 2009-05-24 Doug Evans <dje@google.com>
7305 Global renaming of find_thread_pid to find_thread_ptid.
7306 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7307 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7308 All callers updated.
7310 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7311 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7314 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7315 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7316 (linux_resume_one_lwp): Ditto.
7318 2009-05-23 Doug Evans <dje@google.com>
7320 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7321 from struct inferior_list_entry * to struct lwp_info *.
7322 All callers updated.
7324 2009-05-13 Doug Evans <dje@google.com>
7326 * linux-x86-low.c: Don't include assert.h.
7327 (x86_siginfo_fixup): Use fatal, not assert.
7328 (x86_arch_setup): Fix comment.
7330 2009-05-12 Doug Evans <dje@google.com>
7332 Biarch support for i386/amd64 gdbserver.
7333 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7334 Add linux-x86-low.c.
7335 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7336 (linux-x86-low.o): Add.
7337 * linux-x86-64-low.c: Delete.
7338 * linux-i386-low.c: Delete.
7339 * linux-x86-low.c: New file.
7340 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7342 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7344 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7345 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7346 (linux_child_pid_to_exec_file): New function.
7347 (elf_64_header_p, elf_64_file_p): New functions.
7348 (siginfo_fixup): New function.
7349 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7350 give target a chance to convert layout.
7351 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7352 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7354 2009-05-07 Doug Evans <dje@google.com>
7356 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7357 (regsets_store_inferior_registers): Ditto.
7359 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7363 * linux-low.c (must_set_ptrace_flags): Delete.
7364 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7366 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7367 `lwp->must_set_ptrace_flags' instead.
7368 (linux_wait_for_event_1): Set ptrace options here.
7369 (linux_wait_1): ... not here.
7371 2009-04-30 Doug Evans <dje@google.com>
7373 * inferiors.c (started_inferior_callback): New function.
7374 (attached_inferior_callback): New function.
7375 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7376 * server.c (print_started_pid, print_attached_pid): New functions.
7377 (detach_or_kill_for_exit): New function.
7378 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7379 * server.h (have_started_inferiors_p): Declare.
7380 (have_attached_inferiors_p): Declare.
7382 * inferiors.c (remove_process): Fix memory leak, free process.
7383 * linux-low.c (linux_remove_process): New function.
7384 (linux_kill): Call it instead of remove_process.
7385 (linux_detach, linux_wait_1): Ditto.
7387 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7389 * configure.srv: Add x86 Windows CE target.
7391 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7393 * inferiors.c (get_thread_process): Make global.
7394 * server.h (get_thread_process): Add prototype.
7395 * thread-db.c (find_one_thread): Use get_thread_process
7396 instead of current_process.
7397 (thread_db_get_tls_address): Do not crash if called when
7398 thread layer is not yet initialized.
7400 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7402 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7403 * spu-low.c (current_tid): Rename to ...
7404 (current_ptid): ... this.
7405 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7406 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7407 ptid_get_lwp (current_ptid) instead of current_tid.
7408 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7409 instead of current_tid. Use find_process_pid to verify pid
7410 argument is valid. Pass proper argument to remove_process.
7411 (spu_thread_alive): Compare current_ptid instead of current_tid.
7412 (spu_resume): Likewise.
7414 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7416 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7419 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7421 Implement the multiprocess extensions, and add linux multiprocess
7424 * server.h (ULONGEST): Declare.
7425 (struct ptid, ptid_t): New.
7426 (minus_one_ptid, null_ptid): Declare.
7427 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7428 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7429 (struct inferior_list_entry): Change `id' type from unsigned from
7431 (struct sym_cache, struct breakpoint, struct
7432 process_info_private): Forward declare.
7433 (struct process_info): Declare.
7434 (current_process): Declare.
7435 (all_processes): Declare.
7436 (initialize_inferiors): Declare.
7437 (add_thread): Adjust to use ptid_t.
7438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7439 (add_process, remove_process, find_thread_pid): Declare.
7440 (find_inferior_id): Adjust to use ptid_t.
7441 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7442 (multi_process): Declare.
7443 (push_event): Adjust to use ptid_t.
7444 (read_ptid, write_ptid): Declare.
7445 (prepare_resume_reply): Adjust to use ptid_t.
7446 (clear_symbol_cache): Declare.
7447 * inferiors.c (all_processes): New.
7448 (null_ptid, minus_one_ptid): New.
7449 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7450 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7451 (add_thread): Change unsigned long to ptid. Remove gdb_id
7453 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7454 (gdb_id_to_thread): Rename to ...
7455 (find_thread_pid): ... this. Change unsigned long to ptid.
7456 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7457 (loaded_dll, pull_pid_from_list): Adjust.
7458 (add_process, remove_process, find_process_pid)
7459 (get_thread_process, current_process, initialize_inferiors): New.
7460 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7461 (struct target_waitstatus) <related_pid>: Ditto.
7462 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7464 (struct target_ops) <join>: Add `pid' argument.
7465 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7466 (struct target_ops) <wait>: Add `ptid' field. Change return type
7468 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7469 (mywait): Add `ptid' argument. Change return type to ptid_t.
7470 (target_pid_to_str): Declare.
7471 * target.c (set_desired_inferior): Adjust to use ptids.
7472 (mywait): Add new `ptid' argument. Adjust.
7473 (target_pid_to_str): New.
7474 * mem-break.h (free_all_breakpoints): Declare.
7475 * mem-break.c (breakpoints): Delelete.
7476 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7477 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7478 to use per-process breakpoint list.
7479 (free_all_breakpoints): New.
7480 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7481 (symbol_cache, all_symbols_looked_up): Delete.
7483 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7485 (prepare_resume_reply): Change ptid argument's type from unsigned
7486 long to ptid_t. Adjust. Implement W;process and X;process.
7487 (free_sym_cache, clear_symbol_cache): New.
7488 (look_up_one_symbol): Adjust to per-process symbol cache. *
7489 * server.c (cont_thread, general_thread, step_thread): Change type
7492 (multi_process): New.
7493 (last_ptid): Change type to ptid_t.
7494 (struct vstop_notif) <ptid>: Change type to ptid_t.
7495 (queue_stop_reply, push_event): Change `ptid' argument's type to
7497 (discard_queued_stop_replies): Add `pid' argument.
7498 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7499 changes. Don't reference the `attached' global.
7500 (attach_inferior): Adjust to mywait interface changes.
7501 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7502 features. Handle and report "multiprocess+". Handle
7504 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7506 (handle_v_kill): New.
7507 (handle_v_stopped): Adjust to use target_pid_to_str.
7508 (handle_v_requests): Allow multiple attaches and runs when
7509 multiprocess extensions are in effect. Handle "vKill".
7510 (myresume): Adjust to use ptids.
7511 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7512 (handle_status): Adjust to discard_queued_stop_replies interface
7514 (first_thread_of, kill_inferior_callback)
7515 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7516 (main): Call initialize_inferiors. Adjust to use ptids, killing
7517 and detaching from all inferiors. Handle multiprocess packet
7519 * linux-low.h: Include gdb_proc_service.h.
7520 (struct process_info_private): New.
7521 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7522 <lwpid_of>: Use ptid_get_lwp.
7523 (get_lwp_thread): Adjust.
7524 (struct lwp_info): Add `dead' member.
7525 (find_lwp_pid): Declare.
7526 * linux-low.c (thread_db_active): Delete.
7527 (new_inferior): Adjust comment.
7528 (inferior_pid): Delete.
7529 (linux_add_process): New.
7530 (handle_extended_wait): Adjust.
7531 (add_lwp): Change unsigned long to ptid.
7532 (linux_create_inferior): Add process to processes table. Adjust
7533 to use ptids. Don't set new_inferior here.
7534 (linux_attach_lwp): Rename to ...
7535 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7536 it. Adjust to use ptids.
7537 (linux_attach_lwp): New.
7538 (linux_attach): Add process to processes table. Don't set
7540 (struct counter): New.
7541 (second_thread_of_pid_p, last_thread_of_process_p): New.
7542 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7544 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7545 processes. Remove process from process table.
7546 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7547 to multiple processes.
7548 (any_thread_of): New.
7549 (linux_detach): Add `pid' argument, and handle it. Remove process
7550 from processes table.
7551 (linux_join): Add `pid' argument. Handle it.
7552 (linux_thread_alive): Change unsighed long argument to ptid_t.
7553 Consider dead lwps as not being alive.
7554 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7555 threads we're not interested in.
7556 (same_lwp, find_lwp_pid): New.
7557 (linux_wait_for_lwp): Change `pid' argument's type from int to
7559 (linux_wait_for_event): Rename to ...
7560 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7561 from int to ptid_t. Adjust.
7562 (linux_wait_for_event): New.
7563 (linux_wait_1): Add `ptid' argument. Change return type to
7564 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7565 that exit from the process table.
7566 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7568 (mark_lwp_dead): New.
7569 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7570 stopping all threads, mark its main lwp as dead.
7571 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7573 (fetch_register, usr_store_inferior_registers)
7574 (regsets_fetch_inferior_registers)
7575 (regsets_store_inferior_registers, linux_read_memory)
7576 (linux_write_memory): Inline `inferior_pid'.
7577 (linux_look_up_symbols): Adjust to use per-process
7579 (linux_request_interrupt): Adjust to use ptids.
7580 (linux_read_auxv): Inline `inferior_pid'.
7581 (initialize_low): Don't reference thread_db_active.
7582 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7583 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7584 (ps_getpid): Return the pid of the current inferior.
7585 * thread-db.c (proc_handle, thread_agent): Delete.
7586 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7588 (find_one_thread): Change argument type to ptid_t. Adjust to
7590 (maybe_attach_thread): Adjust to per-process data and ptids.
7591 (thread_db_find_new_threads): Ditto.
7592 (thread_db_init): Ditto.
7593 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7594 processes table. Adjust to use ptids.
7595 (spu_kill, spu_detach): Adjust interface. Remove process from
7597 (spu_join, spu_thread_alive): Adjust interface.
7598 (spu_wait): Adjust interface. Remove process from processes
7599 table. Adjust to use ptids.
7600 * win32-low.c (current_inferior_tid): Delete.
7601 (current_inferior_ptid): New.
7602 (debug_event_ptid): New.
7603 (thread_rec): Take a ptid. Adjust.
7604 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7605 (child_delete_thread): Ditto.
7606 (do_initial_child_stuff): Add `attached' argument. Add process to
7608 (child_fetch_inferior_registers, child_store_inferior_registers):
7610 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7611 (win32_attach): Pass 1 to do_initial_child_stuff.
7612 (win32_kill): Adjust interface. Remove process from processes
7614 (win32_detach): Ditto.
7615 (win32_join): Adjust interface.
7616 (win32_thread_alive): Take a ptid.
7617 (win32_resume): Adjust to use ptids.
7618 (get_child_debug_event): Ditto.
7619 (win32_wait): Adjust interface. Remove exiting process from
7622 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7624 Non-stop mode support.
7626 * server.h (non_stop): Declare.
7627 (gdb_client_data, handler_func): Declare.
7628 (delete_file_handler, add_file_handler, start_event_loop):
7630 (handle_serial_event, handle_target_event, push_event)
7631 (putpkt_notif): Declare.
7632 * target.h (enum resume_kind): New.
7633 (struct thread_resume): Replace `step' field by `kind' field.
7634 (TARGET_WNOHANG): Define.
7635 (struct target_ops) <wait>: Add `options' argument.
7636 <supports_non_stop, async, start_non_stop>: New fields.
7637 (target_supports_non_stop, target_async): New.
7638 (start_non_stop): Declare.
7639 (mywait): Add `options' argument.
7640 * target.c (mywait): Add `options' argument. Print child exit
7642 (start_non_stop): New.
7643 * server.c (non_stop, own_buf, mem_buf): New globals.
7644 (struct vstop_notif): New.
7645 (notif_queue): New global.
7646 (queue_stop_reply, push_event, discard_queued_stop_replies)
7647 (send_next_stop_reply): New.
7648 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7650 (attach_inferior): In non-stop mode, don't wait for the target
7652 (handle_general_set): Handle QNonStop.
7653 (handle_query): When handling qC, return the current general
7654 thread, instead of the first thread of the list.
7655 (handle_query): If the backend supports non-stop mode, include
7656 QNonStop+ in the qSupported query response.
7657 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7659 (handle_v_attach, handle_v_run): Handle non-stop mode.
7660 (handle_v_stopped): New.
7661 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7662 (myresume): Adjust to use resume_kind. Handle non-stop.
7663 (queue_stop_reply_callback): New.
7664 (handle_status): Handle non-stop mode.
7665 (main): Clear non_stop flag on reconnection. Use the event-loop.
7666 Refactor serial protocol handling from here ...
7667 (process_serial_event): ... to this new function. When GDB
7668 selects any thread, select one here. In non-stop mode, wait until
7669 GDB acks all pending events before exiting.
7670 (handle_serial_event, handle_target_event): New.
7671 * remote-utils.c (remote_open): Install remote_desc in the event
7673 (remote_close): Remove remote_desc from the event loop.
7674 (putpkt_binary): Rename to...
7675 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7676 (putpkt_binary): New as wrapper around putpkt_binary_1.
7677 (putpkt_notif): New.
7678 (prepare_resume_reply): In non-stop mode, don't change the
7680 * event-loop.c: New.
7681 * Makefile.in (OBJ): Add event-loop.o.
7682 (event-loop.o): New rule.
7684 * linux-low.h (pid_of): Moved here.
7686 (get_lwp_thread): Use lwpid_of.
7687 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7688 * linux-low.c (pid_of): Delete.
7689 (inferior_pid): Use lwpid_of.
7690 (linux_event_pipe): New.
7691 (target_is_async_p): New.
7693 (handle_extended_wait): Use lwpid_of.
7694 (add_lwp): Don't set lwpid field.
7695 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7696 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7697 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7698 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7699 first. Adjust to linux_wait_for_event interface changes. Use
7701 (linux_detach): Don't delete the main lwp here.
7702 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7703 (status_pending_p): Don't consider explicitly suspended lwps.
7704 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7705 pointer. Add OPTIONS argument. Change return type to int. Use
7706 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7707 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7708 pointer. Add status pointer argument. Return a pid instead of a
7709 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7710 changes. In non-stop mode, don't switch to a random thread.
7711 (linux_wait): Rename to...
7712 (linux_wait_1): ... this. Add target_options argument, and handle
7713 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7714 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7715 clean exit and signal exit code. Don't stop all threads in
7716 non-stop mode. In all-stop mode, only stop all threads when
7717 reporting a stop to GDB. Handle explicit thread stop requests.
7718 (async_file_flush, async_file_mark): New.
7720 (send_sigstop): Use lwpid_of.
7721 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7722 interface changes. In non-stop mode, don't switch to a random
7724 (linux_resume_one_lwp): Use lwpid_of.
7725 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7726 (linux_resume_one_thread): ... this. Handle resume_stop. In
7727 non-stop mode, don't look for pending flag in all threads.
7728 (resume_status_pending_p): Don't consider explicitly suspended
7730 (my_waitpid): Reimplement. Emulate __WALL.
7731 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7733 (sigchld_handler, linux_supports_non_stop, linux_async)
7734 (linux_start_non_stop): New.
7735 (linux_target_ops): Register linux_supports_non_stop, linux_async
7736 and linux_start_non_stop.
7737 (initialize_low): Install SIGCHLD handler.
7738 * thread-db.c (thread_db_create_event, find_one_thread)
7739 (thread_db_get_tls_address): Use lwpid_of.
7740 * win32-low.c (win32_detach): Adjust to use resume_kind.
7741 (win32_wait): Add `options' argument.
7742 * spu-low.c (spu_resume): Adjust to use resume_kind.
7743 (spu_wait): Add `options' argument.
7745 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7747 Decouple target code from remote protocol.
7749 * target.h (enum target_waitkind): New.
7750 (struct target_waitstatus): New.
7751 (struct target_ops) <wait>: Return an unsigned long. Take a
7752 target_waitstatus pointer instead of a char pointer.
7754 * target.c (mywait): Change prototype to return an unsigned long.
7755 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7756 * server.h (thread_from_wait, old_thread_from_wait): Delete
7758 (prepare_resume_reply): Change prototype to take a
7760 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7761 (last_status, last_ptid): New.
7762 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7763 pid instead of a signal.
7764 (attach_inferior): Remove "status" and "signal" parameters.
7766 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7768 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7769 (handle_v_requests, myresume): Remove "status" and "signal"
7771 (handle_status): New.
7772 (main): Delete local `status'. Adjust.
7773 * remote-utils.c: Include target.h.
7774 (prepare_resume_reply): Change prototype to take a
7775 target_waitstatus. Adjust.
7777 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7779 * spu-low.c (spu_wait): Adjust.
7780 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7782 (win32_wait): Adjust.
7784 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7786 * target.h (struct thread_resume): Delete leave_stopped member.
7787 (struct target_ops): Add a `n' argument to the `resume' callback.
7788 * server.c (start_inferior): Adjust.
7789 (handle_v_cont, myresume): Adjust.
7790 * linux-low.c (check_removed_breakpoint): Adjust to resume
7791 interface change, and to removed leave_stopped field.
7792 (resume_ptr): Delete.
7793 (struct thread_resume_array): New.
7794 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7795 resume interface change.
7796 (linux_continue_one_thread, linux_queue_one_thread)
7797 (resume_status_pending_p): Check if the resume field is NULL
7798 instead of checking the leave_stopped member.
7799 (linux_resume): Adjust to the target resume interface change.
7800 * spu-low.c (spu_resume): Adjust to the target resume interface
7802 * win32-low.c (win32_detach, win32_resume): Ditto.
7804 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7806 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7808 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7810 (linux_continue_one_thread): Only preserve the stepping flag if
7811 there's a pending breakpoint.
7813 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7815 * server.c (main): After the inferior having exited, call
7816 remote_close before exiting gdbserver.
7818 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7820 Fix size of FPSCR in Power 7 processors.
7821 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7822 (PPC_FEATURE_HAS_DFP): New #define.
7823 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7826 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7828 * server.c (handle_query) Whitespace and formatting.
7830 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7832 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7833 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7834 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7835 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7836 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7837 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7838 Makefile.in, configure.ac: Fix whitespace throughout.
7839 * configure: Regenerate.
7841 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7843 * inferiors.c (find_inferior): Make it safe for the callback
7844 function to delete the currently iterated inferior.
7846 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7848 * Makefile.in (linuw_low_h): Move higher.
7849 (thread-db.o): Depend on $(linux_low_h).
7851 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7853 Rename "process" to "lwp" throughout.
7855 * linux-low.c (all_processes): Rename to...
7856 (all_lwps): ... this.
7857 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7858 (add_process): Rename to ...
7859 (add_lwp): ... this. Adjust.
7860 (linux_create_inferior): Adjust.
7861 (linux_attach_lwp): Adjust.
7862 (linux_attach): Adjust.
7863 (linux_kill_one_process): Rename to ...
7864 (linux_kill_one_lwp): ... this. Adjust.
7865 (linux_kill): Adjust.
7866 (linux_detach_one_process): Rename to ...
7867 (linux_detach_one_lwp): ... this. Adjust.
7868 (linux_detach): Adjust.
7869 (check_removed_breakpoint): Adjust.
7870 (status_pending_p): Adjust.
7871 (linux_wait_for_process): Rename to ...
7872 (linux_wait_for_lwp): ... this. Adjust.
7873 (linux_wait_for_event): Adjust.
7874 (send_sigstop): Adjust.
7875 (wait_for_sigstop): Adjust.
7876 (stop_all_processes): Rename to ...
7877 (stop_all_lwps): ... this.
7878 (linux_resume_one_process): Rename to ...
7879 (linux_resume_one_lwp): ... this. Adjust.
7880 (linux_set_resume_request, linux_continue_one_thread)
7881 (linux_queue_one_thread, resume_status_pending_p)
7882 (usr_store_inferior_registers, regsets_store_inferior_registers)
7883 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7885 * linux-low.h (get_process): Rename to ...
7886 (get_lwp): ... this. Adjust.
7887 (get_thread_process): Rename to ...
7888 (get_thread_lwp): ... this. Adjust.
7889 (get_process_thread): Rename to ...
7890 (get_lwp_thread): ... this. Adjust.
7891 (struct process_info): Rename to ...
7892 (struct lwp_info): ... this.
7893 (all_processes): Rename to ...
7894 (all_lwps): ... this.
7895 * proc-service.c (ps_lgetregs): Adjust.
7896 * thread-db.c (thread_db_create_event, find_one_thread)
7897 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7899 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7901 * server.c (handle_query): Handle "qAttached".
7903 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7905 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7906 GPLv3, update license URL.
7908 2009-03-01 Doug Evans <dje@google.com>
7910 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7911 (server_h): Add gdb_signals.h.
7912 (signals.o): Update.
7913 * server.h (target_signal_from_host,target_signal_to_host_p)
7914 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7916 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7918 * remote-utils.c (getpkt): Also generate remote-debug
7919 information if noack_mode is set.
7921 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7923 * server.c (handle_query): Report qXfer:siginfo:read and
7924 qXfer:siginfo:write as supported and handle them.
7925 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7926 * linux-low.c (linux_xfer_siginfo): New.
7927 (linux_target_ops): Set it.
7929 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7931 * server.c (gdbserver_usage): Mention --remote-debug.
7932 (main): Accept '--remote-debug' switch.
7934 2009-01-18 Doug Evans <dje@google.com>
7936 * regcache.c (new_register_cache): No need to check result of xcalloc.
7937 * server.c (handle_search_memory): Back out calls to xmalloc,
7938 result is checked and error is returned to user upon failure.
7939 (handle_query): Ditto. Add more checks for result of malloc.
7940 (handle_v_cont): Check result of malloc, report error back to
7942 (handle_v_run): Ditto. Call freeargv.
7943 * server.h (freeargv): Declare.
7944 * utils.c (freeargv): New fn.
7946 2009-01-15 Doug Evans <dje@google.com>
7948 * gdbreplay.c (perror_with_name): Make arg const char *.
7949 * server.h (target_signal_to_name): Make return type const char *.
7950 * thread-db.c (thread_db_err_str): Make return type const char *.
7951 * utils.c (perror_with_name): Make arg const char *.
7953 2009-01-14 Pedro Alves <pedro@codesourcery.com>
7955 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
7956 when handling a EXIT_PROCESS_DEBUG_EVENT.
7958 2009-01-06 Joel Brobecker <brobecker@adacore.com>
7960 * gdbreplay.c (gdbreplay_version): Update copyright year.
7961 * server.c (gdbserver_version): Likewise.
7963 2009-01-05 Doug Evans <dje@google.com>
7965 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
7966 (handle_extended_wait): Improve comment.
7968 2008-12-13 Doug Evans <dje@google.com>
7970 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
7971 * server.h (ATTR_MALLOC): New macro.
7972 (xmalloc,xcalloc,xstrdup): Declare.
7973 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
7974 * inferiors.c: Ditto.
7975 * linux-low.c: Ditto.
7976 * mem-break.c: Ditto.
7977 * regcache.c: Ditto.
7978 * remote-utils.c: Ditto.
7981 * win32-low.c: Ditto.
7983 2008-12-12 Doug Evans <dje@google.com>
7985 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
7986 in debugging printf.
7988 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
7990 2008-12-09 Doug Evans <dje@google.com>
7992 * linux-low.h (struct process_info): Delete member tid, unused.
7993 * thread-db.c (find_one_thread): Update.
7994 (maybe_attach_thread): Update.
7996 2008-12-02 Pedro Alves <pedro@codesourcery.com>
7998 * target.h (struct target_ops): Add qxfer_osdata member.
7999 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8001 (linux_qxfer_osdata): New functions.
8002 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8004 * server.c (handle_query): Handle "qXfer:osdata:read:".
8005 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8006 (buffer_xml_printf): New functions.
8007 * server.h (struct buffer): New.
8008 (buffer_grow_str, buffer_grow_str0): New macros.
8009 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8010 (buffer_xml_printf): Declare.
8012 2008-11-24 Doug Evans <dje@google.com>
8014 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8016 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8018 * server.c (handle_v_run): Always use the supplied argument list.
8020 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8022 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8023 (xtensa_regmap_table): Add entry for scompare1.
8025 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8027 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8028 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8029 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8030 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8031 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8032 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8033 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8034 XML target descriptions.
8035 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8036 when inferior is running on an ISA 2.05 or later processor. Add
8037 special case to return offset for full 64-bit slot of FPSCR when
8040 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8042 * Makefile.in (SFILES, clean): Added sparc64 files.
8043 (reg-sparc64.o, reg-sparc64.c): New.
8044 * configure.srv (sparc*-*-linux*): New configuration.
8045 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8046 syscall arguments for SPARC.
8047 (regsets_store_inferior_registers): Likewise.
8048 * linux-sparc-low.c: New file.
8050 2008-10-21 Doug Evans <dje@google.com>
8052 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8053 (READLINE_DIR,READLINE_DEP): Delete.
8054 (INTERNAL_CFLAGS): Update.
8055 (LINTFLAGS): Update.
8057 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8059 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8060 whole argv from the last run, not just argv[0].
8062 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8064 * regcache.c (new_register_cache): Return NULL if the register
8065 cache size isn't known yet.
8066 (free_register_cache): Avoid dereferencing a NULL regcache.
8068 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8070 * configure.srv: Merge MIPS and MIPS64.
8072 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8074 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8076 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8078 * Makefile.in: Add required vsx dependencies.
8080 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8081 Declare init_registers_powerpc_vsx32l.
8082 Declare init_registers_powerpc_vsx64l.
8083 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8084 (ppc_arch_setup): Check for VSX in hwcap.
8085 (ppc_fill_vsxregset): New function.
8086 (ppc_store_vsxregset): New function.
8087 Add new VSX entry in regset_info target_regsets.
8089 * configure.srv: Add new VSX dependencies.
8091 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8093 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8094 (remote_open): Set or clear transport_is_reliable.
8095 (putpkt_binary): Don't expect acks in noack mode.
8096 (getpkt): Don't send ack/nac in noack mode.
8097 * server.c (handle_general_set): Handle QStartNoAckMode.
8098 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8100 (main): Reset noack_mode on every connection.
8101 * server.h (noack_mode): Declare.
8103 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8105 * Makefile.in (GDBREPLAY_OBS): New variable.
8106 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8108 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8109 Daniel Jacobowitz <dan@codesourcery.com>
8111 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8112 (usr_store_inferior_registers): Likewise.
8113 (regsets_store_inferior_registers): Likewise.
8115 2008-07-31 Rolf Jansen <rj@surtec.com>
8116 Pedro Alves <pedro@codesourcery.com>
8118 * configure.ac: Check for memmem declaration.
8119 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8120 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8121 (disable_packet_qfThreadInfo): Unconditionally compile.
8122 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8123 * configure, config.in: Regenerate.
8125 2008-07-28 Doug Kwan <dougkwan@google.com>
8127 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8128 (linux_write_memory): Remove declaration of errno.
8130 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8132 * linux-low.c (handle_extended_wait): Do not use "status"
8133 variable uninitialized.
8135 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8137 * server.c (handle_v_attach): Inhibit reporting dll changes.
8139 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8141 * remote-utils.c (prepare_resume_reply): If requested, don't
8142 output "thread:TID" in the T stop reply.
8144 * server.c (disable_packet_vCont, disable_packet_Tthread)
8145 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8146 (handle_query): If requested, disable support for qC, qfThreadInfo
8148 (handle_v_requests): If requested, disable support for vCont.
8149 (gdbserver_show_disableable): New.
8150 (main): Handle --disable-packet and --disable-packet=LIST.
8152 * server.h (disable_packet_vCont, disable_packet_Tthread)
8153 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8155 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8157 * server.c (gdbserver_usage): Mention --version.
8159 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8161 * Makefile.in (gdbreplay.o): New rule.
8163 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8165 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8166 message, not gdbserver.
8168 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8169 Nathan Sidwell <nathan@codesourcery.com>
8170 Joseph Myers <joseph@codesourcery.com>
8172 * acinclude.m4: Include ../../config/acx.m4.
8173 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8174 * configure, config.in: Regenerate.
8175 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8176 * server.c (gdbserver_version): Print PKGVERSION.
8177 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8178 (main): Adjust gdbserver_usage calls.
8179 * gdbreplay.c (version, host_name): Add declarations.
8180 (gdbreplay_version, gdbreplay_usage): New.
8181 (main): Accept --version and --help options.
8183 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8185 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8186 (arm_breakpoint_at): Handle Thumb.
8187 (the_low_target): Add comment.
8189 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8191 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8193 2008-05-09 Doug Evans <dje@google.com>
8195 * server.h (decode_search_memory_packet): Declare.
8196 * remote-utils.c (decode_search_memory_packet): New fn.
8197 * server.c (handle_search_memory_1): New fn.
8198 (handle_search_memory): New fn.
8199 (handle_query): Process qSearch:memory packets.
8201 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8203 * regcache.c (registers_length): Remove.
8204 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8205 full register packet.
8206 * regcache.h (registers_length): Remove prototype.
8207 * server.h (PBUFSIZ): Define to 16384.
8209 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8211 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8212 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8213 powerpc-64l.o, and powerpc-altivec64l.o.
8214 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8215 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8216 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8217 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8218 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8221 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8222 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8223 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8224 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8225 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8226 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8227 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8228 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8229 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8230 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8233 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8234 (init_registers_powerpc_32l): ... this new prototype.
8235 (init_registers_powerpc_32): Remove, replace by ...
8236 (init_registers_powerpc_altivec32l): ... this new prototype.
8237 (init_registers_powerpc_e500): Remove, replace by ...
8238 (init_registers_powerpc_e500l): ... this new prototype.
8239 (init_registers_ppc64): Remove, replace by ...
8240 (init_registers_powerpc_64l): ... this new prototype.
8241 (init_registers_powerpc_64): Remove, replace by ...
8242 (init_registers_powerpc_altivec64l): ... this new prototype.
8243 (ppc_num_regs): Set to 73.
8244 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8245 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8246 (ppc_cannot_store_register): Handle orig_r3 and trap.
8247 (ppc_arch_setup): Update init_registers_... calls.
8248 (ppc_fill_gregset): Handle orig_r3 and trap.
8250 * inferiors.c (clear_inferiors): Reset current_inferior.
8252 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8254 * acinclude.m4: Add override.m4.
8255 * configure: Regenerate.
8257 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8259 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8260 initial call to init_register_ppc64.
8262 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8264 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8265 single powerpc*-*-linux* case.
8266 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8268 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8270 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8271 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8273 * linux-ppc-low.c: Include <elf.h>.
8274 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8275 (ppc_hwcap): New global variable.
8276 (ppc_regmap): Remove __SPE__ #ifdef sections.
8277 (ppc_regmap_e500): New global variable.
8278 (ppc_cannot_store_register): Update __SPE__ special case.
8279 (ppc_get_hwcap): New function.
8280 (ppc_arch_setup): Use it to determine whether inferior supports
8281 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8282 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8283 Do not access registers if target does not support AltiVec.
8284 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8285 Do not access registers if target does not support SPE.
8286 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8288 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8290 * linux-low.c (disabled_regsets, num_regsets): New.
8291 (use_regsets_p): Delete.
8292 (linux_wait_for_process): Clear disabled_regsets.
8293 (regsets_fetch_inferior_registers): Check and set it.
8294 (regsets_store_inferior_registers): Likewise.
8295 (linux_fetch_registers, linux_store_registers): Do not use
8297 (initialize_low): Allocate disabled_regsets.
8299 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8301 * Makefile.in (LIBOBJS): New.
8303 (memmem.o): New rule.
8304 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8305 * configure: Regenerated.
8307 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8309 * server.c (handle_query): Never return "unsupported" for
8310 qXfer:features:read queries.
8312 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8314 * server.c (get_features_xml): Fix inverted condition.
8315 (handle_query): Always support qXfer:feature:read.
8317 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8319 * server.c (wrapper_argv): New.
8320 (start_inferior): Handle wrapper_argv. If set, expect an extra
8322 (gdbserver_usage): Document --wrapper.
8323 (main): Parse --wrapper.
8325 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8327 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8328 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8329 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8330 (ppc_set_pc): Likewise.
8331 (ppc_arch_setup): New function.
8332 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8333 of collect_register.
8334 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8336 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8338 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8339 instead of linux-ppc64-low.o.
8340 * linux-ppc64-low.c: Remove file.
8341 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8342 (linux-ppc64-low.o): Remove rule.
8344 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8345 (init_registers_powerpc_64): Likewise.
8346 (ppc_regmap): Conditionally define depending on __powerpc64__.
8347 (ppc_cannot_store_register): Do not special-case "fpscr" when
8348 compiled on __powerpc64__.
8349 (ppc_collect_ptrace_register): New function.
8350 (ppc_supply_ptrace_register): New function.
8351 (ppc_breakpoint): Change type to "unsigned int".
8352 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8353 (the_low_target): Conditionally provide initializers for the
8354 arch_setup member depending on __powerpc64__. Install
8355 collect_ptrace_register and supply_ptrace_register members.
8357 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8359 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8360 * server.c (gdbserver_xmltarget): Define.
8361 (get_features_xml): Use it to replace "target.xml" and arch_string.
8363 * configure.srv: Remove srv_xmltarget. Add XML files that were
8364 mentioned there to srv_xmlfiles instead. Remove conditional tests
8365 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8366 srv_xmlfiles and srv_regobj to include all possible choices.
8367 * configure.ac (srv_xmltarget): Remove.
8368 (srv_xmlfiles): Do not add "target.xml".
8369 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8370 checks for supplementary target information.
8371 * configure: Regenerate.
8372 * Makefile.in (XML_TARGET): Remove.
8373 (target.xml): Remove rule.
8374 (clean): Do not clean up target.xml.
8375 (.PRECIOUS): Do not mention target.xml.
8377 * target.h (struct target_ops): Remove arch_string member.
8378 * linux-low.c (linux_arch_string): Remove.
8379 (linux_target_ops): Remove arch_string initializer.
8380 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8381 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8382 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8383 * spu-low.c (spu_arch_string): Remove.
8384 (spu_target_ops): Remove arch_string initializer.
8385 * win32-low.c (win32_arch_string): Remove.
8386 (win32_target_ops): Remove arch_string initializer.
8387 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8388 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8389 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8391 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8393 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8394 by collect_ptrace_register and supply_ptrace_register hooks.
8395 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8396 instead of checking for the_low_target.left_pad_xfer.
8397 (usr_store_inferior_registers): Use collect_ptrace_register callback
8398 instead of checking for the_low_target.left_pad_xfer.
8400 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8401 (s390_supply_ptrace_register): Likewise.
8402 (s390_fill_gregset): Call s390_collect_ptrace_register.
8403 (the_low_target): Update.
8405 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8406 (ppc_supply_ptrace_register): Likewise.
8407 (the_low_target): Update.
8409 * linux-i386-low.c (the_low_target): Update.
8410 * linux-x86-64-low.c (the_low_target): Update.
8412 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8414 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8415 reg-s390.o and reg-s390x.o.
8417 * linux-low.c (new_inferior): New global variable.
8418 (linux_create_inferior, linux_attach): Set it.
8419 (linux_wait_for_process): Call the_low_target.arch_setup after the
8420 target has stopped for the first time.
8421 (initialize_low): Do not call the_low_target.arch_setup.
8423 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8424 (s390_set_pc): Likewise.
8425 (s390_arch_setup): New function.
8426 (the_low_target): Use s390_arch_setup as arch_setup routine.
8428 * regcache.c (realloc_register_cache): New function.
8429 (set_register_cache): Call it for each existing regcache.
8431 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8433 * server.h (init_registers): Remove prototype.
8435 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8436 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8437 instead of init_registers ().
8438 * linux-arm-low.c (init_registers_arm): Add prototype.
8439 (init_registers_arm_with_iwmmxt): Likewise.
8440 (the_low_target): Add initializer for arch_setup field.
8441 * linux-cris-low.c (init_registers_cris): Add prototype.
8442 (the_low_target): Add initializer for arch_setup field.
8443 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8444 (the_low_target): Add initializer for arch_setup field.
8445 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8446 (the_low_target): Add initializer for arch_setup field.
8447 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8448 (the_low_target): Add initializer for arch_setup field.
8449 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8450 (the_low_target): Add initializer for arch_setup field.
8451 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8452 (the_low_target): Add initializer for arch_setup field.
8453 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8454 (init_registers_mips64_linux): Likewise.
8455 (the_low_target): Add initializer for arch_setup field.
8456 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8457 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8458 (the_low_target): Add initializer for arch_setup field.
8459 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8460 (init_registers_powerpc_64): Likewise.
8461 (the_low_target): Add initializer for arch_setup field.
8462 * linux-s390-low.c (init_registers_s390): Add prototype.
8463 (init_registers_s390x): Likewise.
8464 (the_low_target): Add initializer for arch_setup field.
8465 * linux-sh-low.c (init_registers_sh): Add prototype.
8466 (the_low_target): Add initializer for arch_setup field.
8467 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8468 (the_low_target): Add initializer for arch_setup field.
8469 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8470 (the_low_target): Add initializer for arch_setup field.
8472 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8473 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8474 instead of init_registers ().
8475 * win32-arm-low.c (init_registers_arm): Add prototype.
8476 (the_low_target): Add initializer for arch_setup field.
8477 * win32-i386-low.c (init_registers_i386): Add prototype.
8478 (the_low_target): Add initializer for arch_setup field.
8480 * spu-low.c (init_registers_spu): Add prototype.
8481 (initialize_low): Call initialie_registers_spu () instead of
8482 initialize_registers ().
8484 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8486 * server.c (handle_v_requests): When handling the vRun and vAttach
8487 packets, if already debugging a process, don't kill it. Return an
8490 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8492 * server.c (handle_query): Correct length check.
8494 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8496 * win32-low.c (do_initial_child_stuff): Add process handle
8497 parameter. Set current_process_handle and current_process_id from the
8498 parameters. Clear globals.
8499 (win32_create_inferior): Don't set current_process_handle and
8500 current_process_id here. Instead pass them on the call to
8501 do_initial_child_stuff.
8502 (win32_attach): Likewise.
8503 (win32_clear_inferiors): New.
8504 (win32_kill): Don't close the current process handle or the
8505 current thread handle here. Instead call win32_clear_inferiors.
8506 (win32_detach): Don't open a new handle to the process. Call
8507 win32_clear_inferiors.
8508 (win32_join): Don't rely on current_process_handle; open a new
8509 handle using the process id.
8510 (win32_wait): Call win32_clear_inferiors when the inferior process
8513 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8515 * server.c (monitor_show_help): Add "exit".
8517 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8519 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8520 (clean): Add reg-xtensa.c.
8521 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8522 * configure.srv (xtensa*-*-linux*) New target.
8523 * linux-xtensa-low.c: New.
8524 * xtensa-xtregs.c: New.
8526 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8528 * hostio.c: Don't include errno.h.
8529 (errno_to_fileio_errno): Move to hostio-errno.
8530 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8531 error number outputting to the target->hostio_last_error callback.
8532 (hostio_packet_error): Use FILEIO_EINVAL directly.
8533 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8534 calls to hostio_error.
8535 * hostio-errno.c: New.
8536 * server.h (hostio_last_error_from_errno): Declare.
8537 * target.h (target_ops): Add hostio_last_error member.
8538 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8539 as hostio_last_error handler.
8540 * spu-low.c (spu_target_ops): Likewise.
8541 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8542 (wince_hostio_last_error): New functions.
8543 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8544 as hostio_last_error handler.
8545 (win32_target_ops) [!_WIN32_WCE]: Register
8546 hostio_last_error_from_errno as hostio_last_error handler.
8547 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8548 (hostio-errno.o): New rule.
8549 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8550 * configure.srv (srv_hostio_err_objs): New variable. Default to
8552 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8553 * configure: Regenerate.
8555 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8557 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8558 (linux_kill, linux_detach): Clean up the process list.
8559 * remote-utils.c (remote_open): Improve port number parsing.
8560 (putpkt_binary, input_interrupt): Only send interrupts if the target
8562 * server.c (extended_protocol): Make static.
8563 (attached): Define earlier.
8564 (exit_requested, response_needed, program_argv): New variables.
8565 (target_running): New.
8566 (start_inferior): Clear attached here.
8567 (attach_inferior): Set attached here.
8568 (require_running): Define.
8569 (handle_query): Use require_running and target_running. Implement
8571 (handle_v_attach, handle_v_run): New.
8572 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8573 (gdbserver_usage): Update.
8574 (main): Redo argument parsing. Handle --debug and --multi. Handle
8575 --attach along with other options or after the port. Save
8576 program_argv. Support no initial program. Resynchronize
8577 communication with GDB after an error. Handle "monitor exit".
8578 Use require_running and target_running. Always allow the extended
8579 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8580 restart in extended mode.
8581 * README: Refer to the GDB manual. Update --attach usage.
8583 2007-12-20 Andreas Schwab <schwab@suse.de>
8585 * linux-low.c (STACK_SIZE): Define.
8586 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8587 (linux_test_for_tracefork): Likewise.
8589 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8591 * linux-low.c (linux_wait_for_event): Update messages. Do not
8592 reinsert auto-delete breakpoints.
8593 * mem-break.c (struct breakpoint): Change return type of handler to
8595 (set_breakpoint_at): Update handler type.
8596 (reinsert_breakpoint_handler): Return 1 instead of calling
8598 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8600 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8601 * mem-break.h (set_breakpoint_at): Update handler type.
8602 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8603 * win32-low.c (auto_delete_breakpoint): New.
8604 (get_child_debug_event): Use it.
8606 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8608 * configure.ac: Check for pread and pwrite.
8609 * hostio.c (handle_pread): Fall back to lseek and read.
8610 (handle_pwrite): Fall back to lseek and write.
8611 * config.in, configure: Regenerated.
8613 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8615 * server.c (myresume): Add own_buf argument.
8616 (main): Update calls.
8618 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8620 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8621 * remote-utils.c (remote_open): Do not call disable_async_io.
8622 (block_async_io): Delete.
8623 (unblock_async_io): Make static.
8624 (initialize_async_io): New.
8625 * server.c (handle_v_cont): Handle async I/O here.
8626 (myresume): Likewise. Move other common resume tasks here...
8627 (main): ... from here. Call initialize_async_io. Disable async
8628 I/O before the main loop.
8629 * server.h (initialize_async_io): Declare.
8630 (block_async_io, unblock_async_io): Delete prototypes.
8631 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8633 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8635 * remote-utils.c (readchar): Allow binary data in received messages.
8637 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8639 * win32-low.c (attaching): New global.
8640 (win32_create_inferior): Clear the `attaching' global.
8641 (win32_attach): Set the `attaching' global.
8642 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8643 attaching. Only set a breakpoint at the entry point if not
8646 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8648 * server.c (main): Don't report dll events on the initial
8649 connection on attaches.
8651 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8653 * server.c (main): Relax numerical bases supported for the pid of
8654 the --attach command line argument.
8656 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8658 * win32-low.c (win32_attach): Call OpenProcess before
8659 DebugActiveProcess, not after. Add last error output to error
8662 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8664 * win32-low.c (win32_get_thread_context)
8665 (win32_set_thread_context): New functions.
8666 (thread_rec): Use win32_get_thread_context.
8667 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8668 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8671 2007-12-03 Leo Zayas
8672 Pedro Alves <pedro_alves@portugalmail.pt>
8674 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8676 (child_add_thread): Minor cleanup.
8677 (child_continue): Resume artificially suspended threads before
8678 calling ContinueDebugEvent.
8679 (suspend_one_thread): New.
8680 (fake_breakpoint_event): New.
8681 (get_child_debug_event): Change return type to int. Check here if
8682 gdb sent an interrupt request. If a soft interrupt was requested,
8683 fake a breakpoint event. Return 0 if there is no event to handle,
8685 (win32_wait): Don't check here if gdb sent an interrupt request.
8686 Ensure there is a valid event to handle.
8687 (win32_request_interrupt): Add soft interruption method as last
8690 2007-12-03 Leo Zayas
8691 Pedro Alves <pedro_alves@portugalmail.pt>
8693 * win32-low.h (win32_thread_info): Add descriptions to the
8694 structure members. Replace `suspend_count' counter by a
8696 * win32-low.c (thread_rec): Update condition of when to get the
8697 context from the inferior. Rely on ContextFlags being set if it
8698 has already been retrieved. Only suspend the inferior thread if
8699 we haven't already. Warn if that fails.
8700 (continue_one_thread): s/suspend_count/suspended/. Only call
8701 ResumeThread once. Warn if that fails.
8703 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8705 * win32-low.c (win32_wait): Don't read from the inferior when it
8708 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8710 * Makefile.in (win32_low_h): New variable.
8711 (win32-low.o): Add dependency on $(win32_low_h).
8712 (win32-arm-low.o, win32-i386-low.o): New rules.
8714 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8716 * hostio.c: Correct copyright year.
8718 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8720 * Makefile.in (OBS): Add hostio.o.
8721 (hostio.o): New rule.
8722 * server.h (handle_vFile): Declare.
8723 * hostio.c: New file.
8724 * server.c (handle_v_requests): Take packet_len and new_packet_len
8725 for binary packets. Call handle_vFile.
8726 (main): Update call to handle_v_requests.
8728 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8730 * linux-low.c: Include <sched.h>.
8732 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8734 * linux-low.c (linux_tracefork_grandchild): New.
8735 (linux_tracefork_child): Use clone.
8736 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8738 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8740 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8742 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8744 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8746 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8748 * inferiors.c (change_inferior_id): Delete.
8749 (add_pid_to_list, pull_pid_from_list): New.
8750 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8751 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8752 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8753 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8754 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8755 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8756 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8757 (using_threads): Always set to 1.
8758 (handle_extended_wait): New.
8759 (add_process): Do not set TID.
8760 (linux_create_inferior): Set must_set_ptrace_flags.
8761 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8762 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8763 (linux_thread_alive): Rename TID argument to LWPID.
8764 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8765 (linux_wait_for_event): Do not use TID or check using_threads. Update
8766 call to dead_thread_notify. Call handle_extended_wait.
8767 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8768 (send_sigstop): Delete sigstop_sent.
8769 (wait_for_sigstop): Avoid TID.
8770 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8771 (linux_test_for_tracefork): New.
8772 (linux_lookup_signals): Use thread_db_active and
8773 linux_supports_tracefork_flag.
8774 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8775 * linux-low.h (get_process_thread): Avoid TID.
8776 (struct process_ifo): Move thread_known and tid to the end. Remove
8778 (linux_attach_lwp, thread_db_init): Update prototypes.
8779 * server.h (change_inferior_id): Delete prototype.
8780 (add_pid_to_list, pull_pid_from_list): New prototypes.
8781 * thread-db.c (thread_db_use_events): New.
8782 (find_first_thread): Rename to...
8783 (find_one_thread): ...this. Update callers and messages. Do not
8784 call fatal. Check thread_db_use_events. Do not call
8785 change_inferior_id or new_thread_notify.
8786 (maybe_attach_thread): Update. Do not call new_thread_notify.
8787 (thread_db_init): Set thread_db_use_events. Check use_events.
8788 * utils.c (fatal, warning): Correct message prefix.
8790 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8792 * Makefile.in (clean): Remove new files.
8793 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8794 (powerpc-64.o, powerpc-64.c): New rules.
8795 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8796 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8798 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8800 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8801 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8802 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8803 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8804 (target_regsets): Add AltiVec and SPE register sets.
8805 * configure.ac: Check for AltiVec and SPE.
8806 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8807 (ppc_fill_vrregset, ppc_store_vrregset): New.
8808 (target_regsets): Add AltiVec register set.
8809 * configure: Regenerated.
8811 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8813 * linux-low.c (O_LARGEFILE): Define.
8814 (linux_read_memory): Use /proc/PID/mem.
8815 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8816 * configure, config.in: Regenerated.
8818 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8820 * linux-low.c (linux_wait_for_event): Do not pass signals while
8823 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8825 * win32-low.c (create_process): New.
8826 (win32_create_inferior): Use create_process instead of
8827 CreateProcess. If create_process failed retry appending an ".exe"
8828 suffix. Store the GetLastError result immediatelly after
8829 create_process calls and use it on the call to error.
8831 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8833 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8835 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8837 * configure.ac: Switch license to GPLv3.
8839 2007-08-01 Michael Snyder <msnyder@access-company.com>
8841 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8843 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8845 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8847 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8848 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8849 CloseToolhelp32Snapshot.
8850 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8851 CloseToolhelp32Snapshot.
8853 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8855 * server.c (main): Check for inferior exit before main loop.
8857 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8859 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8860 instead of on tmp_desc.
8862 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8863 Daniel Jacobowitz <dan@codesourcery.com>
8865 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8866 (add_thread): Minor cleanups.
8867 (clear_inferiors): Move lower in the file. Clear the DLL
8869 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8870 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8871 (xml_escape_text): New.
8872 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8874 (handle_v_cont): Report errors.
8875 (gdbserver_version): Update.
8876 (main): Correct size of own_buf. Do not report initial DLL events.
8877 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8878 (unloaded_dll, xml_escape_text): New.
8879 * win32-low.c (enum target_waitkind): Update comments.
8880 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8881 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8882 (win32_EnumProcessModules, win32_GetModuleInformation)
8883 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8884 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8885 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8886 (win32_Module32First, win32_Module32Next, load_toolhelp)
8887 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8888 (get_child_debug_event): Handle DLL events.
8889 (win32_wait): Likewise.
8891 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8893 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8894 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8896 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8898 * win32-low.c (handle_output_debug_string): Ignore event if not
8901 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8903 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8905 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8907 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8909 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8911 * inferiors.c (change_inferior_id): Add comment.
8912 * linux-low.c (check_removed_breakpoint): Add an early
8913 prototype. Improve debug output.
8914 (linux_attach): Doc update.
8915 (linux_detach_one_process, linux_detach): Clean up before releasing
8917 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8918 * linux-low.h (struct process_info): Doc improvement.
8919 * mem-break.c (delete_all_breakpoints): New.
8920 * mem-break.h (delete_all_breakpoints): New prototype.
8921 * thread-db.c (find_first_thread): New.
8922 (thread_db_create_event): Call it instead of
8923 thread_db_find_new_threads. Clean up unused variables.
8924 (maybe_attach_thread): Remove first thread handling.
8925 (thread_db_find_new_threads): Use find_first_thread.
8926 (thread_db_get_tls_address): Likewise.
8928 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8930 * thread-db.c (thread_db_find_new_threads): Add prototype.
8931 (thread_db_create_event): Check for the main thread before adding
8933 (maybe_attach_thread): Only enable event reporting if TID == 0.
8934 (thread_db_get_tls_address): Check for new threads.
8936 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8938 * linux-low.c (linux_create_inferior): Try execv before execvp.
8939 * spu-low.c (spu_create_inferior): Likewise.
8941 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8943 * linux-low.c (linux_create_inferior): Change execv to execvp.
8944 * spu-low.c (spu_create_inferior): Likewies.
8946 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8948 * Makefile.in (clean): Clean new files instead of deleted ones.
8949 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8950 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
8952 * configure.srv: Specify XML files and new regformats for MIPS and
8954 * linux-mips-low.c (mips_num_regs): Set to only used registers.
8955 (mips_regmap): Do not fetch $0. Remove unused registers. Add
8956 an entry for the restart register.
8957 (mips_cannot_fetch_register, mips_cannot_store_register)
8958 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
8959 register names to match the XML descriptions.
8960 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
8961 restart register instead of $0.
8963 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8964 Markus Deuling <deuling@de.ibm.com>
8966 * remote-utils.c (decode_xfer_write): New function.
8967 * server.h (decode_xfer_write): Add prototype.
8968 * server.c (handle_query): Add PACKET_LEN argument. Support
8969 qXfer:spu:read and qXfer:spu:write packets.
8970 (main): Pass packet_len to handle_query.
8971 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
8972 * target.h (target_ops): Add qxfer_spu.
8974 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
8976 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
8977 accessing non-seekable spufs files.
8979 2007-05-16 Markus Deuling <deuling@de.ibm.com>
8981 * server.c (handle_query): Add reply for qC packet.
8983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
8984 Leo Zayas <lerele@champenstudios@com>
8986 * server.h (check_remote_input_interrupt_request): New function.
8987 * remote_utils.c (INVALID_DESCRIPTOR): New define.
8988 (remote_desc): Initialize with INVALID_DESCRIPTOR.
8989 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
8990 (check_remote_input_interrupt_request): New function.
8991 * server.h (check_remote_input_interrupt_request): Declare.
8992 * win32-low.c (winapi_DebugBreakProcess,
8993 winapi_GenerateConsoleCtrlEvent): New typedefs.
8994 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
8996 (win32_wait): Check for remote interrupt request
8997 with check_remote_input_interrupt_request.
8998 (win32_request_interrupt): New function.
8999 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9003 * win32-low.c (debug_registers_changed,
9004 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9005 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9006 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9007 (thread_rec): Get context using the low target.
9008 (child_add_thread): Call thread_added on the low target,
9009 which does the same thing.
9011 (do_initial_child_stuff): Remove debug registers references.
9012 Set context using the low target. Resume threads after
9013 setting the contexts.
9014 (child_continue): Remove dead variable. Remove debug
9015 registers references.
9016 (child_fetch_inferior_registers): Go through the low target.
9017 (do_child_store_inferior_registers): Remove.
9018 (child_store_inferior_registers): Go through the low target.
9019 (win32_resume): Remove debug registers references.
9020 Set context using the low target.
9021 (handle_exception): Change return type to void. Don't record
9022 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9023 first chance exception.
9024 (get_child_debug_event): Change return type to void. Remove
9025 goto loop. Always return after waiting for debug event.
9026 (win32_wait): Convert to switch statement. Handle spurious
9029 * win32-i386-low.c (debug_registers_changed,
9030 debug_registers_used): New.
9031 (initial_stuff): Rename to ...
9032 (i386_initial_stuff): ... this. Clear debug registers
9034 (store_debug_registers): Delete.
9035 (i386_get_thread_context): New.
9036 (load_debug_registers): Delete.
9037 (i386_set_thread_context): New.
9038 (i386_thread_added): New.
9039 (single_step): Rename to ...
9040 (i386_single_step): ... this.
9041 (do_fetch_inferior_registers): Rename to ...
9042 (i386_fetch_inferior_register): ... this.
9043 (i386_store_inferior_register): New.
9044 (the_low_target): Adapt to new interface.
9046 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9047 (arm_get_thread_context): New.
9048 (arm_set_thread_context): New.
9050 (do_fetch_inferior_registers): Rename to ...
9051 (arm_fetch_inferior_register): ... this.
9052 (arm_store_inferior_register): New.
9053 (arm_wince_breakpoint): Reimplement as unsigned long.
9054 (arm_wince_breakpoint_len): Define.
9055 (the_low_target): Adapt to new interface.
9057 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9058 load_debug_registers. Add get_thread_context, set_thread_context,
9059 thread_added and store_inferior_register. Rename
9060 fetch_inferior_registers to fetch_inferior_register.
9061 (regptr): Remove declaration.
9063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9065 * linux-low.c (linux_detach): Change return type to int. Return 0.
9066 * spu-low.c (spu_detach): Likewise.
9068 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9070 * target.h (target_ops): Change return type of detach to int.
9072 (join_inferior): New.
9073 * server.c (main): Don't skip detach support on mingw32.
9074 If the inferior doesn't support detaching return error.
9075 Call join_inferior instead of using waitpid.
9076 * linux-low.c (linux_join): New.
9077 (linux_target_op): Add linux_join.
9078 * spu-low.c (spu_join): New.
9079 (spu_target_ops): Add spu_join.
9080 * win32-low.c (win32_detach): Adapt to new interface.
9081 Reopen current_process_handle before detaching. Issue a child
9082 resume before detaching.
9084 (win32_target_op): Add win32_join.
9086 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9088 * win32-low.c (win32-attach): Fix return value.
9089 * target.h (target_ops): Describe ATTACH return values.
9091 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9093 * win32-low.c (GETPROCADDRESS): Define.
9094 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9095 (winapi_DebugSetProcessKillOnExit): Likewise.
9096 (win32_create_inferior): Force usage of ansi CreateProcessA.
9097 (win32_attach): Use GETPROCADDRESS.
9098 (win32_detach): Likewise.
9100 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9102 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9104 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9106 * win32-low.c: Commit leftover changes from 2007-03-29.
9108 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9110 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9111 fields short instead of int. Add explicit padding.
9112 (i387_cache_to_fsave): Remove unnecessary casts.
9113 (i387_fsave_to_cache): Doc fix.
9114 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9116 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9118 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9119 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9121 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9123 * configure.srv (arm*-*-mingw32ce*): Move near the other
9126 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9128 * configure.ac: Add errno checking.
9129 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9130 sys/file.h and malloc.h.
9131 (AC_CHECK_DECLS): Add perror.
9132 (srv_mingwce): Handle.
9133 * configure.srv (i[34567]86-*-cygwin*): Add
9134 win32-i386-low.o to srv_tgtobj.
9135 (i[34567]86-*-mingw*): Likewise.
9136 (arm*-*-mingw32ce*): Add case.
9137 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9138 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9139 [__MINGW32CE__] (strerror): New function.
9140 [__MINGW32CE__] (errno): Define to GetLastError.
9141 [__MINGW32CE__] (COUNTOF): New macro.
9142 (remote_open): Remove extra close call.
9143 * mem-break.c (delete_breakpoint_at): New function.
9144 * mem-break.h (delete_breakpoint_at): Declare.
9145 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9146 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9147 [USE_WIN32API] (read, write): Add char* casts.
9148 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9149 * server.h: Include wincecompat.h on Windows CE.
9150 [HAVE_ERRNO_H]: Check.
9151 (perror): Declare if not declared.
9152 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9153 (perror_with_name): Remove errno declaration.
9154 * wincecompat.h: New.
9155 * wincecompat.c: New.
9157 * win32-arm-low.c: New.
9158 * win32-i386-low.c: New.
9159 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9160 (OUTMSG2): Make it safe.
9162 (COUNTOF): New macro.
9163 (NUM_REGS): Get it from the low target.
9164 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9165 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9166 (thread_rec): Let low target handle debug registers.
9167 (child_add_thread): Likewise.
9168 (child_init_thread_list): Likewise.
9169 (continue_one_thread): Likewise.
9171 (do_child_fetch_inferior_registers): Move to ...
9172 * win32-i386-low.c: ... here, and rename to ...
9173 (do_fetch_inferior_registers): ... this.
9174 * win32-low.c (child_fetch_inferior_registers):
9175 Go through the low target.
9176 (do_child_store_inferior_registers): Use regptr.
9177 (strwinerror): New function.
9178 (win32_create_inferior): Handle Windows CE.
9179 Use strwinerror instead of strerror on Windows error
9180 codes. Add program to the error output.
9181 Don't close the main thread handle on Windows CE.
9182 (win32_attach): Use coredll.dll on Windows CE.
9183 (win32_kill): Close current process and current
9185 (win32_detach): Use coredll.dll on Windows CE.
9186 (win32_resume): Let low target handle debug registers, and
9188 (handle_exception): Add/Remove initial breakpoint. Avoid
9189 non-existant WSTOPSIG on Windows CE.
9190 (win32_read_inferior_memory): Cast to remove warning.
9191 (win32_arch_string): Go through the low target.
9192 (initialize_low): Call set_breakpoint_data with the low
9193 target's breakpoint.
9194 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9195 FOP_REGNUM, mappings): Move to ...
9196 * win32-i386-low.c: ... here.
9197 * win32-low.c (win32_thread_info): Move to ...
9198 * win32-low.h: ... here.
9199 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9200 win32-arm-low.c and wincecompat.c.
9201 (all:): Add $EXEEXT.
9202 (install-only:): Likewise.
9203 (gdbserver:): Likewise.
9204 (gdbreplay:): Likewise.
9205 * config.in: Regenerate.
9206 * configure: Regenerate.
9208 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9210 * win32-low.c: Rename typedef thread_info to
9211 win32_thread_info throughout.
9213 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9215 * win32-i386-low.c: Rename to ...
9216 * win32-low.c: ... this.
9217 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9218 * Makefile.in: Likewise.
9220 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9222 * remote-utils.c (monitor_output): Constify msg parameter.
9223 * server.h (monitor_output): Likewise.
9224 * win32-i386-low.c (handle_output_debug_string): New.
9225 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9226 handle_output_debug_string.
9227 (get_child_debug_event): Likewise.
9229 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9231 * server.c (main): Correct strtoul check.
9233 2007-03-27 Jon Ringle <jon@ringle.org>
9235 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9237 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9239 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9241 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9243 * terminal.h: Check HAVE_SGTTY_H.
9245 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9247 * remote-utils.c (remote_open): Print out the assigned port number.
9249 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9251 * remote-utils.c (monitor_output): New function.
9252 * server.c (debug_threads): Define here.
9253 (monitor_show_help): New function.
9254 (handle_query): Handle qRcmd.
9255 (main): Do not handle 'd' packet.
9256 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9257 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9260 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9262 * Makefile.in (EXEEXT): New.
9263 (clean): Use $(EXEEXT).
9265 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9267 * target.h (target_ops): Rename send_signal to request_interrupt,
9268 and remove enum target_signal parameter.
9269 * linux-low.c (linux_request_interrupt): Rename from
9270 linux_send_signal, and always send SIGINT.
9271 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9272 and always send SIGINT.
9273 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9275 (input_interrupt): Likewise.
9277 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9279 * server.c (get_features_xml): Check if target implemented
9281 * win32-i386-low.c (win32_arch_string): New.
9282 (win32_target_ops): Add win32_arch_string as arch_string member.
9284 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9286 * spu-low.c (spu_arch_string): New.
9287 (spu_target_ops): Add spu_arch_string.
9289 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9291 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9292 * configure.ac: Do not check for terminal.h.
9293 * configure, config.in: Regenerated.
9295 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9297 * Makefile.in (OBS): Add $(XML_BUILTIN).
9298 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9300 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9301 (arm-with-iwmmxt.c): New.
9302 * config.in, configure: Regenerate.
9303 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9304 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9305 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9306 (arm*-*-linux*): Add iWMMXt and regset support.
9307 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9308 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9309 (arm_store_wmmxregset, target_regsets): New.
9310 * server.c (get_features_xml): Take annex argument. Check builtin
9312 (handle_query): Handle multiple annexes.
9314 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9316 * remote-utils.c [USE_WIN32API] (read, write): Define.
9317 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9320 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9322 * linux-i386-low.c (the_low_target): Set arch_string.
9323 * linux-x86-64-low.c (the_low_target): Likewise.
9324 * linux-low.c (linux_arch_string): New.
9325 (linux_target_ops): Add it.
9326 * linux-low.h (struct linux_target_ops): Add arch_string.
9327 * server.c (write_qxfer_response): Use const void * for DATA.
9328 (get_features_xml): New.
9329 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9330 * target.h (struct target_ops): Add arch_string method.
9332 2007-01-03 Denis Pilat <denis.pilat@st.com>
9333 Daniel Jacobowitz <dan@codesourcery.com>
9335 * linux-low.c (linux_kill): Handle being called with no threads.
9336 * win32-i386-low.c (win32_kill): Likewise.
9337 (get_child_debug_event): Clear current_process_handle.
9339 2006-12-30 Denis PILAT <denis.pilat@st.com>
9340 Daniel Jacobowitz <dan@codesourcery.com>
9342 * remote-utils.c (remote_open): Check the type of specified
9343 serial port devices before opening them.
9344 * server.c (main): Kill the inferior if an error occurs during
9345 the first remote_open.
9347 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9349 * README: Update supported targets.
9351 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9353 * Makefile.in (clean): Remove reg-mips64.c.
9354 (reg-mips64.c, reg-mips64.o): New rules.
9355 * configure.srv: Handle mips64. Include regset support for mips.
9356 * linux-mips-low.c (union mips_register): New.
9357 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9358 (mips_breakpoint, mips_breakpoint_at): Use int.
9359 (mips_collect_register, mips_supply_register)
9360 (mips_collect_register_32bit, mips_supply_register_32bit)
9361 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9362 (mips_store_fpregset, target_regsets): New.
9363 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9365 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9367 * configure.srv: Add target "spu*-*-*".
9368 * Makefile.in (clean): Remove reg-spu.c.
9369 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9370 * spu-low.c: New file.
9372 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9374 * configure.ac: Correct td_thr_tls_get_addr test.
9375 * configure: Regenerated.
9377 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9379 * linux-low.c (linux_wait_for_event): Reformat. Use the
9381 * remote-utils.c (decode_address_to_semicolon): New.
9382 * server.c (pass_signals, handle_general_set): New.
9383 (handle_query): Mention QPassSignals for qSupported.
9384 (main): Call handle_general_set.
9385 * server.h (pass_signals, decode_address_to_semicolon): New.
9387 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9389 * server.c (handle_query): Correct error handling for read_auxv.
9391 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9393 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9394 and srv_linux_thread_db to yes.
9395 * linux-s390-low.c (s390_fill_gregset): New function.
9396 (target_regsets): Define data structure.
9398 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9400 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9401 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9402 * config.in, configure: Regenerated.
9403 * inferiors.c (gdb_id_to_thread): New function.
9404 (gdb_id_to_thread_id): Use it.
9405 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9406 * linux-low.h (struct process_info): Add th member.
9407 (thread_db_get_tls_address): New prototype.
9408 * remote-utils.c (decode_address): Make non-static.
9409 * server.c (handle_query): Handle qGetTLSAddr.
9410 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9411 * target.h (struct target_ops): Add get_tls_address.
9412 * thread-db.c (maybe_attach_thread): Save the thread handle.
9413 (thread_db_get_tls_address): New.
9415 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9417 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9418 (linux_resume_one_process): Take a siginfo_t *. Update all
9419 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9420 (struct pending_signals): Add a siginfo_t.
9421 (linux_wait_for_process): Always set last_status.
9422 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9423 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9424 * linux-low.h (struct process_info): Add last_status.
9426 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9428 * remote-utils.c (try_rle): New function.
9429 (putpkt_binary): Use it.
9431 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9433 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9434 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9435 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9436 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9437 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9440 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9442 * server.c (terminal_fd): New variable.
9443 (old_foreground_pgrp): Likewise.
9444 (restore_old_foreground_pgrp): New function.
9445 (start_inferior): Record the terminal file descriptor in terminal_fd
9446 and its original foreground group in old_foreground_pgrp. Register
9447 restore_old_foreground_pgrp with atexit().
9449 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9451 * server.c (handle_query): Correct qPart to qXfer.
9453 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9455 * configure.ac: Check for more headers which are missing on
9456 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9457 * configure.srv: Add Cygwin and mingw32.
9458 * remote-utils.c: Don't include headers unconditionally which
9459 are missing on mingw32. Include <winsock.h> for mingw32.
9460 (remote_open): Adjust for mingw32 support. Flush
9461 standard error after writing to it.
9462 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9463 (unblock_async_io, enable_async_io, disable_async_io)
9464 (readchar, getpkt): Update for Winsock support.
9465 (prepare_resume_reply): Expect a protocol signal number.
9466 * server.c: Disable <sys/wait.h> on mingw32.
9467 (start_inferior): Adjust for mingw32 support. Flush
9468 standard error after writing to it.
9469 (attach_inferior): Likewise. Use protocol signal
9471 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9473 * win32-i386-low.c: New file.
9474 * Makefile.in (XM_CLIBS): Set.
9475 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9476 (win32-i386-low.o): New dependency rule.
9477 * linux-low.c (linux_wait): Use target signal numbers.
9478 * target.h (struct target_ops): Doc fix.
9479 * server.h (target_signal_to_name): New prototype.
9480 * gdbreplay.c: Don't include headers unconditionally which
9481 are missing on mingw32. Include <winsock.h> for mingw32.
9482 (remote_close, remote_open): Adjust for Winsock support.
9483 * configure, config.in: Regenerated.
9485 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9487 * server.c (decode_xfer_read, write_qxfer_response): New.
9488 (handle_query): Take a packet length argument. Handle
9489 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9490 the qSupported response.
9491 (main): Update call to handle_query.
9493 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9495 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9496 (putpkt_binary): Renamed from putpkt and adjusted for binary
9498 (putpkt): New wrapper for putpkt_binary.
9499 (readchar): Don't mask off the high bit.
9500 (decode_X_packet): New function.
9501 * server.c (main): Call putpkt_binary if a handler sets the packet
9502 length. Save the length of the incoming packet. Handle 'X'.
9503 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9505 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9507 * server.c (handle_query): Handle qSupported.
9509 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9511 * remote-utils.c (all_symbols_looked_up): New variable.
9512 (look_up_one_symbol): Check it.
9513 * server.h (look_up_one_symbol): New declaration.
9514 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9516 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9518 * Makefile.in (linux-arm-low.o): Update dependencies.
9519 * linux-arm-low.c: Include "gdb_proc_service.h".
9520 (PTRACE_GET_THREAD_AREA): Define.
9521 (ps_get_thread_area): New function.
9523 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9525 * configure.srv (m68k*-*-uclinux*): New target.
9526 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9527 (linux_resume_one_process): Remove extraneous cast.
9528 (linux_read_offsets): New.
9529 (linux_target_op): Add linux_read_offsets on mmuless systems.
9530 * server.c (handle_query): Add qOffsets logic.
9531 * target.h (struct target_ops): Add read_offsets.
9533 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9535 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9536 (PTRACE_GET_THREAD_AREA): Define.
9537 (ps_get_thread_area): New function.
9538 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9539 (linux-x86-64-low.o): Update.
9541 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9543 * configure.ac: Remove checks for prfpregset_t.
9544 * gdb_proc_service.h: New file.
9545 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9546 new "gdb_proc_service.h".
9547 * proc-service.c: Likewise.
9548 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9549 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9550 * Makefile.in (gdb_proc_service_h): Updated.
9551 * configure, config.in: Regenerated.
9553 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9555 * remote-utils.c (prepare_resume_reply): Move declaration
9556 of gdb_id_from_wait to the top of the block.
9558 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9560 * linux-low.c (regsets_store_inferior_registers): Read the regset
9561 from the target before filling it.
9563 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9565 * server.c (attach_inferior): Return SIGTRAP for a successful
9568 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9570 * Makefile.in (OBS): Add version.o.
9571 (STAGESTUFF): Delete.
9572 (version.o): Add dependencies.
9573 (version.c): Replace rule.
9574 (clean): Remove version.c.
9575 * server.c (gdbserver_version): New.
9576 (gdbserver_usage): Use printf.
9577 (main): Handle --version and --help.
9578 * server.h (version, host_name): Add declarations.
9580 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9592 * linux-x86-64-low.c:
9595 * linux-ppc64-low.c:
9604 * linux-crisv32-low.c:
9616 * gdbserver.1: Add (C) after Copyright. Update the FSF
9619 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9621 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9622 (arm_breakpoint_at): Recognize both breakpoints.
9623 (the_low_target): Use the correct breakpoint instruction.
9625 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9627 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9628 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9629 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9630 (the_low_target): Update.
9632 2005-10-25 Andreas Schwab <schwab@suse.de>
9634 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9636 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9637 (ia64_num_regs): Reduce to 462.
9639 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9641 * acinclude.m4: Correct quoting.
9642 * aclocal.m4: Regenerated.
9644 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9645 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9646 (thread_db_init): Call thread_db_err_str.
9647 * configure.ac: Check for TD_VERSION.
9648 * config.in, configure: Regenerated.
9650 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9652 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9654 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9656 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9657 is not available. Define HAVE_PTRACE_GETREGS if it is.
9658 * config.in, configure: Regenerated.
9659 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9660 * linux-i386-low.c, linux-m68k-low.c: Update to use
9661 HAVE_PTRACE_GETREGS.
9662 * linux-low.c (regsets_fetch_inferior_registers)
9663 (regsets_store_inferior_registers): Only return 0 if we processed
9665 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9666 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9668 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9670 * inferiors.c (struct thread_info): Add gdb_id.
9671 (add_thread): Add gdb_id argument.
9672 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9673 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9674 calls to add_thread.
9675 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9676 * server.c (handle_query): Use thread_to_gdb_id.
9677 (handle_v_cont, main): Use gdb_id_to_thread_id.
9678 * server.h (add_thread): Update prototype.
9679 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9682 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9684 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9685 left-padded registers.
9686 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9687 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9689 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9691 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9692 * configure: Regenerate.
9693 * config.in: Regenerate.
9694 * server.h (NEED_DECLARATION_STRERROR):
9695 Replace with !HAVE_DECL_STRERROR.
9697 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9699 * linux-low.c (linux_wait, linux_send_signal): Don't test
9700 an unsigned long variable for > 0 if it could be MAX_ULONG.
9701 * server.c (myresume): Likewise.
9702 * target.c (set_desired_inferior): Likewise.
9704 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9706 * configure.ac: Simplify and improve check for socklen_t.
9707 * configure, config.in: Regenerate.
9709 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9711 * acconfig.h: Remove.
9712 * configure.ac: Add a test for socklen_t. Use three-argument
9713 AC_DEFINE throughout.
9714 * config.in: Regenerated using autoheader 2.59.
9715 * configure: Regenerated.
9717 * gdbreplay.c (socklen_t): Provide a default.
9718 (remote_open): Use socklen_t.
9719 * remote-utils.c (socklen_t): Provide a default.
9720 (remote_open): Use socklen_t.
9721 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9724 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9726 * linux-low.c (linux_read_memory, linux_write_memory)
9727 (linux_read_auxv): Likewise.
9728 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9729 (check_mem_write): Likewise.
9730 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9732 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9733 (registers_from_string, register_data): Likewise.
9734 * server.c (handle_query, main): Likewise.
9735 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9736 (decode_M_packet): Likewise.
9737 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9738 * target.h (struct target_ops): Update read_memory, write_memory,
9740 (read_inferior_memory, write_inferior_memory): Update.
9741 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9743 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9744 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9745 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9746 linux-s390-low.c, linux-sh-low.c: Update for changes in
9747 read_inferior_memory and the_low_target->breakpoint.
9749 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9751 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9752 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9753 * configure.srv: Add powerpc64-*-linux*.
9754 * linux-ppc64-low.c: New file.
9756 2005-05-23 Orjan Friberg <orjanf@axis.com>
9758 * linux-cris-low.c: New file with support for CRIS.
9759 * linux-crisv32-low.c: Ditto for CRISv32.
9760 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9761 (clean): Add reg-cris.c and reg-crisv32.c.
9762 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9763 reg-crisv32.o, and reg-crisv32.c to make rules.
9764 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9767 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9769 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9770 of sizeof (PTRACE_XFER_TYPE).
9771 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9773 2005-05-12 Orjan Friberg <orjanf@axis.com>
9775 * target.h (struct target_ops): Add insert_watchpoint,
9776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9777 pointers for hardware watchpoint support.
9778 * linux-low.h (struct linux_target_ops): Ditto.
9779 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9780 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9781 to linux_target_ops.
9782 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9784 * server.c (main): Recognize 'Z' and 'z' packets.
9786 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9788 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9789 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9790 (the_low_target): Add new members.
9792 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9794 * proc-service.c (ps_lgetregs): Search all_processes instead of
9797 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9799 * server.c (start_inferior): Change return type to int.
9800 (attach_inferior): Change sigptr to int *.
9801 (handle_v_cont, handle_v_requests): Change signal to int *.
9802 (main): Change signal to int.
9804 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9806 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9807 * configure.srv: Add m32r*-*-linux*.
9808 * linux-m32r-low.c: New file.
9810 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9812 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9814 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9816 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9817 Take unsigned long arguments for PIDs.
9818 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9819 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9820 (wait_for_sigstop, linux_resume_one_process)
9821 (regsets_fetch_inferior_registers, linux_send_signal)
9822 (linux_read_auxv): Likewise. Update the types of variables holding
9823 PIDs. Update format string specifiers.
9824 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9825 * remote-utils.c (prepare_resume_reply): Likewise.
9826 * server.c (cont_thread, general_thread, step_thread)
9827 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9829 (handle_query): Update format specifiers.
9830 (handle_v_cont, main): Use strtoul for thread IDs.
9831 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9832 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9833 (general_thread, step_thread, thread_from_wait)
9834 (old_thread_from_wait): Update.
9835 * target.h (struct thread_resume): Use unsigned long for THREAD.
9836 (struct target_ops): Use unsigned long for arguments to attach and
9839 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9841 * acinclude.m4: Include bfd/bfd.m4 directly.
9842 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9843 <agriffis@toolchain.org>.
9844 * aclocal.m4, configure: Regenerated.
9846 2005-01-07 Andrew Cagney <cagney@gnu.org>
9848 * configure.ac: Rename configure.in, require autoconf 2.59.
9849 * configure: Re-generate.
9851 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9853 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9855 * aclocal.m4: Regenerated.
9856 * configure: Regenerated.
9858 2004-11-21 Andreas Schwab <schwab@suse.de>
9860 * linux-m68k-low.c (m68k_num_gregs): Define.
9861 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9862 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9863 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9864 (m68k_breakpoint_at): New. Add to the_low_target.
9866 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9867 srv_linux_thread_db to yes.
9869 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9871 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9872 (ARCH_SET_FS): Likewise.
9873 (ARCH_GET_FS): Likewise.
9874 (ARCH_GET_GS): Likewise.
9876 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9878 * linux-i386-low.c (ps_get_thread_area): New.
9879 * linux-x86-64-low.c (ps_get_thread_area): New.
9880 * linux-low.c: Include <sys/syscall.h>.
9881 (linux_kill_one_process): Don't kill the first thread here.
9882 (linux_kill): Kill the first thread here.
9883 (kill_lwp): New function.
9884 (send_sigstop, linux_send_signal): Use it.
9885 * proc-service.c: Clean up #ifdefs.
9886 (fpregset_info): Delete.
9887 (ps_lgetregs): Update and enable implementation.
9888 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9890 * remote-utils.c (struct sym_cache, symbol_cache): New.
9891 (input_interrupt): Print a clearer message.
9892 (async_io_enabled): New variable.
9893 (enable_async_io, disable_async_io): Use it. Update comments.
9894 (look_up_one_symbol): Use the symbol cache.
9895 * thread-db.c (thread_db_look_up_symbols): New function.
9896 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9898 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9900 * configure.in: Test for -rdynamic.
9901 * configure: Regenerated.
9902 * Makefile (INTERNAL_LDFLAGS): New.
9903 (gdbserver, gdbreplay): Use it.
9905 2004-09-02 Andrew Cagney <cagney@gnu.org>
9907 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9909 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9911 * linux-low.c (linux_wait): Clear all_processes list also.
9913 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9915 * linux-low.c: Include <errno.h>. Remove extern declaration of
9918 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9920 * gdbreplay.c, server.h, utils.c: Update copyright years.
9922 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9924 * server.c (main): Print child status or termination signal from
9925 variable 'signal', not 'sig'.
9927 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9929 * linux-low.c (linux_read_memory): Change return type to
9930 int. Check for and return error from ptrace().
9931 * target.c (read_inferior_memory): Change return type to int. Pass
9932 back return status from the_target->read_memory().
9933 * target.h (struct target_ops): Adapt *read_memory() prototype.
9935 (read_inferior_memory): Adapt prototype.
9936 * server.c (main): Return an error packet if
9937 read_inferior_memory() returns an error.
9939 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9941 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9942 Unify with other clean targets.
9944 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9946 * server.c (handle_v_cont): Call set_desired_inferior.
9948 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9950 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
9952 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9954 * linux-low.c (linux_wait): Unblock async I/O.
9955 (linux_resume): Block and enable async I/O.
9956 * remote-utils.c (block_async_io, unblock_async_io): New functions.
9957 * server.h (block_async_io, unblock_async_io): Add prototypes.
9959 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9961 * remote-utils.c (remote_open): Print a status notice after
9963 * server.c (attach_inferior): Print a status notice after
9966 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9968 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
9970 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
9972 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
9974 * server.c, target.h: Update copyright years.
9976 2004-02-25 Roland McGrath <roland@redhat.com>
9978 * target.h (struct target_ops): New member `read_auxv'.
9979 * server.c (handle_query): Handle qPart:auxv:read: query using that.
9980 * linux-low.c (linux_read_auxv): New function.
9981 (linux_target_ops): Initialize `read_auxv' member to that.
9983 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
9985 Committed by Jim Blandy <jimb@redhat.com>.
9987 * linux-s390-low.c (s390_num_regs): Update.
9988 (s390_regmap): Remove control registers. Use __s390x__ predefine
9989 instead of GPR_SIZE to distiguish s390 and s390x targets.
9991 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
9993 * linux-low.c: Update copyright year.
9994 (check_removed_breakpoint): Clear pending_is_breakpoint.
9995 (linux_set_resume_request, linux_queue_one_thread)
9996 (resume_status_pending_p): New functions.
9997 (linux_continue_one_thread): Use process->resume.
9998 (linux_resume): Only resume threads if there are no pending events.
9999 * linux-low.h (struct process_info): Add resume request
10002 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10004 * regcache.c (new_register_cache): Clear the allocated register
10005 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10007 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10009 * linux-low.c (linux_resume): Take a struct thread_resume *
10011 (linux_wait): Update call.
10012 (resume_ptr): New static variable.
10013 (linux_continue_one_thread): Renamed from
10014 linux_continue_one_process. Use resume_ptr.
10015 (linux_resume): Use linux_continue_one_thread.
10016 * server.c (handle_v_cont, handle_v_requests): New functions.
10017 (myresume): New function.
10018 (main): Handle 'v' case.
10019 * target.h (struct thread_resume): New type.
10020 (struct target_ops): Change argument of "resume" to struct
10022 (myresume): Delete macro.
10024 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10026 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10027 (uninstall): Support DESTDIR.
10029 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10031 * configure.srv: Add xscale*linux copy of arm*linux entry.
10033 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10035 * linux-arm-low.c (arm_reinsert_addr): New function.
10036 (the_low_target): Add arm_reinsert_addr.
10038 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10040 * mem-break.c: Remove whitespace at end of file.
10042 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10044 * configure.in: Check whether we need to prototype strerror.
10045 * server.h: Optionally prototype strerror.
10046 * gdbreplay.c (perror_with_name): Use strerror.
10047 * linux-low.c (linux_attach_lwp): Use strerror.
10048 * utils.c (perror_with_name): Use strerror.
10049 * config.in, configure: Regenerated.
10051 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10053 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10054 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10056 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10058 * Makefile.in (SFILES): Update.
10059 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10060 low-sun3.c: Remove files.
10062 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10064 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10065 (linux_detach_one_process, linux_detach): New functions.
10066 (linux_target_ops): Add linux_detach.
10067 * server.c (main): Handle 'D' packet.
10068 * target.h (struct target_ops): Add "detach" member.
10069 (detach_inferior): Define.
10071 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10073 From Kelley Cook <kelleycook@wideopenwest.com>:
10074 * configure.srv: Accept i[34567]86 variants.
10076 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10078 * linux-low.c (linux_wait_for_event): Correct comment typos.
10079 (linux_resume_one_process): Call check_removed_breakpoint.
10080 (linux_send_signal): New function.
10081 (linux_target_ops): Add linux_send_signal.
10082 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10084 * target.h (struct target_ops): Add send_signal.
10086 2003-05-29 Jim Blandy <jimb@redhat.com>
10088 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10089 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10090 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10091 away part of the register's value.
10093 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10095 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10096 (linux_wait_for_event, linux_init_signals): Likewise.
10098 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10100 * configure.in: Check for stdlib.h.
10101 * configure: Regenerated.
10102 * config.in: Regenerated.
10104 2003-01-04 Andreas Schwab <schwab@suse.de>
10106 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10108 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10110 * Makefile.in: Remove obsolete code.
10112 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10114 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10115 defined(PT_FPR0_HI).
10117 2002-11-17 Stuart Hughes <seh@zee2.com>
10119 * linux-arm-low.c (arm_num_regs): Increase.
10120 (arm_regmap): Include status register.
10122 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10124 * linux-low.c (register_addr): Remove incorrect -1 check.
10126 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10128 * linux-low.c (linux_create_inferior): Call setpgid. Return
10130 (unstopped_p, linux_signal_pid): Remove.
10131 (linux_target_ops): Remove linux_signal_pid.
10132 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10133 global instead of target method.
10134 * target.h (struct target_ops): Remove signal_pid. Update comment
10135 for create_inferior.
10136 * server.c (signal_pid): New variable.
10137 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10138 gdbserver. Set the child to be the foreground process group.
10139 (attach_inferior): Set signal_pid.
10141 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10143 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10145 2002-08-20 Jim Blandy <jimb@redhat.com>
10147 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10150 2002-08-01 Andrew Cagney <cagney@redhat.com>
10152 * Makefile.in: Make chill references obsolete.
10154 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10156 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10157 * configure: Regenerate.
10158 * config.in: Regenerate.
10160 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10162 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10163 (perror_with_name, remote_close, remote_open, expect, play): Static.
10165 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10167 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10168 byte offsets instead of an array of indexes.
10169 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10171 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10173 * regcache.c: Add comment.
10175 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10177 * thread-db.c: New file.
10178 * proc-service.c: New file.
10179 * acinclude.m4: New file.
10180 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10181 proc-service.o, and thread-db.o.
10182 (linux-low.o): Add USE_THREAD_DB.
10183 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10184 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10185 * aclocal.m4: Regenerated.
10186 * config.in: Regenerated.
10187 * configure: Regenerated.
10188 * configure.in: Check for proc_service.h, sys/procfs.h,
10189 thread_db.h, and linux/elf.h headrs.
10190 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10191 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10192 Check for -lthread_db and thread support.
10193 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10194 PowerPC, and SuperH.
10195 * i387-fp.c: Constify arguments.
10196 * i387-fp.h: Likewise.
10197 * inferiors.c: (struct thread_info): Renamed from
10198 `struct inferior_info'. Remove PID member. Use generic inferior
10199 list header. All uses updated.
10200 (inferiors, signal_pid): Removed.
10201 (all_threads): New variable.
10202 (get_thread): Define.
10203 (add_inferior_to_list): New function.
10204 (for_each_inferior): New function.
10205 (change_inferior_id): New function.
10206 (add_inferior): Removed.
10207 (remove_inferior): New function.
10208 (add_thread): New function.
10209 (free_one_thread): New function.
10210 (remove_thread): New function.
10211 (clear_inferiors): Use for_each_inferior and free_one_thread.
10212 (find_inferior): New function.
10213 (find_inferior_id): New function.
10214 (inferior_target_data): Update argument type.
10215 (set_inferior_target_data): Likewise.
10216 (inferior_regcache_data): Likewise.
10217 (set_inferior_regcache_data): Likewise.
10218 * linux-low.c (linux_bp_reinsert): Remove.
10219 (all_processes, stopping_threads, using_thrads)
10220 (struct pending_signals, debug_threads, pid_of): New.
10221 (inferior_pid): Replace with macro.
10222 (struct inferior_linux_data): Remove.
10223 (get_stop_pc, add_process): New functions.
10224 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10225 Use add_process and add_thread.
10226 (linux_attach_lwp): New function, based on old linux_attach. Use
10227 add_process and add_thread. Set stop_expected for new threads.
10228 (linux_attach): New function.
10229 (linux_kill_one_process): New function.
10230 (linux_kill): Kill all LWPs.
10231 (linux_thread_alive): Use find_inferior_id.
10232 (check_removed_breakpoints, status_pending_p): New functions.
10233 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10234 Update. Use WNOHANG. Wait for cloned processes also. Update process
10235 struct for the found process.
10236 (linux_wait_for_event): New function.
10237 (linux_wait): Use it. Support LWPs.
10238 (send_sigstop, wait_for_sigstop, stop_all_processes)
10239 (linux_resume_one_process, linux_continue_one_process): New functions.
10240 (linux_resume): Support LWPs.
10241 (REGISTER_RAW_SIZE): Remove.
10242 (fetch_register): Use register_size instead. Call supply_register.
10243 (usr_store_inferior_registers): Likewise. Call collect_register.
10244 Fix recursive case.
10245 (regsets_fetch_inferior_registers): Improve error message.
10246 (regsets_store_inferior_registers): Add debugging.
10247 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10248 (unstopped_p, linux_signal_pid): New functions.
10249 (linux_target_ops): Add linux_signal_pid.
10250 (linux_init_signals): New function.
10251 (initialize_low): Call it. Initialize using_threads.
10252 * regcache.c (inferior_regcache_data): Add valid
10254 (get_regcache): Fetch registers lazily. Add fetch argument
10255 and update all callers.
10256 (regcache_invalidate_one, regcache_invalidate): New
10258 (new_register_cache): Renamed from create_register_cache.
10259 Return the new regcache.
10260 (free_register_cache): Change argument to a void *.
10261 (registers_to_string, registers_from_string): Call get_regcache
10262 with fetch flag set.
10263 (register_data): Make static. Pass fetch flag to get_regcache.
10264 (supply_register): Call get_regcache with fetch flag clear.
10265 (collect_register): Call get_regcache with fetch flag set.
10266 (collect_register_as_string): New function.
10267 * regcache.h: Update.
10268 * remote-utils.c (putpkt): Flush after debug output and use
10270 Handle input interrupts while waiting for an ACK.
10271 (input_interrupt): Use signal_pid method.
10272 (getpkt): Flush after debug output and use stderr.
10273 (outreg): Use collect_register_as_string.
10274 (new_thread_notify, dead_thread_notify): New functions.
10275 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10276 and general_thread.
10277 (look_up_one_symbol): Flush after debug output.
10278 * server.c (step_thread, server_waiting): New variables.
10279 (start_inferior): Don't use signal_pid. Update call to mywait.
10280 (attach_inferior): Update call to mywait.
10281 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10282 (main): Don't fetch/store registers explicitly. Use
10283 set_desired_inferior. Support proposed ``Hs'' packet. Update
10285 * server.h: Update.
10286 (struct inferior_list, struct_inferior_list_entry): New.
10287 * target.c (set_desired_inferior): New.
10288 (write_inferior_memory): Constify.
10289 (mywait): New function.
10290 * target.h: Update.
10291 (struct target_ops): New signal_pid method.
10292 (mywait): Removed macro, added prototype.
10294 * linux-low.h (regset_func): Removed.
10295 (regset_fill_func, regset_store_func): New.
10296 (enum regset_type): New.
10297 (struct regset_info): Add type field. Use new operation types.
10298 (struct linux_target_ops): stop_pc renamed to get_pc.
10299 Add decr_pc_after_break and breakpoint_at.
10300 (get_process, get_thread_proess, get_process_thread)
10301 (strut process_info, all_processes, linux_attach_lwp)
10302 (thread_db_init): New.
10304 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10305 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10306 (the_low_target): Add new members.
10307 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10308 (i386_store_fpxregset): Constify.
10309 (target_regsets): Add new kind identifier.
10310 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10311 (i386_set_pc): Add debugging.
10312 (i386_breakpoint_at): New function.
10313 (the_low_target): Add new members.
10314 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10315 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10316 (mips_breakpoint_at): New.
10317 (the_low_target): Add new members.
10318 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10319 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10320 (the_low_target): Add new members.
10321 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10322 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10323 (the_low_target): Add new members.
10324 * linux-x86-64-low.c (target_regsets): Add new kind
10327 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10329 From Martin Pool <mbp@samba.org>:
10330 * server.c (gdbserver_usage): New function.
10333 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10335 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10336 stop_at -> stop_pc.
10338 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10340 * Makefile.in: Remove obsolete code.
10342 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10344 * linux-low.c (regsets_fetch_inferior_registers),
10345 (regsets_store_inferior_registers): Removed cast to int from
10347 * regcache.h: Added declaration of struct inferior_info.
10349 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10351 * inferiors.c (struct inferior_info): Add regcache_data.
10352 (add_inferior): Call create_register_cache.
10353 (clear_inferiors): Call free_register_cache.
10354 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10355 * regcache.c (struct inferior_regcache_data): New.
10356 (registers): Remove.
10357 (get_regcache): New function.
10358 (create_register_cache, free_register_cache): New functions.
10359 (set_register_cache): Don't initialize the register cache here.
10360 (registers_to_string, registers_from_string, register_data): Call
10362 * regcache.h: Add prototypes.
10363 * server.h: Likewise.
10365 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10367 * mem-break.c: New file.
10368 * mem-break.h: New file.
10369 * Makefile.in: Add mem-break.o rule; update server.h
10371 * inferiors.c (struct inferior_info): Add target_data
10373 (clear_inferiors): Free target_data member if set.
10374 (inferior_target_data, set_inferior_target_data): New functions.
10375 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10376 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10377 * linux-low.c (linux_bp_reinsert): New variable.
10378 (struct inferior_linux_data): New.
10379 (linux_create_inferior): Use set_inferior_target_data.
10380 (linux_attach): Likewise. Call add_inferior.
10381 (linux_wait_for_one_inferior): New function.
10382 (linux_wait): Call it.
10383 (linux_write_memory): Add const.
10384 (initialize_low): Call set_breakpoint_data.
10385 * linux-low.h (struct linux_target_ops): Add breakpoint
10387 * server.c (attach_inferior): Remove extra add_inferior
10389 * server.h: Include mem-break.h. Update inferior.c
10391 * target.c (read_inferior_memory)
10392 (write_inferior_memory): New functions.
10393 * target.h (read_inferior_memory)
10394 (write_inferior_memory): Change macros to prototypes.
10395 (struct target_ops): Update comments. Add const to write_memory
10398 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10400 * linux-low.c (usr_store_inferior_registers): Support
10401 registers which are allowed to fail to store.
10402 * linux-low.h (linux_target_ops): Likewise.
10403 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10404 (ppc_cannot_store_register): FPSCR may not be storable.
10406 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10408 * server.h: Include <string.h> if HAVE_STRING_H.
10409 * ChangeLog: Correct paths in last ChangeLog entry.
10411 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10413 * linux-low.h: Remove obsolete prototypes.
10414 (struct linux_target_ops): New.
10415 (extern the_low_target): New.
10416 * linux-low.c (num_regs, regmap): Remove declarations.
10417 (register_addr): Use the_low_target explicitly.
10418 (fetch_register): Likewise.
10419 (usr_fetch_inferior_registers): Likewise.
10420 (usr_store_inferior_registers): Likewise.
10421 * linux-arm-low.c (num_regs): Remove.
10422 (arm_num_regs): Define.
10423 (arm_regmap): Renamed from regmap, made static.
10424 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10426 (arm_cannot_store_register): Renamed from cannot_store_register,
10428 (the_low_target): New.
10429 * linux-i386-low.c (num_regs): Remove.
10430 (i386_num_regs): Define.
10431 (i386_regmap): Renamed from regmap, made static.
10432 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10434 (i386_cannot_store_register): Renamed from cannot_store_register,
10436 (the_low_target): New.
10437 * linux-ia64-low.c (num_regs): Remove.
10438 (ia64_num_regs): Define.
10439 (ia64_regmap): Renamed from regmap, made static.
10440 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10442 (ia64_cannot_store_register): Renamed from cannot_store_register,
10444 (the_low_target): New.
10445 * linux-m68k-low.c (num_regs): Remove.
10446 (m68k_num_regs): Define.
10447 (m68k_regmap): Renamed from regmap, made static.
10448 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10450 (m68k_cannot_store_register): Renamed from cannot_store_register,
10452 (the_low_target): New.
10453 * linux-mips-low.c (num_regs): Remove.
10454 (mips_num_regs): Define.
10455 (mips_regmap): Renamed from regmap, made static.
10456 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10458 (mips_cannot_store_register): Renamed from cannot_store_register,
10460 (the_low_target): New.
10461 * linux-ppc-low.c (num_regs): Remove.
10462 (ppc_num_regs): Define.
10463 (ppc_regmap): Renamed from regmap, made static.
10464 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10466 (ppc_cannot_store_register): Renamed from cannot_store_register,
10468 (the_low_target): New.
10469 * linux-s390-low.c (num_regs): Remove.
10470 (s390_num_regs): Define.
10471 (s390_regmap): Renamed from regmap, made static.
10472 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10474 (s390_cannot_store_register): Renamed from cannot_store_register,
10476 (the_low_target): New.
10477 * linux-sh-low.c (num_regs): Remove.
10478 (sh_num_regs): Define.
10479 (sh_regmap): Renamed from regmap, made static.
10480 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10482 (sh_cannot_store_register): Renamed from cannot_store_register,
10484 (the_low_target): New.
10485 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10486 (the_low_target): New.
10488 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10490 * Makefile.in: Add stamp-h target.
10491 * configure.in: Create stamp-h.
10492 * configure: Regenerated.
10494 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10496 * inferiors.c: New file.
10497 * target.c: New file.
10498 * target.h: New file.
10499 * Makefile.in: Add target.o and inferiors.o. Update
10501 * linux-low.c (inferior_pid): New static variable,
10502 moved from server.c.
10503 (linux_create_inferior): Renamed from create_inferior.
10504 Call add_inferior. Return 0 on success instead of a PID.
10505 (linux_attach): Renamed from myattach.
10506 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10507 (linux_thread_alive): Renamed from mythread_alive.
10508 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10510 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10511 (regsets_store_inferior_registers): Correct error message.
10512 Add missing ``return 0''.
10513 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10514 (linux_store_registers): Renamed from store_inferior_registers.
10515 (linux_read_memory): Renamed from read_inferior_memory.
10516 (linux_write_memory): Renamed from write_inferior_memory.
10517 (linux_target_ops): New structure.
10518 (initialize_low): Call set_target_ops ().
10519 * remote-utils.c (unhexify): New function.
10520 (hexify): New function.
10521 (input_interrupt): Send signals to ``signal_pid''.
10522 * server.c (inferior_pid): Remove.
10523 (start_inferior): Update create_inferior call.
10524 (attach_inferior): Call add_inferior.
10525 (handle_query): New function.
10526 (main): Call handle_query for `q' packets.
10527 * server.h: Include "target.h". Remove obsolete prototypes.
10528 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10532 * Makefile.in: Add WARN_CFLAGS. Update configury
10534 * configure.in: Check for <string.h>
10535 * configure: Regenerate.
10536 * config.in: Regenerate.
10537 * gdbreplay.c: Include needed system headers.
10538 (remote_open): Remove strchr prototype.
10539 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10540 * regcache.c (supply_register): Change buf argument to const void *.
10541 (supply_register_by_name): Likewise.
10542 (collect_register): Change buf argument to void *.
10543 (collect_register_by_name): Likewise.
10544 * regcache.h: Add missing prototypes.
10545 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10546 * server.c (handle_query): New function.
10547 (attached): New static variable, moved out of main.
10548 (main): Quiet longjmp clobber warnings.
10549 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10550 * utils.c (error): Remove NORETURN.