1 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
4 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11 * tracepoint.c (cmd_qtinit): Add check for current_thread.
13 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
15 * linux-low.c (linux_low_btrace_conf): Print size.
16 * server.c (handle_btrace_conf_general_set): New.
17 (hanle_general_set): Call handle_btrace_conf_general_set.
18 (handle_query): Report Qbtrace-conf:bts:size as supported.
20 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
22 * linux-low.c (linux_low_enable_btrace): Update parameters.
23 (linux_low_btrace_conf): New.
24 (linux_target_ops)<to_btrace_conf>: Initialize.
25 * server.c (current_btrace_conf): New.
26 (handle_btrace_enable): Rename to ...
27 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
28 to target_enable_btrace. Update comment. Update users.
29 (handle_qxfer_btrace_conf): New.
30 (qxfer_packets): Add btrace-conf entry.
31 (handle_query): Report qXfer:btrace-conf:read as supported packet.
32 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
33 (target_ops)<read_btrace_conf>: New.
34 (target_enable_btrace): Update parameters.
35 (target_read_btrace_conf): New.
37 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
39 * server.c (handle_btrace_general_set): Remove call to
40 target_supports_btrace.
41 (supported_btrace_packets): New.
42 (handle_query): Call supported_btrace_packets.
43 * target.h: include btrace-common.h.
44 (btrace_target_info): Removed.
45 (supports_btrace, target_supports_btrace): Update parameters.
47 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
49 * Makefile.in (SFILES): Add common/btrace-common.c.
50 (OBS): Add common/btrace-common.o.
51 (btrace-common.o): Add build rules.
52 * linux-low: Include btrace-common.h.
53 (linux_low_read_btrace): Use struct btrace_data. Call
54 btrace_data_init and btrace_data_fini.
56 2015-02-06 Pedro Alves <palves@redhat.com>
58 * thread-db.c (find_new_threads_callback): Add debug output.
60 2015-02-04 Pedro Alves <palves@redhat.com>
62 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
63 (resume_stopped_resumed_lwps): New function.
64 (linux_wait_for_event_filtered): Use it.
66 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
68 * Makefile.in (SFILES): Add linux-personality.c.
69 (linux-personality.o): New rule.
70 * configure.srv (srv_linux_obj): Add linux-personality.o to the
71 list of objects to be built.
72 * linux-low.c: Include nat/linux-personality.h.
73 (linux_create_inferior): Remove code to disable address space
74 randomization (moved to ../nat/linux-personality.c). Create
75 cleanup to disable address space randomization.
77 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
79 * Makefile.in (posix-strerror.o): New rule.
80 (mingw-strerror.o): Likewise.
81 * configure: Regenerated.
82 * configure.ac: Source file ../common/common.host. Initialize new
83 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
85 2015-01-14 Yao Qi <yao@codesourcery.com>
87 * Makefile.in (SFILES): Add nat/ppc-linux.c.
88 (ppc-linux.o): New rule.
89 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
90 * configure.ac: AC_CHECK_FUNCS(getauxval).
91 * config.in: Re-generated.
92 * configure: Re-generated.
93 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
94 ppc64_64bit_inferior_p
96 2015-01-14 Yao Qi <yao@codesourcery.com>
98 * linux-ppc-low.c: Include "nat/ppc-linux.h".
99 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
100 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
101 (PT_ORIG_R3, PT_TRAP): Likewise.
102 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
103 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
104 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
106 2015-01-10 Joel Brobecker <brobecker@adacore.com>
108 * i387-fp.c (i387_cache_to_xsave): In look over
109 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
110 zmmh_low_space field by use of zmmh_high_space.
112 2015-01-09 Pedro Alves <palves@redhat.com>
114 * linux-low.c (step_over_bkpt): Move higher up in the file.
115 (handle_extended_wait): Don't store the stop_pc here.
116 (get_stop_pc): Adjust comments and rename to ...
117 (check_stopped_by_breakpoint): ... this. Record whether the LWP
118 stopped for a software breakpoint or hardware breakpoint.
119 (thread_still_has_status_pending_p): New function.
120 (status_pending_p_callback): Use
121 thread_still_has_status_pending_p. If the event is no longer
122 interesting, resume the LWP.
123 (handle_tracepoints): Add assert.
124 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
125 (wstatus_maybe_breakpoint): New function.
126 (cancel_breakpoint): Delete function.
127 (check_stopped_by_watchpoint): New function, factored out from
128 linux_low_filter_event.
129 (lp_status_maybe_breakpoint): Delete function.
130 (linux_low_filter_event): Remove filter_ptid argument.
131 Leave thread group exits pending here. Store the LWP's stop PC.
132 Always leave events pending.
133 (linux_wait_for_event_filtered): Pull all events out of the
134 kernel, and leave them all pending.
135 (count_events_callback, select_event_lwp_callback): Consider all
137 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
138 (select_event_lwp): Only give preference to the stepping LWP in
139 all-stop mode. Adjust comments.
140 (ignore_event): New function.
141 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
142 references to cancel_breakpoints. Adjust to renames. Also give
143 equal priority to all LWPs that have had events in non-stop mode.
144 If reporting a software breakpoint event, unadjust the LWP's PC.
145 (linux_wait): If linux_wait_1 returned an ignored event, retry.
146 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
148 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
149 (resume_status_pending_p): Use thread_still_has_status_pending_p.
150 (linux_stopped_by_watchpoint): Adjust.
151 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
152 * linux-low.h (enum lwp_stop_reason): New.
153 (struct lwp_info) <stop_pc>: Adjust comment.
154 <stopped_by_watchpoint>: Delete field.
155 <stop_reason>: New field.
156 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
157 * mem-break.c (software_breakpoint_inserted_here)
158 (hardware_breakpoint_inserted_here): New function.
159 * mem-break.h (software_breakpoint_inserted_here)
160 (hardware_breakpoint_inserted_here): Declare.
161 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
162 (cancel_breakpoints): Delete.
163 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
164 (upload_fast_traceframes): Remove references to
167 2015-01-09 Pedro Alves <palves@redhat.com>
169 * thread-db.c (find_new_threads_callback): Ignore thread if the
170 kernel thread ID is -1.
172 2015-01-09 Pedro Alves <palves@redhat.com>
174 * linux-low.c (linux_attach_fail_reason_string): Move to
175 nat/linux-ptrace.c, and rename.
176 (linux_attach_lwp): Update comment.
177 (attach_proc_task_lwp_callback): New function.
178 (linux_attach): Adjust to rename and use
179 linux_proc_attach_tgid_threads.
180 (linux_attach_fail_reason_string): Delete declaration.
182 2015-01-01 Joel Brobecker <brobecker@adacore.com>
184 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
185 * server.c (gdbserver_version): Likewise.
187 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
189 * remote-utils.c: Include ctype.h.
190 (input_interrupt): Explicitly handle the case when the char
191 received is the NUL byte. Improve the printing of non-ASCII
194 2014-12-16 Joel Brobecker <brobecker@adacore.com>
196 * linux-low.c (linux_low_filter_event): Update call to
197 linux_enable_event_reporting following the addition of
198 a new parameter to that function.
200 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
203 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
204 (AARCH64_FPCR_REGNO): Likewise.
205 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
206 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
207 (aarch64_store_fpregset): Likewise.
209 2014-12-15 Joel Brobecker <brobecker@adacore.com>
211 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
212 Remove FIXME comment about assumption about N.
214 2014-12-13 Joel Brobecker <brobecker@adacore.com>
216 * configure.ac: If large-file support is disabled in GDBserver,
217 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
218 * configure: Regenerate.
220 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
222 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
223 warning upon ENODATA from ptrace.
224 * linux-s390-low.c (s390_store_tdb): New.
225 (s390_regsets): Add regset for NT_S390_TDB.
227 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
229 * linux-low.c (regsets_store_inferior_registers): Skip regsets
230 without a fill_function.
231 * linux-s390-low.c (s390_fill_last_break): Remove.
232 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
233 (s390_arch_setup): Use regset's size instead of fill_function for
236 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
238 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
239 the regset's store function when ptrace returned an error.
240 * regcache.c (get_thread_regcache): Invalidate register cache
241 before fetching inferior's registers.
243 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
245 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
246 while-loop as for-loop.
247 (regsets_store_inferior_registers): Likewise.
249 2014-11-28 Yao Qi <yao@codesourcery.com>
251 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
252 * config.in, configure: Re-generate.
253 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
256 2014-11-21 Yao Qi <yao@codesourcery.com>
258 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
259 (AC_CHECK_HEADERS): Remove malloc.h.
260 * configure: Re-generated.
261 * config.in: Re-generated.
262 * server.h: Don't include alloca.h and malloc.h.
263 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
264 Don't include malloc.h.
266 2014-11-17 Joel Brobecker <brobecker@adacore.com>
268 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
269 corresponding ERRNO check in same block.
271 2014-11-12 Pedro Alves <palves@redhat.com>
273 * server.c (cont_thread): Update comment.
274 (start_inferior, attach_inferior): No longer clear cont_thread.
275 (handle_v_cont): No longer set cont_thread.
276 (captured_main): Clear cont_thread each time a GDB connects.
278 2014-11-12 Pedro Alves <palves@redhat.com>
280 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
281 thread, and don't resume all threads if the Hc thread has exited.
283 2014-11-12 Pedro Alves <palves@redhat.com>
285 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
286 the process group instead of to a specific LWP.
288 2014-10-15 Pedro Alves <palves@redhat.com>
291 * win32-arm-low.c (arm_set_thread_context): Remove current_event
293 (arm_set_thread_context): Delete.
294 (the_low_target): Adjust.
295 * win32-i386-low.c (debug_registers_changed)
296 (debug_registers_used): Delete.
297 (update_debug_registers_callback): New function.
298 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
299 needing to update their debug registers.
300 (win32_get_current_dr): New function.
301 (x86_dr_low_get_addr, x86_dr_low_get_control)
302 (x86_dr_low_get_status): Fetch the debug register from the thread
304 (i386_initial_stuff): Adjust.
305 (i386_get_thread_context): Remove current_event parameter. Don't
306 clear debug_registers_changed nor copy DR values to
308 (i386_set_thread_context): Delete.
309 (i386_prepare_to_resume): New function.
310 (i386_thread_added): Mark the thread as needing to update irs
312 (the_low_target): Remove i386_set_thread_context and install
313 i386_prepare_to_resume.
314 * win32-low.c (win32_get_thread_context): Adjust.
315 (win32_set_thread_context): Use SetThreadContext
317 (win32_prepare_to_resume): New function.
318 (win32_require_context): New function, factored out from ...
319 (thread_rec): ... this.
320 (continue_one_thread): Call win32_prepare_to_resume on each thread
321 we're about to continue.
322 (win32_resume): Call win32_prepare_to_resume on the event thread.
323 * win32-low.h (struct win32_thread_info)
324 <debug_registers_changed>: New field.
325 (struct win32_target_ops): Change prototype of set_thread_context,
326 delete set_thread_context and add prepare_to_resume.
327 (win32_require_context): New declaration.
329 2014-10-08 Gary Benson <gbenson@redhat.com>
331 * server.h: Do not include common-exceptions.h.
333 2014-10-08 Gary Benson <gbenson@redhat.com>
335 * server.h: Do not include cleanups.h.
337 2014-09-30 James Hogan <james.hogan@imgtec.com>
339 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
342 2014-09-23 Yao Qi <yao@codesourcery.com>
344 * linux-low.c (lp_status_maybe_breakpoint): New function.
345 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
346 (count_events_callback): Likewise.
347 (select_event_lwp_callback): Likewise.
348 (cancel_breakpoints_callback): Likewise.
350 2014-09-19 Don Breazeal <donb@codesourcery.com>
352 * linux-low.c (handle_extended_wait): Call
353 linux_ptrace_get_extended_event.
354 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
355 linux_is_extended_waitstatus.
357 2014-09-16 Joel Brobecker <brobecker@adacore.com>
359 * Makefile.in (CPPFLAGS): Define.
360 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
361 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
363 2014-09-16 Gary Benson <gbenson@redhat.com>
365 * inferiors.h (current_inferior): Renamed as...
366 (current_thread): New variable. All uses updated.
367 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
368 (maybe_move_out_of_jump_pad): Likewise.
369 (cancel_breakpoint): Likewise.
370 (linux_low_filter_event): Likewise.
371 (wait_for_sigstop): Likewise.
372 (linux_resume_one_lwp): Likewise.
373 (need_step_over_p): Likewise.
374 (start_step_over): Likewise.
375 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
376 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
377 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
378 and save_inferior as saved_thread.
379 * regcache.c (get_thread_regcache): Renamed saved_inferior as
381 (regcache_invalidate_thread): Likewise.
382 * remote-utils.c (prepare_resume_reply): Likewise.
383 * thread-db.c (thread_db_get_tls_address): Likewise.
384 (disable_thread_event_reporting): Likewise.
385 (remove_thread_event_breakpoints): Likewise.
386 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
388 * target.h (set_desired_inferior): Renamed as...
389 (set_desired_thread): New declaration. All uses updated.
390 * server.c (myresume): Updated comment to reference thread instead
392 (handle_serial_event): Likewise.
393 (handle_target_event): Likewise.
395 2014-09-12 Tom Tromey <tromey@redhat.com>
396 Gary Benson <gbenson@redhat.com>
398 * regcache.h: Include common-regcache.h.
399 (regcache_read_pc): Don't declare.
400 * regcache.c (get_thread_regcache_for_ptid): New function.
402 2014-09-11 Tom Tromey <tromey@redhat.com>
403 Gary Benson <gbenson@redhat.com>
405 * symbol.c: New file.
406 * Makefile.in (SFILES): Add symbol.c.
409 2014-09-11 Gary Benson <gbenson@redhat.com>
411 * target.c (target_stop_ptid, target_continue_ptid): New
414 2014-09-11 Tom Tromey <tromey@redhat.com>
415 Gary Benson <gbenson@redhat.com>
417 * target.h: Include target/target.h.
418 * target.c (target_read_memory, target_read_uint32)
419 (target_write_memory): New functions.
421 2014-09-11 Gary Benson <gbenson@redhat.com>
423 * server.h (debug_hw_points): Don't declare.
424 * server.c (debug_hw_points): Don't define. Replace all uses
425 with show_debug_regs.
426 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
427 all uses with show_debug_regs.
429 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
431 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
432 endianness into account.
433 (ppc_supply_ptrace_register): Likewise.
435 2014-09-03 James Hogan <james.hogan@imgtec.com>
437 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
438 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
440 2014-09-03 Gary Benson <gbenson@redhat.com>
442 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
443 ALL_DEBUG_ADDRESS_REGISTERS.
445 2014-09-02 Gary Benson <gbenson@redhat.com>
447 * i386-low.h: Renamed as...
448 * x86-low.h: New file. All type, function and variable name
449 prefixes changed from "i386_" to "x86_". All references updated.
450 * i386-low.c: Renamed as...
451 * x86-low.c: New file. All type, function and variable name
452 prefixes changed from "i386_" to "x86_". All references updated.
454 2014-09-02 Gary Benson <gbenson@redhat.com>
456 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
457 (x86_linux_new_thread): Likewise.
459 2014-08-29 Gary Benson <gbenson@redhat.com>
461 * server.h (setjmp.h): Do not include.
462 (toplevel): Do not declare.
463 (common-exceptions.h): Include.
464 (cleanups.h): Likewise.
465 * server.c (toplevel): Do not define.
466 (exit_code): New static global.
467 (detach_or_kill_for_exit_cleanup): New function.
468 (main): New function. Original main renamed to...
469 (captured_main): New function.
470 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
472 2014-08-29 Gary Benson <gbenson@redhat.com>
474 * Makefile.in (SFILES): Add common/common-exceptions.c.
475 (OBS): Add common-exceptions.o.
476 (common-exceptions.o): New rule.
477 * utils.c (prepare_to_throw_exception): New function.
479 2014-08-29 Gary Benson <gbenson@redhat.com>
481 * config.in: Regenerate.
482 * configure: Likewise.
484 2014-08-29 Gary Benson <gbenson@redhat.com>
486 * Makefile.in (SFILES): Add common/cleanups.c.
488 (cleanups.o): New rule.
490 2014-08-29 Gary Benson <gbenson@redhat.com>
492 * utils.c (internal_vwarning): New function.
494 2014-08-28 Gary Benson <gbenson@redhat.com>
496 * utils.h (fatal): Remove declaration.
497 * utils.c (fatal): Remove function.
499 2014-08-28 Gary Benson <gbenson@redhat.com>
501 * tracepoint.c (gdb_agent_init): Replace fatal with
503 (initialize_tracepoint): Likewise.
505 2014-08-28 Gary Benson <gbenson@redhat.com>
507 * remote-utils.c (remote_prepare): Replace fatal with error.
509 2014-08-28 Gary Benson <gbenson@redhat.com>
511 * linux-low.c (linux_async): Replace fatal with warning.
513 (linux_start_non_stop): Return -1 if linux_async failed.
515 2014-08-28 Gary Benson <gbenson@redhat.com>
517 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
519 (i386_dr_low_get_addr): Remove vague comment.
520 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
523 2014-08-28 Gary Benson <gbenson@redhat.com>
525 * inferiors.c (get_thread_process): Replace check with gdb_assert.
526 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
528 (linux_resume_one_lwp): Likewise.
529 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
531 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
533 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
534 (init_register_cache): Replace fatal with gdb_assert_not_reached.
535 (find_register_by_name): Replace fatal with internal_error.
536 (find_regno): Likewise.
537 * tdesc.c (init_target_desc): Replace check with gdb_assert.
538 * thread-db.c (thread_db_create_event): Likewise.
539 (thread_db_load_search): Likewise.
540 (try_thread_db_load_1): Likewise.
541 * tracepoint.c (get_jump_space_head): Replace fatal with
543 (claim_trampoline_space): Likewise.
544 (have_fast_tracepoint_trampoline_buffer): Likewise.
545 (cmd_qtstart): Likewise.
546 (stop_tracing): Likewise.
547 (fast_tracepoint_collecting): Likewise.
548 (target_malloc): Likewise.
549 (download_tracepoint): Likewise.
550 (download_trace_state_variables): Replace check with gdb_assert.
551 (upload_fast_traceframes): Replace fatal with internal_error.
553 2014-08-19 Tom Tromey <tromey@redhat.com>
554 Gary Benson <gbenson@redhat.com>
556 * Makefile.in (SFILES): Add common/common-debug.c.
557 (OBS): Add common-debug.o.
558 (common-debug.o): New rule.
559 * debug.h (debug_printf): Don't declare.
560 * debug.c (debug_printf): Renamed and rewritten as...
561 (debug_vprintf): New function.
563 2014-08-19 Gary Benson <gbenson@redhat.com>
565 * utils.h: Do not include print-utils.h.
567 2014-08-19 Tom Tromey <tromey@redhat.com>
568 Gary Benson <gbenson@redhat.com>
570 * server.h: Add static assertion.
571 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
573 2014-08-19 Tom Tromey <tromey@redhat.com>
574 Gary Benson <gbenson@redhat.com>
576 * Makefile.in (SFILES): Add common/errors.c.
578 (IPA_OBS): Add errors-ipa.o.
579 (errors.o): New rule.
580 (errors-ipa.o): Likewise.
581 * utils.h (perror_with_name, error, warning): Don't declare.
582 * utils.c (warning): Renamed and rewritten as...
583 (vwarning): New function.
584 (error): Renamed and rewritten as...
585 (verror): New function.
586 (internal_error): Renamed and rewritten as...
587 (internal_verror): New function.
589 2014-08-07 Gary Benson <gbenson@redhat.com>
591 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
592 * configure: Regenerate.
593 * config.in: Likewise.
594 * server.h: Do not include errno.h.
595 * event-loop.c: Likewise.
596 * hostio-errno.c: Likewise.
597 * linux-low.c: Likewise.
598 * remote-utils.c: Likewise.
599 * spu-low.c: Likewise.
601 * gdbreplay.c: Unconditionally include errno.h.
603 2014-08-07 Gary Benson <gbenson@redhat.com>
605 * server.h: Do not include string.h.
606 * event-loop.c: Likewise.
607 * linux-low.c: Likewise.
608 * regcache.c: Likewise.
609 * remote-utils.c: Likewise.
610 * spu-low.c: Likewise.
613 2014-08-07 Gary Benson <gbenson@redhat.com>
615 * server.h: Do not include gdb_assert.h.
617 2014-08-07 Gary Benson <gbenson@redhat.com>
619 * server.h: Do not include common-utils.h.
621 2014-08-07 Gary Benson <gbenson@redhat.com>
623 * server.h: Do not include ptid.h.
626 2014-08-07 Gary Benson <gbenson@redhat.com>
628 * server.h: Do not include gdb_locale.h.
630 2014-08-07 Gary Benson <gbenson@redhat.com>
632 * server.h: Do not include gdb/signals.h.
633 * win32-low.c: Likewise.
635 2014-08-07 Gary Benson <gbenson@redhat.com>
637 * server.h: Do not include pathmax.h.
639 2014-08-07 Gary Benson <gbenson@redhat.com>
641 * server.h: Do not include libiberty.h.
642 * linux-bfin-low.c: Likewise.
644 2014-08-07 Gary Benson <gbenson@redhat.com>
646 * server.h: Do not include ansidecl.h.
648 2014-08-07 Gary Benson <gbenson@redhat.com>
650 * linux-x86-low.c: Do not include stddef.h.
651 * lynx-ppc-low.c: Likewise.
652 * tracepoint.c: Likewise.
654 2014-08-07 Gary Benson <gbenson@redhat.com>
656 * server.h: Do not include stdarg.h.
657 * nto-low.c: Likewise.
659 2014-08-07 Gary Benson <gbenson@redhat.com>
661 * server.h: Do not include stdlib.h.
662 * inferiors.c: Likewise.
663 * linux-low.c: Likewise.
664 * regcache.c: Likewise.
665 * spu-low.c: Likewise.
666 * tracepoint.c: Likewise.
669 2014-08-07 Gary Benson <gbenson@redhat.com>
671 * server.h: Do not include stdio.h.
672 * linux-low.c: Likewise.
673 * remote-utils.c: Likewise.
674 * spu-low.c: Likewise.
676 * wincecompat.c: Likewise.
678 2014-08-06 Gary Benson <gbenson@redhat.com>
680 * regcache.c (init_register_cache): Move conditionals inside if.
682 2014-08-06 Gary Benson <gbenson@redhat.com>
684 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
686 2014-07-31 Gary Benson <gbenson@redhat.com>
688 * ax.h: Do not include server.h.
689 * gdbthread.h: Likewise.
690 * lynx-low.h: Likewise.
693 2014-07-30 Gary Benson <gbenson@redhat.com>
695 * server.h: Include common-defs.h.
696 Do not include config.h or build-gnulib-gdbserver/config.h.
698 2014-07-30 Gary Benson <gbenson@redhat.com>
700 * hostio-errno.c: Move server.h to top of includes list.
701 * inferiors.c: Likewise.
702 * linux-x86-low.c: Likewise.
703 * notif.c: Include server.h.
705 2014-07-24 Tom Tromey <tromey@redhat.com>
706 Gary Benson <gbenson@redhat.com>
708 * server.h (CORE_ADDR): Now unsigned.
710 2014-07-16 Pedro Alves <palves@redhat.com>
712 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
714 2014-07-15 Pedro Alves <palves@redhat.com>
716 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
719 2014-07-11 Pedro Alves <palves@redhat.com>
721 * linux-low.c (kill_wait_lwp): New function, based on
722 kill_one_lwp_callback, but use my_waitpid directly.
723 (kill_one_lwp_callback, linux_kill): Use it.
725 2014-06-23 Pedro Alves <palves@redhat.com>
727 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
728 before setting DR0..DR3.
730 2014-06-20 Gary Benson <gbenson@redhat.com>
732 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
733 * configure: Regenerated.
734 * config.in: Likewise.
736 2014-06-20 Gary Benson <gbenson@redhat.com>
738 * Makefile.in (SFILES): Update locations for files moved
740 (object file files): Reordered.
742 2014-06-20 Gary Benson <gbenson@redhat.com>
744 * i386-low.h (i386_dr_low_can_set_addr): Removed.
745 (i386_dr_low_set_addr): Likewise.
746 (i386_dr_low_get_addr): Likewise.
747 (i386_dr_low_can_set_control): Likewise.
748 (i386_dr_low_set_control): Likewise.
749 (i386_dr_low_get_control): Likewise.
750 (i386_dr_low_get_status): Likewise.
751 (i386_get_debug_register_length): Likewise.
752 * linux-x86-low.c (i386_dr_low_set_addr):
753 Changed signature. Made static.
754 (i386_dr_low_get_addr): Likewise.
755 (i386_dr_low_set_control): Likewise.
756 (i386_dr_low_get_control): Likewise.
757 (i386_dr_low_get_status): Likewise.
758 (i386_dr_low): New global variable.
759 * win32-i386-low.c (i386_dr_low_set_addr):
760 Changed signature. Made static.
761 (i386_dr_low_get_addr): Likewise.
762 (i386_dr_low_set_control): Likewise.
763 (i386_dr_low_get_control): Likewise.
764 (i386_dr_low_get_status): Likewise.
765 (i386_dr_low): New global variable.
767 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
769 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
770 * Makefile.in (AR, AR_FLAGS): Define.
771 * configure: Regenerate.
773 2014-06-19 Gary Benson <gbenson@redhat.com>
775 * Makefile.in (i386-dregs.o): New rule.
776 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
777 * i386-low.c (target.h): Remove include.
778 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
779 (DR_CONTROL_SHIFT): Likewise.
780 (DR_CONTROL_SIZE): Likewise.
781 (DR_RW_EXECUTE): Likewise.
782 (DR_RW_WRITE): Likewise.
783 (DR_RW_READ): Likewise.
784 (DR_RW_IORW): Likewise.
785 (DR_LEN_1): Likewise.
786 (DR_LEN_2): Likewise.
787 (DR_LEN_4): Likewise.
788 (DR_LEN_8): Likewise.
789 (DR_LOCAL_ENABLE_SHIFT): Likewise.
790 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
791 (DR_ENABLE_SIZE): Likewise.
792 (DR_LOCAL_SLOWDOWN): Likewise.
793 (DR_GLOBAL_SLOWDOWN): Likewise.
794 (DR_CONTROL_RESERVED): Likewise.
795 (I386_DR_CONTROL_MASK): Likewise.
796 (I386_DR_VACANT): Likewise.
797 (I386_DR_LOCAL_ENABLE): Likewise.
798 (I386_DR_GLOBAL_ENABLE): Likewise.
799 (I386_DR_DISABLE): Likewise.
800 (I386_DR_SET_RW_LEN): Likewise.
801 (I386_DR_GET_RW_LEN): Likewise.
802 (I386_DR_WATCH_HIT): Likewise.
803 (i386_wp_op_t): Likewise.
804 (i386_show_dr): Likewise.
805 (i386_length_and_rw_bits): Likewise.
806 (i386_insert_aligned_watchpoint): Likewise.
807 (i386_remove_aligned_watchpoint): Likewise.
808 (i386_handle_nonaligned_watchpoint): Likewise.
809 i386_update_inferior_debug_regs(): Likewise.
810 (i386_dr_insert_watchpoint): Likewise.
811 (i386_dr_remove_watchpoint): Likewise.
812 (i386_dr_region_ok_for_watchpoint): Likewise.
813 (i386_dr_stopped_data_address): Likewise.
814 (i386_dr_stopped_by_watchpoint): Likewise.
816 2014-06-19 Gary Benson <gbenson@redhat.com>
818 * i386-low.c (i386_dr_show): Renamed to
819 i386_show_dr and made static. All uses updated.
820 (i386_dr_length_and_rw_bits): Renamed to
821 i386_length_and_rw_bits and made static.
823 (i386_dr_insert_aligned_watchpoint): Renamed to
824 i386_insert_aligned_watchpoint and made static.
826 (i386_dr_remove_aligned_watchpoint): Renamed to
827 i386_remove_aligned_watchpoint and made static.
829 (i386_dr_update_inferior_debug_regs): Renamed to
830 i386_update_inferior_debug_regs and made static.
833 2014-06-18 Gary Benson <gbenson@redhat.com>
835 * i386-low.h (i386_dr_low_can_set_addr): New macro.
836 (i386_dr_low_can_set_control): Likewise.
837 (i386_get_debug_register_length): Likewise.
838 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
839 (i386_dr_low_can_set_control): Likewise.
840 (i386_get_debug_register_length): Likewise.
842 2014-06-17 Gary Benson <gbenson@redhat.com>
844 * i386-low.h (i386-dregs.h): New include.
845 (DR_FIRSTADDR): Now in i386-dregs.h.
846 (DR_LASTADDR): Likewise.
847 (DR_NADDR): Likewise.
848 (DR_STATUS): Likewise.
849 (DR_CONTROL): Likewise.
850 (i386_debug_reg_state): Likewise.
851 (i386_dr_insert_watchpoint): Likewise.
852 (i386_dr_remove_watchpoint): Likewise.
853 (i386_dr_region_ok_for_watchpoint): Likewise.
854 (i386_dr_stopped_data_address): Likewise.
855 (i386_dr_stopped_by_watchpoint): Likewise.
856 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
858 2014-06-18 Gary Benson <gbenson@redhat.com>
860 * i386-low.h (i386_low_insert_watchpoint): Renamed to
861 i386_dr_insert_watchpoint.
862 (i386_low_remove_watchpoint): Renamed to
863 i386_dr_remove_watchpoint.
864 (i386_low_region_ok_for_watchpoint): Renamed to
865 i386_dr_region_ok_for_watchpoint.
866 (i386_low_stopped_data_address): Renamed to
867 i386_dr_stopped_data_address.
868 (i386_low_stopped_by_watchpoint): Renamed to
869 i386_dr_stopped_by_watchpoint.
870 * i386-low.c (i386_show_dr): Renamed to
871 i386_dr_show and made nonstatic. All uses updated.
872 (i386_length_and_rw_bits): Renamed to
873 i386_dr_length_and_rw_bits and made nonstatic.
875 (i386_insert_aligned_watchpoint): Renamed to
876 i386_dr_insert_aligned_watchpoint and made nonstatic.
878 (i386_remove_aligned_watchpoint): Renamed to
879 i386_dr_remove_aligned_watchpoint and made nonstatic.
881 (i386_update_inferior_debug_regs): Renamed to
882 i386_dr_update_inferior_debug_regs and made nonstatic.
884 (i386_low_insert_watchpoint): Renamed to
885 i386_dr_insert_watchpoint. All uses updated.
886 (i386_low_remove_watchpoint): Renamed to
887 i386_dr_remove_watchpoint. All uses updated.
888 (i386_low_region_ok_for_watchpoint): Renamed to
889 i386_dr_region_ok_for_watchpoint. All uses updated.
890 (i386_low_stopped_data_address): Renamed to
891 i386_dr_stopped_data_address. All uses updated.
892 (i386_low_stopped_by_watchpoint): Renamed to
893 i386_dr_stopped_by_watchpoint. All uses updated.
895 2014-06-18 Gary Benson <gbenson@redhat.com>
897 * i386-low.c (i386_dr_low_can_set_addr): New macro.
898 (i386_dr_low_can_set_control): Likewise.
899 (i386_insert_aligned_watchpoint): New check.
901 2014-06-18 Gary Benson <gbenson@redhat.com>
903 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
906 2014-06-18 Gary Benson <gbenson@redhat.com>
908 * i386-low.c (i386_length_and_rw_bits): Use internal_error
909 instead of fatal and error.
910 (i386_handle_nonaligned_watchpoint): Likewise.
912 2014-06-18 Gary Benson <gbenson@redhat.com>
914 * i386-low.c (i386_get_debug_register_length): New macro.
915 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
916 (i386_show_dr): Use debug_printf instead of fprintf. Use
917 phex to format values.
919 2014-06-18 Gary Benson <gbenson@redhat.com>
921 * i386-low.h: Comment changes.
922 * i386-low.c: Likewise.
924 2014-06-18 Gary Benson <gbenson@redhat.com>
926 * i386-low.c: Whitespace changes.
928 2014-06-12 Tom Tromey <tromey@redhat.com>
930 * utils.c (freeargv): Remove.
932 2014-06-12 Tom Tromey <tromey@redhat.com>
934 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
935 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
936 (parse_debug_format_options): Likewise.
937 (gdbserver_usage): Likewise.
938 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
939 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
940 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
942 ($(LIBGNU)): Depend on libiberty.
943 (all-lib): Recurse into all subdirs.
944 (install-only): Invoke "install" target in subdirs.
945 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
947 * configure: Rebuild.
948 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
949 for vasprintf, vsnprintf, or gettimeofday.
950 * configure.srv: Don't add safe-ctype.o or lbasename.o to
953 2014-06-05 Joel Brobecker <brobecker@adacore.com>
955 * development.sh: Delete.
956 * Makefile.in (config.status): Adjust dependency on development.sh.
957 * configure.ac: Adjust development.sh source call.
958 * configure: Regenerate.
960 2014-06-02 Pedro Alves <palves@redhat.com>
962 * ax.c (gdb_free_agent_expr): New function.
963 * ax.h (gdb_free_agent_expr): New declaration.
964 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
966 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
968 (clear_breakpoint_conditions_and_commands): New function.
969 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
970 (clear_breakpoint_conditions_and_commands): New declaration.
972 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
974 * linux-aarch64-low.c (asm/ptrace.h): Include.
976 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
978 Fix TLS access for -static -pthread.
979 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
980 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
981 (thread_db_load_search, try_thread_db_load_1): Initialize it.
983 2014-05-20 Pedro Alves <palves@redhat.com>
985 * linux-aarch64-low.c (aarch64_insert_point)
986 (aarch64_remove_point): No longer check whether the type is
987 supported here. Adjust to new interface.
988 (the_low_target): Install aarch64_supports_z_point_type as
989 supports_z_point_type method.
990 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
991 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
992 instead of a Z packet char. Adjust.
993 (arm_supports_z_point_type): New function.
994 (arm_insert_point, arm_remove_point): Adjust to new interface.
995 (the_low_target): Install arm_supports_z_point_type.
996 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
997 (cris_insert_point, cris_remove_point): Adjust to new interface.
998 Don't check whether the type is supported here.
999 (the_low_target): Install cris_supports_z_point_type.
1000 * linux-low.c (linux_supports_z_point_type): New function.
1001 (linux_insert_point, linux_remove_point): Adjust to new interface.
1002 * linux-low.h (struct linux_target_ops) <insert_point,
1003 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1004 raw_breakpoint pointer parameter.
1005 <supports_z_point_type>: New method.
1006 * linux-mips-low.c (mips_supports_z_point_type): New function.
1007 (mips_insert_point, mips_remove_point): Adjust to new interface.
1008 Use mips_supports_z_point_type.
1009 (the_low_target): Install mips_supports_z_point_type.
1010 * linux-ppc-low.c (the_low_target): Install NULL as
1011 supports_z_point_type method.
1012 * linux-s390-low.c (the_low_target): Install NULL as
1013 supports_z_point_type method.
1014 * linux-sparc-low.c (the_low_target): Install NULL as
1015 supports_z_point_type method.
1016 * linux-x86-low.c (x86_supports_z_point_type): New function.
1017 (x86_insert_point): Adjust to new insert_point interface. Use
1018 insert_memory_breakpoint. Adjust to new
1019 i386_low_insert_watchpoint interface.
1020 (x86_remove_point): Adjust to remove_point interface. Use
1021 remove_memory_breakpoint. Adjust to new
1022 i386_low_remove_watchpoint interface.
1023 (the_low_target): Install x86_supports_z_point_type.
1024 * lynx-low.c (lynx_target_ops): Install NULL as
1025 supports_z_point_type callback.
1026 * nto-low.c (nto_supports_z_point_type): New.
1027 (nto_insert_point, nto_remove_point): Adjust to new interface.
1028 (nto_target_ops): Install nto_supports_z_point_type.
1029 * mem-break.c: Adjust intro comment.
1030 (struct raw_breakpoint) <raw_type, size>: New fields.
1031 <inserted>: Update comment.
1032 <shlib_disabled>: Delete field.
1033 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1034 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1035 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1036 (raw_bkpt_type_to_target_hw_bp_type): New function.
1037 (find_enabled_raw_code_breakpoint_at): New function.
1038 (find_raw_breakpoint_at): New type and size parameters. Use them.
1039 (insert_memory_breakpoint): New function, based off
1040 set_raw_breakpoint_at.
1041 (remove_memory_breakpoint): New function.
1042 (set_raw_breakpoint_at): Reimplement.
1043 (set_breakpoint): New, based on set_breakpoint_at.
1044 (set_breakpoint_at): Reimplement.
1045 (delete_raw_breakpoint): Go through the_target->remove_point
1046 instead of assuming memory breakpoints.
1047 (find_gdb_breakpoint_at): Delete.
1048 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1049 (find_gdb_breakpoint): New function.
1050 (set_gdb_breakpoint_at): Delete.
1051 (z_type_supported): New function.
1052 (set_gdb_breakpoint_1): New function, loosely based off
1053 set_gdb_breakpoint_at.
1054 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1055 (delete_gdb_breakpoint_at): Delete.
1056 (delete_gdb_breakpoint_1): New function, loosely based off
1057 delete_gdb_breakpoint_at.
1058 (delete_gdb_breakpoint): New function.
1059 (clear_gdb_breakpoint_conditions): Rename to ...
1060 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1062 (add_condition_to_breakpoint): Make static.
1063 (add_breakpoint_condition): Take a struct breakpoint pointer
1064 instead of an address. Adjust.
1065 (gdb_condition_true_at_breakpoint): Rename to ...
1066 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1068 (gdb_condition_true_at_breakpoint): Reimplement.
1069 (add_breakpoint_commands): Take a struct breakpoint pointer
1070 instead of an address. Adjust.
1071 (gdb_no_commands_at_breakpoint): Rename to ...
1072 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1073 parameter. Return true if no breakpoint was found. Change debug
1075 (gdb_no_commands_at_breakpoint): Reimplement.
1076 (run_breakpoint_commands): Rename to ...
1077 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1078 and change return type to boolean.
1079 (run_breakpoint_commands): New function.
1080 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1081 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1082 breakpoint. Go through the_target->remove_point instead of
1083 assuming memory breakpoint.
1084 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1085 software and hardware breakpoints.
1086 (reinsert_raw_breakpoint): Go through the_target->insert_point
1087 instead of assuming memory breakpoint.
1088 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1089 software and hardware breakpoints.
1090 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1091 Check both software and hardware breakpoints.
1092 (validate_inserted_breakpoint): Assert the breakpoint is a
1093 software breakpoint. Set the inserted flag to -1 instead of
1094 setting shlib_disabled.
1095 (delete_disabled_breakpoints): Adjust.
1096 (validate_breakpoints): Only validate software breakpoints.
1097 Adjust to inserted flag change.
1098 (check_mem_read, check_mem_write): Skip breakpoint types other
1099 than software breakpoints. Adjust to inserted flag change.
1100 * mem-break.h (enum raw_bkpt_type): New enum.
1101 (raw_breakpoint, struct process_info): Forward declare.
1102 (Z_packet_to_target_hw_bp_type): Delete declaration.
1103 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1104 (set_gdb_breakpoint, delete_gdb_breakpoint)
1105 (clear_breakpoint_conditions): New declarations.
1106 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1107 (breakpoint_inserted_here): Update comment.
1108 (add_breakpoint_condition, add_breakpoint_commands): Replace
1109 address parameter with a breakpoint pointer parameter.
1110 (gdb_breakpoint_here): Update comment.
1111 (delete_gdb_breakpoint_at): Delete.
1112 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1113 * server.c (process_point_options): Take a struct breakpoint
1114 pointer instead of an address. Adjust.
1115 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1116 delete_gdb_breakpoint.
1117 * spu-low.c (spu_target_ops): Install NULL as
1118 supports_z_point_type method.
1119 * target.h: Include mem-break.h.
1120 (struct target_ops) <prepare_to_access_memory>: Update comment.
1121 <supports_z_point_type>: New field.
1122 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1123 instead of a char. Also take a raw breakpoint pointer.
1124 * win32-arm-low.c (the_low_target): Install NULL as
1125 supports_z_point_type.
1126 * win32-i386-low.c (i386_supports_z_point_type): New function.
1127 (i386_insert_point, i386_remove_point): Adjust to new interface.
1128 (the_low_target): Install i386_supports_z_point_type.
1129 * win32-low.c (win32_supports_z_point_type): New function.
1130 (win32_insert_point, win32_remove_point): Adjust to new interface.
1131 (win32_target_ops): Install win32_supports_z_point_type.
1132 * win32-low.h (struct win32_target_ops):
1133 <supports_z_point_type>: New method.
1134 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1135 instead of a char. Also take a raw breakpoint pointer.
1137 2014-05-20 Pedro Alves <palves@redhat.com>
1139 * mem-break.h: Include break-common.h.
1140 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1141 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1142 (Z_packet_to_target_hw_bp_type): New declaration.
1143 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1144 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1145 (Z_PACKET_ACCESS_WP): Delete macros.
1146 (Z_packet_to_hw_type): Delete function.
1147 * i386-low.h: Don't include break-common.h here.
1148 (Z_packet_to_hw_type): Delete declaration.
1149 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1150 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1151 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1152 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1153 * linux-aarch64-low.c: Don't include break-common.h here.
1154 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1155 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1156 (Z_packet_to_target_hw_bp_type): Delete function.
1157 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1159 (mips_insert_point, mips_remove_point): Use
1160 Z_packet_to_target_hw_bp_type.
1162 2014-05-20 Pedro Alves <palves@redhat.com>
1164 * linux-aarch64-low.c: Include break-common.h.
1165 (enum target_point_type): Delete.
1166 (Z_packet_to_point_type): Rename to ...
1167 (Z_packet_to_target_hw_bp_type): ... this, and return a
1168 target_hw_bp_type instead.
1169 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1170 instead of an enum target_point_type.
1171 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1173 (aarch64_dr_state_insert_one_point)
1174 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1175 (aarch64_handle_aligned_watchpoint)
1176 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1177 Take an enum target_hw_bp_type instead of an enum
1179 (aarch64_supports_z_point_type): New function.
1180 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1181 use Z_packet_to_target_hw_bp_type.
1183 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1185 * configure.ac: Only use -Werror by default when DEVELOPMENT
1187 * configure: Regenerate.
1189 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1191 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1192 * linux-x86-low.c (X86_64_USER_REGS): New.
1193 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1195 2014-04-28 Yao Qi <yao@codesourcery.com>
1197 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1200 2014-04-25 Pedro Alves <palves@redhat.com>
1203 * linux-low.c (linux_attach_fail_reason_string): New function.
1204 (linux_attach_lwp): Delete.
1205 (linux_attach_lwp_1): Rename to ...
1206 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1207 argument. Remove "initial" parameter. Return int instead of
1208 void. Don't error or warn here.
1209 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1210 failure to attach to the tgid. Call warning when failing to
1212 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1213 argument. Remove "initial" parameter. Return int instead of
1214 void. Don't error or warn here.
1215 (linux_attach_fail_reason_string): New declaration.
1216 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1217 interface change. Use linux_attach_fail_reason_string.
1219 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1220 Walfred Tedeschi <walfred.tedeschi@intel.com>
1222 * Makefile.in: Added rules to handle new files
1223 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1224 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1225 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1226 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1227 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1228 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1230 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1231 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1232 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1233 i386/x32-avx512.xml.
1234 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1235 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1236 i386/x32-avx512-linux.xml.
1237 * i387-fp.c (num_avx512_k_registers): New constant for number
1239 (num_avx512_zmmh_low_registers): New constant for number of
1240 lower ZMM registers (0-15).
1241 (num_avx512_zmmh_high_registers): New constant for number of
1242 higher ZMM registers (16-31).
1243 (num_avx512_ymmh_registers): New contant for number of higher
1244 YMM registers (ymm16-31 added by avx521 on x86_64).
1245 (num_avx512_xmm_registers): New constant for number of higher
1246 XMM registers (xmm16-31 added by AVX512 on x86_64).
1247 (struct i387_xsave): Add space for AVX512 registers.
1248 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1249 Add code to handle AVX512 registers.
1250 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1251 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1252 prototypei from generated file.
1253 (tdesc_amd64_avx512_linux): Likewise.
1254 (init_registers_x32_avx512_linux): Likewise.
1255 (tdesc_x32_avx512_linux): Likewise.
1256 (init_registers_i386_avx512_linux): Likewise.
1257 (tdesc_i386_avx512_linux): Likewise.
1258 (x86_64_regmap): Add AVX512 registers.
1259 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1261 (initialize_low_arch): Add code to initialize AVX512 registers.
1263 2014-04-23 Pedro Alves <palves@redhat.com>
1265 * mem-break.c (find_gdb_breakpoint_at): Make static.
1266 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1268 2014-04-23 Pedro Alves <palves@redhat.com>
1270 * i386-low.c: Don't include break-common.h here.
1271 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1272 prototype to take target_hw_bp_type as argument instead of a Z
1274 * i386-low.h: Include break-common.h here.
1275 (Z_packet_to_hw_type): Declare.
1276 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1278 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1279 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1280 (x86_remove_point): Convert the packet number to a
1281 target_hw_bp_type before calling i386_low_remove_watchpoint.
1282 * win32-i386-low.c (i386_insert_point): Convert the packet number
1283 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1284 (i386_remove_point): Convert the packet number to a
1285 target_hw_bp_type before calling i386_low_remove_watchpoint.
1287 2014-04-23 Pedro Alves <palves@redhat.com>
1289 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1291 2014-04-10 Pedro Alves <palves@redhat.com>
1293 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1294 Check if the condition or command is NULL before checking if the
1295 breakpoint is known. On success, return true.
1296 * mem-break.h (add_breakpoint_condition): Document return.
1297 (add_breakpoint_commands): Add describing comment.
1298 * server.c (skip_to_semicolon): New function.
1299 (process_point_options): Use it.
1301 2014-04-09 Pedro Alves <palves@redhat.com>
1303 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1306 2014-02-27 Pedro Alves <palves@redhat.com>
1309 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1311 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1313 (last_thread_of_process_p): Take a PID argument instead of a
1315 (linux_wait_for_lwp): Delete.
1316 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1318 (linux_low_filter_event): New function, party factored out from
1319 linux_wait_for_event.
1320 (linux_wait_for_event): Rename to ...
1321 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1322 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1323 sigsuspend. Check for zombie leaders.
1324 (linux_wait_for_event): Reimplement as wrapper around
1325 linux_wait_for_event_filtered.
1326 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1327 a normal or signal exit is seen, it's the whole process exiting.
1328 (wait_for_sigstop): No longer a for_each_inferior callback.
1329 Rewrite on top of linux_wait_for_event_filtered.
1330 (stop_all_lwps): Call wait_for_sigstop directly.
1331 * server.c (resume, handle_target_event): Handle
1332 TARGET_WAITKIND_NO_RESUMED.
1334 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1336 * win32-low.c (psapi_get_dll_name,
1337 * win32_CreateToolhelp32Snapshot): Delete.
1338 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1339 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1341 (handle_load_dll): Add function description.
1342 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1344 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1346 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1348 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1349 base address when calling win32_add_one_solib.
1350 (handle_load_dll): Delete local variable load_addr.
1351 Remove 0x1000 offset applied to DLL base address when calling
1352 win32_add_one_solib.
1353 (handle_unload_dll): Add comment.
1355 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1357 * win32-low.c (win32_add_all_dlls): Renames
1358 win32_ensure_ntdll_loaded. Rewrite function documentation.
1359 Adjust implementation to always load all DLLs.
1360 Add 0x1000 offset to DLL base address when calling
1361 win32_add_one_solib.
1362 (child_initialization_done): New static global.
1363 (do_initial_child_stuff): Set child_initialization_done to
1364 zero during child initialization, and 1 after. Replace call
1365 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1367 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1368 (handle_unload_dll): Add function documentation.
1369 (get_child_debug_event): Ignore load and unload DLL events
1370 during child initialization.
1372 2014-02-20 Doug Evans <dje@google.com>
1374 Remove global all_lwps.
1375 * inferiors.h (ptid_of): Move here from linux-low.h.
1376 (pid_of, lwpid_of): Ditto.
1377 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1378 parameter is a struct thread_info * now.
1379 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1380 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1381 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1383 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1384 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1385 * linux-arm-low.c (update_registers_callback): Update, "entry"
1386 parameter is a struct thread_info * now.
1387 Fetch lwpid from current_inferior directly.
1388 (arm_insert_point): Pass &all_threads to find_inferior instead of
1390 (arm_remove_point): Ditto.
1391 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1392 (arm_prepare_to_resume): Fetch pid from thread.
1393 (arm_read_description): Fetch lwpid from current_inferior directly.
1394 * linux-low.c (all_lwps): Delete.
1395 (delete_lwp): Delete call to remove_inferior.
1396 (handle_extended_wait): Fetch lwpid from thread.
1397 (add_lwp): Don't set lwp->entry.id. Remove call to
1398 add_inferior_to_list.
1399 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1400 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1401 (kill_one_lwp_callback): Ditto.
1402 (linux_kill): Don't dereference NULL pointer.
1403 Fetch ptid,lwpid from thread.
1404 (get_detach_signal): Fetch ptid from thread.
1405 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1406 Simplify call to regcache_invalidate_thread.
1407 (delete_lwp_callback): Update, "entry" parameter is a
1408 struct thread_info * now. Fetch pid from thread.
1409 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1410 (status_pending_p_callback): Update, "entry" parameter is a
1411 struct thread_info * now. Fetch ptid from thread.
1412 (find_lwp_pid): Update, "entry" parameter is a
1413 struct thread_info * now.
1414 (linux_wait_for_lwp): Fetch pid from thread.
1415 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1416 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1417 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1418 (dequeue_one_deferred_signal): Ditto.
1419 (cancel_breakpoint): Fetch ptid from current_inferior.
1420 (linux_wait_for_event): Pass &all_threads to find_inferior,
1421 not &all_lwps. Fetch ptid, lwpid from thread.
1422 (count_events_callback): Update, "entry" parameter is a
1423 struct thread_info * now.
1424 (select_singlestep_lwp_callback): Ditto.
1425 (select_event_lwp_callback): Ditto.
1426 (cancel_breakpoints_callback): Ditto.
1427 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1429 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1430 (unsuspend_one_lwp): Update, "entry" parameter is a
1431 struct thread_info * now.
1432 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1434 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1435 Fetch lwpid from thread, not lwp.
1436 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1437 Pass &all_threads to find_inferior, not &all_lwps.
1438 (send_sigstop): Fetch lwpid from thread, not lwp.
1439 (send_sigstop_callback): Update, "entry" parameter is a
1440 struct thread_info * now.
1441 (suspend_and_send_sigstop_callback): Ditto.
1442 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1443 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1444 struct thread_info * now.
1445 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1447 (lwp_running): Update, "entry" parameter is a
1448 struct thread_info * now.
1449 (stop_all_lwps): Fetch ptid from thread.
1450 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1451 (linux_resume_one_lwp): Fetch lwpid from thread.
1452 (linux_set_resume_request): Update, "entry" parameter is a
1453 struct thread_info * now. Fetch pid, lwpid from thread.
1454 (resume_status_pending_p): Update, "entry" parameter is a
1455 struct thread_info * now.
1456 (need_step_over_p): Ditto. Fetch lwpid from thread.
1457 (start_step_over): Fetch lwpid from thread.
1458 (linux_resume_one_thread): Update, "entry" parameter is a
1459 struct thread_info * now. Fetch lwpid from thread.
1460 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1461 (proceed_one_lwp): Update, "entry" parameter is a
1462 struct thread_info * now. Fetch lwpid from thread.
1463 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1464 struct thread_info * now.
1465 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1466 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1467 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1469 (regsets_store_inferior_registers): Ditto.
1470 (fetch_register, store_register): Ditto.
1471 (linux_read_memory, linux_write_memory): Ditto.
1472 (linux_request_interrupt): Ditto.
1473 (linux_read_auxv): Ditto.
1474 (linux_xfer_siginfo): Ditto.
1475 (linux_qxfer_spu): Ditto.
1476 (linux_qxfer_libraries_svr4): Ditto.
1477 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1478 moved to inferiors.h.
1480 (get_thread_lwp): Update.
1481 (struct lwp_info): Delete member "entry". Simplify comment for
1484 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1485 current_inferior directly.
1486 (update_watch_registers_callback): Update, "entry" parameter is a
1487 struct thread_info * now. Fetch pid from thread.
1488 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1489 (mips_insert_point): Fetch lwpid from current_inferior.
1490 Pass &all_threads to find_inferior, not &all_lwps.
1491 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1492 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1494 (mips_stopped_data_address): Ditto.
1495 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1497 * linux-tile-low.c (tile_arch_setup): Ditto.
1498 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1499 (update_debug_registers_callback): Update, "entry" parameter is a
1500 struct thread_info * now. Fetch pid from thread.
1501 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1502 Pass &all_threads to find_inferior, not &all_lwps.
1503 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1504 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1505 Pass &all_threads to find_inferior, not &all_lwps.
1506 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1507 (i386_dr_low_get_status): Ditto.
1508 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1509 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1510 (x86_linux_read_description): Ditto.
1511 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1513 2014-02-20 Doug Evans <dje@google.com>
1515 * inferiors.c (get_first_inferior): Fix buglet.
1517 2014-02-19 Doug Evans <dje@google.com>
1519 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1520 * inferiors.c (add_thread): Change result type to struct thread_info *.
1521 All callers updated.
1522 (add_lwp): Call add_thread here instead of in callers.
1523 All callers updated.
1524 * linux-low.h (get_lwp_thread): Rewrite.
1525 (struct lwp_info): New member "thread".
1527 2014-02-19 Doug Evans <dje@google.com>
1529 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1530 All callers updated.
1532 2014-02-19 Doug Evans <dje@google.com>
1534 * inferiors.c (add_thread): Fix whitespace.
1536 2014-02-19 Doug Evans <dje@google.com>
1538 * dll.c (clear_dlls): Replace accessing list implemention details
1540 * gdbthread.h (get_first_thread): Declare.
1541 * inferiors.c (for_each_inferior_with_data): New function.
1542 (get_first_thread): New function.
1543 (find_thread_ptid): Simplify.
1544 (get_first_inferior): New function.
1545 (clear_list): Delete.
1546 (one_inferior_p): New function.
1547 (clear_inferior_list): New function.
1548 (clear_inferiors): Update.
1549 * inferiors.h (for_each_inferior_with_data): Declare.
1550 (clear_inferior_list): Declare.
1551 (one_inferior_p): Declare.
1552 (get_first_inferior): Declare.
1553 * linux-low.c (linux_wait_for_event): Replace accessing list
1554 implemention details with API function.
1555 * server.c (target_running): Ditto.
1556 (accumulate_file_name_length): New function.
1557 (emit_dll_description): New function.
1558 (handle_qxfer_libraries): Replace accessing list implemention
1559 details with API function.
1560 (handle_qxfer_threads_worker): New function.
1561 (handle_qxfer_threads_proper): Replace accessing list implemention
1562 details with API function.
1563 (handle_query): Ditto.
1564 (visit_actioned_threads_callback_ftype): New typedef.
1565 (visit_actioned_threads_data): New struct.
1566 (visit_actioned_threads): Rewrite to be find_inferior callback.
1567 (resume): Call find_inferior.
1568 (handle_status): Replace accessing list implemention
1569 details with API function.
1570 (process_serial_event): Replace accessing list implemention details
1572 * target.c (set_desired_inferior): Replace accessing list implemention
1573 details with API function.
1574 * tracepoint.c (same_process_p): New function.
1575 (gdb_agent_about_to_close): Replace accessing list implemention
1576 details with API function.
1577 * win32-low.c (child_delete_thread): Replace accessing list
1578 implemention details with API function.
1579 (match_dll_by_basename): New function.
1580 (dll_is_loaded_by_basename): New function.
1581 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1582 details call to dll_is_loaded_by_basename.
1584 2014-02-19 Doug Evans <dje@google.com>
1586 * dll.h (struct dll_info): Add comment.
1587 * gdbthread.h (struct thread_info): Add comment.
1588 (current_ptid): Simplify.
1589 * inferiors.c (add_process): Update.
1590 (remove_process): Update.
1591 * inferiors.h (struct process_info): Rename member "head" to "entry".
1592 * linux-low.c (delete_lwp): Update.
1594 (last_thread_of_process_p): Update.
1595 (kill_one_lwp_callback, linux_kill): Update.
1596 (status_pending_p_callback): Update.
1597 (wait_for_sigstop): Update. Simplify read of ptid.
1598 (start_step_over): Update.
1599 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1600 (get_lwp_thread): Update.
1601 (struct lwp_info): Rename member "head" to "entry".
1602 * regcache.h (inferior_list_entry): Delete.
1603 * server.c (kill_inferior_callback): Update.
1604 (detach_or_kill_inferior_callback): Update.
1605 (print_started_pid): Update.
1606 (print_attached_pid): Update.
1607 (process_serial_event): Simplify read of ptid.
1608 * thread-db.c (thread_db_create_event): Update.
1609 (thread_db_get_tls_address): Update.
1610 * win32-low.c (current_inferior_ptid): Simplify.
1612 2014-02-19 Tom Tromey <tromey@redhat.com>
1614 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1616 (target_supports_btrace): Update.
1618 2014-02-14 Yao Qi <yao@codesourcery.com>
1620 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1621 (rsp-low-ipa.o): New target.
1623 2014-02-12 Tom Tromey <tromey@redhat.com>
1625 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1626 convert_ascii_to_int.
1627 * regcache.c (registers_to_string): Likewise.
1628 * remote-utils.c (decode_M_packet): Likewise.
1629 * server.c (process_serial_event): Likewise.
1631 2014-02-12 Tom Tromey <tromey@redhat.com>
1633 * server.c (handle_query, handle_v_run): Use hex2bin, not
1635 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1637 2014-02-12 Tom Tromey <tromey@redhat.com>
1639 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1640 convert_int_to_ascii.
1641 * regcache.c (registers_to_string, collect_register_as_string):
1643 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1645 * server.c (process_serial_event): Likewise.
1646 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1647 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1649 2014-02-12 Tom Tromey <tromey@redhat.com>
1651 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1652 bin2hex, not hexify.
1653 * tracepoint.c (cmd_qtstatus): Likewise.
1655 2014-02-12 Tom Tromey <tromey@redhat.com>
1657 * remote-utils.c (monitor_output): Pass explicit length to
1660 2014-02-12 Tom Tromey <tromey@redhat.com>
1662 * tracepoint.c: Include rsp-low.h.
1663 * server.c: Include rsp-low.h.
1664 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1665 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1667 * remote-utils.c: Include rsp-low.h.
1668 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1669 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1670 (convert_int_to_ascii, convert_ascii_to_int): Move to
1672 * regcache.c: Include rsp-low.h.
1673 * ax.c: Include rsp-low.h.
1674 * Makefile.in (SFILES): Add common/rsp-low.c.
1675 (OBS): Add rsp-low.o.
1676 (rsp-low.o): New target.
1678 2014-02-12 Tom Tromey <tromey@redhat.com>
1680 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1681 Include print-utils.h.
1682 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1683 (plongest, thirty_two, phex_nz): Remove.
1684 * Makefile.in (SFILES): Add common/print-utils.c.
1685 (OBS): Add print-utils.o.
1686 (print-utils-ipa.o): New target.
1687 (print-utils.o): New target.
1688 (IPA_OBJS): Add print-utils-ipa.o.
1690 2014-02-06 Tom Tromey <tromey@redhat.com>
1692 * Makefile.in (SFILES): Fix indentation.
1694 2014-02-05 Doug Evans <dje@google.com>
1696 * linux-low.c (linux_wait_for_event): Improve comment.
1697 (linux_wait_1): Keep current_inferior in sync with event_child.
1699 2014-01-22 Doug Evans <dje@google.com>
1701 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1703 2014-01-22 Doug Evans <dje@google.com>
1705 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1706 * configure: Regenerate.
1707 * config.in: Regenerate.
1708 * Makefile.in (SFILES): Add debug.c.
1710 * debug.c: New file.
1711 * debug.h: New file.
1712 * linux-aarch64-low.c (*): Update all debugging printfs to use
1713 debug_printf instead of fprintf.
1714 * linux-arm-low.c (*): Ditto.
1715 * linux-cris-low.c (*): Ditto.
1716 * linux-crisv32-low.c (*): Ditto.
1717 * linux-m32r-low.c (*): Ditto.
1718 * linux-sparc-low.c (*): Ditto.
1719 * linux-x86.c (*): Ditto.
1720 * linux-low.c (*): Ditto.
1721 (linux_wait_1): Add calls to debug_enter, debug_exit.
1722 (linux_wait): Remove redundant debugging printf.
1723 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1724 (linux_resume, unstop_all_lwps): Ditto.
1725 * mem-break.c (*): Update all debugging printfs to use
1726 debug_printf instead of fprintf.
1727 * remote-utils.c (*): Ditto.
1728 * thread-db.c (*): Ditto.
1729 * server.c #include <ctype.h>, "gdb_vecs.h".
1730 (debug_threads): Moved to debug.c.
1731 (*): Update all debugging printfs to use debug_printf instead of
1733 (start_inferior): Replace call to fflush with call to debug_flush.
1734 (monitor_show_help): Mention set debug-format.
1735 (parse_debug_format_options): New function.
1736 (handle_monitor_command): Handle "monitor set debug-format".
1737 (gdbserver_usage): Mention --debug-format.
1738 (main): Parse --debug-format.
1739 * server.h (debug_threads): Declaration moved to debug.h.
1741 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1742 trace_debug_1 that uses debug_printf.
1743 (tracepoint_look_up_symbols): Update all debugging printfs to use
1744 debug_printf instead of fprintf.
1746 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1748 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1751 2014-01-17 Pedro Alves <palves@redhat.com>
1754 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1755 defined after including gdb_proc_service.h.
1757 2014-01-16 Doug Evans <dje@google.com>
1759 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1760 (match_dll): Use it.
1762 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1764 * target.h (target_ops) <read_btrace>: Change parameters and
1765 return type to allow error reporting.
1766 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1767 trace reading errors on.
1768 * linux-low.c (linux_low_read_btrace): Pass trace reading
1770 (linux_low_disable_btrace): New.
1772 2014-01-15 Doug Evans <dje@google.com>
1774 * inferiors.c (thread_id_to_gdb_id): Delete.
1775 * inferiors.h (thread_id_to_gdb_id): Delete.
1777 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1779 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1780 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1783 2014-01-08 Pedro Alves <palves@redhat.com>
1785 * server.c (handle_status): Don't discard previous queued stop
1786 replies or thread's pending status here.
1787 (main) <disconnection>: Do it here instead.
1789 2014-01-08 Pedro Alves <palves@redhat.com>
1791 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1792 * server.c (visit_actioned_threads, handle_pending_status): New
1794 (handle_v_cont): Factor out parts to ...
1795 (resume): ... this new function. If in all-stop, and a thread
1796 being resumed has a pending status, report it without actually
1798 (myresume): Adjust to use the new 'resume' function.
1799 (clear_pending_status_callback, set_pending_status_callback)
1800 (find_status_pending_thread_callback): New functions.
1801 (handle_status): Handle the case of multiple threads having
1802 interesting statuses to report. Report threads' real last signal
1803 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1804 with an interesting thread to report the status for, instead of
1805 always reporting the status of the first thread.
1807 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1809 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1810 * gdbreplay.c (gdbreplay_version): Likewise.
1812 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1814 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1815 iov.iov_len with the real length in use.
1817 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1819 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1820 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1821 for all targets that use win32-low.c.
1822 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1823 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1825 2013-12-13 Pedro Alves <palves@redhat.com>
1827 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1828 if equal to TARGET_WAITKIND_LOADED.
1829 * win32-low.c (cached_status): New static global.
1830 (win32_wait): Add declaration.
1831 (do_initial_child_stuff): Flush all initial pending debug events
1832 up to the initial breakpoint.
1833 (win32_wait): If CACHED_STATUS was set, return that instead
1834 of doing a real wait. Remove the code resuming the execution
1835 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1836 during the initial phase. Also remove the code changing
1837 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1838 TARGET_WAITKIND_STOPPED.
1840 2013-12-11 Yao Qi <yao@codesourcery.com>
1842 * notif.c (handle_notif_ack): Return 0 if no notification
1845 2013-11-20 Doug Evans <dje@google.com>
1847 * linux-low.c (linux_set_resume_request): Fix comment.
1849 2013-11-20 Doug Evans <dje@google.com>
1851 * linux-low.c (resume_status_pending_p): Tweak comment.
1853 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1855 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1856 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1857 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1858 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1859 (srv_amd64_regobj): Add amd64-mpx.o.
1860 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1861 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1862 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1863 * i387-fp.c (num_pl_bnd_register) Added constant.
1864 (num_pl_bnd_cfg_registers) Added constant.
1865 (struct i387_xsave) Added reserved area and MPX fields.
1866 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1867 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1869 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1870 (init_registers_amd64_mpx_linux): Declare new function.
1871 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1872 (x86_64_regmap): Add MPX registers.
1873 (x86_linux_read_description): Add MPX case.
1874 (initialize_low_arch): Initialize MPX targets.
1876 2013-11-18 Tom Tromey <tromey@redhat.com>
1878 * configure: Rebuild.
1879 * configure.ac: Don't check for stdlib.h.
1880 * gdbreplay.c: Unconditionally include stdlib.h.
1882 2013-11-18 Tom Tromey <tromey@redhat.com>
1884 * config.in: Rebuild.
1885 * configure: Rebuild.
1886 * configure.ac: Don't use AC_HEADER_DIRENT.
1888 2013-11-18 Tom Tromey <tromey@redhat.com>
1890 * server.h: Don't check HAVE_STRING_H.
1891 * gdbreplay.c: Don't check HAVE_STRING_H.
1892 * configure: Rebuild.
1894 2013-11-18 Tom Tromey <tromey@redhat.com>
1896 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1899 2013-11-08 Tom Tromey <tromey@redhat.com>
1901 * configure, config.in: Rebuild.
1902 * configure.ac: Remove unused configury.
1904 2013-11-08 Tom Tromey <tromey@redhat.com>
1906 * acinclude.m4: Include common.m4, codeset.m4.
1907 * configure, config.in: Rebuild.
1908 * configure.ac: Use GDB_AC_COMMON.
1910 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1912 * linux-s390-low.c (HWCAP_S390_TE): New define.
1913 (s390_arch_setup): Consider the TE field in the HWCAP for
1914 determining 'have_regset_tdb'.
1916 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1919 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1922 2013-10-02 Pedro Alves <palves@redhat.com>
1924 * server.c (process_serial_event): Don't output "GDBserver
1925 exiting" if GDB is connected through stdio.
1926 * target.c (mywait): Likewise, be silent if GDB is connected
1929 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1931 * lynx-low.c (lynx_add_threads_after_attach): New function.
1932 (lynx_attach): Remove call to add_thread. Add call to
1933 lynx_add_threads_after_attach instead.
1935 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1937 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1938 * config.in, configure: Regenerated.
1940 2013-09-18 Yao Qi <yao@codesourcery.com>
1943 * server.c (start_inferior): Clear 'resume_info'.
1945 2013-09-16 Jiong Wang <jiwang@tilera.com>
1947 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1950 2013-09-16 Jiong Wang <jiwang@tilera.com>
1952 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1953 linux-tile-low.o to srv_tgtobj.
1955 2013-09-16 Will Newton <will.newton@linaro.org>
1957 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1960 2013-09-06 Pedro Alves <palves@redhat.com>
1962 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1963 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1964 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1965 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1966 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1967 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1969 2013-09-06 Pedro Alves <palves@redhat.com>
1971 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1972 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1974 2013-09-06 Pedro Alves <palves@redhat.com>
1976 * linux-amd64-ipa.c: Include tracepoint.h.
1977 * linux-i386-ipa.c: Include tracepoint.h.
1979 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1981 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1982 (ps_get_thread_area): New function.
1984 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1986 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1987 (initialize_low_arch): Call init_registers_crisv32 rather than
1988 init_register_crisv32.
1990 2013-09-05 Pedro Alves <palves@redhat.com>
1992 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1994 * hostio.h: ... this new file.
1995 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1996 win32-low.c: Include hostio.h.
1998 2013-09-05 Pedro Alves <palves@redhat.com>
2000 * server.h (gdb_client_data, handler_func, callback_handler_func)
2001 (delete_file_handler, add_file_handler, append_callback_event)
2002 (delete_callback_event, start_event_loop, initialize_event_loop):
2003 Move to event-loop.h and include it.
2004 * event-loop.h: New file.
2006 2013-09-05 Pedro Alves <palves@redhat.com>
2008 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2009 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2010 (loaded_dll, unloaded_dll): Move to ...
2011 * dll.h: ... this new file.
2012 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2014 2013-09-05 Pedro Alves <palves@redhat.com>
2016 * server.h (current_process, get_thread_process, all_processes)
2017 (add_inferior_to_list, for_each_inferior, current_inferior)
2018 (remove_inferior, add_process, remove_process, find_process_pid)
2019 (have_started_inferiors_p, have_attached_inferiors_p)
2020 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2021 (clear_inferiors, find_inferior, find_inferior_id)
2022 (inferior_target_data, set_inferior_target_data)
2023 (inferior_regcache_data, set_inferior_regcache_data): Move to
2024 inferiors.h, and include it.
2025 * inferiors.h: New file.
2027 2013-09-05 Pedro Alves <palves@redhat.com>
2029 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2033 2013-09-05 Pedro Alves <palves@redhat.com>
2035 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2037 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2038 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2039 (handle_tracepoint_general_set, handle_tracepoint_query)
2040 (tracepoint_finished_step, tracepoint_was_hit)
2041 (release_while_stepping_state_list, current_traceframe)
2042 (in_readonly_region, traceframe_read_mem)
2043 (fetch_traceframe_registers, traceframe_read_sdata)
2044 (traceframe_read_info, struct fast_tpoint_collect_status)
2045 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2046 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2047 (supply_fast_tracepoint_registers)
2048 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2049 (ipa_tdesc, claim_trampoline_space)
2050 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2051 (agent_mem_read, agent_get_trace_state_variable_value)
2052 (agent_set_trace_state_variable_value, agent_tsv_read)
2053 (agent_mem_read_string, get_raw_reg_func_addr)
2054 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2055 * tracepoint.h: ... this new file.
2057 2013-09-05 Pedro Alves <palves@redhat.com>
2059 * server.h (perror_with_name, error, fatal, warning, paddress)
2060 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2062 * utils.h: New file.
2064 2013-09-05 Pedro Alves <palves@redhat.com>
2066 * server.h (remote_debug, noack_mode, transport_is_reliable)
2067 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2068 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2069 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2070 (write_enn, initialize_async_io, enable_async_io)
2071 (disable_async_io, check_remote_input_interrupt_request)
2072 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2073 (dead_thread_notify, prepare_resume_reply)
2074 (decode_address_to_semicolon, decode_address, decode_m_packet)
2075 (decode_M_packet, decode_X_packet, decode_xfer_write)
2076 (decode_search_memory_packet, unhexify, hexify)
2077 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2078 (look_up_one_symbol, relocate_instruction)
2079 (monitor_output): Move to remote-utils.h, and include it.
2080 * remote-utils.h: New file.
2082 2013-09-05 Pedro Alves <palves@redhat.com>
2084 * server.h (_): Delete.
2086 2013-09-02 Pedro Alves <palves@redhat.com>
2088 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2089 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2091 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2093 2013-09-02 Pierre Muller <muller@sourceware.org>
2095 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2096 or WriteProcessMemory complete successfully and handle
2097 ERROR_PARTIAL_COPY error.
2099 2013-09-02 Pedro Alves <palves@redhat.com>
2101 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2102 error instead of EIO.
2104 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2107 * linux-low.c: Include filestuff.h.
2108 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2109 * lynx-low.c: Include filestuff.h.
2110 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2111 * server.c: Include filestuff.h.
2112 (main): Call notice_open_fds.
2113 * spu-low.c: Include filestuff.h.
2114 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2116 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2118 * Makefile.in: Explain why ../target and ../nat are not
2119 listed as include file search paths.
2120 (linux-waitpid.o): New object file rule.
2121 * configure.srv (srv_native_linux_obj): New variable.
2122 Replace all occurrences of linux native object files with
2123 $srv_native_linux_obj.
2124 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2125 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2126 (linux_enable_event_reporting): Remove declaration.
2127 (my_waitpid): Moved to common/linux-waitpid.c.
2128 (linux_wait_for_event): Pass ptid when calling
2129 linux_enable_event_reporting.
2130 (linux_supports_tracefork_flag): Remove.
2131 (linux_enable_event_reporting): Likewise.
2132 (linux_tracefork_grandchild): Remove.
2133 (STACK_SIZE): Moved to common/linux-ptrace.c.
2134 (linux_tracefork_child): Remove.
2135 (linux_test_for_tracefork): Remove.
2136 (linux_look_up_symbols): Call linux_supports_traceclone.
2137 (initialize_low): Remove call to linux_test_for_tracefork.
2138 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2139 common/linux-ptrace.h.
2140 (PTRACE_TYPE_ARG4): Likewise.
2141 Include linux-ptrace.h.
2143 2013-08-21 Pedro Alves <palves@redhat.com>
2145 * config.in: Renegerate.
2147 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2149 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2150 (SFILES): Remove $(srcdir)/common/target-common.c and
2151 add $(srcdir)/target/waitstatus.c.
2152 (OBS): Remove target-common.o and add waitstatus.o.
2153 (server_h): Remove $(srcdir)/../common/target-common.h and
2154 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2155 and $(srcdir)/../target/waitstatus.h.
2156 (target-common.o): Remove.
2157 (waitstatus.o): New target object file.
2158 * target.h: Do not include target-common.h and
2159 include target/resume.h, target/wait.h and
2160 target/waitstatus.h.
2162 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2164 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2165 to PTRACE_TYPE_ARG3.
2166 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2167 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2169 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2170 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2172 2013-07-27 Jie Zhang <jie@codesourcery.com>
2173 Daniel Jacobowitz <dan@codesourcery.com>
2174 Yao Qi <yao@codesourcery.com>
2176 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2177 (mips-linux-watch.o): New rule.
2178 (mips_linux_watch_h): New variable.
2179 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2181 * linux-mips-low.c: Include mips-linux-watch.h.
2182 (struct arch_process_info, struct arch_lwp_info): New.
2183 (update_watch_registers_callback): New function.
2184 (mips_linux_new_process, mips_linux_new_thread) New functions.
2185 (mips_linux_prepare_to_resume, mips_insert_point): New
2187 (mips_remove_point, mips_stopped_by_watchpoint): New
2189 (rsp_bp_type_to_target_hw_bp_type): New function.
2190 (mips_stopped_data_address): New function.
2191 (the_low_target): Add watchpoint support functions.
2193 2013-07-27 Yao Qi <yao@codesourcery.com>
2195 * i386-low.c: Include break-common.h.
2196 (enum target_hw_bp_type): Remove.
2198 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2200 * Makefile.in (SFILES): /common/target-common.c.
2201 (OBS): Add target-common.o.
2202 (server_h): Add $(srcdir)/../common/target-common.h.
2203 (target-common.o): New target.
2204 * server.c (queue_stop_reply_callback): Free
2205 status string after use.
2206 * target.c (target_waitstatus_to_string): Remove.
2207 * target.h: Include target-common.h.
2208 (resume_kind): Likewise.
2209 (target_waitkind): Likewise.
2210 (target_waitstatus): Likewise.
2211 (TARGET_WNOHANG): Likewise.
2213 2013-07-04 Yao Qi <yao@codesourcery.com>
2215 * Makefile.in (host_alias): Use @host_noncanonical@.
2216 (target_alias): Use @target_noncanonical@.
2217 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2218 ACX_NONCANONICAL_HOST.
2219 * configure: Regenerated.
2222 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2224 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2225 * configure: Rebuild.
2226 * Makefile.in (version_host, version_target): Get from configure.
2227 (version.c): Use $(version_host) and $(version_target).
2229 2013-07-03 Pedro Alves <palves@redhat.com>
2231 * Makefile.in (config.status): Depend on development.sh.
2232 * acinclude.m4: Include libmcheck.m4.
2233 * configure: Regenerate.
2235 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2237 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2238 attribute inside the parentheses.
2239 (winapi_DebugSetProcessKillOnExit): Ditto.
2240 (winapi_DebugBreakProcess): Ditto.
2241 (winapi_GenerateConsoleCtrlEvent): Ditto.
2243 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2245 * notif.h (notif_event): Add a dummy member to avoid compiler
2248 2013-07-01 Pedro Alves <palves@redhat.com>
2250 * hostio.c (HOSTIO_PATH_MAX): Define.
2251 (require_filename, handle_open, handle_unlink, handle_readlink):
2254 2013-07-01 Pedro Alves <palves@redhat.com>
2256 * server.h: Include "pathmax.h".
2257 * linux-low.c: Don't include sys/param.h.
2258 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2260 * win32-low.c: Don't include sys/param.h.
2261 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2263 2013-07-01 Pedro Alves <palves@redhat.com>
2265 * event-loop.c: Don't check HAVE_UNISTD_H before including
2267 * gdbreplay.c: Likewise.
2268 * remote-utils.c: Likewise.
2269 * server.c: Likewise.
2270 * configure.ac: Don't check for unistd.h.
2271 * configure: Regenerate.
2273 2013-06-28 Tom Tromey <tromey@redhat.com>
2275 * Makefile.in (version.c): Use version.in, not
2278 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2280 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2281 * configure: Rebuild.
2282 * Makefile.in (version_host, version_target): Get from configure.
2283 (version.c): Use $(version_host) and $(version_target).
2285 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2287 Fix trace-status to output user name without trailing colon.
2288 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2290 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2292 Fix trace-status to output proper start-time and stop-time.
2293 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2294 output start time and stop time in hex as gdb expects.
2296 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2298 * tracepoint.c (build_traceframe_info_xml): Output trace state
2299 variables present in the trace buffer.
2301 2013-06-24 Tom Tromey <tromey@redhat.com>
2303 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2305 (version.o): Remove.
2306 * gdbreplay.c: Include version.h.
2307 (version, host_name): Don't declare.
2308 * server.h: Include version.h.
2309 (version, host_name): Don't declare.
2311 2013-06-12 Pedro Alves <palves@redhat.com>
2313 * linux-x86-low.c (linux_is_elf64): Delete global.
2314 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2315 with local linux_pid_exe_is_elf_64_file use.
2317 2013-06-11 Pedro Alves <palves@redhat.com>
2319 * linux-low.c (regset_disabled, disable_regset): New functions.
2320 (regsets_fetch_inferior_registers)
2321 (regsets_store_inferior_registers): Use them.
2322 (initialize_regsets_info); Don't allocate the disabled_regsets
2324 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2327 2013-06-11 Pedro Alves <palves@redhat.com>
2329 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2332 2013-06-11 Pedro Alves <palves@redhat.com>
2334 * linux-x86-low.c (initialize_low_arch): Call
2335 init_registers_x32_avx_linux.
2337 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2339 Fix compatibility with Android Bionic.
2340 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2343 2013-06-07 Pedro Alves <palves@redhat.com>
2346 * Makefile.in (OBS): Add tdesc.o.
2347 (IPA_OBJS): Add tdesc-ipa.o.
2348 (tdesc-ipa.o): New rule.
2349 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2351 * linux-low.c (new_inferior): Delete.
2352 (disabled_regsets, num_regsets): Delete.
2353 (linux_add_process): Adjust to set the new per-process
2355 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2356 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2357 was a stop. When calling arch_setup, switch the current inferior
2358 to the thread that got an event.
2359 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2360 (regsets_fetch_inferior_registers)
2361 (regsets_store_inferior_registers): New regsets_info parameter.
2363 (linux_register_in_regsets): New regs_info parameter. Adjust to
2365 (register_addr, fetch_register, store_register): New usrregs_info
2366 parameter. Adjust to use it.
2367 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2368 parameter regs_info. Adjust to use it.
2369 (linux_fetch_registers): Get the current inferior's regs_info, and
2371 (linux_store_registers): Ditto.
2372 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2373 (initialize_low): Don't initialize the target_regsets here. Call
2374 initialize_low_arch.
2375 * linux-low.h (target_regsets): Delete declaration.
2376 (struct regsets_info): New.
2377 (struct usrregs_info): New.
2378 (struct regs_info): New.
2379 (struct process_info_private) <new_inferior>: New field.
2380 (struct linux_target_ops): Delete the num_regs, regmap, and
2381 regset_bitmap fields. New field regs_info.
2382 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2383 * i387-fp.c (num_xmm_registers): Delete.
2384 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2385 calls to new interface.
2386 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2387 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2388 Infer the number of xmm registers from the regcache's target
2390 * i387-fp.h (num_xmm_registers): Delete.
2391 * inferiors.c (add_thread): Don't install the thread's regcache
2393 * proc-service.c (gregset_info): Fetch the current inferior's
2394 regs_info. Adjust to use it.
2395 * regcache.c: Include tdesc.h.
2396 (register_bytes, reg_defs, num_registers)
2397 (gdbserver_expedite_regs): Delete.
2398 (get_thread_regcache): If the thread doesn't have a regcache yet,
2399 create one, instead of aborting gdbserver.
2400 (regcache_invalidate_one): Rename to ...
2401 (regcache_invalidate_thread): ... this.
2402 (regcache_invalidate_one): New.
2403 (regcache_invalidate): Only invalidate registers of the current
2405 (init_register_cache): Add target_desc parameter, and use it.
2406 (new_register_cache): Ditto. Assert the target description has a
2407 non zero registers_size.
2408 (regcache_cpy): Add assertions. Adjust.
2409 (realloc_register_cache, set_register_cache): Delete.
2410 (registers_to_string, registers_from_string): Adjust.
2411 (find_register_by_name, find_regno, find_register_by_number)
2412 (register_cache_size): Add target_desc parameter, and use it.
2413 (free_register_cache_thread, free_register_cache_thread_one)
2414 (regcache_release, register_cache_size): New.
2415 (register_size): Add target_desc parameter, and use it.
2416 (register_data, supply_register, supply_register_zeroed)
2417 (supply_regblock, supply_register_by_name, collect_register)
2418 (collect_register_as_string, collect_register_by_name): Adjust.
2419 * regcache.h (struct target_desc): Forward declare.
2420 (struct regcache) <tdesc>: New field.
2421 (init_register_cache, new_register_cache): Add target_desc
2423 (regcache_invalidate_thread): Declare.
2424 (regcache_invalidate_one): Delete declaration.
2425 (regcache_release): Declare.
2426 (find_register_by_number, register_cache_size, register_size)
2427 (find_regno): Add target_desc parameter.
2428 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2430 * remote-utils.c: Include tdesc.h.
2431 (outreg, prepare_resume_reply): Adjust.
2432 * server.c: Include tdesc.h.
2433 (gdbserver_xmltarget): Delete declaration.
2434 (get_features_xml, process_serial_event): Adjust.
2435 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2437 (struct process_info) <tdesc>: New field.
2438 (ipa_tdesc): Declare.
2439 * tdesc.c: New file.
2440 * tdesc.h: New file.
2441 * tracepoint.c: Include tdesc.h.
2442 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2443 (get_context_regcache): Adjust to pass ipa_tdesc down.
2444 (do_action_at_tracepoint): Adjust to get the register cache size
2445 from the context regcache's description.
2446 (traceframe_walk_blocks): Adjust to get the register cache size
2447 from the current trace frame's description.
2448 (traceframe_get_pc): Adjust to get current trace frame's
2449 description and pass it down.
2450 (gdb_collect): Adjust to get the register cache size from the
2452 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2453 (gdbserver_xmltarget): Delete.
2454 (initialize_low_tracepoint): Set the ipa's target description.
2455 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2456 (initialize_low_tracepoint): Set the ipa's target description.
2457 * linux-x86-low.c: Include tdesc.h.
2458 [__x86_64__] (is_64bit_tdesc): New.
2459 (ps_get_thread_area, x86_get_thread_area): Use it.
2460 (i386_cannot_store_register): Rename to ...
2461 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2462 (i386_cannot_fetch_register): Rename to ...
2463 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2464 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2466 (target_regsets): Rename to ...
2467 (x86_regsets): ... this.
2468 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2470 (x86_siginfo_fixup): Use is_64bit_tdesc.
2471 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2472 (tdesc_x32_avx_linux, tdesc_x32_linux)
2473 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2475 (x86_linux_update_xmltarget): Delete.
2476 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2477 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2478 (AMD64_LINUX_USER64_CS): New.
2479 (x86_linux_read_description): New, based on
2480 x86_linux_update_xmltarget.
2481 (same_process_callback): New.
2482 (x86_arch_setup_process_callback): New.
2483 (x86_linux_update_xmltarget): New.
2484 (x86_regsets_info): New.
2485 (amd64_linux_regs_info): New.
2486 (i386_linux_usrregs_info): New.
2487 (i386_linux_regs_info): New.
2488 (x86_linux_regs_info): New.
2489 (x86_arch_setup): Reimplement.
2490 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2491 (x86_emit_ops): Ditto.
2492 (the_low_target): Adjust. Install x86_linux_regs_info,
2493 x86_cannot_fetch_register, and x86_cannot_store_register.
2494 (initialize_low_arch): New.
2495 * linux-ia64-low.c (tdesc_ia64): Declare.
2496 (ia64_fetch_register): Adjust.
2497 (ia64_usrregs_info, regs_info): New globals.
2498 (ia64_regs_info): New function.
2499 (the_low_target): Adjust.
2500 (initialize_low_arch): New function.
2501 * linux-sparc-low.c (tdesc_sparc64): Declare.
2502 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2504 (sparc_arch_setup): New function.
2505 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2506 (the_low_target): Adjust.
2507 (initialize_low_arch): New function.
2508 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2509 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2510 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2511 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2512 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2513 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2514 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2515 (tdesc_powerpc_isa205_vsx64l): Declare.
2516 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2517 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2518 (ppc_set_pc, ppc_get_hwcap): Adjust.
2519 (ppc_usrregs_info): Forward declare.
2520 (!__powerpc64__) ppc_regmap_adjusted: New global.
2521 (ppc_arch_setup): Adjust to the current process'es target
2523 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2524 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2525 (ppc_store_evrregset): Adjust.
2526 (target_regsets): Rename to ...
2527 (ppc_regsets): ... this, and make static.
2528 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2529 (ppc_regs_info): New function.
2530 (the_low_target): Adjust.
2531 (initialize_low_arch): New function.
2532 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2533 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2534 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2535 (tdesc_s390x_linux64v2): Declare.
2536 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2537 (s390_fill_gregset, s390_store_last_break): Adjust.
2538 (target_regsets): Rename to ...
2539 (s390_regsets): ... this, and make static.
2540 (s390_get_pc, s390_set_pc): Adjust.
2541 (s390_get_hwcap): New target_desc parameter, and use it.
2542 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2543 (s390_arch_setup): Adjust to set the current process'es target
2544 description. Don't adjust the regmap.
2545 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2546 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2547 (regs_info_3264): New globals.
2548 (s390_regs_info): New function.
2549 (the_low_target): Adjust.
2550 (initialize_low_arch): New function.
2551 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2552 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2553 [__mips64] (init_registers_mips_linux)
2554 (init_registers_mips_dsp_linux): Delete defines.
2555 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2556 (have_dsp): New global.
2557 (mips_read_description): New, based on mips_arch_setup.
2558 (mips_arch_setup): Reimplement.
2559 (get_usrregs_info): New function.
2560 (mips_cannot_fetch_register, mips_cannot_store_register)
2561 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2562 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2563 (target_regsets): Rename to ...
2564 (mips_regsets): ... this, and make static.
2565 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2566 (dsp_regs_info, regs_info): New globals.
2567 (mips_regs_info): New function.
2568 (the_low_target): Adjust.
2569 (initialize_low_arch): New function.
2570 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2571 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2573 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2574 (arm_read_description): New, with bits factored from
2576 (arm_arch_setup): Reimplement.
2577 (target_regsets): Rename to ...
2578 (arm_regsets): ... this, and make static.
2579 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2580 (arm_regs_info): New function.
2581 (the_low_target): Adjust.
2582 (initialize_low_arch): New function.
2583 * linux-m68k-low.c (tdesc_m68k): Declare.
2584 (target_regsets): Rename to ...
2585 (m68k_regsets): ... this, and make static.
2586 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2587 (m68k_regs_info): New function.
2588 (m68k_arch_setup): New function.
2589 (the_low_target): Adjust.
2590 (initialize_low_arch): New function.
2591 * linux-sh-low.c (tdesc_sharch): Declare.
2592 (target_regsets): Rename to ...
2593 (sh_regsets): ... this, and make static.
2594 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2595 (sh_regs_info, sh_arch_setup): New functions.
2596 (the_low_target): Adjust.
2597 (initialize_low_arch): New function.
2598 * linux-bfin-low.c (tdesc_bfin): Declare.
2599 (bfin_arch_setup): New function.
2600 (bfin_usrregs_info, regs_info): New globals.
2601 (bfin_regs_info): New function.
2602 (the_low_target): Adjust.
2603 (initialize_low_arch): New function.
2604 * linux-cris-low.c (tdesc_cris): Declare.
2605 (cris_arch_setup): New function.
2606 (cris_usrregs_info, regs_info): New globals.
2607 (cris_regs_info): New function.
2608 (the_low_target): Adjust.
2609 (initialize_low_arch): New function.
2610 * linux-cris-low.c (tdesc_crisv32): Declare.
2611 (cris_arch_setup): New function.
2612 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2613 (cris_regs_info): New function.
2614 (the_low_target): Adjust.
2615 (initialize_low_arch): New function.
2616 * linux-m32r-low.c (tdesc_m32r): Declare.
2617 (m32r_arch_setup): New function.
2618 (m32r_usrregs_info, regs_info): New globals.
2619 (m32r_regs_info): Adjust.
2620 (initialize_low_arch): New function.
2621 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2622 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2623 (tic6x_usrregs_info): Forward declare.
2624 (tic6x_read_description): New function, based on ...
2625 (tic6x_arch_setup): ... this. Reimplement.
2626 (target_regsets): Rename to ...
2627 (tic6x_regsets): ... this, and make static.
2628 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2629 (tic6x_regs_info): New function.
2630 (the_low_target): Adjust.
2631 (initialize_low_arch): New function.
2632 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2633 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2634 (target_regsets): Rename to ...
2635 (xtensa_regsets): ... this, and make static.
2636 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2638 (xtensa_arch_setup, xtensa_regs_info): New functions.
2639 (the_low_target): Adjust.
2640 (initialize_low_arch): New function.
2641 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2642 (nios2_arch_setup): Set the current process'es tdesc.
2643 (target_regsets): Rename to ...
2644 (nios2_regsets): ... this.
2645 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2646 (nios2_regs_info): New function.
2647 (the_low_target): Adjust.
2648 (initialize_low_arch): New function.
2649 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2650 (aarch64_arch_setup): Set the current process'es tdesc.
2651 (target_regsets): Rename to ...
2652 (aarch64_regsets): ... this.
2653 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2654 (aarch64_regs_info): New function.
2655 (the_low_target): Adjust.
2656 (initialize_low_arch): New function.
2657 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2659 (target_regsets): Rename to ...
2660 (tile_regsets): ... this.
2661 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2662 (tile_regs_info): New function.
2663 (tile_arch_setup): Set the current process'es tdesc.
2664 (the_low_target): Adjust.
2665 (initialize_low_arch): New function.
2666 * spu-low.c (tdesc_spu): Declare.
2667 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2668 * win32-arm-low.c (tdesc_arm): Declare.
2669 (arm_arch_setup): New function.
2670 (the_low_target): Install arm_arch_setup instead of
2672 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2673 (init_windows_x86): Rename to ...
2674 (i386_arch_setup): ... this. Set `win32_tdesc'.
2675 (the_low_target): Adjust.
2676 * win32-low.c (win32_tdesc): New global.
2677 (child_add_thread): Don't create the thread cache here.
2678 (do_initial_child_stuff): Set the new process'es tdesc.
2679 * win32-low.h (struct target_desc): Forward declare.
2680 (win32_tdesc): Declare.
2681 * lynx-i386-low.c (tdesc_i386): Declare global.
2682 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2683 * lynx-low.c (lynx_tdesc): New global.
2684 (lynx_add_process): Set the new process'es tdesc.
2685 * lynx-low.h (struct target_desc): Forward declare.
2686 (lynx_tdesc): Declare global.
2687 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2688 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2689 * nto-low.c (nto_tdesc): New global.
2690 (do_attach): Set the new process'es tdesc.
2691 * nto-low.h (struct target_desc): Forward declare.
2692 (nto_tdesc): Declare.
2693 * nto-x86-low.c (tdesc_i386): Declare.
2694 (nto_x86_arch_setup): Set `nto_tdesc'.
2696 2013-06-04 Gary Benson <gbenson@redhat.com>
2698 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2699 to qSupported response when appropriate.
2700 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2701 with nonzero-length annex.
2702 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2703 arguments supplied in annex.
2705 2013-05-31 Doug Evans <dje@google.com>
2708 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2709 64 bits in 64-cross-32 environment.
2711 2013-05-28 Pedro Alves <palves@redhat.com>
2713 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2714 (aarch64-without-fpu.c): Delete rule.
2715 * configure.srv (aarch64*-*-linux*): Remove references to
2716 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2717 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2720 2013-05-24 Pedro Alves <palves@redhat.com>
2722 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2723 instead of strchr/decode_address. Error if the range isn't split
2724 with a ','. Don't assume there's be a ':' in the action.
2726 2013-05-23 Yao Qi <yao@codesourcery.com>
2727 Pedro Alves <palves@redhat.com>
2729 * linux-low.c (lwp_in_step_range): New function.
2730 (linux_wait_1): If the thread was range stepping and stopped
2731 outside the stepping range, report the stop to GDB. Otherwise,
2732 continue stepping. Add range stepping debug output.
2733 (linux_set_resume_request): Copy the step range from the resume
2735 (linux_supports_range_stepping): New.
2736 (linux_target_ops) <supports_range_stepping>: Set to
2737 linux_supports_range_stepping.
2738 * linux-low.h (struct linux_target_ops)
2739 <supports_range_stepping>: New field.
2740 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2741 * linux-x86-low.c (x86_supports_range_stepping): New.
2742 (the_low_target) <supports_range_stepping>: Set to
2743 x86_supports_range_stepping.
2744 * server.c (handle_v_cont): Handle 'r' action.
2745 (handle_v_requests): Append ";r" if the target supports range
2747 * target.h (struct thread_resume) <step_range_start,
2748 step_range_end>: New fields.
2749 (struct target_ops) <supports_range_stepping>:
2751 (target_supports_range_stepping): New macro.
2753 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2755 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2756 confusion in comment.
2758 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2760 * lynx-low.c (struct process_info_private): New type.
2761 (lynx_add_process): New function.
2762 (lynx_create_inferior, lynx_attach): Replace calls to
2763 add_process by calls to lynx_add_process.
2764 (lynx_resume): If PTID is null, then try using
2765 current_process()->private->last_wait_event_ptid.
2767 (lynx_clear_inferiors): Delete. The contents of that function
2768 has been inlined in lynx_mourn;
2769 (lynx_wait_1): Save the ptid in the process's private data.
2770 (lynx_mourn): Free the process' private data. Replace call
2771 to lynx_clear_inferiors by call to clear_inferiors.
2773 2013-05-17 Yao Qi <yao@codesourcery.com>
2775 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2778 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2780 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2781 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2782 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2783 PT_TEXT_END_ADDR guards. Update comments.
2784 (linux_target_op) <read_offsets>: Conditionally define to
2785 linux_read_offsets if the target is UCLIBC and if it defines
2786 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2788 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2789 Andrew Jenner <andrew@codesourcery.com>
2791 * Makefile.in (SFILES): Add linux-nios2-low.c.
2792 (clean): Add action to delete nios2-linux.c.
2793 (nios2-linux.c): New rule.
2794 * configure.srv: Add nios2*-*-linux*.
2795 * linux-nios2-low.c: New.
2797 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2799 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2801 2013-04-25 Hui Zhu <hui@codesourcery.com>
2804 * ax.c (ax_printf): Add fflush.
2806 2013-04-22 Tom Tromey <tromey@redhat.com>
2808 * Makefile.in (SFILES): Add filestuff.c.
2809 (OBS): Add filestuff.o.
2810 (filestuff.o): New target.
2811 * config.in, configure: Rebuild.
2812 * configure.ac: Check for fdwalk, pipe2.
2814 2013-04-17 Pedro Alves <palves@redhat.com>
2816 * configure.ac (USE_THREAD_DB): Delete variable.
2817 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2818 Don't AC_SUBST USE_THREAD_DB.
2819 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2820 * config.in, configure: Regenerate.
2822 2013-04-16 Pedro Alves <palves@redhat.com>
2824 * linux-low.h (struct lwp_info) <thread_known>: Move under
2825 the USE_THREAD_DB #ifdef.
2827 2013-04-16 Pedro Alves <palves@redhat.com>
2829 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2830 (linux-low.o): Delete rule.
2831 * linux-low.h: Always include "gdb_thread_db.h" instead of
2832 conditionally including thread_db.h.
2833 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2836 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2838 * Makefile.in (install-only): Fix make install regression.
2840 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2842 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2843 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2845 * gdbserver.1: Remove.
2847 2013-03-22 Pedro Alves <palves@redhat.com>
2849 * linux-low.c (handle_extended_wait): Don't call
2850 linux_enable_event_reporting.
2852 2013-03-15 Tony Theodore <tonyt@logyst.com>
2855 * Makefile.in (SHELL): Use @SHELL@.
2857 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2859 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2862 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2864 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2865 Remove extraneous NULL element.
2867 2013-03-13 Yao Qi <yao@codesourcery.com>
2869 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2870 'V' block in trace frame.
2872 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2874 * target.h (struct target_ops): Add btrace ops.
2875 (target_supports_btrace): New macro.
2876 (target_enable_btrace): New macro.
2877 (target_disable_btrace): New macro.
2878 (target_read_btrace): New macro.
2879 * gdbthread.h (struct thread_info): Add btrace field.
2880 * server.c: Include btrace-common.h.
2881 (handle_btrace_general_set): New function.
2882 (handle_btrace_enable): New function.
2883 (handle_btrace_disable): New function.
2884 (handle_general_set): Call handle_btrace_general_set.
2885 (handle_qxfer_btrace): New function.
2886 (struct qxfer qxfer_packets[]): Add btrace entry.
2887 * inferiors.c (remove_thread): Disable btrace.
2888 * linux-low: Include linux-btrace.h.
2889 (linux_low_enable_btrace): New function.
2890 (linux_low_read_btrace): New function.
2891 (linux_target_ops): Add btrace ops.
2892 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2893 Add srv_linux_btrace=yes.
2894 (x86_64-*-linux*): Add linux-btrace.o.
2895 Add srv_linux_btrace=yes.
2896 * configure.ac: Define HAVE_LINUX_BTRACE.
2897 * config.in: Regenerated.
2898 * configure: Regenerated.
2900 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2902 * server.c (handle_qxfer): Preserve error message if -3 is
2904 (qxfer): Document the -3 return value.
2906 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2908 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2909 (linux_btrace_h): New variable.
2910 (linux-btrace.o): New rule.
2912 2013-03-08 Stan Shebs <stan@codesourcery.com>
2913 Hafiz Abid Qadeer <abidh@codesourcery.com>
2915 * tracepoint.c (trace_buffer_size): New global.
2916 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2917 (init_trace_buffer): Change to one-argument function. Allocate
2918 trace buffer memory.
2919 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2920 handle QTBuffer:size packet.
2921 (cmd_bigqtbuffer_size): New function.
2922 (initialize_tracepoint): Call init_trace_buffer with
2923 DEFAULT_TRACE_BUFFER_SIZE.
2924 * server.c (handle_query): Add QTBuffer:size in the
2927 2013-03-07 Yao Qi <yao@codesourcery.com>
2929 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2930 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2932 (cmd_qtsp): Adjust condition. Do post increment.
2933 Set cur_action and cur_step_action back to 0.
2935 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2938 * linux-low.c (linux_write_memory): Return early success if LEN is
2941 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2943 * configure.srv: Add x86_64-*-cygwin* as target.
2945 2013-02-28 Tom Tromey <tromey@redhat.com>
2947 * configure.ac: Invoke AC_SYS_LARGEFILE.
2948 * configure, config.in: Rebuild.
2950 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2952 * win32-low.c: Throughout, fix format strings and casts of
2953 printf-like functions to avoid type related warnings on all
2955 (get_child_debug_event): Print dwDebugEventCode as hex since
2956 that's how it's usually documented.
2958 2013-02-28 Yao Qi <yao@codesourcery.com>
2960 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2963 2013-02-27 Jiong Wang <jiwang@tilera.com>
2965 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2966 (reg-tilegx32.c): New rule.
2967 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2968 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2969 different register info initializer according to elf class.
2970 (init_registers_tilgx32): New function. The tilegx32 register info
2972 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2973 (tile_store_gregset): Likewise.
2975 2013-02-27 Yao Qi <yao@codesourcery.com>
2977 * server.c (process_point_options): Print debug message when
2978 debug_threads is true.
2980 2013-02-26 Yao Qi <yao@codesourcery.com>
2982 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2984 2013-02-19 Pedro Alves <palves@redhat.com>
2985 Kai Tietz <ktietz@redhat.com>
2989 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2990 instead of strtoul to extract address from packet.
2991 (process_serial_event) <'z'>: Likewise.
2993 2013-02-18 Yao Qi <yao@codesourcery.com>
2995 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2997 2013-02-14 Pedro Alves <palves@redhat.com>
3001 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3002 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3004 2013-02-14 Pedro Alves <palves@redhat.com>
3006 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3008 2013-02-14 Pedro Alves <palves@redhat.com>
3010 * tracepoint.c (save_string): Delete.
3011 (add_tracepoint_action): Use savestring instead of save_string.
3013 2013-02-12 Pedro Alves <palves@redhat.com>
3015 * linux-xtensa-low.c: Ditto.
3016 * xtensa-xtregs.c: Ditto.
3018 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3020 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3023 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3025 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3026 aarch64_num_wp_regs and aarch64_num_bp_regs to
3027 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3029 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3031 * linux-aarch64-low.c (ps_get_thread_area): Replace
3032 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3034 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3035 Marcus Shawcroft <marcus.shawcroft@arm.com>
3036 Nigel Stephens <nigel.stephens@arm.com>
3037 Yufeng Zhang <yufeng.zhang@arm.com>
3039 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3040 (aarch64.c, aarch64-without-fpu.c): New targets.
3041 * configure.srv (aarch64*-*-linux*): New.
3042 * linux-aarch64-low.c: New file.
3044 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3046 * linux-low.c (handle_extended_wait, linux_create_inferior)
3047 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3048 (dequeue_one_deferred_signal, linux_resume_one_thread)
3049 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3050 (linux_tracefork_grandchild, linux_test_for_tracefork)
3051 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3052 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3053 where the argument is 0.
3055 2013-01-25 Yao Qi <yao@codesourcery.com>
3057 * event-loop.c: Include "queue.h".
3058 (gdb_event_p): New typedef.
3059 (struct gdb_event) <next_event>: Remove.
3060 (event_queue): Change to QUEUE(gdb_event_p).
3061 (async_queue_event): Remove.
3062 (gdb_event_xfree): New.
3063 (initialize_event_loop): New.
3064 (process_event): Use API from QUEUE.
3065 (wait_for_event): Likewise.
3066 * server.c (main): Call initialize_event_loop.
3067 * server.h (initialize_event_loop): Declare.
3069 2013-01-18 Yao Qi <yao@codesourcery.com>
3071 * ax.h (struct eval_agent_expr_context): New.
3072 (gdb_eval_agent_expr): Update declaration.
3073 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3074 TFRAME. Add new argument CTX.
3075 * server.h (struct eval_agent_expr_context): Declare.
3076 (agent_mem_read, agent_tsv_read): Update declaration.
3077 (agent_mem_read_string): Likewise.
3078 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3079 (add_traceframe_block): Add new argument TPOINT.
3080 Increase TPOINT->traceframe_usage.
3081 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3082 eval_tracepoint_agent_expr.
3083 (condition_true_at_tracepoint): Likewise.
3084 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3085 (agent_mem_read_string, agent_tsv_read): Likewise.
3087 2013-01-16 Yao Qi <yao@codesourcery.com>
3089 * linux-low.c (linux_resume_one_lwp): Don't check
3090 'lwp->bp_reinsert != 0'.
3092 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3093 Pedro Alves <palves@redhat.com>
3095 * lynx-low.c (ptrace_request_to_str): Define a temporary
3096 macro and use it to simplify this function's implementation.
3098 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3100 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3103 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3105 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3107 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3109 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3111 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3113 * lynx-low.c (lynx_resume): Use the resume_info parameter
3114 to determine the ptid for the lynx_ptrace call, unless
3115 it is equal to minus_one_ptid, in which case we use the
3116 ptid of the current_inferior.
3117 (lynx_wait_1): After having received a thread create/exit
3118 event, resume the inferior's execution using the signaling
3119 thread's ptid, rather than the old ptid.
3121 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3123 * lynx-low.c (lynx_resume): Delete variable ret.
3125 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3127 * gdbreplay.c (gdbreplay_version): Update copyright year.
3128 * server.c (gdbserver_version): Likewise.
3130 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3132 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3135 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3137 * lynx-low.c (ptrace_request_to_str): Add handling for
3140 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3142 * lynx-low.c (lynx_attach): Delete variable new_process.
3144 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3146 * lynx-low.c (lynx_create_inferior): Delete variable
3149 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3151 * lynx-low.c (ptrace_request_to_str): Do not handle
3152 PTRACE_GETTHREADLIST if this macro does not exist.
3154 2012-12-15 Yao Qi <yao@codesourcery.com>
3156 * Makefile.in (OBS): Add notif.o.
3157 * notif.c, notif.h: New.
3158 * server.c: Include "notif.h".
3159 (struct vstop_notif) <next>: Remove.
3161 (queue_stop_reply): Update.
3162 (push_event, send_next_stop_reply): Remove.
3163 (discard_queued_stop_replies): Update.
3164 (notif_stop): New variable.
3165 (handle_v_stopped): Remove.
3166 (handle_v_requests): Don't call handle_v_stopped. Call
3167 handle_ack_notif instead.
3168 (queue_stop_reply_callback): Call notif_event_enque instead
3169 of queue_stop_reply.
3170 (handle_status): Don't call send_next_stop_reply, call
3171 notif_write_event instead.
3172 (kill_inferior_callback): Likewise.
3173 (detach_or_kill_inferior_callback): Likewise.
3174 (main): Call initialize_notif.
3175 (process_serial_event): Call QUEUE_is_empty.
3176 (handle_target_event): Call notif_push instead of push event.
3177 * server.h (push_event): Remove declaration.
3179 2012-12-10 Tom Tromey <tromey@redhat.com>
3181 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3182 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3185 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3186 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3187 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3188 (amd64-linux-ipa.o, ax.o): Rewrite.
3189 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3190 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3191 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3192 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3193 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3194 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3195 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3196 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3197 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3198 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3199 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3200 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3201 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3202 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3203 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3204 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3205 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3206 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3207 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3208 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3209 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3210 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3211 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3212 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3213 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3214 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3215 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3216 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3217 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3218 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3219 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3220 (reg-tilegx.o): Remove.
3221 (all_object_files): New macro.
3222 Include .deps files.
3223 * aclocal.m4, configure: Rebuild.
3224 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3225 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3226 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3228 2012-12-05 Tom Tromey <tromey@redhat.com>
3231 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3233 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3235 * configure.ac: Check for linux/perf_event.h.
3236 * config.in: Regenerated.
3237 * configure: Regenerated.
3239 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3241 * hostio.c (handle_readlink): Decrease buffer size
3242 parameter passed to readlink by one byte.
3244 2012-11-26 Yao Qi <yao@codesourcery.com>
3246 * configure.ac (build_warnings): Append '-Wempty-body'.
3247 * configure: Regenerated.
3248 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3251 2012-11-15 Pierre Muller <muller@sourceware.org>
3253 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3254 * config.in: Regenerate.
3255 * configure: Regenerate.
3256 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3257 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3258 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3259 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3261 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3262 instead of <sys/wait.h> header.
3263 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3265 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3267 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3268 (various make rules): Remove -DGDBSERVER
3270 2012-11-09 Yao Qi <yao@codesourcery.com>
3272 * spu-low.c (current_ptid): Move it to ..
3273 * gdbthread.h: ... here. New.
3274 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3275 * server.c (myresume, process_serial_event): Likewise.
3276 * thread-db.c (thread_db_find_new_threads): Likewise.
3277 * tracepoint.c (run_inferior_command): Likewise.
3279 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3281 * server.c (handle_search_memory_1): Include access length in
3284 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3286 * linux-crisv32-low.c: Fix compile errors.
3288 2012-09-04 Yao Qi <yao@codesourcery.com>
3290 * tracepoint.c (cmd_qtsv): Adjust debug message.
3291 Don't check CUR_TPOINT.
3293 2012-08-28 Yao Qi <yao@codesourcery.com>
3295 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3296 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3297 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3298 Remove declarations of xmalloc, xreallloc, xstrdup and
3300 * Makefile.in (libiberty_h): New.
3301 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3302 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3304 2012-08-23 Yao Qi <yao@codesourcery.com>
3306 * server.h: Remove declaration of 'xsnprintf'.
3308 2012-08-22 Keith Seitz <keiths@redhat.com>
3310 * server.h: Include build-gnulib-gbserver/config.h.
3311 * gdbreplay.c: Likewise.
3313 2012-08-08 Doug Evans <dje@google.com>
3315 * Makefile.in (SFILES): Add gdb_vecs.c.
3316 (OBS): Add gdb_vecs.o.
3317 (gdb_vecs_h, host_defs_h): New variables.
3318 (thread-db.o): Add $(gdb_vecs_h) dependency.
3319 (gdb_vecs.o): New rule.
3320 * thread-db.c: #include "gdb_vecs.h".
3321 (thread_db_load_search): Use a vector to iterate over path elements.
3322 Handle text appearing after "$pdir".
3324 * configure.ac: Add check for strstr.
3325 * config.in: Regenerate.
3326 * configure: Regenerate.
3328 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3330 * hostio.c (handle_pread): If pread fails, fall back to attempting
3332 (handle_pwrite): Likewise for pwrite.
3334 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3336 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3337 between unsupported TYPE and unimplementable ADDR/LEN combination.
3338 (arm_insert_point): Act on new return value.
3340 2012-07-31 Pedro Alves <palves@redhat.com>
3342 * server.c (process_point_options): Only skip tokens if we find
3343 one that is unrecognized. Don't treat 'X' specially while
3344 skipping unrecognized tokens.
3346 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3348 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3349 to 4-byte-align HW breakpoint addresses for Thumb.
3351 2012-07-27 Yao Qi <yao@codesourcery.com>
3355 * server.h: Declare gdb_agent_about_to_close.
3356 * target.c (kill_inferior): Include "agent.h".
3357 New. Send command 'kill'.
3358 * target.h (kill_inferior): Removed macro.
3359 * tracepoint.c (gdb_agent_about_to_close): New.
3360 (gdb_agent_helper_thread): Handle command 'close'.
3361 Wait endlessly until the inferior stops.
3362 Install gdb_agent_remove_socket to atexit hook.
3363 (agent_socket_name): New static variable.
3364 (gdb_agent_socket_init): Replace local variable 'name' with
3365 'agent_socket_name'.
3366 (gdb_agent_remove_socket): New.
3368 2012-07-27 Yao Qi <yao@codesourcery.com>
3370 * server.c (process_point_options): Stop at 'X' when parsing.
3372 2012-07-19 Michael Eager <eager@eagercon.com>
3374 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3376 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3377 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3378 hardware breakpoint.
3380 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3382 * gdbserver/linux-low.c (initialize_low): Call
3383 linux_ptrace_init_warnings.
3385 2012-07-02 Doug Evans <dje@google.com>
3387 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3390 2012-07-02 Stan Shebs <stan@codesourcery.com>
3392 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3393 (ax.o): Add it to build rule.
3395 (OBS): Add format.o.
3396 (IPA_OBS): Add format.o.
3397 * server.c (handle_query): Claim support for breakpoint commands.
3398 (process_point_options): Add command case.
3399 (process_serial_event): Leave running if there are printfs in
3401 * mem-break.h (any_persistent_commands): Declare.
3402 (add_breakpoint_commands): Declare.
3403 (gdb_no_commands_at_breakpoint): Declare.
3404 (run_breakpoint_commands): Declare.
3405 * mem-break.c (struct point_command_list): New struct.
3406 (struct breakpoint): New field command_list.
3407 (any_persistent_commands): New function.
3408 (add_commands_to_breakpoint): New function.
3409 (add_breakpoint_commands): New function.
3410 (gdb_no_commands_at_breakpoint): New function.
3411 (run_breakpoint_commands): New function.
3412 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3414 * ax.c: Include format.h.
3415 (ax_printf): New function.
3416 (gdb_eval_agent_expr): Add printf opcode.
3418 2012-06-13 Yao Qi <yao@codesourcery.com>
3420 * server.c (start_inferior): Remove duplicated writes to fields
3421 'last_resume_kind' and 'last_status' of 'current_inferior'.
3423 2012-06-12 Yao Qi <yao@codesourcery.com>
3424 Pedro Alves <palves@redhat.com>
3426 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3428 * server.c (handle_v_cont): Extend comment.
3430 2012-06-11 Yao Qi <yao@codesourcery.com>
3432 * linux-low.c (linux_attach): Add 'static'.
3434 2012-06-06 Yao Qi <yao@codesourcery.com>
3436 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3438 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3440 Fix gcc -flto compilation warning.
3441 * server.c (main): Make variable multi_mode and attach volatile.
3443 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3445 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3446 if the platform doesn't know about it.
3448 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3450 * Makefile.in (SFILES): Add linux-tile-low.c.
3451 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3452 * configure.srv: Handle tilegx-*-linux*.
3453 * linux-tile-low.c: New file.
3455 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3457 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3459 2012-05-24 Pedro Alves <palves@redhat.com>
3463 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3465 2012-05-24 Pedro Alves <palves@redhat.com>
3469 Replace target_signal with gdb_signal throughout.
3471 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3473 * linux-low.c (linux_store_registers): Avoid the copying sequence
3474 when no data has been retrieved by ptrace.
3476 2012-05-22 Will Deacon <will.deacon@arm.com>
3478 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3479 Include asm/ptrace.h.
3480 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3483 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3485 * linux-low.c (linux_store_registers): Don't re-retrieve data
3486 with ptrace that has already been obtained from /proc. Always
3487 copy any data retrieved with ptrace to the buffer supplied.
3489 2012-05-11 Yao Qi <yao@codesourcery.com>
3490 Pedro Alves <palves@redhat.com>
3492 * linux-low.c (enum stopping_threads_kind): New.
3493 (stopping_threads): Change type to `enum stopping_threads_kind'.
3494 (handle_extended_wait): If stopping and suspending threads, leave
3495 the new_lwp suspended too.
3496 (linux_wait_for_event): Adjust.
3497 (stop_all_lwps): Set `stopping_threads' to
3498 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3499 whether we're suspending threads or just stopping them. Assert no
3502 2012-04-29 Yao Qi <yao@codesourcery.com>
3504 * server.h: Move some code to ...
3505 * gdbthread.h: ... here. New.
3506 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3507 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3508 (nto-low.o, win32-low.o): Likewise.
3509 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3510 * regcache.c, remote-utils.c, server.c: Likewise.
3511 * target.c, tracepoint.c, win32-low.c: Likewise.
3513 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3515 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3516 (PTRACE_ARG4_TYPE): Likewise.
3517 (PTRACE_XFER_TYPE): Likewise.
3518 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3519 ptrace to PTRACE_ARG3_TYPE.
3520 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3521 (PTRACE_ARG4_TYPE): Likewise.
3522 (PTRACE_XFER_TYPE): Likewise.
3523 (linux_detach_one_lwp): Cast fourth argument of
3524 ptrace to long then PTRACE_ARG4_TYPE.
3525 (regsets_fetch_inferior_registers): Cast third argument of
3526 ptrace to long then PTRACE_ARG3_TYPE.
3527 (regsets_store_inferior_registers): Likewise.
3529 2012-04-20 Pedro Alves <palves@redhat.com>
3531 * configure: Regenerate.
3533 2012-04-19 Pedro Alves <palves@redhat.com>
3535 * Makefile.in (GNULIB_BUILDDIR): New.
3536 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3537 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3538 (all, install-only, uninstall, clean-info, all-lib, clean): No
3539 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3540 (maintainer-clean realclean distclean): Use subdir_do.
3542 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3543 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3544 * acinclude.m4: Include acx_configure_dir.m4.
3545 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3546 calls. Call AC_PROG_RANLIB. Configure gnulib using
3549 (GNULIB_STDINT_H): Adjust.
3550 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3551 * gdbreplay.c: Include build-gnulib/config.h.
3552 * server.h: Likewise.
3553 * aclocal.m4: Regenerate.
3554 * config.in: Regenerate.
3555 * configure: Regenerate.
3557 2012-04-19 Pedro Alves <palves@redhat.com>
3559 * Makefile.in (LIBGNU, INCGNU): Adjust.
3560 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3561 (all, install-only, uninstall, clean-info, all-lib, clean)
3562 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3563 * configure.ac: Adjust AC_OUTPUT output.
3564 * aclocal.m4: Regenerate.
3565 * configure: Regenerate.
3567 2012-04-19 Pedro Alves <palves@redhat.com>
3569 * Makefile.in (generated_files): New.
3570 (server_h): Remove the explicit dependency on config.h, and depend
3571 on $generated_files.
3573 2012-04-19 Pedro Alves <palves@redhat.com>
3575 * Makefile.in (INCGNU): Add -Ignulib.
3577 2012-04-19 Pedro Alves <palves@redhat.com>
3579 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3580 (INCGNU): ... this, and spell out -I here.
3581 (GNULIB_LIB): Rename to ...
3583 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3585 2012-04-19 Pedro Alves <palves@redhat.com>
3587 * config.in: Regenerate.
3589 2012-04-19 Pedro Alves <palves@redhat.com>
3591 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3592 * server.h (memmem): Remove declaration.
3593 * config.in: Regenerate.
3594 * configure: Regenerate.
3596 2012-04-19 Yao Qi <yao@codesourcery.com>
3598 * Makefile.in (SFILES): Add common/vec.c.
3602 2012-04-19 Yao Qi <yao@codesourcery.com>
3604 * remote-utils.c (prepare_resume_reply): Replace with macro
3605 target_core_of_thread.
3606 * server.c (handle_qxfer_threads_proper): Likewise.
3607 * target.h (traget_core_of_thread): New macro.
3609 2012-04-18 Pedro Alves <palves@redhat.com>
3611 * aclocal.m4: Regenerate.
3612 * configure: Regenerate.
3614 2012-04-16 Yao Qi <yao@codesourcery.com>
3616 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3617 duplicated on address.
3619 2012-04-16 Yao Qi <yao@codesourcery.com>
3621 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3622 (struct tracepoint_action_ops) <send>: New field.
3623 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3624 (agent_expr_send, x_tracepoint_action_send): New.
3625 (l_tracepoint_action_send): New.
3626 (cmd_qtdp): Download and install tracepoint
3627 according to `use_agent'.
3628 (run_inferior_command): Add one more parameter `len'.
3630 (tracepoint_send_agent): New.
3631 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3633 2012-04-16 Yao Qi <yao@codesourcery.com>
3635 * tracepoint.c (download_tracepoints): Moved to ...
3636 (cmd_qtstart): ... here.
3638 2012-04-14 Yao Qi <yao@codesourcery.com>
3640 * tracepoint.c: Include inttypes.h.
3641 (struct collect_memory_action): Use sized types.
3642 (struct tracepoint): Likewise.
3643 (cmd_qtdp, stop_tracing): Update print specifiers.
3644 (cmd_qtp, response_tracepoint): Likewise.
3645 (collect_data_at_tracepoint): Likewise.
3646 (collect_data_at_step): Likewise.
3648 2012-04-14 Yao Qi <yao@codesourcery.com>
3650 Import gnulib module inttypes.
3651 * aclocal.m4, config.in, configure: Regenerated.
3653 2012-04-14 Yao Qi <yao@codesourcery.com>
3655 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3656 Makefile and config.status at last.
3658 2012-04-13 Yao Qi <yao@codesourcery.com>
3660 * tracepoint.c: Include stdint.h unconditionally.
3662 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3664 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3665 on BFD_HAVE_SYS_PROCFS_TYPE.
3666 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3667 * configure: Regenerate.
3668 * config.in: Likewise.
3670 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3672 * Makefile.in (clean): Also remove x32.c x32-linux.c
3673 x32-avx.c x32-avx-linux.c.
3674 (x32.o): New target.
3676 (x32-linux.o): Likewise.
3677 (x32-linux.c): Likewise.
3678 (x32-avx.o): Likewise.
3679 (x32-avx.c): Likewise.
3680 (x32-avx-linux.o): Likewise.
3681 (x32-avx-linux.c): Likewise.
3683 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3684 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3685 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3686 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3687 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3688 i386/x32-avx-linux.xml.
3690 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3691 (init_registers_x32_avx_linux): Likwise.
3692 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3693 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3695 2012-04-13 Pedro Alves <palves@redhat.com>
3697 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3698 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3699 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3700 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3703 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3705 * linux-x86-low.c (compat_x32_clock_t): New.
3706 (compat_x32_siginfo_t): Likewise.
3707 (compat_x32_siginfo_from_siginfo): Likewise.
3708 (siginfo_from_compat_x32_siginfo): Likewise.
3709 (linux_is_elf64): Likewise.
3710 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3711 and siginfo_from_compat_x32_siginfo for x32.
3712 (x86_arch_setup): Set linux_is_elf64.
3714 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3717 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3719 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3720 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3721 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3722 compatible with process.
3724 2012-04-12 Yao Qi <yao@codesourcery.com>
3726 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3727 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3728 (install-only, install-info, clean): Handle sub dir gnulib.
3729 (all-lib, am--refresh): New targets.
3730 (memmem.o): Remove target.
3731 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3732 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3733 (AC_REPLACE_FUNCS): Remove memmem.
3734 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3735 (AC_OUTPUT): Generate Makefile in gnulib/.
3736 * aclocal.m4, config.in, configure: Regenerated.
3738 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3740 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3742 2012-04-05 Pedro Alves <palves@redhat.com>
3744 -Werror=strict-aliasing
3746 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3749 2012-04-04 Pedro Alves <palves@redhat.com>
3751 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3752 (sparc_store_gregset_from_stack, sparc_store_gregset)
3753 (sparc_breakpoint_at): Fix formatting.
3755 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3757 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3759 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3760 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3761 * config.in: Regenerate.
3762 * configure: Likewise.
3764 2012-03-29 Pedro Alves <palves@redhat.com>
3766 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3767 Correct ptrace arguments.
3769 2012-03-28 Pedro Alves <palves@redhat.com>
3771 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3772 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3773 (IA64_FR1_REGNUM): New defines.
3774 (ia64_fetch_register): New.
3775 (the_low_target): Install it.
3776 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3778 * linux-low.c (linux_fetch_registers): Try the
3779 the_low_target.fetch_register hook first.
3781 * linux-arm-low.c (the_low_target): Adjust.
3782 * linux-bfin-low.c (the_low_target): Adjust.
3783 * linux-cris-low.c (the_low_target): Adjust.
3784 * linux-crisv32-low.c (the_low_target): Adjust.
3785 * linux-m32r-low.c (the_low_target): Adjust.
3786 * linux-m68k-low.c (the_low_target): Adjust.
3787 * linux-mips-low.c (the_low_target): Adjust.
3788 * linux-ppc-low.c (the_low_target): Adjust.
3789 * linux-s390-low.c (the_low_target): Adjust.
3790 * linux-sh-low.c (the_low_target): Adjust.
3791 * linux-sparc-low.c (the_low_target): Adjust.
3792 * linux-tic6x-low.c (the_low_target): Adjust.
3793 * linux-x86-low.c (the_low_target): Adjust.
3794 * linux-xtensa-low.c (the_low_target): Adjust.
3796 2012-03-26 Pedro Alves <palves@redhat.com>
3798 * server.c (handle_qxfer_libraries): Don't bail early if
3799 the_target->qxfer_libraries_svr4 is not NULL.
3801 2012-03-26 Pedro Alves <palves@redhat.com>
3803 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3805 2012-03-23 Pedro Alves <palves@redhat.com>
3807 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3808 "library-list-svr4" element's start tag when the the DSO list is
3811 2012-03-23 Pedro Alves <palves@redhat.com>
3813 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3814 a variable whose type size is the same as the inferior's pointer
3817 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3819 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3821 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3822 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3823 * linux-low.h: Include <signal.h>.
3824 (struct siginfo): Remove forward declaration.
3825 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3828 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3830 * .gitignore: Ignore more files.
3832 2012-03-19 Pedro Alves <palves@redhat.com>
3833 Jan Kratochvil <jan.kratochvil@redhat.com>
3835 * server.c (cont_thread, general_thread): Add describing comments.
3836 (start_inferior): Clear `cont_thread'.
3837 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3840 2012-03-15 Yao Qi <yao@codesourcery.com>
3842 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3844 (cmd_qtdp): ... here.
3846 2012-03-15 Yao Qi <yao@codesourcery.com>
3848 * tracepoint.c (struct tracepoint_action_ops): New.
3849 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3850 (m_tracepoint_action_download): New.
3851 (r_tracepoint_action_download): New.
3852 (x_tracepoint_action_download): New.
3853 (l_tracepoint_action_download): New.
3854 (add_tracepoint_action): Install `action->ops' according type.
3855 (download_tracepoint_1): Move code `download' function pointer
3856 of various tracepoint_action_ops.
3858 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3860 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3861 linux_ptrace_attach_warnings.
3863 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3865 * Makefile.in (linux-ptrace.o): New.
3866 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3867 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3868 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3869 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3870 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3872 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3874 2012-03-08 Yao Qi <yao@codesourcery.com>
3875 Pedro Alves <palves@redhat.com>
3877 Fix PR server/13392.
3878 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3880 * tracepoint.c (remove_tracepoint): New.
3881 (cmd_qtdp): Call remove_tracepoint when failed to install.
3883 2012-03-07 Pedro Alves <palves@redhat.com>
3885 * linux-low.c (get_detach_signal): New.
3886 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3887 Pass on pending signals to PTRACE_DETACH. Check the result of the
3889 * server.c (program_signals, program_signals_p): New.
3890 (handle_general_set): Handle QProgramSignals.
3891 * server.h (program_signals, program_signals_p): Declare.
3893 2012-03-05 Pedro Alves <palves@redhat.com>
3894 Jan Kratochvil <jan.kratochvil@redhat.com>
3896 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3899 2012-03-03 Yao Qi <yao@codesourcery.com>
3901 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3902 agent_look_up_symbols.
3904 2012-03-03 Yao Qi <yao@codesourcery.com>
3906 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3907 (linux-x86-low.o): Likewise.
3908 * server.h: Remove in_process_agent_loaded.
3909 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3913 2012-03-03 Yao Qi <yao@codesourcery.com>
3915 * tracepoint.c (gdb_agent_capability): New global.
3916 (in_process_agent_loaded_ust): Renamed to
3917 `in_process_agent_supports_ust'.
3919 (in_process_agent_supports_ust): Call agent_capability_check.
3920 (clear_installed_tracepoints): Assert that agent supports
3923 2012-03-03 Yao Qi <yao@codesourcery.com>
3925 * linux-low.c (linux_supports_agent): New.
3926 (linux_target_ops): Initialize field `supports_agent' with
3927 linux_supports_agent.
3928 * target.h (struct target_ops) <supports_agent>: New.
3929 (target_supports_agent): New macro.
3930 * server.c (handle_general_set): Handle packet 'QAgent'.
3931 (handle_query): Send `QAgent+'.
3932 * Makefile.in (server.o): Depends on agent.h.
3934 2012-03-03 Yao Qi <yao@codesourcery.com>
3936 * Makefile.in (OBS): Add agent.o.
3937 Add new rule for agent.o.
3938 Track dependence of tracepoint.c on agent.h.
3939 * tracepoint.c (run_inferior_command_1):
3940 (run_inferior_command): Call agent_run_command.
3941 (gdb_ust_connect_sync_socket): Deleted. Move it to
3943 (resume_thread, stop_thread): Likewise.
3944 (gdb_ust_socket_init): Renamed to ...
3945 (gdb_agent_socket_init): ... New.
3946 (gdb_ust_thread): Renamed to ...
3947 (gdb_agent_helper_thread): ... New.
3948 (gdb_ust_init): Move some code to ...
3949 (gdb_agent_init): ... here. New.
3950 [HAVE_UST]: Call gdb_ust_init.
3951 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3952 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3953 * config.in, configure: Regenerated.
3955 2012-03-02 Pedro Alves <palves@redhat.com>
3957 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3958 * linux-low.c (struct simple_pid_list): New.
3959 (stopped_pids): New a struct simple_pid_list pointer.
3960 (add_to_pid_list, pull_pid_from_list): New.
3961 (handle_extended_wait): Don't assume the first signal new children
3962 report is SIGSTOP. Adjust call to pull_pid_from_list.
3963 (linux_wait_for_lwp): Adjust.
3965 2012-03-02 Yao Qi <yao@codesourcery.com>
3967 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3970 2012-03-02 Yao Qi <yao@codesourcery.com>
3972 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3973 `stop_pc' and `tpoint'. Update caller.
3975 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3977 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3978 * linux-low.c (use_linux_regsets): New macro.
3979 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3980 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3981 (linux_register_in_regsets): New function.
3982 (usr_fetch_inferior_registers): Skip registers covered by
3984 (usr_store_inferior_registers): Likewise.
3985 (usr_fetch_inferior_registers): New macro.
3986 (usr_store_inferior_registers): Likewise.
3987 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3988 (linux_store_registers): Likewise.
3989 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3991 (init_registers_mips64_dsp_linux): Likewise.
3992 (init_registers_mips_linux): New macro.
3993 (init_registers_mips_dsp_linux): Likewise.
3994 (mips_dsp_num_regs): Likewise.
3995 (DSP_BASE, DSP_CONTROL): New fallback macros.
3996 (mips_base_regs): New macro.
3997 (mips_regmap): Use it. Fix the size.
3998 (mips_dsp_regmap): New variable.
3999 (mips_dsp_regset_bitmap): Likewise.
4000 (mips_arch_setup): New function.
4001 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4003 (mips_cannot_store_register): Likewise.
4004 (the_low_target): Update .arch_setup, .num_regs and .regmap
4005 initializers. Add .regset_bitmap initializer.
4006 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4008 * linux-bfin-low.c (the_low_target): Likewise.
4009 * linux-cris-low.c (the_low_target): Likewise.
4010 * linux-crisv32-low.c (the_low_target): Likewise.
4011 * linux-ia64-low.c (the_low_target): Likewise.
4012 * linux-m32r-low.c (the_low_target): Likewise.
4013 * linux-m68k-low.c (the_low_target): Likewise.
4014 * linux-ppc-low.c (the_low_target): Likewise.
4015 * linux-s390-low.c (the_low_target): Likewise.
4016 * linux-sh-low.c (the_low_target): Likewise.
4017 * linux-sparc-low.c (the_low_target): Likewise.
4018 * linux-tic6x-low.c (the_low_target): Likewise.
4019 * linux-x86-low.c (the_low_target): Likewise.
4020 * linux-xtensa-low.c (the_low_target): Likewise.
4021 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4022 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4023 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4025 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4026 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4028 2012-02-29 Yao Qi <yao@codesourcery.com>
4029 Pedro Alves <palves@redhat.com>
4031 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4032 `step_over_finished' is true.
4034 2012-02-27 Pedro Alves <palves@redhat.com>
4036 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4037 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4039 2012-02-27 Pedro Alves <palves@redhat.com>
4042 * linux-low.c (pid_is_stopped): New.
4043 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4045 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4047 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4050 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4052 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4054 2012-02-24 Luis Machado <lgustavo@codesourcery>
4056 * server.c (handle_query): Advertise support for target-side
4057 breakpoint condition evaluation.
4058 (process_point_options): New function.
4059 (process_serial_event): When inserting a breakpoint, check for
4060 a target-side condition that should be evaluated.
4062 * mem-break.c: Include regcache.h and ax.h.
4063 (point_cond_list_t): New data structure.
4064 (breakpoint) <cond_list>: New field.
4065 (find_gdb_breakpoint_at): Make non-static.
4066 (delete_gdb_breakpoint_at): Clear any target-side
4068 (clear_gdb_breakpoint_conditions): New function.
4069 (add_condition_to_breakpoint): Likewise.
4070 (add_breakpoint_condition): Likewise.
4071 (gdb_condition_true_at_breakpoint): Likewise.
4072 (gdb_breakpoint_here): Return result directly instead
4073 of going through a local variable.
4075 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4076 (clear_gdb_breakpoint_conditions): Likewise.
4077 (add_breakpoint_condition): Likewise.
4078 (gdb_condition_true_at_breakpoint): Likewise.
4080 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4081 (need_step_over_p): Take target-side breakpoint condition into
4084 2012-02-24 Luis Machado <lgustavo@codesourcery>
4086 * server.h: Include tracepoint.h.
4087 (agent_mem_read, agent_get_trace_state_variable_value,
4088 agent_set_trace_state_variable_value,
4089 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4090 get_set_tsv_func_addr): New prototypes.
4092 * ax.h: New include file.
4093 * ax.c: New source file.
4095 * tracepoint.c: Include ax.h.
4096 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4097 agent_expr, eval_result_type): Move to ax.h.
4098 (parse_agent_expr): Rename to ...
4099 (gdb_parse_agent_expr): ... this, make it non-static and move
4101 (unparse_agent_expr) Rename to ...
4102 (gdb_unparse_agent_expr): ... this, make it non-static and move
4104 (eval_agent_expr): Rename to ...
4105 (eval_tracepoint_agent_expr): ... this.
4106 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4107 forward declarations.
4108 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4109 (agent_get_trace_state_variable_value): New function.
4110 (agent_set_trace_state_variable_value): New function.
4111 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4112 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4113 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4114 (condition_true_at_tracepoint): Likewise.
4115 (parse_agent_expr): Rename to ...
4116 (gdb_parse_agent_expr): ... this and move to ax.c.
4117 (unparse_agent_expr): Rename to ...
4118 (gdb_unparse_agent_expr): ... this and move to ax.c.
4119 (gdb_agent_op_name): Move to ax.c.
4120 (eval_agent_expr): Rename to ...
4121 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4123 (eval_tracepoint_agent_expr): New function.
4124 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4126 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4128 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4129 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4130 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4131 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4132 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4133 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4134 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4135 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4136 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4137 (compile_bytecodes): Remove forward declaration.
4138 (is_goto_target): Move to ax.c.
4139 (compile_bytecodes): Move to ax.c and call
4140 agent_get_trace_state_variable_value (...) and
4141 agent_set_trace_state_variable_value (...).
4143 * Makefile.in: Update ax.c and IPA dependencies.
4145 2012-02-24 Pedro Alves <palves@redhat.com>
4147 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4148 (cmd_bigqtbuffer_circular): ... this. Only handle
4149 'QTBuffer:circular:'.
4150 (handle_tracepoint_general_set): Adjust.
4152 2012-02-16 Yao Qi <yao@codesourcery.com>
4154 * inferiors.c: Move code to ...
4155 * dll.c: .... here. New.
4156 * server.h: Declare clear_dlls.
4157 * Makefile.in (SFILES): Add dll.c.
4161 2012-02-11 Yao Qi <yao@codesourcery.com>
4163 * server.c: (handle_monitor_command): Add a new parameter
4165 (handle_query): Update caller.
4167 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4169 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4170 * configure, config.in: Regenerate.
4171 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4174 2012-02-02 Pedro Alves <palves@redhat.com>
4176 Try SIGKILL first, then PTRACE_KILL.
4177 * linux-low.c (linux_kill_one_lwp): New.
4178 (linux_kill_one_lwp): Rename to ...
4179 (kill_one_lwp_callback): ... this. Use the new
4182 2012-02-02 Pedro Alves <palves@redhat.com>
4184 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4187 2012-01-27 Pedro Alves <palves@redhat.com>
4189 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4190 (elf_64_file_p): Make static.
4191 (linux_pid_exe_is_elf_64_file): New.
4192 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4193 Delete declarations.
4194 (linux_pid_exe_is_elf_64_file): Declare.
4195 * linux-x86-low.c (x86_arch_setup): Use
4196 linux_pid_exe_is_elf_64_file.
4198 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4200 * linux-low.c (linux_wait_for_event_1): Rename to ...
4201 (linux_wait_for_event): ... here and merge it with former
4202 linux_wait_for_event - new variable wait_ptid, use it.
4203 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4205 2012-01-23 Pedro Alves <palves@redhat.com>
4207 * server.c (main): Avoid yet another case of infinite loop while
4208 detaching/killing after a longjmp.
4210 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4213 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4215 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4217 * hostio.c (handle_readlink): New function.
4218 (handle_vFile): Call it to handle "vFile:readlink" packets.
4220 2012-01-20 Pedro Alves <palves@redhat.com>
4221 Ulrich Weigand <ulrich.weigand@linaro.org>
4223 * server.c (handle_v_requests): Only support vAttach and vRun to
4224 start multiple processes when in extended protocol mode.
4226 2012-01-17 Pedro Alves <palves@redhat.com>
4228 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4229 memalign plus mprotect to allocate the scratch buffer.
4231 2012-01-13 Pedro Alves <palves@redhat.com>
4233 * server.c (attach_inferior): Clear `cont_thread'.
4235 2012-01-13 Pedro Alves <palves@redhat.com>
4237 * server.c (main): Avoid infinite loop while detaching/killing
4240 2012-01-09 Doug Evans <dje@google.com>
4242 * server.c (start_inferior): Set last_ptid in --wrapper case.
4244 2012-01-06 Yao Qi <yao@codesourcery.com>
4246 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4248 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4250 2012-01-04 Yao Qi <yao@codesourcery.com>
4252 * tracepoint.c (cmd_qtdp): Print debug message
4253 for static tracepoint.
4255 2012-01-04 Yao Qi <yao@codesourcery.com>
4257 * tracepoint.c (trace_vdebug): Differentiate debug message
4258 between gdbserver and IPA.
4260 2012-01-03 Yao Qi <yao@codesourcery.com>
4262 * tracepoint.c (tracepoint_was_hit): Don't collect for
4265 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4267 * terminal.h: Reformat copyright header.
4269 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4271 * server.c (gdbserver_version): Update copyright year.
4272 * gdbreplay.c (gdbreplay_version): Likewise.
4274 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4276 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4279 2011-12-18 Hui Zhu <teawater@gmail.com>
4280 * linux-low.c (linux_create_inferior): Save return value to ret.
4282 2011-12-18 Hui Zhu <teawater@gmail.com>
4284 * linux-low.c (linux_create_inferior): Save return value to ret.
4286 2011-12-16 Doug Evans <dje@google.com>
4288 * linux-low.c (linux_create_inferior): If stdio connection,
4289 redirect stdin from /dev/null, stdout to stderr.
4290 * remote-utils.c (remote_is_stdio): New static global.
4291 (remote_connection_is_stdio): New function.
4292 (remote_prepare): Handle stdio connection.
4293 (remote_open): Ditto.
4294 (remote_close): Don't close stdin for stdio connections.
4295 (read_prim,write_prim): New functions. Replace all calls to
4296 read/write to these.
4297 * server.c (main): Watch for "-" argument. Move call to
4298 remote_prepare before start_inferior.
4299 * server.h (STDIO_CONNECTION_NAME): New macro.
4300 (remote_connection_is_stdio): Declare.
4302 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4303 in debugging output.
4305 2011-12-15 Yao Qi <yao@codesourcery.com>
4307 * tracepoint.c: Include sys/syscall.h.
4308 (gdb_ust_thread): Remove preprocessor conditional.
4310 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4312 * linux-low.c (linux_detach_one_lwp): Call
4313 the_low_target.prepare_to_resume before detaching.
4315 2011-12-14 Yao Qi <yao@codesourcery.com>
4317 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4320 2011-12-14 Yao Qi <yao@codesourcery.com>
4322 * i386-low.c (i386_low_stopped_data_address): Initialize local
4325 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4329 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4330 DR_CONTROL unless necessary. Extend comments.
4331 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4332 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4334 2011-12-13 Yao Qi <yao@codesourcery.com>
4336 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4338 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4340 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4342 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4343 Print new debug message for such case.
4345 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4347 Fix overlapping memcpy.
4348 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4349 the read_inferior_memory transfer.
4350 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4351 write_inferior_memory transfer.
4352 (set_fast_tracepoint_jump): New variable buf. Use it for the
4353 read_inferior_memory and write_inferior_memory transfers.
4354 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4355 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4356 Use it for the write_inferior_memory transfer.
4357 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4360 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4362 * linux-low.c (fetch_register, store_register): Make code
4363 consistent, fix formatting.
4365 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4367 * linux-low.c (usr_store_inferior_registers): Factor out code
4368 to handle individual registers into...
4369 (store_register): ... this new function.
4371 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4373 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4374 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4375 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4376 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4377 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4378 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4379 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4380 (srv_xmlfiles): Add new XML files.
4382 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4384 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4385 (init_registers_s390_linux32v1): Add prototype.
4386 (init_registers_s390_linux32v2): Likewise.
4387 (init_registers_s390_linux64v1): Likewise.
4388 (init_registers_s390_linux64v2): Likewise.
4389 (init_registers_s390x_linux64v1): Likewise.
4390 (init_registers_s390x_linux64v2): Likewise.
4391 (s390_num_regs): Increment to 52.
4392 (s390_regmap): Add orig_r2 register.
4393 (s390_num_regs_3264): Increment to 68.
4394 (s390_regmap_3264): Add orig_r2 register.
4395 (s390_collect_ptrace_register): Handle orig_r2 register.
4396 (s390_supply_ptrace_register): Likewise.
4397 (s390_fill_last_break): New function.
4398 (s390_store_last_break): Likewise.
4399 (s390_fill_system_call): New function.
4400 (s390_store_system_call): Likewise.
4401 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4403 (s390_check_regset): New function.
4404 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4405 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4406 Update target_regsets for available register sets.
4408 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4409 Jan Kratochvil <jan.kratochvil@redhat.com>
4411 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4412 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4414 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4415 * linux-low.h (struct process_info_private): New member r_debug.
4416 * server.c (handle_qxfer_libraries): Call
4417 the_target->qxfer_libraries_svr4.
4418 (handle_qxfer_libraries_svr4): New function.
4419 (qxfer_packets): New entry "libraries-svr4".
4420 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4421 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4422 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4423 PACKET_qXfer_libraries_svr4.
4425 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4427 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4428 PSW address/mask between 8-byte and 16-byte formats.
4429 (s390_supply_ptrace_register): Likewise.
4430 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4431 basic addressing mode bit.
4433 2011-11-24 Stan Shebs <stan@codesourcery.com>
4435 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4437 2011-11-17 Stan Shebs <stan@codesourcery.com>
4439 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4440 (tracing_start_time): New global.
4441 (tracing_stop_time): New global.
4442 (tracing_user_name): New global.
4443 (tracing_notes): New global.
4444 (tracing_stop_note): New global.
4445 (cmd_qtstart): Set traceframe_usage, start_time.
4446 (stop_tracing): Set stop_time.
4447 (cmd_qtstatus): Report additional status.
4448 (cmd_qtp): New function.
4449 (handle_tracepoint_query): Call it.
4450 (cmd_qtnotes): New function.
4451 (handle_tracepoint_general_set): Call it.
4452 (get_timestamp): Rename from tsv_get_timestamp.
4454 2011-11-14 Stan Shebs <stan@codesourcery.com>
4455 Kwok Cheung Yeung <kcy@codesourcery.com>
4457 * linux-x86-low.c (small_jump_insn): New.
4458 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4459 trampoline and error message, build a trampoline and issue a small
4460 jump instruction to it.
4461 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4462 trampoline and error message.
4463 (x86_get_min_fast_tracepoint_insn_len): New.
4464 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4465 * linux-low.h (struct linux_target_ops): Add arguments to
4466 install_fast_tracepoint_jump_pad operation, add new operation.
4467 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4469 (linux_get_min_fast_tracepoint_insn_len): New function.
4470 (linux_target_op): Add new operation.
4471 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4472 (gdb_trampoline_buffer_end): Ditto.
4473 (gdb_trampoline_buffer_error): Ditto.
4474 (struct ipa_sym_addresses): Add fields for new IPA variables.
4475 (symbol_list): Add entries for new IPA variables.
4476 (struct tracepoint): Add fields to hold the address range of the
4477 trampoline used by the tracepoint.
4478 (trampoline_buffer_head): New static variable.
4479 (trampoline_buffer_tail): Ditto.
4480 (claim_trampoline_space): New function.
4481 (have_fast_tracepoint_trampoline_buffer): New function.
4482 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4484 (install_fast_tracepoint): Ditto, also add error buffer argument.
4485 (cmd_qtminftpilen): New function.
4486 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4487 (fast_tracepoint_from_trampoline_address): New function.
4488 (fast_tracepoint_collecting): Handle trampoline as part of jump
4490 (set_trampoline_buffer_space): New function.
4491 (initialize_tracepoint): Initialize new IPA variables.
4492 * target.h (struct target_ops): Add arguments to
4493 install_fast_tracepoint_jump_pad operation, add new
4494 get_min_fast_tracepoint_insn_len operation.
4495 (target_get_min_fast_tracepoint_insn_len): New.
4496 (install_fast_tracepoint_jump_pad): Add arguments.
4497 * server.h (IPA_BUFSIZ): Define.
4498 * linux-i386-ipa.c: Include extra header files.
4499 (initialize_fast_tracepoint_trampoline_buffer): New function.
4500 (initialize_low_tracepoint): Call it.
4501 * server.h (set_trampoline_buffer_space): Declare.
4502 (claim_trampoline_space): Ditto.
4503 (have_fast_tracepoint_trampoline_buffer): Ditto.
4505 2011-11-14 Yao Qi <yao@codesourcery.com>
4507 * server.c (handle_query): Handle InstallInTrace for qSupported.
4508 * tracepoint.c (add_tracepoint): Sort list.
4509 (install_tracepoint, download_tracepoint): New.
4510 (cmd_qtdp): Call them to install and download tracepoints.
4511 (sort_tracepoints): Removed.
4512 (cmd_qtstart): Update.
4514 2011-11-14 Yao Qi <yao@codesourcery.com>
4516 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4517 * mem-break.h: Declare.
4518 * tracepoint.c (cmd_qtstart): Move some code to ...
4519 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4521 (download_tracepoints): Move some code to ...
4522 (download_tracepoint_1): ... here. New.
4524 2011-11-08 Yao Qi <yao@codesourcery.com>
4526 * remote-utils.c (relocate_instruction): A comment fix.
4528 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4530 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4531 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4532 dr_status_mirror and dr_control_mirror from debug_reg_state.
4533 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4534 (i386_initial_stuff): Remove use of deleted globals.
4535 (i386_get_thread_context, i386_set_thread_context,
4536 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4537 from debug_reg_state.
4539 2011-11-05 Yao Qi <yao@codesourcery.com>
4541 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4542 address as TPOINT's.
4544 2011-11-02 Stan Shebs <stan@codesourcery.com>
4546 * tracepoint.c (agent_mem_read_string): New function.
4547 (eval_agent_expr): Call it for tracenz.
4548 * server.c (handle_query): Report support for tracenz.
4550 2011-11-02 Yao Qi <yao@codesourcery.com>
4552 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4554 2011-11-02 Yao Qi <yao@codesourcery.com>
4556 * target.h: Fix a typo in comment.
4558 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4560 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4561 clobber the breakpoints' shadows with fast tracepoint jumps.
4562 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4563 * target.c (write_inferior_memory): Also pass MYADDR down to
4566 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4568 * configure.ac: Check support for personality routine.
4569 * configure: Regenerate.
4570 * config.in: Likewise.
4571 * linux-low.c: Include <sys/personality.h>.
4572 Define ADDR_NO_RANDOMIZE if necessary.
4573 (linux_create_inferior): Disable address space randomization when
4574 forking inferior, if requested.
4575 (linux_supports_disable_randomization): New function.
4576 (linux_target_ops): Install it.
4577 * server.h (disable_randomization): Declare.
4578 * server.c (disable_randomization): New global variable.
4579 (handle_general_set): Handle QDisableRandomization.
4580 (handle_query): Likewise for qSupported.
4581 (main): Support --disable-randomization and --no-disable-randomization
4582 command line arguments.
4583 * target.h (struct target_ops): Add supports_disable_randomization.
4584 (target_supports_disable_randomization): New macro.
4586 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4588 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4590 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4591 [!PT_GETDSBT] (target_loadmap): New definition.
4592 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4593 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4594 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4595 and PT_GETDSBT to LINUX_LOADMAP.
4596 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4597 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4599 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4601 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4602 (arm_linux_hwbp_cap): New static variable.
4603 (arm_linux_get_hwbp_cap): Replace by ...
4604 (arm_linux_init_hwbp_cap): ... this new function.
4605 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4606 (arm_linux_get_hw_watchpoint_count): Likewise.
4607 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4608 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4609 (arm_prepare_to_resume): Use perror_with_name instead of error.
4611 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4613 * linux-arm-low.c: Include <signal.h>.
4614 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4615 (struct arm_linux_hwbp_cap): New data type.
4616 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4617 (struct arm_linux_hw_breakpoint): New data type.
4618 (MAX_BPTS, MAX_WPTS): Define.
4619 (struct arch_process_info, struct arch_lwp_info): New data types.
4620 (arm_linux_get_hwbp_cap): New function.
4621 (arm_linux_get_hw_breakpoint_count): Likewise.
4622 (arm_linux_get_hw_watchpoint_count): Likewise.
4623 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4624 (arm_hwbp_control_initialize): Likewise.
4625 (arm_hwbp_control_is_enabled): Likewise.
4626 (arm_hwbp_control_is_initialized): Likewise.
4627 (arm_hwbp_control_disable): Likewise.
4628 (arm_linux_hw_breakpoint_equal): Likewise.
4629 (arm_linux_hw_point_initialize): Likewise.
4630 (struct update_registers_data): New data structure.
4631 (update_registers_callback: New function.
4632 (arm_insert_point): Likewise.
4633 (arm_remove_point): Likewise.
4634 (arm_stopped_by_watchpoint): Likewise.
4635 (arm_stopped_data_address): Likewise.
4636 (arm_new_process): Likewise.
4637 (arm_new_thread): Likewise.
4638 (arm_prepare_to_resume): Likewise.
4639 (the_low_target): Register arm_insert_point, arm_remove_point,
4640 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4641 arm_new_thread, and arm_prepare_to_resume.
4643 2011-09-15 Stan Shebs <stan@codesourcery.com>
4645 * server.h (struct emit_ops): Add compare-goto fields.
4646 * tracepoint.c (gdb_agent_op_sizes): New table.
4647 (emit_eq_goto): New function.
4648 (emit_ne_goto): New function.
4649 (emit_lt_goto): New function.
4650 (emit_le_goto): New function.
4651 (emit_gt_goto): New function.
4652 (emit_ge_goto): New function.
4653 (is_goto_target): New function.
4654 (compile_bytecodes): Recognize special cases of compare-goto
4655 combinations and call specialized emitters for them.
4656 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4657 (amd64_emit_ne_goto): New function.
4658 (amd64_emit_lt_goto): New function.
4659 (amd64_emit_le_goto): New function.
4660 (amd64_emit_gt_goto): New function.
4661 (amd64_emit_ge_goto): New function.
4662 (amd64_emit_ops): Add the new functions.
4663 (i386_emit_eq_goto): New function.
4664 (i386_emit_ne_goto): New function.
4665 (i386_emit_lt_goto): New function.
4666 (i386_emit_le_goto): New function.
4667 (i386_emit_gt_goto): New function.
4668 (i386_emit_ge_goto): New function.
4669 (i386_emit_ops): Add the new functions.
4671 2011-09-08 Stan Shebs <stan@codesourcery.com>
4673 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4674 (i386_emit_epilogue): Restore %ebx.
4676 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4678 * server.c (step_thread): Remove definition.
4679 (process_serial_event): Don't handle Hs.
4680 * server.h (step_thread): Remove declaration.
4681 * target.c (set_desired_inferior): Remove use of step_thread.
4683 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4685 * linux-low.c: Include linux-procfs.h.
4686 (linux_attach_lwp_1): Update comments.
4687 (linux_attach): Scan for existing threads when attaching to a
4688 process that is the tgid.
4689 * Makefile.in: Update dependencies.
4691 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4693 * configure.srv: Add linux-procfs.o dependencies.
4695 2011-08-14 Yao Qi <yao@codesourcery.com>
4697 * target.h (struct target_ops): Fix indent.
4698 * win32-low.c (win32_target_ops): Fix comment.
4700 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4701 Yao Qi <yao@codesourcery.com>
4703 * Makefile.in (clean): Remove tic6x-*.c files.
4704 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4705 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4706 (tic6x-c64xp-linux.c): Likewise.
4707 * configure.srv: Add support for tic6x-*-uclinux.
4708 * linux-tic6x-low.c: New.
4709 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4711 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4712 Yao Qi <yao@codesourcery.com>
4714 * target.h (struct target_ops): Add read_loadmap.
4715 * linux-low.c (struct target_loadseg): New type.
4716 (struct target_loadmap): New type.
4717 (linux_read_loadmap): New function.
4718 (linux_target_ops): Add linux_read_loadmap.
4719 * server.c (handle_query): Support qXfer:fdpic:read packet.
4720 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4723 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4725 * win32-low.c: Include <stdint.h>.
4727 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4729 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4730 to the inferior here.
4731 (i386_remove_aligned_watchpoint): Ditto.
4732 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4733 fit part of the watchpoint in the debug registers.
4734 (i386_update_inferior_debug_regs): New.
4735 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4736 registers, and only update the inferior on success.
4737 (i386_low_remove_watchpoint): Ditto.
4739 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4741 * linux-low.c (compare_ints, unique, list_threads, show_process,
4742 linux_core_of_thread): Delete.
4743 (linux_target_ops): Change linux_core_of_thread to
4744 linux_common_core_of_thread.
4745 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4746 * utils.c (malloc_failure): Change type of argument.
4747 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4748 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4749 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4750 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4751 (IPA_OBJS): Add common-utils-ipa.o.
4752 (ptid_h, linux_osdata_h): New macros.
4753 (server_h): Add common/common-utils.h, common/xml-utils.h,
4754 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4756 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4757 ptid.o, buffer.o): New rules.
4758 (linux-low.o): Add common/linux-osdata.h as a dependency.
4759 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4760 * configure.ac: Add AC_HEADER_DIRENT check.
4761 * config.in: Regenerate.
4762 * configure: Regenerate.
4763 * remote-utils.c (xml_escape_text): Delete.
4764 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4765 buffer_xml_printf): Move to common/buffer.c.
4766 * server.c (main): Remove call to initialize_inferiors.
4767 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4768 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4769 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4770 internal_error, gdb_assert, gdb_assert_fail): Delete.
4771 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4772 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4774 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4775 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4776 initialize_inferiors): Delete.
4778 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4780 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4783 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4785 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4787 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4789 2011-05-26 Yao Qi <yao@codesourcery.com>
4791 * Makefile.in (thread-db.o): Track dependence to
4792 common/gdb_thread_db.h.
4793 * thread-db.c: include gdb_thread_db.h from right place.
4795 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4797 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4798 __FILE__ and __LINE__ to internal_error.
4800 2011-05-13 Doug Evans <dje@google.com>
4802 * thread-db.c (try_thread_db_load_from_sdir): New function.
4803 (try_thread_db_load_from_dir): New function.
4804 (thread_db_load_search): Handle $sdir, ignore $pdir.
4805 Remove trying of system directories if search of
4806 libthread-db-search-path fails, that is now done via $sdir.
4808 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4810 * server.c (handle_query): Add EnableDisableTracepoints to the list
4811 of supported features.
4812 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4814 (cmd_qtenable_disable): New.
4815 (cmd_qtstart): Install tracepoints even if disabled.
4816 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4817 receiving a QTEnable or QTDisable packet.
4818 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4819 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4821 (gdb_probe): Skip data collection if static tracepoint is disabled.
4823 2011-05-10 Doug Evans <dje@google.com>
4825 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4827 2011-05-04 Doug Evans <dje@google.com>
4829 * linux-low.c (linux_join): Skip process lookup.
4830 * spu-low.c (spu_join): Ditto.
4831 * server.c (join_inferiors_callback): Delete.
4832 (process_serial_event): For 'D' packet (detach) call join_inferior
4835 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4837 * README: Don't mention xscale*-*-linux*.
4838 * configure.srv (xscale*-*-linux*): Don't handle target.
4840 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4842 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4844 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4845 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4846 (i386_emit_void_call_2): Likewise.
4848 2011-04-26 Yao Qi <yao@codesourcery.com>
4850 * linux-low.c: Move common macros to linux-ptrace.h.
4851 Include linux-ptrace.h.
4852 * Makefile.in (linux_ptrace_h): New.
4853 (linux-low.o): Depends on linux-ptrace.h.
4855 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4857 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4858 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4859 (remote_prepare): New function with most of the TCP code from ...
4860 (remote_open): ... here. Detect PORT here unconditionally. Move also
4861 setting transport_is_reliable.
4862 * server.c (run_once): New variable.
4863 (gdbserver_usage): Document it.
4864 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4865 the first run if RUN_ONCE.
4866 * server.h (run_once, remote_prepare): New declarations.
4868 2011-04-19 Tom Tromey <tromey@redhat.com>
4870 * win32-low.c (handle_load_dll): Remove duplicate "the".
4872 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4874 Remove support for old Cygwin 1.5 versions.
4875 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4876 function to avoid warning.
4877 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4880 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4882 * gdbserver/server.h (Macro _): Define it if not available.
4884 2011-03-14 Michael Snyder <msnyder@vmware.com>
4886 * hostio.c (handle_close): Remove unnecessary null test.
4888 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4890 * Makefile.in (maintainer-clean realclean distclean): Remove
4891 "make ... subdir_do" command.
4893 2011-03-10 Michael Snyder <msnyder@vmware.com>
4895 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4897 * server.c (handle_v_run): Free alloced buffer on early return.
4899 2011-03-09 Yao Qi <yao@codesourcery.com>
4902 2011-03-04 Yao Qi <yao@codesourcery.com>
4904 * Makefile.in: Remove GNU make feature --directory.
4906 2011-03-05 Yao Qi <yao@codesourcery.com>
4908 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4909 (subdir_do): New make target. Copied from gdb/Makefile.
4910 (maintainer-clean, realclean, distclean, clean): Call corresponding
4911 make targets in common/Makefile.
4913 2011-02-11 Yao Qi <yao@codesourcery.com>
4915 * configure.ac: Call AC_PROG_RANLIB.
4916 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4917 * configure: Regenerate.
4919 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4921 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4923 2011-03-06 Yao Qi <yao@codesourcery.com>
4925 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4927 2011-03-05 Yao Qi <yao@codesourcery.com>
4929 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4930 (subdir_do): New make target. Copied from gdb/Makefile.
4931 (maintainer-clean, realclean, distclean, clean): Call corresponding
4932 make targets in common/Makefile.
4934 2011-03-04 Yao Qi <yao@codesourcery.com>
4936 * Makefile.in: Remove GNU make feature --directory.
4938 2011-03-04 Michael Snyder <msnyder@vmware.com>
4940 * server.c (queue_stop_reply): Call xmalloc not malloc.
4942 2011-03-02 Michael Snyder <msnyder@vmware.com>
4944 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4946 2011-02-28 Michael Snyder <msnyder@vmware.com>
4948 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4949 (cmd_qtframe): Ditto.
4950 (cmd_qtbuffer): Ditto.
4951 (cmd_bigqtbuffer): Ditto.
4953 * utils.c (decimal2str): Initialize 'width' to nine, then
4956 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4958 * hostio.c (require_data): Free *data, not data.
4960 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4962 * hostio.c (require_data): Use free, not xfree.
4964 2011-02-27 Michael Snyder <msnyder@vmware.com>
4966 * server.c (handle_query): Discard unused value.
4968 * hostio.c (require_data): Free malloc memory before returning
4971 2011-02-26 Michael Snyder <msnyder@vmware.com>
4973 * linux-low.c (list_threads): Call closedir for dirent.
4975 2011-02-27 Michael Snyder <msnyder@vmware.com>
4977 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4978 a case statement falls through.
4980 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4982 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4985 2011-02-26 Michael Snyder <msnyder@vmware.com>
4987 * utils.c (decimal2str): Eliminate dead code and dead param.
4988 (pulongest): Drop dead param from call to decimal2str.
4991 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4993 Revert the following patch (not approved yet):
4994 2011-02-21 Hui Zhu <teawater@gmail.com>
4995 * tracepoint.c (tp_printf): New function.
4996 (eval_agent_expr): Handle gdb_agent_op_printf.
4998 2011-02-21 Hui Zhu <teawater@gmail.com>
5000 * tracepoint.c (tp_printf): New function.
5001 (eval_agent_expr): Handle gdb_agent_op_printf.
5003 2011-02-18 Tom Tromey <tromey@redhat.com>
5005 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5006 (tracepoint.o): Likewise.
5007 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5008 (gdb_agent_op_names): Likewise.
5010 2011-02-18 Tom Tromey <tromey@redhat.com>
5012 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5013 gdb_agent_op_rot>: New constants.
5014 (gdb_agent_op_names): Add pick and roll.
5015 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5018 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5020 * aclocal.m4: Regenerated with aclocal-1.11.1.
5022 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5024 * server.c (handle_qxfer_traceframe_info): New.
5025 (qxfer_packets): Register "traceframe-info".
5026 (handle_query): Report support for qXfer:traceframe-info:read+.
5027 * tracepoint.c (match_blocktype): New.
5028 (traceframe_find_block_type): Rename to ...
5029 (traceframe_walk_blocks): ... this. Add callback filter argument,
5031 (traceframe_find_block_type): New, reimplemented on top of
5032 traceframe_walk_blocks.
5033 (build_traceframe_info_xml): New.
5034 (traceframe_read_info): New.
5035 * server.h (traceframe_read_info): Declare.
5037 2011-02-11 Yao Qi <yao@codesourcery.com>
5039 * configure.ac: Call AC_PROG_RANLIB.
5040 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5041 * configure: Regenerate.
5043 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5045 * server.c (gdb_read_memory): Change return semantics to allow
5047 (handle_search_memory_1): Adjust.
5048 (process_serial_event) <'m' packet>: Handle partial transfers.
5049 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5051 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5053 * regcache.c (init_register_cache): Initialize
5054 regcache->register_status.
5055 (free_register_cache): Release regcache->register_status.
5056 (regcache_cpy): Copy register_status.
5057 (registers_to_string): Print 'x's for unavailable registers.
5058 (supply_register): Mark the register's status valid or
5059 unavailable, depending on whether a buffer was passed in or not.
5060 (supply_register_zeroed): New.
5061 (supply_regblock): Mark the registers' status valid or
5062 unavailable, depending on whether a buffer was passed in or not.
5063 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5064 (struct regcache): New `register_status' field.
5065 (supply_register_zeroed): Declare.
5066 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5067 supply_register_zeroed, rather than passing a NULL buffer to
5069 * tracepoint.c (fetch_traceframe_registers): Update comment.
5071 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5073 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5076 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5078 * server.h (decode_xfer_write): Change prototype.
5079 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5080 and don't extract the annex here.
5081 * server.c (decode_xfer_read): Remove `annex' parameter,
5082 and don't extract the annex here.
5084 (struct qxfer): New.
5085 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5086 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5087 (handle_qxfer_statictrace): New functions, abstracted out from
5088 handle_query, and made to use the struct qxfer interface.
5089 (handle_threads_qxfer_proper): Rename to ...
5090 (handle_qxfer_threads_proper): ... this.
5091 (handle_threads_qxfer): Rename to ...
5092 (handle_qxfer_threads): ... this. Adjust.
5093 (qxfer_packets): New array.
5094 (handle_qxfer): New function.
5095 (handle_query): Use handle_qxfer.
5097 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5099 * gdbreplay.c: Shorten lines of >= 80 columns.
5100 * linux-low.c: Ditto.
5101 * linux-ppc-low.c: Ditto.
5102 * linux-s390-low.c: Ditto.
5103 * linux-sparc-low.c: Ditto.
5104 * linux-x86-low.c: Ditto.
5105 * linux-xtensa-low.c: Ditto.
5106 * mem-break.c: Ditto.
5108 * regcache.h: Ditto.
5109 * remote-utils.c: Ditto.
5112 * thread-db.c: Ditto.
5113 * tracepoint.c: Ditto.
5115 * win32-low.h: Ditto.
5117 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5119 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5122 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5124 * server.c (gdbserver_version): Update copyright year in version
5126 * gdbreplay.c (gdbreplay_version): Ditto.
5128 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5130 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5131 * linux-bfin-low.c: New file.
5132 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5133 PT_DATA_ADDR for BFIN targets.
5134 * Makefile.in (SFILES): Add linux-bfin-low.c.
5135 (clean): Remove reg-bfin.c.
5136 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5137 * README: Mention supported Blackfin targets.
5139 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5141 * .gitignore: New file.
5143 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5145 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5147 2010-10-22 Jie Zhang <jie@codesourcery.com>
5149 * Makefile.in: Add FLAGS_TO_PASS variable.
5150 (install): Remove dependency of install-only and recursively
5151 invoke make for install-only.
5153 2010-10-04 Doug Evans <dje@google.com>
5155 * Makefile.in (uninstall): Use $(DESTDIR).
5157 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5161 * linux-x86-low.c (compat_siginfo_from_siginfo)
5162 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5163 si_code is < 0. Check for si_code == SI_TIMER before checking for
5166 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5168 * lynx-i386-low.c: New file.
5169 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5171 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5173 * lynx-low.c (ptrace_request_to_str): Remove handling for
5174 request values that have been removed in LynxOS 5.x.
5176 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5178 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5181 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5183 * configure.ac: Add --enable-inprocess-agent option.
5184 * configure: Rebuilt.
5186 2010-09-06 Yao Qi <yao@codesourcery.com>
5188 * linux-low.c (linux_kill): Remove unused variable.
5189 (linux_stabilize_threads): Likewise.
5190 * server.c (start_inferior): Likewise.
5191 (queue_stop_reply_callback): Likewise.
5192 * tracepoint.c (do_action_at_tracepoint): Likewise.
5194 2010-09-06 Yao Qi <yao@codesourcery.com>
5196 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5199 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5201 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5203 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5205 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5208 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5210 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5211 gdbserver/lynx-ppc-low.c: New files.
5212 * Makefile.in (lynx_low_h): New variable.
5213 (lynx-low.o, lynx-ppc-low.o): New rules.
5214 * configure.ac: On LynxOS, link with -lnetinet.
5215 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5216 * configure: regenerate.
5218 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5220 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5221 * configure.ac: Add check for vasprintf and vsnprintf.
5222 * configure, config.in: Regenerate.
5223 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5225 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5227 * gdbreplay.c: Move include of alloca.h up, next to include of
5229 * server.h: Add include of malloc.h.
5230 * mem-break.c: Remove include of malloc.h.
5231 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5235 * Makefile.in (memmem.o): Build with -Wno-error.
5237 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5239 * utils.c (xsnprintf): Make non-static.
5240 * server.h: Add xsnprintf declaration.
5241 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5242 replace calls to snprintf by calls to xsnprintf throughout.
5244 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5246 * configure.ac: Add configure check for alloca.
5247 * configure, config.in: Regenerate.
5248 * server.h: Include alloca.h if it exists.
5249 * gdbreplay.c: Include alloca.h if it exists.
5251 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5253 * linux-low.c (__SIGRTMIN): Define if not already defined.
5254 (linux_create_inferior): Check for __ANDROID__ rather than
5256 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5257 are already deferred.
5258 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5259 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5260 stopped and already has a pending signal to report.
5261 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5262 a pending signal to report or is moving out of a jump pad.
5263 (linux_init_signals): Check for __ANDROID__ rather than
5266 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5268 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5269 debug_threads check. Avoid a linear search when not doing debug
5272 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5274 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5275 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5276 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5277 (process_event): Change local fd's type to gdb_fildes_t.
5278 (create_file_handler): Adjust prototype.
5279 (delete_file_handler): Adjust prototype.
5280 (handle_file_event): Adjust prototype. Use pfildes.
5281 (create_file_event): Adjsut prototype.
5282 * remote-utils.c (remote_desc, listen_desc): Change type to
5284 * server.h: New gdb_fildes_t typedef.
5285 [USE_WIN32API]: Include winsock2.h.
5286 (delete_file_handler, add_file_handler): Adjust prototypes.
5288 * utils.c (pfildes): New.
5290 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5292 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5293 * configure: Regenerate.
5295 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5297 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5298 (linux_done_accessing_memory): ... this.
5299 (linux_target_ops): Adjust.
5300 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5301 * nto-low.c (nto_target_ops): Adjust comment.
5302 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5303 * spu-low.c (spu_target_ops): Adjust comment.
5304 * target.h (target_ops): Rename unprepare_to_access_memory field
5305 to done_accessing_memory.
5306 (unprepare_to_access_memory): Rename to ...
5307 (done_accessing_memory): ... this.
5309 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5311 * linux-low.c (linux_prepare_to_access_memory): New.
5312 (linux_unprepare_to_access_memory): New.
5313 (linux_target_ops): Install them.
5314 * server.c (read_memory): Rename to ...
5315 (gdb_read_memory): ... this. Use
5316 prepare_to_access_memory/prepare_to_access_memory.
5317 (write_memory): Rename to ...
5318 (gdb_write_memory): ... this. Use
5319 prepare_to_access_memory/prepare_to_access_memory.
5320 (handle_search_memory_1): Adjust.
5321 (process_serial_event): Adjust.
5322 * target.h (struct target_ops): New fields
5323 prepare_to_access_memory and unprepare_to_access_memory.
5324 (prepare_to_access_memory, unprepare_to_access_memory): New.
5325 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5326 prepare_to_access_memory/prepare_to_access_memory.
5327 * nto-low.c (nto_target_ops): Adjust.
5328 * spu-low.c (spu_target_ops): Adjust.
5329 * win32-low.c (win32_target_ops): Adjust.
5331 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5333 * Makefile.in (WARN_CFLAGS): Get it from configure.
5334 (WERROR_CFLAGS): New.
5335 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5336 * configure.ac: Introduce --enable-werror, which adds -Werror to
5337 the compiler command line. Enabled by default. Disable with
5338 --disable-werror. Add -Wdeclaration-after-statement
5339 Wpointer-arith and -Wformat-nonliteral to warning flags.
5340 * configure: Regenerate.
5342 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5344 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5346 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5348 * gdbreplay.c (remote_error): New.
5350 (expect): Use gdbchar. Check for error reading from GDB.
5351 Clarify sync error output.
5352 (play): Check for errors writing to GDB.
5353 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5354 * remote-utils.c (getpkt): Check for errors writing to the remote
5357 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5359 * linux-low.c (linux_wait_1): Move non-debugging code out of
5360 `debug_threads' control.
5362 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5364 * linux-low.c (linux_wait_1): Don't set last_status here.
5365 * server.c (push_event, queue_stop_reply_callback): Assert we're
5366 not pushing a TARGET_WAITKIND_IGNORE event.
5367 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5368 (myresume, handle_target_event): Set the thread's last_resume_kind
5369 and last_status from the target returned status.
5371 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5375 * linux-x86-low.c (update_debug_registers_callback): New.
5376 (i386_dr_low_set_addr): Use it.
5377 (i386_dr_low_get_addr): New.
5378 (i386_dr_low_set_control): Use update_debug_registers_callback.
5379 (i386_dr_low_get_control): New.
5380 (i386_dr_low_get_status): Adjust.
5381 * linux-low.c (linux_stop_lwp): New.
5382 * linux-low.h (linux_stop_lwp): Declare.
5384 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5385 argument instead of a i386_debug_reg_state.
5386 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5387 a i386_debug_reg_state.
5388 (i386_insert_aligned_watchpoint): Adjust.
5389 (i386_remove_aligned_watchpoint): Adjust.
5390 (i386_low_stopped_data_address): Read the debug registers from the
5391 inferior instead of from the mirrors.
5392 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5393 (i386_dr_low_get_addr): Declare.
5394 (i386_dr_low_get_control): Declare.
5395 (i386_dr_low_get_status): Change prototype.
5397 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5398 (i386_dr_low_get_addr): New.
5399 (i386_dr_low_get_control): New.
5400 (i386_dr_low_get_status): Adjust prototype. Return
5402 (i386_initial_stuff): Clear dr_status_mirror and
5404 (i386_get_thread_context): Adjust.
5405 (i386_set_thread_context): Adjust.
5406 (i386_thread_added): Adjust.
5408 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5410 * linux-low.h (linux_thread_area): Delete declaration.
5412 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5414 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5415 after its termination.
5417 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5419 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5420 (gdb_wants_all_stopped): Delete.
5421 (linux_wait_1): Don't call them.
5422 * server.c (handle_v_cont): Tag all threads as want-stopped.
5423 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5424 stopped as "client-wants-stopped".
5426 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5428 * Makefile.in (signals_h): New.
5429 (server_h): Depend on it.
5430 (server.o): Don't depend on $(signals_def).
5431 (signals.o): Depend on $(signals_def).
5433 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5435 * Makefile.in (signals_def): New.
5436 (server_h): Append include/gdb/signals.h and signals_def.
5437 (server.o): Append signals_def.
5439 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5441 * server.c (handle_target_event): Use target_signal_to_host for
5442 resume_info.sig initialization.
5443 * target.h (struct thread_resume) <sig>: New comment.
5445 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5447 * server.c (handle_query): strcpy() the returned string from paddress()
5448 instead of sprintf().
5449 * utils.c (paddress): Return phex_nz().
5451 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5453 * server.c (handle_v_cont): Call mourn_inferior if process
5455 (myresume): Likewise.
5457 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5459 Static tracepoints, and integration with UST.
5461 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5462 * mem-break.c (uninsert_all_breakpoints)
5463 (reinsert_all_breakpoints): New.
5464 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5465 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5466 (gdb_agent_ust_loaded, helper_thread_id)
5467 (gdb_agent_helper_thread_id): New macros.
5468 (struct ipa_sym_addresses): Add addr_ust_loaded,
5469 addr_helper_thread_id, addr_cmd_buf.
5470 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5471 (in_process_agent_loaded_ust): New.
5472 (write_e_ust_not_loaded): New.
5473 (maybe_write_ipa_ust_not_loaded): New.
5474 (struct collect_static_trace_data_action): New.
5475 (enum tracepoint_type) <static_tracepoint>: New.
5476 (struct tracepoint) <handle>: Mention static tracepoints.
5477 (struct static_tracepoint_ctx): New.
5478 (CMD_BUF_SIZE): New.
5479 (add_tracepoint_action): Handle static tracepoint actions.
5480 (unprobe_marker_at): New.
5481 (clear_installed_tracepoints): Handle static tracepoints.
5482 (cmd_qtdp): Handle static tracepoints.
5483 (probe_marker_at): New.
5484 (cmd_qtstart): Handle static tracepoints.
5485 (response_tracepoint): Handle static tracepoints.
5486 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5487 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5488 (get_context_regcache): Handle static tracepoints.
5489 (do_action_at_tracepoint): Handle static tracepoint actions.
5490 (traceframe_find_block_type): Handle static trace data blocks.
5491 (traceframe_read_sdata): New.
5492 (download_tracepoints): Download static tracepoint actions.
5493 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5494 (GDB_PROBE_NAME): New.
5499 (ust_marker_to_static_tracepoint): New.
5501 (collect_ust_data_at_tracepoint): New.
5502 (gdb_ust_probe): New.
5503 (UNIX_PATH_MAX, SOCK_DIR): New.
5504 (gdb_ust_connect_sync_socket): New.
5505 (resume_thread, stop_thread): New.
5506 (run_inferior_command): New.
5507 (init_named_socket): New.
5508 (gdb_ust_socket_init): New.
5509 (cstr_to_hexstr): New.
5511 (first_marker, next_marker): New.
5512 (response_ust_marker): New.
5513 (cmd_qtfstm, cmd_qtsstm): New.
5514 (unprobe_marker_at, probe_marker_at): New.
5515 (cmd_qtstmat, gdb_ust_thread): New.
5516 (gdb_ust_init): New.
5517 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5518 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5520 (x86_64_st_collect_regmap): New.
5521 (X86_64_NUM_ST_COLLECT_GREGS): New.
5522 (AMD64_RIP_REGNUM): New.
5523 (supply_static_tracepoint_registers): New.
5524 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5526 (i386_st_collect_regmap): New.
5527 (i386_NUM_ST_COLLECT_GREGS): New.
5528 (supply_static_tracepoint_registers): New.
5529 * server.c (handle_query): Handle qXfer:statictrace:read.
5530 <qSupported>: Report support for StaticTracepoints, and
5531 qXfer:statictrace:read features.
5532 * server.h (traceframe_read_sdata)
5533 (supply_static_tracepoint_registers): Declare.
5534 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5535 (unpack_varlen_hex): Include in IPA build.
5536 * Makefile.in (ustlibs, ustinc): New.
5537 (IPA_OBJS): Add remote-utils-ipa.o.
5538 ($(IPA_LIB)): Link -ldl and -lpthread.
5540 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5541 * config.in, configure: Regenerate.
5543 2010-06-20 Ian Lance Taylor <iant@google.com>
5544 Pedro Alves <pedro@codesourcery.com>
5546 * linux-x86-low.c (always_true): Delete.
5547 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5548 trying to fool the compiler with always_true.
5550 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5552 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5553 conditions in gdbserver.
5555 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5557 * spu-low.c (spu_read_memory): Wrap around local store limit.
5558 (spu_write_memory): Likewise.
5560 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5562 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5563 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5565 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5567 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5568 uses with LONGEST uses.
5570 2010-06-14 Stan Shebs <stan@codesourcery.com>
5571 Pedro Alves <pedro@codesourcery.com>
5575 * linux-x86-low.c: Include limits.h.
5580 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5581 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5582 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5583 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5584 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5585 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5586 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5587 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5588 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5589 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5590 (amd64_emit_void_call_2): New.
5591 (amd64_emit_ops): New.
5592 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5593 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5594 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5595 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5596 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5597 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5598 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5599 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5600 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5601 (i386_emit_stack_adjust, i386_emit_int_call_1)
5602 (i386_emit_void_call_2): New.
5603 (i386_emit_ops): New.
5604 (x86_emit_ops): New.
5605 (the_low_target): Install x86_emit_ops.
5606 * server.h (struct emit_ops): New.
5607 (get_raw_reg_func_addr): Declare.
5608 (current_insn_ptr, emit_error): Declare.
5609 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5610 (set_trace_state_variable_value): New defines.
5611 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5612 addr_get_trace_state_variable_value and
5613 addr_set_trace_state_variable_value.
5614 (symbol_list): New fields for get_raw_reg,
5615 get_trace_state_variable_value and set_trace_state_variable_value.
5616 (condfn): New typedef.
5617 (struct tracepoint): New field `compiled_cond'.
5618 (do_action_at_tracepoint): Clear compiled_cond.
5619 (get_trace_state_variable_value, set_trace_state_variable_value):
5621 (condition_true_at_tracepoint): If there's a compiled condition,
5623 (current_insn_ptr, emit_error): New globals.
5624 (struct bytecode_address): New.
5625 (get_raw_reg_func_addr): New.
5626 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5627 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5628 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5629 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5630 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5631 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5632 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5633 (compile_tracepoint_condition, compile_bytecodes): New.
5634 * target.h (emit_ops): Forward declare.
5635 (struct target_ops): New field emit_ops.
5636 (target_emit_ops): New.
5637 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5638 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5639 * linux-low.c (linux_emit_ops): New.
5640 (linux_target_ops): Install it.
5641 * linux-low.h (struct linux_target_ops): New field emit_ops.
5643 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5645 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5646 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5648 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5649 Stan Shebs <stan@codesourcery.com>
5651 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5652 (all): Depend on $(extra_libraries).
5653 (install-only): Install the IPA.
5654 (IPA_OBJS, IPA_LIB): New.
5655 (clean): Remove the IPA lib.
5656 (IPAGENT_CFLAGS): New.
5657 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5658 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5659 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5660 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5661 * configure.ac: Check for atomic builtins support in the compiler.
5662 (IPA_DEPFILES, extra_libraries): Define.
5663 * configure.srv (ipa_obj): Add description.
5664 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5665 (i[34567]86-*-linux*): Set ipa_obj.
5666 (x86_64-*-linux*): Set ipa_obj.
5667 * linux-low.c (stabilizing_threads): New.
5668 (supports_fast_tracepoints): New.
5669 (linux_detach): Stabilize threads before detaching.
5670 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5671 the lwp is either not stabilizing, or is moving out of a jump pad.
5672 (linux_fast_tracepoint_collecting): New.
5673 (maybe_move_out_of_jump_pad): New.
5674 (enqueue_one_deferred_signal): New.
5675 (dequeue_one_deferred_signal): New.
5676 (linux_wait_for_event_1): If moving out of a jump pad, defer
5677 pending signals to later.
5678 (linux_stabilize_threads): New.
5679 (linux_wait_1): Check if threads need moving out of jump pads, and
5681 (stuck_in_jump_pad_callback): New.
5682 (move_out_of_jump_pad_callback): New.
5684 (linux_resume_one_lwp): Handle moving out of jump pads.
5685 (linux_set_resume_request): Dequeue deferred signals.
5686 (need_step_over_p): Also step over fast tracepoint jumps.
5687 (start_step_over): Also uninsert fast tracepoint jumps.
5688 (finish_step_over): Also reinsert fast tracepoint jumps.
5689 (linux_install_fast_tracepoint_jump): New.
5690 (linux_target_ops): Install linux_stabilize_threads and
5691 linux_install_fast_tracepoint_jump_pad.
5692 * linux-low.h (linux_target_ops) <get_thread_area,
5693 install_fast_tracepoint_jump_pad>: New fields.
5694 (struct lwp_info) <collecting_fast_tracepoint,
5695 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5696 (linux_get_thread_area): Declare.
5697 * linux-x86-low.c (jump_insn): New.
5698 (x86_get_thread_area): New.
5699 (append_insns): New.
5701 (amd64_install_fast_tracepoint_jump_pad): New.
5702 (i386_install_fast_tracepoint_jump_pad): New.
5703 (x86_install_fast_tracepoint_jump_pad): New.
5704 (the_low_target): Install x86_get_thread_area and
5705 x86_install_fast_tracepoint_jump_pad.
5706 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5707 (struct fast_tracepoint_jump): New.
5708 (fast_tracepoint_jump_insn): New.
5709 (fast_tracepoint_jump_shadow): New.
5710 (find_fast_tracepoint_jump_at): New.
5711 (fast_tracepoint_jump_here): New.
5712 (delete_fast_tracepoint_jump): New.
5713 (set_fast_tracepoint_jump): New.
5714 (uninsert_fast_tracepoint_jumps_at): New.
5715 (reinsert_fast_tracepoint_jumps_at): New.
5716 (set_breakpoint_at): Use write_inferior_memory.
5717 (uninsert_raw_breakpoint): Use write_inferior_memory.
5718 (check_mem_read): Mask out fast tracepoint jumps.
5719 (check_mem_write): Mask out fast tracepoint jumps.
5720 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5721 (set_fast_tracepoint_jump): Declare.
5722 (delete_fast_tracepoint_jump)
5723 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5724 (reinsert_fast_tracepoint_jumps_at): Declare.
5725 * regcache.c: Don't compile many functions when building the
5726 in-process agent library.
5727 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5728 the register buffer in the heap.
5729 (free_register_cache): If the register buffer isn't owned by the
5730 regcache, don't free it.
5731 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5732 pre-existing register caches.
5733 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5735 (convert_ascii_to_int): : Constify `from' parameter type.
5736 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5737 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5738 the needed buffer in-place.
5739 (relocate_instruction): New.
5740 * server.c (handle_query) <qSymbols>: If the target supports
5741 tracepoints, give it a chance of looking up symbols. Report
5742 support for fast tracepoints.
5743 (handle_status): Stabilize threads.
5744 (process_serial_event): Adjust.
5745 * server.h (struct fast_tracepoint_jump): Forward declare.
5746 (struct process_info) <fast_tracepoint_jumps>: New field.
5747 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5748 (decode_X_packet, decode_M_packet): Adjust.
5749 (relocate_instruction): Declare.
5750 (in_process_agent_loaded): Declare.
5751 (tracepoint_look_up_symbols): Declare.
5752 (struct fast_tpoint_collect_status): Declare.
5753 (fast_tracepoint_collecting): Declare.
5754 (force_unlock_trace_buffer): Declare.
5755 (handle_tracepoint_bkpts): Declare.
5756 (initialize_low_tracepoint)
5757 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5758 * target.h (struct target_ops) <stabilize_threads,
5759 install_fast_tracepoint_jump_pad>: New fields.
5760 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5761 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5762 [HAVE_STDINT_H]: Include stdint.h.
5763 (trace_debug_1): Rename to ...
5764 (trace_vdebug): ... this.
5765 (trace_debug): Rename to ...
5766 (trace_debug_1): ... this. Add `level' parameter.
5768 (ATTR_USED, ATTR_NOINLINE): New.
5769 (IP_AGENT_EXPORT): New.
5770 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5771 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5772 (about_to_request_buffer_space, trace_buffer_is_full)
5773 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5774 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5775 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5776 (traceframe_write_count, traceframes_created)
5777 (trace_state_variables)
5778 New renaming defines.
5779 (struct ipa_sym_addresses): New.
5780 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5782 (ipa_sym_addrs): New.
5783 (all_tracepoint_symbols_looked_up): New.
5784 (in_process_agent_loaded): New.
5785 (write_e_ipa_not_loaded): New.
5786 (maybe_write_ipa_not_loaded): New.
5787 (tracepoint_look_up_symbols): New.
5788 (debug_threads) [IN_PROCESS_AGENT]: New.
5789 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5790 (UNKNOWN_SIDE_EFFECTS): New.
5791 (stop_tracing): New.
5792 (flush_trace_buffer): New.
5793 (stop_tracing_bkpt): New.
5794 (flush_trace_buffer_bkpt): New.
5795 (read_inferior_integer): New.
5796 (read_inferior_uinteger): New.
5797 (read_inferior_data_pointer): New.
5798 (write_inferior_data_pointer): New.
5799 (write_inferior_integer): New.
5800 (write_inferior_uinteger): New.
5801 (struct collect_static_trace_data_action): Delete.
5802 (enum tracepoint_type): New.
5803 (struct tracepoint) <type>: New field `type'.
5804 <actions_str, step_actions, step_actions_str>: Only include in
5806 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5807 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5808 (tracepoints): Use IP_AGENT_EXPORT.
5809 (last_tracepoint): Don't include in the IPA.
5810 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5811 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5812 (alloced_trace_state_variables): New.
5813 (trace_state_variables): Use IP_AGENT_EXPORT.
5814 (traceframe_t): Delete unused variable.
5815 (circular_trace_buffer): Don't include in the IPA.
5816 (trace_buffer_start): Delete.
5817 (struct trace_buffer_control): New.
5818 (trace_buffer_free): Delete.
5819 (struct ipa_trace_buffer_control): New.
5820 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5821 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5823 (trace_buffer_ctrl): New.
5824 (TRACE_BUFFER_CTRL_CURR): New.
5825 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5826 Reimplement as macros.
5827 (trace_buffer_wrap): Delete.
5828 (traceframe_write_count, traceframe_read_count)
5829 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5830 (struct tracepoint_hit_ctx) <type>: New field.
5831 (struct fast_tracepoint_ctx): New.
5832 (memory_barrier): New.
5834 (record_tracepoint_error): Update atomically in the IPA.
5835 (clear_inferior_trace_buffer): New.
5836 (about_to_request_buffer_space): New.
5837 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5838 updating the same buffer.
5839 (add_tracepoint): Default the tracepoint's type to trap
5840 tracepoint, and orig_size to -1.
5841 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5843 (create_trace_state_variable): New parameter `gdb'. Handle it.
5844 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5845 (cmd_qtdp): Handle fast tracepoints.
5847 (max_jump_pad_size): New.
5848 (gdb_jump_pad_head): New.
5849 (get_jump_space_head): New.
5850 (claim_jump_space): New.
5851 (sort_tracepoints): New.
5852 (MAX_JUMP_SIZE): New.
5853 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5855 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5856 support. Upload fast traceframes, and delete internal IPA
5858 (stop_tracing_handler): New.
5859 (flush_trace_buffer_handler): New.
5860 (cmd_qtstop): Upload fast tracepoints.
5861 (response_tracepoint): Handle fast tracepoints.
5862 (tracepoint_finished_step): Upload fast traceframes. Set the
5863 tracepoint hit context's tracepoint type.
5864 (handle_tracepoint_bkpts): New.
5865 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5866 type. Add comment about fast tracepoints.
5867 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5868 non-existing action_str field.
5869 (get_context_regcache): Handle fast tracepoints.
5870 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5872 (fast_tracepoint_from_jump_pad_address): New.
5873 (fast_tracepoint_from_ipa_tpoint_address): New.
5874 (collecting_t): New.
5875 (force_unlock_trace_buffer): New.
5876 (fast_tracepoint_collecting): New.
5879 (write_inferior_data_ptr): New.
5880 (target_tp_heap): New.
5881 (target_malloc): New.
5882 (download_agent_expr): New.
5884 (download_tracepoints): New.
5885 (download_trace_state_variables): New.
5886 (upload_fast_traceframes): New.
5887 (IPA_FIRST_TRACEFRAME): New.
5888 (IPA_NEXT_TRACEFRAME_1): New.
5889 (IPA_NEXT_TRACEFRAME): New.
5890 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5891 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5892 (gdb_jump_pad_buffer_end): New.
5893 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5894 (initialize_tracepoint): Adjust.
5895 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5896 buffer. Initialize the low module.
5897 * utils.c (PREFIX, TOOLNAME): New.
5898 (malloc_failure): Use PREFIX.
5899 (error): In the IPA, an error causes an exit.
5900 (fatal, warning): Use PREFIX.
5901 (internal_error): Use TOOLNAME.
5902 (NUMCELLS): Increase to 10.
5903 * configure, config.in: Regenerate.
5905 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5907 * server.c (handle_query) <qSupported>: Do two passes over the
5908 qSupported string to avoid nesting strtok.
5910 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5912 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5914 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5916 * configure: Regenerate.
5917 * proc-service.list: New.
5919 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5921 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5924 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5926 * gdbreplay.c (remote_open): Check error return from socket() call by
5927 its equality to -1 not by it being negative.
5928 * remote-utils.c (remote_open): Likewise.
5930 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5932 * config.h: Regenerate.
5934 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5936 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5937 doesn't provide PTRACE_GET_THREAD_AREA.
5939 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5941 * linux-m68k-low.c: Include <asm/ptrace.h>
5942 (ps_get_thread_area): Implement.
5944 2010-05-03 Doug Evans <dje@google.com>
5946 * event-loop.c (struct callback_event): New struct.
5947 (callback_list): New global.
5948 (append_callback_event, delete_callback_event): New functions.
5949 (process_callback): New function.
5950 (start_event_loop): Call it.
5951 * remote-utils.c (NOT_SCHEDULED): Define.
5952 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5953 moved out of readchar.
5954 (readchar): Rewrite. Call reschedule before returning.
5955 (reset_readchar): New function.
5956 (remote_close): Call it.
5957 (process_remaining, reschedule): New functions.
5958 * server.h (callback_handler_func): New typedef.
5959 (append_callback_event, delete_callback_event): Declare.
5961 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5963 * proc-service.c (ps_pglobal_lookup): Use
5964 thread_db_look_up_one_symbol.
5965 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5966 parameter. Use it instead of all_symbols_looked_up.
5967 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5969 (all_symbols_looked_up): Don't declare.
5970 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5971 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5973 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5974 Set all_symbols_looked_up here.
5975 (thread_db_look_up_one_symbol): New.
5976 (thread_db_get_tls_address): Adjust.
5977 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5978 thread_db object on the heap, and tentatively set it in the
5980 (thread_db_init): Don't set all_symbols_looked_up here.
5981 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5983 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5985 * linux-low.c (linux_kill, linux_detach): Adjust.
5986 (status_pending_p_callback): Remove redundant statement. Check
5987 for !TARGET_WAITIKIND_IGNORE, instead of
5988 TARGET_WAITKIND_STOPPED.
5989 (handle_tracepoints): Make sure LWP is locked. Adjust.
5990 (linux_wait_for_event_1): Adjust.
5991 (linux_cancel_breakpoints): New.
5992 (unsuspend_one_lwp): New.
5993 (unsuspend_all_lwps): New.
5994 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5995 (send_sigstop_callback): Change return type to int, add new
5996 `except' parameter and handle it.
5997 (suspend_and_send_sigstop_callback): New.
5998 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5999 pass them down. If SUSPEND, also increment the lwp's suspend
6001 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6002 (need_step_over_p): Don't consider suspended LWPs.
6003 (start_step_over): Adjust.
6004 (proceed_one_lwp): Change return type to int, add new `except'
6005 parameter and handle it.
6006 (unsuspend_and_proceed_one_lwp): New.
6007 (proceed_all_lwps): Use find_inferior instead of
6009 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6010 also decrement the suspend count of LWPs. Pass `except' down,
6011 instead of hacking its suspend count.
6012 (linux_pause_all): Add `freeze' parameter. Adjust.
6013 (linux_unpause_all): New.
6014 (linux_target_ops): Install linux_unpause_all.
6015 * server.c (handle_status): Adjust.
6016 * target.h (struct target_ops): New fields `unpause_all' and
6017 `cancel_breakpoints'. Add new parameter to `pause_all'.
6018 (pause_all): Add new `freeze' parameter.
6020 (cancel_breakpoints): New.
6021 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6023 (cmd_qtstart): Pause threads.
6024 (stop_tracing): Pause threads, and cancel breakpoints.
6025 * win32-low.c (win32_target_ops): Adjust.
6027 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6029 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6030 the inferior right away from here...
6031 (linux_wait_1): ... to here, and adjust to check the thread's
6032 last_resume_kind instead of the lwp's step or stop_expected flags.
6034 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6036 * README: Use consistent `GDB' and `GDBserver' spellings.
6038 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6040 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6041 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6042 (linux_detach_one_lwp): Assume the lwp is stopped.
6043 (any_thread_of): Delete.
6044 (linux_detach): Stop all lwps here. Don't blindly delete all
6046 (delete_lwp_callback): New.
6047 (linux_mourn): Delete all lwps of the process that is gone.
6048 (linux_wait_1): Don't delete the last lwp of the process here.
6049 * mem-break.h (mark_breakpoints_out): Declare.
6050 * mem-break.c (mark_breakpoints_out): New.
6051 (free_all_breakpoints): Use it.
6052 * server.c (handle_target_event): If the process is gone, mark
6054 * thread-db.c (struct thread_db) <create_bp>: New field.
6055 (thread_db_enable_reporting): Fix prototype. Store a thread event
6056 breakpoint reference in the thread_db struct.
6057 (thread_db_load_search): Clear the thread_db object.
6058 (try_thread_db_load_1): Ditto.
6059 (switch_to_process): New.
6060 (disable_thread_event_reporting): Use it.
6061 (remove_thread_event_breakpoints): New.
6062 (thread_db_detach, thread_db_mourn): Use it.
6064 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6066 * linux-low.c (linux_enable_event_reporting): New.
6067 (linux_wait_for_event_1, handle_extended_wait): Use it.
6069 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6071 * linux-low.c (linux_kill_one_lwp, linux_kill)
6072 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6073 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6074 SIGSTOP even if the LWP is stopped.
6075 (send_sigstop_callback): New.
6076 (stop_all_lwps): Use send_sigstop_callback instead.
6077 (linux_resume_one_thread): Adjust.
6078 (proceed_one_lwp): Still proceed an LWP that the client has
6079 requested to stop, if we haven't reported it as stopped yet. Make
6080 sure that LWPs the client want stopped, have a pending SIGSTOP.
6082 2010-04-26 Doug Evans <dje@google.com>
6084 * server.c (handle_general_set): Make static.
6086 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6087 Print received char after testing for error/eof instead of before.
6088 (input_interrupt): Tweak comment.
6090 2010-04-23 Doug Evans <dje@google.com>
6092 * server.c (start_inferior): Print inferior argv if --debug.
6094 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6096 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6097 * nto-x86-low.c: Include server.h
6099 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6101 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6102 be consistent with other sources of this directory.
6103 (init_registers_amd64): Correct name of source file of this function
6106 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6108 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6111 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6113 * win32-i386-low.c: Add 64-bit support.
6114 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6115 (init_registers_amd64): Declare.
6116 (mappings): Add 64-bit version of array.
6117 (init_windows_x86): New function.
6118 (the_low_target): Change init_arch field to init_windows_x86.
6120 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6122 * win32-low.c: Adapt to support also 64-bit architecture.
6123 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6124 (get_image_name): Use SIZE_T type for local variable `done'.
6125 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6126 (toolhelp_get_dll_name): Idem.
6127 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6128 Use uintptr_t typecast to avoid warning.
6129 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6130 (handle_exception): Use phex_nz to avoid warning.
6131 (win32_wait): Remove unused local variable `process'.
6133 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6135 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6138 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6140 * configure.ac: Use `ws2_32' library for srv_mingw.
6141 * configure: Regenerate.
6142 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6143 * remote-utils.c: Likewise.
6145 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6147 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6148 if __x86_64__ is defined.
6150 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6152 * configure: Regenerate.
6154 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6156 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6157 * target.h (target_ops): New get_tib_address field.
6158 * win32-low.h (win32_thread_info): Add thread_local_base field.
6159 * win32-low.c (child_add_thread): Add tlb argument.
6160 Set thread_local_base field to TLB.
6161 (get_child_debug_event): Adapt to child_add_thread change.
6162 (win32_get_tib_address): New function.
6163 (win32_target_ops): Set get_tib_address field to
6164 win32_get_tib_address.
6165 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6167 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6169 * linux-low.c (linux_mourn): Also remove the process.
6170 * server.c (handle_target_event): Don't remove the process here.
6171 * nto-low.c (nto_mourn): New.
6172 (nto_target_ops): Install it.
6173 * spu-low.c (spu_mourn): New.
6174 (spu_target_ops): Install it.
6175 * win32-low.c (win32_mourn): New.
6176 (win32_target_ops): Install it.
6178 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6180 * server.h (buffer_xml_printf): Remove redundant `;'.
6182 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6184 * regcache.c (set_register_cache): Invalidate regcaches before
6185 changing the register cache layout.
6186 (regcache_invalidate_one): Allow a NULL regcache.
6187 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6188 regcaches before changing the register cache layout or the target
6191 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6193 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6194 variable warning on Linux/x86-64.
6196 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6198 GDBserver disconnected tracing support.
6200 * linux-low.c (linux_remove_process): Delete.
6201 (add_lwp): Don't set last_resume_kind here.
6202 (linux_kill): Use `mourn'.
6203 (linux_detach): Use `thread_db_detach', and `mourn'.
6205 (linux_attach_lwp_1): Adjust comment.
6206 (linux_attach): last_resume_kind moved the thread_info; adjust.
6207 (status_pending_p_callback): Adjust.
6208 (linux_wait_for_event_1): Adjust.
6209 (count_events_callback, select_singlestep_lwp_callback)
6210 (select_event_lwp_callback, cancel_breakpoints_callback)
6211 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6212 (proceed_one_lwp): Adjust.
6213 (linux_async): Add debug output.
6214 (linux_thread_stopped): New.
6215 (linux_pause_all): New.
6216 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6218 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6219 (thread_db_free): Delete declaration.
6220 (thread_db_detach, thread_db_mourn): Declare.
6221 * thread-db.c (thread_db_init): Use thread_db_mourn.
6222 (thread_db_free): Delete, split in two.
6223 (disable_thread_event_reporting): New.
6224 (thread_db_detach): New.
6225 (thread_db_mourn): New.
6227 * server.h (struct thread_info) <last_resume_kind>: New field.
6228 <attached>: Add comment.
6229 <gdb_detached>: New field.
6230 (handler_func): Change return type to int.
6231 (handle_serial_event, handle_target_event): Ditto.
6232 (gdb_connected): Declare.
6234 (disconnected_tracing): Declare.
6235 (stop_tracing): Declare.
6237 * server.c (handle_query) <qSupported>: Report support for
6238 disconnected tracing.
6239 (queue_stop_reply_callback): Account for running threads.
6240 (gdb_wants_thread_stopped): New.
6241 (gdb_wants_all_threads_stopped): New.
6242 (gdb_reattached_process): New.
6243 (handle_status): Clear the `gdb_detached' flag of all processes.
6244 In all-stop, stop all threads.
6245 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6246 (process_serial_event): If the remote connection breaks, or if an
6247 exit was forced with "monitor exit", force an event loop exit.
6248 Handle disconnected tracing on detach.
6249 (handle_serial_event): Adjust.
6250 (handle_target_event): If GDB isn't connected, forward events back
6251 to the inferior, unless the last process exited, in which case,
6252 exit gdbserver. Adjust interface.
6254 * remote-utils.c (remote_open): Don't block in accept. Instead
6255 register an event loop source on the listen socket file
6256 descriptor. Refactor bits into ...
6257 (listen_desc): ... this new global.
6258 (gdb_connected): ... this new function.
6259 (enable_async_notification): ... this new function.
6260 (handle_accept_event): ... this new function.
6261 (remote_close): Clear remote_desc.
6263 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6265 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6267 (mourn_inferior): Define.
6268 (target_process_qsupported): Avoid the dangling else problem.
6269 (thread_stopped): Define.
6270 (pause_all): Define.
6271 (target_waitstatus_to_string): Declare.
6272 * target.c (target_waitstatus_to_string): New.
6274 * tracepoint.c (tracing): Make extern.
6275 (disconnected_tracing): New.
6276 (stop_tracing): Make extern. Handle tracing stops due to GDB
6278 (cmd_qtdisconnected): New.
6279 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6280 (handle_tracepoint_general_set): Handle QTDisconnected.
6282 * event-loop.c (event_handler_func): Change return type to int.
6283 (process_event): Bail out if the event handler wants the event
6285 (handle_file_event): Ditto.
6286 (start_event_loop): Bail out if the event handler wants the event
6289 * nto-low.c (nto_target_ops): Adjust.
6290 * spu-low.c (spu_wait): Don't remove the process here.
6291 (spu_target_ops): Adjust.
6292 * win32-low.c (win32_wait): Don't remove the process here.
6293 (win32_target_ops): Adjust.
6295 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6297 * regcache.c (realloc_register_cache): Invalidate inferior's
6298 regcache before recreating it.
6300 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6302 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6304 2010-04-09 Stan Shebs <stan@codesourcery.com>
6305 Pedro Alves <pedro@codesourcery.com>
6307 * server.h (LONGEST): New.
6308 (struct thread_info) <while_stepping>: New field.
6309 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6311 (initialize_tracepoint, handle_tracepoint_general_set)
6312 (handle_tracepoint_query, tracepoint_finished_step)
6313 (tracepoint_was_hit, release_while_stepping_state_list):
6314 (current_traceframe): Declare.
6315 * server.c (handle_general_set): Handle tracepoint packets.
6317 (write_memory): New.
6318 (handle_search_memory_1): Use read_memory.
6319 (handle_query): Report support for conditional tracepoints, trace
6320 state variables, and tracepoint sources. Handle tracepoint
6322 (main): Initialize the tracepoints module.
6323 (process_serial_event): Handle traceframe reads/writes.
6325 * linux-low.c (handle_tracepoints): New.
6326 (linux_wait_1): Call it.
6327 (linux_resume_one_lwp): Handle while-stepping.
6328 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6329 (linux_target_ops): Install them.
6330 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6332 * linux-x86-low.c (x86_supports_tracepoints): New.
6333 (the_low_target). Install it.
6335 * mem-break.h (delete_breakpoint): Declare.
6336 * mem-break.c (delete_breakpoint): Make external.
6338 * target.h (struct target_ops): Add `supports_tracepoints',
6339 `read_pc', and `write_pc' fields.
6340 (target_supports_tracepoints): Define.
6341 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6344 * regcache.h (struct regcache) <registers_owned>: New field.
6345 (init_register_cache, regcache_cpy): Declare.
6346 (regcache_read_pc, regcache_write_pc): Declare.
6347 (register_cache_size): Declare.
6348 (supply_regblock): Declare.
6349 * regcache.c (init_register_cache): New.
6350 (new_register_cache): Use it.
6351 (regcache_cpy): New.
6352 (register_cache_size): New.
6353 (supply_regblock): New.
6354 (regcache_read_pc, regcache_write_pc): New.
6356 * tracepoint.c: New.
6358 * Makefile.in (OBS): Add tracepoint.o.
6359 (tracepoint.o): New rule.
6361 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6363 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6365 (i386-mmx.c): Likewise.
6366 (i386-mmx-linux.o): Likewise.
6367 (i386-mmx-linux.c): Likewise.
6369 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6370 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6371 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6372 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6374 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6375 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6376 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6378 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6380 * Makefile.in (clean): Updated.
6382 (i386-avx.c): Likewise.
6383 (i386-avx-linux.o): Likewise.
6384 (i386-avx-linux.c): Likewise.
6385 (amd64-avx.o): Likewise.
6386 (amd64-avx.c): Likewise.
6387 (amd64-avx-linux.o): Likewise.
6388 (amd64-avx-linux.c): Likewise.
6390 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6391 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6392 (srv_amd64_regobj): Add amd64-avx.o.
6393 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6394 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6395 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6396 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6397 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6398 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6399 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6401 * i387-fp.c: Include "i386-xstate.h".
6403 (i387_cache_to_xsave): Likewise.
6404 (i387_xsave_to_cache): Likewise.
6405 (x86_xcr0): Likewise.
6407 * i387-fp.h (i387_cache_to_xsave): Likewise.
6408 (i387_xsave_to_cache): Likewise.
6409 (x86_xcr0): Likewise.
6411 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6412 * linux-crisv32-low.c (target_regsets): Likewise.
6413 * linux-m68k-low.c (target_regsets): Likewise.
6414 * linux-mips-low.c (target_regsets): Likewise.
6415 * linux-ppc-low.c (target_regsets): Likewise.
6416 * linux-s390-low.c (target_regsets): Likewise.
6417 * linux-sh-low.c (target_regsets): Likewise.
6418 * linux-sparc-low.c (target_regsets): Likewise.
6419 * linux-xtensa-low.c (target_regsets): Likewise.
6421 * linux-low.c: Include <sys/uio.h>.
6422 (regsets_fetch_inferior_registers): Support nt_type.
6423 (regsets_store_inferior_registers): Likewise.
6424 (linux_process_qsupported): New.
6425 (linux_target_ops): Add linux_process_qsupported.
6427 * linux-low.h (regset_info): Add nt_type.
6428 (linux_target_ops): Add process_qsupported.
6430 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6432 (init_registers_i386_avx_linux): New.
6433 (init_registers_amd64_avx_linux): Likewise.
6434 (xmltarget_i386_linux_no_xml): Likewise.
6435 (xmltarget_amd64_linux_no_xml): Likewise.
6436 (PTRACE_GETREGSET): Likewise.
6437 (PTRACE_SETREGSET): Likewise.
6438 (x86_fill_xstateregset): Likewise.
6439 (x86_store_xstateregset): Likewise.
6440 (use_xml): Likewise.
6441 (x86_linux_update_xmltarget): Likewise.
6442 (x86_linux_process_qsupported): Likewise.
6443 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6444 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6445 init_registers_i386_linux here. Call
6446 x86_linux_update_xmltarget.
6447 (the_low_target): Add x86_linux_process_qsupported.
6449 * server.c (handle_query): Call target_process_qsupported.
6451 * target.h (target_ops): Add process_qsupported.
6452 (target_process_qsupported): New.
6454 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6456 * inferiors.c (add_thread): Set last_status kind to
6457 TARGET_WAITKIND_IGNORE.
6458 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6459 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6460 (linux_wait_1): Move `thread' local definition to block that uses
6461 it. Don't NULL initialize `event_child'.
6462 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6463 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6464 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6466 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6468 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6469 an extended waitstatus, or by a watchpoint.
6470 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6471 thread was stepping or has been stopped by a watchpoint.
6473 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6475 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6476 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6477 of another, then delete the previous, and validate all
6479 (validate_inserted_breakpoint): New.
6480 (delete_disabled_breakpoints): New.
6481 (validate_breakpoints): New.
6482 (check_mem_read): Validate breakpoints before trusting their
6483 shadow. Delete disabled breakpoints.
6484 (check_mem_write): Validate breakpoints before trusting they
6485 should be inserted. Delete disabled breakpoints.
6486 * mem-break.h (validate_breakpoints):
6487 * server.c (handle_query): Validate breakpoints when we see a
6490 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6492 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6493 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6494 if we could tell there's a GDB breakpoint at stop_pc.
6495 (need_step_over_p): Don't do a step over if we find a GDB
6496 breakpoint at the resume PC.
6498 * mem-break.c (struct raw_breakpoint): New.
6499 (enum bkpt_type): New type `gdb_breakpoint'.
6500 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6501 fields. New field `raw'.
6502 (find_raw_breakpoint_at): New.
6503 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6505 (set_breakpoint_at): Adjust.
6506 (delete_raw_breakpoint): New.
6507 (release_breakpoint): New.
6508 (delete_breakpoint): Rename to...
6509 (delete_breakpoint_1): ... this. Add proc parameter. Use
6510 release_breakpoint. Return ENOENT.
6511 (delete_breakpoint): Reimplement.
6512 (find_breakpoint_at): Delete.
6513 (find_gdb_breakpoint_at): New.
6514 (delete_breakpoint_at): Delete.
6515 (set_gdb_breakpoint_at): New.
6516 (delete_gdb_breakpoint_at): New.
6517 (gdb_breakpoint_here): New.
6518 (set_reinsert_breakpoint): Use release_breakpoint.
6519 (uninsert_breakpoint): Rename to ...
6520 (uninsert_raw_breakpoint): ... this.
6521 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6522 (reinsert_raw_breakpoint): Change parameter type to
6524 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6526 (check_breakpoints): Adjust. Use release_breakpoint.
6527 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6528 (breakpoint_inserted_here): Ditto.
6529 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6530 Don't trust the breakpoint's shadow if it is not inserted.
6531 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6532 (delete_all_breakpoints): Adjust.
6533 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6534 use delete_breakpoint_1.
6536 * mem-break.h (breakpoints_supported): Delete declaration.
6537 (set_gdb_breakpoint_at): Declare.
6538 (gdb_breakpoint_here): Declare.
6539 (delete_breakpoint_at): Delete.
6540 (delete_gdb_breakpoint_at): Declare.
6542 * server.h (struct raw_breakpoint): Forward declare.
6543 (struct process_info): New field `raw_breakpoints'.
6545 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6548 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6550 * linux-low.c (status_pending_p_callback): Fix comment.
6551 (linux_wait_for_event_1): Move most of the internal breakpoint
6552 handling from here...
6553 (linux_wait_1): ... to here.
6554 (count_events_callback): New.
6555 (select_singlestep_lwp_callback): New.
6556 (select_event_lwp_callback): New.
6557 (cancel_breakpoints_callback): New.
6558 (select_event_lwp): New.
6559 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6560 priority to all LWPs that have had events that should be reported
6561 to the client. Cancel breakpoints when about to reporting the
6562 event to the client, not while stopping lwps. No longer cancel
6563 finished single-steps here.
6564 (cancel_finished_single_step): Delete.
6565 (cancel_finished_single_steps): Delete.
6567 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6569 * mem-break.c (enum bkpt_type): New.
6570 (struct breakpoint): New field `type'.
6571 (set_breakpoint_at): Change return type to struct breakpoint
6572 pointer. Set type to `other_breakpoint' by default.
6573 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6574 in the breakpoint list.
6575 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6576 (reinsert_breakpoint): Rename to ...
6577 (reinsert_raw_breakpoint): ... this.
6578 (reinsert_breakpoints_at): Adjust.
6579 * mem-break.h (struct breakpoint): Declare.
6580 (set_breakpoint_at): Change return type to struct breakpoint
6583 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6585 * server.c (handle_query): Assign, not compare.
6587 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6589 Teach linux gdbserver to step-over-breakpoints.
6591 * linux-low.c (can_hardware_single_step): New.
6592 (supports_breakpoints): New.
6593 (handle_extended_wait): If stopping threads, read the stop pc of
6596 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6597 low target doesn't support retrieving the PC.
6598 (add_lwp): Set last_resume_kind to resume_continue.
6599 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6600 (linux_attach): Don't clear stop_expected. Set the lwp's
6601 last_resume_kind to resume_stop.
6602 (linux_detach_one_lwp): Don't check for removed breakpoints.
6603 (check_removed_breakpoint): Delete.
6604 (status_pending_p): Rename to ...
6605 (status_pending_p_callback): ... this. Don't check for removed
6606 breakpoints. Don't consider threads that are stopped from GDB's
6608 (linux_wait_for_lwp): Always read the stop_pc here.
6609 (cancel_breakpoint): New.
6610 (step_over_bkpt): New global.
6611 (linux_wait_for_event_1): Implement stepping over breakpoints.
6612 (gdb_wants_lwp_stopped): New.
6613 (gdb_wants_all_stopped): New.
6614 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6615 single-step traps here. Store the thread's last reported target
6617 (send_sigstop): Don't clear stop_expected. Always set it,
6619 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6620 (cancel_finished_single_step): New.
6621 (cancel_finished_single_steps): New.
6622 (wait_for_sigstop): Don't cancel finished single-step traps here.
6623 (linux_resume_one_lwp): Don't check for removed breakpoints.
6624 Don't set `step' on non-hardware step archs.
6625 (linux_set_resume_request): Ignore resume_stop requests if already
6626 stopping or stopped. Set the lwp's last_resume_kind.
6627 (resume_status_pending_p): Don't check for removed breakpoints.
6628 (need_step_over_p): New.
6629 (start_step_over): New.
6630 (finish_step_over): New.
6631 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6632 requests. Clear the thread's last reported target waitstatus.
6633 Don't use the `suspended' flag. Don't consider pending breakpoints.
6634 (linux_resume): Start a step-over if necessary.
6635 (proceed_one_lwp): New.
6636 (proceed_all_lwps): New.
6637 (unstop_all_lwps): New.
6638 * linux-low.h (struct lwp_info): Rewrite comment for the
6639 `suspended' flag. Add the `stop_pc' field. Delete the
6640 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6641 Add `'last_resume_kind' and `need_step_over' fields.
6642 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6643 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6644 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6645 (set_raw_breakpoint_at): New.
6646 (set_breakpoint_at): Rewrite to use it.
6647 (reinsert_breakpoint_handler): Delete.
6648 (set_reinsert_breakpoint): New.
6649 (reinsert_breakpoint_by_bp): Delete.
6650 (delete_reinsert_breakpoints): New.
6651 (uninsert_breakpoint): Rewrite.
6652 (uninsert_breakpoints_at): New.
6653 (reinsert_breakpoint): Rewrite.
6654 (reinsert_breakpoints_at): New.
6655 (check_breakpoints): Rewrite.
6656 (breakpoint_here): New.
6657 (breakpoint_inserted_here): New.
6658 (check_mem_read): Adjust.
6659 * mem-break.h (breakpoints_supported, breakpoint_here)
6660 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6661 (reinsert_breakpoint_by_bp): Delete declaration.
6662 (delete_reinsert_breakpoints): Declare.
6663 (reinsert_breakpoint): Delete declaration.
6664 (reinsert_breakpoints_at): Declare.
6665 (uninsert_breakpoint): Delete declaration.
6666 (uninsert_breakpoints_at): Declare.
6667 (check_breakpoints): Adjust prototype.
6668 * server.h: Adjust include order.
6669 (struct thread_info): Declare here. Add a `last_status' field.
6671 2010-03-23 Michael Snyder <msnyder@vmware.com>
6673 * server.c (crc32): New function.
6674 (handle_query): Add handling for 'qCRC:' request.
6676 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6678 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6679 lwp had been stopped by a watchpoint.
6681 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6683 * server.h (internal_error): Declare.
6684 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6685 * utils.c (internal_error): New function.
6687 2010-03-15 Andreas Schwab <schwab@redhat.com>
6689 * configure.srv: Fix typo setting srv_regobj.
6691 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6693 * linux-low.c (fetch_register): Avoid passing a non string literal
6695 (usr_store_inferior_registers): Ditto.
6697 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6699 * linux-low.c (linux_write_memory): Bail out early if peeking
6702 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6704 * linux-low.h (struct lwp_info): New fields
6705 `stopped_by_watchpoint' and `stopped_data_address'.
6706 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6707 here, and cache them in the lwp object.
6708 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6710 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6712 (linux_stopped_by_watchpoint): Rewrite.
6713 (linux_stopped_data_address): Rewrite.
6715 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6717 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6718 switching the current inferior, not before.
6720 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6722 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6723 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6724 i386-linux.c and amd64-linux.c.
6725 (reg-i386.o): Removed.
6726 (reg-i386.c): Likewise.
6727 (reg-i386-linux.o): Likewise.
6728 (reg-i386-linux.c): Likewise.
6729 (reg-x86-64.o): Likewise.
6730 (reg-x86-64.c): Likewise.
6731 (reg-x86-64-linux.o): Likewise.
6732 (reg-x86-64-linux.c): Likewise.
6735 (i386-linux.o): Likewise.
6736 (i386-linux.c): Likewise.
6737 (amd64.o): Likewise.
6738 (amd64.c): Likewise.
6739 (amd64-linux.o): Likewise.
6740 (amd64-linux.c): Likewise.
6742 * configure.srv (srv_i386_regobj): New.
6743 (srv_i386_linux_regobj): Likewise.
6744 (srv_amd64_regobj): Likewise.
6745 (srv_amd64_linux_regobj): Likewise.
6746 (srv_i386_32bit_xmlfiles): Likewise.
6747 (srv_i386_64bit_xmlfiles): Likewise.
6748 (srv_i386_xmlfiles): Likewise.
6749 (srv_amd64_xmlfiles): Likewise.
6750 (srv_i386_linux_xmlfiles): Likewise.
6751 (srv_amd64_linux_xmlfiles): Likewise.
6752 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6753 srv_xmlfiles to $srv_i386_xmlfiles.
6754 (i[34567]86-*-mingw32ce*): Likewise.
6755 (i[34567]86-*-mingw*): Likewise.
6756 (i[34567]86-*-nto*): Likewise.
6757 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6758 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6759 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6760 (x86_64-*-linux*): Likewise.
6762 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6763 (init_registers_amd64_linux): New.
6764 (x86_arch_setup): Replace init_registers_x86_64_linux with
6765 init_registers_amd64_linux.
6767 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6769 * configure.ac: Check for libdl. If it is not available link against
6770 static libthread_db.
6771 * configure: Regenerate.
6773 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6777 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6778 handing a read watchpoint.
6779 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6781 2010-02-12 Doug Evans <dje@google.com>
6783 * linux-low.c (linux_supports_tracefork_flag): Document.
6784 (linux_look_up_symbols): Add comment.
6786 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6788 * regcache.c (supply_register): Clear regcache if buf is NULL.
6790 2010-02-02 Nicolas Roche <roche@sourceware.org>
6791 Joel Brobecker <brobecker@adacore.com>
6793 * inferiors.c (find_inferior): Add function documentation.
6794 (unloaded_dll): Handle the case where the unloaded dll has not
6795 been previously registered in the dll list.
6797 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6799 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6800 (thumb2_breakpoint): New.
6801 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6803 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6805 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6806 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6809 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6811 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6813 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6815 * linux-s390-low.c (s390_collect_ptrace_register)
6816 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6818 2010-01-21 Doug Evans <dje@google.com>
6820 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6821 (PTRACE_ARG4_TYPE): New macro.
6822 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6823 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6824 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6825 (usr_store_inferior_registers): Ditto.
6826 (linux_read_memory, linux_write_memory): Ditto.
6827 (linux_test_for_tracefork): Ditto.
6829 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6830 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6832 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6834 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6837 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6839 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6840 prototype to take a regcache. Adjust.
6842 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6844 * regcache.h (struct thread_info): Forward declare.
6845 (struct regcache): New.
6846 (new_register_cache): Adjust prototype.
6847 (get_thread_regcache): Declare.
6848 (free_register_cache): Adjust prototype.
6849 (registers_to_string, registers_from_string): Ditto.
6850 (supply_register, supply_register_by_name, collect_register)
6851 (collect_register_as_string, collect_register_by_name): Ditto.
6852 * regcache.c (struct inferior_regcache_data): Delete.
6853 (get_regcache): Rename to ...
6854 (get_thread_regcache): ... this. Adjust. Switch inferior before
6856 (regcache_invalidate_one): Adjust.
6857 (regcache_invalidate): Fix prototype.
6858 (new_register_cache): Return the new register cache.
6859 (free_register_cache): Change prototype.
6860 (realloc_register_cache): Adjust.
6861 (registers_to_string): Change prototype to take a regcache. Adjust.
6862 (registers_from_string): Ditto.
6863 (register_data): Ditto.
6864 (supply_register): Ditto.
6865 (supply_register_by_name): Ditto.
6866 (collect_register): Ditto.
6867 (collect_register_as_string): Ditto.
6868 (collect_register_by_name): Ditto.
6869 * server.c (process_serial_event): Adjust.
6870 * linux-low.h (regset_fill_func, regset_store_func): Change
6872 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6874 * linux-low.c (get_stop_pc): Adjust.
6875 (check_removed_breakpoint): Adjust.
6876 (linux_wait_for_event): Adjust.
6877 (linux_resume_one_lwp): Adjust.
6878 (fetch_register): Add regcache parameter. Adjust.
6879 (usr_store_inferior_registers): Ditto.
6880 (regsets_fetch_inferior_registers): Ditto.
6881 (regsets_store_inferior_registers): Ditto.
6882 (linux_fetch_registers, linux_store_registers): Ditto.
6883 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6885 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6887 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6888 prototype to take a regcache.
6889 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6890 * remote-utils.c (convert_ascii_to_int, outreg)
6891 (prepare_resume_reply): Change prototype to take a regcache.
6893 * target.h (struct target_ops) <fetch_registers, store_registers>:
6894 Change prototype to take a regcache.
6895 (fetch_inferior_registers, store_inferior_registers): Change
6896 prototype to take a regcache. Adjust.
6897 * proc-service.c (ps_lgetregs): Adjust.
6898 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6899 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6900 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6901 take a regcache. Adjust.
6902 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6903 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6904 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6905 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6906 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6907 (cris_cannot_fetch_register):
6908 (cris_breakpoint_at): Change prototype to take a regcache.
6910 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6911 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6912 to take a regcache. Adjust.
6913 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6915 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6916 take a regcache. Adjust.
6917 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6918 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6919 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6920 * linux-mips-low.c (mips_get_pc):
6921 (mips_set_pc): Change prototype to take a regcache. Adjust.
6922 (mips_reinsert_addr): Adjust.
6923 (mips_collect_register): Change prototype to take a regcache.
6925 (mips_supply_register):
6926 (mips_collect_register_32bit, mips_supply_register_32bit)
6927 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6928 (mips_store_fpregset): Ditto.
6929 * linux-ppc-low.c (ppc_supply_ptrace_register)
6930 (ppc_supply_ptrace_register): Ditto.
6931 (parse_spufs_run): Adjust.
6932 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6933 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6934 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6935 take a regcache. Adjust.
6936 * linux-s390-low.c (s390_collect_ptrace_register)
6937 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6938 (s390_set_pc): Change prototype to take a regcache. Adjust.
6939 (s390_arch_setup): Adjust.
6940 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6941 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6942 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6943 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6944 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6946 (sparc_breakpoint_at): Adjust.
6947 * linux-xtensa-low.c (xtensa_fill_gregset):
6948 (xtensa_store_gregset):
6949 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6950 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6951 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6952 prototype to take a regcache. Adjust.
6953 * win32-arm-low.c (arm_fetch_inferior_register)
6954 (arm_store_inferior_register): Change prototype to take a
6956 * win32-i386-low.c (i386_fetch_inferior_register)
6957 (i386_store_inferior_register): Change prototype to take a
6959 * win32-low.c (child_fetch_inferior_registers)
6960 (child_store_inferior_registers): Change prototype to take a
6962 (win32_wait): Adjust.
6963 (win32_fetch_inferior_registers): Change prototype to take a
6965 (win32_store_inferior_registers): Adjust.
6966 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6967 store_inferior_register>: Change prototype to take a regcache.
6969 2010-01-20 Doug Evans <dje@google.com>
6971 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6973 (linux_wait_for_event1, linux_init_signals): Ditto.
6974 (W_STOPCODE): Provide definition if missing.
6976 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6978 * linux-low.c (linux_core_of_thread): New.
6979 (compare_ints, show_process, list_threads): New.
6980 (linux_qxfer_osdata): Report threads and cores.
6981 (linux_target_op): Register linux_core_of_thread.
6982 * remote-utils.c (prepare_resume_reply): Report the core.
6983 (buffer_xml_printf): Support %d specifier.
6984 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6986 (handle_query): Handle qXfer:threads. Announce availability
6988 * target.h (struct target_ops): New field core_of_thread.
6990 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6992 * Makefile.in (clean): Remove new generated files.
6993 (reg-s390.o, reg-s390.c): Remove rules.
6994 (reg-s390x.o, reg-s390x.c): Likewise.
6995 (s390-linux32.o, s390-linux32.c): Add rules.
6996 (s390-linux64.o, s390-linux64.c): Likewise.
6997 (s390x-linux64.o, s390x-linux64.c): Likewise.
6998 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6999 * linux-s390-low.c: Include <elf.h>.
7000 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7001 (init_registers_s390): Remove prototype.
7002 (init_registers_s390x): Likewise.
7003 (init_registers_s390_linux32): Add prototype.
7004 (init_registers_s390_linux64): Likewise.
7005 (init_registers_s390x_linux64): Likewise.
7006 (s390_num_regs_3264): New define.
7007 (s390_regmap_3264): New global variable.
7008 (s390_cannot_fetch_register): Remove obsolete check.
7009 (s390_cannot_store_register): Likewise.
7010 (s390_collect_ptrace_register): Handle upper/lower register halves.
7011 (s390_supply_ptrace_register): Likewise.
7012 (s390_fill_gregset): Update to register number changes.
7013 (s390_get_hwcap): New routine.
7014 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7015 Install appropriate regmap and register set.
7017 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7019 * server.c (gdbserver_version): Update copyright year to 2010.
7020 * gdbreplay.c (gdbreplay_version): Likewise.
7022 2009-12-28 Doug Evans <dje@google.com>
7024 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7025 elf/external.h. Include <elf.h> instead but only if necessary.
7027 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7029 * linux-low.c (linux_remove_process): Remove `detaching'
7030 parameter. Don't release/detach from thread_db here.
7031 (linux_kill): Release/detach from thread_db here, ...
7032 (linux_detach): ... and here, before actually detaching.
7033 (linux_wait_1): ... and here, when a process exits.
7034 * thread-db.c (any_thread_of): New.
7035 (thread_db_free): Switch the current inferior to a thread of the
7038 2009-12-21 Doug Evans <dje@google.com>
7040 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7042 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7043 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7044 warning ifndef __NR_tkill. Move setting of errno there too.
7045 Delete unnecessary resetting of errno after syscall.
7046 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7048 * configure.ac: Check for dladdr.
7049 * config.in: Regenerate.
7050 * configure: Regenerate.
7051 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7052 (try_thread_db_load): Update.
7054 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7056 2009-12-18 Doug Evans <dje@google.com>
7058 * event-loop.c: Include unistd.h if it exists.
7060 * linux-low.c (my_waitpid): Move definition away from being in
7061 between linux_tracefork_child/linux_test_for_tracefork.
7063 * gdb_proc_service.h (psaddr_t): Fix type.
7064 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7065 signature to match glibc.
7067 2009-12-16 Doug Evans <dje@google.com>
7069 * linux-low.c (linux_read_memory): Fix argument to read.
7071 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7073 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7074 events, don't leave current_inferior pointing at null.
7076 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7078 * win32-low.c (LOG): Delete.
7079 (OUTMSG): Output to stderr.
7080 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7081 on compile time LOG macro.
7082 (win32_wait): Fix debug output.
7084 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7086 * win32-low.c (win32_add_one_solib): If the dll name is
7087 "ntdll.dll", prepend the system directory to the dll path.
7089 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7091 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7093 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7094 Vladimir Prus <vladimir@codesourcery.com>
7096 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7097 * configure.ac: Check for __mcoldfire__ and set
7098 gdb_cv_m68k_is_coldfire.
7099 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7100 reg-cf.o and reg-m68k.o.
7101 * configure: Regenerated.
7103 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7105 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7106 Pass it to thread_db_free.
7107 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7108 proper `detaching' argument to linux_remove_process.
7109 * linux-low.h (thread_db_free): Add `detaching' parameter.
7110 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7112 (thread_db_free): Add `detaching' parameter. Only
7113 call td_ta_clear_event if detaching from process.
7115 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7117 * thread-db.c (thread_db_free): Fix typo.
7119 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7122 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7124 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7126 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7127 with an i686 compiler.
7128 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7130 * configure: Rebuilt.
7132 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7136 * server.c (handle_search_memory_1): Correct read_addr initialization
7137 in loop for searching subsequent chunks.
7139 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7141 * configure.ac: New --with-libthread-db option.
7142 * thread-db.c: Allow direct dependence on libthread_db.
7143 (thread_db_free): Adjust.
7144 * config.in: Regenerate.
7145 * configure: Likewise.
7147 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7150 * thread-db.c (attach_thread): New function.
7151 (maybe_attach_thread): Return success/failure.
7152 (find_new_threads_callback): Adjust.
7153 (thread_db_find_new_threads): Loop until no new threads.
7155 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7157 * proc-service.c (ps_lgetregs): Formatting.
7159 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7161 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7162 * configure.ac: Adjust.
7163 * linux-low.h (struct process_info_private): Move members to struct
7165 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7166 * linux-low.c (linux_remove_process): Adjust.
7167 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7168 * server.c (handle_query): Move code ...
7169 (handle_monitor_command): ... here. New function.
7170 * target.h (struct target_ops): New member.
7171 * thread-db.c (struct thread_db): New.
7172 (libthread_db_search_path): New variable.
7173 (thread_db_create_event, thread_db_enable_reporting)
7174 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7175 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7176 (try_thread_db_load_1, dladdr_to_soname): New functions.
7177 (try_thread_db_load, thread_db_load_search): New functions.
7178 (thread_db_init): Search for libthread_db.
7179 (thread_db_free): New function.
7180 (thread_db_handle_monitor_command): Likewise.
7181 * config.in: Regenerate.
7182 * configure: Regenerate.
7184 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7186 * spu-low.c (spu_kill): Wait for inferior to terminate.
7187 Call clear_inferiors.
7188 (spu_detach): Call clear_inferiors.
7190 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7192 * aclocal.m4: Regenerate.
7193 * config.in: Likewise.
7194 * configure: Likewise.
7196 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7198 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7199 (parse_spufs_run): New function.
7200 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7201 (ppc_breakpoint_at): Handle SPU breakpoints.
7203 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7205 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7206 (SPUFS_MAGIC): Define.
7207 (spu_enumerate_spu_ids): New function.
7208 (linux_qxfer_spu): New function.
7209 (linux_target_ops): Install linux_qxfer_spu.
7211 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7213 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7214 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7215 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7216 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7217 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7218 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7219 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7220 (init_registers_powerpc_cell32l): Add prototype.
7221 (init_registers_powerpc_cell64l): Likewise.
7222 (ppc_arch_setup): Detect Cell/B.E. architecture.
7224 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7226 * Makefile.in (datarootdir): New variable.
7228 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7230 * linux-low.c (linux_write_memory): Update debugging output.
7231 * Makefile.in (clean): Add new descriptions.
7232 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7233 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7234 * configure.srv: Add new files for arm*-*-linux*.
7235 * linux-arm-low.c: Add new declarations.
7236 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7237 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7238 (HWCAP_VFPv3D16): New.
7239 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7240 instead of __IWMMXT__.
7241 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7242 (arm_arch_setup): New.
7243 (target_regsets): Remove #ifdef. Add VFP regset.
7244 (the_low_target): Use arm_arch_setup.
7246 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7248 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7249 the main thread again.
7251 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7253 Adding Neutrino gdbserver.
7254 * configure: Regenerated.
7255 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7256 * configure.srv (i[34567]86-*-nto*): New target.
7257 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7258 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7259 (nto_comctrl) [__QNX__]: New function.
7260 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7262 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7264 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7267 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7268 Pedro Alves <pedro@codesourcery.com>
7270 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7271 don't support CONTEXT_EXTENDED_REGISTERS.
7272 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7273 (the_low_target): Install them.
7274 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7275 failing with ERROR_PIPE_NOT_CONNECTED.
7277 2009-06-30 Doug Evans <dje@google.com>
7278 Pierre Muller <muller@ics.u-strasbg.fr>
7280 Add h/w watchpoint support to x86-linux, win32-i386.
7281 * Makefile.in (SFILES): Add i386-low.c
7282 (i386_low_h): Define.
7283 (i386-low.o): Add dependencies.
7284 (linux-x86-low.o): Add i386-low.h dependency.
7285 (win32-i386-low.o): Ditto.
7286 * i386-low.c: New file.
7287 * i386-low.h: New file.
7288 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7289 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7290 * linux-low.c (linux_add_process): Initialize arch_private.
7291 (linux_remove_process): Free arch_private.
7292 (add_lwp): Initialize arch_private.
7293 (delete_lwp): Free arch_private.
7294 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7296 * linux-low.h (process_info_private): New member arch_private.
7297 (lwp_info): New member arch_private.
7298 (linux_target_ops): New members new_process, new_thread,
7300 (ptid_of): New macro.
7301 * linux-x86-low.c: Include stddef.h, i386-low.h.
7302 (arch_process_info): New struct.
7303 (arch_lwp_info): New struct.
7304 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7305 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7306 (i386_dr_low_get_status): New function.
7307 (x86_insert_point, x86_remove_point): New functions.
7308 (x86_stopped_by_watchpoint): New function.
7309 (x86_stopped_data_address): New function.
7310 (x86_linux_new_process, x86_linux_new_thread): New functions.
7311 (x86_linux_prepare_to_resume): New function.
7312 (the_low_target): Add entries for insert_point, remove_point,
7313 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7315 * server.c (debug_hw_points): New global.
7316 (monitor_show_help): Document set debug-hw-points.
7317 (handle_query): Process "set debug-hw-points".
7318 * server.h (debug_hw_points): Declare.
7319 (paddress): Declare.
7320 * utils.c (NUMCELLS, CELLSIZE): New macros.
7321 (get_sell, xsnprintf, paddress): New functions.
7322 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7323 remove_point, stopped_by_watchpoint, stopped_data_address.
7324 * win32-i386-low.c: Include i386-low.h.
7325 (debug_reg_state): Replaces dr.
7326 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7327 (i386_dr_low_get_status): New function.
7328 (i386_insert_point, i386_remove_point): New functions.
7329 (i386_stopped_by_watchpoint): New function.
7330 (i386_stopped_data_address): New function.
7331 (i386_initial_stuff): Update.
7332 (get_thread_context,set_thread_context,i386_thread_added): Update.
7333 (the_low_target): Add entries for insert_point,
7334 remove_point, stopped_by_watchpoint, stopped_data_address.
7335 * win32-low.c (win32_insert_watchpoint): New function.
7336 (win32_remove_watchpoint): New function.
7337 (win32_stopped_by_watchpoint): New function.
7338 (win32_stopped_data_address): New function.
7339 (win32_target_ops): Add entries for insert_watchpoint,
7340 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7341 * win32-low.h (win32_target_ops): New members insert_point,
7342 remove_point, stopped_by_watchpoint, stopped_data_address.
7344 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7346 * server.c (process_serial_event): Re-return unsupported, not
7347 error, if the type isn't recognized. Re-allow supporting only
7348 insert or remove packets. Also call require_running for
7349 breakpoints. Add missing break statement to default case. Tidy.
7350 * target.h (struct target_ops): Rename insert_watchpoint to
7351 insert_point, and remove_watchpoint to remove_point.
7353 * linux-low.h (struct linux_target_ops): Likewise.
7354 * linux-low.c (linux_insert_watchpoint): Rename to ...
7355 (linux_insert_point): ... this. Adjust.
7356 (linux_remove_watchpoint): Rename to ...
7357 (linux_remove_point): ... this. Adjust.
7358 (linux_target_ops): Adjust.
7359 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7360 (cris_insert_point): ... this.
7361 (cris_remove_watchpoint): Rename to ...
7362 (cris_remove_point): ... this.
7363 (the_low_target): Adjust.
7365 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7367 * server.c (handle_v_kill): Pass signal_pid to
7368 kill_inferior if multi_process is zero.
7370 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7372 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7373 * target.h (target_ops): Comment for *_watchpoint to make it clear
7374 the functions can get types '0' and '1'.
7376 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7378 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7379 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7380 * regcache.c (get_regcache): Likewise.
7381 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7382 * win32-low.c (child_fetch_inferior_registers): Remove check for
7385 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7386 Pedro Alves <pedro@codesourcery.com>
7388 * target.h (struct target_ops) <supports_multi_process>: New
7390 (target_supports_multi_process): New.
7391 * server.c (handle_query): Even if GDB reports support, only
7392 enable multi-process if the target also supports it. Report
7393 multi-process support only if the target backend supports it.
7394 * linux-low.c (linux_supports_multi_process): New function.
7395 (linux_target_ops): Install it as target_supports_multi_process
7398 2009-05-24 Doug Evans <dje@google.com>
7400 Global renaming of find_thread_pid to find_thread_ptid.
7401 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7402 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7403 All callers updated.
7405 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7406 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7409 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7410 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7411 (linux_resume_one_lwp): Ditto.
7413 2009-05-23 Doug Evans <dje@google.com>
7415 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7416 from struct inferior_list_entry * to struct lwp_info *.
7417 All callers updated.
7419 2009-05-13 Doug Evans <dje@google.com>
7421 * linux-x86-low.c: Don't include assert.h.
7422 (x86_siginfo_fixup): Use fatal, not assert.
7423 (x86_arch_setup): Fix comment.
7425 2009-05-12 Doug Evans <dje@google.com>
7427 Biarch support for i386/amd64 gdbserver.
7428 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7429 Add linux-x86-low.c.
7430 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7431 (linux-x86-low.o): Add.
7432 * linux-x86-64-low.c: Delete.
7433 * linux-i386-low.c: Delete.
7434 * linux-x86-low.c: New file.
7435 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7437 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7439 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7440 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7441 (linux_child_pid_to_exec_file): New function.
7442 (elf_64_header_p, elf_64_file_p): New functions.
7443 (siginfo_fixup): New function.
7444 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7445 give target a chance to convert layout.
7446 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7447 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7449 2009-05-07 Doug Evans <dje@google.com>
7451 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7452 (regsets_store_inferior_registers): Ditto.
7454 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7458 * linux-low.c (must_set_ptrace_flags): Delete.
7459 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7461 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7462 `lwp->must_set_ptrace_flags' instead.
7463 (linux_wait_for_event_1): Set ptrace options here.
7464 (linux_wait_1): ... not here.
7466 2009-04-30 Doug Evans <dje@google.com>
7468 * inferiors.c (started_inferior_callback): New function.
7469 (attached_inferior_callback): New function.
7470 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7471 * server.c (print_started_pid, print_attached_pid): New functions.
7472 (detach_or_kill_for_exit): New function.
7473 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7474 * server.h (have_started_inferiors_p): Declare.
7475 (have_attached_inferiors_p): Declare.
7477 * inferiors.c (remove_process): Fix memory leak, free process.
7478 * linux-low.c (linux_remove_process): New function.
7479 (linux_kill): Call it instead of remove_process.
7480 (linux_detach, linux_wait_1): Ditto.
7482 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7484 * configure.srv: Add x86 Windows CE target.
7486 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7488 * inferiors.c (get_thread_process): Make global.
7489 * server.h (get_thread_process): Add prototype.
7490 * thread-db.c (find_one_thread): Use get_thread_process
7491 instead of current_process.
7492 (thread_db_get_tls_address): Do not crash if called when
7493 thread layer is not yet initialized.
7495 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7497 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7498 * spu-low.c (current_tid): Rename to ...
7499 (current_ptid): ... this.
7500 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7501 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7502 ptid_get_lwp (current_ptid) instead of current_tid.
7503 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7504 instead of current_tid. Use find_process_pid to verify pid
7505 argument is valid. Pass proper argument to remove_process.
7506 (spu_thread_alive): Compare current_ptid instead of current_tid.
7507 (spu_resume): Likewise.
7509 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7511 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7514 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7516 Implement the multiprocess extensions, and add linux multiprocess
7519 * server.h (ULONGEST): Declare.
7520 (struct ptid, ptid_t): New.
7521 (minus_one_ptid, null_ptid): Declare.
7522 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7523 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7524 (struct inferior_list_entry): Change `id' type from unsigned from
7526 (struct sym_cache, struct breakpoint, struct
7527 process_info_private): Forward declare.
7528 (struct process_info): Declare.
7529 (current_process): Declare.
7530 (all_processes): Declare.
7531 (initialize_inferiors): Declare.
7532 (add_thread): Adjust to use ptid_t.
7533 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7534 (add_process, remove_process, find_thread_pid): Declare.
7535 (find_inferior_id): Adjust to use ptid_t.
7536 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7537 (multi_process): Declare.
7538 (push_event): Adjust to use ptid_t.
7539 (read_ptid, write_ptid): Declare.
7540 (prepare_resume_reply): Adjust to use ptid_t.
7541 (clear_symbol_cache): Declare.
7542 * inferiors.c (all_processes): New.
7543 (null_ptid, minus_one_ptid): New.
7544 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7545 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7546 (add_thread): Change unsigned long to ptid. Remove gdb_id
7548 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7549 (gdb_id_to_thread): Rename to ...
7550 (find_thread_pid): ... this. Change unsigned long to ptid.
7551 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7552 (loaded_dll, pull_pid_from_list): Adjust.
7553 (add_process, remove_process, find_process_pid)
7554 (get_thread_process, current_process, initialize_inferiors): New.
7555 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7556 (struct target_waitstatus) <related_pid>: Ditto.
7557 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7559 (struct target_ops) <join>: Add `pid' argument.
7560 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7561 (struct target_ops) <wait>: Add `ptid' field. Change return type
7563 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7564 (mywait): Add `ptid' argument. Change return type to ptid_t.
7565 (target_pid_to_str): Declare.
7566 * target.c (set_desired_inferior): Adjust to use ptids.
7567 (mywait): Add new `ptid' argument. Adjust.
7568 (target_pid_to_str): New.
7569 * mem-break.h (free_all_breakpoints): Declare.
7570 * mem-break.c (breakpoints): Delelete.
7571 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7572 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7573 to use per-process breakpoint list.
7574 (free_all_breakpoints): New.
7575 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7576 (symbol_cache, all_symbols_looked_up): Delete.
7578 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7580 (prepare_resume_reply): Change ptid argument's type from unsigned
7581 long to ptid_t. Adjust. Implement W;process and X;process.
7582 (free_sym_cache, clear_symbol_cache): New.
7583 (look_up_one_symbol): Adjust to per-process symbol cache. *
7584 * server.c (cont_thread, general_thread, step_thread): Change type
7587 (multi_process): New.
7588 (last_ptid): Change type to ptid_t.
7589 (struct vstop_notif) <ptid>: Change type to ptid_t.
7590 (queue_stop_reply, push_event): Change `ptid' argument's type to
7592 (discard_queued_stop_replies): Add `pid' argument.
7593 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7594 changes. Don't reference the `attached' global.
7595 (attach_inferior): Adjust to mywait interface changes.
7596 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7597 features. Handle and report "multiprocess+". Handle
7599 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7601 (handle_v_kill): New.
7602 (handle_v_stopped): Adjust to use target_pid_to_str.
7603 (handle_v_requests): Allow multiple attaches and runs when
7604 multiprocess extensions are in effect. Handle "vKill".
7605 (myresume): Adjust to use ptids.
7606 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7607 (handle_status): Adjust to discard_queued_stop_replies interface
7609 (first_thread_of, kill_inferior_callback)
7610 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7611 (main): Call initialize_inferiors. Adjust to use ptids, killing
7612 and detaching from all inferiors. Handle multiprocess packet
7614 * linux-low.h: Include gdb_proc_service.h.
7615 (struct process_info_private): New.
7616 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7617 <lwpid_of>: Use ptid_get_lwp.
7618 (get_lwp_thread): Adjust.
7619 (struct lwp_info): Add `dead' member.
7620 (find_lwp_pid): Declare.
7621 * linux-low.c (thread_db_active): Delete.
7622 (new_inferior): Adjust comment.
7623 (inferior_pid): Delete.
7624 (linux_add_process): New.
7625 (handle_extended_wait): Adjust.
7626 (add_lwp): Change unsigned long to ptid.
7627 (linux_create_inferior): Add process to processes table. Adjust
7628 to use ptids. Don't set new_inferior here.
7629 (linux_attach_lwp): Rename to ...
7630 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7631 it. Adjust to use ptids.
7632 (linux_attach_lwp): New.
7633 (linux_attach): Add process to processes table. Don't set
7635 (struct counter): New.
7636 (second_thread_of_pid_p, last_thread_of_process_p): New.
7637 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7639 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7640 processes. Remove process from process table.
7641 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7642 to multiple processes.
7643 (any_thread_of): New.
7644 (linux_detach): Add `pid' argument, and handle it. Remove process
7645 from processes table.
7646 (linux_join): Add `pid' argument. Handle it.
7647 (linux_thread_alive): Change unsighed long argument to ptid_t.
7648 Consider dead lwps as not being alive.
7649 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7650 threads we're not interested in.
7651 (same_lwp, find_lwp_pid): New.
7652 (linux_wait_for_lwp): Change `pid' argument's type from int to
7654 (linux_wait_for_event): Rename to ...
7655 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7656 from int to ptid_t. Adjust.
7657 (linux_wait_for_event): New.
7658 (linux_wait_1): Add `ptid' argument. Change return type to
7659 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7660 that exit from the process table.
7661 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7663 (mark_lwp_dead): New.
7664 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7665 stopping all threads, mark its main lwp as dead.
7666 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7668 (fetch_register, usr_store_inferior_registers)
7669 (regsets_fetch_inferior_registers)
7670 (regsets_store_inferior_registers, linux_read_memory)
7671 (linux_write_memory): Inline `inferior_pid'.
7672 (linux_look_up_symbols): Adjust to use per-process
7674 (linux_request_interrupt): Adjust to use ptids.
7675 (linux_read_auxv): Inline `inferior_pid'.
7676 (initialize_low): Don't reference thread_db_active.
7677 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7678 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7679 (ps_getpid): Return the pid of the current inferior.
7680 * thread-db.c (proc_handle, thread_agent): Delete.
7681 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7683 (find_one_thread): Change argument type to ptid_t. Adjust to
7685 (maybe_attach_thread): Adjust to per-process data and ptids.
7686 (thread_db_find_new_threads): Ditto.
7687 (thread_db_init): Ditto.
7688 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7689 processes table. Adjust to use ptids.
7690 (spu_kill, spu_detach): Adjust interface. Remove process from
7692 (spu_join, spu_thread_alive): Adjust interface.
7693 (spu_wait): Adjust interface. Remove process from processes
7694 table. Adjust to use ptids.
7695 * win32-low.c (current_inferior_tid): Delete.
7696 (current_inferior_ptid): New.
7697 (debug_event_ptid): New.
7698 (thread_rec): Take a ptid. Adjust.
7699 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7700 (child_delete_thread): Ditto.
7701 (do_initial_child_stuff): Add `attached' argument. Add process to
7703 (child_fetch_inferior_registers, child_store_inferior_registers):
7705 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7706 (win32_attach): Pass 1 to do_initial_child_stuff.
7707 (win32_kill): Adjust interface. Remove process from processes
7709 (win32_detach): Ditto.
7710 (win32_join): Adjust interface.
7711 (win32_thread_alive): Take a ptid.
7712 (win32_resume): Adjust to use ptids.
7713 (get_child_debug_event): Ditto.
7714 (win32_wait): Adjust interface. Remove exiting process from
7717 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7719 Non-stop mode support.
7721 * server.h (non_stop): Declare.
7722 (gdb_client_data, handler_func): Declare.
7723 (delete_file_handler, add_file_handler, start_event_loop):
7725 (handle_serial_event, handle_target_event, push_event)
7726 (putpkt_notif): Declare.
7727 * target.h (enum resume_kind): New.
7728 (struct thread_resume): Replace `step' field by `kind' field.
7729 (TARGET_WNOHANG): Define.
7730 (struct target_ops) <wait>: Add `options' argument.
7731 <supports_non_stop, async, start_non_stop>: New fields.
7732 (target_supports_non_stop, target_async): New.
7733 (start_non_stop): Declare.
7734 (mywait): Add `options' argument.
7735 * target.c (mywait): Add `options' argument. Print child exit
7737 (start_non_stop): New.
7738 * server.c (non_stop, own_buf, mem_buf): New globals.
7739 (struct vstop_notif): New.
7740 (notif_queue): New global.
7741 (queue_stop_reply, push_event, discard_queued_stop_replies)
7742 (send_next_stop_reply): New.
7743 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7745 (attach_inferior): In non-stop mode, don't wait for the target
7747 (handle_general_set): Handle QNonStop.
7748 (handle_query): When handling qC, return the current general
7749 thread, instead of the first thread of the list.
7750 (handle_query): If the backend supports non-stop mode, include
7751 QNonStop+ in the qSupported query response.
7752 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7754 (handle_v_attach, handle_v_run): Handle non-stop mode.
7755 (handle_v_stopped): New.
7756 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7757 (myresume): Adjust to use resume_kind. Handle non-stop.
7758 (queue_stop_reply_callback): New.
7759 (handle_status): Handle non-stop mode.
7760 (main): Clear non_stop flag on reconnection. Use the event-loop.
7761 Refactor serial protocol handling from here ...
7762 (process_serial_event): ... to this new function. When GDB
7763 selects any thread, select one here. In non-stop mode, wait until
7764 GDB acks all pending events before exiting.
7765 (handle_serial_event, handle_target_event): New.
7766 * remote-utils.c (remote_open): Install remote_desc in the event
7768 (remote_close): Remove remote_desc from the event loop.
7769 (putpkt_binary): Rename to...
7770 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7771 (putpkt_binary): New as wrapper around putpkt_binary_1.
7772 (putpkt_notif): New.
7773 (prepare_resume_reply): In non-stop mode, don't change the
7775 * event-loop.c: New.
7776 * Makefile.in (OBJ): Add event-loop.o.
7777 (event-loop.o): New rule.
7779 * linux-low.h (pid_of): Moved here.
7781 (get_lwp_thread): Use lwpid_of.
7782 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7783 * linux-low.c (pid_of): Delete.
7784 (inferior_pid): Use lwpid_of.
7785 (linux_event_pipe): New.
7786 (target_is_async_p): New.
7788 (handle_extended_wait): Use lwpid_of.
7789 (add_lwp): Don't set lwpid field.
7790 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7791 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7792 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7793 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7794 first. Adjust to linux_wait_for_event interface changes. Use
7796 (linux_detach): Don't delete the main lwp here.
7797 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7798 (status_pending_p): Don't consider explicitly suspended lwps.
7799 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7800 pointer. Add OPTIONS argument. Change return type to int. Use
7801 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7802 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7803 pointer. Add status pointer argument. Return a pid instead of a
7804 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7805 changes. In non-stop mode, don't switch to a random thread.
7806 (linux_wait): Rename to...
7807 (linux_wait_1): ... this. Add target_options argument, and handle
7808 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7809 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7810 clean exit and signal exit code. Don't stop all threads in
7811 non-stop mode. In all-stop mode, only stop all threads when
7812 reporting a stop to GDB. Handle explicit thread stop requests.
7813 (async_file_flush, async_file_mark): New.
7815 (send_sigstop): Use lwpid_of.
7816 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7817 interface changes. In non-stop mode, don't switch to a random
7819 (linux_resume_one_lwp): Use lwpid_of.
7820 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7821 (linux_resume_one_thread): ... this. Handle resume_stop. In
7822 non-stop mode, don't look for pending flag in all threads.
7823 (resume_status_pending_p): Don't consider explicitly suspended
7825 (my_waitpid): Reimplement. Emulate __WALL.
7826 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7828 (sigchld_handler, linux_supports_non_stop, linux_async)
7829 (linux_start_non_stop): New.
7830 (linux_target_ops): Register linux_supports_non_stop, linux_async
7831 and linux_start_non_stop.
7832 (initialize_low): Install SIGCHLD handler.
7833 * thread-db.c (thread_db_create_event, find_one_thread)
7834 (thread_db_get_tls_address): Use lwpid_of.
7835 * win32-low.c (win32_detach): Adjust to use resume_kind.
7836 (win32_wait): Add `options' argument.
7837 * spu-low.c (spu_resume): Adjust to use resume_kind.
7838 (spu_wait): Add `options' argument.
7840 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7842 Decouple target code from remote protocol.
7844 * target.h (enum target_waitkind): New.
7845 (struct target_waitstatus): New.
7846 (struct target_ops) <wait>: Return an unsigned long. Take a
7847 target_waitstatus pointer instead of a char pointer.
7849 * target.c (mywait): Change prototype to return an unsigned long.
7850 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7851 * server.h (thread_from_wait, old_thread_from_wait): Delete
7853 (prepare_resume_reply): Change prototype to take a
7855 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7856 (last_status, last_ptid): New.
7857 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7858 pid instead of a signal.
7859 (attach_inferior): Remove "status" and "signal" parameters.
7861 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7863 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7864 (handle_v_requests, myresume): Remove "status" and "signal"
7866 (handle_status): New.
7867 (main): Delete local `status'. Adjust.
7868 * remote-utils.c: Include target.h.
7869 (prepare_resume_reply): Change prototype to take a
7870 target_waitstatus. Adjust.
7872 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7874 * spu-low.c (spu_wait): Adjust.
7875 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7877 (win32_wait): Adjust.
7879 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7881 * target.h (struct thread_resume): Delete leave_stopped member.
7882 (struct target_ops): Add a `n' argument to the `resume' callback.
7883 * server.c (start_inferior): Adjust.
7884 (handle_v_cont, myresume): Adjust.
7885 * linux-low.c (check_removed_breakpoint): Adjust to resume
7886 interface change, and to removed leave_stopped field.
7887 (resume_ptr): Delete.
7888 (struct thread_resume_array): New.
7889 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7890 resume interface change.
7891 (linux_continue_one_thread, linux_queue_one_thread)
7892 (resume_status_pending_p): Check if the resume field is NULL
7893 instead of checking the leave_stopped member.
7894 (linux_resume): Adjust to the target resume interface change.
7895 * spu-low.c (spu_resume): Adjust to the target resume interface
7897 * win32-low.c (win32_detach, win32_resume): Ditto.
7899 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7901 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7903 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7905 (linux_continue_one_thread): Only preserve the stepping flag if
7906 there's a pending breakpoint.
7908 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7910 * server.c (main): After the inferior having exited, call
7911 remote_close before exiting gdbserver.
7913 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7915 Fix size of FPSCR in Power 7 processors.
7916 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7917 (PPC_FEATURE_HAS_DFP): New #define.
7918 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7921 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7923 * server.c (handle_query) Whitespace and formatting.
7925 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7927 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7928 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7929 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7930 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7931 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7932 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7933 Makefile.in, configure.ac: Fix whitespace throughout.
7934 * configure: Regenerate.
7936 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7938 * inferiors.c (find_inferior): Make it safe for the callback
7939 function to delete the currently iterated inferior.
7941 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7943 * Makefile.in (linuw_low_h): Move higher.
7944 (thread-db.o): Depend on $(linux_low_h).
7946 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7948 Rename "process" to "lwp" throughout.
7950 * linux-low.c (all_processes): Rename to...
7951 (all_lwps): ... this.
7952 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7953 (add_process): Rename to ...
7954 (add_lwp): ... this. Adjust.
7955 (linux_create_inferior): Adjust.
7956 (linux_attach_lwp): Adjust.
7957 (linux_attach): Adjust.
7958 (linux_kill_one_process): Rename to ...
7959 (linux_kill_one_lwp): ... this. Adjust.
7960 (linux_kill): Adjust.
7961 (linux_detach_one_process): Rename to ...
7962 (linux_detach_one_lwp): ... this. Adjust.
7963 (linux_detach): Adjust.
7964 (check_removed_breakpoint): Adjust.
7965 (status_pending_p): Adjust.
7966 (linux_wait_for_process): Rename to ...
7967 (linux_wait_for_lwp): ... this. Adjust.
7968 (linux_wait_for_event): Adjust.
7969 (send_sigstop): Adjust.
7970 (wait_for_sigstop): Adjust.
7971 (stop_all_processes): Rename to ...
7972 (stop_all_lwps): ... this.
7973 (linux_resume_one_process): Rename to ...
7974 (linux_resume_one_lwp): ... this. Adjust.
7975 (linux_set_resume_request, linux_continue_one_thread)
7976 (linux_queue_one_thread, resume_status_pending_p)
7977 (usr_store_inferior_registers, regsets_store_inferior_registers)
7978 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7980 * linux-low.h (get_process): Rename to ...
7981 (get_lwp): ... this. Adjust.
7982 (get_thread_process): Rename to ...
7983 (get_thread_lwp): ... this. Adjust.
7984 (get_process_thread): Rename to ...
7985 (get_lwp_thread): ... this. Adjust.
7986 (struct process_info): Rename to ...
7987 (struct lwp_info): ... this.
7988 (all_processes): Rename to ...
7989 (all_lwps): ... this.
7990 * proc-service.c (ps_lgetregs): Adjust.
7991 * thread-db.c (thread_db_create_event, find_one_thread)
7992 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7994 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7996 * server.c (handle_query): Handle "qAttached".
7998 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8000 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8001 GPLv3, update license URL.
8003 2009-03-01 Doug Evans <dje@google.com>
8005 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8006 (server_h): Add gdb_signals.h.
8007 (signals.o): Update.
8008 * server.h (target_signal_from_host,target_signal_to_host_p)
8009 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8011 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8013 * remote-utils.c (getpkt): Also generate remote-debug
8014 information if noack_mode is set.
8016 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8018 * server.c (handle_query): Report qXfer:siginfo:read and
8019 qXfer:siginfo:write as supported and handle them.
8020 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8021 * linux-low.c (linux_xfer_siginfo): New.
8022 (linux_target_ops): Set it.
8024 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8026 * server.c (gdbserver_usage): Mention --remote-debug.
8027 (main): Accept '--remote-debug' switch.
8029 2009-01-18 Doug Evans <dje@google.com>
8031 * regcache.c (new_register_cache): No need to check result of xcalloc.
8032 * server.c (handle_search_memory): Back out calls to xmalloc,
8033 result is checked and error is returned to user upon failure.
8034 (handle_query): Ditto. Add more checks for result of malloc.
8035 (handle_v_cont): Check result of malloc, report error back to
8037 (handle_v_run): Ditto. Call freeargv.
8038 * server.h (freeargv): Declare.
8039 * utils.c (freeargv): New fn.
8041 2009-01-15 Doug Evans <dje@google.com>
8043 * gdbreplay.c (perror_with_name): Make arg const char *.
8044 * server.h (target_signal_to_name): Make return type const char *.
8045 * thread-db.c (thread_db_err_str): Make return type const char *.
8046 * utils.c (perror_with_name): Make arg const char *.
8048 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8050 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8051 when handling a EXIT_PROCESS_DEBUG_EVENT.
8053 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8055 * gdbreplay.c (gdbreplay_version): Update copyright year.
8056 * server.c (gdbserver_version): Likewise.
8058 2009-01-05 Doug Evans <dje@google.com>
8060 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8061 (handle_extended_wait): Improve comment.
8063 2008-12-13 Doug Evans <dje@google.com>
8065 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8066 * server.h (ATTR_MALLOC): New macro.
8067 (xmalloc,xcalloc,xstrdup): Declare.
8068 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8069 * inferiors.c: Ditto.
8070 * linux-low.c: Ditto.
8071 * mem-break.c: Ditto.
8072 * regcache.c: Ditto.
8073 * remote-utils.c: Ditto.
8076 * win32-low.c: Ditto.
8078 2008-12-12 Doug Evans <dje@google.com>
8080 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8081 in debugging printf.
8083 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8085 2008-12-09 Doug Evans <dje@google.com>
8087 * linux-low.h (struct process_info): Delete member tid, unused.
8088 * thread-db.c (find_one_thread): Update.
8089 (maybe_attach_thread): Update.
8091 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8093 * target.h (struct target_ops): Add qxfer_osdata member.
8094 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8096 (linux_qxfer_osdata): New functions.
8097 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8099 * server.c (handle_query): Handle "qXfer:osdata:read:".
8100 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8101 (buffer_xml_printf): New functions.
8102 * server.h (struct buffer): New.
8103 (buffer_grow_str, buffer_grow_str0): New macros.
8104 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8105 (buffer_xml_printf): Declare.
8107 2008-11-24 Doug Evans <dje@google.com>
8109 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8111 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8113 * server.c (handle_v_run): Always use the supplied argument list.
8115 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8117 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8118 (xtensa_regmap_table): Add entry for scompare1.
8120 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8122 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8123 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8124 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8125 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8126 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8127 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8128 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8129 XML target descriptions.
8130 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8131 when inferior is running on an ISA 2.05 or later processor. Add
8132 special case to return offset for full 64-bit slot of FPSCR when
8135 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8137 * Makefile.in (SFILES, clean): Added sparc64 files.
8138 (reg-sparc64.o, reg-sparc64.c): New.
8139 * configure.srv (sparc*-*-linux*): New configuration.
8140 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8141 syscall arguments for SPARC.
8142 (regsets_store_inferior_registers): Likewise.
8143 * linux-sparc-low.c: New file.
8145 2008-10-21 Doug Evans <dje@google.com>
8147 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8148 (READLINE_DIR,READLINE_DEP): Delete.
8149 (INTERNAL_CFLAGS): Update.
8150 (LINTFLAGS): Update.
8152 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8154 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8155 whole argv from the last run, not just argv[0].
8157 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8159 * regcache.c (new_register_cache): Return NULL if the register
8160 cache size isn't known yet.
8161 (free_register_cache): Avoid dereferencing a NULL regcache.
8163 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8165 * configure.srv: Merge MIPS and MIPS64.
8167 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8169 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8171 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8173 * Makefile.in: Add required vsx dependencies.
8175 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8176 Declare init_registers_powerpc_vsx32l.
8177 Declare init_registers_powerpc_vsx64l.
8178 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8179 (ppc_arch_setup): Check for VSX in hwcap.
8180 (ppc_fill_vsxregset): New function.
8181 (ppc_store_vsxregset): New function.
8182 Add new VSX entry in regset_info target_regsets.
8184 * configure.srv: Add new VSX dependencies.
8186 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8188 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8189 (remote_open): Set or clear transport_is_reliable.
8190 (putpkt_binary): Don't expect acks in noack mode.
8191 (getpkt): Don't send ack/nac in noack mode.
8192 * server.c (handle_general_set): Handle QStartNoAckMode.
8193 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8195 (main): Reset noack_mode on every connection.
8196 * server.h (noack_mode): Declare.
8198 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8200 * Makefile.in (GDBREPLAY_OBS): New variable.
8201 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8203 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8204 Daniel Jacobowitz <dan@codesourcery.com>
8206 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8207 (usr_store_inferior_registers): Likewise.
8208 (regsets_store_inferior_registers): Likewise.
8210 2008-07-31 Rolf Jansen <rj@surtec.com>
8211 Pedro Alves <pedro@codesourcery.com>
8213 * configure.ac: Check for memmem declaration.
8214 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8215 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8216 (disable_packet_qfThreadInfo): Unconditionally compile.
8217 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8218 * configure, config.in: Regenerate.
8220 2008-07-28 Doug Kwan <dougkwan@google.com>
8222 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8223 (linux_write_memory): Remove declaration of errno.
8225 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8227 * linux-low.c (handle_extended_wait): Do not use "status"
8228 variable uninitialized.
8230 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8232 * server.c (handle_v_attach): Inhibit reporting dll changes.
8234 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8236 * remote-utils.c (prepare_resume_reply): If requested, don't
8237 output "thread:TID" in the T stop reply.
8239 * server.c (disable_packet_vCont, disable_packet_Tthread)
8240 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8241 (handle_query): If requested, disable support for qC, qfThreadInfo
8243 (handle_v_requests): If requested, disable support for vCont.
8244 (gdbserver_show_disableable): New.
8245 (main): Handle --disable-packet and --disable-packet=LIST.
8247 * server.h (disable_packet_vCont, disable_packet_Tthread)
8248 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8250 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8252 * server.c (gdbserver_usage): Mention --version.
8254 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8256 * Makefile.in (gdbreplay.o): New rule.
8258 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8260 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8261 message, not gdbserver.
8263 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8264 Nathan Sidwell <nathan@codesourcery.com>
8265 Joseph Myers <joseph@codesourcery.com>
8267 * acinclude.m4: Include ../../config/acx.m4.
8268 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8269 * configure, config.in: Regenerate.
8270 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8271 * server.c (gdbserver_version): Print PKGVERSION.
8272 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8273 (main): Adjust gdbserver_usage calls.
8274 * gdbreplay.c (version, host_name): Add declarations.
8275 (gdbreplay_version, gdbreplay_usage): New.
8276 (main): Accept --version and --help options.
8278 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8280 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8281 (arm_breakpoint_at): Handle Thumb.
8282 (the_low_target): Add comment.
8284 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8286 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8288 2008-05-09 Doug Evans <dje@google.com>
8290 * server.h (decode_search_memory_packet): Declare.
8291 * remote-utils.c (decode_search_memory_packet): New fn.
8292 * server.c (handle_search_memory_1): New fn.
8293 (handle_search_memory): New fn.
8294 (handle_query): Process qSearch:memory packets.
8296 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8298 * regcache.c (registers_length): Remove.
8299 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8300 full register packet.
8301 * regcache.h (registers_length): Remove prototype.
8302 * server.h (PBUFSIZ): Define to 16384.
8304 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8306 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8307 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8308 powerpc-64l.o, and powerpc-altivec64l.o.
8309 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8310 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8311 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8312 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8313 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8316 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8317 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8318 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8319 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8320 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8321 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8322 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8323 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8324 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8325 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8328 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8329 (init_registers_powerpc_32l): ... this new prototype.
8330 (init_registers_powerpc_32): Remove, replace by ...
8331 (init_registers_powerpc_altivec32l): ... this new prototype.
8332 (init_registers_powerpc_e500): Remove, replace by ...
8333 (init_registers_powerpc_e500l): ... this new prototype.
8334 (init_registers_ppc64): Remove, replace by ...
8335 (init_registers_powerpc_64l): ... this new prototype.
8336 (init_registers_powerpc_64): Remove, replace by ...
8337 (init_registers_powerpc_altivec64l): ... this new prototype.
8338 (ppc_num_regs): Set to 73.
8339 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8340 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8341 (ppc_cannot_store_register): Handle orig_r3 and trap.
8342 (ppc_arch_setup): Update init_registers_... calls.
8343 (ppc_fill_gregset): Handle orig_r3 and trap.
8345 * inferiors.c (clear_inferiors): Reset current_inferior.
8347 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8349 * acinclude.m4: Add override.m4.
8350 * configure: Regenerate.
8352 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8354 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8355 initial call to init_register_ppc64.
8357 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8359 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8360 single powerpc*-*-linux* case.
8361 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8363 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8365 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8366 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8368 * linux-ppc-low.c: Include <elf.h>.
8369 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8370 (ppc_hwcap): New global variable.
8371 (ppc_regmap): Remove __SPE__ #ifdef sections.
8372 (ppc_regmap_e500): New global variable.
8373 (ppc_cannot_store_register): Update __SPE__ special case.
8374 (ppc_get_hwcap): New function.
8375 (ppc_arch_setup): Use it to determine whether inferior supports
8376 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8377 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8378 Do not access registers if target does not support AltiVec.
8379 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8380 Do not access registers if target does not support SPE.
8381 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8383 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8385 * linux-low.c (disabled_regsets, num_regsets): New.
8386 (use_regsets_p): Delete.
8387 (linux_wait_for_process): Clear disabled_regsets.
8388 (regsets_fetch_inferior_registers): Check and set it.
8389 (regsets_store_inferior_registers): Likewise.
8390 (linux_fetch_registers, linux_store_registers): Do not use
8392 (initialize_low): Allocate disabled_regsets.
8394 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8396 * Makefile.in (LIBOBJS): New.
8398 (memmem.o): New rule.
8399 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8400 * configure: Regenerated.
8402 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8404 * server.c (handle_query): Never return "unsupported" for
8405 qXfer:features:read queries.
8407 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8409 * server.c (get_features_xml): Fix inverted condition.
8410 (handle_query): Always support qXfer:feature:read.
8412 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8414 * server.c (wrapper_argv): New.
8415 (start_inferior): Handle wrapper_argv. If set, expect an extra
8417 (gdbserver_usage): Document --wrapper.
8418 (main): Parse --wrapper.
8420 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8422 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8423 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8424 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8425 (ppc_set_pc): Likewise.
8426 (ppc_arch_setup): New function.
8427 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8428 of collect_register.
8429 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8431 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8433 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8434 instead of linux-ppc64-low.o.
8435 * linux-ppc64-low.c: Remove file.
8436 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8437 (linux-ppc64-low.o): Remove rule.
8439 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8440 (init_registers_powerpc_64): Likewise.
8441 (ppc_regmap): Conditionally define depending on __powerpc64__.
8442 (ppc_cannot_store_register): Do not special-case "fpscr" when
8443 compiled on __powerpc64__.
8444 (ppc_collect_ptrace_register): New function.
8445 (ppc_supply_ptrace_register): New function.
8446 (ppc_breakpoint): Change type to "unsigned int".
8447 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8448 (the_low_target): Conditionally provide initializers for the
8449 arch_setup member depending on __powerpc64__. Install
8450 collect_ptrace_register and supply_ptrace_register members.
8452 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8454 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8455 * server.c (gdbserver_xmltarget): Define.
8456 (get_features_xml): Use it to replace "target.xml" and arch_string.
8458 * configure.srv: Remove srv_xmltarget. Add XML files that were
8459 mentioned there to srv_xmlfiles instead. Remove conditional tests
8460 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8461 srv_xmlfiles and srv_regobj to include all possible choices.
8462 * configure.ac (srv_xmltarget): Remove.
8463 (srv_xmlfiles): Do not add "target.xml".
8464 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8465 checks for supplementary target information.
8466 * configure: Regenerate.
8467 * Makefile.in (XML_TARGET): Remove.
8468 (target.xml): Remove rule.
8469 (clean): Do not clean up target.xml.
8470 (.PRECIOUS): Do not mention target.xml.
8472 * target.h (struct target_ops): Remove arch_string member.
8473 * linux-low.c (linux_arch_string): Remove.
8474 (linux_target_ops): Remove arch_string initializer.
8475 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8476 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8477 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8478 * spu-low.c (spu_arch_string): Remove.
8479 (spu_target_ops): Remove arch_string initializer.
8480 * win32-low.c (win32_arch_string): Remove.
8481 (win32_target_ops): Remove arch_string initializer.
8482 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8483 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8484 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8486 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8488 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8489 by collect_ptrace_register and supply_ptrace_register hooks.
8490 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8491 instead of checking for the_low_target.left_pad_xfer.
8492 (usr_store_inferior_registers): Use collect_ptrace_register callback
8493 instead of checking for the_low_target.left_pad_xfer.
8495 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8496 (s390_supply_ptrace_register): Likewise.
8497 (s390_fill_gregset): Call s390_collect_ptrace_register.
8498 (the_low_target): Update.
8500 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8501 (ppc_supply_ptrace_register): Likewise.
8502 (the_low_target): Update.
8504 * linux-i386-low.c (the_low_target): Update.
8505 * linux-x86-64-low.c (the_low_target): Update.
8507 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8509 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8510 reg-s390.o and reg-s390x.o.
8512 * linux-low.c (new_inferior): New global variable.
8513 (linux_create_inferior, linux_attach): Set it.
8514 (linux_wait_for_process): Call the_low_target.arch_setup after the
8515 target has stopped for the first time.
8516 (initialize_low): Do not call the_low_target.arch_setup.
8518 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8519 (s390_set_pc): Likewise.
8520 (s390_arch_setup): New function.
8521 (the_low_target): Use s390_arch_setup as arch_setup routine.
8523 * regcache.c (realloc_register_cache): New function.
8524 (set_register_cache): Call it for each existing regcache.
8526 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8528 * server.h (init_registers): Remove prototype.
8530 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8531 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8532 instead of init_registers ().
8533 * linux-arm-low.c (init_registers_arm): Add prototype.
8534 (init_registers_arm_with_iwmmxt): Likewise.
8535 (the_low_target): Add initializer for arch_setup field.
8536 * linux-cris-low.c (init_registers_cris): Add prototype.
8537 (the_low_target): Add initializer for arch_setup field.
8538 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8539 (the_low_target): Add initializer for arch_setup field.
8540 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8541 (the_low_target): Add initializer for arch_setup field.
8542 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8543 (the_low_target): Add initializer for arch_setup field.
8544 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8545 (the_low_target): Add initializer for arch_setup field.
8546 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8547 (the_low_target): Add initializer for arch_setup field.
8548 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8549 (init_registers_mips64_linux): Likewise.
8550 (the_low_target): Add initializer for arch_setup field.
8551 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8552 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8553 (the_low_target): Add initializer for arch_setup field.
8554 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8555 (init_registers_powerpc_64): Likewise.
8556 (the_low_target): Add initializer for arch_setup field.
8557 * linux-s390-low.c (init_registers_s390): Add prototype.
8558 (init_registers_s390x): Likewise.
8559 (the_low_target): Add initializer for arch_setup field.
8560 * linux-sh-low.c (init_registers_sh): Add prototype.
8561 (the_low_target): Add initializer for arch_setup field.
8562 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8563 (the_low_target): Add initializer for arch_setup field.
8564 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8565 (the_low_target): Add initializer for arch_setup field.
8567 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8568 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8569 instead of init_registers ().
8570 * win32-arm-low.c (init_registers_arm): Add prototype.
8571 (the_low_target): Add initializer for arch_setup field.
8572 * win32-i386-low.c (init_registers_i386): Add prototype.
8573 (the_low_target): Add initializer for arch_setup field.
8575 * spu-low.c (init_registers_spu): Add prototype.
8576 (initialize_low): Call initialie_registers_spu () instead of
8577 initialize_registers ().
8579 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8581 * server.c (handle_v_requests): When handling the vRun and vAttach
8582 packets, if already debugging a process, don't kill it. Return an
8585 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8587 * server.c (handle_query): Correct length check.
8589 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8591 * win32-low.c (do_initial_child_stuff): Add process handle
8592 parameter. Set current_process_handle and current_process_id from the
8593 parameters. Clear globals.
8594 (win32_create_inferior): Don't set current_process_handle and
8595 current_process_id here. Instead pass them on the call to
8596 do_initial_child_stuff.
8597 (win32_attach): Likewise.
8598 (win32_clear_inferiors): New.
8599 (win32_kill): Don't close the current process handle or the
8600 current thread handle here. Instead call win32_clear_inferiors.
8601 (win32_detach): Don't open a new handle to the process. Call
8602 win32_clear_inferiors.
8603 (win32_join): Don't rely on current_process_handle; open a new
8604 handle using the process id.
8605 (win32_wait): Call win32_clear_inferiors when the inferior process
8608 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8610 * server.c (monitor_show_help): Add "exit".
8612 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8614 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8615 (clean): Add reg-xtensa.c.
8616 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8617 * configure.srv (xtensa*-*-linux*) New target.
8618 * linux-xtensa-low.c: New.
8619 * xtensa-xtregs.c: New.
8621 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8623 * hostio.c: Don't include errno.h.
8624 (errno_to_fileio_errno): Move to hostio-errno.
8625 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8626 error number outputting to the target->hostio_last_error callback.
8627 (hostio_packet_error): Use FILEIO_EINVAL directly.
8628 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8629 calls to hostio_error.
8630 * hostio-errno.c: New.
8631 * server.h (hostio_last_error_from_errno): Declare.
8632 * target.h (target_ops): Add hostio_last_error member.
8633 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8634 as hostio_last_error handler.
8635 * spu-low.c (spu_target_ops): Likewise.
8636 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8637 (wince_hostio_last_error): New functions.
8638 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8639 as hostio_last_error handler.
8640 (win32_target_ops) [!_WIN32_WCE]: Register
8641 hostio_last_error_from_errno as hostio_last_error handler.
8642 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8643 (hostio-errno.o): New rule.
8644 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8645 * configure.srv (srv_hostio_err_objs): New variable. Default to
8647 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8648 * configure: Regenerate.
8650 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8652 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8653 (linux_kill, linux_detach): Clean up the process list.
8654 * remote-utils.c (remote_open): Improve port number parsing.
8655 (putpkt_binary, input_interrupt): Only send interrupts if the target
8657 * server.c (extended_protocol): Make static.
8658 (attached): Define earlier.
8659 (exit_requested, response_needed, program_argv): New variables.
8660 (target_running): New.
8661 (start_inferior): Clear attached here.
8662 (attach_inferior): Set attached here.
8663 (require_running): Define.
8664 (handle_query): Use require_running and target_running. Implement
8666 (handle_v_attach, handle_v_run): New.
8667 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8668 (gdbserver_usage): Update.
8669 (main): Redo argument parsing. Handle --debug and --multi. Handle
8670 --attach along with other options or after the port. Save
8671 program_argv. Support no initial program. Resynchronize
8672 communication with GDB after an error. Handle "monitor exit".
8673 Use require_running and target_running. Always allow the extended
8674 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8675 restart in extended mode.
8676 * README: Refer to the GDB manual. Update --attach usage.
8678 2007-12-20 Andreas Schwab <schwab@suse.de>
8680 * linux-low.c (STACK_SIZE): Define.
8681 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8682 (linux_test_for_tracefork): Likewise.
8684 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8686 * linux-low.c (linux_wait_for_event): Update messages. Do not
8687 reinsert auto-delete breakpoints.
8688 * mem-break.c (struct breakpoint): Change return type of handler to
8690 (set_breakpoint_at): Update handler type.
8691 (reinsert_breakpoint_handler): Return 1 instead of calling
8693 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8695 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8696 * mem-break.h (set_breakpoint_at): Update handler type.
8697 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8698 * win32-low.c (auto_delete_breakpoint): New.
8699 (get_child_debug_event): Use it.
8701 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8703 * configure.ac: Check for pread and pwrite.
8704 * hostio.c (handle_pread): Fall back to lseek and read.
8705 (handle_pwrite): Fall back to lseek and write.
8706 * config.in, configure: Regenerated.
8708 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8710 * server.c (myresume): Add own_buf argument.
8711 (main): Update calls.
8713 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8715 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8716 * remote-utils.c (remote_open): Do not call disable_async_io.
8717 (block_async_io): Delete.
8718 (unblock_async_io): Make static.
8719 (initialize_async_io): New.
8720 * server.c (handle_v_cont): Handle async I/O here.
8721 (myresume): Likewise. Move other common resume tasks here...
8722 (main): ... from here. Call initialize_async_io. Disable async
8723 I/O before the main loop.
8724 * server.h (initialize_async_io): Declare.
8725 (block_async_io, unblock_async_io): Delete prototypes.
8726 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8728 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8730 * remote-utils.c (readchar): Allow binary data in received messages.
8732 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8734 * win32-low.c (attaching): New global.
8735 (win32_create_inferior): Clear the `attaching' global.
8736 (win32_attach): Set the `attaching' global.
8737 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8738 attaching. Only set a breakpoint at the entry point if not
8741 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8743 * server.c (main): Don't report dll events on the initial
8744 connection on attaches.
8746 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8748 * server.c (main): Relax numerical bases supported for the pid of
8749 the --attach command line argument.
8751 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8753 * win32-low.c (win32_attach): Call OpenProcess before
8754 DebugActiveProcess, not after. Add last error output to error
8757 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8759 * win32-low.c (win32_get_thread_context)
8760 (win32_set_thread_context): New functions.
8761 (thread_rec): Use win32_get_thread_context.
8762 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8763 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8766 2007-12-03 Leo Zayas
8767 Pedro Alves <pedro_alves@portugalmail.pt>
8769 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8771 (child_add_thread): Minor cleanup.
8772 (child_continue): Resume artificially suspended threads before
8773 calling ContinueDebugEvent.
8774 (suspend_one_thread): New.
8775 (fake_breakpoint_event): New.
8776 (get_child_debug_event): Change return type to int. Check here if
8777 gdb sent an interrupt request. If a soft interrupt was requested,
8778 fake a breakpoint event. Return 0 if there is no event to handle,
8780 (win32_wait): Don't check here if gdb sent an interrupt request.
8781 Ensure there is a valid event to handle.
8782 (win32_request_interrupt): Add soft interruption method as last
8785 2007-12-03 Leo Zayas
8786 Pedro Alves <pedro_alves@portugalmail.pt>
8788 * win32-low.h (win32_thread_info): Add descriptions to the
8789 structure members. Replace `suspend_count' counter by a
8791 * win32-low.c (thread_rec): Update condition of when to get the
8792 context from the inferior. Rely on ContextFlags being set if it
8793 has already been retrieved. Only suspend the inferior thread if
8794 we haven't already. Warn if that fails.
8795 (continue_one_thread): s/suspend_count/suspended/. Only call
8796 ResumeThread once. Warn if that fails.
8798 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8800 * win32-low.c (win32_wait): Don't read from the inferior when it
8803 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8805 * Makefile.in (win32_low_h): New variable.
8806 (win32-low.o): Add dependency on $(win32_low_h).
8807 (win32-arm-low.o, win32-i386-low.o): New rules.
8809 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8811 * hostio.c: Correct copyright year.
8813 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8815 * Makefile.in (OBS): Add hostio.o.
8816 (hostio.o): New rule.
8817 * server.h (handle_vFile): Declare.
8818 * hostio.c: New file.
8819 * server.c (handle_v_requests): Take packet_len and new_packet_len
8820 for binary packets. Call handle_vFile.
8821 (main): Update call to handle_v_requests.
8823 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8825 * linux-low.c: Include <sched.h>.
8827 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8829 * linux-low.c (linux_tracefork_grandchild): New.
8830 (linux_tracefork_child): Use clone.
8831 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8833 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8835 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8837 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8839 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8841 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8843 * inferiors.c (change_inferior_id): Delete.
8844 (add_pid_to_list, pull_pid_from_list): New.
8845 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8846 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8847 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8848 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8849 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8850 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8851 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8852 (using_threads): Always set to 1.
8853 (handle_extended_wait): New.
8854 (add_process): Do not set TID.
8855 (linux_create_inferior): Set must_set_ptrace_flags.
8856 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8857 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8858 (linux_thread_alive): Rename TID argument to LWPID.
8859 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8860 (linux_wait_for_event): Do not use TID or check using_threads. Update
8861 call to dead_thread_notify. Call handle_extended_wait.
8862 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8863 (send_sigstop): Delete sigstop_sent.
8864 (wait_for_sigstop): Avoid TID.
8865 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8866 (linux_test_for_tracefork): New.
8867 (linux_lookup_signals): Use thread_db_active and
8868 linux_supports_tracefork_flag.
8869 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8870 * linux-low.h (get_process_thread): Avoid TID.
8871 (struct process_ifo): Move thread_known and tid to the end. Remove
8873 (linux_attach_lwp, thread_db_init): Update prototypes.
8874 * server.h (change_inferior_id): Delete prototype.
8875 (add_pid_to_list, pull_pid_from_list): New prototypes.
8876 * thread-db.c (thread_db_use_events): New.
8877 (find_first_thread): Rename to...
8878 (find_one_thread): ...this. Update callers and messages. Do not
8879 call fatal. Check thread_db_use_events. Do not call
8880 change_inferior_id or new_thread_notify.
8881 (maybe_attach_thread): Update. Do not call new_thread_notify.
8882 (thread_db_init): Set thread_db_use_events. Check use_events.
8883 * utils.c (fatal, warning): Correct message prefix.
8885 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8887 * Makefile.in (clean): Remove new files.
8888 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8889 (powerpc-64.o, powerpc-64.c): New rules.
8890 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8891 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8893 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8895 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8896 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8897 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8898 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8899 (target_regsets): Add AltiVec and SPE register sets.
8900 * configure.ac: Check for AltiVec and SPE.
8901 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8902 (ppc_fill_vrregset, ppc_store_vrregset): New.
8903 (target_regsets): Add AltiVec register set.
8904 * configure: Regenerated.
8906 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8908 * linux-low.c (O_LARGEFILE): Define.
8909 (linux_read_memory): Use /proc/PID/mem.
8910 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8911 * configure, config.in: Regenerated.
8913 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8915 * linux-low.c (linux_wait_for_event): Do not pass signals while
8918 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8920 * win32-low.c (create_process): New.
8921 (win32_create_inferior): Use create_process instead of
8922 CreateProcess. If create_process failed retry appending an ".exe"
8923 suffix. Store the GetLastError result immediatelly after
8924 create_process calls and use it on the call to error.
8926 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8928 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8930 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8932 * configure.ac: Switch license to GPLv3.
8934 2007-08-01 Michael Snyder <msnyder@access-company.com>
8936 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8938 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8940 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8942 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8943 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8944 CloseToolhelp32Snapshot.
8945 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8946 CloseToolhelp32Snapshot.
8948 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8950 * server.c (main): Check for inferior exit before main loop.
8952 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8954 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8955 instead of on tmp_desc.
8957 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8958 Daniel Jacobowitz <dan@codesourcery.com>
8960 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8961 (add_thread): Minor cleanups.
8962 (clear_inferiors): Move lower in the file. Clear the DLL
8964 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8965 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8966 (xml_escape_text): New.
8967 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8969 (handle_v_cont): Report errors.
8970 (gdbserver_version): Update.
8971 (main): Correct size of own_buf. Do not report initial DLL events.
8972 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8973 (unloaded_dll, xml_escape_text): New.
8974 * win32-low.c (enum target_waitkind): Update comments.
8975 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8976 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8977 (win32_EnumProcessModules, win32_GetModuleInformation)
8978 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8979 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8980 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8981 (win32_Module32First, win32_Module32Next, load_toolhelp)
8982 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8983 (get_child_debug_event): Handle DLL events.
8984 (win32_wait): Likewise.
8986 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8988 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8989 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8991 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8993 * win32-low.c (handle_output_debug_string): Ignore event if not
8996 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8998 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9000 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9002 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9004 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9006 * inferiors.c (change_inferior_id): Add comment.
9007 * linux-low.c (check_removed_breakpoint): Add an early
9008 prototype. Improve debug output.
9009 (linux_attach): Doc update.
9010 (linux_detach_one_process, linux_detach): Clean up before releasing
9012 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9013 * linux-low.h (struct process_info): Doc improvement.
9014 * mem-break.c (delete_all_breakpoints): New.
9015 * mem-break.h (delete_all_breakpoints): New prototype.
9016 * thread-db.c (find_first_thread): New.
9017 (thread_db_create_event): Call it instead of
9018 thread_db_find_new_threads. Clean up unused variables.
9019 (maybe_attach_thread): Remove first thread handling.
9020 (thread_db_find_new_threads): Use find_first_thread.
9021 (thread_db_get_tls_address): Likewise.
9023 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9025 * thread-db.c (thread_db_find_new_threads): Add prototype.
9026 (thread_db_create_event): Check for the main thread before adding
9028 (maybe_attach_thread): Only enable event reporting if TID == 0.
9029 (thread_db_get_tls_address): Check for new threads.
9031 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9033 * linux-low.c (linux_create_inferior): Try execv before execvp.
9034 * spu-low.c (spu_create_inferior): Likewise.
9036 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9038 * linux-low.c (linux_create_inferior): Change execv to execvp.
9039 * spu-low.c (spu_create_inferior): Likewies.
9041 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9043 * Makefile.in (clean): Clean new files instead of deleted ones.
9044 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9045 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9047 * configure.srv: Specify XML files and new regformats for MIPS and
9049 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9050 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9051 an entry for the restart register.
9052 (mips_cannot_fetch_register, mips_cannot_store_register)
9053 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9054 register names to match the XML descriptions.
9055 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9056 restart register instead of $0.
9058 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9059 Markus Deuling <deuling@de.ibm.com>
9061 * remote-utils.c (decode_xfer_write): New function.
9062 * server.h (decode_xfer_write): Add prototype.
9063 * server.c (handle_query): Add PACKET_LEN argument. Support
9064 qXfer:spu:read and qXfer:spu:write packets.
9065 (main): Pass packet_len to handle_query.
9066 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9067 * target.h (target_ops): Add qxfer_spu.
9069 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9071 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9072 accessing non-seekable spufs files.
9074 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9076 * server.c (handle_query): Add reply for qC packet.
9078 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9079 Leo Zayas <lerele@champenstudios@com>
9081 * server.h (check_remote_input_interrupt_request): New function.
9082 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9083 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9084 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9085 (check_remote_input_interrupt_request): New function.
9086 * server.h (check_remote_input_interrupt_request): Declare.
9087 * win32-low.c (winapi_DebugBreakProcess,
9088 winapi_GenerateConsoleCtrlEvent): New typedefs.
9089 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9091 (win32_wait): Check for remote interrupt request
9092 with check_remote_input_interrupt_request.
9093 (win32_request_interrupt): New function.
9094 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9096 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9098 * win32-low.c (debug_registers_changed,
9099 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9100 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9101 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9102 (thread_rec): Get context using the low target.
9103 (child_add_thread): Call thread_added on the low target,
9104 which does the same thing.
9106 (do_initial_child_stuff): Remove debug registers references.
9107 Set context using the low target. Resume threads after
9108 setting the contexts.
9109 (child_continue): Remove dead variable. Remove debug
9110 registers references.
9111 (child_fetch_inferior_registers): Go through the low target.
9112 (do_child_store_inferior_registers): Remove.
9113 (child_store_inferior_registers): Go through the low target.
9114 (win32_resume): Remove debug registers references.
9115 Set context using the low target.
9116 (handle_exception): Change return type to void. Don't record
9117 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9118 first chance exception.
9119 (get_child_debug_event): Change return type to void. Remove
9120 goto loop. Always return after waiting for debug event.
9121 (win32_wait): Convert to switch statement. Handle spurious
9124 * win32-i386-low.c (debug_registers_changed,
9125 debug_registers_used): New.
9126 (initial_stuff): Rename to ...
9127 (i386_initial_stuff): ... this. Clear debug registers
9129 (store_debug_registers): Delete.
9130 (i386_get_thread_context): New.
9131 (load_debug_registers): Delete.
9132 (i386_set_thread_context): New.
9133 (i386_thread_added): New.
9134 (single_step): Rename to ...
9135 (i386_single_step): ... this.
9136 (do_fetch_inferior_registers): Rename to ...
9137 (i386_fetch_inferior_register): ... this.
9138 (i386_store_inferior_register): New.
9139 (the_low_target): Adapt to new interface.
9141 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9142 (arm_get_thread_context): New.
9143 (arm_set_thread_context): New.
9145 (do_fetch_inferior_registers): Rename to ...
9146 (arm_fetch_inferior_register): ... this.
9147 (arm_store_inferior_register): New.
9148 (arm_wince_breakpoint): Reimplement as unsigned long.
9149 (arm_wince_breakpoint_len): Define.
9150 (the_low_target): Adapt to new interface.
9152 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9153 load_debug_registers. Add get_thread_context, set_thread_context,
9154 thread_added and store_inferior_register. Rename
9155 fetch_inferior_registers to fetch_inferior_register.
9156 (regptr): Remove declaration.
9158 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9160 * linux-low.c (linux_detach): Change return type to int. Return 0.
9161 * spu-low.c (spu_detach): Likewise.
9163 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9165 * target.h (target_ops): Change return type of detach to int.
9167 (join_inferior): New.
9168 * server.c (main): Don't skip detach support on mingw32.
9169 If the inferior doesn't support detaching return error.
9170 Call join_inferior instead of using waitpid.
9171 * linux-low.c (linux_join): New.
9172 (linux_target_op): Add linux_join.
9173 * spu-low.c (spu_join): New.
9174 (spu_target_ops): Add spu_join.
9175 * win32-low.c (win32_detach): Adapt to new interface.
9176 Reopen current_process_handle before detaching. Issue a child
9177 resume before detaching.
9179 (win32_target_op): Add win32_join.
9181 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9183 * win32-low.c (win32-attach): Fix return value.
9184 * target.h (target_ops): Describe ATTACH return values.
9186 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9188 * win32-low.c (GETPROCADDRESS): Define.
9189 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9190 (winapi_DebugSetProcessKillOnExit): Likewise.
9191 (win32_create_inferior): Force usage of ansi CreateProcessA.
9192 (win32_attach): Use GETPROCADDRESS.
9193 (win32_detach): Likewise.
9195 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9197 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9199 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9201 * win32-low.c: Commit leftover changes from 2007-03-29.
9203 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9205 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9206 fields short instead of int. Add explicit padding.
9207 (i387_cache_to_fsave): Remove unnecessary casts.
9208 (i387_fsave_to_cache): Doc fix.
9209 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9211 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9213 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9214 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9216 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9218 * configure.srv (arm*-*-mingw32ce*): Move near the other
9221 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9223 * configure.ac: Add errno checking.
9224 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9225 sys/file.h and malloc.h.
9226 (AC_CHECK_DECLS): Add perror.
9227 (srv_mingwce): Handle.
9228 * configure.srv (i[34567]86-*-cygwin*): Add
9229 win32-i386-low.o to srv_tgtobj.
9230 (i[34567]86-*-mingw*): Likewise.
9231 (arm*-*-mingw32ce*): Add case.
9232 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9233 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9234 [__MINGW32CE__] (strerror): New function.
9235 [__MINGW32CE__] (errno): Define to GetLastError.
9236 [__MINGW32CE__] (COUNTOF): New macro.
9237 (remote_open): Remove extra close call.
9238 * mem-break.c (delete_breakpoint_at): New function.
9239 * mem-break.h (delete_breakpoint_at): Declare.
9240 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9241 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9242 [USE_WIN32API] (read, write): Add char* casts.
9243 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9244 * server.h: Include wincecompat.h on Windows CE.
9245 [HAVE_ERRNO_H]: Check.
9246 (perror): Declare if not declared.
9247 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9248 (perror_with_name): Remove errno declaration.
9249 * wincecompat.h: New.
9250 * wincecompat.c: New.
9252 * win32-arm-low.c: New.
9253 * win32-i386-low.c: New.
9254 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9255 (OUTMSG2): Make it safe.
9257 (COUNTOF): New macro.
9258 (NUM_REGS): Get it from the low target.
9259 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9260 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9261 (thread_rec): Let low target handle debug registers.
9262 (child_add_thread): Likewise.
9263 (child_init_thread_list): Likewise.
9264 (continue_one_thread): Likewise.
9266 (do_child_fetch_inferior_registers): Move to ...
9267 * win32-i386-low.c: ... here, and rename to ...
9268 (do_fetch_inferior_registers): ... this.
9269 * win32-low.c (child_fetch_inferior_registers):
9270 Go through the low target.
9271 (do_child_store_inferior_registers): Use regptr.
9272 (strwinerror): New function.
9273 (win32_create_inferior): Handle Windows CE.
9274 Use strwinerror instead of strerror on Windows error
9275 codes. Add program to the error output.
9276 Don't close the main thread handle on Windows CE.
9277 (win32_attach): Use coredll.dll on Windows CE.
9278 (win32_kill): Close current process and current
9280 (win32_detach): Use coredll.dll on Windows CE.
9281 (win32_resume): Let low target handle debug registers, and
9283 (handle_exception): Add/Remove initial breakpoint. Avoid
9284 non-existant WSTOPSIG on Windows CE.
9285 (win32_read_inferior_memory): Cast to remove warning.
9286 (win32_arch_string): Go through the low target.
9287 (initialize_low): Call set_breakpoint_data with the low
9288 target's breakpoint.
9289 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9290 FOP_REGNUM, mappings): Move to ...
9291 * win32-i386-low.c: ... here.
9292 * win32-low.c (win32_thread_info): Move to ...
9293 * win32-low.h: ... here.
9294 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9295 win32-arm-low.c and wincecompat.c.
9296 (all:): Add $EXEEXT.
9297 (install-only:): Likewise.
9298 (gdbserver:): Likewise.
9299 (gdbreplay:): Likewise.
9300 * config.in: Regenerate.
9301 * configure: Regenerate.
9303 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9305 * win32-low.c: Rename typedef thread_info to
9306 win32_thread_info throughout.
9308 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9310 * win32-i386-low.c: Rename to ...
9311 * win32-low.c: ... this.
9312 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9313 * Makefile.in: Likewise.
9315 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9317 * remote-utils.c (monitor_output): Constify msg parameter.
9318 * server.h (monitor_output): Likewise.
9319 * win32-i386-low.c (handle_output_debug_string): New.
9320 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9321 handle_output_debug_string.
9322 (get_child_debug_event): Likewise.
9324 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9326 * server.c (main): Correct strtoul check.
9328 2007-03-27 Jon Ringle <jon@ringle.org>
9330 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9332 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9334 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9336 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9338 * terminal.h: Check HAVE_SGTTY_H.
9340 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9342 * remote-utils.c (remote_open): Print out the assigned port number.
9344 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9346 * remote-utils.c (monitor_output): New function.
9347 * server.c (debug_threads): Define here.
9348 (monitor_show_help): New function.
9349 (handle_query): Handle qRcmd.
9350 (main): Do not handle 'd' packet.
9351 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9352 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9355 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9357 * Makefile.in (EXEEXT): New.
9358 (clean): Use $(EXEEXT).
9360 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9362 * target.h (target_ops): Rename send_signal to request_interrupt,
9363 and remove enum target_signal parameter.
9364 * linux-low.c (linux_request_interrupt): Rename from
9365 linux_send_signal, and always send SIGINT.
9366 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9367 and always send SIGINT.
9368 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9370 (input_interrupt): Likewise.
9372 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9374 * server.c (get_features_xml): Check if target implemented
9376 * win32-i386-low.c (win32_arch_string): New.
9377 (win32_target_ops): Add win32_arch_string as arch_string member.
9379 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9381 * spu-low.c (spu_arch_string): New.
9382 (spu_target_ops): Add spu_arch_string.
9384 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9386 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9387 * configure.ac: Do not check for terminal.h.
9388 * configure, config.in: Regenerated.
9390 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9392 * Makefile.in (OBS): Add $(XML_BUILTIN).
9393 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9395 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9396 (arm-with-iwmmxt.c): New.
9397 * config.in, configure: Regenerate.
9398 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9399 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9400 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9401 (arm*-*-linux*): Add iWMMXt and regset support.
9402 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9403 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9404 (arm_store_wmmxregset, target_regsets): New.
9405 * server.c (get_features_xml): Take annex argument. Check builtin
9407 (handle_query): Handle multiple annexes.
9409 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9411 * remote-utils.c [USE_WIN32API] (read, write): Define.
9412 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9415 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9417 * linux-i386-low.c (the_low_target): Set arch_string.
9418 * linux-x86-64-low.c (the_low_target): Likewise.
9419 * linux-low.c (linux_arch_string): New.
9420 (linux_target_ops): Add it.
9421 * linux-low.h (struct linux_target_ops): Add arch_string.
9422 * server.c (write_qxfer_response): Use const void * for DATA.
9423 (get_features_xml): New.
9424 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9425 * target.h (struct target_ops): Add arch_string method.
9427 2007-01-03 Denis Pilat <denis.pilat@st.com>
9428 Daniel Jacobowitz <dan@codesourcery.com>
9430 * linux-low.c (linux_kill): Handle being called with no threads.
9431 * win32-i386-low.c (win32_kill): Likewise.
9432 (get_child_debug_event): Clear current_process_handle.
9434 2006-12-30 Denis PILAT <denis.pilat@st.com>
9435 Daniel Jacobowitz <dan@codesourcery.com>
9437 * remote-utils.c (remote_open): Check the type of specified
9438 serial port devices before opening them.
9439 * server.c (main): Kill the inferior if an error occurs during
9440 the first remote_open.
9442 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9444 * README: Update supported targets.
9446 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9448 * Makefile.in (clean): Remove reg-mips64.c.
9449 (reg-mips64.c, reg-mips64.o): New rules.
9450 * configure.srv: Handle mips64. Include regset support for mips.
9451 * linux-mips-low.c (union mips_register): New.
9452 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9453 (mips_breakpoint, mips_breakpoint_at): Use int.
9454 (mips_collect_register, mips_supply_register)
9455 (mips_collect_register_32bit, mips_supply_register_32bit)
9456 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9457 (mips_store_fpregset, target_regsets): New.
9458 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9460 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9462 * configure.srv: Add target "spu*-*-*".
9463 * Makefile.in (clean): Remove reg-spu.c.
9464 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9465 * spu-low.c: New file.
9467 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9469 * configure.ac: Correct td_thr_tls_get_addr test.
9470 * configure: Regenerated.
9472 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9474 * linux-low.c (linux_wait_for_event): Reformat. Use the
9476 * remote-utils.c (decode_address_to_semicolon): New.
9477 * server.c (pass_signals, handle_general_set): New.
9478 (handle_query): Mention QPassSignals for qSupported.
9479 (main): Call handle_general_set.
9480 * server.h (pass_signals, decode_address_to_semicolon): New.
9482 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9484 * server.c (handle_query): Correct error handling for read_auxv.
9486 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9488 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9489 and srv_linux_thread_db to yes.
9490 * linux-s390-low.c (s390_fill_gregset): New function.
9491 (target_regsets): Define data structure.
9493 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9495 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9496 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9497 * config.in, configure: Regenerated.
9498 * inferiors.c (gdb_id_to_thread): New function.
9499 (gdb_id_to_thread_id): Use it.
9500 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9501 * linux-low.h (struct process_info): Add th member.
9502 (thread_db_get_tls_address): New prototype.
9503 * remote-utils.c (decode_address): Make non-static.
9504 * server.c (handle_query): Handle qGetTLSAddr.
9505 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9506 * target.h (struct target_ops): Add get_tls_address.
9507 * thread-db.c (maybe_attach_thread): Save the thread handle.
9508 (thread_db_get_tls_address): New.
9510 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9512 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9513 (linux_resume_one_process): Take a siginfo_t *. Update all
9514 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9515 (struct pending_signals): Add a siginfo_t.
9516 (linux_wait_for_process): Always set last_status.
9517 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9518 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9519 * linux-low.h (struct process_info): Add last_status.
9521 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9523 * remote-utils.c (try_rle): New function.
9524 (putpkt_binary): Use it.
9526 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9528 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9529 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9530 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9531 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9532 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9535 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9537 * server.c (terminal_fd): New variable.
9538 (old_foreground_pgrp): Likewise.
9539 (restore_old_foreground_pgrp): New function.
9540 (start_inferior): Record the terminal file descriptor in terminal_fd
9541 and its original foreground group in old_foreground_pgrp. Register
9542 restore_old_foreground_pgrp with atexit().
9544 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9546 * server.c (handle_query): Correct qPart to qXfer.
9548 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9550 * configure.ac: Check for more headers which are missing on
9551 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9552 * configure.srv: Add Cygwin and mingw32.
9553 * remote-utils.c: Don't include headers unconditionally which
9554 are missing on mingw32. Include <winsock.h> for mingw32.
9555 (remote_open): Adjust for mingw32 support. Flush
9556 standard error after writing to it.
9557 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9558 (unblock_async_io, enable_async_io, disable_async_io)
9559 (readchar, getpkt): Update for Winsock support.
9560 (prepare_resume_reply): Expect a protocol signal number.
9561 * server.c: Disable <sys/wait.h> on mingw32.
9562 (start_inferior): Adjust for mingw32 support. Flush
9563 standard error after writing to it.
9564 (attach_inferior): Likewise. Use protocol signal
9566 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9568 * win32-i386-low.c: New file.
9569 * Makefile.in (XM_CLIBS): Set.
9570 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9571 (win32-i386-low.o): New dependency rule.
9572 * linux-low.c (linux_wait): Use target signal numbers.
9573 * target.h (struct target_ops): Doc fix.
9574 * server.h (target_signal_to_name): New prototype.
9575 * gdbreplay.c: Don't include headers unconditionally which
9576 are missing on mingw32. Include <winsock.h> for mingw32.
9577 (remote_close, remote_open): Adjust for Winsock support.
9578 * configure, config.in: Regenerated.
9580 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9582 * server.c (decode_xfer_read, write_qxfer_response): New.
9583 (handle_query): Take a packet length argument. Handle
9584 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9585 the qSupported response.
9586 (main): Update call to handle_query.
9588 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9590 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9591 (putpkt_binary): Renamed from putpkt and adjusted for binary
9593 (putpkt): New wrapper for putpkt_binary.
9594 (readchar): Don't mask off the high bit.
9595 (decode_X_packet): New function.
9596 * server.c (main): Call putpkt_binary if a handler sets the packet
9597 length. Save the length of the incoming packet. Handle 'X'.
9598 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9600 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9602 * server.c (handle_query): Handle qSupported.
9604 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9606 * remote-utils.c (all_symbols_looked_up): New variable.
9607 (look_up_one_symbol): Check it.
9608 * server.h (look_up_one_symbol): New declaration.
9609 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9611 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9613 * Makefile.in (linux-arm-low.o): Update dependencies.
9614 * linux-arm-low.c: Include "gdb_proc_service.h".
9615 (PTRACE_GET_THREAD_AREA): Define.
9616 (ps_get_thread_area): New function.
9618 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9620 * configure.srv (m68k*-*-uclinux*): New target.
9621 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9622 (linux_resume_one_process): Remove extraneous cast.
9623 (linux_read_offsets): New.
9624 (linux_target_op): Add linux_read_offsets on mmuless systems.
9625 * server.c (handle_query): Add qOffsets logic.
9626 * target.h (struct target_ops): Add read_offsets.
9628 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9630 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9631 (PTRACE_GET_THREAD_AREA): Define.
9632 (ps_get_thread_area): New function.
9633 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9634 (linux-x86-64-low.o): Update.
9636 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9638 * configure.ac: Remove checks for prfpregset_t.
9639 * gdb_proc_service.h: New file.
9640 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9641 new "gdb_proc_service.h".
9642 * proc-service.c: Likewise.
9643 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9644 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9645 * Makefile.in (gdb_proc_service_h): Updated.
9646 * configure, config.in: Regenerated.
9648 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9650 * remote-utils.c (prepare_resume_reply): Move declaration
9651 of gdb_id_from_wait to the top of the block.
9653 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9655 * linux-low.c (regsets_store_inferior_registers): Read the regset
9656 from the target before filling it.
9658 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9660 * server.c (attach_inferior): Return SIGTRAP for a successful
9663 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9665 * Makefile.in (OBS): Add version.o.
9666 (STAGESTUFF): Delete.
9667 (version.o): Add dependencies.
9668 (version.c): Replace rule.
9669 (clean): Remove version.c.
9670 * server.c (gdbserver_version): New.
9671 (gdbserver_usage): Use printf.
9672 (main): Handle --version and --help.
9673 * server.h (version, host_name): Add declarations.
9675 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9687 * linux-x86-64-low.c:
9690 * linux-ppc64-low.c:
9699 * linux-crisv32-low.c:
9711 * gdbserver.1: Add (C) after Copyright. Update the FSF
9714 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9716 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9717 (arm_breakpoint_at): Recognize both breakpoints.
9718 (the_low_target): Use the correct breakpoint instruction.
9720 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9722 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9723 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9724 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9725 (the_low_target): Update.
9727 2005-10-25 Andreas Schwab <schwab@suse.de>
9729 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9731 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9732 (ia64_num_regs): Reduce to 462.
9734 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9736 * acinclude.m4: Correct quoting.
9737 * aclocal.m4: Regenerated.
9739 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9740 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9741 (thread_db_init): Call thread_db_err_str.
9742 * configure.ac: Check for TD_VERSION.
9743 * config.in, configure: Regenerated.
9745 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9747 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9749 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9751 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9752 is not available. Define HAVE_PTRACE_GETREGS if it is.
9753 * config.in, configure: Regenerated.
9754 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9755 * linux-i386-low.c, linux-m68k-low.c: Update to use
9756 HAVE_PTRACE_GETREGS.
9757 * linux-low.c (regsets_fetch_inferior_registers)
9758 (regsets_store_inferior_registers): Only return 0 if we processed
9760 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9761 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9763 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9765 * inferiors.c (struct thread_info): Add gdb_id.
9766 (add_thread): Add gdb_id argument.
9767 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9768 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9769 calls to add_thread.
9770 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9771 * server.c (handle_query): Use thread_to_gdb_id.
9772 (handle_v_cont, main): Use gdb_id_to_thread_id.
9773 * server.h (add_thread): Update prototype.
9774 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9777 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9779 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9780 left-padded registers.
9781 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9782 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9784 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9786 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9787 * configure: Regenerate.
9788 * config.in: Regenerate.
9789 * server.h (NEED_DECLARATION_STRERROR):
9790 Replace with !HAVE_DECL_STRERROR.
9792 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9794 * linux-low.c (linux_wait, linux_send_signal): Don't test
9795 an unsigned long variable for > 0 if it could be MAX_ULONG.
9796 * server.c (myresume): Likewise.
9797 * target.c (set_desired_inferior): Likewise.
9799 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9801 * configure.ac: Simplify and improve check for socklen_t.
9802 * configure, config.in: Regenerate.
9804 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9806 * acconfig.h: Remove.
9807 * configure.ac: Add a test for socklen_t. Use three-argument
9808 AC_DEFINE throughout.
9809 * config.in: Regenerated using autoheader 2.59.
9810 * configure: Regenerated.
9812 * gdbreplay.c (socklen_t): Provide a default.
9813 (remote_open): Use socklen_t.
9814 * remote-utils.c (socklen_t): Provide a default.
9815 (remote_open): Use socklen_t.
9816 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9819 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9821 * linux-low.c (linux_read_memory, linux_write_memory)
9822 (linux_read_auxv): Likewise.
9823 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9824 (check_mem_write): Likewise.
9825 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9827 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9828 (registers_from_string, register_data): Likewise.
9829 * server.c (handle_query, main): Likewise.
9830 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9831 (decode_M_packet): Likewise.
9832 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9833 * target.h (struct target_ops): Update read_memory, write_memory,
9835 (read_inferior_memory, write_inferior_memory): Update.
9836 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9838 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9839 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9840 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9841 linux-s390-low.c, linux-sh-low.c: Update for changes in
9842 read_inferior_memory and the_low_target->breakpoint.
9844 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9846 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9847 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9848 * configure.srv: Add powerpc64-*-linux*.
9849 * linux-ppc64-low.c: New file.
9851 2005-05-23 Orjan Friberg <orjanf@axis.com>
9853 * linux-cris-low.c: New file with support for CRIS.
9854 * linux-crisv32-low.c: Ditto for CRISv32.
9855 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9856 (clean): Add reg-cris.c and reg-crisv32.c.
9857 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9858 reg-crisv32.o, and reg-crisv32.c to make rules.
9859 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9862 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9864 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9865 of sizeof (PTRACE_XFER_TYPE).
9866 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9868 2005-05-12 Orjan Friberg <orjanf@axis.com>
9870 * target.h (struct target_ops): Add insert_watchpoint,
9871 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9872 pointers for hardware watchpoint support.
9873 * linux-low.h (struct linux_target_ops): Ditto.
9874 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9875 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9876 to linux_target_ops.
9877 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9879 * server.c (main): Recognize 'Z' and 'z' packets.
9881 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9883 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9884 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9885 (the_low_target): Add new members.
9887 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9889 * proc-service.c (ps_lgetregs): Search all_processes instead of
9892 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9894 * server.c (start_inferior): Change return type to int.
9895 (attach_inferior): Change sigptr to int *.
9896 (handle_v_cont, handle_v_requests): Change signal to int *.
9897 (main): Change signal to int.
9899 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9901 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9902 * configure.srv: Add m32r*-*-linux*.
9903 * linux-m32r-low.c: New file.
9905 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9907 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9909 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9911 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9912 Take unsigned long arguments for PIDs.
9913 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9914 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9915 (wait_for_sigstop, linux_resume_one_process)
9916 (regsets_fetch_inferior_registers, linux_send_signal)
9917 (linux_read_auxv): Likewise. Update the types of variables holding
9918 PIDs. Update format string specifiers.
9919 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9920 * remote-utils.c (prepare_resume_reply): Likewise.
9921 * server.c (cont_thread, general_thread, step_thread)
9922 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9924 (handle_query): Update format specifiers.
9925 (handle_v_cont, main): Use strtoul for thread IDs.
9926 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9927 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9928 (general_thread, step_thread, thread_from_wait)
9929 (old_thread_from_wait): Update.
9930 * target.h (struct thread_resume): Use unsigned long for THREAD.
9931 (struct target_ops): Use unsigned long for arguments to attach and
9934 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9936 * acinclude.m4: Include bfd/bfd.m4 directly.
9937 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9938 <agriffis@toolchain.org>.
9939 * aclocal.m4, configure: Regenerated.
9941 2005-01-07 Andrew Cagney <cagney@gnu.org>
9943 * configure.ac: Rename configure.in, require autoconf 2.59.
9944 * configure: Re-generate.
9946 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9948 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9950 * aclocal.m4: Regenerated.
9951 * configure: Regenerated.
9953 2004-11-21 Andreas Schwab <schwab@suse.de>
9955 * linux-m68k-low.c (m68k_num_gregs): Define.
9956 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9957 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9958 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9959 (m68k_breakpoint_at): New. Add to the_low_target.
9961 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9962 srv_linux_thread_db to yes.
9964 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9966 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9967 (ARCH_SET_FS): Likewise.
9968 (ARCH_GET_FS): Likewise.
9969 (ARCH_GET_GS): Likewise.
9971 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9973 * linux-i386-low.c (ps_get_thread_area): New.
9974 * linux-x86-64-low.c (ps_get_thread_area): New.
9975 * linux-low.c: Include <sys/syscall.h>.
9976 (linux_kill_one_process): Don't kill the first thread here.
9977 (linux_kill): Kill the first thread here.
9978 (kill_lwp): New function.
9979 (send_sigstop, linux_send_signal): Use it.
9980 * proc-service.c: Clean up #ifdefs.
9981 (fpregset_info): Delete.
9982 (ps_lgetregs): Update and enable implementation.
9983 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9985 * remote-utils.c (struct sym_cache, symbol_cache): New.
9986 (input_interrupt): Print a clearer message.
9987 (async_io_enabled): New variable.
9988 (enable_async_io, disable_async_io): Use it. Update comments.
9989 (look_up_one_symbol): Use the symbol cache.
9990 * thread-db.c (thread_db_look_up_symbols): New function.
9991 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9993 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9995 * configure.in: Test for -rdynamic.
9996 * configure: Regenerated.
9997 * Makefile (INTERNAL_LDFLAGS): New.
9998 (gdbserver, gdbreplay): Use it.
10000 2004-09-02 Andrew Cagney <cagney@gnu.org>
10002 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10004 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10006 * linux-low.c (linux_wait): Clear all_processes list also.
10008 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10010 * linux-low.c: Include <errno.h>. Remove extern declaration of
10013 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10015 * gdbreplay.c, server.h, utils.c: Update copyright years.
10017 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10019 * server.c (main): Print child status or termination signal from
10020 variable 'signal', not 'sig'.
10022 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10024 * linux-low.c (linux_read_memory): Change return type to
10025 int. Check for and return error from ptrace().
10026 * target.c (read_inferior_memory): Change return type to int. Pass
10027 back return status from the_target->read_memory().
10028 * target.h (struct target_ops): Adapt *read_memory() prototype.
10030 (read_inferior_memory): Adapt prototype.
10031 * server.c (main): Return an error packet if
10032 read_inferior_memory() returns an error.
10034 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10036 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10037 Unify with other clean targets.
10039 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10041 * server.c (handle_v_cont): Call set_desired_inferior.
10043 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10045 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10047 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10049 * linux-low.c (linux_wait): Unblock async I/O.
10050 (linux_resume): Block and enable async I/O.
10051 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10052 * server.h (block_async_io, unblock_async_io): Add prototypes.
10054 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10056 * remote-utils.c (remote_open): Print a status notice after
10057 opening a TCP port.
10058 * server.c (attach_inferior): Print a status notice after
10061 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10063 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10065 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10067 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10069 * server.c, target.h: Update copyright years.
10071 2004-02-25 Roland McGrath <roland@redhat.com>
10073 * target.h (struct target_ops): New member `read_auxv'.
10074 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10075 * linux-low.c (linux_read_auxv): New function.
10076 (linux_target_ops): Initialize `read_auxv' member to that.
10078 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10080 Committed by Jim Blandy <jimb@redhat.com>.
10082 * linux-s390-low.c (s390_num_regs): Update.
10083 (s390_regmap): Remove control registers. Use __s390x__ predefine
10084 instead of GPR_SIZE to distiguish s390 and s390x targets.
10086 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10088 * linux-low.c: Update copyright year.
10089 (check_removed_breakpoint): Clear pending_is_breakpoint.
10090 (linux_set_resume_request, linux_queue_one_thread)
10091 (resume_status_pending_p): New functions.
10092 (linux_continue_one_thread): Use process->resume.
10093 (linux_resume): Only resume threads if there are no pending events.
10094 * linux-low.h (struct process_info): Add resume request
10097 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10099 * regcache.c (new_register_cache): Clear the allocated register
10100 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10102 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10104 * linux-low.c (linux_resume): Take a struct thread_resume *
10106 (linux_wait): Update call.
10107 (resume_ptr): New static variable.
10108 (linux_continue_one_thread): Renamed from
10109 linux_continue_one_process. Use resume_ptr.
10110 (linux_resume): Use linux_continue_one_thread.
10111 * server.c (handle_v_cont, handle_v_requests): New functions.
10112 (myresume): New function.
10113 (main): Handle 'v' case.
10114 * target.h (struct thread_resume): New type.
10115 (struct target_ops): Change argument of "resume" to struct
10117 (myresume): Delete macro.
10119 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10121 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10122 (uninstall): Support DESTDIR.
10124 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10126 * configure.srv: Add xscale*linux copy of arm*linux entry.
10128 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10130 * linux-arm-low.c (arm_reinsert_addr): New function.
10131 (the_low_target): Add arm_reinsert_addr.
10133 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10135 * mem-break.c: Remove whitespace at end of file.
10137 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10139 * configure.in: Check whether we need to prototype strerror.
10140 * server.h: Optionally prototype strerror.
10141 * gdbreplay.c (perror_with_name): Use strerror.
10142 * linux-low.c (linux_attach_lwp): Use strerror.
10143 * utils.c (perror_with_name): Use strerror.
10144 * config.in, configure: Regenerated.
10146 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10148 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10149 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10151 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10153 * Makefile.in (SFILES): Update.
10154 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10155 low-sun3.c: Remove files.
10157 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10159 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10160 (linux_detach_one_process, linux_detach): New functions.
10161 (linux_target_ops): Add linux_detach.
10162 * server.c (main): Handle 'D' packet.
10163 * target.h (struct target_ops): Add "detach" member.
10164 (detach_inferior): Define.
10166 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10168 From Kelley Cook <kelleycook@wideopenwest.com>:
10169 * configure.srv: Accept i[34567]86 variants.
10171 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10173 * linux-low.c (linux_wait_for_event): Correct comment typos.
10174 (linux_resume_one_process): Call check_removed_breakpoint.
10175 (linux_send_signal): New function.
10176 (linux_target_ops): Add linux_send_signal.
10177 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10179 * target.h (struct target_ops): Add send_signal.
10181 2003-05-29 Jim Blandy <jimb@redhat.com>
10183 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10184 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10185 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10186 away part of the register's value.
10188 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10190 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10191 (linux_wait_for_event, linux_init_signals): Likewise.
10193 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10195 * configure.in: Check for stdlib.h.
10196 * configure: Regenerated.
10197 * config.in: Regenerated.
10199 2003-01-04 Andreas Schwab <schwab@suse.de>
10201 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10203 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10205 * Makefile.in: Remove obsolete code.
10207 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10209 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10210 defined(PT_FPR0_HI).
10212 2002-11-17 Stuart Hughes <seh@zee2.com>
10214 * linux-arm-low.c (arm_num_regs): Increase.
10215 (arm_regmap): Include status register.
10217 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10219 * linux-low.c (register_addr): Remove incorrect -1 check.
10221 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10223 * linux-low.c (linux_create_inferior): Call setpgid. Return
10225 (unstopped_p, linux_signal_pid): Remove.
10226 (linux_target_ops): Remove linux_signal_pid.
10227 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10228 global instead of target method.
10229 * target.h (struct target_ops): Remove signal_pid. Update comment
10230 for create_inferior.
10231 * server.c (signal_pid): New variable.
10232 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10233 gdbserver. Set the child to be the foreground process group.
10234 (attach_inferior): Set signal_pid.
10236 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10238 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10240 2002-08-20 Jim Blandy <jimb@redhat.com>
10242 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10245 2002-08-01 Andrew Cagney <cagney@redhat.com>
10247 * Makefile.in: Make chill references obsolete.
10249 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10251 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10252 * configure: Regenerate.
10253 * config.in: Regenerate.
10255 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10257 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10258 (perror_with_name, remote_close, remote_open, expect, play): Static.
10260 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10262 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10263 byte offsets instead of an array of indexes.
10264 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10266 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10268 * regcache.c: Add comment.
10270 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10272 * thread-db.c: New file.
10273 * proc-service.c: New file.
10274 * acinclude.m4: New file.
10275 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10276 proc-service.o, and thread-db.o.
10277 (linux-low.o): Add USE_THREAD_DB.
10278 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10279 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10280 * aclocal.m4: Regenerated.
10281 * config.in: Regenerated.
10282 * configure: Regenerated.
10283 * configure.in: Check for proc_service.h, sys/procfs.h,
10284 thread_db.h, and linux/elf.h headrs.
10285 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10286 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10287 Check for -lthread_db and thread support.
10288 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10289 PowerPC, and SuperH.
10290 * i387-fp.c: Constify arguments.
10291 * i387-fp.h: Likewise.
10292 * inferiors.c: (struct thread_info): Renamed from
10293 `struct inferior_info'. Remove PID member. Use generic inferior
10294 list header. All uses updated.
10295 (inferiors, signal_pid): Removed.
10296 (all_threads): New variable.
10297 (get_thread): Define.
10298 (add_inferior_to_list): New function.
10299 (for_each_inferior): New function.
10300 (change_inferior_id): New function.
10301 (add_inferior): Removed.
10302 (remove_inferior): New function.
10303 (add_thread): New function.
10304 (free_one_thread): New function.
10305 (remove_thread): New function.
10306 (clear_inferiors): Use for_each_inferior and free_one_thread.
10307 (find_inferior): New function.
10308 (find_inferior_id): New function.
10309 (inferior_target_data): Update argument type.
10310 (set_inferior_target_data): Likewise.
10311 (inferior_regcache_data): Likewise.
10312 (set_inferior_regcache_data): Likewise.
10313 * linux-low.c (linux_bp_reinsert): Remove.
10314 (all_processes, stopping_threads, using_thrads)
10315 (struct pending_signals, debug_threads, pid_of): New.
10316 (inferior_pid): Replace with macro.
10317 (struct inferior_linux_data): Remove.
10318 (get_stop_pc, add_process): New functions.
10319 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10320 Use add_process and add_thread.
10321 (linux_attach_lwp): New function, based on old linux_attach. Use
10322 add_process and add_thread. Set stop_expected for new threads.
10323 (linux_attach): New function.
10324 (linux_kill_one_process): New function.
10325 (linux_kill): Kill all LWPs.
10326 (linux_thread_alive): Use find_inferior_id.
10327 (check_removed_breakpoints, status_pending_p): New functions.
10328 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10329 Update. Use WNOHANG. Wait for cloned processes also. Update process
10330 struct for the found process.
10331 (linux_wait_for_event): New function.
10332 (linux_wait): Use it. Support LWPs.
10333 (send_sigstop, wait_for_sigstop, stop_all_processes)
10334 (linux_resume_one_process, linux_continue_one_process): New functions.
10335 (linux_resume): Support LWPs.
10336 (REGISTER_RAW_SIZE): Remove.
10337 (fetch_register): Use register_size instead. Call supply_register.
10338 (usr_store_inferior_registers): Likewise. Call collect_register.
10339 Fix recursive case.
10340 (regsets_fetch_inferior_registers): Improve error message.
10341 (regsets_store_inferior_registers): Add debugging.
10342 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10343 (unstopped_p, linux_signal_pid): New functions.
10344 (linux_target_ops): Add linux_signal_pid.
10345 (linux_init_signals): New function.
10346 (initialize_low): Call it. Initialize using_threads.
10347 * regcache.c (inferior_regcache_data): Add valid
10349 (get_regcache): Fetch registers lazily. Add fetch argument
10350 and update all callers.
10351 (regcache_invalidate_one, regcache_invalidate): New
10353 (new_register_cache): Renamed from create_register_cache.
10354 Return the new regcache.
10355 (free_register_cache): Change argument to a void *.
10356 (registers_to_string, registers_from_string): Call get_regcache
10357 with fetch flag set.
10358 (register_data): Make static. Pass fetch flag to get_regcache.
10359 (supply_register): Call get_regcache with fetch flag clear.
10360 (collect_register): Call get_regcache with fetch flag set.
10361 (collect_register_as_string): New function.
10362 * regcache.h: Update.
10363 * remote-utils.c (putpkt): Flush after debug output and use
10365 Handle input interrupts while waiting for an ACK.
10366 (input_interrupt): Use signal_pid method.
10367 (getpkt): Flush after debug output and use stderr.
10368 (outreg): Use collect_register_as_string.
10369 (new_thread_notify, dead_thread_notify): New functions.
10370 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10371 and general_thread.
10372 (look_up_one_symbol): Flush after debug output.
10373 * server.c (step_thread, server_waiting): New variables.
10374 (start_inferior): Don't use signal_pid. Update call to mywait.
10375 (attach_inferior): Update call to mywait.
10376 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10377 (main): Don't fetch/store registers explicitly. Use
10378 set_desired_inferior. Support proposed ``Hs'' packet. Update
10380 * server.h: Update.
10381 (struct inferior_list, struct_inferior_list_entry): New.
10382 * target.c (set_desired_inferior): New.
10383 (write_inferior_memory): Constify.
10384 (mywait): New function.
10385 * target.h: Update.
10386 (struct target_ops): New signal_pid method.
10387 (mywait): Removed macro, added prototype.
10389 * linux-low.h (regset_func): Removed.
10390 (regset_fill_func, regset_store_func): New.
10391 (enum regset_type): New.
10392 (struct regset_info): Add type field. Use new operation types.
10393 (struct linux_target_ops): stop_pc renamed to get_pc.
10394 Add decr_pc_after_break and breakpoint_at.
10395 (get_process, get_thread_proess, get_process_thread)
10396 (strut process_info, all_processes, linux_attach_lwp)
10397 (thread_db_init): New.
10399 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10400 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10401 (the_low_target): Add new members.
10402 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10403 (i386_store_fpxregset): Constify.
10404 (target_regsets): Add new kind identifier.
10405 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10406 (i386_set_pc): Add debugging.
10407 (i386_breakpoint_at): New function.
10408 (the_low_target): Add new members.
10409 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10410 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10411 (mips_breakpoint_at): New.
10412 (the_low_target): Add new members.
10413 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10414 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10415 (the_low_target): Add new members.
10416 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10417 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10418 (the_low_target): Add new members.
10419 * linux-x86-64-low.c (target_regsets): Add new kind
10422 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10424 From Martin Pool <mbp@samba.org>:
10425 * server.c (gdbserver_usage): New function.
10428 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10430 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10431 stop_at -> stop_pc.
10433 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10435 * Makefile.in: Remove obsolete code.
10437 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10439 * linux-low.c (regsets_fetch_inferior_registers),
10440 (regsets_store_inferior_registers): Removed cast to int from
10442 * regcache.h: Added declaration of struct inferior_info.
10444 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10446 * inferiors.c (struct inferior_info): Add regcache_data.
10447 (add_inferior): Call create_register_cache.
10448 (clear_inferiors): Call free_register_cache.
10449 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10450 * regcache.c (struct inferior_regcache_data): New.
10451 (registers): Remove.
10452 (get_regcache): New function.
10453 (create_register_cache, free_register_cache): New functions.
10454 (set_register_cache): Don't initialize the register cache here.
10455 (registers_to_string, registers_from_string, register_data): Call
10457 * regcache.h: Add prototypes.
10458 * server.h: Likewise.
10460 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10462 * mem-break.c: New file.
10463 * mem-break.h: New file.
10464 * Makefile.in: Add mem-break.o rule; update server.h
10466 * inferiors.c (struct inferior_info): Add target_data
10468 (clear_inferiors): Free target_data member if set.
10469 (inferior_target_data, set_inferior_target_data): New functions.
10470 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10471 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10472 * linux-low.c (linux_bp_reinsert): New variable.
10473 (struct inferior_linux_data): New.
10474 (linux_create_inferior): Use set_inferior_target_data.
10475 (linux_attach): Likewise. Call add_inferior.
10476 (linux_wait_for_one_inferior): New function.
10477 (linux_wait): Call it.
10478 (linux_write_memory): Add const.
10479 (initialize_low): Call set_breakpoint_data.
10480 * linux-low.h (struct linux_target_ops): Add breakpoint
10482 * server.c (attach_inferior): Remove extra add_inferior
10484 * server.h: Include mem-break.h. Update inferior.c
10486 * target.c (read_inferior_memory)
10487 (write_inferior_memory): New functions.
10488 * target.h (read_inferior_memory)
10489 (write_inferior_memory): Change macros to prototypes.
10490 (struct target_ops): Update comments. Add const to write_memory
10493 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10495 * linux-low.c (usr_store_inferior_registers): Support
10496 registers which are allowed to fail to store.
10497 * linux-low.h (linux_target_ops): Likewise.
10498 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10499 (ppc_cannot_store_register): FPSCR may not be storable.
10501 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10503 * server.h: Include <string.h> if HAVE_STRING_H.
10504 * ChangeLog: Correct paths in last ChangeLog entry.
10506 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10508 * linux-low.h: Remove obsolete prototypes.
10509 (struct linux_target_ops): New.
10510 (extern the_low_target): New.
10511 * linux-low.c (num_regs, regmap): Remove declarations.
10512 (register_addr): Use the_low_target explicitly.
10513 (fetch_register): Likewise.
10514 (usr_fetch_inferior_registers): Likewise.
10515 (usr_store_inferior_registers): Likewise.
10516 * linux-arm-low.c (num_regs): Remove.
10517 (arm_num_regs): Define.
10518 (arm_regmap): Renamed from regmap, made static.
10519 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10521 (arm_cannot_store_register): Renamed from cannot_store_register,
10523 (the_low_target): New.
10524 * linux-i386-low.c (num_regs): Remove.
10525 (i386_num_regs): Define.
10526 (i386_regmap): Renamed from regmap, made static.
10527 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10529 (i386_cannot_store_register): Renamed from cannot_store_register,
10531 (the_low_target): New.
10532 * linux-ia64-low.c (num_regs): Remove.
10533 (ia64_num_regs): Define.
10534 (ia64_regmap): Renamed from regmap, made static.
10535 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10537 (ia64_cannot_store_register): Renamed from cannot_store_register,
10539 (the_low_target): New.
10540 * linux-m68k-low.c (num_regs): Remove.
10541 (m68k_num_regs): Define.
10542 (m68k_regmap): Renamed from regmap, made static.
10543 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10545 (m68k_cannot_store_register): Renamed from cannot_store_register,
10547 (the_low_target): New.
10548 * linux-mips-low.c (num_regs): Remove.
10549 (mips_num_regs): Define.
10550 (mips_regmap): Renamed from regmap, made static.
10551 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10553 (mips_cannot_store_register): Renamed from cannot_store_register,
10555 (the_low_target): New.
10556 * linux-ppc-low.c (num_regs): Remove.
10557 (ppc_num_regs): Define.
10558 (ppc_regmap): Renamed from regmap, made static.
10559 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10561 (ppc_cannot_store_register): Renamed from cannot_store_register,
10563 (the_low_target): New.
10564 * linux-s390-low.c (num_regs): Remove.
10565 (s390_num_regs): Define.
10566 (s390_regmap): Renamed from regmap, made static.
10567 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10569 (s390_cannot_store_register): Renamed from cannot_store_register,
10571 (the_low_target): New.
10572 * linux-sh-low.c (num_regs): Remove.
10573 (sh_num_regs): Define.
10574 (sh_regmap): Renamed from regmap, made static.
10575 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10577 (sh_cannot_store_register): Renamed from cannot_store_register,
10579 (the_low_target): New.
10580 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10581 (the_low_target): New.
10583 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10585 * Makefile.in: Add stamp-h target.
10586 * configure.in: Create stamp-h.
10587 * configure: Regenerated.
10589 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10591 * inferiors.c: New file.
10592 * target.c: New file.
10593 * target.h: New file.
10594 * Makefile.in: Add target.o and inferiors.o. Update
10596 * linux-low.c (inferior_pid): New static variable,
10597 moved from server.c.
10598 (linux_create_inferior): Renamed from create_inferior.
10599 Call add_inferior. Return 0 on success instead of a PID.
10600 (linux_attach): Renamed from myattach.
10601 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10602 (linux_thread_alive): Renamed from mythread_alive.
10603 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10605 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10606 (regsets_store_inferior_registers): Correct error message.
10607 Add missing ``return 0''.
10608 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10609 (linux_store_registers): Renamed from store_inferior_registers.
10610 (linux_read_memory): Renamed from read_inferior_memory.
10611 (linux_write_memory): Renamed from write_inferior_memory.
10612 (linux_target_ops): New structure.
10613 (initialize_low): Call set_target_ops ().
10614 * remote-utils.c (unhexify): New function.
10615 (hexify): New function.
10616 (input_interrupt): Send signals to ``signal_pid''.
10617 * server.c (inferior_pid): Remove.
10618 (start_inferior): Update create_inferior call.
10619 (attach_inferior): Call add_inferior.
10620 (handle_query): New function.
10621 (main): Call handle_query for `q' packets.
10622 * server.h: Include "target.h". Remove obsolete prototypes.
10623 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10625 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10627 * Makefile.in: Add WARN_CFLAGS. Update configury
10629 * configure.in: Check for <string.h>
10630 * configure: Regenerate.
10631 * config.in: Regenerate.
10632 * gdbreplay.c: Include needed system headers.
10633 (remote_open): Remove strchr prototype.
10634 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10635 * regcache.c (supply_register): Change buf argument to const void *.
10636 (supply_register_by_name): Likewise.
10637 (collect_register): Change buf argument to void *.
10638 (collect_register_by_name): Likewise.
10639 * regcache.h: Add missing prototypes.
10640 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10641 * server.c (handle_query): New function.
10642 (attached): New static variable, moved out of main.
10643 (main): Quiet longjmp clobber warnings.
10644 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10645 * utils.c (error): Remove NORETURN.