1 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3 * Makefile.in (SFILES): Add common/btrace-common.c.
4 (OBS): Add common/btrace-common.o.
5 (btrace-common.o): Add build rules.
6 * linux-low: Include btrace-common.h.
7 (linux_low_read_btrace): Use struct btrace_data. Call
8 btrace_data_init and btrace_data_fini.
10 2015-02-06 Pedro Alves <palves@redhat.com>
12 * thread-db.c (find_new_threads_callback): Add debug output.
14 2015-02-04 Pedro Alves <palves@redhat.com>
16 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
17 (resume_stopped_resumed_lwps): New function.
18 (linux_wait_for_event_filtered): Use it.
20 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
22 * Makefile.in (SFILES): Add linux-personality.c.
23 (linux-personality.o): New rule.
24 * configure.srv (srv_linux_obj): Add linux-personality.o to the
25 list of objects to be built.
26 * linux-low.c: Include nat/linux-personality.h.
27 (linux_create_inferior): Remove code to disable address space
28 randomization (moved to ../nat/linux-personality.c). Create
29 cleanup to disable address space randomization.
31 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
33 * Makefile.in (posix-strerror.o): New rule.
34 (mingw-strerror.o): Likewise.
35 * configure: Regenerated.
36 * configure.ac: Source file ../common/common.host. Initialize new
37 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
39 2015-01-14 Yao Qi <yao@codesourcery.com>
41 * Makefile.in (SFILES): Add nat/ppc-linux.c.
42 (ppc-linux.o): New rule.
43 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
44 * configure.ac: AC_CHECK_FUNCS(getauxval).
45 * config.in: Re-generated.
46 * configure: Re-generated.
47 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
48 ppc64_64bit_inferior_p
50 2015-01-14 Yao Qi <yao@codesourcery.com>
52 * linux-ppc-low.c: Include "nat/ppc-linux.h".
53 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
54 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
55 (PT_ORIG_R3, PT_TRAP): Likewise.
56 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
57 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
58 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
60 2015-01-10 Joel Brobecker <brobecker@adacore.com>
62 * i387-fp.c (i387_cache_to_xsave): In look over
63 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
64 zmmh_low_space field by use of zmmh_high_space.
66 2015-01-09 Pedro Alves <palves@redhat.com>
68 * linux-low.c (step_over_bkpt): Move higher up in the file.
69 (handle_extended_wait): Don't store the stop_pc here.
70 (get_stop_pc): Adjust comments and rename to ...
71 (check_stopped_by_breakpoint): ... this. Record whether the LWP
72 stopped for a software breakpoint or hardware breakpoint.
73 (thread_still_has_status_pending_p): New function.
74 (status_pending_p_callback): Use
75 thread_still_has_status_pending_p. If the event is no longer
76 interesting, resume the LWP.
77 (handle_tracepoints): Add assert.
78 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
79 (wstatus_maybe_breakpoint): New function.
80 (cancel_breakpoint): Delete function.
81 (check_stopped_by_watchpoint): New function, factored out from
82 linux_low_filter_event.
83 (lp_status_maybe_breakpoint): Delete function.
84 (linux_low_filter_event): Remove filter_ptid argument.
85 Leave thread group exits pending here. Store the LWP's stop PC.
86 Always leave events pending.
87 (linux_wait_for_event_filtered): Pull all events out of the
88 kernel, and leave them all pending.
89 (count_events_callback, select_event_lwp_callback): Consider all
91 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
92 (select_event_lwp): Only give preference to the stepping LWP in
93 all-stop mode. Adjust comments.
94 (ignore_event): New function.
95 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
96 references to cancel_breakpoints. Adjust to renames. Also give
97 equal priority to all LWPs that have had events in non-stop mode.
98 If reporting a software breakpoint event, unadjust the LWP's PC.
99 (linux_wait): If linux_wait_1 returned an ignored event, retry.
100 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
102 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
103 (resume_status_pending_p): Use thread_still_has_status_pending_p.
104 (linux_stopped_by_watchpoint): Adjust.
105 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
106 * linux-low.h (enum lwp_stop_reason): New.
107 (struct lwp_info) <stop_pc>: Adjust comment.
108 <stopped_by_watchpoint>: Delete field.
109 <stop_reason>: New field.
110 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
111 * mem-break.c (software_breakpoint_inserted_here)
112 (hardware_breakpoint_inserted_here): New function.
113 * mem-break.h (software_breakpoint_inserted_here)
114 (hardware_breakpoint_inserted_here): Declare.
115 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
116 (cancel_breakpoints): Delete.
117 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
118 (upload_fast_traceframes): Remove references to
121 2015-01-09 Pedro Alves <palves@redhat.com>
123 * thread-db.c (find_new_threads_callback): Ignore thread if the
124 kernel thread ID is -1.
126 2015-01-09 Pedro Alves <palves@redhat.com>
128 * linux-low.c (linux_attach_fail_reason_string): Move to
129 nat/linux-ptrace.c, and rename.
130 (linux_attach_lwp): Update comment.
131 (attach_proc_task_lwp_callback): New function.
132 (linux_attach): Adjust to rename and use
133 linux_proc_attach_tgid_threads.
134 (linux_attach_fail_reason_string): Delete declaration.
136 2015-01-01 Joel Brobecker <brobecker@adacore.com>
138 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
139 * server.c (gdbserver_version): Likewise.
141 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
143 * remote-utils.c: Include ctype.h.
144 (input_interrupt): Explicitly handle the case when the char
145 received is the NUL byte. Improve the printing of non-ASCII
148 2014-12-16 Joel Brobecker <brobecker@adacore.com>
150 * linux-low.c (linux_low_filter_event): Update call to
151 linux_enable_event_reporting following the addition of
152 a new parameter to that function.
154 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
157 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
158 (AARCH64_FPCR_REGNO): Likewise.
159 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
160 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
161 (aarch64_store_fpregset): Likewise.
163 2014-12-15 Joel Brobecker <brobecker@adacore.com>
165 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
166 Remove FIXME comment about assumption about N.
168 2014-12-13 Joel Brobecker <brobecker@adacore.com>
170 * configure.ac: If large-file support is disabled in GDBserver,
171 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
172 * configure: Regenerate.
174 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
176 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
177 warning upon ENODATA from ptrace.
178 * linux-s390-low.c (s390_store_tdb): New.
179 (s390_regsets): Add regset for NT_S390_TDB.
181 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
183 * linux-low.c (regsets_store_inferior_registers): Skip regsets
184 without a fill_function.
185 * linux-s390-low.c (s390_fill_last_break): Remove.
186 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
187 (s390_arch_setup): Use regset's size instead of fill_function for
190 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
192 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
193 the regset's store function when ptrace returned an error.
194 * regcache.c (get_thread_regcache): Invalidate register cache
195 before fetching inferior's registers.
197 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
199 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
200 while-loop as for-loop.
201 (regsets_store_inferior_registers): Likewise.
203 2014-11-28 Yao Qi <yao@codesourcery.com>
205 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
206 * config.in, configure: Re-generate.
207 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
210 2014-11-21 Yao Qi <yao@codesourcery.com>
212 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
213 (AC_CHECK_HEADERS): Remove malloc.h.
214 * configure: Re-generated.
215 * config.in: Re-generated.
216 * server.h: Don't include alloca.h and malloc.h.
217 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
218 Don't include malloc.h.
220 2014-11-17 Joel Brobecker <brobecker@adacore.com>
222 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
223 corresponding ERRNO check in same block.
225 2014-11-12 Pedro Alves <palves@redhat.com>
227 * server.c (cont_thread): Update comment.
228 (start_inferior, attach_inferior): No longer clear cont_thread.
229 (handle_v_cont): No longer set cont_thread.
230 (captured_main): Clear cont_thread each time a GDB connects.
232 2014-11-12 Pedro Alves <palves@redhat.com>
234 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
235 thread, and don't resume all threads if the Hc thread has exited.
237 2014-11-12 Pedro Alves <palves@redhat.com>
239 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
240 the process group instead of to a specific LWP.
242 2014-10-15 Pedro Alves <palves@redhat.com>
245 * win32-arm-low.c (arm_set_thread_context): Remove current_event
247 (arm_set_thread_context): Delete.
248 (the_low_target): Adjust.
249 * win32-i386-low.c (debug_registers_changed)
250 (debug_registers_used): Delete.
251 (update_debug_registers_callback): New function.
252 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
253 needing to update their debug registers.
254 (win32_get_current_dr): New function.
255 (x86_dr_low_get_addr, x86_dr_low_get_control)
256 (x86_dr_low_get_status): Fetch the debug register from the thread
258 (i386_initial_stuff): Adjust.
259 (i386_get_thread_context): Remove current_event parameter. Don't
260 clear debug_registers_changed nor copy DR values to
262 (i386_set_thread_context): Delete.
263 (i386_prepare_to_resume): New function.
264 (i386_thread_added): Mark the thread as needing to update irs
266 (the_low_target): Remove i386_set_thread_context and install
267 i386_prepare_to_resume.
268 * win32-low.c (win32_get_thread_context): Adjust.
269 (win32_set_thread_context): Use SetThreadContext
271 (win32_prepare_to_resume): New function.
272 (win32_require_context): New function, factored out from ...
273 (thread_rec): ... this.
274 (continue_one_thread): Call win32_prepare_to_resume on each thread
275 we're about to continue.
276 (win32_resume): Call win32_prepare_to_resume on the event thread.
277 * win32-low.h (struct win32_thread_info)
278 <debug_registers_changed>: New field.
279 (struct win32_target_ops): Change prototype of set_thread_context,
280 delete set_thread_context and add prepare_to_resume.
281 (win32_require_context): New declaration.
283 2014-10-08 Gary Benson <gbenson@redhat.com>
285 * server.h: Do not include common-exceptions.h.
287 2014-10-08 Gary Benson <gbenson@redhat.com>
289 * server.h: Do not include cleanups.h.
291 2014-09-30 James Hogan <james.hogan@imgtec.com>
293 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
296 2014-09-23 Yao Qi <yao@codesourcery.com>
298 * linux-low.c (lp_status_maybe_breakpoint): New function.
299 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
300 (count_events_callback): Likewise.
301 (select_event_lwp_callback): Likewise.
302 (cancel_breakpoints_callback): Likewise.
304 2014-09-19 Don Breazeal <donb@codesourcery.com>
306 * linux-low.c (handle_extended_wait): Call
307 linux_ptrace_get_extended_event.
308 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
309 linux_is_extended_waitstatus.
311 2014-09-16 Joel Brobecker <brobecker@adacore.com>
313 * Makefile.in (CPPFLAGS): Define.
314 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
315 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
317 2014-09-16 Gary Benson <gbenson@redhat.com>
319 * inferiors.h (current_inferior): Renamed as...
320 (current_thread): New variable. All uses updated.
321 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
322 (maybe_move_out_of_jump_pad): Likewise.
323 (cancel_breakpoint): Likewise.
324 (linux_low_filter_event): Likewise.
325 (wait_for_sigstop): Likewise.
326 (linux_resume_one_lwp): Likewise.
327 (need_step_over_p): Likewise.
328 (start_step_over): Likewise.
329 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
330 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
331 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
332 and save_inferior as saved_thread.
333 * regcache.c (get_thread_regcache): Renamed saved_inferior as
335 (regcache_invalidate_thread): Likewise.
336 * remote-utils.c (prepare_resume_reply): Likewise.
337 * thread-db.c (thread_db_get_tls_address): Likewise.
338 (disable_thread_event_reporting): Likewise.
339 (remove_thread_event_breakpoints): Likewise.
340 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
342 * target.h (set_desired_inferior): Renamed as...
343 (set_desired_thread): New declaration. All uses updated.
344 * server.c (myresume): Updated comment to reference thread instead
346 (handle_serial_event): Likewise.
347 (handle_target_event): Likewise.
349 2014-09-12 Tom Tromey <tromey@redhat.com>
350 Gary Benson <gbenson@redhat.com>
352 * regcache.h: Include common-regcache.h.
353 (regcache_read_pc): Don't declare.
354 * regcache.c (get_thread_regcache_for_ptid): New function.
356 2014-09-11 Tom Tromey <tromey@redhat.com>
357 Gary Benson <gbenson@redhat.com>
359 * symbol.c: New file.
360 * Makefile.in (SFILES): Add symbol.c.
363 2014-09-11 Gary Benson <gbenson@redhat.com>
365 * target.c (target_stop_ptid, target_continue_ptid): New
368 2014-09-11 Tom Tromey <tromey@redhat.com>
369 Gary Benson <gbenson@redhat.com>
371 * target.h: Include target/target.h.
372 * target.c (target_read_memory, target_read_uint32)
373 (target_write_memory): New functions.
375 2014-09-11 Gary Benson <gbenson@redhat.com>
377 * server.h (debug_hw_points): Don't declare.
378 * server.c (debug_hw_points): Don't define. Replace all uses
379 with show_debug_regs.
380 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
381 all uses with show_debug_regs.
383 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
385 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
386 endianness into account.
387 (ppc_supply_ptrace_register): Likewise.
389 2014-09-03 James Hogan <james.hogan@imgtec.com>
391 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
392 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
394 2014-09-03 Gary Benson <gbenson@redhat.com>
396 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
397 ALL_DEBUG_ADDRESS_REGISTERS.
399 2014-09-02 Gary Benson <gbenson@redhat.com>
401 * i386-low.h: Renamed as...
402 * x86-low.h: New file. All type, function and variable name
403 prefixes changed from "i386_" to "x86_". All references updated.
404 * i386-low.c: Renamed as...
405 * x86-low.c: New file. All type, function and variable name
406 prefixes changed from "i386_" to "x86_". All references updated.
408 2014-09-02 Gary Benson <gbenson@redhat.com>
410 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
411 (x86_linux_new_thread): Likewise.
413 2014-08-29 Gary Benson <gbenson@redhat.com>
415 * server.h (setjmp.h): Do not include.
416 (toplevel): Do not declare.
417 (common-exceptions.h): Include.
418 (cleanups.h): Likewise.
419 * server.c (toplevel): Do not define.
420 (exit_code): New static global.
421 (detach_or_kill_for_exit_cleanup): New function.
422 (main): New function. Original main renamed to...
423 (captured_main): New function.
424 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
426 2014-08-29 Gary Benson <gbenson@redhat.com>
428 * Makefile.in (SFILES): Add common/common-exceptions.c.
429 (OBS): Add common-exceptions.o.
430 (common-exceptions.o): New rule.
431 * utils.c (prepare_to_throw_exception): New function.
433 2014-08-29 Gary Benson <gbenson@redhat.com>
435 * config.in: Regenerate.
436 * configure: Likewise.
438 2014-08-29 Gary Benson <gbenson@redhat.com>
440 * Makefile.in (SFILES): Add common/cleanups.c.
442 (cleanups.o): New rule.
444 2014-08-29 Gary Benson <gbenson@redhat.com>
446 * utils.c (internal_vwarning): New function.
448 2014-08-28 Gary Benson <gbenson@redhat.com>
450 * utils.h (fatal): Remove declaration.
451 * utils.c (fatal): Remove function.
453 2014-08-28 Gary Benson <gbenson@redhat.com>
455 * tracepoint.c (gdb_agent_init): Replace fatal with
457 (initialize_tracepoint): Likewise.
459 2014-08-28 Gary Benson <gbenson@redhat.com>
461 * remote-utils.c (remote_prepare): Replace fatal with error.
463 2014-08-28 Gary Benson <gbenson@redhat.com>
465 * linux-low.c (linux_async): Replace fatal with warning.
467 (linux_start_non_stop): Return -1 if linux_async failed.
469 2014-08-28 Gary Benson <gbenson@redhat.com>
471 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
473 (i386_dr_low_get_addr): Remove vague comment.
474 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
477 2014-08-28 Gary Benson <gbenson@redhat.com>
479 * inferiors.c (get_thread_process): Replace check with gdb_assert.
480 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
482 (linux_resume_one_lwp): Likewise.
483 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
485 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
487 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
488 (init_register_cache): Replace fatal with gdb_assert_not_reached.
489 (find_register_by_name): Replace fatal with internal_error.
490 (find_regno): Likewise.
491 * tdesc.c (init_target_desc): Replace check with gdb_assert.
492 * thread-db.c (thread_db_create_event): Likewise.
493 (thread_db_load_search): Likewise.
494 (try_thread_db_load_1): Likewise.
495 * tracepoint.c (get_jump_space_head): Replace fatal with
497 (claim_trampoline_space): Likewise.
498 (have_fast_tracepoint_trampoline_buffer): Likewise.
499 (cmd_qtstart): Likewise.
500 (stop_tracing): Likewise.
501 (fast_tracepoint_collecting): Likewise.
502 (target_malloc): Likewise.
503 (download_tracepoint): Likewise.
504 (download_trace_state_variables): Replace check with gdb_assert.
505 (upload_fast_traceframes): Replace fatal with internal_error.
507 2014-08-19 Tom Tromey <tromey@redhat.com>
508 Gary Benson <gbenson@redhat.com>
510 * Makefile.in (SFILES): Add common/common-debug.c.
511 (OBS): Add common-debug.o.
512 (common-debug.o): New rule.
513 * debug.h (debug_printf): Don't declare.
514 * debug.c (debug_printf): Renamed and rewritten as...
515 (debug_vprintf): New function.
517 2014-08-19 Gary Benson <gbenson@redhat.com>
519 * utils.h: Do not include print-utils.h.
521 2014-08-19 Tom Tromey <tromey@redhat.com>
522 Gary Benson <gbenson@redhat.com>
524 * server.h: Add static assertion.
525 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
527 2014-08-19 Tom Tromey <tromey@redhat.com>
528 Gary Benson <gbenson@redhat.com>
530 * Makefile.in (SFILES): Add common/errors.c.
532 (IPA_OBS): Add errors-ipa.o.
533 (errors.o): New rule.
534 (errors-ipa.o): Likewise.
535 * utils.h (perror_with_name, error, warning): Don't declare.
536 * utils.c (warning): Renamed and rewritten as...
537 (vwarning): New function.
538 (error): Renamed and rewritten as...
539 (verror): New function.
540 (internal_error): Renamed and rewritten as...
541 (internal_verror): New function.
543 2014-08-07 Gary Benson <gbenson@redhat.com>
545 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
546 * configure: Regenerate.
547 * config.in: Likewise.
548 * server.h: Do not include errno.h.
549 * event-loop.c: Likewise.
550 * hostio-errno.c: Likewise.
551 * linux-low.c: Likewise.
552 * remote-utils.c: Likewise.
553 * spu-low.c: Likewise.
555 * gdbreplay.c: Unconditionally include errno.h.
557 2014-08-07 Gary Benson <gbenson@redhat.com>
559 * server.h: Do not include string.h.
560 * event-loop.c: Likewise.
561 * linux-low.c: Likewise.
562 * regcache.c: Likewise.
563 * remote-utils.c: Likewise.
564 * spu-low.c: Likewise.
567 2014-08-07 Gary Benson <gbenson@redhat.com>
569 * server.h: Do not include gdb_assert.h.
571 2014-08-07 Gary Benson <gbenson@redhat.com>
573 * server.h: Do not include common-utils.h.
575 2014-08-07 Gary Benson <gbenson@redhat.com>
577 * server.h: Do not include ptid.h.
580 2014-08-07 Gary Benson <gbenson@redhat.com>
582 * server.h: Do not include gdb_locale.h.
584 2014-08-07 Gary Benson <gbenson@redhat.com>
586 * server.h: Do not include gdb/signals.h.
587 * win32-low.c: Likewise.
589 2014-08-07 Gary Benson <gbenson@redhat.com>
591 * server.h: Do not include pathmax.h.
593 2014-08-07 Gary Benson <gbenson@redhat.com>
595 * server.h: Do not include libiberty.h.
596 * linux-bfin-low.c: Likewise.
598 2014-08-07 Gary Benson <gbenson@redhat.com>
600 * server.h: Do not include ansidecl.h.
602 2014-08-07 Gary Benson <gbenson@redhat.com>
604 * linux-x86-low.c: Do not include stddef.h.
605 * lynx-ppc-low.c: Likewise.
606 * tracepoint.c: Likewise.
608 2014-08-07 Gary Benson <gbenson@redhat.com>
610 * server.h: Do not include stdarg.h.
611 * nto-low.c: Likewise.
613 2014-08-07 Gary Benson <gbenson@redhat.com>
615 * server.h: Do not include stdlib.h.
616 * inferiors.c: Likewise.
617 * linux-low.c: Likewise.
618 * regcache.c: Likewise.
619 * spu-low.c: Likewise.
620 * tracepoint.c: Likewise.
623 2014-08-07 Gary Benson <gbenson@redhat.com>
625 * server.h: Do not include stdio.h.
626 * linux-low.c: Likewise.
627 * remote-utils.c: Likewise.
628 * spu-low.c: Likewise.
630 * wincecompat.c: Likewise.
632 2014-08-06 Gary Benson <gbenson@redhat.com>
634 * regcache.c (init_register_cache): Move conditionals inside if.
636 2014-08-06 Gary Benson <gbenson@redhat.com>
638 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
640 2014-07-31 Gary Benson <gbenson@redhat.com>
642 * ax.h: Do not include server.h.
643 * gdbthread.h: Likewise.
644 * lynx-low.h: Likewise.
647 2014-07-30 Gary Benson <gbenson@redhat.com>
649 * server.h: Include common-defs.h.
650 Do not include config.h or build-gnulib-gdbserver/config.h.
652 2014-07-30 Gary Benson <gbenson@redhat.com>
654 * hostio-errno.c: Move server.h to top of includes list.
655 * inferiors.c: Likewise.
656 * linux-x86-low.c: Likewise.
657 * notif.c: Include server.h.
659 2014-07-24 Tom Tromey <tromey@redhat.com>
660 Gary Benson <gbenson@redhat.com>
662 * server.h (CORE_ADDR): Now unsigned.
664 2014-07-16 Pedro Alves <palves@redhat.com>
666 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
668 2014-07-15 Pedro Alves <palves@redhat.com>
670 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
673 2014-07-11 Pedro Alves <palves@redhat.com>
675 * linux-low.c (kill_wait_lwp): New function, based on
676 kill_one_lwp_callback, but use my_waitpid directly.
677 (kill_one_lwp_callback, linux_kill): Use it.
679 2014-06-23 Pedro Alves <palves@redhat.com>
681 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
682 before setting DR0..DR3.
684 2014-06-20 Gary Benson <gbenson@redhat.com>
686 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
687 * configure: Regenerated.
688 * config.in: Likewise.
690 2014-06-20 Gary Benson <gbenson@redhat.com>
692 * Makefile.in (SFILES): Update locations for files moved
694 (object file files): Reordered.
696 2014-06-20 Gary Benson <gbenson@redhat.com>
698 * i386-low.h (i386_dr_low_can_set_addr): Removed.
699 (i386_dr_low_set_addr): Likewise.
700 (i386_dr_low_get_addr): Likewise.
701 (i386_dr_low_can_set_control): Likewise.
702 (i386_dr_low_set_control): Likewise.
703 (i386_dr_low_get_control): Likewise.
704 (i386_dr_low_get_status): Likewise.
705 (i386_get_debug_register_length): Likewise.
706 * linux-x86-low.c (i386_dr_low_set_addr):
707 Changed signature. Made static.
708 (i386_dr_low_get_addr): Likewise.
709 (i386_dr_low_set_control): Likewise.
710 (i386_dr_low_get_control): Likewise.
711 (i386_dr_low_get_status): Likewise.
712 (i386_dr_low): New global variable.
713 * win32-i386-low.c (i386_dr_low_set_addr):
714 Changed signature. Made static.
715 (i386_dr_low_get_addr): Likewise.
716 (i386_dr_low_set_control): Likewise.
717 (i386_dr_low_get_control): Likewise.
718 (i386_dr_low_get_status): Likewise.
719 (i386_dr_low): New global variable.
721 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
723 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
724 * Makefile.in (AR, AR_FLAGS): Define.
725 * configure: Regenerate.
727 2014-06-19 Gary Benson <gbenson@redhat.com>
729 * Makefile.in (i386-dregs.o): New rule.
730 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
731 * i386-low.c (target.h): Remove include.
732 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
733 (DR_CONTROL_SHIFT): Likewise.
734 (DR_CONTROL_SIZE): Likewise.
735 (DR_RW_EXECUTE): Likewise.
736 (DR_RW_WRITE): Likewise.
737 (DR_RW_READ): Likewise.
738 (DR_RW_IORW): Likewise.
739 (DR_LEN_1): Likewise.
740 (DR_LEN_2): Likewise.
741 (DR_LEN_4): Likewise.
742 (DR_LEN_8): Likewise.
743 (DR_LOCAL_ENABLE_SHIFT): Likewise.
744 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
745 (DR_ENABLE_SIZE): Likewise.
746 (DR_LOCAL_SLOWDOWN): Likewise.
747 (DR_GLOBAL_SLOWDOWN): Likewise.
748 (DR_CONTROL_RESERVED): Likewise.
749 (I386_DR_CONTROL_MASK): Likewise.
750 (I386_DR_VACANT): Likewise.
751 (I386_DR_LOCAL_ENABLE): Likewise.
752 (I386_DR_GLOBAL_ENABLE): Likewise.
753 (I386_DR_DISABLE): Likewise.
754 (I386_DR_SET_RW_LEN): Likewise.
755 (I386_DR_GET_RW_LEN): Likewise.
756 (I386_DR_WATCH_HIT): Likewise.
757 (i386_wp_op_t): Likewise.
758 (i386_show_dr): Likewise.
759 (i386_length_and_rw_bits): Likewise.
760 (i386_insert_aligned_watchpoint): Likewise.
761 (i386_remove_aligned_watchpoint): Likewise.
762 (i386_handle_nonaligned_watchpoint): Likewise.
763 i386_update_inferior_debug_regs(): Likewise.
764 (i386_dr_insert_watchpoint): Likewise.
765 (i386_dr_remove_watchpoint): Likewise.
766 (i386_dr_region_ok_for_watchpoint): Likewise.
767 (i386_dr_stopped_data_address): Likewise.
768 (i386_dr_stopped_by_watchpoint): Likewise.
770 2014-06-19 Gary Benson <gbenson@redhat.com>
772 * i386-low.c (i386_dr_show): Renamed to
773 i386_show_dr and made static. All uses updated.
774 (i386_dr_length_and_rw_bits): Renamed to
775 i386_length_and_rw_bits and made static.
777 (i386_dr_insert_aligned_watchpoint): Renamed to
778 i386_insert_aligned_watchpoint and made static.
780 (i386_dr_remove_aligned_watchpoint): Renamed to
781 i386_remove_aligned_watchpoint and made static.
783 (i386_dr_update_inferior_debug_regs): Renamed to
784 i386_update_inferior_debug_regs and made static.
787 2014-06-18 Gary Benson <gbenson@redhat.com>
789 * i386-low.h (i386_dr_low_can_set_addr): New macro.
790 (i386_dr_low_can_set_control): Likewise.
791 (i386_get_debug_register_length): Likewise.
792 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
793 (i386_dr_low_can_set_control): Likewise.
794 (i386_get_debug_register_length): Likewise.
796 2014-06-17 Gary Benson <gbenson@redhat.com>
798 * i386-low.h (i386-dregs.h): New include.
799 (DR_FIRSTADDR): Now in i386-dregs.h.
800 (DR_LASTADDR): Likewise.
801 (DR_NADDR): Likewise.
802 (DR_STATUS): Likewise.
803 (DR_CONTROL): Likewise.
804 (i386_debug_reg_state): Likewise.
805 (i386_dr_insert_watchpoint): Likewise.
806 (i386_dr_remove_watchpoint): Likewise.
807 (i386_dr_region_ok_for_watchpoint): Likewise.
808 (i386_dr_stopped_data_address): Likewise.
809 (i386_dr_stopped_by_watchpoint): Likewise.
810 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
812 2014-06-18 Gary Benson <gbenson@redhat.com>
814 * i386-low.h (i386_low_insert_watchpoint): Renamed to
815 i386_dr_insert_watchpoint.
816 (i386_low_remove_watchpoint): Renamed to
817 i386_dr_remove_watchpoint.
818 (i386_low_region_ok_for_watchpoint): Renamed to
819 i386_dr_region_ok_for_watchpoint.
820 (i386_low_stopped_data_address): Renamed to
821 i386_dr_stopped_data_address.
822 (i386_low_stopped_by_watchpoint): Renamed to
823 i386_dr_stopped_by_watchpoint.
824 * i386-low.c (i386_show_dr): Renamed to
825 i386_dr_show and made nonstatic. All uses updated.
826 (i386_length_and_rw_bits): Renamed to
827 i386_dr_length_and_rw_bits and made nonstatic.
829 (i386_insert_aligned_watchpoint): Renamed to
830 i386_dr_insert_aligned_watchpoint and made nonstatic.
832 (i386_remove_aligned_watchpoint): Renamed to
833 i386_dr_remove_aligned_watchpoint and made nonstatic.
835 (i386_update_inferior_debug_regs): Renamed to
836 i386_dr_update_inferior_debug_regs and made nonstatic.
838 (i386_low_insert_watchpoint): Renamed to
839 i386_dr_insert_watchpoint. All uses updated.
840 (i386_low_remove_watchpoint): Renamed to
841 i386_dr_remove_watchpoint. All uses updated.
842 (i386_low_region_ok_for_watchpoint): Renamed to
843 i386_dr_region_ok_for_watchpoint. All uses updated.
844 (i386_low_stopped_data_address): Renamed to
845 i386_dr_stopped_data_address. All uses updated.
846 (i386_low_stopped_by_watchpoint): Renamed to
847 i386_dr_stopped_by_watchpoint. All uses updated.
849 2014-06-18 Gary Benson <gbenson@redhat.com>
851 * i386-low.c (i386_dr_low_can_set_addr): New macro.
852 (i386_dr_low_can_set_control): Likewise.
853 (i386_insert_aligned_watchpoint): New check.
855 2014-06-18 Gary Benson <gbenson@redhat.com>
857 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
860 2014-06-18 Gary Benson <gbenson@redhat.com>
862 * i386-low.c (i386_length_and_rw_bits): Use internal_error
863 instead of fatal and error.
864 (i386_handle_nonaligned_watchpoint): Likewise.
866 2014-06-18 Gary Benson <gbenson@redhat.com>
868 * i386-low.c (i386_get_debug_register_length): New macro.
869 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
870 (i386_show_dr): Use debug_printf instead of fprintf. Use
871 phex to format values.
873 2014-06-18 Gary Benson <gbenson@redhat.com>
875 * i386-low.h: Comment changes.
876 * i386-low.c: Likewise.
878 2014-06-18 Gary Benson <gbenson@redhat.com>
880 * i386-low.c: Whitespace changes.
882 2014-06-12 Tom Tromey <tromey@redhat.com>
884 * utils.c (freeargv): Remove.
886 2014-06-12 Tom Tromey <tromey@redhat.com>
888 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
889 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
890 (parse_debug_format_options): Likewise.
891 (gdbserver_usage): Likewise.
892 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
893 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
894 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
896 ($(LIBGNU)): Depend on libiberty.
897 (all-lib): Recurse into all subdirs.
898 (install-only): Invoke "install" target in subdirs.
899 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
901 * configure: Rebuild.
902 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
903 for vasprintf, vsnprintf, or gettimeofday.
904 * configure.srv: Don't add safe-ctype.o or lbasename.o to
907 2014-06-05 Joel Brobecker <brobecker@adacore.com>
909 * development.sh: Delete.
910 * Makefile.in (config.status): Adjust dependency on development.sh.
911 * configure.ac: Adjust development.sh source call.
912 * configure: Regenerate.
914 2014-06-02 Pedro Alves <palves@redhat.com>
916 * ax.c (gdb_free_agent_expr): New function.
917 * ax.h (gdb_free_agent_expr): New declaration.
918 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
920 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
922 (clear_breakpoint_conditions_and_commands): New function.
923 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
924 (clear_breakpoint_conditions_and_commands): New declaration.
926 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
928 * linux-aarch64-low.c (asm/ptrace.h): Include.
930 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
932 Fix TLS access for -static -pthread.
933 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
934 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
935 (thread_db_load_search, try_thread_db_load_1): Initialize it.
937 2014-05-20 Pedro Alves <palves@redhat.com>
939 * linux-aarch64-low.c (aarch64_insert_point)
940 (aarch64_remove_point): No longer check whether the type is
941 supported here. Adjust to new interface.
942 (the_low_target): Install aarch64_supports_z_point_type as
943 supports_z_point_type method.
944 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
945 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
946 instead of a Z packet char. Adjust.
947 (arm_supports_z_point_type): New function.
948 (arm_insert_point, arm_remove_point): Adjust to new interface.
949 (the_low_target): Install arm_supports_z_point_type.
950 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
951 (cris_insert_point, cris_remove_point): Adjust to new interface.
952 Don't check whether the type is supported here.
953 (the_low_target): Install cris_supports_z_point_type.
954 * linux-low.c (linux_supports_z_point_type): New function.
955 (linux_insert_point, linux_remove_point): Adjust to new interface.
956 * linux-low.h (struct linux_target_ops) <insert_point,
957 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
958 raw_breakpoint pointer parameter.
959 <supports_z_point_type>: New method.
960 * linux-mips-low.c (mips_supports_z_point_type): New function.
961 (mips_insert_point, mips_remove_point): Adjust to new interface.
962 Use mips_supports_z_point_type.
963 (the_low_target): Install mips_supports_z_point_type.
964 * linux-ppc-low.c (the_low_target): Install NULL as
965 supports_z_point_type method.
966 * linux-s390-low.c (the_low_target): Install NULL as
967 supports_z_point_type method.
968 * linux-sparc-low.c (the_low_target): Install NULL as
969 supports_z_point_type method.
970 * linux-x86-low.c (x86_supports_z_point_type): New function.
971 (x86_insert_point): Adjust to new insert_point interface. Use
972 insert_memory_breakpoint. Adjust to new
973 i386_low_insert_watchpoint interface.
974 (x86_remove_point): Adjust to remove_point interface. Use
975 remove_memory_breakpoint. Adjust to new
976 i386_low_remove_watchpoint interface.
977 (the_low_target): Install x86_supports_z_point_type.
978 * lynx-low.c (lynx_target_ops): Install NULL as
979 supports_z_point_type callback.
980 * nto-low.c (nto_supports_z_point_type): New.
981 (nto_insert_point, nto_remove_point): Adjust to new interface.
982 (nto_target_ops): Install nto_supports_z_point_type.
983 * mem-break.c: Adjust intro comment.
984 (struct raw_breakpoint) <raw_type, size>: New fields.
985 <inserted>: Update comment.
986 <shlib_disabled>: Delete field.
987 (enum bkpt_type) <gdb_breakpoint>: Delete value.
988 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
989 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
990 (raw_bkpt_type_to_target_hw_bp_type): New function.
991 (find_enabled_raw_code_breakpoint_at): New function.
992 (find_raw_breakpoint_at): New type and size parameters. Use them.
993 (insert_memory_breakpoint): New function, based off
994 set_raw_breakpoint_at.
995 (remove_memory_breakpoint): New function.
996 (set_raw_breakpoint_at): Reimplement.
997 (set_breakpoint): New, based on set_breakpoint_at.
998 (set_breakpoint_at): Reimplement.
999 (delete_raw_breakpoint): Go through the_target->remove_point
1000 instead of assuming memory breakpoints.
1001 (find_gdb_breakpoint_at): Delete.
1002 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1003 (find_gdb_breakpoint): New function.
1004 (set_gdb_breakpoint_at): Delete.
1005 (z_type_supported): New function.
1006 (set_gdb_breakpoint_1): New function, loosely based off
1007 set_gdb_breakpoint_at.
1008 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1009 (delete_gdb_breakpoint_at): Delete.
1010 (delete_gdb_breakpoint_1): New function, loosely based off
1011 delete_gdb_breakpoint_at.
1012 (delete_gdb_breakpoint): New function.
1013 (clear_gdb_breakpoint_conditions): Rename to ...
1014 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1016 (add_condition_to_breakpoint): Make static.
1017 (add_breakpoint_condition): Take a struct breakpoint pointer
1018 instead of an address. Adjust.
1019 (gdb_condition_true_at_breakpoint): Rename to ...
1020 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1022 (gdb_condition_true_at_breakpoint): Reimplement.
1023 (add_breakpoint_commands): Take a struct breakpoint pointer
1024 instead of an address. Adjust.
1025 (gdb_no_commands_at_breakpoint): Rename to ...
1026 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1027 parameter. Return true if no breakpoint was found. Change debug
1029 (gdb_no_commands_at_breakpoint): Reimplement.
1030 (run_breakpoint_commands): Rename to ...
1031 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1032 and change return type to boolean.
1033 (run_breakpoint_commands): New function.
1034 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1035 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1036 breakpoint. Go through the_target->remove_point instead of
1037 assuming memory breakpoint.
1038 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1039 software and hardware breakpoints.
1040 (reinsert_raw_breakpoint): Go through the_target->insert_point
1041 instead of assuming memory breakpoint.
1042 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1043 software and hardware breakpoints.
1044 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1045 Check both software and hardware breakpoints.
1046 (validate_inserted_breakpoint): Assert the breakpoint is a
1047 software breakpoint. Set the inserted flag to -1 instead of
1048 setting shlib_disabled.
1049 (delete_disabled_breakpoints): Adjust.
1050 (validate_breakpoints): Only validate software breakpoints.
1051 Adjust to inserted flag change.
1052 (check_mem_read, check_mem_write): Skip breakpoint types other
1053 than software breakpoints. Adjust to inserted flag change.
1054 * mem-break.h (enum raw_bkpt_type): New enum.
1055 (raw_breakpoint, struct process_info): Forward declare.
1056 (Z_packet_to_target_hw_bp_type): Delete declaration.
1057 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1058 (set_gdb_breakpoint, delete_gdb_breakpoint)
1059 (clear_breakpoint_conditions): New declarations.
1060 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1061 (breakpoint_inserted_here): Update comment.
1062 (add_breakpoint_condition, add_breakpoint_commands): Replace
1063 address parameter with a breakpoint pointer parameter.
1064 (gdb_breakpoint_here): Update comment.
1065 (delete_gdb_breakpoint_at): Delete.
1066 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1067 * server.c (process_point_options): Take a struct breakpoint
1068 pointer instead of an address. Adjust.
1069 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1070 delete_gdb_breakpoint.
1071 * spu-low.c (spu_target_ops): Install NULL as
1072 supports_z_point_type method.
1073 * target.h: Include mem-break.h.
1074 (struct target_ops) <prepare_to_access_memory>: Update comment.
1075 <supports_z_point_type>: New field.
1076 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1077 instead of a char. Also take a raw breakpoint pointer.
1078 * win32-arm-low.c (the_low_target): Install NULL as
1079 supports_z_point_type.
1080 * win32-i386-low.c (i386_supports_z_point_type): New function.
1081 (i386_insert_point, i386_remove_point): Adjust to new interface.
1082 (the_low_target): Install i386_supports_z_point_type.
1083 * win32-low.c (win32_supports_z_point_type): New function.
1084 (win32_insert_point, win32_remove_point): Adjust to new interface.
1085 (win32_target_ops): Install win32_supports_z_point_type.
1086 * win32-low.h (struct win32_target_ops):
1087 <supports_z_point_type>: New method.
1088 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1089 instead of a char. Also take a raw breakpoint pointer.
1091 2014-05-20 Pedro Alves <palves@redhat.com>
1093 * mem-break.h: Include break-common.h.
1094 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1095 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1096 (Z_packet_to_target_hw_bp_type): New declaration.
1097 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1098 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1099 (Z_PACKET_ACCESS_WP): Delete macros.
1100 (Z_packet_to_hw_type): Delete function.
1101 * i386-low.h: Don't include break-common.h here.
1102 (Z_packet_to_hw_type): Delete declaration.
1103 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1104 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1105 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1106 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1107 * linux-aarch64-low.c: Don't include break-common.h here.
1108 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1109 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1110 (Z_packet_to_target_hw_bp_type): Delete function.
1111 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1113 (mips_insert_point, mips_remove_point): Use
1114 Z_packet_to_target_hw_bp_type.
1116 2014-05-20 Pedro Alves <palves@redhat.com>
1118 * linux-aarch64-low.c: Include break-common.h.
1119 (enum target_point_type): Delete.
1120 (Z_packet_to_point_type): Rename to ...
1121 (Z_packet_to_target_hw_bp_type): ... this, and return a
1122 target_hw_bp_type instead.
1123 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1124 instead of an enum target_point_type.
1125 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1127 (aarch64_dr_state_insert_one_point)
1128 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1129 (aarch64_handle_aligned_watchpoint)
1130 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1131 Take an enum target_hw_bp_type instead of an enum
1133 (aarch64_supports_z_point_type): New function.
1134 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1135 use Z_packet_to_target_hw_bp_type.
1137 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1139 * configure.ac: Only use -Werror by default when DEVELOPMENT
1141 * configure: Regenerate.
1143 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1145 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1146 * linux-x86-low.c (X86_64_USER_REGS): New.
1147 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1149 2014-04-28 Yao Qi <yao@codesourcery.com>
1151 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1154 2014-04-25 Pedro Alves <palves@redhat.com>
1157 * linux-low.c (linux_attach_fail_reason_string): New function.
1158 (linux_attach_lwp): Delete.
1159 (linux_attach_lwp_1): Rename to ...
1160 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1161 argument. Remove "initial" parameter. Return int instead of
1162 void. Don't error or warn here.
1163 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1164 failure to attach to the tgid. Call warning when failing to
1166 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1167 argument. Remove "initial" parameter. Return int instead of
1168 void. Don't error or warn here.
1169 (linux_attach_fail_reason_string): New declaration.
1170 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1171 interface change. Use linux_attach_fail_reason_string.
1173 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1174 Walfred Tedeschi <walfred.tedeschi@intel.com>
1176 * Makefile.in: Added rules to handle new files
1177 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1178 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1179 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1180 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1181 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1182 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1184 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1185 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1186 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1187 i386/x32-avx512.xml.
1188 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1189 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1190 i386/x32-avx512-linux.xml.
1191 * i387-fp.c (num_avx512_k_registers): New constant for number
1193 (num_avx512_zmmh_low_registers): New constant for number of
1194 lower ZMM registers (0-15).
1195 (num_avx512_zmmh_high_registers): New constant for number of
1196 higher ZMM registers (16-31).
1197 (num_avx512_ymmh_registers): New contant for number of higher
1198 YMM registers (ymm16-31 added by avx521 on x86_64).
1199 (num_avx512_xmm_registers): New constant for number of higher
1200 XMM registers (xmm16-31 added by AVX512 on x86_64).
1201 (struct i387_xsave): Add space for AVX512 registers.
1202 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1203 Add code to handle AVX512 registers.
1204 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1205 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1206 prototypei from generated file.
1207 (tdesc_amd64_avx512_linux): Likewise.
1208 (init_registers_x32_avx512_linux): Likewise.
1209 (tdesc_x32_avx512_linux): Likewise.
1210 (init_registers_i386_avx512_linux): Likewise.
1211 (tdesc_i386_avx512_linux): Likewise.
1212 (x86_64_regmap): Add AVX512 registers.
1213 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1215 (initialize_low_arch): Add code to initialize AVX512 registers.
1217 2014-04-23 Pedro Alves <palves@redhat.com>
1219 * mem-break.c (find_gdb_breakpoint_at): Make static.
1220 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1222 2014-04-23 Pedro Alves <palves@redhat.com>
1224 * i386-low.c: Don't include break-common.h here.
1225 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1226 prototype to take target_hw_bp_type as argument instead of a Z
1228 * i386-low.h: Include break-common.h here.
1229 (Z_packet_to_hw_type): Declare.
1230 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1232 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1233 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1234 (x86_remove_point): Convert the packet number to a
1235 target_hw_bp_type before calling i386_low_remove_watchpoint.
1236 * win32-i386-low.c (i386_insert_point): Convert the packet number
1237 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1238 (i386_remove_point): Convert the packet number to a
1239 target_hw_bp_type before calling i386_low_remove_watchpoint.
1241 2014-04-23 Pedro Alves <palves@redhat.com>
1243 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1245 2014-04-10 Pedro Alves <palves@redhat.com>
1247 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1248 Check if the condition or command is NULL before checking if the
1249 breakpoint is known. On success, return true.
1250 * mem-break.h (add_breakpoint_condition): Document return.
1251 (add_breakpoint_commands): Add describing comment.
1252 * server.c (skip_to_semicolon): New function.
1253 (process_point_options): Use it.
1255 2014-04-09 Pedro Alves <palves@redhat.com>
1257 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1260 2014-02-27 Pedro Alves <palves@redhat.com>
1263 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1265 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1267 (last_thread_of_process_p): Take a PID argument instead of a
1269 (linux_wait_for_lwp): Delete.
1270 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1272 (linux_low_filter_event): New function, party factored out from
1273 linux_wait_for_event.
1274 (linux_wait_for_event): Rename to ...
1275 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1276 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1277 sigsuspend. Check for zombie leaders.
1278 (linux_wait_for_event): Reimplement as wrapper around
1279 linux_wait_for_event_filtered.
1280 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1281 a normal or signal exit is seen, it's the whole process exiting.
1282 (wait_for_sigstop): No longer a for_each_inferior callback.
1283 Rewrite on top of linux_wait_for_event_filtered.
1284 (stop_all_lwps): Call wait_for_sigstop directly.
1285 * server.c (resume, handle_target_event): Handle
1286 TARGET_WAITKIND_NO_RESUMED.
1288 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1290 * win32-low.c (psapi_get_dll_name,
1291 * win32_CreateToolhelp32Snapshot): Delete.
1292 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1293 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1295 (handle_load_dll): Add function description.
1296 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1298 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1300 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1302 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1303 base address when calling win32_add_one_solib.
1304 (handle_load_dll): Delete local variable load_addr.
1305 Remove 0x1000 offset applied to DLL base address when calling
1306 win32_add_one_solib.
1307 (handle_unload_dll): Add comment.
1309 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1311 * win32-low.c (win32_add_all_dlls): Renames
1312 win32_ensure_ntdll_loaded. Rewrite function documentation.
1313 Adjust implementation to always load all DLLs.
1314 Add 0x1000 offset to DLL base address when calling
1315 win32_add_one_solib.
1316 (child_initialization_done): New static global.
1317 (do_initial_child_stuff): Set child_initialization_done to
1318 zero during child initialization, and 1 after. Replace call
1319 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1321 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1322 (handle_unload_dll): Add function documentation.
1323 (get_child_debug_event): Ignore load and unload DLL events
1324 during child initialization.
1326 2014-02-20 Doug Evans <dje@google.com>
1328 Remove global all_lwps.
1329 * inferiors.h (ptid_of): Move here from linux-low.h.
1330 (pid_of, lwpid_of): Ditto.
1331 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1332 parameter is a struct thread_info * now.
1333 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1334 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1335 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1337 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1338 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1339 * linux-arm-low.c (update_registers_callback): Update, "entry"
1340 parameter is a struct thread_info * now.
1341 Fetch lwpid from current_inferior directly.
1342 (arm_insert_point): Pass &all_threads to find_inferior instead of
1344 (arm_remove_point): Ditto.
1345 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1346 (arm_prepare_to_resume): Fetch pid from thread.
1347 (arm_read_description): Fetch lwpid from current_inferior directly.
1348 * linux-low.c (all_lwps): Delete.
1349 (delete_lwp): Delete call to remove_inferior.
1350 (handle_extended_wait): Fetch lwpid from thread.
1351 (add_lwp): Don't set lwp->entry.id. Remove call to
1352 add_inferior_to_list.
1353 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1354 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1355 (kill_one_lwp_callback): Ditto.
1356 (linux_kill): Don't dereference NULL pointer.
1357 Fetch ptid,lwpid from thread.
1358 (get_detach_signal): Fetch ptid from thread.
1359 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1360 Simplify call to regcache_invalidate_thread.
1361 (delete_lwp_callback): Update, "entry" parameter is a
1362 struct thread_info * now. Fetch pid from thread.
1363 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1364 (status_pending_p_callback): Update, "entry" parameter is a
1365 struct thread_info * now. Fetch ptid from thread.
1366 (find_lwp_pid): Update, "entry" parameter is a
1367 struct thread_info * now.
1368 (linux_wait_for_lwp): Fetch pid from thread.
1369 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1370 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1371 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1372 (dequeue_one_deferred_signal): Ditto.
1373 (cancel_breakpoint): Fetch ptid from current_inferior.
1374 (linux_wait_for_event): Pass &all_threads to find_inferior,
1375 not &all_lwps. Fetch ptid, lwpid from thread.
1376 (count_events_callback): Update, "entry" parameter is a
1377 struct thread_info * now.
1378 (select_singlestep_lwp_callback): Ditto.
1379 (select_event_lwp_callback): Ditto.
1380 (cancel_breakpoints_callback): Ditto.
1381 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1383 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1384 (unsuspend_one_lwp): Update, "entry" parameter is a
1385 struct thread_info * now.
1386 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1388 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1389 Fetch lwpid from thread, not lwp.
1390 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1391 Pass &all_threads to find_inferior, not &all_lwps.
1392 (send_sigstop): Fetch lwpid from thread, not lwp.
1393 (send_sigstop_callback): Update, "entry" parameter is a
1394 struct thread_info * now.
1395 (suspend_and_send_sigstop_callback): Ditto.
1396 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1397 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1398 struct thread_info * now.
1399 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1401 (lwp_running): Update, "entry" parameter is a
1402 struct thread_info * now.
1403 (stop_all_lwps): Fetch ptid from thread.
1404 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1405 (linux_resume_one_lwp): Fetch lwpid from thread.
1406 (linux_set_resume_request): Update, "entry" parameter is a
1407 struct thread_info * now. Fetch pid, lwpid from thread.
1408 (resume_status_pending_p): Update, "entry" parameter is a
1409 struct thread_info * now.
1410 (need_step_over_p): Ditto. Fetch lwpid from thread.
1411 (start_step_over): Fetch lwpid from thread.
1412 (linux_resume_one_thread): Update, "entry" parameter is a
1413 struct thread_info * now. Fetch lwpid from thread.
1414 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1415 (proceed_one_lwp): Update, "entry" parameter is a
1416 struct thread_info * now. Fetch lwpid from thread.
1417 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1418 struct thread_info * now.
1419 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1420 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1421 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1423 (regsets_store_inferior_registers): Ditto.
1424 (fetch_register, store_register): Ditto.
1425 (linux_read_memory, linux_write_memory): Ditto.
1426 (linux_request_interrupt): Ditto.
1427 (linux_read_auxv): Ditto.
1428 (linux_xfer_siginfo): Ditto.
1429 (linux_qxfer_spu): Ditto.
1430 (linux_qxfer_libraries_svr4): Ditto.
1431 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1432 moved to inferiors.h.
1434 (get_thread_lwp): Update.
1435 (struct lwp_info): Delete member "entry". Simplify comment for
1438 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1439 current_inferior directly.
1440 (update_watch_registers_callback): Update, "entry" parameter is a
1441 struct thread_info * now. Fetch pid from thread.
1442 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1443 (mips_insert_point): Fetch lwpid from current_inferior.
1444 Pass &all_threads to find_inferior, not &all_lwps.
1445 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1446 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1448 (mips_stopped_data_address): Ditto.
1449 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1451 * linux-tile-low.c (tile_arch_setup): Ditto.
1452 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1453 (update_debug_registers_callback): Update, "entry" parameter is a
1454 struct thread_info * now. Fetch pid from thread.
1455 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1456 Pass &all_threads to find_inferior, not &all_lwps.
1457 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1458 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1459 Pass &all_threads to find_inferior, not &all_lwps.
1460 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1461 (i386_dr_low_get_status): Ditto.
1462 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1463 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1464 (x86_linux_read_description): Ditto.
1465 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1467 2014-02-20 Doug Evans <dje@google.com>
1469 * inferiors.c (get_first_inferior): Fix buglet.
1471 2014-02-19 Doug Evans <dje@google.com>
1473 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1474 * inferiors.c (add_thread): Change result type to struct thread_info *.
1475 All callers updated.
1476 (add_lwp): Call add_thread here instead of in callers.
1477 All callers updated.
1478 * linux-low.h (get_lwp_thread): Rewrite.
1479 (struct lwp_info): New member "thread".
1481 2014-02-19 Doug Evans <dje@google.com>
1483 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1484 All callers updated.
1486 2014-02-19 Doug Evans <dje@google.com>
1488 * inferiors.c (add_thread): Fix whitespace.
1490 2014-02-19 Doug Evans <dje@google.com>
1492 * dll.c (clear_dlls): Replace accessing list implemention details
1494 * gdbthread.h (get_first_thread): Declare.
1495 * inferiors.c (for_each_inferior_with_data): New function.
1496 (get_first_thread): New function.
1497 (find_thread_ptid): Simplify.
1498 (get_first_inferior): New function.
1499 (clear_list): Delete.
1500 (one_inferior_p): New function.
1501 (clear_inferior_list): New function.
1502 (clear_inferiors): Update.
1503 * inferiors.h (for_each_inferior_with_data): Declare.
1504 (clear_inferior_list): Declare.
1505 (one_inferior_p): Declare.
1506 (get_first_inferior): Declare.
1507 * linux-low.c (linux_wait_for_event): Replace accessing list
1508 implemention details with API function.
1509 * server.c (target_running): Ditto.
1510 (accumulate_file_name_length): New function.
1511 (emit_dll_description): New function.
1512 (handle_qxfer_libraries): Replace accessing list implemention
1513 details with API function.
1514 (handle_qxfer_threads_worker): New function.
1515 (handle_qxfer_threads_proper): Replace accessing list implemention
1516 details with API function.
1517 (handle_query): Ditto.
1518 (visit_actioned_threads_callback_ftype): New typedef.
1519 (visit_actioned_threads_data): New struct.
1520 (visit_actioned_threads): Rewrite to be find_inferior callback.
1521 (resume): Call find_inferior.
1522 (handle_status): Replace accessing list implemention
1523 details with API function.
1524 (process_serial_event): Replace accessing list implemention details
1526 * target.c (set_desired_inferior): Replace accessing list implemention
1527 details with API function.
1528 * tracepoint.c (same_process_p): New function.
1529 (gdb_agent_about_to_close): Replace accessing list implemention
1530 details with API function.
1531 * win32-low.c (child_delete_thread): Replace accessing list
1532 implemention details with API function.
1533 (match_dll_by_basename): New function.
1534 (dll_is_loaded_by_basename): New function.
1535 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1536 details call to dll_is_loaded_by_basename.
1538 2014-02-19 Doug Evans <dje@google.com>
1540 * dll.h (struct dll_info): Add comment.
1541 * gdbthread.h (struct thread_info): Add comment.
1542 (current_ptid): Simplify.
1543 * inferiors.c (add_process): Update.
1544 (remove_process): Update.
1545 * inferiors.h (struct process_info): Rename member "head" to "entry".
1546 * linux-low.c (delete_lwp): Update.
1548 (last_thread_of_process_p): Update.
1549 (kill_one_lwp_callback, linux_kill): Update.
1550 (status_pending_p_callback): Update.
1551 (wait_for_sigstop): Update. Simplify read of ptid.
1552 (start_step_over): Update.
1553 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1554 (get_lwp_thread): Update.
1555 (struct lwp_info): Rename member "head" to "entry".
1556 * regcache.h (inferior_list_entry): Delete.
1557 * server.c (kill_inferior_callback): Update.
1558 (detach_or_kill_inferior_callback): Update.
1559 (print_started_pid): Update.
1560 (print_attached_pid): Update.
1561 (process_serial_event): Simplify read of ptid.
1562 * thread-db.c (thread_db_create_event): Update.
1563 (thread_db_get_tls_address): Update.
1564 * win32-low.c (current_inferior_ptid): Simplify.
1566 2014-02-19 Tom Tromey <tromey@redhat.com>
1568 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1570 (target_supports_btrace): Update.
1572 2014-02-14 Yao Qi <yao@codesourcery.com>
1574 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1575 (rsp-low-ipa.o): New target.
1577 2014-02-12 Tom Tromey <tromey@redhat.com>
1579 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1580 convert_ascii_to_int.
1581 * regcache.c (registers_to_string): Likewise.
1582 * remote-utils.c (decode_M_packet): Likewise.
1583 * server.c (process_serial_event): Likewise.
1585 2014-02-12 Tom Tromey <tromey@redhat.com>
1587 * server.c (handle_query, handle_v_run): Use hex2bin, not
1589 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1591 2014-02-12 Tom Tromey <tromey@redhat.com>
1593 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1594 convert_int_to_ascii.
1595 * regcache.c (registers_to_string, collect_register_as_string):
1597 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1599 * server.c (process_serial_event): Likewise.
1600 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1601 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1603 2014-02-12 Tom Tromey <tromey@redhat.com>
1605 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1606 bin2hex, not hexify.
1607 * tracepoint.c (cmd_qtstatus): Likewise.
1609 2014-02-12 Tom Tromey <tromey@redhat.com>
1611 * remote-utils.c (monitor_output): Pass explicit length to
1614 2014-02-12 Tom Tromey <tromey@redhat.com>
1616 * tracepoint.c: Include rsp-low.h.
1617 * server.c: Include rsp-low.h.
1618 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1619 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1621 * remote-utils.c: Include rsp-low.h.
1622 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1623 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1624 (convert_int_to_ascii, convert_ascii_to_int): Move to
1626 * regcache.c: Include rsp-low.h.
1627 * ax.c: Include rsp-low.h.
1628 * Makefile.in (SFILES): Add common/rsp-low.c.
1629 (OBS): Add rsp-low.o.
1630 (rsp-low.o): New target.
1632 2014-02-12 Tom Tromey <tromey@redhat.com>
1634 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1635 Include print-utils.h.
1636 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1637 (plongest, thirty_two, phex_nz): Remove.
1638 * Makefile.in (SFILES): Add common/print-utils.c.
1639 (OBS): Add print-utils.o.
1640 (print-utils-ipa.o): New target.
1641 (print-utils.o): New target.
1642 (IPA_OBJS): Add print-utils-ipa.o.
1644 2014-02-06 Tom Tromey <tromey@redhat.com>
1646 * Makefile.in (SFILES): Fix indentation.
1648 2014-02-05 Doug Evans <dje@google.com>
1650 * linux-low.c (linux_wait_for_event): Improve comment.
1651 (linux_wait_1): Keep current_inferior in sync with event_child.
1653 2014-01-22 Doug Evans <dje@google.com>
1655 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1657 2014-01-22 Doug Evans <dje@google.com>
1659 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1660 * configure: Regenerate.
1661 * config.in: Regenerate.
1662 * Makefile.in (SFILES): Add debug.c.
1664 * debug.c: New file.
1665 * debug.h: New file.
1666 * linux-aarch64-low.c (*): Update all debugging printfs to use
1667 debug_printf instead of fprintf.
1668 * linux-arm-low.c (*): Ditto.
1669 * linux-cris-low.c (*): Ditto.
1670 * linux-crisv32-low.c (*): Ditto.
1671 * linux-m32r-low.c (*): Ditto.
1672 * linux-sparc-low.c (*): Ditto.
1673 * linux-x86.c (*): Ditto.
1674 * linux-low.c (*): Ditto.
1675 (linux_wait_1): Add calls to debug_enter, debug_exit.
1676 (linux_wait): Remove redundant debugging printf.
1677 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1678 (linux_resume, unstop_all_lwps): Ditto.
1679 * mem-break.c (*): Update all debugging printfs to use
1680 debug_printf instead of fprintf.
1681 * remote-utils.c (*): Ditto.
1682 * thread-db.c (*): Ditto.
1683 * server.c #include <ctype.h>, "gdb_vecs.h".
1684 (debug_threads): Moved to debug.c.
1685 (*): Update all debugging printfs to use debug_printf instead of
1687 (start_inferior): Replace call to fflush with call to debug_flush.
1688 (monitor_show_help): Mention set debug-format.
1689 (parse_debug_format_options): New function.
1690 (handle_monitor_command): Handle "monitor set debug-format".
1691 (gdbserver_usage): Mention --debug-format.
1692 (main): Parse --debug-format.
1693 * server.h (debug_threads): Declaration moved to debug.h.
1695 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1696 trace_debug_1 that uses debug_printf.
1697 (tracepoint_look_up_symbols): Update all debugging printfs to use
1698 debug_printf instead of fprintf.
1700 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1702 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1705 2014-01-17 Pedro Alves <palves@redhat.com>
1708 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1709 defined after including gdb_proc_service.h.
1711 2014-01-16 Doug Evans <dje@google.com>
1713 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1714 (match_dll): Use it.
1716 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1718 * target.h (target_ops) <read_btrace>: Change parameters and
1719 return type to allow error reporting.
1720 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1721 trace reading errors on.
1722 * linux-low.c (linux_low_read_btrace): Pass trace reading
1724 (linux_low_disable_btrace): New.
1726 2014-01-15 Doug Evans <dje@google.com>
1728 * inferiors.c (thread_id_to_gdb_id): Delete.
1729 * inferiors.h (thread_id_to_gdb_id): Delete.
1731 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1733 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1734 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1737 2014-01-08 Pedro Alves <palves@redhat.com>
1739 * server.c (handle_status): Don't discard previous queued stop
1740 replies or thread's pending status here.
1741 (main) <disconnection>: Do it here instead.
1743 2014-01-08 Pedro Alves <palves@redhat.com>
1745 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1746 * server.c (visit_actioned_threads, handle_pending_status): New
1748 (handle_v_cont): Factor out parts to ...
1749 (resume): ... this new function. If in all-stop, and a thread
1750 being resumed has a pending status, report it without actually
1752 (myresume): Adjust to use the new 'resume' function.
1753 (clear_pending_status_callback, set_pending_status_callback)
1754 (find_status_pending_thread_callback): New functions.
1755 (handle_status): Handle the case of multiple threads having
1756 interesting statuses to report. Report threads' real last signal
1757 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1758 with an interesting thread to report the status for, instead of
1759 always reporting the status of the first thread.
1761 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1763 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1764 * gdbreplay.c (gdbreplay_version): Likewise.
1766 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1768 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1769 iov.iov_len with the real length in use.
1771 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1773 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1774 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1775 for all targets that use win32-low.c.
1776 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1777 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1779 2013-12-13 Pedro Alves <palves@redhat.com>
1781 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1782 if equal to TARGET_WAITKIND_LOADED.
1783 * win32-low.c (cached_status): New static global.
1784 (win32_wait): Add declaration.
1785 (do_initial_child_stuff): Flush all initial pending debug events
1786 up to the initial breakpoint.
1787 (win32_wait): If CACHED_STATUS was set, return that instead
1788 of doing a real wait. Remove the code resuming the execution
1789 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1790 during the initial phase. Also remove the code changing
1791 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1792 TARGET_WAITKIND_STOPPED.
1794 2013-12-11 Yao Qi <yao@codesourcery.com>
1796 * notif.c (handle_notif_ack): Return 0 if no notification
1799 2013-11-20 Doug Evans <dje@google.com>
1801 * linux-low.c (linux_set_resume_request): Fix comment.
1803 2013-11-20 Doug Evans <dje@google.com>
1805 * linux-low.c (resume_status_pending_p): Tweak comment.
1807 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1809 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1810 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1811 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1812 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1813 (srv_amd64_regobj): Add amd64-mpx.o.
1814 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1815 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1816 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1817 * i387-fp.c (num_pl_bnd_register) Added constant.
1818 (num_pl_bnd_cfg_registers) Added constant.
1819 (struct i387_xsave) Added reserved area and MPX fields.
1820 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1821 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1823 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1824 (init_registers_amd64_mpx_linux): Declare new function.
1825 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1826 (x86_64_regmap): Add MPX registers.
1827 (x86_linux_read_description): Add MPX case.
1828 (initialize_low_arch): Initialize MPX targets.
1830 2013-11-18 Tom Tromey <tromey@redhat.com>
1832 * configure: Rebuild.
1833 * configure.ac: Don't check for stdlib.h.
1834 * gdbreplay.c: Unconditionally include stdlib.h.
1836 2013-11-18 Tom Tromey <tromey@redhat.com>
1838 * config.in: Rebuild.
1839 * configure: Rebuild.
1840 * configure.ac: Don't use AC_HEADER_DIRENT.
1842 2013-11-18 Tom Tromey <tromey@redhat.com>
1844 * server.h: Don't check HAVE_STRING_H.
1845 * gdbreplay.c: Don't check HAVE_STRING_H.
1846 * configure: Rebuild.
1848 2013-11-18 Tom Tromey <tromey@redhat.com>
1850 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1853 2013-11-08 Tom Tromey <tromey@redhat.com>
1855 * configure, config.in: Rebuild.
1856 * configure.ac: Remove unused configury.
1858 2013-11-08 Tom Tromey <tromey@redhat.com>
1860 * acinclude.m4: Include common.m4, codeset.m4.
1861 * configure, config.in: Rebuild.
1862 * configure.ac: Use GDB_AC_COMMON.
1864 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1866 * linux-s390-low.c (HWCAP_S390_TE): New define.
1867 (s390_arch_setup): Consider the TE field in the HWCAP for
1868 determining 'have_regset_tdb'.
1870 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1873 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1876 2013-10-02 Pedro Alves <palves@redhat.com>
1878 * server.c (process_serial_event): Don't output "GDBserver
1879 exiting" if GDB is connected through stdio.
1880 * target.c (mywait): Likewise, be silent if GDB is connected
1883 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1885 * lynx-low.c (lynx_add_threads_after_attach): New function.
1886 (lynx_attach): Remove call to add_thread. Add call to
1887 lynx_add_threads_after_attach instead.
1889 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1891 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1892 * config.in, configure: Regenerated.
1894 2013-09-18 Yao Qi <yao@codesourcery.com>
1897 * server.c (start_inferior): Clear 'resume_info'.
1899 2013-09-16 Jiong Wang <jiwang@tilera.com>
1901 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1904 2013-09-16 Jiong Wang <jiwang@tilera.com>
1906 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1907 linux-tile-low.o to srv_tgtobj.
1909 2013-09-16 Will Newton <will.newton@linaro.org>
1911 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1914 2013-09-06 Pedro Alves <palves@redhat.com>
1916 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1917 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1918 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1919 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1920 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1921 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1923 2013-09-06 Pedro Alves <palves@redhat.com>
1925 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1926 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1928 2013-09-06 Pedro Alves <palves@redhat.com>
1930 * linux-amd64-ipa.c: Include tracepoint.h.
1931 * linux-i386-ipa.c: Include tracepoint.h.
1933 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1935 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1936 (ps_get_thread_area): New function.
1938 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
1940 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1941 (initialize_low_arch): Call init_registers_crisv32 rather than
1942 init_register_crisv32.
1944 2013-09-05 Pedro Alves <palves@redhat.com>
1946 * server.h (handle_vFile, hostio_last_error_from_errno): Move
1948 * hostio.h: ... this new file.
1949 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1950 win32-low.c: Include hostio.h.
1952 2013-09-05 Pedro Alves <palves@redhat.com>
1954 * server.h (gdb_client_data, handler_func, callback_handler_func)
1955 (delete_file_handler, add_file_handler, append_callback_event)
1956 (delete_callback_event, start_event_loop, initialize_event_loop):
1957 Move to event-loop.h and include it.
1958 * event-loop.h: New file.
1960 2013-09-05 Pedro Alves <palves@redhat.com>
1962 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1963 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1964 (loaded_dll, unloaded_dll): Move to ...
1965 * dll.h: ... this new file.
1966 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
1968 2013-09-05 Pedro Alves <palves@redhat.com>
1970 * server.h (current_process, get_thread_process, all_processes)
1971 (add_inferior_to_list, for_each_inferior, current_inferior)
1972 (remove_inferior, add_process, remove_process, find_process_pid)
1973 (have_started_inferiors_p, have_attached_inferiors_p)
1974 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
1975 (clear_inferiors, find_inferior, find_inferior_id)
1976 (inferior_target_data, set_inferior_target_data)
1977 (inferior_regcache_data, set_inferior_regcache_data): Move to
1978 inferiors.h, and include it.
1979 * inferiors.h: New file.
1981 2013-09-05 Pedro Alves <palves@redhat.com>
1983 * server.h (struct emit_ops, current_insn_ptr, emit_error):
1987 2013-09-05 Pedro Alves <palves@redhat.com>
1989 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
1991 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
1992 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
1993 (handle_tracepoint_general_set, handle_tracepoint_query)
1994 (tracepoint_finished_step, tracepoint_was_hit)
1995 (release_while_stepping_state_list, current_traceframe)
1996 (in_readonly_region, traceframe_read_mem)
1997 (fetch_traceframe_registers, traceframe_read_sdata)
1998 (traceframe_read_info, struct fast_tpoint_collect_status)
1999 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2000 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2001 (supply_fast_tracepoint_registers)
2002 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2003 (ipa_tdesc, claim_trampoline_space)
2004 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2005 (agent_mem_read, agent_get_trace_state_variable_value)
2006 (agent_set_trace_state_variable_value, agent_tsv_read)
2007 (agent_mem_read_string, get_raw_reg_func_addr)
2008 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2009 * tracepoint.h: ... this new file.
2011 2013-09-05 Pedro Alves <palves@redhat.com>
2013 * server.h (perror_with_name, error, fatal, warning, paddress)
2014 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2016 * utils.h: New file.
2018 2013-09-05 Pedro Alves <palves@redhat.com>
2020 * server.h (remote_debug, noack_mode, transport_is_reliable)
2021 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2022 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2023 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2024 (write_enn, initialize_async_io, enable_async_io)
2025 (disable_async_io, check_remote_input_interrupt_request)
2026 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2027 (dead_thread_notify, prepare_resume_reply)
2028 (decode_address_to_semicolon, decode_address, decode_m_packet)
2029 (decode_M_packet, decode_X_packet, decode_xfer_write)
2030 (decode_search_memory_packet, unhexify, hexify)
2031 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2032 (look_up_one_symbol, relocate_instruction)
2033 (monitor_output): Move to remote-utils.h, and include it.
2034 * remote-utils.h: New file.
2036 2013-09-05 Pedro Alves <palves@redhat.com>
2038 * server.h (_): Delete.
2040 2013-09-02 Pedro Alves <palves@redhat.com>
2042 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2043 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2045 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2047 2013-09-02 Pierre Muller <muller@sourceware.org>
2049 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2050 or WriteProcessMemory complete successfully and handle
2051 ERROR_PARTIAL_COPY error.
2053 2013-09-02 Pedro Alves <palves@redhat.com>
2055 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2056 error instead of EIO.
2058 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2061 * linux-low.c: Include filestuff.h.
2062 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2063 * lynx-low.c: Include filestuff.h.
2064 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2065 * server.c: Include filestuff.h.
2066 (main): Call notice_open_fds.
2067 * spu-low.c: Include filestuff.h.
2068 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2070 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2072 * Makefile.in: Explain why ../target and ../nat are not
2073 listed as include file search paths.
2074 (linux-waitpid.o): New object file rule.
2075 * configure.srv (srv_native_linux_obj): New variable.
2076 Replace all occurrences of linux native object files with
2077 $srv_native_linux_obj.
2078 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2079 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2080 (linux_enable_event_reporting): Remove declaration.
2081 (my_waitpid): Moved to common/linux-waitpid.c.
2082 (linux_wait_for_event): Pass ptid when calling
2083 linux_enable_event_reporting.
2084 (linux_supports_tracefork_flag): Remove.
2085 (linux_enable_event_reporting): Likewise.
2086 (linux_tracefork_grandchild): Remove.
2087 (STACK_SIZE): Moved to common/linux-ptrace.c.
2088 (linux_tracefork_child): Remove.
2089 (linux_test_for_tracefork): Remove.
2090 (linux_look_up_symbols): Call linux_supports_traceclone.
2091 (initialize_low): Remove call to linux_test_for_tracefork.
2092 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2093 common/linux-ptrace.h.
2094 (PTRACE_TYPE_ARG4): Likewise.
2095 Include linux-ptrace.h.
2097 2013-08-21 Pedro Alves <palves@redhat.com>
2099 * config.in: Renegerate.
2101 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2103 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2104 (SFILES): Remove $(srcdir)/common/target-common.c and
2105 add $(srcdir)/target/waitstatus.c.
2106 (OBS): Remove target-common.o and add waitstatus.o.
2107 (server_h): Remove $(srcdir)/../common/target-common.h and
2108 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2109 and $(srcdir)/../target/waitstatus.h.
2110 (target-common.o): Remove.
2111 (waitstatus.o): New target object file.
2112 * target.h: Do not include target-common.h and
2113 include target/resume.h, target/wait.h and
2114 target/waitstatus.h.
2116 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2118 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2119 to PTRACE_TYPE_ARG3.
2120 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2121 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2123 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2124 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2126 2013-07-27 Jie Zhang <jie@codesourcery.com>
2127 Daniel Jacobowitz <dan@codesourcery.com>
2128 Yao Qi <yao@codesourcery.com>
2130 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2131 (mips-linux-watch.o): New rule.
2132 (mips_linux_watch_h): New variable.
2133 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2135 * linux-mips-low.c: Include mips-linux-watch.h.
2136 (struct arch_process_info, struct arch_lwp_info): New.
2137 (update_watch_registers_callback): New function.
2138 (mips_linux_new_process, mips_linux_new_thread) New functions.
2139 (mips_linux_prepare_to_resume, mips_insert_point): New
2141 (mips_remove_point, mips_stopped_by_watchpoint): New
2143 (rsp_bp_type_to_target_hw_bp_type): New function.
2144 (mips_stopped_data_address): New function.
2145 (the_low_target): Add watchpoint support functions.
2147 2013-07-27 Yao Qi <yao@codesourcery.com>
2149 * i386-low.c: Include break-common.h.
2150 (enum target_hw_bp_type): Remove.
2152 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2154 * Makefile.in (SFILES): /common/target-common.c.
2155 (OBS): Add target-common.o.
2156 (server_h): Add $(srcdir)/../common/target-common.h.
2157 (target-common.o): New target.
2158 * server.c (queue_stop_reply_callback): Free
2159 status string after use.
2160 * target.c (target_waitstatus_to_string): Remove.
2161 * target.h: Include target-common.h.
2162 (resume_kind): Likewise.
2163 (target_waitkind): Likewise.
2164 (target_waitstatus): Likewise.
2165 (TARGET_WNOHANG): Likewise.
2167 2013-07-04 Yao Qi <yao@codesourcery.com>
2169 * Makefile.in (host_alias): Use @host_noncanonical@.
2170 (target_alias): Use @target_noncanonical@.
2171 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2172 ACX_NONCANONICAL_HOST.
2173 * configure: Regenerated.
2176 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2178 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2179 * configure: Rebuild.
2180 * Makefile.in (version_host, version_target): Get from configure.
2181 (version.c): Use $(version_host) and $(version_target).
2183 2013-07-03 Pedro Alves <palves@redhat.com>
2185 * Makefile.in (config.status): Depend on development.sh.
2186 * acinclude.m4: Include libmcheck.m4.
2187 * configure: Regenerate.
2189 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2191 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2192 attribute inside the parentheses.
2193 (winapi_DebugSetProcessKillOnExit): Ditto.
2194 (winapi_DebugBreakProcess): Ditto.
2195 (winapi_GenerateConsoleCtrlEvent): Ditto.
2197 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2199 * notif.h (notif_event): Add a dummy member to avoid compiler
2202 2013-07-01 Pedro Alves <palves@redhat.com>
2204 * hostio.c (HOSTIO_PATH_MAX): Define.
2205 (require_filename, handle_open, handle_unlink, handle_readlink):
2208 2013-07-01 Pedro Alves <palves@redhat.com>
2210 * server.h: Include "pathmax.h".
2211 * linux-low.c: Don't include sys/param.h.
2212 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2214 * win32-low.c: Don't include sys/param.h.
2215 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2217 2013-07-01 Pedro Alves <palves@redhat.com>
2219 * event-loop.c: Don't check HAVE_UNISTD_H before including
2221 * gdbreplay.c: Likewise.
2222 * remote-utils.c: Likewise.
2223 * server.c: Likewise.
2224 * configure.ac: Don't check for unistd.h.
2225 * configure: Regenerate.
2227 2013-06-28 Tom Tromey <tromey@redhat.com>
2229 * Makefile.in (version.c): Use version.in, not
2232 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2234 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2235 * configure: Rebuild.
2236 * Makefile.in (version_host, version_target): Get from configure.
2237 (version.c): Use $(version_host) and $(version_target).
2239 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2241 Fix trace-status to output user name without trailing colon.
2242 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2244 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2246 Fix trace-status to output proper start-time and stop-time.
2247 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2248 output start time and stop time in hex as gdb expects.
2250 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2252 * tracepoint.c (build_traceframe_info_xml): Output trace state
2253 variables present in the trace buffer.
2255 2013-06-24 Tom Tromey <tromey@redhat.com>
2257 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2259 (version.o): Remove.
2260 * gdbreplay.c: Include version.h.
2261 (version, host_name): Don't declare.
2262 * server.h: Include version.h.
2263 (version, host_name): Don't declare.
2265 2013-06-12 Pedro Alves <palves@redhat.com>
2267 * linux-x86-low.c (linux_is_elf64): Delete global.
2268 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2269 with local linux_pid_exe_is_elf_64_file use.
2271 2013-06-11 Pedro Alves <palves@redhat.com>
2273 * linux-low.c (regset_disabled, disable_regset): New functions.
2274 (regsets_fetch_inferior_registers)
2275 (regsets_store_inferior_registers): Use them.
2276 (initialize_regsets_info); Don't allocate the disabled_regsets
2278 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2281 2013-06-11 Pedro Alves <palves@redhat.com>
2283 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2286 2013-06-11 Pedro Alves <palves@redhat.com>
2288 * linux-x86-low.c (initialize_low_arch): Call
2289 init_registers_x32_avx_linux.
2291 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2293 Fix compatibility with Android Bionic.
2294 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2297 2013-06-07 Pedro Alves <palves@redhat.com>
2300 * Makefile.in (OBS): Add tdesc.o.
2301 (IPA_OBJS): Add tdesc-ipa.o.
2302 (tdesc-ipa.o): New rule.
2303 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2305 * linux-low.c (new_inferior): Delete.
2306 (disabled_regsets, num_regsets): Delete.
2307 (linux_add_process): Adjust to set the new per-process
2309 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2310 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2311 was a stop. When calling arch_setup, switch the current inferior
2312 to the thread that got an event.
2313 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2314 (regsets_fetch_inferior_registers)
2315 (regsets_store_inferior_registers): New regsets_info parameter.
2317 (linux_register_in_regsets): New regs_info parameter. Adjust to
2319 (register_addr, fetch_register, store_register): New usrregs_info
2320 parameter. Adjust to use it.
2321 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2322 parameter regs_info. Adjust to use it.
2323 (linux_fetch_registers): Get the current inferior's regs_info, and
2325 (linux_store_registers): Ditto.
2326 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2327 (initialize_low): Don't initialize the target_regsets here. Call
2328 initialize_low_arch.
2329 * linux-low.h (target_regsets): Delete declaration.
2330 (struct regsets_info): New.
2331 (struct usrregs_info): New.
2332 (struct regs_info): New.
2333 (struct process_info_private) <new_inferior>: New field.
2334 (struct linux_target_ops): Delete the num_regs, regmap, and
2335 regset_bitmap fields. New field regs_info.
2336 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2337 * i387-fp.c (num_xmm_registers): Delete.
2338 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2339 calls to new interface.
2340 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2341 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2342 Infer the number of xmm registers from the regcache's target
2344 * i387-fp.h (num_xmm_registers): Delete.
2345 * inferiors.c (add_thread): Don't install the thread's regcache
2347 * proc-service.c (gregset_info): Fetch the current inferior's
2348 regs_info. Adjust to use it.
2349 * regcache.c: Include tdesc.h.
2350 (register_bytes, reg_defs, num_registers)
2351 (gdbserver_expedite_regs): Delete.
2352 (get_thread_regcache): If the thread doesn't have a regcache yet,
2353 create one, instead of aborting gdbserver.
2354 (regcache_invalidate_one): Rename to ...
2355 (regcache_invalidate_thread): ... this.
2356 (regcache_invalidate_one): New.
2357 (regcache_invalidate): Only invalidate registers of the current
2359 (init_register_cache): Add target_desc parameter, and use it.
2360 (new_register_cache): Ditto. Assert the target description has a
2361 non zero registers_size.
2362 (regcache_cpy): Add assertions. Adjust.
2363 (realloc_register_cache, set_register_cache): Delete.
2364 (registers_to_string, registers_from_string): Adjust.
2365 (find_register_by_name, find_regno, find_register_by_number)
2366 (register_cache_size): Add target_desc parameter, and use it.
2367 (free_register_cache_thread, free_register_cache_thread_one)
2368 (regcache_release, register_cache_size): New.
2369 (register_size): Add target_desc parameter, and use it.
2370 (register_data, supply_register, supply_register_zeroed)
2371 (supply_regblock, supply_register_by_name, collect_register)
2372 (collect_register_as_string, collect_register_by_name): Adjust.
2373 * regcache.h (struct target_desc): Forward declare.
2374 (struct regcache) <tdesc>: New field.
2375 (init_register_cache, new_register_cache): Add target_desc
2377 (regcache_invalidate_thread): Declare.
2378 (regcache_invalidate_one): Delete declaration.
2379 (regcache_release): Declare.
2380 (find_register_by_number, register_cache_size, register_size)
2381 (find_regno): Add target_desc parameter.
2382 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2384 * remote-utils.c: Include tdesc.h.
2385 (outreg, prepare_resume_reply): Adjust.
2386 * server.c: Include tdesc.h.
2387 (gdbserver_xmltarget): Delete declaration.
2388 (get_features_xml, process_serial_event): Adjust.
2389 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2391 (struct process_info) <tdesc>: New field.
2392 (ipa_tdesc): Declare.
2393 * tdesc.c: New file.
2394 * tdesc.h: New file.
2395 * tracepoint.c: Include tdesc.h.
2396 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2397 (get_context_regcache): Adjust to pass ipa_tdesc down.
2398 (do_action_at_tracepoint): Adjust to get the register cache size
2399 from the context regcache's description.
2400 (traceframe_walk_blocks): Adjust to get the register cache size
2401 from the current trace frame's description.
2402 (traceframe_get_pc): Adjust to get current trace frame's
2403 description and pass it down.
2404 (gdb_collect): Adjust to get the register cache size from the
2406 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2407 (gdbserver_xmltarget): Delete.
2408 (initialize_low_tracepoint): Set the ipa's target description.
2409 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2410 (initialize_low_tracepoint): Set the ipa's target description.
2411 * linux-x86-low.c: Include tdesc.h.
2412 [__x86_64__] (is_64bit_tdesc): New.
2413 (ps_get_thread_area, x86_get_thread_area): Use it.
2414 (i386_cannot_store_register): Rename to ...
2415 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2416 (i386_cannot_fetch_register): Rename to ...
2417 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2418 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2420 (target_regsets): Rename to ...
2421 (x86_regsets): ... this.
2422 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2424 (x86_siginfo_fixup): Use is_64bit_tdesc.
2425 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2426 (tdesc_x32_avx_linux, tdesc_x32_linux)
2427 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2429 (x86_linux_update_xmltarget): Delete.
2430 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2431 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2432 (AMD64_LINUX_USER64_CS): New.
2433 (x86_linux_read_description): New, based on
2434 x86_linux_update_xmltarget.
2435 (same_process_callback): New.
2436 (x86_arch_setup_process_callback): New.
2437 (x86_linux_update_xmltarget): New.
2438 (x86_regsets_info): New.
2439 (amd64_linux_regs_info): New.
2440 (i386_linux_usrregs_info): New.
2441 (i386_linux_regs_info): New.
2442 (x86_linux_regs_info): New.
2443 (x86_arch_setup): Reimplement.
2444 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2445 (x86_emit_ops): Ditto.
2446 (the_low_target): Adjust. Install x86_linux_regs_info,
2447 x86_cannot_fetch_register, and x86_cannot_store_register.
2448 (initialize_low_arch): New.
2449 * linux-ia64-low.c (tdesc_ia64): Declare.
2450 (ia64_fetch_register): Adjust.
2451 (ia64_usrregs_info, regs_info): New globals.
2452 (ia64_regs_info): New function.
2453 (the_low_target): Adjust.
2454 (initialize_low_arch): New function.
2455 * linux-sparc-low.c (tdesc_sparc64): Declare.
2456 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2458 (sparc_arch_setup): New function.
2459 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2460 (the_low_target): Adjust.
2461 (initialize_low_arch): New function.
2462 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2463 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2464 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2465 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2466 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2467 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2468 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2469 (tdesc_powerpc_isa205_vsx64l): Declare.
2470 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2471 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2472 (ppc_set_pc, ppc_get_hwcap): Adjust.
2473 (ppc_usrregs_info): Forward declare.
2474 (!__powerpc64__) ppc_regmap_adjusted: New global.
2475 (ppc_arch_setup): Adjust to the current process'es target
2477 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2478 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2479 (ppc_store_evrregset): Adjust.
2480 (target_regsets): Rename to ...
2481 (ppc_regsets): ... this, and make static.
2482 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2483 (ppc_regs_info): New function.
2484 (the_low_target): Adjust.
2485 (initialize_low_arch): New function.
2486 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2487 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2488 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2489 (tdesc_s390x_linux64v2): Declare.
2490 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2491 (s390_fill_gregset, s390_store_last_break): Adjust.
2492 (target_regsets): Rename to ...
2493 (s390_regsets): ... this, and make static.
2494 (s390_get_pc, s390_set_pc): Adjust.
2495 (s390_get_hwcap): New target_desc parameter, and use it.
2496 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2497 (s390_arch_setup): Adjust to set the current process'es target
2498 description. Don't adjust the regmap.
2499 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2500 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2501 (regs_info_3264): New globals.
2502 (s390_regs_info): New function.
2503 (the_low_target): Adjust.
2504 (initialize_low_arch): New function.
2505 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2506 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2507 [__mips64] (init_registers_mips_linux)
2508 (init_registers_mips_dsp_linux): Delete defines.
2509 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2510 (have_dsp): New global.
2511 (mips_read_description): New, based on mips_arch_setup.
2512 (mips_arch_setup): Reimplement.
2513 (get_usrregs_info): New function.
2514 (mips_cannot_fetch_register, mips_cannot_store_register)
2515 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2516 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2517 (target_regsets): Rename to ...
2518 (mips_regsets): ... this, and make static.
2519 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2520 (dsp_regs_info, regs_info): New globals.
2521 (mips_regs_info): New function.
2522 (the_low_target): Adjust.
2523 (initialize_low_arch): New function.
2524 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2525 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2527 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2528 (arm_read_description): New, with bits factored from
2530 (arm_arch_setup): Reimplement.
2531 (target_regsets): Rename to ...
2532 (arm_regsets): ... this, and make static.
2533 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2534 (arm_regs_info): New function.
2535 (the_low_target): Adjust.
2536 (initialize_low_arch): New function.
2537 * linux-m68k-low.c (tdesc_m68k): Declare.
2538 (target_regsets): Rename to ...
2539 (m68k_regsets): ... this, and make static.
2540 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2541 (m68k_regs_info): New function.
2542 (m68k_arch_setup): New function.
2543 (the_low_target): Adjust.
2544 (initialize_low_arch): New function.
2545 * linux-sh-low.c (tdesc_sharch): Declare.
2546 (target_regsets): Rename to ...
2547 (sh_regsets): ... this, and make static.
2548 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2549 (sh_regs_info, sh_arch_setup): New functions.
2550 (the_low_target): Adjust.
2551 (initialize_low_arch): New function.
2552 * linux-bfin-low.c (tdesc_bfin): Declare.
2553 (bfin_arch_setup): New function.
2554 (bfin_usrregs_info, regs_info): New globals.
2555 (bfin_regs_info): New function.
2556 (the_low_target): Adjust.
2557 (initialize_low_arch): New function.
2558 * linux-cris-low.c (tdesc_cris): Declare.
2559 (cris_arch_setup): New function.
2560 (cris_usrregs_info, regs_info): New globals.
2561 (cris_regs_info): New function.
2562 (the_low_target): Adjust.
2563 (initialize_low_arch): New function.
2564 * linux-cris-low.c (tdesc_crisv32): Declare.
2565 (cris_arch_setup): New function.
2566 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2567 (cris_regs_info): New function.
2568 (the_low_target): Adjust.
2569 (initialize_low_arch): New function.
2570 * linux-m32r-low.c (tdesc_m32r): Declare.
2571 (m32r_arch_setup): New function.
2572 (m32r_usrregs_info, regs_info): New globals.
2573 (m32r_regs_info): Adjust.
2574 (initialize_low_arch): New function.
2575 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2576 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2577 (tic6x_usrregs_info): Forward declare.
2578 (tic6x_read_description): New function, based on ...
2579 (tic6x_arch_setup): ... this. Reimplement.
2580 (target_regsets): Rename to ...
2581 (tic6x_regsets): ... this, and make static.
2582 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2583 (tic6x_regs_info): New function.
2584 (the_low_target): Adjust.
2585 (initialize_low_arch): New function.
2586 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2587 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2588 (target_regsets): Rename to ...
2589 (xtensa_regsets): ... this, and make static.
2590 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2592 (xtensa_arch_setup, xtensa_regs_info): New functions.
2593 (the_low_target): Adjust.
2594 (initialize_low_arch): New function.
2595 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2596 (nios2_arch_setup): Set the current process'es tdesc.
2597 (target_regsets): Rename to ...
2598 (nios2_regsets): ... this.
2599 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2600 (nios2_regs_info): New function.
2601 (the_low_target): Adjust.
2602 (initialize_low_arch): New function.
2603 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2604 (aarch64_arch_setup): Set the current process'es tdesc.
2605 (target_regsets): Rename to ...
2606 (aarch64_regsets): ... this.
2607 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2608 (aarch64_regs_info): New function.
2609 (the_low_target): Adjust.
2610 (initialize_low_arch): New function.
2611 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2613 (target_regsets): Rename to ...
2614 (tile_regsets): ... this.
2615 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2616 (tile_regs_info): New function.
2617 (tile_arch_setup): Set the current process'es tdesc.
2618 (the_low_target): Adjust.
2619 (initialize_low_arch): New function.
2620 * spu-low.c (tdesc_spu): Declare.
2621 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2622 * win32-arm-low.c (tdesc_arm): Declare.
2623 (arm_arch_setup): New function.
2624 (the_low_target): Install arm_arch_setup instead of
2626 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2627 (init_windows_x86): Rename to ...
2628 (i386_arch_setup): ... this. Set `win32_tdesc'.
2629 (the_low_target): Adjust.
2630 * win32-low.c (win32_tdesc): New global.
2631 (child_add_thread): Don't create the thread cache here.
2632 (do_initial_child_stuff): Set the new process'es tdesc.
2633 * win32-low.h (struct target_desc): Forward declare.
2634 (win32_tdesc): Declare.
2635 * lynx-i386-low.c (tdesc_i386): Declare global.
2636 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2637 * lynx-low.c (lynx_tdesc): New global.
2638 (lynx_add_process): Set the new process'es tdesc.
2639 * lynx-low.h (struct target_desc): Forward declare.
2640 (lynx_tdesc): Declare global.
2641 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2642 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2643 * nto-low.c (nto_tdesc): New global.
2644 (do_attach): Set the new process'es tdesc.
2645 * nto-low.h (struct target_desc): Forward declare.
2646 (nto_tdesc): Declare.
2647 * nto-x86-low.c (tdesc_i386): Declare.
2648 (nto_x86_arch_setup): Set `nto_tdesc'.
2650 2013-06-04 Gary Benson <gbenson@redhat.com>
2652 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2653 to qSupported response when appropriate.
2654 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2655 with nonzero-length annex.
2656 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2657 arguments supplied in annex.
2659 2013-05-31 Doug Evans <dje@google.com>
2662 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2663 64 bits in 64-cross-32 environment.
2665 2013-05-28 Pedro Alves <palves@redhat.com>
2667 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2668 (aarch64-without-fpu.c): Delete rule.
2669 * configure.srv (aarch64*-*-linux*): Remove references to
2670 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2671 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2674 2013-05-24 Pedro Alves <palves@redhat.com>
2676 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2677 instead of strchr/decode_address. Error if the range isn't split
2678 with a ','. Don't assume there's be a ':' in the action.
2680 2013-05-23 Yao Qi <yao@codesourcery.com>
2681 Pedro Alves <palves@redhat.com>
2683 * linux-low.c (lwp_in_step_range): New function.
2684 (linux_wait_1): If the thread was range stepping and stopped
2685 outside the stepping range, report the stop to GDB. Otherwise,
2686 continue stepping. Add range stepping debug output.
2687 (linux_set_resume_request): Copy the step range from the resume
2689 (linux_supports_range_stepping): New.
2690 (linux_target_ops) <supports_range_stepping>: Set to
2691 linux_supports_range_stepping.
2692 * linux-low.h (struct linux_target_ops)
2693 <supports_range_stepping>: New field.
2694 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2695 * linux-x86-low.c (x86_supports_range_stepping): New.
2696 (the_low_target) <supports_range_stepping>: Set to
2697 x86_supports_range_stepping.
2698 * server.c (handle_v_cont): Handle 'r' action.
2699 (handle_v_requests): Append ";r" if the target supports range
2701 * target.h (struct thread_resume) <step_range_start,
2702 step_range_end>: New fields.
2703 (struct target_ops) <supports_range_stepping>:
2705 (target_supports_range_stepping): New macro.
2707 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2709 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2710 confusion in comment.
2712 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2714 * lynx-low.c (struct process_info_private): New type.
2715 (lynx_add_process): New function.
2716 (lynx_create_inferior, lynx_attach): Replace calls to
2717 add_process by calls to lynx_add_process.
2718 (lynx_resume): If PTID is null, then try using
2719 current_process()->private->last_wait_event_ptid.
2721 (lynx_clear_inferiors): Delete. The contents of that function
2722 has been inlined in lynx_mourn;
2723 (lynx_wait_1): Save the ptid in the process's private data.
2724 (lynx_mourn): Free the process' private data. Replace call
2725 to lynx_clear_inferiors by call to clear_inferiors.
2727 2013-05-17 Yao Qi <yao@codesourcery.com>
2729 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2732 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2734 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2735 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2736 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2737 PT_TEXT_END_ADDR guards. Update comments.
2738 (linux_target_op) <read_offsets>: Conditionally define to
2739 linux_read_offsets if the target is UCLIBC and if it defines
2740 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2742 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2743 Andrew Jenner <andrew@codesourcery.com>
2745 * Makefile.in (SFILES): Add linux-nios2-low.c.
2746 (clean): Add action to delete nios2-linux.c.
2747 (nios2-linux.c): New rule.
2748 * configure.srv: Add nios2*-*-linux*.
2749 * linux-nios2-low.c: New.
2751 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2753 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2755 2013-04-25 Hui Zhu <hui@codesourcery.com>
2758 * ax.c (ax_printf): Add fflush.
2760 2013-04-22 Tom Tromey <tromey@redhat.com>
2762 * Makefile.in (SFILES): Add filestuff.c.
2763 (OBS): Add filestuff.o.
2764 (filestuff.o): New target.
2765 * config.in, configure: Rebuild.
2766 * configure.ac: Check for fdwalk, pipe2.
2768 2013-04-17 Pedro Alves <palves@redhat.com>
2770 * configure.ac (USE_THREAD_DB): Delete variable.
2771 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2772 Don't AC_SUBST USE_THREAD_DB.
2773 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2774 * config.in, configure: Regenerate.
2776 2013-04-16 Pedro Alves <palves@redhat.com>
2778 * linux-low.h (struct lwp_info) <thread_known>: Move under
2779 the USE_THREAD_DB #ifdef.
2781 2013-04-16 Pedro Alves <palves@redhat.com>
2783 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2784 (linux-low.o): Delete rule.
2785 * linux-low.h: Always include "gdb_thread_db.h" instead of
2786 conditionally including thread_db.h.
2787 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2790 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2792 * Makefile.in (install-only): Fix make install regression.
2794 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2796 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2797 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2799 * gdbserver.1: Remove.
2801 2013-03-22 Pedro Alves <palves@redhat.com>
2803 * linux-low.c (handle_extended_wait): Don't call
2804 linux_enable_event_reporting.
2806 2013-03-15 Tony Theodore <tonyt@logyst.com>
2809 * Makefile.in (SHELL): Use @SHELL@.
2811 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2813 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2816 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2818 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2819 Remove extraneous NULL element.
2821 2013-03-13 Yao Qi <yao@codesourcery.com>
2823 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2824 'V' block in trace frame.
2826 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2828 * target.h (struct target_ops): Add btrace ops.
2829 (target_supports_btrace): New macro.
2830 (target_enable_btrace): New macro.
2831 (target_disable_btrace): New macro.
2832 (target_read_btrace): New macro.
2833 * gdbthread.h (struct thread_info): Add btrace field.
2834 * server.c: Include btrace-common.h.
2835 (handle_btrace_general_set): New function.
2836 (handle_btrace_enable): New function.
2837 (handle_btrace_disable): New function.
2838 (handle_general_set): Call handle_btrace_general_set.
2839 (handle_qxfer_btrace): New function.
2840 (struct qxfer qxfer_packets[]): Add btrace entry.
2841 * inferiors.c (remove_thread): Disable btrace.
2842 * linux-low: Include linux-btrace.h.
2843 (linux_low_enable_btrace): New function.
2844 (linux_low_read_btrace): New function.
2845 (linux_target_ops): Add btrace ops.
2846 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2847 Add srv_linux_btrace=yes.
2848 (x86_64-*-linux*): Add linux-btrace.o.
2849 Add srv_linux_btrace=yes.
2850 * configure.ac: Define HAVE_LINUX_BTRACE.
2851 * config.in: Regenerated.
2852 * configure: Regenerated.
2854 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2856 * server.c (handle_qxfer): Preserve error message if -3 is
2858 (qxfer): Document the -3 return value.
2860 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2862 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2863 (linux_btrace_h): New variable.
2864 (linux-btrace.o): New rule.
2866 2013-03-08 Stan Shebs <stan@codesourcery.com>
2867 Hafiz Abid Qadeer <abidh@codesourcery.com>
2869 * tracepoint.c (trace_buffer_size): New global.
2870 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2871 (init_trace_buffer): Change to one-argument function. Allocate
2872 trace buffer memory.
2873 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2874 handle QTBuffer:size packet.
2875 (cmd_bigqtbuffer_size): New function.
2876 (initialize_tracepoint): Call init_trace_buffer with
2877 DEFAULT_TRACE_BUFFER_SIZE.
2878 * server.c (handle_query): Add QTBuffer:size in the
2881 2013-03-07 Yao Qi <yao@codesourcery.com>
2883 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2884 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2886 (cmd_qtsp): Adjust condition. Do post increment.
2887 Set cur_action and cur_step_action back to 0.
2889 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2892 * linux-low.c (linux_write_memory): Return early success if LEN is
2895 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2897 * configure.srv: Add x86_64-*-cygwin* as target.
2899 2013-02-28 Tom Tromey <tromey@redhat.com>
2901 * configure.ac: Invoke AC_SYS_LARGEFILE.
2902 * configure, config.in: Rebuild.
2904 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2906 * win32-low.c: Throughout, fix format strings and casts of
2907 printf-like functions to avoid type related warnings on all
2909 (get_child_debug_event): Print dwDebugEventCode as hex since
2910 that's how it's usually documented.
2912 2013-02-28 Yao Qi <yao@codesourcery.com>
2914 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2917 2013-02-27 Jiong Wang <jiwang@tilera.com>
2919 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2920 (reg-tilegx32.c): New rule.
2921 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2922 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2923 different register info initializer according to elf class.
2924 (init_registers_tilgx32): New function. The tilegx32 register info
2926 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2927 (tile_store_gregset): Likewise.
2929 2013-02-27 Yao Qi <yao@codesourcery.com>
2931 * server.c (process_point_options): Print debug message when
2932 debug_threads is true.
2934 2013-02-26 Yao Qi <yao@codesourcery.com>
2936 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2938 2013-02-19 Pedro Alves <palves@redhat.com>
2939 Kai Tietz <ktietz@redhat.com>
2943 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2944 instead of strtoul to extract address from packet.
2945 (process_serial_event) <'z'>: Likewise.
2947 2013-02-18 Yao Qi <yao@codesourcery.com>
2949 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2951 2013-02-14 Pedro Alves <palves@redhat.com>
2955 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2956 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2958 2013-02-14 Pedro Alves <palves@redhat.com>
2960 * tracepoint.c (cmd_qtdpsrc): Use savestring.
2962 2013-02-14 Pedro Alves <palves@redhat.com>
2964 * tracepoint.c (save_string): Delete.
2965 (add_tracepoint_action): Use savestring instead of save_string.
2967 2013-02-12 Pedro Alves <palves@redhat.com>
2969 * linux-xtensa-low.c: Ditto.
2970 * xtensa-xtregs.c: Ditto.
2972 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
2974 * thread-db.c (thread_db_get_tls_address): NULL pointer check
2977 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2979 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
2980 aarch64_num_wp_regs and aarch64_num_bp_regs to
2981 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
2983 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
2985 * linux-aarch64-low.c (ps_get_thread_area): Replace
2986 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
2988 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
2989 Marcus Shawcroft <marcus.shawcroft@arm.com>
2990 Nigel Stephens <nigel.stephens@arm.com>
2991 Yufeng Zhang <yufeng.zhang@arm.com>
2993 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
2994 (aarch64.c, aarch64-without-fpu.c): New targets.
2995 * configure.srv (aarch64*-*-linux*): New.
2996 * linux-aarch64-low.c: New file.
2998 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3000 * linux-low.c (handle_extended_wait, linux_create_inferior)
3001 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3002 (dequeue_one_deferred_signal, linux_resume_one_thread)
3003 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3004 (linux_tracefork_grandchild, linux_test_for_tracefork)
3005 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3006 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3007 where the argument is 0.
3009 2013-01-25 Yao Qi <yao@codesourcery.com>
3011 * event-loop.c: Include "queue.h".
3012 (gdb_event_p): New typedef.
3013 (struct gdb_event) <next_event>: Remove.
3014 (event_queue): Change to QUEUE(gdb_event_p).
3015 (async_queue_event): Remove.
3016 (gdb_event_xfree): New.
3017 (initialize_event_loop): New.
3018 (process_event): Use API from QUEUE.
3019 (wait_for_event): Likewise.
3020 * server.c (main): Call initialize_event_loop.
3021 * server.h (initialize_event_loop): Declare.
3023 2013-01-18 Yao Qi <yao@codesourcery.com>
3025 * ax.h (struct eval_agent_expr_context): New.
3026 (gdb_eval_agent_expr): Update declaration.
3027 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3028 TFRAME. Add new argument CTX.
3029 * server.h (struct eval_agent_expr_context): Declare.
3030 (agent_mem_read, agent_tsv_read): Update declaration.
3031 (agent_mem_read_string): Likewise.
3032 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3033 (add_traceframe_block): Add new argument TPOINT.
3034 Increase TPOINT->traceframe_usage.
3035 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3036 eval_tracepoint_agent_expr.
3037 (condition_true_at_tracepoint): Likewise.
3038 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3039 (agent_mem_read_string, agent_tsv_read): Likewise.
3041 2013-01-16 Yao Qi <yao@codesourcery.com>
3043 * linux-low.c (linux_resume_one_lwp): Don't check
3044 'lwp->bp_reinsert != 0'.
3046 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3047 Pedro Alves <palves@redhat.com>
3049 * lynx-low.c (ptrace_request_to_str): Define a temporary
3050 macro and use it to simplify this function's implementation.
3052 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3054 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3057 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3059 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3061 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3063 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3065 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3067 * lynx-low.c (lynx_resume): Use the resume_info parameter
3068 to determine the ptid for the lynx_ptrace call, unless
3069 it is equal to minus_one_ptid, in which case we use the
3070 ptid of the current_inferior.
3071 (lynx_wait_1): After having received a thread create/exit
3072 event, resume the inferior's execution using the signaling
3073 thread's ptid, rather than the old ptid.
3075 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3077 * lynx-low.c (lynx_resume): Delete variable ret.
3079 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3081 * gdbreplay.c (gdbreplay_version): Update copyright year.
3082 * server.c (gdbserver_version): Likewise.
3084 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3086 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3089 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3091 * lynx-low.c (ptrace_request_to_str): Add handling for
3094 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3096 * lynx-low.c (lynx_attach): Delete variable new_process.
3098 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3100 * lynx-low.c (lynx_create_inferior): Delete variable
3103 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3105 * lynx-low.c (ptrace_request_to_str): Do not handle
3106 PTRACE_GETTHREADLIST if this macro does not exist.
3108 2012-12-15 Yao Qi <yao@codesourcery.com>
3110 * Makefile.in (OBS): Add notif.o.
3111 * notif.c, notif.h: New.
3112 * server.c: Include "notif.h".
3113 (struct vstop_notif) <next>: Remove.
3115 (queue_stop_reply): Update.
3116 (push_event, send_next_stop_reply): Remove.
3117 (discard_queued_stop_replies): Update.
3118 (notif_stop): New variable.
3119 (handle_v_stopped): Remove.
3120 (handle_v_requests): Don't call handle_v_stopped. Call
3121 handle_ack_notif instead.
3122 (queue_stop_reply_callback): Call notif_event_enque instead
3123 of queue_stop_reply.
3124 (handle_status): Don't call send_next_stop_reply, call
3125 notif_write_event instead.
3126 (kill_inferior_callback): Likewise.
3127 (detach_or_kill_inferior_callback): Likewise.
3128 (main): Call initialize_notif.
3129 (process_serial_event): Call QUEUE_is_empty.
3130 (handle_target_event): Call notif_push instead of push event.
3131 * server.h (push_event): Remove declaration.
3133 2012-12-10 Tom Tromey <tromey@redhat.com>
3135 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3136 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3139 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3140 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3141 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3142 (amd64-linux-ipa.o, ax.o): Rewrite.
3143 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3144 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3145 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3146 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3147 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3148 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3149 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3150 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3151 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3152 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3153 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3154 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3155 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3156 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3157 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3158 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3159 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3160 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3161 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3162 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3163 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3164 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3165 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3166 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3167 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3168 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3169 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3170 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3171 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3172 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3173 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3174 (reg-tilegx.o): Remove.
3175 (all_object_files): New macro.
3176 Include .deps files.
3177 * aclocal.m4, configure: Rebuild.
3178 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3179 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3180 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3182 2012-12-05 Tom Tromey <tromey@redhat.com>
3185 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3187 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3189 * configure.ac: Check for linux/perf_event.h.
3190 * config.in: Regenerated.
3191 * configure: Regenerated.
3193 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3195 * hostio.c (handle_readlink): Decrease buffer size
3196 parameter passed to readlink by one byte.
3198 2012-11-26 Yao Qi <yao@codesourcery.com>
3200 * configure.ac (build_warnings): Append '-Wempty-body'.
3201 * configure: Regenerated.
3202 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3205 2012-11-15 Pierre Muller <muller@sourceware.org>
3207 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3208 * config.in: Regenerate.
3209 * configure: Regenerate.
3210 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3211 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3212 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3213 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3215 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3216 instead of <sys/wait.h> header.
3217 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3219 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3221 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3222 (various make rules): Remove -DGDBSERVER
3224 2012-11-09 Yao Qi <yao@codesourcery.com>
3226 * spu-low.c (current_ptid): Move it to ..
3227 * gdbthread.h: ... here. New.
3228 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3229 * server.c (myresume, process_serial_event): Likewise.
3230 * thread-db.c (thread_db_find_new_threads): Likewise.
3231 * tracepoint.c (run_inferior_command): Likewise.
3233 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3235 * server.c (handle_search_memory_1): Include access length in
3238 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3240 * linux-crisv32-low.c: Fix compile errors.
3242 2012-09-04 Yao Qi <yao@codesourcery.com>
3244 * tracepoint.c (cmd_qtsv): Adjust debug message.
3245 Don't check CUR_TPOINT.
3247 2012-08-28 Yao Qi <yao@codesourcery.com>
3249 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3250 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3251 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3252 Remove declarations of xmalloc, xreallloc, xstrdup and
3254 * Makefile.in (libiberty_h): New.
3255 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3256 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3258 2012-08-23 Yao Qi <yao@codesourcery.com>
3260 * server.h: Remove declaration of 'xsnprintf'.
3262 2012-08-22 Keith Seitz <keiths@redhat.com>
3264 * server.h: Include build-gnulib-gbserver/config.h.
3265 * gdbreplay.c: Likewise.
3267 2012-08-08 Doug Evans <dje@google.com>
3269 * Makefile.in (SFILES): Add gdb_vecs.c.
3270 (OBS): Add gdb_vecs.o.
3271 (gdb_vecs_h, host_defs_h): New variables.
3272 (thread-db.o): Add $(gdb_vecs_h) dependency.
3273 (gdb_vecs.o): New rule.
3274 * thread-db.c: #include "gdb_vecs.h".
3275 (thread_db_load_search): Use a vector to iterate over path elements.
3276 Handle text appearing after "$pdir".
3278 * configure.ac: Add check for strstr.
3279 * config.in: Regenerate.
3280 * configure: Regenerate.
3282 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3284 * hostio.c (handle_pread): If pread fails, fall back to attempting
3286 (handle_pwrite): Likewise for pwrite.
3288 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3290 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3291 between unsupported TYPE and unimplementable ADDR/LEN combination.
3292 (arm_insert_point): Act on new return value.
3294 2012-07-31 Pedro Alves <palves@redhat.com>
3296 * server.c (process_point_options): Only skip tokens if we find
3297 one that is unrecognized. Don't treat 'X' specially while
3298 skipping unrecognized tokens.
3300 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3302 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3303 to 4-byte-align HW breakpoint addresses for Thumb.
3305 2012-07-27 Yao Qi <yao@codesourcery.com>
3309 * server.h: Declare gdb_agent_about_to_close.
3310 * target.c (kill_inferior): Include "agent.h".
3311 New. Send command 'kill'.
3312 * target.h (kill_inferior): Removed macro.
3313 * tracepoint.c (gdb_agent_about_to_close): New.
3314 (gdb_agent_helper_thread): Handle command 'close'.
3315 Wait endlessly until the inferior stops.
3316 Install gdb_agent_remove_socket to atexit hook.
3317 (agent_socket_name): New static variable.
3318 (gdb_agent_socket_init): Replace local variable 'name' with
3319 'agent_socket_name'.
3320 (gdb_agent_remove_socket): New.
3322 2012-07-27 Yao Qi <yao@codesourcery.com>
3324 * server.c (process_point_options): Stop at 'X' when parsing.
3326 2012-07-19 Michael Eager <eager@eagercon.com>
3328 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3330 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3331 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3332 hardware breakpoint.
3334 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3336 * gdbserver/linux-low.c (initialize_low): Call
3337 linux_ptrace_init_warnings.
3339 2012-07-02 Doug Evans <dje@google.com>
3341 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3344 2012-07-02 Stan Shebs <stan@codesourcery.com>
3346 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3347 (ax.o): Add it to build rule.
3349 (OBS): Add format.o.
3350 (IPA_OBS): Add format.o.
3351 * server.c (handle_query): Claim support for breakpoint commands.
3352 (process_point_options): Add command case.
3353 (process_serial_event): Leave running if there are printfs in
3355 * mem-break.h (any_persistent_commands): Declare.
3356 (add_breakpoint_commands): Declare.
3357 (gdb_no_commands_at_breakpoint): Declare.
3358 (run_breakpoint_commands): Declare.
3359 * mem-break.c (struct point_command_list): New struct.
3360 (struct breakpoint): New field command_list.
3361 (any_persistent_commands): New function.
3362 (add_commands_to_breakpoint): New function.
3363 (add_breakpoint_commands): New function.
3364 (gdb_no_commands_at_breakpoint): New function.
3365 (run_breakpoint_commands): New function.
3366 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3368 * ax.c: Include format.h.
3369 (ax_printf): New function.
3370 (gdb_eval_agent_expr): Add printf opcode.
3372 2012-06-13 Yao Qi <yao@codesourcery.com>
3374 * server.c (start_inferior): Remove duplicated writes to fields
3375 'last_resume_kind' and 'last_status' of 'current_inferior'.
3377 2012-06-12 Yao Qi <yao@codesourcery.com>
3378 Pedro Alves <palves@redhat.com>
3380 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3382 * server.c (handle_v_cont): Extend comment.
3384 2012-06-11 Yao Qi <yao@codesourcery.com>
3386 * linux-low.c (linux_attach): Add 'static'.
3388 2012-06-06 Yao Qi <yao@codesourcery.com>
3390 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3392 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3394 Fix gcc -flto compilation warning.
3395 * server.c (main): Make variable multi_mode and attach volatile.
3397 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3399 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3400 if the platform doesn't know about it.
3402 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3404 * Makefile.in (SFILES): Add linux-tile-low.c.
3405 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3406 * configure.srv: Handle tilegx-*-linux*.
3407 * linux-tile-low.c: New file.
3409 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3411 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3413 2012-05-24 Pedro Alves <palves@redhat.com>
3417 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3419 2012-05-24 Pedro Alves <palves@redhat.com>
3423 Replace target_signal with gdb_signal throughout.
3425 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3427 * linux-low.c (linux_store_registers): Avoid the copying sequence
3428 when no data has been retrieved by ptrace.
3430 2012-05-22 Will Deacon <will.deacon@arm.com>
3432 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3433 Include asm/ptrace.h.
3434 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3437 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3439 * linux-low.c (linux_store_registers): Don't re-retrieve data
3440 with ptrace that has already been obtained from /proc. Always
3441 copy any data retrieved with ptrace to the buffer supplied.
3443 2012-05-11 Yao Qi <yao@codesourcery.com>
3444 Pedro Alves <palves@redhat.com>
3446 * linux-low.c (enum stopping_threads_kind): New.
3447 (stopping_threads): Change type to `enum stopping_threads_kind'.
3448 (handle_extended_wait): If stopping and suspending threads, leave
3449 the new_lwp suspended too.
3450 (linux_wait_for_event): Adjust.
3451 (stop_all_lwps): Set `stopping_threads' to
3452 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3453 whether we're suspending threads or just stopping them. Assert no
3456 2012-04-29 Yao Qi <yao@codesourcery.com>
3458 * server.h: Move some code to ...
3459 * gdbthread.h: ... here. New.
3460 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3461 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3462 (nto-low.o, win32-low.o): Likewise.
3463 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3464 * regcache.c, remote-utils.c, server.c: Likewise.
3465 * target.c, tracepoint.c, win32-low.c: Likewise.
3467 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3469 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3470 (PTRACE_ARG4_TYPE): Likewise.
3471 (PTRACE_XFER_TYPE): Likewise.
3472 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3473 ptrace to PTRACE_ARG3_TYPE.
3474 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3475 (PTRACE_ARG4_TYPE): Likewise.
3476 (PTRACE_XFER_TYPE): Likewise.
3477 (linux_detach_one_lwp): Cast fourth argument of
3478 ptrace to long then PTRACE_ARG4_TYPE.
3479 (regsets_fetch_inferior_registers): Cast third argument of
3480 ptrace to long then PTRACE_ARG3_TYPE.
3481 (regsets_store_inferior_registers): Likewise.
3483 2012-04-20 Pedro Alves <palves@redhat.com>
3485 * configure: Regenerate.
3487 2012-04-19 Pedro Alves <palves@redhat.com>
3489 * Makefile.in (GNULIB_BUILDDIR): New.
3490 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3491 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3492 (all, install-only, uninstall, clean-info, all-lib, clean): No
3493 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3494 (maintainer-clean realclean distclean): Use subdir_do.
3496 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3497 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3498 * acinclude.m4: Include acx_configure_dir.m4.
3499 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3500 calls. Call AC_PROG_RANLIB. Configure gnulib using
3503 (GNULIB_STDINT_H): Adjust.
3504 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3505 * gdbreplay.c: Include build-gnulib/config.h.
3506 * server.h: Likewise.
3507 * aclocal.m4: Regenerate.
3508 * config.in: Regenerate.
3509 * configure: Regenerate.
3511 2012-04-19 Pedro Alves <palves@redhat.com>
3513 * Makefile.in (LIBGNU, INCGNU): Adjust.
3514 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3515 (all, install-only, uninstall, clean-info, all-lib, clean)
3516 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3517 * configure.ac: Adjust AC_OUTPUT output.
3518 * aclocal.m4: Regenerate.
3519 * configure: Regenerate.
3521 2012-04-19 Pedro Alves <palves@redhat.com>
3523 * Makefile.in (generated_files): New.
3524 (server_h): Remove the explicit dependency on config.h, and depend
3525 on $generated_files.
3527 2012-04-19 Pedro Alves <palves@redhat.com>
3529 * Makefile.in (INCGNU): Add -Ignulib.
3531 2012-04-19 Pedro Alves <palves@redhat.com>
3533 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3534 (INCGNU): ... this, and spell out -I here.
3535 (GNULIB_LIB): Rename to ...
3537 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3539 2012-04-19 Pedro Alves <palves@redhat.com>
3541 * config.in: Regenerate.
3543 2012-04-19 Pedro Alves <palves@redhat.com>
3545 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3546 * server.h (memmem): Remove declaration.
3547 * config.in: Regenerate.
3548 * configure: Regenerate.
3550 2012-04-19 Yao Qi <yao@codesourcery.com>
3552 * Makefile.in (SFILES): Add common/vec.c.
3556 2012-04-19 Yao Qi <yao@codesourcery.com>
3558 * remote-utils.c (prepare_resume_reply): Replace with macro
3559 target_core_of_thread.
3560 * server.c (handle_qxfer_threads_proper): Likewise.
3561 * target.h (traget_core_of_thread): New macro.
3563 2012-04-18 Pedro Alves <palves@redhat.com>
3565 * aclocal.m4: Regenerate.
3566 * configure: Regenerate.
3568 2012-04-16 Yao Qi <yao@codesourcery.com>
3570 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3571 duplicated on address.
3573 2012-04-16 Yao Qi <yao@codesourcery.com>
3575 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3576 (struct tracepoint_action_ops) <send>: New field.
3577 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3578 (agent_expr_send, x_tracepoint_action_send): New.
3579 (l_tracepoint_action_send): New.
3580 (cmd_qtdp): Download and install tracepoint
3581 according to `use_agent'.
3582 (run_inferior_command): Add one more parameter `len'.
3584 (tracepoint_send_agent): New.
3585 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3587 2012-04-16 Yao Qi <yao@codesourcery.com>
3589 * tracepoint.c (download_tracepoints): Moved to ...
3590 (cmd_qtstart): ... here.
3592 2012-04-14 Yao Qi <yao@codesourcery.com>
3594 * tracepoint.c: Include inttypes.h.
3595 (struct collect_memory_action): Use sized types.
3596 (struct tracepoint): Likewise.
3597 (cmd_qtdp, stop_tracing): Update print specifiers.
3598 (cmd_qtp, response_tracepoint): Likewise.
3599 (collect_data_at_tracepoint): Likewise.
3600 (collect_data_at_step): Likewise.
3602 2012-04-14 Yao Qi <yao@codesourcery.com>
3604 Import gnulib module inttypes.
3605 * aclocal.m4, config.in, configure: Regenerated.
3607 2012-04-14 Yao Qi <yao@codesourcery.com>
3609 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3610 Makefile and config.status at last.
3612 2012-04-13 Yao Qi <yao@codesourcery.com>
3614 * tracepoint.c: Include stdint.h unconditionally.
3616 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3618 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3619 on BFD_HAVE_SYS_PROCFS_TYPE.
3620 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3621 * configure: Regenerate.
3622 * config.in: Likewise.
3624 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3626 * Makefile.in (clean): Also remove x32.c x32-linux.c
3627 x32-avx.c x32-avx-linux.c.
3628 (x32.o): New target.
3630 (x32-linux.o): Likewise.
3631 (x32-linux.c): Likewise.
3632 (x32-avx.o): Likewise.
3633 (x32-avx.c): Likewise.
3634 (x32-avx-linux.o): Likewise.
3635 (x32-avx-linux.c): Likewise.
3637 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3638 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3639 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3640 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3641 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3642 i386/x32-avx-linux.xml.
3644 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3645 (init_registers_x32_avx_linux): Likwise.
3646 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3647 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3649 2012-04-13 Pedro Alves <palves@redhat.com>
3651 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3652 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3653 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3654 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3657 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3659 * linux-x86-low.c (compat_x32_clock_t): New.
3660 (compat_x32_siginfo_t): Likewise.
3661 (compat_x32_siginfo_from_siginfo): Likewise.
3662 (siginfo_from_compat_x32_siginfo): Likewise.
3663 (linux_is_elf64): Likewise.
3664 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3665 and siginfo_from_compat_x32_siginfo for x32.
3666 (x86_arch_setup): Set linux_is_elf64.
3668 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3671 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3673 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3674 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3675 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3676 compatible with process.
3678 2012-04-12 Yao Qi <yao@codesourcery.com>
3680 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3681 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3682 (install-only, install-info, clean): Handle sub dir gnulib.
3683 (all-lib, am--refresh): New targets.
3684 (memmem.o): Remove target.
3685 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3686 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3687 (AC_REPLACE_FUNCS): Remove memmem.
3688 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3689 (AC_OUTPUT): Generate Makefile in gnulib/.
3690 * aclocal.m4, config.in, configure: Regenerated.
3692 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3694 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3696 2012-04-05 Pedro Alves <palves@redhat.com>
3698 -Werror=strict-aliasing
3700 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3703 2012-04-04 Pedro Alves <palves@redhat.com>
3705 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3706 (sparc_store_gregset_from_stack, sparc_store_gregset)
3707 (sparc_breakpoint_at): Fix formatting.
3709 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3711 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3713 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3714 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3715 * config.in: Regenerate.
3716 * configure: Likewise.
3718 2012-03-29 Pedro Alves <palves@redhat.com>
3720 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3721 Correct ptrace arguments.
3723 2012-03-28 Pedro Alves <palves@redhat.com>
3725 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3726 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3727 (IA64_FR1_REGNUM): New defines.
3728 (ia64_fetch_register): New.
3729 (the_low_target): Install it.
3730 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3732 * linux-low.c (linux_fetch_registers): Try the
3733 the_low_target.fetch_register hook first.
3735 * linux-arm-low.c (the_low_target): Adjust.
3736 * linux-bfin-low.c (the_low_target): Adjust.
3737 * linux-cris-low.c (the_low_target): Adjust.
3738 * linux-crisv32-low.c (the_low_target): Adjust.
3739 * linux-m32r-low.c (the_low_target): Adjust.
3740 * linux-m68k-low.c (the_low_target): Adjust.
3741 * linux-mips-low.c (the_low_target): Adjust.
3742 * linux-ppc-low.c (the_low_target): Adjust.
3743 * linux-s390-low.c (the_low_target): Adjust.
3744 * linux-sh-low.c (the_low_target): Adjust.
3745 * linux-sparc-low.c (the_low_target): Adjust.
3746 * linux-tic6x-low.c (the_low_target): Adjust.
3747 * linux-x86-low.c (the_low_target): Adjust.
3748 * linux-xtensa-low.c (the_low_target): Adjust.
3750 2012-03-26 Pedro Alves <palves@redhat.com>
3752 * server.c (handle_qxfer_libraries): Don't bail early if
3753 the_target->qxfer_libraries_svr4 is not NULL.
3755 2012-03-26 Pedro Alves <palves@redhat.com>
3757 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3759 2012-03-23 Pedro Alves <palves@redhat.com>
3761 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3762 "library-list-svr4" element's start tag when the the DSO list is
3765 2012-03-23 Pedro Alves <palves@redhat.com>
3767 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3768 a variable whose type size is the same as the inferior's pointer
3771 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3773 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3775 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3776 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3777 * linux-low.h: Include <signal.h>.
3778 (struct siginfo): Remove forward declaration.
3779 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3782 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3784 * .gitignore: Ignore more files.
3786 2012-03-19 Pedro Alves <palves@redhat.com>
3787 Jan Kratochvil <jan.kratochvil@redhat.com>
3789 * server.c (cont_thread, general_thread): Add describing comments.
3790 (start_inferior): Clear `cont_thread'.
3791 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3794 2012-03-15 Yao Qi <yao@codesourcery.com>
3796 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3798 (cmd_qtdp): ... here.
3800 2012-03-15 Yao Qi <yao@codesourcery.com>
3802 * tracepoint.c (struct tracepoint_action_ops): New.
3803 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3804 (m_tracepoint_action_download): New.
3805 (r_tracepoint_action_download): New.
3806 (x_tracepoint_action_download): New.
3807 (l_tracepoint_action_download): New.
3808 (add_tracepoint_action): Install `action->ops' according type.
3809 (download_tracepoint_1): Move code `download' function pointer
3810 of various tracepoint_action_ops.
3812 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3814 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3815 linux_ptrace_attach_warnings.
3817 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3819 * Makefile.in (linux-ptrace.o): New.
3820 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3821 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3822 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3823 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3824 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3826 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3828 2012-03-08 Yao Qi <yao@codesourcery.com>
3829 Pedro Alves <palves@redhat.com>
3831 Fix PR server/13392.
3832 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3834 * tracepoint.c (remove_tracepoint): New.
3835 (cmd_qtdp): Call remove_tracepoint when failed to install.
3837 2012-03-07 Pedro Alves <palves@redhat.com>
3839 * linux-low.c (get_detach_signal): New.
3840 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3841 Pass on pending signals to PTRACE_DETACH. Check the result of the
3843 * server.c (program_signals, program_signals_p): New.
3844 (handle_general_set): Handle QProgramSignals.
3845 * server.h (program_signals, program_signals_p): Declare.
3847 2012-03-05 Pedro Alves <palves@redhat.com>
3848 Jan Kratochvil <jan.kratochvil@redhat.com>
3850 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3853 2012-03-03 Yao Qi <yao@codesourcery.com>
3855 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3856 agent_look_up_symbols.
3858 2012-03-03 Yao Qi <yao@codesourcery.com>
3860 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3861 (linux-x86-low.o): Likewise.
3862 * server.h: Remove in_process_agent_loaded.
3863 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3867 2012-03-03 Yao Qi <yao@codesourcery.com>
3869 * tracepoint.c (gdb_agent_capability): New global.
3870 (in_process_agent_loaded_ust): Renamed to
3871 `in_process_agent_supports_ust'.
3873 (in_process_agent_supports_ust): Call agent_capability_check.
3874 (clear_installed_tracepoints): Assert that agent supports
3877 2012-03-03 Yao Qi <yao@codesourcery.com>
3879 * linux-low.c (linux_supports_agent): New.
3880 (linux_target_ops): Initialize field `supports_agent' with
3881 linux_supports_agent.
3882 * target.h (struct target_ops) <supports_agent>: New.
3883 (target_supports_agent): New macro.
3884 * server.c (handle_general_set): Handle packet 'QAgent'.
3885 (handle_query): Send `QAgent+'.
3886 * Makefile.in (server.o): Depends on agent.h.
3888 2012-03-03 Yao Qi <yao@codesourcery.com>
3890 * Makefile.in (OBS): Add agent.o.
3891 Add new rule for agent.o.
3892 Track dependence of tracepoint.c on agent.h.
3893 * tracepoint.c (run_inferior_command_1):
3894 (run_inferior_command): Call agent_run_command.
3895 (gdb_ust_connect_sync_socket): Deleted. Move it to
3897 (resume_thread, stop_thread): Likewise.
3898 (gdb_ust_socket_init): Renamed to ...
3899 (gdb_agent_socket_init): ... New.
3900 (gdb_ust_thread): Renamed to ...
3901 (gdb_agent_helper_thread): ... New.
3902 (gdb_ust_init): Move some code to ...
3903 (gdb_agent_init): ... here. New.
3904 [HAVE_UST]: Call gdb_ust_init.
3905 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3906 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3907 * config.in, configure: Regenerated.
3909 2012-03-02 Pedro Alves <palves@redhat.com>
3911 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3912 * linux-low.c (struct simple_pid_list): New.
3913 (stopped_pids): New a struct simple_pid_list pointer.
3914 (add_to_pid_list, pull_pid_from_list): New.
3915 (handle_extended_wait): Don't assume the first signal new children
3916 report is SIGSTOP. Adjust call to pull_pid_from_list.
3917 (linux_wait_for_lwp): Adjust.
3919 2012-03-02 Yao Qi <yao@codesourcery.com>
3921 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3924 2012-03-02 Yao Qi <yao@codesourcery.com>
3926 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3927 `stop_pc' and `tpoint'. Update caller.
3929 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
3931 * linux-low.h (linux_target_ops): Add regset_bitmap member.
3932 * linux-low.c (use_linux_regsets): New macro.
3933 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3934 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3935 (linux_register_in_regsets): New function.
3936 (usr_fetch_inferior_registers): Skip registers covered by
3938 (usr_store_inferior_registers): Likewise.
3939 (usr_fetch_inferior_registers): New macro.
3940 (usr_store_inferior_registers): Likewise.
3941 (linux_fetch_registers): Handle mixed regset/non-regset targets.
3942 (linux_store_registers): Likewise.
3943 * linux-mips-low.c (init_registers_mips_dsp_linux): New
3945 (init_registers_mips64_dsp_linux): Likewise.
3946 (init_registers_mips_linux): New macro.
3947 (init_registers_mips_dsp_linux): Likewise.
3948 (mips_dsp_num_regs): Likewise.
3949 (DSP_BASE, DSP_CONTROL): New fallback macros.
3950 (mips_base_regs): New macro.
3951 (mips_regmap): Use it. Fix the size.
3952 (mips_dsp_regmap): New variable.
3953 (mips_dsp_regset_bitmap): Likewise.
3954 (mips_arch_setup): New function.
3955 (mips_cannot_fetch_register): Use the_low_target.regmap rather
3957 (mips_cannot_store_register): Likewise.
3958 (the_low_target): Update .arch_setup, .num_regs and .regmap
3959 initializers. Add .regset_bitmap initializer.
3960 * linux-arm-low.c (the_low_target): Add .regset_bitmap
3962 * linux-bfin-low.c (the_low_target): Likewise.
3963 * linux-cris-low.c (the_low_target): Likewise.
3964 * linux-crisv32-low.c (the_low_target): Likewise.
3965 * linux-ia64-low.c (the_low_target): Likewise.
3966 * linux-m32r-low.c (the_low_target): Likewise.
3967 * linux-m68k-low.c (the_low_target): Likewise.
3968 * linux-ppc-low.c (the_low_target): Likewise.
3969 * linux-s390-low.c (the_low_target): Likewise.
3970 * linux-sh-low.c (the_low_target): Likewise.
3971 * linux-sparc-low.c (the_low_target): Likewise.
3972 * linux-tic6x-low.c (the_low_target): Likewise.
3973 * linux-x86-low.c (the_low_target): Likewise.
3974 * linux-xtensa-low.c (the_low_target): Likewise.
3975 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
3976 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
3977 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
3979 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
3980 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
3982 2012-02-29 Yao Qi <yao@codesourcery.com>
3983 Pedro Alves <palves@redhat.com>
3985 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
3986 `step_over_finished' is true.
3988 2012-02-27 Pedro Alves <palves@redhat.com>
3990 * linux-low.c (pid_is_stopped): Delete, moved to common/.
3991 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
3993 2012-02-27 Pedro Alves <palves@redhat.com>
3996 * linux-low.c (pid_is_stopped): New.
3997 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
3999 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4001 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4004 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4006 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4008 2012-02-24 Luis Machado <lgustavo@codesourcery>
4010 * server.c (handle_query): Advertise support for target-side
4011 breakpoint condition evaluation.
4012 (process_point_options): New function.
4013 (process_serial_event): When inserting a breakpoint, check for
4014 a target-side condition that should be evaluated.
4016 * mem-break.c: Include regcache.h and ax.h.
4017 (point_cond_list_t): New data structure.
4018 (breakpoint) <cond_list>: New field.
4019 (find_gdb_breakpoint_at): Make non-static.
4020 (delete_gdb_breakpoint_at): Clear any target-side
4022 (clear_gdb_breakpoint_conditions): New function.
4023 (add_condition_to_breakpoint): Likewise.
4024 (add_breakpoint_condition): Likewise.
4025 (gdb_condition_true_at_breakpoint): Likewise.
4026 (gdb_breakpoint_here): Return result directly instead
4027 of going through a local variable.
4029 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4030 (clear_gdb_breakpoint_conditions): Likewise.
4031 (add_breakpoint_condition): Likewise.
4032 (gdb_condition_true_at_breakpoint): Likewise.
4034 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4035 (need_step_over_p): Take target-side breakpoint condition into
4038 2012-02-24 Luis Machado <lgustavo@codesourcery>
4040 * server.h: Include tracepoint.h.
4041 (agent_mem_read, agent_get_trace_state_variable_value,
4042 agent_set_trace_state_variable_value,
4043 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4044 get_set_tsv_func_addr): New prototypes.
4046 * ax.h: New include file.
4047 * ax.c: New source file.
4049 * tracepoint.c: Include ax.h.
4050 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4051 agent_expr, eval_result_type): Move to ax.h.
4052 (parse_agent_expr): Rename to ...
4053 (gdb_parse_agent_expr): ... this, make it non-static and move
4055 (unparse_agent_expr) Rename to ...
4056 (gdb_unparse_agent_expr): ... this, make it non-static and move
4058 (eval_agent_expr): Rename to ...
4059 (eval_tracepoint_agent_expr): ... this.
4060 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4061 forward declarations.
4062 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4063 (agent_get_trace_state_variable_value): New function.
4064 (agent_set_trace_state_variable_value): New function.
4065 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4066 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4067 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4068 (condition_true_at_tracepoint): Likewise.
4069 (parse_agent_expr): Rename to ...
4070 (gdb_parse_agent_expr): ... this and move to ax.c.
4071 (unparse_agent_expr): Rename to ...
4072 (gdb_unparse_agent_expr): ... this and move to ax.c.
4073 (gdb_agent_op_name): Move to ax.c.
4074 (eval_agent_expr): Rename to ...
4075 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4077 (eval_tracepoint_agent_expr): New function.
4078 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4080 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4082 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4083 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4084 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4085 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4086 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4087 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4088 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4089 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4090 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4091 (compile_bytecodes): Remove forward declaration.
4092 (is_goto_target): Move to ax.c.
4093 (compile_bytecodes): Move to ax.c and call
4094 agent_get_trace_state_variable_value (...) and
4095 agent_set_trace_state_variable_value (...).
4097 * Makefile.in: Update ax.c and IPA dependencies.
4099 2012-02-24 Pedro Alves <palves@redhat.com>
4101 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4102 (cmd_bigqtbuffer_circular): ... this. Only handle
4103 'QTBuffer:circular:'.
4104 (handle_tracepoint_general_set): Adjust.
4106 2012-02-16 Yao Qi <yao@codesourcery.com>
4108 * inferiors.c: Move code to ...
4109 * dll.c: .... here. New.
4110 * server.h: Declare clear_dlls.
4111 * Makefile.in (SFILES): Add dll.c.
4115 2012-02-11 Yao Qi <yao@codesourcery.com>
4117 * server.c: (handle_monitor_command): Add a new parameter
4119 (handle_query): Update caller.
4121 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4123 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4124 * configure, config.in: Regenerate.
4125 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4128 2012-02-02 Pedro Alves <palves@redhat.com>
4130 Try SIGKILL first, then PTRACE_KILL.
4131 * linux-low.c (linux_kill_one_lwp): New.
4132 (linux_kill_one_lwp): Rename to ...
4133 (kill_one_lwp_callback): ... this. Use the new
4136 2012-02-02 Pedro Alves <palves@redhat.com>
4138 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4141 2012-01-27 Pedro Alves <palves@redhat.com>
4143 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4144 (elf_64_file_p): Make static.
4145 (linux_pid_exe_is_elf_64_file): New.
4146 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4147 Delete declarations.
4148 (linux_pid_exe_is_elf_64_file): Declare.
4149 * linux-x86-low.c (x86_arch_setup): Use
4150 linux_pid_exe_is_elf_64_file.
4152 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4154 * linux-low.c (linux_wait_for_event_1): Rename to ...
4155 (linux_wait_for_event): ... here and merge it with former
4156 linux_wait_for_event - new variable wait_ptid, use it.
4157 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4159 2012-01-23 Pedro Alves <palves@redhat.com>
4161 * server.c (main): Avoid yet another case of infinite loop while
4162 detaching/killing after a longjmp.
4164 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4167 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4169 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4171 * hostio.c (handle_readlink): New function.
4172 (handle_vFile): Call it to handle "vFile:readlink" packets.
4174 2012-01-20 Pedro Alves <palves@redhat.com>
4175 Ulrich Weigand <ulrich.weigand@linaro.org>
4177 * server.c (handle_v_requests): Only support vAttach and vRun to
4178 start multiple processes when in extended protocol mode.
4180 2012-01-17 Pedro Alves <palves@redhat.com>
4182 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4183 memalign plus mprotect to allocate the scratch buffer.
4185 2012-01-13 Pedro Alves <palves@redhat.com>
4187 * server.c (attach_inferior): Clear `cont_thread'.
4189 2012-01-13 Pedro Alves <palves@redhat.com>
4191 * server.c (main): Avoid infinite loop while detaching/killing
4194 2012-01-09 Doug Evans <dje@google.com>
4196 * server.c (start_inferior): Set last_ptid in --wrapper case.
4198 2012-01-06 Yao Qi <yao@codesourcery.com>
4200 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4202 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4204 2012-01-04 Yao Qi <yao@codesourcery.com>
4206 * tracepoint.c (cmd_qtdp): Print debug message
4207 for static tracepoint.
4209 2012-01-04 Yao Qi <yao@codesourcery.com>
4211 * tracepoint.c (trace_vdebug): Differentiate debug message
4212 between gdbserver and IPA.
4214 2012-01-03 Yao Qi <yao@codesourcery.com>
4216 * tracepoint.c (tracepoint_was_hit): Don't collect for
4219 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4221 * terminal.h: Reformat copyright header.
4223 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4225 * server.c (gdbserver_version): Update copyright year.
4226 * gdbreplay.c (gdbreplay_version): Likewise.
4228 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4230 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4233 2011-12-18 Hui Zhu <teawater@gmail.com>
4234 * linux-low.c (linux_create_inferior): Save return value to ret.
4236 2011-12-18 Hui Zhu <teawater@gmail.com>
4238 * linux-low.c (linux_create_inferior): Save return value to ret.
4240 2011-12-16 Doug Evans <dje@google.com>
4242 * linux-low.c (linux_create_inferior): If stdio connection,
4243 redirect stdin from /dev/null, stdout to stderr.
4244 * remote-utils.c (remote_is_stdio): New static global.
4245 (remote_connection_is_stdio): New function.
4246 (remote_prepare): Handle stdio connection.
4247 (remote_open): Ditto.
4248 (remote_close): Don't close stdin for stdio connections.
4249 (read_prim,write_prim): New functions. Replace all calls to
4250 read/write to these.
4251 * server.c (main): Watch for "-" argument. Move call to
4252 remote_prepare before start_inferior.
4253 * server.h (STDIO_CONNECTION_NAME): New macro.
4254 (remote_connection_is_stdio): Declare.
4256 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4257 in debugging output.
4259 2011-12-15 Yao Qi <yao@codesourcery.com>
4261 * tracepoint.c: Include sys/syscall.h.
4262 (gdb_ust_thread): Remove preprocessor conditional.
4264 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4266 * linux-low.c (linux_detach_one_lwp): Call
4267 the_low_target.prepare_to_resume before detaching.
4269 2011-12-14 Yao Qi <yao@codesourcery.com>
4271 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4274 2011-12-14 Yao Qi <yao@codesourcery.com>
4276 * i386-low.c (i386_low_stopped_data_address): Initialize local
4279 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4283 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4284 DR_CONTROL unless necessary. Extend comments.
4285 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4286 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4288 2011-12-13 Yao Qi <yao@codesourcery.com>
4290 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4292 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4294 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4296 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4297 Print new debug message for such case.
4299 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4301 Fix overlapping memcpy.
4302 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4303 the read_inferior_memory transfer.
4304 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4305 write_inferior_memory transfer.
4306 (set_fast_tracepoint_jump): New variable buf. Use it for the
4307 read_inferior_memory and write_inferior_memory transfers.
4308 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4309 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4310 Use it for the write_inferior_memory transfer.
4311 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4314 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4316 * linux-low.c (fetch_register, store_register): Make code
4317 consistent, fix formatting.
4319 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4321 * linux-low.c (usr_store_inferior_registers): Factor out code
4322 to handle individual registers into...
4323 (store_register): ... this new function.
4325 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4327 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4328 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4329 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4330 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4331 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4332 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4333 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4334 (srv_xmlfiles): Add new XML files.
4336 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4338 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4339 (init_registers_s390_linux32v1): Add prototype.
4340 (init_registers_s390_linux32v2): Likewise.
4341 (init_registers_s390_linux64v1): Likewise.
4342 (init_registers_s390_linux64v2): Likewise.
4343 (init_registers_s390x_linux64v1): Likewise.
4344 (init_registers_s390x_linux64v2): Likewise.
4345 (s390_num_regs): Increment to 52.
4346 (s390_regmap): Add orig_r2 register.
4347 (s390_num_regs_3264): Increment to 68.
4348 (s390_regmap_3264): Add orig_r2 register.
4349 (s390_collect_ptrace_register): Handle orig_r2 register.
4350 (s390_supply_ptrace_register): Likewise.
4351 (s390_fill_last_break): New function.
4352 (s390_store_last_break): Likewise.
4353 (s390_fill_system_call): New function.
4354 (s390_store_system_call): Likewise.
4355 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4357 (s390_check_regset): New function.
4358 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4359 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4360 Update target_regsets for available register sets.
4362 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4363 Jan Kratochvil <jan.kratochvil@redhat.com>
4365 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4366 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4368 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4369 * linux-low.h (struct process_info_private): New member r_debug.
4370 * server.c (handle_qxfer_libraries): Call
4371 the_target->qxfer_libraries_svr4.
4372 (handle_qxfer_libraries_svr4): New function.
4373 (qxfer_packets): New entry "libraries-svr4".
4374 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4375 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4376 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4377 PACKET_qXfer_libraries_svr4.
4379 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4381 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4382 PSW address/mask between 8-byte and 16-byte formats.
4383 (s390_supply_ptrace_register): Likewise.
4384 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4385 basic addressing mode bit.
4387 2011-11-24 Stan Shebs <stan@codesourcery.com>
4389 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4391 2011-11-17 Stan Shebs <stan@codesourcery.com>
4393 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4394 (tracing_start_time): New global.
4395 (tracing_stop_time): New global.
4396 (tracing_user_name): New global.
4397 (tracing_notes): New global.
4398 (tracing_stop_note): New global.
4399 (cmd_qtstart): Set traceframe_usage, start_time.
4400 (stop_tracing): Set stop_time.
4401 (cmd_qtstatus): Report additional status.
4402 (cmd_qtp): New function.
4403 (handle_tracepoint_query): Call it.
4404 (cmd_qtnotes): New function.
4405 (handle_tracepoint_general_set): Call it.
4406 (get_timestamp): Rename from tsv_get_timestamp.
4408 2011-11-14 Stan Shebs <stan@codesourcery.com>
4409 Kwok Cheung Yeung <kcy@codesourcery.com>
4411 * linux-x86-low.c (small_jump_insn): New.
4412 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4413 trampoline and error message, build a trampoline and issue a small
4414 jump instruction to it.
4415 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4416 trampoline and error message.
4417 (x86_get_min_fast_tracepoint_insn_len): New.
4418 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4419 * linux-low.h (struct linux_target_ops): Add arguments to
4420 install_fast_tracepoint_jump_pad operation, add new operation.
4421 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4423 (linux_get_min_fast_tracepoint_insn_len): New function.
4424 (linux_target_op): Add new operation.
4425 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4426 (gdb_trampoline_buffer_end): Ditto.
4427 (gdb_trampoline_buffer_error): Ditto.
4428 (struct ipa_sym_addresses): Add fields for new IPA variables.
4429 (symbol_list): Add entries for new IPA variables.
4430 (struct tracepoint): Add fields to hold the address range of the
4431 trampoline used by the tracepoint.
4432 (trampoline_buffer_head): New static variable.
4433 (trampoline_buffer_tail): Ditto.
4434 (claim_trampoline_space): New function.
4435 (have_fast_tracepoint_trampoline_buffer): New function.
4436 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4438 (install_fast_tracepoint): Ditto, also add error buffer argument.
4439 (cmd_qtminftpilen): New function.
4440 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4441 (fast_tracepoint_from_trampoline_address): New function.
4442 (fast_tracepoint_collecting): Handle trampoline as part of jump
4444 (set_trampoline_buffer_space): New function.
4445 (initialize_tracepoint): Initialize new IPA variables.
4446 * target.h (struct target_ops): Add arguments to
4447 install_fast_tracepoint_jump_pad operation, add new
4448 get_min_fast_tracepoint_insn_len operation.
4449 (target_get_min_fast_tracepoint_insn_len): New.
4450 (install_fast_tracepoint_jump_pad): Add arguments.
4451 * server.h (IPA_BUFSIZ): Define.
4452 * linux-i386-ipa.c: Include extra header files.
4453 (initialize_fast_tracepoint_trampoline_buffer): New function.
4454 (initialize_low_tracepoint): Call it.
4455 * server.h (set_trampoline_buffer_space): Declare.
4456 (claim_trampoline_space): Ditto.
4457 (have_fast_tracepoint_trampoline_buffer): Ditto.
4459 2011-11-14 Yao Qi <yao@codesourcery.com>
4461 * server.c (handle_query): Handle InstallInTrace for qSupported.
4462 * tracepoint.c (add_tracepoint): Sort list.
4463 (install_tracepoint, download_tracepoint): New.
4464 (cmd_qtdp): Call them to install and download tracepoints.
4465 (sort_tracepoints): Removed.
4466 (cmd_qtstart): Update.
4468 2011-11-14 Yao Qi <yao@codesourcery.com>
4470 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4471 * mem-break.h: Declare.
4472 * tracepoint.c (cmd_qtstart): Move some code to ...
4473 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4475 (download_tracepoints): Move some code to ...
4476 (download_tracepoint_1): ... here. New.
4478 2011-11-08 Yao Qi <yao@codesourcery.com>
4480 * remote-utils.c (relocate_instruction): A comment fix.
4482 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4484 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4485 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4486 dr_status_mirror and dr_control_mirror from debug_reg_state.
4487 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4488 (i386_initial_stuff): Remove use of deleted globals.
4489 (i386_get_thread_context, i386_set_thread_context,
4490 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4491 from debug_reg_state.
4493 2011-11-05 Yao Qi <yao@codesourcery.com>
4495 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4496 address as TPOINT's.
4498 2011-11-02 Stan Shebs <stan@codesourcery.com>
4500 * tracepoint.c (agent_mem_read_string): New function.
4501 (eval_agent_expr): Call it for tracenz.
4502 * server.c (handle_query): Report support for tracenz.
4504 2011-11-02 Yao Qi <yao@codesourcery.com>
4506 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4508 2011-11-02 Yao Qi <yao@codesourcery.com>
4510 * target.h: Fix a typo in comment.
4512 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4514 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4515 clobber the breakpoints' shadows with fast tracepoint jumps.
4516 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4517 * target.c (write_inferior_memory): Also pass MYADDR down to
4520 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4522 * configure.ac: Check support for personality routine.
4523 * configure: Regenerate.
4524 * config.in: Likewise.
4525 * linux-low.c: Include <sys/personality.h>.
4526 Define ADDR_NO_RANDOMIZE if necessary.
4527 (linux_create_inferior): Disable address space randomization when
4528 forking inferior, if requested.
4529 (linux_supports_disable_randomization): New function.
4530 (linux_target_ops): Install it.
4531 * server.h (disable_randomization): Declare.
4532 * server.c (disable_randomization): New global variable.
4533 (handle_general_set): Handle QDisableRandomization.
4534 (handle_query): Likewise for qSupported.
4535 (main): Support --disable-randomization and --no-disable-randomization
4536 command line arguments.
4537 * target.h (struct target_ops): Add supports_disable_randomization.
4538 (target_supports_disable_randomization): New macro.
4540 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4542 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4544 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4545 [!PT_GETDSBT] (target_loadmap): New definition.
4546 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4547 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4548 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4549 and PT_GETDSBT to LINUX_LOADMAP.
4550 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4551 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4553 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4555 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4556 (arm_linux_hwbp_cap): New static variable.
4557 (arm_linux_get_hwbp_cap): Replace by ...
4558 (arm_linux_init_hwbp_cap): ... this new function.
4559 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4560 (arm_linux_get_hw_watchpoint_count): Likewise.
4561 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4562 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4563 (arm_prepare_to_resume): Use perror_with_name instead of error.
4565 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4567 * linux-arm-low.c: Include <signal.h>.
4568 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4569 (struct arm_linux_hwbp_cap): New data type.
4570 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4571 (struct arm_linux_hw_breakpoint): New data type.
4572 (MAX_BPTS, MAX_WPTS): Define.
4573 (struct arch_process_info, struct arch_lwp_info): New data types.
4574 (arm_linux_get_hwbp_cap): New function.
4575 (arm_linux_get_hw_breakpoint_count): Likewise.
4576 (arm_linux_get_hw_watchpoint_count): Likewise.
4577 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4578 (arm_hwbp_control_initialize): Likewise.
4579 (arm_hwbp_control_is_enabled): Likewise.
4580 (arm_hwbp_control_is_initialized): Likewise.
4581 (arm_hwbp_control_disable): Likewise.
4582 (arm_linux_hw_breakpoint_equal): Likewise.
4583 (arm_linux_hw_point_initialize): Likewise.
4584 (struct update_registers_data): New data structure.
4585 (update_registers_callback: New function.
4586 (arm_insert_point): Likewise.
4587 (arm_remove_point): Likewise.
4588 (arm_stopped_by_watchpoint): Likewise.
4589 (arm_stopped_data_address): Likewise.
4590 (arm_new_process): Likewise.
4591 (arm_new_thread): Likewise.
4592 (arm_prepare_to_resume): Likewise.
4593 (the_low_target): Register arm_insert_point, arm_remove_point,
4594 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4595 arm_new_thread, and arm_prepare_to_resume.
4597 2011-09-15 Stan Shebs <stan@codesourcery.com>
4599 * server.h (struct emit_ops): Add compare-goto fields.
4600 * tracepoint.c (gdb_agent_op_sizes): New table.
4601 (emit_eq_goto): New function.
4602 (emit_ne_goto): New function.
4603 (emit_lt_goto): New function.
4604 (emit_le_goto): New function.
4605 (emit_gt_goto): New function.
4606 (emit_ge_goto): New function.
4607 (is_goto_target): New function.
4608 (compile_bytecodes): Recognize special cases of compare-goto
4609 combinations and call specialized emitters for them.
4610 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4611 (amd64_emit_ne_goto): New function.
4612 (amd64_emit_lt_goto): New function.
4613 (amd64_emit_le_goto): New function.
4614 (amd64_emit_gt_goto): New function.
4615 (amd64_emit_ge_goto): New function.
4616 (amd64_emit_ops): Add the new functions.
4617 (i386_emit_eq_goto): New function.
4618 (i386_emit_ne_goto): New function.
4619 (i386_emit_lt_goto): New function.
4620 (i386_emit_le_goto): New function.
4621 (i386_emit_gt_goto): New function.
4622 (i386_emit_ge_goto): New function.
4623 (i386_emit_ops): Add the new functions.
4625 2011-09-08 Stan Shebs <stan@codesourcery.com>
4627 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4628 (i386_emit_epilogue): Restore %ebx.
4630 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4632 * server.c (step_thread): Remove definition.
4633 (process_serial_event): Don't handle Hs.
4634 * server.h (step_thread): Remove declaration.
4635 * target.c (set_desired_inferior): Remove use of step_thread.
4637 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4639 * linux-low.c: Include linux-procfs.h.
4640 (linux_attach_lwp_1): Update comments.
4641 (linux_attach): Scan for existing threads when attaching to a
4642 process that is the tgid.
4643 * Makefile.in: Update dependencies.
4645 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4647 * configure.srv: Add linux-procfs.o dependencies.
4649 2011-08-14 Yao Qi <yao@codesourcery.com>
4651 * target.h (struct target_ops): Fix indent.
4652 * win32-low.c (win32_target_ops): Fix comment.
4654 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4655 Yao Qi <yao@codesourcery.com>
4657 * Makefile.in (clean): Remove tic6x-*.c files.
4658 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4659 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4660 (tic6x-c64xp-linux.c): Likewise.
4661 * configure.srv: Add support for tic6x-*-uclinux.
4662 * linux-tic6x-low.c: New.
4663 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4665 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4666 Yao Qi <yao@codesourcery.com>
4668 * target.h (struct target_ops): Add read_loadmap.
4669 * linux-low.c (struct target_loadseg): New type.
4670 (struct target_loadmap): New type.
4671 (linux_read_loadmap): New function.
4672 (linux_target_ops): Add linux_read_loadmap.
4673 * server.c (handle_query): Support qXfer:fdpic:read packet.
4674 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4677 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4679 * win32-low.c: Include <stdint.h>.
4681 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4683 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4684 to the inferior here.
4685 (i386_remove_aligned_watchpoint): Ditto.
4686 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4687 fit part of the watchpoint in the debug registers.
4688 (i386_update_inferior_debug_regs): New.
4689 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4690 registers, and only update the inferior on success.
4691 (i386_low_remove_watchpoint): Ditto.
4693 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4695 * linux-low.c (compare_ints, unique, list_threads, show_process,
4696 linux_core_of_thread): Delete.
4697 (linux_target_ops): Change linux_core_of_thread to
4698 linux_common_core_of_thread.
4699 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4700 * utils.c (malloc_failure): Change type of argument.
4701 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4702 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4703 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4704 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4705 (IPA_OBJS): Add common-utils-ipa.o.
4706 (ptid_h, linux_osdata_h): New macros.
4707 (server_h): Add common/common-utils.h, common/xml-utils.h,
4708 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4710 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4711 ptid.o, buffer.o): New rules.
4712 (linux-low.o): Add common/linux-osdata.h as a dependency.
4713 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4714 * configure.ac: Add AC_HEADER_DIRENT check.
4715 * config.in: Regenerate.
4716 * configure: Regenerate.
4717 * remote-utils.c (xml_escape_text): Delete.
4718 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4719 buffer_xml_printf): Move to common/buffer.c.
4720 * server.c (main): Remove call to initialize_inferiors.
4721 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4722 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4723 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4724 internal_error, gdb_assert, gdb_assert_fail): Delete.
4725 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4726 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4728 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4729 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4730 initialize_inferiors): Delete.
4732 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4734 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4737 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4739 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4741 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4743 2011-05-26 Yao Qi <yao@codesourcery.com>
4745 * Makefile.in (thread-db.o): Track dependence to
4746 common/gdb_thread_db.h.
4747 * thread-db.c: include gdb_thread_db.h from right place.
4749 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4751 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4752 __FILE__ and __LINE__ to internal_error.
4754 2011-05-13 Doug Evans <dje@google.com>
4756 * thread-db.c (try_thread_db_load_from_sdir): New function.
4757 (try_thread_db_load_from_dir): New function.
4758 (thread_db_load_search): Handle $sdir, ignore $pdir.
4759 Remove trying of system directories if search of
4760 libthread-db-search-path fails, that is now done via $sdir.
4762 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4764 * server.c (handle_query): Add EnableDisableTracepoints to the list
4765 of supported features.
4766 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4768 (cmd_qtenable_disable): New.
4769 (cmd_qtstart): Install tracepoints even if disabled.
4770 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4771 receiving a QTEnable or QTDisable packet.
4772 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4773 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4775 (gdb_probe): Skip data collection if static tracepoint is disabled.
4777 2011-05-10 Doug Evans <dje@google.com>
4779 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4781 2011-05-04 Doug Evans <dje@google.com>
4783 * linux-low.c (linux_join): Skip process lookup.
4784 * spu-low.c (spu_join): Ditto.
4785 * server.c (join_inferiors_callback): Delete.
4786 (process_serial_event): For 'D' packet (detach) call join_inferior
4789 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4791 * README: Don't mention xscale*-*-linux*.
4792 * configure.srv (xscale*-*-linux*): Don't handle target.
4794 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4796 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4798 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4799 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4800 (i386_emit_void_call_2): Likewise.
4802 2011-04-26 Yao Qi <yao@codesourcery.com>
4804 * linux-low.c: Move common macros to linux-ptrace.h.
4805 Include linux-ptrace.h.
4806 * Makefile.in (linux_ptrace_h): New.
4807 (linux-low.o): Depends on linux-ptrace.h.
4809 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4811 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4812 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4813 (remote_prepare): New function with most of the TCP code from ...
4814 (remote_open): ... here. Detect PORT here unconditionally. Move also
4815 setting transport_is_reliable.
4816 * server.c (run_once): New variable.
4817 (gdbserver_usage): Document it.
4818 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4819 the first run if RUN_ONCE.
4820 * server.h (run_once, remote_prepare): New declarations.
4822 2011-04-19 Tom Tromey <tromey@redhat.com>
4824 * win32-low.c (handle_load_dll): Remove duplicate "the".
4826 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4828 Remove support for old Cygwin 1.5 versions.
4829 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4830 function to avoid warning.
4831 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4834 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4836 * gdbserver/server.h (Macro _): Define it if not available.
4838 2011-03-14 Michael Snyder <msnyder@vmware.com>
4840 * hostio.c (handle_close): Remove unnecessary null test.
4842 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4844 * Makefile.in (maintainer-clean realclean distclean): Remove
4845 "make ... subdir_do" command.
4847 2011-03-10 Michael Snyder <msnyder@vmware.com>
4849 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4851 * server.c (handle_v_run): Free alloced buffer on early return.
4853 2011-03-09 Yao Qi <yao@codesourcery.com>
4856 2011-03-04 Yao Qi <yao@codesourcery.com>
4858 * Makefile.in: Remove GNU make feature --directory.
4860 2011-03-05 Yao Qi <yao@codesourcery.com>
4862 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4863 (subdir_do): New make target. Copied from gdb/Makefile.
4864 (maintainer-clean, realclean, distclean, clean): Call corresponding
4865 make targets in common/Makefile.
4867 2011-02-11 Yao Qi <yao@codesourcery.com>
4869 * configure.ac: Call AC_PROG_RANLIB.
4870 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4871 * configure: Regenerate.
4873 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4875 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4877 2011-03-06 Yao Qi <yao@codesourcery.com>
4879 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4881 2011-03-05 Yao Qi <yao@codesourcery.com>
4883 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4884 (subdir_do): New make target. Copied from gdb/Makefile.
4885 (maintainer-clean, realclean, distclean, clean): Call corresponding
4886 make targets in common/Makefile.
4888 2011-03-04 Yao Qi <yao@codesourcery.com>
4890 * Makefile.in: Remove GNU make feature --directory.
4892 2011-03-04 Michael Snyder <msnyder@vmware.com>
4894 * server.c (queue_stop_reply): Call xmalloc not malloc.
4896 2011-03-02 Michael Snyder <msnyder@vmware.com>
4898 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4900 2011-02-28 Michael Snyder <msnyder@vmware.com>
4902 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4903 (cmd_qtframe): Ditto.
4904 (cmd_qtbuffer): Ditto.
4905 (cmd_bigqtbuffer): Ditto.
4907 * utils.c (decimal2str): Initialize 'width' to nine, then
4910 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4912 * hostio.c (require_data): Free *data, not data.
4914 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4916 * hostio.c (require_data): Use free, not xfree.
4918 2011-02-27 Michael Snyder <msnyder@vmware.com>
4920 * server.c (handle_query): Discard unused value.
4922 * hostio.c (require_data): Free malloc memory before returning
4925 2011-02-26 Michael Snyder <msnyder@vmware.com>
4927 * linux-low.c (list_threads): Call closedir for dirent.
4929 2011-02-27 Michael Snyder <msnyder@vmware.com>
4931 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4932 a case statement falls through.
4934 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4936 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4939 2011-02-26 Michael Snyder <msnyder@vmware.com>
4941 * utils.c (decimal2str): Eliminate dead code and dead param.
4942 (pulongest): Drop dead param from call to decimal2str.
4945 2011-02-24 Joel Brobecker <brobecker@adacore.com>
4947 Revert the following patch (not approved yet):
4948 2011-02-21 Hui Zhu <teawater@gmail.com>
4949 * tracepoint.c (tp_printf): New function.
4950 (eval_agent_expr): Handle gdb_agent_op_printf.
4952 2011-02-21 Hui Zhu <teawater@gmail.com>
4954 * tracepoint.c (tp_printf): New function.
4955 (eval_agent_expr): Handle gdb_agent_op_printf.
4957 2011-02-18 Tom Tromey <tromey@redhat.com>
4959 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4960 (tracepoint.o): Likewise.
4961 * tracepoint.c (enum gdb_agent_op): Use ax.def.
4962 (gdb_agent_op_names): Likewise.
4964 2011-02-18 Tom Tromey <tromey@redhat.com>
4966 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
4967 gdb_agent_op_rot>: New constants.
4968 (gdb_agent_op_names): Add pick and roll.
4969 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
4972 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4974 * aclocal.m4: Regenerated with aclocal-1.11.1.
4976 2011-02-14 Pedro Alves <pedro@codesourcery.com>
4978 * server.c (handle_qxfer_traceframe_info): New.
4979 (qxfer_packets): Register "traceframe-info".
4980 (handle_query): Report support for qXfer:traceframe-info:read+.
4981 * tracepoint.c (match_blocktype): New.
4982 (traceframe_find_block_type): Rename to ...
4983 (traceframe_walk_blocks): ... this. Add callback filter argument,
4985 (traceframe_find_block_type): New, reimplemented on top of
4986 traceframe_walk_blocks.
4987 (build_traceframe_info_xml): New.
4988 (traceframe_read_info): New.
4989 * server.h (traceframe_read_info): Declare.
4991 2011-02-11 Yao Qi <yao@codesourcery.com>
4993 * configure.ac: Call AC_PROG_RANLIB.
4994 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4995 * configure: Regenerate.
4997 2011-02-07 Pedro Alves <pedro@codesourcery.com>
4999 * server.c (gdb_read_memory): Change return semantics to allow
5001 (handle_search_memory_1): Adjust.
5002 (process_serial_event) <'m' packet>: Handle partial transfers.
5003 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5005 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5007 * regcache.c (init_register_cache): Initialize
5008 regcache->register_status.
5009 (free_register_cache): Release regcache->register_status.
5010 (regcache_cpy): Copy register_status.
5011 (registers_to_string): Print 'x's for unavailable registers.
5012 (supply_register): Mark the register's status valid or
5013 unavailable, depending on whether a buffer was passed in or not.
5014 (supply_register_zeroed): New.
5015 (supply_regblock): Mark the registers' status valid or
5016 unavailable, depending on whether a buffer was passed in or not.
5017 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5018 (struct regcache): New `register_status' field.
5019 (supply_register_zeroed): Declare.
5020 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5021 supply_register_zeroed, rather than passing a NULL buffer to
5023 * tracepoint.c (fetch_traceframe_registers): Update comment.
5025 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5027 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5030 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5032 * server.h (decode_xfer_write): Change prototype.
5033 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5034 and don't extract the annex here.
5035 * server.c (decode_xfer_read): Remove `annex' parameter,
5036 and don't extract the annex here.
5038 (struct qxfer): New.
5039 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5040 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5041 (handle_qxfer_statictrace): New functions, abstracted out from
5042 handle_query, and made to use the struct qxfer interface.
5043 (handle_threads_qxfer_proper): Rename to ...
5044 (handle_qxfer_threads_proper): ... this.
5045 (handle_threads_qxfer): Rename to ...
5046 (handle_qxfer_threads): ... this. Adjust.
5047 (qxfer_packets): New array.
5048 (handle_qxfer): New function.
5049 (handle_query): Use handle_qxfer.
5051 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5053 * gdbreplay.c: Shorten lines of >= 80 columns.
5054 * linux-low.c: Ditto.
5055 * linux-ppc-low.c: Ditto.
5056 * linux-s390-low.c: Ditto.
5057 * linux-sparc-low.c: Ditto.
5058 * linux-x86-low.c: Ditto.
5059 * linux-xtensa-low.c: Ditto.
5060 * mem-break.c: Ditto.
5062 * regcache.h: Ditto.
5063 * remote-utils.c: Ditto.
5066 * thread-db.c: Ditto.
5067 * tracepoint.c: Ditto.
5069 * win32-low.h: Ditto.
5071 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5073 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5076 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5078 * server.c (gdbserver_version): Update copyright year in version
5080 * gdbreplay.c (gdbreplay_version): Ditto.
5082 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5084 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5085 * linux-bfin-low.c: New file.
5086 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5087 PT_DATA_ADDR for BFIN targets.
5088 * Makefile.in (SFILES): Add linux-bfin-low.c.
5089 (clean): Remove reg-bfin.c.
5090 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5091 * README: Mention supported Blackfin targets.
5093 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5095 * .gitignore: New file.
5097 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5099 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5101 2010-10-22 Jie Zhang <jie@codesourcery.com>
5103 * Makefile.in: Add FLAGS_TO_PASS variable.
5104 (install): Remove dependency of install-only and recursively
5105 invoke make for install-only.
5107 2010-10-04 Doug Evans <dje@google.com>
5109 * Makefile.in (uninstall): Use $(DESTDIR).
5111 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5115 * linux-x86-low.c (compat_siginfo_from_siginfo)
5116 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5117 si_code is < 0. Check for si_code == SI_TIMER before checking for
5120 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5122 * lynx-i386-low.c: New file.
5123 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5125 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5127 * lynx-low.c (ptrace_request_to_str): Remove handling for
5128 request values that have been removed in LynxOS 5.x.
5130 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5132 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5135 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5137 * configure.ac: Add --enable-inprocess-agent option.
5138 * configure: Rebuilt.
5140 2010-09-06 Yao Qi <yao@codesourcery.com>
5142 * linux-low.c (linux_kill): Remove unused variable.
5143 (linux_stabilize_threads): Likewise.
5144 * server.c (start_inferior): Likewise.
5145 (queue_stop_reply_callback): Likewise.
5146 * tracepoint.c (do_action_at_tracepoint): Likewise.
5148 2010-09-06 Yao Qi <yao@codesourcery.com>
5150 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5153 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5155 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5157 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5159 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5162 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5164 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5165 gdbserver/lynx-ppc-low.c: New files.
5166 * Makefile.in (lynx_low_h): New variable.
5167 (lynx-low.o, lynx-ppc-low.o): New rules.
5168 * configure.ac: On LynxOS, link with -lnetinet.
5169 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5170 * configure: regenerate.
5172 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5174 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5175 * configure.ac: Add check for vasprintf and vsnprintf.
5176 * configure, config.in: Regenerate.
5177 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5179 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5181 * gdbreplay.c: Move include of alloca.h up, next to include of
5183 * server.h: Add include of malloc.h.
5184 * mem-break.c: Remove include of malloc.h.
5185 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5187 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5189 * Makefile.in (memmem.o): Build with -Wno-error.
5191 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5193 * utils.c (xsnprintf): Make non-static.
5194 * server.h: Add xsnprintf declaration.
5195 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5196 replace calls to snprintf by calls to xsnprintf throughout.
5198 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5200 * configure.ac: Add configure check for alloca.
5201 * configure, config.in: Regenerate.
5202 * server.h: Include alloca.h if it exists.
5203 * gdbreplay.c: Include alloca.h if it exists.
5205 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5207 * linux-low.c (__SIGRTMIN): Define if not already defined.
5208 (linux_create_inferior): Check for __ANDROID__ rather than
5210 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5211 are already deferred.
5212 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5213 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5214 stopped and already has a pending signal to report.
5215 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5216 a pending signal to report or is moving out of a jump pad.
5217 (linux_init_signals): Check for __ANDROID__ rather than
5220 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5222 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5223 debug_threads check. Avoid a linear search when not doing debug
5226 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5228 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5229 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5230 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5231 (process_event): Change local fd's type to gdb_fildes_t.
5232 (create_file_handler): Adjust prototype.
5233 (delete_file_handler): Adjust prototype.
5234 (handle_file_event): Adjust prototype. Use pfildes.
5235 (create_file_event): Adjsut prototype.
5236 * remote-utils.c (remote_desc, listen_desc): Change type to
5238 * server.h: New gdb_fildes_t typedef.
5239 [USE_WIN32API]: Include winsock2.h.
5240 (delete_file_handler, add_file_handler): Adjust prototypes.
5242 * utils.c (pfildes): New.
5244 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5246 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5247 * configure: Regenerate.
5249 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5251 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5252 (linux_done_accessing_memory): ... this.
5253 (linux_target_ops): Adjust.
5254 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5255 * nto-low.c (nto_target_ops): Adjust comment.
5256 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5257 * spu-low.c (spu_target_ops): Adjust comment.
5258 * target.h (target_ops): Rename unprepare_to_access_memory field
5259 to done_accessing_memory.
5260 (unprepare_to_access_memory): Rename to ...
5261 (done_accessing_memory): ... this.
5263 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5265 * linux-low.c (linux_prepare_to_access_memory): New.
5266 (linux_unprepare_to_access_memory): New.
5267 (linux_target_ops): Install them.
5268 * server.c (read_memory): Rename to ...
5269 (gdb_read_memory): ... this. Use
5270 prepare_to_access_memory/prepare_to_access_memory.
5271 (write_memory): Rename to ...
5272 (gdb_write_memory): ... this. Use
5273 prepare_to_access_memory/prepare_to_access_memory.
5274 (handle_search_memory_1): Adjust.
5275 (process_serial_event): Adjust.
5276 * target.h (struct target_ops): New fields
5277 prepare_to_access_memory and unprepare_to_access_memory.
5278 (prepare_to_access_memory, unprepare_to_access_memory): New.
5279 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5280 prepare_to_access_memory/prepare_to_access_memory.
5281 * nto-low.c (nto_target_ops): Adjust.
5282 * spu-low.c (spu_target_ops): Adjust.
5283 * win32-low.c (win32_target_ops): Adjust.
5285 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5287 * Makefile.in (WARN_CFLAGS): Get it from configure.
5288 (WERROR_CFLAGS): New.
5289 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5290 * configure.ac: Introduce --enable-werror, which adds -Werror to
5291 the compiler command line. Enabled by default. Disable with
5292 --disable-werror. Add -Wdeclaration-after-statement
5293 Wpointer-arith and -Wformat-nonliteral to warning flags.
5294 * configure: Regenerate.
5296 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5298 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5300 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5302 * gdbreplay.c (remote_error): New.
5304 (expect): Use gdbchar. Check for error reading from GDB.
5305 Clarify sync error output.
5306 (play): Check for errors writing to GDB.
5307 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5308 * remote-utils.c (getpkt): Check for errors writing to the remote
5311 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5313 * linux-low.c (linux_wait_1): Move non-debugging code out of
5314 `debug_threads' control.
5316 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5318 * linux-low.c (linux_wait_1): Don't set last_status here.
5319 * server.c (push_event, queue_stop_reply_callback): Assert we're
5320 not pushing a TARGET_WAITKIND_IGNORE event.
5321 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5322 (myresume, handle_target_event): Set the thread's last_resume_kind
5323 and last_status from the target returned status.
5325 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5329 * linux-x86-low.c (update_debug_registers_callback): New.
5330 (i386_dr_low_set_addr): Use it.
5331 (i386_dr_low_get_addr): New.
5332 (i386_dr_low_set_control): Use update_debug_registers_callback.
5333 (i386_dr_low_get_control): New.
5334 (i386_dr_low_get_status): Adjust.
5335 * linux-low.c (linux_stop_lwp): New.
5336 * linux-low.h (linux_stop_lwp): Declare.
5338 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5339 argument instead of a i386_debug_reg_state.
5340 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5341 a i386_debug_reg_state.
5342 (i386_insert_aligned_watchpoint): Adjust.
5343 (i386_remove_aligned_watchpoint): Adjust.
5344 (i386_low_stopped_data_address): Read the debug registers from the
5345 inferior instead of from the mirrors.
5346 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5347 (i386_dr_low_get_addr): Declare.
5348 (i386_dr_low_get_control): Declare.
5349 (i386_dr_low_get_status): Change prototype.
5351 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5352 (i386_dr_low_get_addr): New.
5353 (i386_dr_low_get_control): New.
5354 (i386_dr_low_get_status): Adjust prototype. Return
5356 (i386_initial_stuff): Clear dr_status_mirror and
5358 (i386_get_thread_context): Adjust.
5359 (i386_set_thread_context): Adjust.
5360 (i386_thread_added): Adjust.
5362 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5364 * linux-low.h (linux_thread_area): Delete declaration.
5366 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5368 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5369 after its termination.
5371 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5373 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5374 (gdb_wants_all_stopped): Delete.
5375 (linux_wait_1): Don't call them.
5376 * server.c (handle_v_cont): Tag all threads as want-stopped.
5377 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5378 stopped as "client-wants-stopped".
5380 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5382 * Makefile.in (signals_h): New.
5383 (server_h): Depend on it.
5384 (server.o): Don't depend on $(signals_def).
5385 (signals.o): Depend on $(signals_def).
5387 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5389 * Makefile.in (signals_def): New.
5390 (server_h): Append include/gdb/signals.h and signals_def.
5391 (server.o): Append signals_def.
5393 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5395 * server.c (handle_target_event): Use target_signal_to_host for
5396 resume_info.sig initialization.
5397 * target.h (struct thread_resume) <sig>: New comment.
5399 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5401 * server.c (handle_query): strcpy() the returned string from paddress()
5402 instead of sprintf().
5403 * utils.c (paddress): Return phex_nz().
5405 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5407 * server.c (handle_v_cont): Call mourn_inferior if process
5409 (myresume): Likewise.
5411 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5413 Static tracepoints, and integration with UST.
5415 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5416 * mem-break.c (uninsert_all_breakpoints)
5417 (reinsert_all_breakpoints): New.
5418 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5419 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5420 (gdb_agent_ust_loaded, helper_thread_id)
5421 (gdb_agent_helper_thread_id): New macros.
5422 (struct ipa_sym_addresses): Add addr_ust_loaded,
5423 addr_helper_thread_id, addr_cmd_buf.
5424 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5425 (in_process_agent_loaded_ust): New.
5426 (write_e_ust_not_loaded): New.
5427 (maybe_write_ipa_ust_not_loaded): New.
5428 (struct collect_static_trace_data_action): New.
5429 (enum tracepoint_type) <static_tracepoint>: New.
5430 (struct tracepoint) <handle>: Mention static tracepoints.
5431 (struct static_tracepoint_ctx): New.
5432 (CMD_BUF_SIZE): New.
5433 (add_tracepoint_action): Handle static tracepoint actions.
5434 (unprobe_marker_at): New.
5435 (clear_installed_tracepoints): Handle static tracepoints.
5436 (cmd_qtdp): Handle static tracepoints.
5437 (probe_marker_at): New.
5438 (cmd_qtstart): Handle static tracepoints.
5439 (response_tracepoint): Handle static tracepoints.
5440 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5441 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5442 (get_context_regcache): Handle static tracepoints.
5443 (do_action_at_tracepoint): Handle static tracepoint actions.
5444 (traceframe_find_block_type): Handle static trace data blocks.
5445 (traceframe_read_sdata): New.
5446 (download_tracepoints): Download static tracepoint actions.
5447 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5448 (GDB_PROBE_NAME): New.
5453 (ust_marker_to_static_tracepoint): New.
5455 (collect_ust_data_at_tracepoint): New.
5456 (gdb_ust_probe): New.
5457 (UNIX_PATH_MAX, SOCK_DIR): New.
5458 (gdb_ust_connect_sync_socket): New.
5459 (resume_thread, stop_thread): New.
5460 (run_inferior_command): New.
5461 (init_named_socket): New.
5462 (gdb_ust_socket_init): New.
5463 (cstr_to_hexstr): New.
5465 (first_marker, next_marker): New.
5466 (response_ust_marker): New.
5467 (cmd_qtfstm, cmd_qtsstm): New.
5468 (unprobe_marker_at, probe_marker_at): New.
5469 (cmd_qtstmat, gdb_ust_thread): New.
5470 (gdb_ust_init): New.
5471 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5472 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5474 (x86_64_st_collect_regmap): New.
5475 (X86_64_NUM_ST_COLLECT_GREGS): New.
5476 (AMD64_RIP_REGNUM): New.
5477 (supply_static_tracepoint_registers): New.
5478 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5480 (i386_st_collect_regmap): New.
5481 (i386_NUM_ST_COLLECT_GREGS): New.
5482 (supply_static_tracepoint_registers): New.
5483 * server.c (handle_query): Handle qXfer:statictrace:read.
5484 <qSupported>: Report support for StaticTracepoints, and
5485 qXfer:statictrace:read features.
5486 * server.h (traceframe_read_sdata)
5487 (supply_static_tracepoint_registers): Declare.
5488 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5489 (unpack_varlen_hex): Include in IPA build.
5490 * Makefile.in (ustlibs, ustinc): New.
5491 (IPA_OBJS): Add remote-utils-ipa.o.
5492 ($(IPA_LIB)): Link -ldl and -lpthread.
5494 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5495 * config.in, configure: Regenerate.
5497 2010-06-20 Ian Lance Taylor <iant@google.com>
5498 Pedro Alves <pedro@codesourcery.com>
5500 * linux-x86-low.c (always_true): Delete.
5501 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5502 trying to fool the compiler with always_true.
5504 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5506 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5507 conditions in gdbserver.
5509 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5511 * spu-low.c (spu_read_memory): Wrap around local store limit.
5512 (spu_write_memory): Likewise.
5514 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5516 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5517 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5519 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5521 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5522 uses with LONGEST uses.
5524 2010-06-14 Stan Shebs <stan@codesourcery.com>
5525 Pedro Alves <pedro@codesourcery.com>
5529 * linux-x86-low.c: Include limits.h.
5534 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5535 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5536 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5537 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5538 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5539 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5540 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5541 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5542 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5543 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5544 (amd64_emit_void_call_2): New.
5545 (amd64_emit_ops): New.
5546 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5547 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5548 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5549 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5550 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5551 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5552 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5553 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5554 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5555 (i386_emit_stack_adjust, i386_emit_int_call_1)
5556 (i386_emit_void_call_2): New.
5557 (i386_emit_ops): New.
5558 (x86_emit_ops): New.
5559 (the_low_target): Install x86_emit_ops.
5560 * server.h (struct emit_ops): New.
5561 (get_raw_reg_func_addr): Declare.
5562 (current_insn_ptr, emit_error): Declare.
5563 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5564 (set_trace_state_variable_value): New defines.
5565 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5566 addr_get_trace_state_variable_value and
5567 addr_set_trace_state_variable_value.
5568 (symbol_list): New fields for get_raw_reg,
5569 get_trace_state_variable_value and set_trace_state_variable_value.
5570 (condfn): New typedef.
5571 (struct tracepoint): New field `compiled_cond'.
5572 (do_action_at_tracepoint): Clear compiled_cond.
5573 (get_trace_state_variable_value, set_trace_state_variable_value):
5575 (condition_true_at_tracepoint): If there's a compiled condition,
5577 (current_insn_ptr, emit_error): New globals.
5578 (struct bytecode_address): New.
5579 (get_raw_reg_func_addr): New.
5580 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5581 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5582 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5583 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5584 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5585 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5586 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5587 (compile_tracepoint_condition, compile_bytecodes): New.
5588 * target.h (emit_ops): Forward declare.
5589 (struct target_ops): New field emit_ops.
5590 (target_emit_ops): New.
5591 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5592 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5593 * linux-low.c (linux_emit_ops): New.
5594 (linux_target_ops): Install it.
5595 * linux-low.h (struct linux_target_ops): New field emit_ops.
5597 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5599 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5600 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5602 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5603 Stan Shebs <stan@codesourcery.com>
5605 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5606 (all): Depend on $(extra_libraries).
5607 (install-only): Install the IPA.
5608 (IPA_OBJS, IPA_LIB): New.
5609 (clean): Remove the IPA lib.
5610 (IPAGENT_CFLAGS): New.
5611 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5612 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5613 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5614 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5615 * configure.ac: Check for atomic builtins support in the compiler.
5616 (IPA_DEPFILES, extra_libraries): Define.
5617 * configure.srv (ipa_obj): Add description.
5618 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5619 (i[34567]86-*-linux*): Set ipa_obj.
5620 (x86_64-*-linux*): Set ipa_obj.
5621 * linux-low.c (stabilizing_threads): New.
5622 (supports_fast_tracepoints): New.
5623 (linux_detach): Stabilize threads before detaching.
5624 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5625 the lwp is either not stabilizing, or is moving out of a jump pad.
5626 (linux_fast_tracepoint_collecting): New.
5627 (maybe_move_out_of_jump_pad): New.
5628 (enqueue_one_deferred_signal): New.
5629 (dequeue_one_deferred_signal): New.
5630 (linux_wait_for_event_1): If moving out of a jump pad, defer
5631 pending signals to later.
5632 (linux_stabilize_threads): New.
5633 (linux_wait_1): Check if threads need moving out of jump pads, and
5635 (stuck_in_jump_pad_callback): New.
5636 (move_out_of_jump_pad_callback): New.
5638 (linux_resume_one_lwp): Handle moving out of jump pads.
5639 (linux_set_resume_request): Dequeue deferred signals.
5640 (need_step_over_p): Also step over fast tracepoint jumps.
5641 (start_step_over): Also uninsert fast tracepoint jumps.
5642 (finish_step_over): Also reinsert fast tracepoint jumps.
5643 (linux_install_fast_tracepoint_jump): New.
5644 (linux_target_ops): Install linux_stabilize_threads and
5645 linux_install_fast_tracepoint_jump_pad.
5646 * linux-low.h (linux_target_ops) <get_thread_area,
5647 install_fast_tracepoint_jump_pad>: New fields.
5648 (struct lwp_info) <collecting_fast_tracepoint,
5649 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5650 (linux_get_thread_area): Declare.
5651 * linux-x86-low.c (jump_insn): New.
5652 (x86_get_thread_area): New.
5653 (append_insns): New.
5655 (amd64_install_fast_tracepoint_jump_pad): New.
5656 (i386_install_fast_tracepoint_jump_pad): New.
5657 (x86_install_fast_tracepoint_jump_pad): New.
5658 (the_low_target): Install x86_get_thread_area and
5659 x86_install_fast_tracepoint_jump_pad.
5660 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5661 (struct fast_tracepoint_jump): New.
5662 (fast_tracepoint_jump_insn): New.
5663 (fast_tracepoint_jump_shadow): New.
5664 (find_fast_tracepoint_jump_at): New.
5665 (fast_tracepoint_jump_here): New.
5666 (delete_fast_tracepoint_jump): New.
5667 (set_fast_tracepoint_jump): New.
5668 (uninsert_fast_tracepoint_jumps_at): New.
5669 (reinsert_fast_tracepoint_jumps_at): New.
5670 (set_breakpoint_at): Use write_inferior_memory.
5671 (uninsert_raw_breakpoint): Use write_inferior_memory.
5672 (check_mem_read): Mask out fast tracepoint jumps.
5673 (check_mem_write): Mask out fast tracepoint jumps.
5674 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5675 (set_fast_tracepoint_jump): Declare.
5676 (delete_fast_tracepoint_jump)
5677 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5678 (reinsert_fast_tracepoint_jumps_at): Declare.
5679 * regcache.c: Don't compile many functions when building the
5680 in-process agent library.
5681 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5682 the register buffer in the heap.
5683 (free_register_cache): If the register buffer isn't owned by the
5684 regcache, don't free it.
5685 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5686 pre-existing register caches.
5687 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5689 (convert_ascii_to_int): : Constify `from' parameter type.
5690 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5691 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5692 the needed buffer in-place.
5693 (relocate_instruction): New.
5694 * server.c (handle_query) <qSymbols>: If the target supports
5695 tracepoints, give it a chance of looking up symbols. Report
5696 support for fast tracepoints.
5697 (handle_status): Stabilize threads.
5698 (process_serial_event): Adjust.
5699 * server.h (struct fast_tracepoint_jump): Forward declare.
5700 (struct process_info) <fast_tracepoint_jumps>: New field.
5701 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5702 (decode_X_packet, decode_M_packet): Adjust.
5703 (relocate_instruction): Declare.
5704 (in_process_agent_loaded): Declare.
5705 (tracepoint_look_up_symbols): Declare.
5706 (struct fast_tpoint_collect_status): Declare.
5707 (fast_tracepoint_collecting): Declare.
5708 (force_unlock_trace_buffer): Declare.
5709 (handle_tracepoint_bkpts): Declare.
5710 (initialize_low_tracepoint)
5711 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5712 * target.h (struct target_ops) <stabilize_threads,
5713 install_fast_tracepoint_jump_pad>: New fields.
5714 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5715 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5716 [HAVE_STDINT_H]: Include stdint.h.
5717 (trace_debug_1): Rename to ...
5718 (trace_vdebug): ... this.
5719 (trace_debug): Rename to ...
5720 (trace_debug_1): ... this. Add `level' parameter.
5722 (ATTR_USED, ATTR_NOINLINE): New.
5723 (IP_AGENT_EXPORT): New.
5724 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5725 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5726 (about_to_request_buffer_space, trace_buffer_is_full)
5727 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5728 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5729 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5730 (traceframe_write_count, traceframes_created)
5731 (trace_state_variables)
5732 New renaming defines.
5733 (struct ipa_sym_addresses): New.
5734 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5736 (ipa_sym_addrs): New.
5737 (all_tracepoint_symbols_looked_up): New.
5738 (in_process_agent_loaded): New.
5739 (write_e_ipa_not_loaded): New.
5740 (maybe_write_ipa_not_loaded): New.
5741 (tracepoint_look_up_symbols): New.
5742 (debug_threads) [IN_PROCESS_AGENT]: New.
5743 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5744 (UNKNOWN_SIDE_EFFECTS): New.
5745 (stop_tracing): New.
5746 (flush_trace_buffer): New.
5747 (stop_tracing_bkpt): New.
5748 (flush_trace_buffer_bkpt): New.
5749 (read_inferior_integer): New.
5750 (read_inferior_uinteger): New.
5751 (read_inferior_data_pointer): New.
5752 (write_inferior_data_pointer): New.
5753 (write_inferior_integer): New.
5754 (write_inferior_uinteger): New.
5755 (struct collect_static_trace_data_action): Delete.
5756 (enum tracepoint_type): New.
5757 (struct tracepoint) <type>: New field `type'.
5758 <actions_str, step_actions, step_actions_str>: Only include in
5760 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5761 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5762 (tracepoints): Use IP_AGENT_EXPORT.
5763 (last_tracepoint): Don't include in the IPA.
5764 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5765 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5766 (alloced_trace_state_variables): New.
5767 (trace_state_variables): Use IP_AGENT_EXPORT.
5768 (traceframe_t): Delete unused variable.
5769 (circular_trace_buffer): Don't include in the IPA.
5770 (trace_buffer_start): Delete.
5771 (struct trace_buffer_control): New.
5772 (trace_buffer_free): Delete.
5773 (struct ipa_trace_buffer_control): New.
5774 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5775 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5777 (trace_buffer_ctrl): New.
5778 (TRACE_BUFFER_CTRL_CURR): New.
5779 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5780 Reimplement as macros.
5781 (trace_buffer_wrap): Delete.
5782 (traceframe_write_count, traceframe_read_count)
5783 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5784 (struct tracepoint_hit_ctx) <type>: New field.
5785 (struct fast_tracepoint_ctx): New.
5786 (memory_barrier): New.
5788 (record_tracepoint_error): Update atomically in the IPA.
5789 (clear_inferior_trace_buffer): New.
5790 (about_to_request_buffer_space): New.
5791 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5792 updating the same buffer.
5793 (add_tracepoint): Default the tracepoint's type to trap
5794 tracepoint, and orig_size to -1.
5795 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5797 (create_trace_state_variable): New parameter `gdb'. Handle it.
5798 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5799 (cmd_qtdp): Handle fast tracepoints.
5801 (max_jump_pad_size): New.
5802 (gdb_jump_pad_head): New.
5803 (get_jump_space_head): New.
5804 (claim_jump_space): New.
5805 (sort_tracepoints): New.
5806 (MAX_JUMP_SIZE): New.
5807 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5809 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5810 support. Upload fast traceframes, and delete internal IPA
5812 (stop_tracing_handler): New.
5813 (flush_trace_buffer_handler): New.
5814 (cmd_qtstop): Upload fast tracepoints.
5815 (response_tracepoint): Handle fast tracepoints.
5816 (tracepoint_finished_step): Upload fast traceframes. Set the
5817 tracepoint hit context's tracepoint type.
5818 (handle_tracepoint_bkpts): New.
5819 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5820 type. Add comment about fast tracepoints.
5821 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5822 non-existing action_str field.
5823 (get_context_regcache): Handle fast tracepoints.
5824 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5826 (fast_tracepoint_from_jump_pad_address): New.
5827 (fast_tracepoint_from_ipa_tpoint_address): New.
5828 (collecting_t): New.
5829 (force_unlock_trace_buffer): New.
5830 (fast_tracepoint_collecting): New.
5833 (write_inferior_data_ptr): New.
5834 (target_tp_heap): New.
5835 (target_malloc): New.
5836 (download_agent_expr): New.
5838 (download_tracepoints): New.
5839 (download_trace_state_variables): New.
5840 (upload_fast_traceframes): New.
5841 (IPA_FIRST_TRACEFRAME): New.
5842 (IPA_NEXT_TRACEFRAME_1): New.
5843 (IPA_NEXT_TRACEFRAME): New.
5844 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5845 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5846 (gdb_jump_pad_buffer_end): New.
5847 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5848 (initialize_tracepoint): Adjust.
5849 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5850 buffer. Initialize the low module.
5851 * utils.c (PREFIX, TOOLNAME): New.
5852 (malloc_failure): Use PREFIX.
5853 (error): In the IPA, an error causes an exit.
5854 (fatal, warning): Use PREFIX.
5855 (internal_error): Use TOOLNAME.
5856 (NUMCELLS): Increase to 10.
5857 * configure, config.in: Regenerate.
5859 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5861 * server.c (handle_query) <qSupported>: Do two passes over the
5862 qSupported string to avoid nesting strtok.
5864 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5866 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5868 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5870 * configure: Regenerate.
5871 * proc-service.list: New.
5873 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5875 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5878 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5880 * gdbreplay.c (remote_open): Check error return from socket() call by
5881 its equality to -1 not by it being negative.
5882 * remote-utils.c (remote_open): Likewise.
5884 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5886 * config.h: Regenerate.
5888 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5890 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5891 doesn't provide PTRACE_GET_THREAD_AREA.
5893 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5895 * linux-m68k-low.c: Include <asm/ptrace.h>
5896 (ps_get_thread_area): Implement.
5898 2010-05-03 Doug Evans <dje@google.com>
5900 * event-loop.c (struct callback_event): New struct.
5901 (callback_list): New global.
5902 (append_callback_event, delete_callback_event): New functions.
5903 (process_callback): New function.
5904 (start_event_loop): Call it.
5905 * remote-utils.c (NOT_SCHEDULED): Define.
5906 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5907 moved out of readchar.
5908 (readchar): Rewrite. Call reschedule before returning.
5909 (reset_readchar): New function.
5910 (remote_close): Call it.
5911 (process_remaining, reschedule): New functions.
5912 * server.h (callback_handler_func): New typedef.
5913 (append_callback_event, delete_callback_event): Declare.
5915 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5917 * proc-service.c (ps_pglobal_lookup): Use
5918 thread_db_look_up_one_symbol.
5919 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5920 parameter. Use it instead of all_symbols_looked_up.
5921 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5923 (all_symbols_looked_up): Don't declare.
5924 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5925 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5927 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5928 Set all_symbols_looked_up here.
5929 (thread_db_look_up_one_symbol): New.
5930 (thread_db_get_tls_address): Adjust.
5931 (thread_db_load_search, try_thread_db_load_1): Always allocate the
5932 thread_db object on the heap, and tentatively set it in the
5934 (thread_db_init): Don't set all_symbols_looked_up here.
5935 * linux-low.h (thread_db_look_up_one_symbol): Declare.
5937 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5939 * linux-low.c (linux_kill, linux_detach): Adjust.
5940 (status_pending_p_callback): Remove redundant statement. Check
5941 for !TARGET_WAITIKIND_IGNORE, instead of
5942 TARGET_WAITKIND_STOPPED.
5943 (handle_tracepoints): Make sure LWP is locked. Adjust.
5944 (linux_wait_for_event_1): Adjust.
5945 (linux_cancel_breakpoints): New.
5946 (unsuspend_one_lwp): New.
5947 (unsuspend_all_lwps): New.
5948 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5949 (send_sigstop_callback): Change return type to int, add new
5950 `except' parameter and handle it.
5951 (suspend_and_send_sigstop_callback): New.
5952 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5953 pass them down. If SUSPEND, also increment the lwp's suspend
5955 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5956 (need_step_over_p): Don't consider suspended LWPs.
5957 (start_step_over): Adjust.
5958 (proceed_one_lwp): Change return type to int, add new `except'
5959 parameter and handle it.
5960 (unsuspend_and_proceed_one_lwp): New.
5961 (proceed_all_lwps): Use find_inferior instead of
5963 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
5964 also decrement the suspend count of LWPs. Pass `except' down,
5965 instead of hacking its suspend count.
5966 (linux_pause_all): Add `freeze' parameter. Adjust.
5967 (linux_unpause_all): New.
5968 (linux_target_ops): Install linux_unpause_all.
5969 * server.c (handle_status): Adjust.
5970 * target.h (struct target_ops): New fields `unpause_all' and
5971 `cancel_breakpoints'. Add new parameter to `pause_all'.
5972 (pause_all): Add new `freeze' parameter.
5974 (cancel_breakpoints): New.
5975 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
5977 (cmd_qtstart): Pause threads.
5978 (stop_tracing): Pause threads, and cancel breakpoints.
5979 * win32-low.c (win32_target_ops): Adjust.
5981 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5983 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
5984 the inferior right away from here...
5985 (linux_wait_1): ... to here, and adjust to check the thread's
5986 last_resume_kind instead of the lwp's step or stop_expected flags.
5988 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5990 * README: Use consistent `GDB' and `GDBserver' spellings.
5992 2010-05-02 Pedro Alves <pedro@codesourcery.com>
5994 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
5995 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
5996 (linux_detach_one_lwp): Assume the lwp is stopped.
5997 (any_thread_of): Delete.
5998 (linux_detach): Stop all lwps here. Don't blindly delete all
6000 (delete_lwp_callback): New.
6001 (linux_mourn): Delete all lwps of the process that is gone.
6002 (linux_wait_1): Don't delete the last lwp of the process here.
6003 * mem-break.h (mark_breakpoints_out): Declare.
6004 * mem-break.c (mark_breakpoints_out): New.
6005 (free_all_breakpoints): Use it.
6006 * server.c (handle_target_event): If the process is gone, mark
6008 * thread-db.c (struct thread_db) <create_bp>: New field.
6009 (thread_db_enable_reporting): Fix prototype. Store a thread event
6010 breakpoint reference in the thread_db struct.
6011 (thread_db_load_search): Clear the thread_db object.
6012 (try_thread_db_load_1): Ditto.
6013 (switch_to_process): New.
6014 (disable_thread_event_reporting): Use it.
6015 (remove_thread_event_breakpoints): New.
6016 (thread_db_detach, thread_db_mourn): Use it.
6018 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6020 * linux-low.c (linux_enable_event_reporting): New.
6021 (linux_wait_for_event_1, handle_extended_wait): Use it.
6023 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6025 * linux-low.c (linux_kill_one_lwp, linux_kill)
6026 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6027 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6028 SIGSTOP even if the LWP is stopped.
6029 (send_sigstop_callback): New.
6030 (stop_all_lwps): Use send_sigstop_callback instead.
6031 (linux_resume_one_thread): Adjust.
6032 (proceed_one_lwp): Still proceed an LWP that the client has
6033 requested to stop, if we haven't reported it as stopped yet. Make
6034 sure that LWPs the client want stopped, have a pending SIGSTOP.
6036 2010-04-26 Doug Evans <dje@google.com>
6038 * server.c (handle_general_set): Make static.
6040 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6041 Print received char after testing for error/eof instead of before.
6042 (input_interrupt): Tweak comment.
6044 2010-04-23 Doug Evans <dje@google.com>
6046 * server.c (start_inferior): Print inferior argv if --debug.
6048 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6050 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6051 * nto-x86-low.c: Include server.h
6053 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6055 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6056 be consistent with other sources of this directory.
6057 (init_registers_amd64): Correct name of source file of this function
6060 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6062 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6065 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6067 * win32-i386-low.c: Add 64-bit support.
6068 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6069 (init_registers_amd64): Declare.
6070 (mappings): Add 64-bit version of array.
6071 (init_windows_x86): New function.
6072 (the_low_target): Change init_arch field to init_windows_x86.
6074 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6076 * win32-low.c: Adapt to support also 64-bit architecture.
6077 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6078 (get_image_name): Use SIZE_T type for local variable `done'.
6079 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6080 (toolhelp_get_dll_name): Idem.
6081 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6082 Use uintptr_t typecast to avoid warning.
6083 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6084 (handle_exception): Use phex_nz to avoid warning.
6085 (win32_wait): Remove unused local variable `process'.
6087 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6089 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6092 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6094 * configure.ac: Use `ws2_32' library for srv_mingw.
6095 * configure: Regenerate.
6096 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6097 * remote-utils.c: Likewise.
6099 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6101 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6102 if __x86_64__ is defined.
6104 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6106 * configure: Regenerate.
6108 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6110 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6111 * target.h (target_ops): New get_tib_address field.
6112 * win32-low.h (win32_thread_info): Add thread_local_base field.
6113 * win32-low.c (child_add_thread): Add tlb argument.
6114 Set thread_local_base field to TLB.
6115 (get_child_debug_event): Adapt to child_add_thread change.
6116 (win32_get_tib_address): New function.
6117 (win32_target_ops): Set get_tib_address field to
6118 win32_get_tib_address.
6119 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6121 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6123 * linux-low.c (linux_mourn): Also remove the process.
6124 * server.c (handle_target_event): Don't remove the process here.
6125 * nto-low.c (nto_mourn): New.
6126 (nto_target_ops): Install it.
6127 * spu-low.c (spu_mourn): New.
6128 (spu_target_ops): Install it.
6129 * win32-low.c (win32_mourn): New.
6130 (win32_target_ops): Install it.
6132 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6134 * server.h (buffer_xml_printf): Remove redundant `;'.
6136 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6138 * regcache.c (set_register_cache): Invalidate regcaches before
6139 changing the register cache layout.
6140 (regcache_invalidate_one): Allow a NULL regcache.
6141 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6142 regcaches before changing the register cache layout or the target
6145 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6147 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6148 variable warning on Linux/x86-64.
6150 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6152 GDBserver disconnected tracing support.
6154 * linux-low.c (linux_remove_process): Delete.
6155 (add_lwp): Don't set last_resume_kind here.
6156 (linux_kill): Use `mourn'.
6157 (linux_detach): Use `thread_db_detach', and `mourn'.
6159 (linux_attach_lwp_1): Adjust comment.
6160 (linux_attach): last_resume_kind moved the thread_info; adjust.
6161 (status_pending_p_callback): Adjust.
6162 (linux_wait_for_event_1): Adjust.
6163 (count_events_callback, select_singlestep_lwp_callback)
6164 (select_event_lwp_callback, cancel_breakpoints_callback)
6165 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6166 (proceed_one_lwp): Adjust.
6167 (linux_async): Add debug output.
6168 (linux_thread_stopped): New.
6169 (linux_pause_all): New.
6170 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6172 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6173 (thread_db_free): Delete declaration.
6174 (thread_db_detach, thread_db_mourn): Declare.
6175 * thread-db.c (thread_db_init): Use thread_db_mourn.
6176 (thread_db_free): Delete, split in two.
6177 (disable_thread_event_reporting): New.
6178 (thread_db_detach): New.
6179 (thread_db_mourn): New.
6181 * server.h (struct thread_info) <last_resume_kind>: New field.
6182 <attached>: Add comment.
6183 <gdb_detached>: New field.
6184 (handler_func): Change return type to int.
6185 (handle_serial_event, handle_target_event): Ditto.
6186 (gdb_connected): Declare.
6188 (disconnected_tracing): Declare.
6189 (stop_tracing): Declare.
6191 * server.c (handle_query) <qSupported>: Report support for
6192 disconnected tracing.
6193 (queue_stop_reply_callback): Account for running threads.
6194 (gdb_wants_thread_stopped): New.
6195 (gdb_wants_all_threads_stopped): New.
6196 (gdb_reattached_process): New.
6197 (handle_status): Clear the `gdb_detached' flag of all processes.
6198 In all-stop, stop all threads.
6199 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6200 (process_serial_event): If the remote connection breaks, or if an
6201 exit was forced with "monitor exit", force an event loop exit.
6202 Handle disconnected tracing on detach.
6203 (handle_serial_event): Adjust.
6204 (handle_target_event): If GDB isn't connected, forward events back
6205 to the inferior, unless the last process exited, in which case,
6206 exit gdbserver. Adjust interface.
6208 * remote-utils.c (remote_open): Don't block in accept. Instead
6209 register an event loop source on the listen socket file
6210 descriptor. Refactor bits into ...
6211 (listen_desc): ... this new global.
6212 (gdb_connected): ... this new function.
6213 (enable_async_notification): ... this new function.
6214 (handle_accept_event): ... this new function.
6215 (remote_close): Clear remote_desc.
6217 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6219 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6221 (mourn_inferior): Define.
6222 (target_process_qsupported): Avoid the dangling else problem.
6223 (thread_stopped): Define.
6224 (pause_all): Define.
6225 (target_waitstatus_to_string): Declare.
6226 * target.c (target_waitstatus_to_string): New.
6228 * tracepoint.c (tracing): Make extern.
6229 (disconnected_tracing): New.
6230 (stop_tracing): Make extern. Handle tracing stops due to GDB
6232 (cmd_qtdisconnected): New.
6233 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6234 (handle_tracepoint_general_set): Handle QTDisconnected.
6236 * event-loop.c (event_handler_func): Change return type to int.
6237 (process_event): Bail out if the event handler wants the event
6239 (handle_file_event): Ditto.
6240 (start_event_loop): Bail out if the event handler wants the event
6243 * nto-low.c (nto_target_ops): Adjust.
6244 * spu-low.c (spu_wait): Don't remove the process here.
6245 (spu_target_ops): Adjust.
6246 * win32-low.c (win32_wait): Don't remove the process here.
6247 (win32_target_ops): Adjust.
6249 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6251 * regcache.c (realloc_register_cache): Invalidate inferior's
6252 regcache before recreating it.
6254 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6256 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6258 2010-04-09 Stan Shebs <stan@codesourcery.com>
6259 Pedro Alves <pedro@codesourcery.com>
6261 * server.h (LONGEST): New.
6262 (struct thread_info) <while_stepping>: New field.
6263 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6265 (initialize_tracepoint, handle_tracepoint_general_set)
6266 (handle_tracepoint_query, tracepoint_finished_step)
6267 (tracepoint_was_hit, release_while_stepping_state_list):
6268 (current_traceframe): Declare.
6269 * server.c (handle_general_set): Handle tracepoint packets.
6271 (write_memory): New.
6272 (handle_search_memory_1): Use read_memory.
6273 (handle_query): Report support for conditional tracepoints, trace
6274 state variables, and tracepoint sources. Handle tracepoint
6276 (main): Initialize the tracepoints module.
6277 (process_serial_event): Handle traceframe reads/writes.
6279 * linux-low.c (handle_tracepoints): New.
6280 (linux_wait_1): Call it.
6281 (linux_resume_one_lwp): Handle while-stepping.
6282 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6283 (linux_target_ops): Install them.
6284 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6286 * linux-x86-low.c (x86_supports_tracepoints): New.
6287 (the_low_target). Install it.
6289 * mem-break.h (delete_breakpoint): Declare.
6290 * mem-break.c (delete_breakpoint): Make external.
6292 * target.h (struct target_ops): Add `supports_tracepoints',
6293 `read_pc', and `write_pc' fields.
6294 (target_supports_tracepoints): Define.
6295 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6298 * regcache.h (struct regcache) <registers_owned>: New field.
6299 (init_register_cache, regcache_cpy): Declare.
6300 (regcache_read_pc, regcache_write_pc): Declare.
6301 (register_cache_size): Declare.
6302 (supply_regblock): Declare.
6303 * regcache.c (init_register_cache): New.
6304 (new_register_cache): Use it.
6305 (regcache_cpy): New.
6306 (register_cache_size): New.
6307 (supply_regblock): New.
6308 (regcache_read_pc, regcache_write_pc): New.
6310 * tracepoint.c: New.
6312 * Makefile.in (OBS): Add tracepoint.o.
6313 (tracepoint.o): New rule.
6315 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6317 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6319 (i386-mmx.c): Likewise.
6320 (i386-mmx-linux.o): Likewise.
6321 (i386-mmx-linux.c): Likewise.
6323 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6324 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6325 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6326 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6328 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6329 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6330 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6332 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6334 * Makefile.in (clean): Updated.
6336 (i386-avx.c): Likewise.
6337 (i386-avx-linux.o): Likewise.
6338 (i386-avx-linux.c): Likewise.
6339 (amd64-avx.o): Likewise.
6340 (amd64-avx.c): Likewise.
6341 (amd64-avx-linux.o): Likewise.
6342 (amd64-avx-linux.c): Likewise.
6344 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6345 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6346 (srv_amd64_regobj): Add amd64-avx.o.
6347 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6348 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6349 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6350 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6351 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6352 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6353 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6355 * i387-fp.c: Include "i386-xstate.h".
6357 (i387_cache_to_xsave): Likewise.
6358 (i387_xsave_to_cache): Likewise.
6359 (x86_xcr0): Likewise.
6361 * i387-fp.h (i387_cache_to_xsave): Likewise.
6362 (i387_xsave_to_cache): Likewise.
6363 (x86_xcr0): Likewise.
6365 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6366 * linux-crisv32-low.c (target_regsets): Likewise.
6367 * linux-m68k-low.c (target_regsets): Likewise.
6368 * linux-mips-low.c (target_regsets): Likewise.
6369 * linux-ppc-low.c (target_regsets): Likewise.
6370 * linux-s390-low.c (target_regsets): Likewise.
6371 * linux-sh-low.c (target_regsets): Likewise.
6372 * linux-sparc-low.c (target_regsets): Likewise.
6373 * linux-xtensa-low.c (target_regsets): Likewise.
6375 * linux-low.c: Include <sys/uio.h>.
6376 (regsets_fetch_inferior_registers): Support nt_type.
6377 (regsets_store_inferior_registers): Likewise.
6378 (linux_process_qsupported): New.
6379 (linux_target_ops): Add linux_process_qsupported.
6381 * linux-low.h (regset_info): Add nt_type.
6382 (linux_target_ops): Add process_qsupported.
6384 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6386 (init_registers_i386_avx_linux): New.
6387 (init_registers_amd64_avx_linux): Likewise.
6388 (xmltarget_i386_linux_no_xml): Likewise.
6389 (xmltarget_amd64_linux_no_xml): Likewise.
6390 (PTRACE_GETREGSET): Likewise.
6391 (PTRACE_SETREGSET): Likewise.
6392 (x86_fill_xstateregset): Likewise.
6393 (x86_store_xstateregset): Likewise.
6394 (use_xml): Likewise.
6395 (x86_linux_update_xmltarget): Likewise.
6396 (x86_linux_process_qsupported): Likewise.
6397 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6398 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6399 init_registers_i386_linux here. Call
6400 x86_linux_update_xmltarget.
6401 (the_low_target): Add x86_linux_process_qsupported.
6403 * server.c (handle_query): Call target_process_qsupported.
6405 * target.h (target_ops): Add process_qsupported.
6406 (target_process_qsupported): New.
6408 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6410 * inferiors.c (add_thread): Set last_status kind to
6411 TARGET_WAITKIND_IGNORE.
6412 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6413 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6414 (linux_wait_1): Move `thread' local definition to block that uses
6415 it. Don't NULL initialize `event_child'.
6416 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6417 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6418 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6420 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6422 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6423 an extended waitstatus, or by a watchpoint.
6424 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6425 thread was stepping or has been stopped by a watchpoint.
6427 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6429 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6430 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6431 of another, then delete the previous, and validate all
6433 (validate_inserted_breakpoint): New.
6434 (delete_disabled_breakpoints): New.
6435 (validate_breakpoints): New.
6436 (check_mem_read): Validate breakpoints before trusting their
6437 shadow. Delete disabled breakpoints.
6438 (check_mem_write): Validate breakpoints before trusting they
6439 should be inserted. Delete disabled breakpoints.
6440 * mem-break.h (validate_breakpoints):
6441 * server.c (handle_query): Validate breakpoints when we see a
6444 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6446 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6447 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6448 if we could tell there's a GDB breakpoint at stop_pc.
6449 (need_step_over_p): Don't do a step over if we find a GDB
6450 breakpoint at the resume PC.
6452 * mem-break.c (struct raw_breakpoint): New.
6453 (enum bkpt_type): New type `gdb_breakpoint'.
6454 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6455 fields. New field `raw'.
6456 (find_raw_breakpoint_at): New.
6457 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6459 (set_breakpoint_at): Adjust.
6460 (delete_raw_breakpoint): New.
6461 (release_breakpoint): New.
6462 (delete_breakpoint): Rename to...
6463 (delete_breakpoint_1): ... this. Add proc parameter. Use
6464 release_breakpoint. Return ENOENT.
6465 (delete_breakpoint): Reimplement.
6466 (find_breakpoint_at): Delete.
6467 (find_gdb_breakpoint_at): New.
6468 (delete_breakpoint_at): Delete.
6469 (set_gdb_breakpoint_at): New.
6470 (delete_gdb_breakpoint_at): New.
6471 (gdb_breakpoint_here): New.
6472 (set_reinsert_breakpoint): Use release_breakpoint.
6473 (uninsert_breakpoint): Rename to ...
6474 (uninsert_raw_breakpoint): ... this.
6475 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6476 (reinsert_raw_breakpoint): Change parameter type to
6478 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6480 (check_breakpoints): Adjust. Use release_breakpoint.
6481 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6482 (breakpoint_inserted_here): Ditto.
6483 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6484 Don't trust the breakpoint's shadow if it is not inserted.
6485 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6486 (delete_all_breakpoints): Adjust.
6487 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6488 use delete_breakpoint_1.
6490 * mem-break.h (breakpoints_supported): Delete declaration.
6491 (set_gdb_breakpoint_at): Declare.
6492 (gdb_breakpoint_here): Declare.
6493 (delete_breakpoint_at): Delete.
6494 (delete_gdb_breakpoint_at): Declare.
6496 * server.h (struct raw_breakpoint): Forward declare.
6497 (struct process_info): New field `raw_breakpoints'.
6499 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6502 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6504 * linux-low.c (status_pending_p_callback): Fix comment.
6505 (linux_wait_for_event_1): Move most of the internal breakpoint
6506 handling from here...
6507 (linux_wait_1): ... to here.
6508 (count_events_callback): New.
6509 (select_singlestep_lwp_callback): New.
6510 (select_event_lwp_callback): New.
6511 (cancel_breakpoints_callback): New.
6512 (select_event_lwp): New.
6513 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6514 priority to all LWPs that have had events that should be reported
6515 to the client. Cancel breakpoints when about to reporting the
6516 event to the client, not while stopping lwps. No longer cancel
6517 finished single-steps here.
6518 (cancel_finished_single_step): Delete.
6519 (cancel_finished_single_steps): Delete.
6521 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6523 * mem-break.c (enum bkpt_type): New.
6524 (struct breakpoint): New field `type'.
6525 (set_breakpoint_at): Change return type to struct breakpoint
6526 pointer. Set type to `other_breakpoint' by default.
6527 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6528 in the breakpoint list.
6529 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6530 (reinsert_breakpoint): Rename to ...
6531 (reinsert_raw_breakpoint): ... this.
6532 (reinsert_breakpoints_at): Adjust.
6533 * mem-break.h (struct breakpoint): Declare.
6534 (set_breakpoint_at): Change return type to struct breakpoint
6537 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6539 * server.c (handle_query): Assign, not compare.
6541 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6543 Teach linux gdbserver to step-over-breakpoints.
6545 * linux-low.c (can_hardware_single_step): New.
6546 (supports_breakpoints): New.
6547 (handle_extended_wait): If stopping threads, read the stop pc of
6550 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6551 low target doesn't support retrieving the PC.
6552 (add_lwp): Set last_resume_kind to resume_continue.
6553 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6554 (linux_attach): Don't clear stop_expected. Set the lwp's
6555 last_resume_kind to resume_stop.
6556 (linux_detach_one_lwp): Don't check for removed breakpoints.
6557 (check_removed_breakpoint): Delete.
6558 (status_pending_p): Rename to ...
6559 (status_pending_p_callback): ... this. Don't check for removed
6560 breakpoints. Don't consider threads that are stopped from GDB's
6562 (linux_wait_for_lwp): Always read the stop_pc here.
6563 (cancel_breakpoint): New.
6564 (step_over_bkpt): New global.
6565 (linux_wait_for_event_1): Implement stepping over breakpoints.
6566 (gdb_wants_lwp_stopped): New.
6567 (gdb_wants_all_stopped): New.
6568 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6569 single-step traps here. Store the thread's last reported target
6571 (send_sigstop): Don't clear stop_expected. Always set it,
6573 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6574 (cancel_finished_single_step): New.
6575 (cancel_finished_single_steps): New.
6576 (wait_for_sigstop): Don't cancel finished single-step traps here.
6577 (linux_resume_one_lwp): Don't check for removed breakpoints.
6578 Don't set `step' on non-hardware step archs.
6579 (linux_set_resume_request): Ignore resume_stop requests if already
6580 stopping or stopped. Set the lwp's last_resume_kind.
6581 (resume_status_pending_p): Don't check for removed breakpoints.
6582 (need_step_over_p): New.
6583 (start_step_over): New.
6584 (finish_step_over): New.
6585 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6586 requests. Clear the thread's last reported target waitstatus.
6587 Don't use the `suspended' flag. Don't consider pending breakpoints.
6588 (linux_resume): Start a step-over if necessary.
6589 (proceed_one_lwp): New.
6590 (proceed_all_lwps): New.
6591 (unstop_all_lwps): New.
6592 * linux-low.h (struct lwp_info): Rewrite comment for the
6593 `suspended' flag. Add the `stop_pc' field. Delete the
6594 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6595 Add `'last_resume_kind' and `need_step_over' fields.
6596 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6597 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6598 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6599 (set_raw_breakpoint_at): New.
6600 (set_breakpoint_at): Rewrite to use it.
6601 (reinsert_breakpoint_handler): Delete.
6602 (set_reinsert_breakpoint): New.
6603 (reinsert_breakpoint_by_bp): Delete.
6604 (delete_reinsert_breakpoints): New.
6605 (uninsert_breakpoint): Rewrite.
6606 (uninsert_breakpoints_at): New.
6607 (reinsert_breakpoint): Rewrite.
6608 (reinsert_breakpoints_at): New.
6609 (check_breakpoints): Rewrite.
6610 (breakpoint_here): New.
6611 (breakpoint_inserted_here): New.
6612 (check_mem_read): Adjust.
6613 * mem-break.h (breakpoints_supported, breakpoint_here)
6614 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6615 (reinsert_breakpoint_by_bp): Delete declaration.
6616 (delete_reinsert_breakpoints): Declare.
6617 (reinsert_breakpoint): Delete declaration.
6618 (reinsert_breakpoints_at): Declare.
6619 (uninsert_breakpoint): Delete declaration.
6620 (uninsert_breakpoints_at): Declare.
6621 (check_breakpoints): Adjust prototype.
6622 * server.h: Adjust include order.
6623 (struct thread_info): Declare here. Add a `last_status' field.
6625 2010-03-23 Michael Snyder <msnyder@vmware.com>
6627 * server.c (crc32): New function.
6628 (handle_query): Add handling for 'qCRC:' request.
6630 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6632 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6633 lwp had been stopped by a watchpoint.
6635 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6637 * server.h (internal_error): Declare.
6638 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6639 * utils.c (internal_error): New function.
6641 2010-03-15 Andreas Schwab <schwab@redhat.com>
6643 * configure.srv: Fix typo setting srv_regobj.
6645 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6647 * linux-low.c (fetch_register): Avoid passing a non string literal
6649 (usr_store_inferior_registers): Ditto.
6651 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6653 * linux-low.c (linux_write_memory): Bail out early if peeking
6656 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6658 * linux-low.h (struct lwp_info): New fields
6659 `stopped_by_watchpoint' and `stopped_data_address'.
6660 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6661 here, and cache them in the lwp object.
6662 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6664 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6666 (linux_stopped_by_watchpoint): Rewrite.
6667 (linux_stopped_data_address): Rewrite.
6669 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6671 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6672 switching the current inferior, not before.
6674 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6676 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6677 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6678 i386-linux.c and amd64-linux.c.
6679 (reg-i386.o): Removed.
6680 (reg-i386.c): Likewise.
6681 (reg-i386-linux.o): Likewise.
6682 (reg-i386-linux.c): Likewise.
6683 (reg-x86-64.o): Likewise.
6684 (reg-x86-64.c): Likewise.
6685 (reg-x86-64-linux.o): Likewise.
6686 (reg-x86-64-linux.c): Likewise.
6689 (i386-linux.o): Likewise.
6690 (i386-linux.c): Likewise.
6691 (amd64.o): Likewise.
6692 (amd64.c): Likewise.
6693 (amd64-linux.o): Likewise.
6694 (amd64-linux.c): Likewise.
6696 * configure.srv (srv_i386_regobj): New.
6697 (srv_i386_linux_regobj): Likewise.
6698 (srv_amd64_regobj): Likewise.
6699 (srv_amd64_linux_regobj): Likewise.
6700 (srv_i386_32bit_xmlfiles): Likewise.
6701 (srv_i386_64bit_xmlfiles): Likewise.
6702 (srv_i386_xmlfiles): Likewise.
6703 (srv_amd64_xmlfiles): Likewise.
6704 (srv_i386_linux_xmlfiles): Likewise.
6705 (srv_amd64_linux_xmlfiles): Likewise.
6706 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6707 srv_xmlfiles to $srv_i386_xmlfiles.
6708 (i[34567]86-*-mingw32ce*): Likewise.
6709 (i[34567]86-*-mingw*): Likewise.
6710 (i[34567]86-*-nto*): Likewise.
6711 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6712 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6713 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6714 (x86_64-*-linux*): Likewise.
6716 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6717 (init_registers_amd64_linux): New.
6718 (x86_arch_setup): Replace init_registers_x86_64_linux with
6719 init_registers_amd64_linux.
6721 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6723 * configure.ac: Check for libdl. If it is not available link against
6724 static libthread_db.
6725 * configure: Regenerate.
6727 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6731 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6732 handing a read watchpoint.
6733 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6735 2010-02-12 Doug Evans <dje@google.com>
6737 * linux-low.c (linux_supports_tracefork_flag): Document.
6738 (linux_look_up_symbols): Add comment.
6740 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6742 * regcache.c (supply_register): Clear regcache if buf is NULL.
6744 2010-02-02 Nicolas Roche <roche@sourceware.org>
6745 Joel Brobecker <brobecker@adacore.com>
6747 * inferiors.c (find_inferior): Add function documentation.
6748 (unloaded_dll): Handle the case where the unloaded dll has not
6749 been previously registered in the dll list.
6751 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6753 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6754 (thumb2_breakpoint): New.
6755 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6757 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6759 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6760 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6763 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6765 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6767 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6769 * linux-s390-low.c (s390_collect_ptrace_register)
6770 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6772 2010-01-21 Doug Evans <dje@google.com>
6774 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6775 (PTRACE_ARG4_TYPE): New macro.
6776 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6777 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6778 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6779 (usr_store_inferior_registers): Ditto.
6780 (linux_read_memory, linux_write_memory): Ditto.
6781 (linux_test_for_tracefork): Ditto.
6783 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6784 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6786 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6788 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6791 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6793 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6794 prototype to take a regcache. Adjust.
6796 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6798 * regcache.h (struct thread_info): Forward declare.
6799 (struct regcache): New.
6800 (new_register_cache): Adjust prototype.
6801 (get_thread_regcache): Declare.
6802 (free_register_cache): Adjust prototype.
6803 (registers_to_string, registers_from_string): Ditto.
6804 (supply_register, supply_register_by_name, collect_register)
6805 (collect_register_as_string, collect_register_by_name): Ditto.
6806 * regcache.c (struct inferior_regcache_data): Delete.
6807 (get_regcache): Rename to ...
6808 (get_thread_regcache): ... this. Adjust. Switch inferior before
6810 (regcache_invalidate_one): Adjust.
6811 (regcache_invalidate): Fix prototype.
6812 (new_register_cache): Return the new register cache.
6813 (free_register_cache): Change prototype.
6814 (realloc_register_cache): Adjust.
6815 (registers_to_string): Change prototype to take a regcache. Adjust.
6816 (registers_from_string): Ditto.
6817 (register_data): Ditto.
6818 (supply_register): Ditto.
6819 (supply_register_by_name): Ditto.
6820 (collect_register): Ditto.
6821 (collect_register_as_string): Ditto.
6822 (collect_register_by_name): Ditto.
6823 * server.c (process_serial_event): Adjust.
6824 * linux-low.h (regset_fill_func, regset_store_func): Change
6826 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6828 * linux-low.c (get_stop_pc): Adjust.
6829 (check_removed_breakpoint): Adjust.
6830 (linux_wait_for_event): Adjust.
6831 (linux_resume_one_lwp): Adjust.
6832 (fetch_register): Add regcache parameter. Adjust.
6833 (usr_store_inferior_registers): Ditto.
6834 (regsets_fetch_inferior_registers): Ditto.
6835 (regsets_store_inferior_registers): Ditto.
6836 (linux_fetch_registers, linux_store_registers): Ditto.
6837 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6839 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6841 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6842 prototype to take a regcache.
6843 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6844 * remote-utils.c (convert_ascii_to_int, outreg)
6845 (prepare_resume_reply): Change prototype to take a regcache.
6847 * target.h (struct target_ops) <fetch_registers, store_registers>:
6848 Change prototype to take a regcache.
6849 (fetch_inferior_registers, store_inferior_registers): Change
6850 prototype to take a regcache. Adjust.
6851 * proc-service.c (ps_lgetregs): Adjust.
6852 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6853 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6854 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6855 take a regcache. Adjust.
6856 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6857 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6858 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6859 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6860 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6861 (cris_cannot_fetch_register):
6862 (cris_breakpoint_at): Change prototype to take a regcache.
6864 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6865 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6866 to take a regcache. Adjust.
6867 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6869 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6870 take a regcache. Adjust.
6871 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6872 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6873 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6874 * linux-mips-low.c (mips_get_pc):
6875 (mips_set_pc): Change prototype to take a regcache. Adjust.
6876 (mips_reinsert_addr): Adjust.
6877 (mips_collect_register): Change prototype to take a regcache.
6879 (mips_supply_register):
6880 (mips_collect_register_32bit, mips_supply_register_32bit)
6881 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6882 (mips_store_fpregset): Ditto.
6883 * linux-ppc-low.c (ppc_supply_ptrace_register)
6884 (ppc_supply_ptrace_register): Ditto.
6885 (parse_spufs_run): Adjust.
6886 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6887 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6888 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6889 take a regcache. Adjust.
6890 * linux-s390-low.c (s390_collect_ptrace_register)
6891 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6892 (s390_set_pc): Change prototype to take a regcache. Adjust.
6893 (s390_arch_setup): Adjust.
6894 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6895 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6896 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6897 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6898 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6900 (sparc_breakpoint_at): Adjust.
6901 * linux-xtensa-low.c (xtensa_fill_gregset):
6902 (xtensa_store_gregset):
6903 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6904 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6905 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6906 prototype to take a regcache. Adjust.
6907 * win32-arm-low.c (arm_fetch_inferior_register)
6908 (arm_store_inferior_register): Change prototype to take a
6910 * win32-i386-low.c (i386_fetch_inferior_register)
6911 (i386_store_inferior_register): Change prototype to take a
6913 * win32-low.c (child_fetch_inferior_registers)
6914 (child_store_inferior_registers): Change prototype to take a
6916 (win32_wait): Adjust.
6917 (win32_fetch_inferior_registers): Change prototype to take a
6919 (win32_store_inferior_registers): Adjust.
6920 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6921 store_inferior_register>: Change prototype to take a regcache.
6923 2010-01-20 Doug Evans <dje@google.com>
6925 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6927 (linux_wait_for_event1, linux_init_signals): Ditto.
6928 (W_STOPCODE): Provide definition if missing.
6930 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
6932 * linux-low.c (linux_core_of_thread): New.
6933 (compare_ints, show_process, list_threads): New.
6934 (linux_qxfer_osdata): Report threads and cores.
6935 (linux_target_op): Register linux_core_of_thread.
6936 * remote-utils.c (prepare_resume_reply): Report the core.
6937 (buffer_xml_printf): Support %d specifier.
6938 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6940 (handle_query): Handle qXfer:threads. Announce availability
6942 * target.h (struct target_ops): New field core_of_thread.
6944 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
6946 * Makefile.in (clean): Remove new generated files.
6947 (reg-s390.o, reg-s390.c): Remove rules.
6948 (reg-s390x.o, reg-s390x.c): Likewise.
6949 (s390-linux32.o, s390-linux32.c): Add rules.
6950 (s390-linux64.o, s390-linux64.c): Likewise.
6951 (s390x-linux64.o, s390x-linux64.c): Likewise.
6952 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6953 * linux-s390-low.c: Include <elf.h>.
6954 (HWCAP_S390_HIGH_GPRS): Define if undefined.
6955 (init_registers_s390): Remove prototype.
6956 (init_registers_s390x): Likewise.
6957 (init_registers_s390_linux32): Add prototype.
6958 (init_registers_s390_linux64): Likewise.
6959 (init_registers_s390x_linux64): Likewise.
6960 (s390_num_regs_3264): New define.
6961 (s390_regmap_3264): New global variable.
6962 (s390_cannot_fetch_register): Remove obsolete check.
6963 (s390_cannot_store_register): Likewise.
6964 (s390_collect_ptrace_register): Handle upper/lower register halves.
6965 (s390_supply_ptrace_register): Likewise.
6966 (s390_fill_gregset): Update to register number changes.
6967 (s390_get_hwcap): New routine.
6968 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
6969 Install appropriate regmap and register set.
6971 2010-01-01 Joel Brobecker <brobecker@adacore.com>
6973 * server.c (gdbserver_version): Update copyright year to 2010.
6974 * gdbreplay.c (gdbreplay_version): Likewise.
6976 2009-12-28 Doug Evans <dje@google.com>
6978 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
6979 elf/external.h. Include <elf.h> instead but only if necessary.
6981 2009-12-28 Pedro Alves <pedro@codesourcery.com>
6983 * linux-low.c (linux_remove_process): Remove `detaching'
6984 parameter. Don't release/detach from thread_db here.
6985 (linux_kill): Release/detach from thread_db here, ...
6986 (linux_detach): ... and here, before actually detaching.
6987 (linux_wait_1): ... and here, when a process exits.
6988 * thread-db.c (any_thread_of): New.
6989 (thread_db_free): Switch the current inferior to a thread of the
6992 2009-12-21 Doug Evans <dje@google.com>
6994 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
6996 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
6997 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
6998 warning ifndef __NR_tkill. Move setting of errno there too.
6999 Delete unnecessary resetting of errno after syscall.
7000 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7002 * configure.ac: Check for dladdr.
7003 * config.in: Regenerate.
7004 * configure: Regenerate.
7005 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7006 (try_thread_db_load): Update.
7008 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7010 2009-12-18 Doug Evans <dje@google.com>
7012 * event-loop.c: Include unistd.h if it exists.
7014 * linux-low.c (my_waitpid): Move definition away from being in
7015 between linux_tracefork_child/linux_test_for_tracefork.
7017 * gdb_proc_service.h (psaddr_t): Fix type.
7018 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7019 signature to match glibc.
7021 2009-12-16 Doug Evans <dje@google.com>
7023 * linux-low.c (linux_read_memory): Fix argument to read.
7025 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7027 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7028 events, don't leave current_inferior pointing at null.
7030 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7032 * win32-low.c (LOG): Delete.
7033 (OUTMSG): Output to stderr.
7034 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7035 on compile time LOG macro.
7036 (win32_wait): Fix debug output.
7038 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7040 * win32-low.c (win32_add_one_solib): If the dll name is
7041 "ntdll.dll", prepend the system directory to the dll path.
7043 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7045 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7047 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7048 Vladimir Prus <vladimir@codesourcery.com>
7050 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7051 * configure.ac: Check for __mcoldfire__ and set
7052 gdb_cv_m68k_is_coldfire.
7053 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7054 reg-cf.o and reg-m68k.o.
7055 * configure: Regenerated.
7057 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7059 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7060 Pass it to thread_db_free.
7061 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7062 proper `detaching' argument to linux_remove_process.
7063 * linux-low.h (thread_db_free): Add `detaching' parameter.
7064 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7066 (thread_db_free): Add `detaching' parameter. Only
7067 call td_ta_clear_event if detaching from process.
7069 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7071 * thread-db.c (thread_db_free): Fix typo.
7073 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7076 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7078 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7080 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7081 with an i686 compiler.
7082 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7084 * configure: Rebuilt.
7086 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7090 * server.c (handle_search_memory_1): Correct read_addr initialization
7091 in loop for searching subsequent chunks.
7093 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7095 * configure.ac: New --with-libthread-db option.
7096 * thread-db.c: Allow direct dependence on libthread_db.
7097 (thread_db_free): Adjust.
7098 * config.in: Regenerate.
7099 * configure: Likewise.
7101 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7104 * thread-db.c (attach_thread): New function.
7105 (maybe_attach_thread): Return success/failure.
7106 (find_new_threads_callback): Adjust.
7107 (thread_db_find_new_threads): Loop until no new threads.
7109 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7111 * proc-service.c (ps_lgetregs): Formatting.
7113 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7115 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7116 * configure.ac: Adjust.
7117 * linux-low.h (struct process_info_private): Move members to struct
7119 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7120 * linux-low.c (linux_remove_process): Adjust.
7121 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7122 * server.c (handle_query): Move code ...
7123 (handle_monitor_command): ... here. New function.
7124 * target.h (struct target_ops): New member.
7125 * thread-db.c (struct thread_db): New.
7126 (libthread_db_search_path): New variable.
7127 (thread_db_create_event, thread_db_enable_reporting)
7128 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7129 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7130 (try_thread_db_load_1, dladdr_to_soname): New functions.
7131 (try_thread_db_load, thread_db_load_search): New functions.
7132 (thread_db_init): Search for libthread_db.
7133 (thread_db_free): New function.
7134 (thread_db_handle_monitor_command): Likewise.
7135 * config.in: Regenerate.
7136 * configure: Regenerate.
7138 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7140 * spu-low.c (spu_kill): Wait for inferior to terminate.
7141 Call clear_inferiors.
7142 (spu_detach): Call clear_inferiors.
7144 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7146 * aclocal.m4: Regenerate.
7147 * config.in: Likewise.
7148 * configure: Likewise.
7150 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7152 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7153 (parse_spufs_run): New function.
7154 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7155 (ppc_breakpoint_at): Handle SPU breakpoints.
7157 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7159 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7160 (SPUFS_MAGIC): Define.
7161 (spu_enumerate_spu_ids): New function.
7162 (linux_qxfer_spu): New function.
7163 (linux_target_ops): Install linux_qxfer_spu.
7165 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7167 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7168 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7169 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7170 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7171 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7172 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7173 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7174 (init_registers_powerpc_cell32l): Add prototype.
7175 (init_registers_powerpc_cell64l): Likewise.
7176 (ppc_arch_setup): Detect Cell/B.E. architecture.
7178 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7180 * Makefile.in (datarootdir): New variable.
7182 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7184 * linux-low.c (linux_write_memory): Update debugging output.
7185 * Makefile.in (clean): Add new descriptions.
7186 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7187 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7188 * configure.srv: Add new files for arm*-*-linux*.
7189 * linux-arm-low.c: Add new declarations.
7190 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7191 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7192 (HWCAP_VFPv3D16): New.
7193 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7194 instead of __IWMMXT__.
7195 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7196 (arm_arch_setup): New.
7197 (target_regsets): Remove #ifdef. Add VFP regset.
7198 (the_low_target): Use arm_arch_setup.
7200 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7202 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7203 the main thread again.
7205 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7207 Adding Neutrino gdbserver.
7208 * configure: Regenerated.
7209 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7210 * configure.srv (i[34567]86-*-nto*): New target.
7211 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7212 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7213 (nto_comctrl) [__QNX__]: New function.
7214 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7216 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7218 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7221 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7222 Pedro Alves <pedro@codesourcery.com>
7224 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7225 don't support CONTEXT_EXTENDED_REGISTERS.
7226 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7227 (the_low_target): Install them.
7228 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7229 failing with ERROR_PIPE_NOT_CONNECTED.
7231 2009-06-30 Doug Evans <dje@google.com>
7232 Pierre Muller <muller@ics.u-strasbg.fr>
7234 Add h/w watchpoint support to x86-linux, win32-i386.
7235 * Makefile.in (SFILES): Add i386-low.c
7236 (i386_low_h): Define.
7237 (i386-low.o): Add dependencies.
7238 (linux-x86-low.o): Add i386-low.h dependency.
7239 (win32-i386-low.o): Ditto.
7240 * i386-low.c: New file.
7241 * i386-low.h: New file.
7242 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7243 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7244 * linux-low.c (linux_add_process): Initialize arch_private.
7245 (linux_remove_process): Free arch_private.
7246 (add_lwp): Initialize arch_private.
7247 (delete_lwp): Free arch_private.
7248 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7250 * linux-low.h (process_info_private): New member arch_private.
7251 (lwp_info): New member arch_private.
7252 (linux_target_ops): New members new_process, new_thread,
7254 (ptid_of): New macro.
7255 * linux-x86-low.c: Include stddef.h, i386-low.h.
7256 (arch_process_info): New struct.
7257 (arch_lwp_info): New struct.
7258 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7259 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7260 (i386_dr_low_get_status): New function.
7261 (x86_insert_point, x86_remove_point): New functions.
7262 (x86_stopped_by_watchpoint): New function.
7263 (x86_stopped_data_address): New function.
7264 (x86_linux_new_process, x86_linux_new_thread): New functions.
7265 (x86_linux_prepare_to_resume): New function.
7266 (the_low_target): Add entries for insert_point, remove_point,
7267 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7269 * server.c (debug_hw_points): New global.
7270 (monitor_show_help): Document set debug-hw-points.
7271 (handle_query): Process "set debug-hw-points".
7272 * server.h (debug_hw_points): Declare.
7273 (paddress): Declare.
7274 * utils.c (NUMCELLS, CELLSIZE): New macros.
7275 (get_sell, xsnprintf, paddress): New functions.
7276 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7277 remove_point, stopped_by_watchpoint, stopped_data_address.
7278 * win32-i386-low.c: Include i386-low.h.
7279 (debug_reg_state): Replaces dr.
7280 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7281 (i386_dr_low_get_status): New function.
7282 (i386_insert_point, i386_remove_point): New functions.
7283 (i386_stopped_by_watchpoint): New function.
7284 (i386_stopped_data_address): New function.
7285 (i386_initial_stuff): Update.
7286 (get_thread_context,set_thread_context,i386_thread_added): Update.
7287 (the_low_target): Add entries for insert_point,
7288 remove_point, stopped_by_watchpoint, stopped_data_address.
7289 * win32-low.c (win32_insert_watchpoint): New function.
7290 (win32_remove_watchpoint): New function.
7291 (win32_stopped_by_watchpoint): New function.
7292 (win32_stopped_data_address): New function.
7293 (win32_target_ops): Add entries for insert_watchpoint,
7294 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7295 * win32-low.h (win32_target_ops): New members insert_point,
7296 remove_point, stopped_by_watchpoint, stopped_data_address.
7298 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7300 * server.c (process_serial_event): Re-return unsupported, not
7301 error, if the type isn't recognized. Re-allow supporting only
7302 insert or remove packets. Also call require_running for
7303 breakpoints. Add missing break statement to default case. Tidy.
7304 * target.h (struct target_ops): Rename insert_watchpoint to
7305 insert_point, and remove_watchpoint to remove_point.
7307 * linux-low.h (struct linux_target_ops): Likewise.
7308 * linux-low.c (linux_insert_watchpoint): Rename to ...
7309 (linux_insert_point): ... this. Adjust.
7310 (linux_remove_watchpoint): Rename to ...
7311 (linux_remove_point): ... this. Adjust.
7312 (linux_target_ops): Adjust.
7313 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7314 (cris_insert_point): ... this.
7315 (cris_remove_watchpoint): Rename to ...
7316 (cris_remove_point): ... this.
7317 (the_low_target): Adjust.
7319 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7321 * server.c (handle_v_kill): Pass signal_pid to
7322 kill_inferior if multi_process is zero.
7324 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7326 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7327 * target.h (target_ops): Comment for *_watchpoint to make it clear
7328 the functions can get types '0' and '1'.
7330 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7332 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7333 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7334 * regcache.c (get_regcache): Likewise.
7335 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7336 * win32-low.c (child_fetch_inferior_registers): Remove check for
7339 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7340 Pedro Alves <pedro@codesourcery.com>
7342 * target.h (struct target_ops) <supports_multi_process>: New
7344 (target_supports_multi_process): New.
7345 * server.c (handle_query): Even if GDB reports support, only
7346 enable multi-process if the target also supports it. Report
7347 multi-process support only if the target backend supports it.
7348 * linux-low.c (linux_supports_multi_process): New function.
7349 (linux_target_ops): Install it as target_supports_multi_process
7352 2009-05-24 Doug Evans <dje@google.com>
7354 Global renaming of find_thread_pid to find_thread_ptid.
7355 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7356 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7357 All callers updated.
7359 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7360 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7363 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7364 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7365 (linux_resume_one_lwp): Ditto.
7367 2009-05-23 Doug Evans <dje@google.com>
7369 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7370 from struct inferior_list_entry * to struct lwp_info *.
7371 All callers updated.
7373 2009-05-13 Doug Evans <dje@google.com>
7375 * linux-x86-low.c: Don't include assert.h.
7376 (x86_siginfo_fixup): Use fatal, not assert.
7377 (x86_arch_setup): Fix comment.
7379 2009-05-12 Doug Evans <dje@google.com>
7381 Biarch support for i386/amd64 gdbserver.
7382 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7383 Add linux-x86-low.c.
7384 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7385 (linux-x86-low.o): Add.
7386 * linux-x86-64-low.c: Delete.
7387 * linux-i386-low.c: Delete.
7388 * linux-x86-low.c: New file.
7389 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7391 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7393 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7394 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7395 (linux_child_pid_to_exec_file): New function.
7396 (elf_64_header_p, elf_64_file_p): New functions.
7397 (siginfo_fixup): New function.
7398 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7399 give target a chance to convert layout.
7400 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7401 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7403 2009-05-07 Doug Evans <dje@google.com>
7405 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7406 (regsets_store_inferior_registers): Ditto.
7408 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7412 * linux-low.c (must_set_ptrace_flags): Delete.
7413 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7415 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7416 `lwp->must_set_ptrace_flags' instead.
7417 (linux_wait_for_event_1): Set ptrace options here.
7418 (linux_wait_1): ... not here.
7420 2009-04-30 Doug Evans <dje@google.com>
7422 * inferiors.c (started_inferior_callback): New function.
7423 (attached_inferior_callback): New function.
7424 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7425 * server.c (print_started_pid, print_attached_pid): New functions.
7426 (detach_or_kill_for_exit): New function.
7427 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7428 * server.h (have_started_inferiors_p): Declare.
7429 (have_attached_inferiors_p): Declare.
7431 * inferiors.c (remove_process): Fix memory leak, free process.
7432 * linux-low.c (linux_remove_process): New function.
7433 (linux_kill): Call it instead of remove_process.
7434 (linux_detach, linux_wait_1): Ditto.
7436 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7438 * configure.srv: Add x86 Windows CE target.
7440 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7442 * inferiors.c (get_thread_process): Make global.
7443 * server.h (get_thread_process): Add prototype.
7444 * thread-db.c (find_one_thread): Use get_thread_process
7445 instead of current_process.
7446 (thread_db_get_tls_address): Do not crash if called when
7447 thread layer is not yet initialized.
7449 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7451 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7452 * spu-low.c (current_tid): Rename to ...
7453 (current_ptid): ... this.
7454 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7455 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7456 ptid_get_lwp (current_ptid) instead of current_tid.
7457 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7458 instead of current_tid. Use find_process_pid to verify pid
7459 argument is valid. Pass proper argument to remove_process.
7460 (spu_thread_alive): Compare current_ptid instead of current_tid.
7461 (spu_resume): Likewise.
7463 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7465 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7468 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7470 Implement the multiprocess extensions, and add linux multiprocess
7473 * server.h (ULONGEST): Declare.
7474 (struct ptid, ptid_t): New.
7475 (minus_one_ptid, null_ptid): Declare.
7476 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7477 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7478 (struct inferior_list_entry): Change `id' type from unsigned from
7480 (struct sym_cache, struct breakpoint, struct
7481 process_info_private): Forward declare.
7482 (struct process_info): Declare.
7483 (current_process): Declare.
7484 (all_processes): Declare.
7485 (initialize_inferiors): Declare.
7486 (add_thread): Adjust to use ptid_t.
7487 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7488 (add_process, remove_process, find_thread_pid): Declare.
7489 (find_inferior_id): Adjust to use ptid_t.
7490 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7491 (multi_process): Declare.
7492 (push_event): Adjust to use ptid_t.
7493 (read_ptid, write_ptid): Declare.
7494 (prepare_resume_reply): Adjust to use ptid_t.
7495 (clear_symbol_cache): Declare.
7496 * inferiors.c (all_processes): New.
7497 (null_ptid, minus_one_ptid): New.
7498 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7499 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7500 (add_thread): Change unsigned long to ptid. Remove gdb_id
7502 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7503 (gdb_id_to_thread): Rename to ...
7504 (find_thread_pid): ... this. Change unsigned long to ptid.
7505 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7506 (loaded_dll, pull_pid_from_list): Adjust.
7507 (add_process, remove_process, find_process_pid)
7508 (get_thread_process, current_process, initialize_inferiors): New.
7509 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7510 (struct target_waitstatus) <related_pid>: Ditto.
7511 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7513 (struct target_ops) <join>: Add `pid' argument.
7514 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7515 (struct target_ops) <wait>: Add `ptid' field. Change return type
7517 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7518 (mywait): Add `ptid' argument. Change return type to ptid_t.
7519 (target_pid_to_str): Declare.
7520 * target.c (set_desired_inferior): Adjust to use ptids.
7521 (mywait): Add new `ptid' argument. Adjust.
7522 (target_pid_to_str): New.
7523 * mem-break.h (free_all_breakpoints): Declare.
7524 * mem-break.c (breakpoints): Delelete.
7525 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7526 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7527 to use per-process breakpoint list.
7528 (free_all_breakpoints): New.
7529 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7530 (symbol_cache, all_symbols_looked_up): Delete.
7532 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7534 (prepare_resume_reply): Change ptid argument's type from unsigned
7535 long to ptid_t. Adjust. Implement W;process and X;process.
7536 (free_sym_cache, clear_symbol_cache): New.
7537 (look_up_one_symbol): Adjust to per-process symbol cache. *
7538 * server.c (cont_thread, general_thread, step_thread): Change type
7541 (multi_process): New.
7542 (last_ptid): Change type to ptid_t.
7543 (struct vstop_notif) <ptid>: Change type to ptid_t.
7544 (queue_stop_reply, push_event): Change `ptid' argument's type to
7546 (discard_queued_stop_replies): Add `pid' argument.
7547 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7548 changes. Don't reference the `attached' global.
7549 (attach_inferior): Adjust to mywait interface changes.
7550 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7551 features. Handle and report "multiprocess+". Handle
7553 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7555 (handle_v_kill): New.
7556 (handle_v_stopped): Adjust to use target_pid_to_str.
7557 (handle_v_requests): Allow multiple attaches and runs when
7558 multiprocess extensions are in effect. Handle "vKill".
7559 (myresume): Adjust to use ptids.
7560 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7561 (handle_status): Adjust to discard_queued_stop_replies interface
7563 (first_thread_of, kill_inferior_callback)
7564 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7565 (main): Call initialize_inferiors. Adjust to use ptids, killing
7566 and detaching from all inferiors. Handle multiprocess packet
7568 * linux-low.h: Include gdb_proc_service.h.
7569 (struct process_info_private): New.
7570 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7571 <lwpid_of>: Use ptid_get_lwp.
7572 (get_lwp_thread): Adjust.
7573 (struct lwp_info): Add `dead' member.
7574 (find_lwp_pid): Declare.
7575 * linux-low.c (thread_db_active): Delete.
7576 (new_inferior): Adjust comment.
7577 (inferior_pid): Delete.
7578 (linux_add_process): New.
7579 (handle_extended_wait): Adjust.
7580 (add_lwp): Change unsigned long to ptid.
7581 (linux_create_inferior): Add process to processes table. Adjust
7582 to use ptids. Don't set new_inferior here.
7583 (linux_attach_lwp): Rename to ...
7584 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7585 it. Adjust to use ptids.
7586 (linux_attach_lwp): New.
7587 (linux_attach): Add process to processes table. Don't set
7589 (struct counter): New.
7590 (second_thread_of_pid_p, last_thread_of_process_p): New.
7591 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7593 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7594 processes. Remove process from process table.
7595 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7596 to multiple processes.
7597 (any_thread_of): New.
7598 (linux_detach): Add `pid' argument, and handle it. Remove process
7599 from processes table.
7600 (linux_join): Add `pid' argument. Handle it.
7601 (linux_thread_alive): Change unsighed long argument to ptid_t.
7602 Consider dead lwps as not being alive.
7603 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7604 threads we're not interested in.
7605 (same_lwp, find_lwp_pid): New.
7606 (linux_wait_for_lwp): Change `pid' argument's type from int to
7608 (linux_wait_for_event): Rename to ...
7609 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7610 from int to ptid_t. Adjust.
7611 (linux_wait_for_event): New.
7612 (linux_wait_1): Add `ptid' argument. Change return type to
7613 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7614 that exit from the process table.
7615 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7617 (mark_lwp_dead): New.
7618 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7619 stopping all threads, mark its main lwp as dead.
7620 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7622 (fetch_register, usr_store_inferior_registers)
7623 (regsets_fetch_inferior_registers)
7624 (regsets_store_inferior_registers, linux_read_memory)
7625 (linux_write_memory): Inline `inferior_pid'.
7626 (linux_look_up_symbols): Adjust to use per-process
7628 (linux_request_interrupt): Adjust to use ptids.
7629 (linux_read_auxv): Inline `inferior_pid'.
7630 (initialize_low): Don't reference thread_db_active.
7631 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7632 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7633 (ps_getpid): Return the pid of the current inferior.
7634 * thread-db.c (proc_handle, thread_agent): Delete.
7635 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7637 (find_one_thread): Change argument type to ptid_t. Adjust to
7639 (maybe_attach_thread): Adjust to per-process data and ptids.
7640 (thread_db_find_new_threads): Ditto.
7641 (thread_db_init): Ditto.
7642 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7643 processes table. Adjust to use ptids.
7644 (spu_kill, spu_detach): Adjust interface. Remove process from
7646 (spu_join, spu_thread_alive): Adjust interface.
7647 (spu_wait): Adjust interface. Remove process from processes
7648 table. Adjust to use ptids.
7649 * win32-low.c (current_inferior_tid): Delete.
7650 (current_inferior_ptid): New.
7651 (debug_event_ptid): New.
7652 (thread_rec): Take a ptid. Adjust.
7653 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7654 (child_delete_thread): Ditto.
7655 (do_initial_child_stuff): Add `attached' argument. Add process to
7657 (child_fetch_inferior_registers, child_store_inferior_registers):
7659 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7660 (win32_attach): Pass 1 to do_initial_child_stuff.
7661 (win32_kill): Adjust interface. Remove process from processes
7663 (win32_detach): Ditto.
7664 (win32_join): Adjust interface.
7665 (win32_thread_alive): Take a ptid.
7666 (win32_resume): Adjust to use ptids.
7667 (get_child_debug_event): Ditto.
7668 (win32_wait): Adjust interface. Remove exiting process from
7671 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7673 Non-stop mode support.
7675 * server.h (non_stop): Declare.
7676 (gdb_client_data, handler_func): Declare.
7677 (delete_file_handler, add_file_handler, start_event_loop):
7679 (handle_serial_event, handle_target_event, push_event)
7680 (putpkt_notif): Declare.
7681 * target.h (enum resume_kind): New.
7682 (struct thread_resume): Replace `step' field by `kind' field.
7683 (TARGET_WNOHANG): Define.
7684 (struct target_ops) <wait>: Add `options' argument.
7685 <supports_non_stop, async, start_non_stop>: New fields.
7686 (target_supports_non_stop, target_async): New.
7687 (start_non_stop): Declare.
7688 (mywait): Add `options' argument.
7689 * target.c (mywait): Add `options' argument. Print child exit
7691 (start_non_stop): New.
7692 * server.c (non_stop, own_buf, mem_buf): New globals.
7693 (struct vstop_notif): New.
7694 (notif_queue): New global.
7695 (queue_stop_reply, push_event, discard_queued_stop_replies)
7696 (send_next_stop_reply): New.
7697 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7699 (attach_inferior): In non-stop mode, don't wait for the target
7701 (handle_general_set): Handle QNonStop.
7702 (handle_query): When handling qC, return the current general
7703 thread, instead of the first thread of the list.
7704 (handle_query): If the backend supports non-stop mode, include
7705 QNonStop+ in the qSupported query response.
7706 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7708 (handle_v_attach, handle_v_run): Handle non-stop mode.
7709 (handle_v_stopped): New.
7710 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7711 (myresume): Adjust to use resume_kind. Handle non-stop.
7712 (queue_stop_reply_callback): New.
7713 (handle_status): Handle non-stop mode.
7714 (main): Clear non_stop flag on reconnection. Use the event-loop.
7715 Refactor serial protocol handling from here ...
7716 (process_serial_event): ... to this new function. When GDB
7717 selects any thread, select one here. In non-stop mode, wait until
7718 GDB acks all pending events before exiting.
7719 (handle_serial_event, handle_target_event): New.
7720 * remote-utils.c (remote_open): Install remote_desc in the event
7722 (remote_close): Remove remote_desc from the event loop.
7723 (putpkt_binary): Rename to...
7724 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7725 (putpkt_binary): New as wrapper around putpkt_binary_1.
7726 (putpkt_notif): New.
7727 (prepare_resume_reply): In non-stop mode, don't change the
7729 * event-loop.c: New.
7730 * Makefile.in (OBJ): Add event-loop.o.
7731 (event-loop.o): New rule.
7733 * linux-low.h (pid_of): Moved here.
7735 (get_lwp_thread): Use lwpid_of.
7736 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7737 * linux-low.c (pid_of): Delete.
7738 (inferior_pid): Use lwpid_of.
7739 (linux_event_pipe): New.
7740 (target_is_async_p): New.
7742 (handle_extended_wait): Use lwpid_of.
7743 (add_lwp): Don't set lwpid field.
7744 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7745 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7746 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7747 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7748 first. Adjust to linux_wait_for_event interface changes. Use
7750 (linux_detach): Don't delete the main lwp here.
7751 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7752 (status_pending_p): Don't consider explicitly suspended lwps.
7753 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7754 pointer. Add OPTIONS argument. Change return type to int. Use
7755 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7756 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7757 pointer. Add status pointer argument. Return a pid instead of a
7758 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7759 changes. In non-stop mode, don't switch to a random thread.
7760 (linux_wait): Rename to...
7761 (linux_wait_1): ... this. Add target_options argument, and handle
7762 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7763 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7764 clean exit and signal exit code. Don't stop all threads in
7765 non-stop mode. In all-stop mode, only stop all threads when
7766 reporting a stop to GDB. Handle explicit thread stop requests.
7767 (async_file_flush, async_file_mark): New.
7769 (send_sigstop): Use lwpid_of.
7770 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7771 interface changes. In non-stop mode, don't switch to a random
7773 (linux_resume_one_lwp): Use lwpid_of.
7774 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7775 (linux_resume_one_thread): ... this. Handle resume_stop. In
7776 non-stop mode, don't look for pending flag in all threads.
7777 (resume_status_pending_p): Don't consider explicitly suspended
7779 (my_waitpid): Reimplement. Emulate __WALL.
7780 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7782 (sigchld_handler, linux_supports_non_stop, linux_async)
7783 (linux_start_non_stop): New.
7784 (linux_target_ops): Register linux_supports_non_stop, linux_async
7785 and linux_start_non_stop.
7786 (initialize_low): Install SIGCHLD handler.
7787 * thread-db.c (thread_db_create_event, find_one_thread)
7788 (thread_db_get_tls_address): Use lwpid_of.
7789 * win32-low.c (win32_detach): Adjust to use resume_kind.
7790 (win32_wait): Add `options' argument.
7791 * spu-low.c (spu_resume): Adjust to use resume_kind.
7792 (spu_wait): Add `options' argument.
7794 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7796 Decouple target code from remote protocol.
7798 * target.h (enum target_waitkind): New.
7799 (struct target_waitstatus): New.
7800 (struct target_ops) <wait>: Return an unsigned long. Take a
7801 target_waitstatus pointer instead of a char pointer.
7803 * target.c (mywait): Change prototype to return an unsigned long.
7804 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7805 * server.h (thread_from_wait, old_thread_from_wait): Delete
7807 (prepare_resume_reply): Change prototype to take a
7809 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7810 (last_status, last_ptid): New.
7811 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7812 pid instead of a signal.
7813 (attach_inferior): Remove "status" and "signal" parameters.
7815 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7817 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7818 (handle_v_requests, myresume): Remove "status" and "signal"
7820 (handle_status): New.
7821 (main): Delete local `status'. Adjust.
7822 * remote-utils.c: Include target.h.
7823 (prepare_resume_reply): Change prototype to take a
7824 target_waitstatus. Adjust.
7826 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7828 * spu-low.c (spu_wait): Adjust.
7829 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7831 (win32_wait): Adjust.
7833 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7835 * target.h (struct thread_resume): Delete leave_stopped member.
7836 (struct target_ops): Add a `n' argument to the `resume' callback.
7837 * server.c (start_inferior): Adjust.
7838 (handle_v_cont, myresume): Adjust.
7839 * linux-low.c (check_removed_breakpoint): Adjust to resume
7840 interface change, and to removed leave_stopped field.
7841 (resume_ptr): Delete.
7842 (struct thread_resume_array): New.
7843 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7844 resume interface change.
7845 (linux_continue_one_thread, linux_queue_one_thread)
7846 (resume_status_pending_p): Check if the resume field is NULL
7847 instead of checking the leave_stopped member.
7848 (linux_resume): Adjust to the target resume interface change.
7849 * spu-low.c (spu_resume): Adjust to the target resume interface
7851 * win32-low.c (win32_detach, win32_resume): Ditto.
7853 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7855 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7857 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7859 (linux_continue_one_thread): Only preserve the stepping flag if
7860 there's a pending breakpoint.
7862 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7864 * server.c (main): After the inferior having exited, call
7865 remote_close before exiting gdbserver.
7867 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7869 Fix size of FPSCR in Power 7 processors.
7870 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7871 (PPC_FEATURE_HAS_DFP): New #define.
7872 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7875 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7877 * server.c (handle_query) Whitespace and formatting.
7879 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7881 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7882 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7883 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7884 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7885 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7886 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7887 Makefile.in, configure.ac: Fix whitespace throughout.
7888 * configure: Regenerate.
7890 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7892 * inferiors.c (find_inferior): Make it safe for the callback
7893 function to delete the currently iterated inferior.
7895 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7897 * Makefile.in (linuw_low_h): Move higher.
7898 (thread-db.o): Depend on $(linux_low_h).
7900 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7902 Rename "process" to "lwp" throughout.
7904 * linux-low.c (all_processes): Rename to...
7905 (all_lwps): ... this.
7906 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7907 (add_process): Rename to ...
7908 (add_lwp): ... this. Adjust.
7909 (linux_create_inferior): Adjust.
7910 (linux_attach_lwp): Adjust.
7911 (linux_attach): Adjust.
7912 (linux_kill_one_process): Rename to ...
7913 (linux_kill_one_lwp): ... this. Adjust.
7914 (linux_kill): Adjust.
7915 (linux_detach_one_process): Rename to ...
7916 (linux_detach_one_lwp): ... this. Adjust.
7917 (linux_detach): Adjust.
7918 (check_removed_breakpoint): Adjust.
7919 (status_pending_p): Adjust.
7920 (linux_wait_for_process): Rename to ...
7921 (linux_wait_for_lwp): ... this. Adjust.
7922 (linux_wait_for_event): Adjust.
7923 (send_sigstop): Adjust.
7924 (wait_for_sigstop): Adjust.
7925 (stop_all_processes): Rename to ...
7926 (stop_all_lwps): ... this.
7927 (linux_resume_one_process): Rename to ...
7928 (linux_resume_one_lwp): ... this. Adjust.
7929 (linux_set_resume_request, linux_continue_one_thread)
7930 (linux_queue_one_thread, resume_status_pending_p)
7931 (usr_store_inferior_registers, regsets_store_inferior_registers)
7932 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7934 * linux-low.h (get_process): Rename to ...
7935 (get_lwp): ... this. Adjust.
7936 (get_thread_process): Rename to ...
7937 (get_thread_lwp): ... this. Adjust.
7938 (get_process_thread): Rename to ...
7939 (get_lwp_thread): ... this. Adjust.
7940 (struct process_info): Rename to ...
7941 (struct lwp_info): ... this.
7942 (all_processes): Rename to ...
7943 (all_lwps): ... this.
7944 * proc-service.c (ps_lgetregs): Adjust.
7945 * thread-db.c (thread_db_create_event, find_one_thread)
7946 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7948 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7950 * server.c (handle_query): Handle "qAttached".
7952 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
7954 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7955 GPLv3, update license URL.
7957 2009-03-01 Doug Evans <dje@google.com>
7959 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7960 (server_h): Add gdb_signals.h.
7961 (signals.o): Update.
7962 * server.h (target_signal_from_host,target_signal_to_host_p)
7963 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7965 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
7967 * remote-utils.c (getpkt): Also generate remote-debug
7968 information if noack_mode is set.
7970 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7972 * server.c (handle_query): Report qXfer:siginfo:read and
7973 qXfer:siginfo:write as supported and handle them.
7974 * target.h (struct target_ops) <qxfer_siginfo>: New field.
7975 * linux-low.c (linux_xfer_siginfo): New.
7976 (linux_target_ops): Set it.
7978 2009-01-26 Pedro Alves <pedro@codesourcery.com>
7980 * server.c (gdbserver_usage): Mention --remote-debug.
7981 (main): Accept '--remote-debug' switch.
7983 2009-01-18 Doug Evans <dje@google.com>
7985 * regcache.c (new_register_cache): No need to check result of xcalloc.
7986 * server.c (handle_search_memory): Back out calls to xmalloc,
7987 result is checked and error is returned to user upon failure.
7988 (handle_query): Ditto. Add more checks for result of malloc.
7989 (handle_v_cont): Check result of malloc, report error back to
7991 (handle_v_run): Ditto. Call freeargv.
7992 * server.h (freeargv): Declare.
7993 * utils.c (freeargv): New fn.
7995 2009-01-15 Doug Evans <dje@google.com>
7997 * gdbreplay.c (perror_with_name): Make arg const char *.
7998 * server.h (target_signal_to_name): Make return type const char *.
7999 * thread-db.c (thread_db_err_str): Make return type const char *.
8000 * utils.c (perror_with_name): Make arg const char *.
8002 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8004 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8005 when handling a EXIT_PROCESS_DEBUG_EVENT.
8007 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8009 * gdbreplay.c (gdbreplay_version): Update copyright year.
8010 * server.c (gdbserver_version): Likewise.
8012 2009-01-05 Doug Evans <dje@google.com>
8014 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8015 (handle_extended_wait): Improve comment.
8017 2008-12-13 Doug Evans <dje@google.com>
8019 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8020 * server.h (ATTR_MALLOC): New macro.
8021 (xmalloc,xcalloc,xstrdup): Declare.
8022 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8023 * inferiors.c: Ditto.
8024 * linux-low.c: Ditto.
8025 * mem-break.c: Ditto.
8026 * regcache.c: Ditto.
8027 * remote-utils.c: Ditto.
8030 * win32-low.c: Ditto.
8032 2008-12-12 Doug Evans <dje@google.com>
8034 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8035 in debugging printf.
8037 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8039 2008-12-09 Doug Evans <dje@google.com>
8041 * linux-low.h (struct process_info): Delete member tid, unused.
8042 * thread-db.c (find_one_thread): Update.
8043 (maybe_attach_thread): Update.
8045 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8047 * target.h (struct target_ops): Add qxfer_osdata member.
8048 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8050 (linux_qxfer_osdata): New functions.
8051 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8053 * server.c (handle_query): Handle "qXfer:osdata:read:".
8054 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8055 (buffer_xml_printf): New functions.
8056 * server.h (struct buffer): New.
8057 (buffer_grow_str, buffer_grow_str0): New macros.
8058 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8059 (buffer_xml_printf): Declare.
8061 2008-11-24 Doug Evans <dje@google.com>
8063 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8065 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8067 * server.c (handle_v_run): Always use the supplied argument list.
8069 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8071 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8072 (xtensa_regmap_table): Add entry for scompare1.
8074 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8076 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8077 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8078 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8079 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8080 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8081 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8082 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8083 XML target descriptions.
8084 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8085 when inferior is running on an ISA 2.05 or later processor. Add
8086 special case to return offset for full 64-bit slot of FPSCR when
8089 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8091 * Makefile.in (SFILES, clean): Added sparc64 files.
8092 (reg-sparc64.o, reg-sparc64.c): New.
8093 * configure.srv (sparc*-*-linux*): New configuration.
8094 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8095 syscall arguments for SPARC.
8096 (regsets_store_inferior_registers): Likewise.
8097 * linux-sparc-low.c: New file.
8099 2008-10-21 Doug Evans <dje@google.com>
8101 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8102 (READLINE_DIR,READLINE_DEP): Delete.
8103 (INTERNAL_CFLAGS): Update.
8104 (LINTFLAGS): Update.
8106 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8108 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8109 whole argv from the last run, not just argv[0].
8111 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8113 * regcache.c (new_register_cache): Return NULL if the register
8114 cache size isn't known yet.
8115 (free_register_cache): Avoid dereferencing a NULL regcache.
8117 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8119 * configure.srv: Merge MIPS and MIPS64.
8121 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8123 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8125 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8127 * Makefile.in: Add required vsx dependencies.
8129 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8130 Declare init_registers_powerpc_vsx32l.
8131 Declare init_registers_powerpc_vsx64l.
8132 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8133 (ppc_arch_setup): Check for VSX in hwcap.
8134 (ppc_fill_vsxregset): New function.
8135 (ppc_store_vsxregset): New function.
8136 Add new VSX entry in regset_info target_regsets.
8138 * configure.srv: Add new VSX dependencies.
8140 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8142 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8143 (remote_open): Set or clear transport_is_reliable.
8144 (putpkt_binary): Don't expect acks in noack mode.
8145 (getpkt): Don't send ack/nac in noack mode.
8146 * server.c (handle_general_set): Handle QStartNoAckMode.
8147 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8149 (main): Reset noack_mode on every connection.
8150 * server.h (noack_mode): Declare.
8152 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8154 * Makefile.in (GDBREPLAY_OBS): New variable.
8155 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8157 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8158 Daniel Jacobowitz <dan@codesourcery.com>
8160 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8161 (usr_store_inferior_registers): Likewise.
8162 (regsets_store_inferior_registers): Likewise.
8164 2008-07-31 Rolf Jansen <rj@surtec.com>
8165 Pedro Alves <pedro@codesourcery.com>
8167 * configure.ac: Check for memmem declaration.
8168 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8169 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8170 (disable_packet_qfThreadInfo): Unconditionally compile.
8171 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8172 * configure, config.in: Regenerate.
8174 2008-07-28 Doug Kwan <dougkwan@google.com>
8176 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8177 (linux_write_memory): Remove declaration of errno.
8179 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8181 * linux-low.c (handle_extended_wait): Do not use "status"
8182 variable uninitialized.
8184 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8186 * server.c (handle_v_attach): Inhibit reporting dll changes.
8188 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8190 * remote-utils.c (prepare_resume_reply): If requested, don't
8191 output "thread:TID" in the T stop reply.
8193 * server.c (disable_packet_vCont, disable_packet_Tthread)
8194 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8195 (handle_query): If requested, disable support for qC, qfThreadInfo
8197 (handle_v_requests): If requested, disable support for vCont.
8198 (gdbserver_show_disableable): New.
8199 (main): Handle --disable-packet and --disable-packet=LIST.
8201 * server.h (disable_packet_vCont, disable_packet_Tthread)
8202 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8204 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8206 * server.c (gdbserver_usage): Mention --version.
8208 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8210 * Makefile.in (gdbreplay.o): New rule.
8212 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8214 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8215 message, not gdbserver.
8217 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8218 Nathan Sidwell <nathan@codesourcery.com>
8219 Joseph Myers <joseph@codesourcery.com>
8221 * acinclude.m4: Include ../../config/acx.m4.
8222 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8223 * configure, config.in: Regenerate.
8224 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8225 * server.c (gdbserver_version): Print PKGVERSION.
8226 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8227 (main): Adjust gdbserver_usage calls.
8228 * gdbreplay.c (version, host_name): Add declarations.
8229 (gdbreplay_version, gdbreplay_usage): New.
8230 (main): Accept --version and --help options.
8232 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8234 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8235 (arm_breakpoint_at): Handle Thumb.
8236 (the_low_target): Add comment.
8238 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8240 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8242 2008-05-09 Doug Evans <dje@google.com>
8244 * server.h (decode_search_memory_packet): Declare.
8245 * remote-utils.c (decode_search_memory_packet): New fn.
8246 * server.c (handle_search_memory_1): New fn.
8247 (handle_search_memory): New fn.
8248 (handle_query): Process qSearch:memory packets.
8250 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8252 * regcache.c (registers_length): Remove.
8253 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8254 full register packet.
8255 * regcache.h (registers_length): Remove prototype.
8256 * server.h (PBUFSIZ): Define to 16384.
8258 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8260 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8261 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8262 powerpc-64l.o, and powerpc-altivec64l.o.
8263 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8264 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8265 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8266 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8267 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8270 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8271 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8272 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8273 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8274 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8275 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8276 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8277 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8278 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8279 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8282 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8283 (init_registers_powerpc_32l): ... this new prototype.
8284 (init_registers_powerpc_32): Remove, replace by ...
8285 (init_registers_powerpc_altivec32l): ... this new prototype.
8286 (init_registers_powerpc_e500): Remove, replace by ...
8287 (init_registers_powerpc_e500l): ... this new prototype.
8288 (init_registers_ppc64): Remove, replace by ...
8289 (init_registers_powerpc_64l): ... this new prototype.
8290 (init_registers_powerpc_64): Remove, replace by ...
8291 (init_registers_powerpc_altivec64l): ... this new prototype.
8292 (ppc_num_regs): Set to 73.
8293 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8294 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8295 (ppc_cannot_store_register): Handle orig_r3 and trap.
8296 (ppc_arch_setup): Update init_registers_... calls.
8297 (ppc_fill_gregset): Handle orig_r3 and trap.
8299 * inferiors.c (clear_inferiors): Reset current_inferior.
8301 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8303 * acinclude.m4: Add override.m4.
8304 * configure: Regenerate.
8306 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8308 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8309 initial call to init_register_ppc64.
8311 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8313 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8314 single powerpc*-*-linux* case.
8315 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8317 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8319 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8320 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8322 * linux-ppc-low.c: Include <elf.h>.
8323 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8324 (ppc_hwcap): New global variable.
8325 (ppc_regmap): Remove __SPE__ #ifdef sections.
8326 (ppc_regmap_e500): New global variable.
8327 (ppc_cannot_store_register): Update __SPE__ special case.
8328 (ppc_get_hwcap): New function.
8329 (ppc_arch_setup): Use it to determine whether inferior supports
8330 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8331 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8332 Do not access registers if target does not support AltiVec.
8333 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8334 Do not access registers if target does not support SPE.
8335 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8337 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8339 * linux-low.c (disabled_regsets, num_regsets): New.
8340 (use_regsets_p): Delete.
8341 (linux_wait_for_process): Clear disabled_regsets.
8342 (regsets_fetch_inferior_registers): Check and set it.
8343 (regsets_store_inferior_registers): Likewise.
8344 (linux_fetch_registers, linux_store_registers): Do not use
8346 (initialize_low): Allocate disabled_regsets.
8348 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8350 * Makefile.in (LIBOBJS): New.
8352 (memmem.o): New rule.
8353 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8354 * configure: Regenerated.
8356 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8358 * server.c (handle_query): Never return "unsupported" for
8359 qXfer:features:read queries.
8361 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8363 * server.c (get_features_xml): Fix inverted condition.
8364 (handle_query): Always support qXfer:feature:read.
8366 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8368 * server.c (wrapper_argv): New.
8369 (start_inferior): Handle wrapper_argv. If set, expect an extra
8371 (gdbserver_usage): Document --wrapper.
8372 (main): Parse --wrapper.
8374 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8376 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8377 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8378 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8379 (ppc_set_pc): Likewise.
8380 (ppc_arch_setup): New function.
8381 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8382 of collect_register.
8383 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8385 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8387 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8388 instead of linux-ppc64-low.o.
8389 * linux-ppc64-low.c: Remove file.
8390 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8391 (linux-ppc64-low.o): Remove rule.
8393 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8394 (init_registers_powerpc_64): Likewise.
8395 (ppc_regmap): Conditionally define depending on __powerpc64__.
8396 (ppc_cannot_store_register): Do not special-case "fpscr" when
8397 compiled on __powerpc64__.
8398 (ppc_collect_ptrace_register): New function.
8399 (ppc_supply_ptrace_register): New function.
8400 (ppc_breakpoint): Change type to "unsigned int".
8401 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8402 (the_low_target): Conditionally provide initializers for the
8403 arch_setup member depending on __powerpc64__. Install
8404 collect_ptrace_register and supply_ptrace_register members.
8406 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8408 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8409 * server.c (gdbserver_xmltarget): Define.
8410 (get_features_xml): Use it to replace "target.xml" and arch_string.
8412 * configure.srv: Remove srv_xmltarget. Add XML files that were
8413 mentioned there to srv_xmlfiles instead. Remove conditional tests
8414 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8415 srv_xmlfiles and srv_regobj to include all possible choices.
8416 * configure.ac (srv_xmltarget): Remove.
8417 (srv_xmlfiles): Do not add "target.xml".
8418 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8419 checks for supplementary target information.
8420 * configure: Regenerate.
8421 * Makefile.in (XML_TARGET): Remove.
8422 (target.xml): Remove rule.
8423 (clean): Do not clean up target.xml.
8424 (.PRECIOUS): Do not mention target.xml.
8426 * target.h (struct target_ops): Remove arch_string member.
8427 * linux-low.c (linux_arch_string): Remove.
8428 (linux_target_ops): Remove arch_string initializer.
8429 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8430 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8431 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8432 * spu-low.c (spu_arch_string): Remove.
8433 (spu_target_ops): Remove arch_string initializer.
8434 * win32-low.c (win32_arch_string): Remove.
8435 (win32_target_ops): Remove arch_string initializer.
8436 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8437 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8438 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8440 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8442 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8443 by collect_ptrace_register and supply_ptrace_register hooks.
8444 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8445 instead of checking for the_low_target.left_pad_xfer.
8446 (usr_store_inferior_registers): Use collect_ptrace_register callback
8447 instead of checking for the_low_target.left_pad_xfer.
8449 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8450 (s390_supply_ptrace_register): Likewise.
8451 (s390_fill_gregset): Call s390_collect_ptrace_register.
8452 (the_low_target): Update.
8454 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8455 (ppc_supply_ptrace_register): Likewise.
8456 (the_low_target): Update.
8458 * linux-i386-low.c (the_low_target): Update.
8459 * linux-x86-64-low.c (the_low_target): Update.
8461 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8463 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8464 reg-s390.o and reg-s390x.o.
8466 * linux-low.c (new_inferior): New global variable.
8467 (linux_create_inferior, linux_attach): Set it.
8468 (linux_wait_for_process): Call the_low_target.arch_setup after the
8469 target has stopped for the first time.
8470 (initialize_low): Do not call the_low_target.arch_setup.
8472 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8473 (s390_set_pc): Likewise.
8474 (s390_arch_setup): New function.
8475 (the_low_target): Use s390_arch_setup as arch_setup routine.
8477 * regcache.c (realloc_register_cache): New function.
8478 (set_register_cache): Call it for each existing regcache.
8480 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8482 * server.h (init_registers): Remove prototype.
8484 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8485 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8486 instead of init_registers ().
8487 * linux-arm-low.c (init_registers_arm): Add prototype.
8488 (init_registers_arm_with_iwmmxt): Likewise.
8489 (the_low_target): Add initializer for arch_setup field.
8490 * linux-cris-low.c (init_registers_cris): Add prototype.
8491 (the_low_target): Add initializer for arch_setup field.
8492 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8493 (the_low_target): Add initializer for arch_setup field.
8494 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8495 (the_low_target): Add initializer for arch_setup field.
8496 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8497 (the_low_target): Add initializer for arch_setup field.
8498 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8499 (the_low_target): Add initializer for arch_setup field.
8500 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8501 (the_low_target): Add initializer for arch_setup field.
8502 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8503 (init_registers_mips64_linux): Likewise.
8504 (the_low_target): Add initializer for arch_setup field.
8505 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8506 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8507 (the_low_target): Add initializer for arch_setup field.
8508 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8509 (init_registers_powerpc_64): Likewise.
8510 (the_low_target): Add initializer for arch_setup field.
8511 * linux-s390-low.c (init_registers_s390): Add prototype.
8512 (init_registers_s390x): Likewise.
8513 (the_low_target): Add initializer for arch_setup field.
8514 * linux-sh-low.c (init_registers_sh): Add prototype.
8515 (the_low_target): Add initializer for arch_setup field.
8516 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8517 (the_low_target): Add initializer for arch_setup field.
8518 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8519 (the_low_target): Add initializer for arch_setup field.
8521 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8522 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8523 instead of init_registers ().
8524 * win32-arm-low.c (init_registers_arm): Add prototype.
8525 (the_low_target): Add initializer for arch_setup field.
8526 * win32-i386-low.c (init_registers_i386): Add prototype.
8527 (the_low_target): Add initializer for arch_setup field.
8529 * spu-low.c (init_registers_spu): Add prototype.
8530 (initialize_low): Call initialie_registers_spu () instead of
8531 initialize_registers ().
8533 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8535 * server.c (handle_v_requests): When handling the vRun and vAttach
8536 packets, if already debugging a process, don't kill it. Return an
8539 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8541 * server.c (handle_query): Correct length check.
8543 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8545 * win32-low.c (do_initial_child_stuff): Add process handle
8546 parameter. Set current_process_handle and current_process_id from the
8547 parameters. Clear globals.
8548 (win32_create_inferior): Don't set current_process_handle and
8549 current_process_id here. Instead pass them on the call to
8550 do_initial_child_stuff.
8551 (win32_attach): Likewise.
8552 (win32_clear_inferiors): New.
8553 (win32_kill): Don't close the current process handle or the
8554 current thread handle here. Instead call win32_clear_inferiors.
8555 (win32_detach): Don't open a new handle to the process. Call
8556 win32_clear_inferiors.
8557 (win32_join): Don't rely on current_process_handle; open a new
8558 handle using the process id.
8559 (win32_wait): Call win32_clear_inferiors when the inferior process
8562 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8564 * server.c (monitor_show_help): Add "exit".
8566 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8568 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8569 (clean): Add reg-xtensa.c.
8570 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8571 * configure.srv (xtensa*-*-linux*) New target.
8572 * linux-xtensa-low.c: New.
8573 * xtensa-xtregs.c: New.
8575 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8577 * hostio.c: Don't include errno.h.
8578 (errno_to_fileio_errno): Move to hostio-errno.
8579 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8580 error number outputting to the target->hostio_last_error callback.
8581 (hostio_packet_error): Use FILEIO_EINVAL directly.
8582 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8583 calls to hostio_error.
8584 * hostio-errno.c: New.
8585 * server.h (hostio_last_error_from_errno): Declare.
8586 * target.h (target_ops): Add hostio_last_error member.
8587 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8588 as hostio_last_error handler.
8589 * spu-low.c (spu_target_ops): Likewise.
8590 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8591 (wince_hostio_last_error): New functions.
8592 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8593 as hostio_last_error handler.
8594 (win32_target_ops) [!_WIN32_WCE]: Register
8595 hostio_last_error_from_errno as hostio_last_error handler.
8596 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8597 (hostio-errno.o): New rule.
8598 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8599 * configure.srv (srv_hostio_err_objs): New variable. Default to
8601 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8602 * configure: Regenerate.
8604 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8606 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8607 (linux_kill, linux_detach): Clean up the process list.
8608 * remote-utils.c (remote_open): Improve port number parsing.
8609 (putpkt_binary, input_interrupt): Only send interrupts if the target
8611 * server.c (extended_protocol): Make static.
8612 (attached): Define earlier.
8613 (exit_requested, response_needed, program_argv): New variables.
8614 (target_running): New.
8615 (start_inferior): Clear attached here.
8616 (attach_inferior): Set attached here.
8617 (require_running): Define.
8618 (handle_query): Use require_running and target_running. Implement
8620 (handle_v_attach, handle_v_run): New.
8621 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8622 (gdbserver_usage): Update.
8623 (main): Redo argument parsing. Handle --debug and --multi. Handle
8624 --attach along with other options or after the port. Save
8625 program_argv. Support no initial program. Resynchronize
8626 communication with GDB after an error. Handle "monitor exit".
8627 Use require_running and target_running. Always allow the extended
8628 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8629 restart in extended mode.
8630 * README: Refer to the GDB manual. Update --attach usage.
8632 2007-12-20 Andreas Schwab <schwab@suse.de>
8634 * linux-low.c (STACK_SIZE): Define.
8635 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8636 (linux_test_for_tracefork): Likewise.
8638 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8640 * linux-low.c (linux_wait_for_event): Update messages. Do not
8641 reinsert auto-delete breakpoints.
8642 * mem-break.c (struct breakpoint): Change return type of handler to
8644 (set_breakpoint_at): Update handler type.
8645 (reinsert_breakpoint_handler): Return 1 instead of calling
8647 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8649 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8650 * mem-break.h (set_breakpoint_at): Update handler type.
8651 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8652 * win32-low.c (auto_delete_breakpoint): New.
8653 (get_child_debug_event): Use it.
8655 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8657 * configure.ac: Check for pread and pwrite.
8658 * hostio.c (handle_pread): Fall back to lseek and read.
8659 (handle_pwrite): Fall back to lseek and write.
8660 * config.in, configure: Regenerated.
8662 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8664 * server.c (myresume): Add own_buf argument.
8665 (main): Update calls.
8667 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8669 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8670 * remote-utils.c (remote_open): Do not call disable_async_io.
8671 (block_async_io): Delete.
8672 (unblock_async_io): Make static.
8673 (initialize_async_io): New.
8674 * server.c (handle_v_cont): Handle async I/O here.
8675 (myresume): Likewise. Move other common resume tasks here...
8676 (main): ... from here. Call initialize_async_io. Disable async
8677 I/O before the main loop.
8678 * server.h (initialize_async_io): Declare.
8679 (block_async_io, unblock_async_io): Delete prototypes.
8680 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8682 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8684 * remote-utils.c (readchar): Allow binary data in received messages.
8686 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8688 * win32-low.c (attaching): New global.
8689 (win32_create_inferior): Clear the `attaching' global.
8690 (win32_attach): Set the `attaching' global.
8691 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8692 attaching. Only set a breakpoint at the entry point if not
8695 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8697 * server.c (main): Don't report dll events on the initial
8698 connection on attaches.
8700 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8702 * server.c (main): Relax numerical bases supported for the pid of
8703 the --attach command line argument.
8705 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8707 * win32-low.c (win32_attach): Call OpenProcess before
8708 DebugActiveProcess, not after. Add last error output to error
8711 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8713 * win32-low.c (win32_get_thread_context)
8714 (win32_set_thread_context): New functions.
8715 (thread_rec): Use win32_get_thread_context.
8716 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8717 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8720 2007-12-03 Leo Zayas
8721 Pedro Alves <pedro_alves@portugalmail.pt>
8723 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8725 (child_add_thread): Minor cleanup.
8726 (child_continue): Resume artificially suspended threads before
8727 calling ContinueDebugEvent.
8728 (suspend_one_thread): New.
8729 (fake_breakpoint_event): New.
8730 (get_child_debug_event): Change return type to int. Check here if
8731 gdb sent an interrupt request. If a soft interrupt was requested,
8732 fake a breakpoint event. Return 0 if there is no event to handle,
8734 (win32_wait): Don't check here if gdb sent an interrupt request.
8735 Ensure there is a valid event to handle.
8736 (win32_request_interrupt): Add soft interruption method as last
8739 2007-12-03 Leo Zayas
8740 Pedro Alves <pedro_alves@portugalmail.pt>
8742 * win32-low.h (win32_thread_info): Add descriptions to the
8743 structure members. Replace `suspend_count' counter by a
8745 * win32-low.c (thread_rec): Update condition of when to get the
8746 context from the inferior. Rely on ContextFlags being set if it
8747 has already been retrieved. Only suspend the inferior thread if
8748 we haven't already. Warn if that fails.
8749 (continue_one_thread): s/suspend_count/suspended/. Only call
8750 ResumeThread once. Warn if that fails.
8752 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8754 * win32-low.c (win32_wait): Don't read from the inferior when it
8757 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8759 * Makefile.in (win32_low_h): New variable.
8760 (win32-low.o): Add dependency on $(win32_low_h).
8761 (win32-arm-low.o, win32-i386-low.o): New rules.
8763 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8765 * hostio.c: Correct copyright year.
8767 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8769 * Makefile.in (OBS): Add hostio.o.
8770 (hostio.o): New rule.
8771 * server.h (handle_vFile): Declare.
8772 * hostio.c: New file.
8773 * server.c (handle_v_requests): Take packet_len and new_packet_len
8774 for binary packets. Call handle_vFile.
8775 (main): Update call to handle_v_requests.
8777 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8779 * linux-low.c: Include <sched.h>.
8781 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8783 * linux-low.c (linux_tracefork_grandchild): New.
8784 (linux_tracefork_child): Use clone.
8785 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8787 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8789 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8791 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8793 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8795 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8797 * inferiors.c (change_inferior_id): Delete.
8798 (add_pid_to_list, pull_pid_from_list): New.
8799 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8800 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8801 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8802 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8803 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8804 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8805 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8806 (using_threads): Always set to 1.
8807 (handle_extended_wait): New.
8808 (add_process): Do not set TID.
8809 (linux_create_inferior): Set must_set_ptrace_flags.
8810 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8811 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8812 (linux_thread_alive): Rename TID argument to LWPID.
8813 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8814 (linux_wait_for_event): Do not use TID or check using_threads. Update
8815 call to dead_thread_notify. Call handle_extended_wait.
8816 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8817 (send_sigstop): Delete sigstop_sent.
8818 (wait_for_sigstop): Avoid TID.
8819 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8820 (linux_test_for_tracefork): New.
8821 (linux_lookup_signals): Use thread_db_active and
8822 linux_supports_tracefork_flag.
8823 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8824 * linux-low.h (get_process_thread): Avoid TID.
8825 (struct process_ifo): Move thread_known and tid to the end. Remove
8827 (linux_attach_lwp, thread_db_init): Update prototypes.
8828 * server.h (change_inferior_id): Delete prototype.
8829 (add_pid_to_list, pull_pid_from_list): New prototypes.
8830 * thread-db.c (thread_db_use_events): New.
8831 (find_first_thread): Rename to...
8832 (find_one_thread): ...this. Update callers and messages. Do not
8833 call fatal. Check thread_db_use_events. Do not call
8834 change_inferior_id or new_thread_notify.
8835 (maybe_attach_thread): Update. Do not call new_thread_notify.
8836 (thread_db_init): Set thread_db_use_events. Check use_events.
8837 * utils.c (fatal, warning): Correct message prefix.
8839 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8841 * Makefile.in (clean): Remove new files.
8842 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8843 (powerpc-64.o, powerpc-64.c): New rules.
8844 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8845 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8847 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8849 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8850 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8851 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8852 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8853 (target_regsets): Add AltiVec and SPE register sets.
8854 * configure.ac: Check for AltiVec and SPE.
8855 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8856 (ppc_fill_vrregset, ppc_store_vrregset): New.
8857 (target_regsets): Add AltiVec register set.
8858 * configure: Regenerated.
8860 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8862 * linux-low.c (O_LARGEFILE): Define.
8863 (linux_read_memory): Use /proc/PID/mem.
8864 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8865 * configure, config.in: Regenerated.
8867 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8869 * linux-low.c (linux_wait_for_event): Do not pass signals while
8872 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8874 * win32-low.c (create_process): New.
8875 (win32_create_inferior): Use create_process instead of
8876 CreateProcess. If create_process failed retry appending an ".exe"
8877 suffix. Store the GetLastError result immediatelly after
8878 create_process calls and use it on the call to error.
8880 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8882 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8884 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8886 * configure.ac: Switch license to GPLv3.
8888 2007-08-01 Michael Snyder <msnyder@access-company.com>
8890 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8892 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8894 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8896 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8897 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8898 CloseToolhelp32Snapshot.
8899 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8900 CloseToolhelp32Snapshot.
8902 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8904 * server.c (main): Check for inferior exit before main loop.
8906 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8908 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8909 instead of on tmp_desc.
8911 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8912 Daniel Jacobowitz <dan@codesourcery.com>
8914 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8915 (add_thread): Minor cleanups.
8916 (clear_inferiors): Move lower in the file. Clear the DLL
8918 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8919 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8920 (xml_escape_text): New.
8921 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8923 (handle_v_cont): Report errors.
8924 (gdbserver_version): Update.
8925 (main): Correct size of own_buf. Do not report initial DLL events.
8926 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8927 (unloaded_dll, xml_escape_text): New.
8928 * win32-low.c (enum target_waitkind): Update comments.
8929 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8930 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8931 (win32_EnumProcessModules, win32_GetModuleInformation)
8932 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8933 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8934 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8935 (win32_Module32First, win32_Module32Next, load_toolhelp)
8936 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8937 (get_child_debug_event): Handle DLL events.
8938 (win32_wait): Likewise.
8940 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
8942 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8943 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8945 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8947 * win32-low.c (handle_output_debug_string): Ignore event if not
8950 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
8952 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8954 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
8956 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8958 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
8960 * inferiors.c (change_inferior_id): Add comment.
8961 * linux-low.c (check_removed_breakpoint): Add an early
8962 prototype. Improve debug output.
8963 (linux_attach): Doc update.
8964 (linux_detach_one_process, linux_detach): Clean up before releasing
8966 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
8967 * linux-low.h (struct process_info): Doc improvement.
8968 * mem-break.c (delete_all_breakpoints): New.
8969 * mem-break.h (delete_all_breakpoints): New prototype.
8970 * thread-db.c (find_first_thread): New.
8971 (thread_db_create_event): Call it instead of
8972 thread_db_find_new_threads. Clean up unused variables.
8973 (maybe_attach_thread): Remove first thread handling.
8974 (thread_db_find_new_threads): Use find_first_thread.
8975 (thread_db_get_tls_address): Likewise.
8977 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
8979 * thread-db.c (thread_db_find_new_threads): Add prototype.
8980 (thread_db_create_event): Check for the main thread before adding
8982 (maybe_attach_thread): Only enable event reporting if TID == 0.
8983 (thread_db_get_tls_address): Check for new threads.
8985 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
8987 * linux-low.c (linux_create_inferior): Try execv before execvp.
8988 * spu-low.c (spu_create_inferior): Likewise.
8990 2007-06-13 Mike Frysinger <vapier@gentoo.org>
8992 * linux-low.c (linux_create_inferior): Change execv to execvp.
8993 * spu-low.c (spu_create_inferior): Likewies.
8995 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
8997 * Makefile.in (clean): Clean new files instead of deleted ones.
8998 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
8999 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9001 * configure.srv: Specify XML files and new regformats for MIPS and
9003 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9004 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9005 an entry for the restart register.
9006 (mips_cannot_fetch_register, mips_cannot_store_register)
9007 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9008 register names to match the XML descriptions.
9009 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9010 restart register instead of $0.
9012 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9013 Markus Deuling <deuling@de.ibm.com>
9015 * remote-utils.c (decode_xfer_write): New function.
9016 * server.h (decode_xfer_write): Add prototype.
9017 * server.c (handle_query): Add PACKET_LEN argument. Support
9018 qXfer:spu:read and qXfer:spu:write packets.
9019 (main): Pass packet_len to handle_query.
9020 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9021 * target.h (target_ops): Add qxfer_spu.
9023 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9025 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9026 accessing non-seekable spufs files.
9028 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9030 * server.c (handle_query): Add reply for qC packet.
9032 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9033 Leo Zayas <lerele@champenstudios@com>
9035 * server.h (check_remote_input_interrupt_request): New function.
9036 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9037 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9038 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9039 (check_remote_input_interrupt_request): New function.
9040 * server.h (check_remote_input_interrupt_request): Declare.
9041 * win32-low.c (winapi_DebugBreakProcess,
9042 winapi_GenerateConsoleCtrlEvent): New typedefs.
9043 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9045 (win32_wait): Check for remote interrupt request
9046 with check_remote_input_interrupt_request.
9047 (win32_request_interrupt): New function.
9048 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9050 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9052 * win32-low.c (debug_registers_changed,
9053 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9054 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9055 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9056 (thread_rec): Get context using the low target.
9057 (child_add_thread): Call thread_added on the low target,
9058 which does the same thing.
9060 (do_initial_child_stuff): Remove debug registers references.
9061 Set context using the low target. Resume threads after
9062 setting the contexts.
9063 (child_continue): Remove dead variable. Remove debug
9064 registers references.
9065 (child_fetch_inferior_registers): Go through the low target.
9066 (do_child_store_inferior_registers): Remove.
9067 (child_store_inferior_registers): Go through the low target.
9068 (win32_resume): Remove debug registers references.
9069 Set context using the low target.
9070 (handle_exception): Change return type to void. Don't record
9071 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9072 first chance exception.
9073 (get_child_debug_event): Change return type to void. Remove
9074 goto loop. Always return after waiting for debug event.
9075 (win32_wait): Convert to switch statement. Handle spurious
9078 * win32-i386-low.c (debug_registers_changed,
9079 debug_registers_used): New.
9080 (initial_stuff): Rename to ...
9081 (i386_initial_stuff): ... this. Clear debug registers
9083 (store_debug_registers): Delete.
9084 (i386_get_thread_context): New.
9085 (load_debug_registers): Delete.
9086 (i386_set_thread_context): New.
9087 (i386_thread_added): New.
9088 (single_step): Rename to ...
9089 (i386_single_step): ... this.
9090 (do_fetch_inferior_registers): Rename to ...
9091 (i386_fetch_inferior_register): ... this.
9092 (i386_store_inferior_register): New.
9093 (the_low_target): Adapt to new interface.
9095 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9096 (arm_get_thread_context): New.
9097 (arm_set_thread_context): New.
9099 (do_fetch_inferior_registers): Rename to ...
9100 (arm_fetch_inferior_register): ... this.
9101 (arm_store_inferior_register): New.
9102 (arm_wince_breakpoint): Reimplement as unsigned long.
9103 (arm_wince_breakpoint_len): Define.
9104 (the_low_target): Adapt to new interface.
9106 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9107 load_debug_registers. Add get_thread_context, set_thread_context,
9108 thread_added and store_inferior_register. Rename
9109 fetch_inferior_registers to fetch_inferior_register.
9110 (regptr): Remove declaration.
9112 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9114 * linux-low.c (linux_detach): Change return type to int. Return 0.
9115 * spu-low.c (spu_detach): Likewise.
9117 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9119 * target.h (target_ops): Change return type of detach to int.
9121 (join_inferior): New.
9122 * server.c (main): Don't skip detach support on mingw32.
9123 If the inferior doesn't support detaching return error.
9124 Call join_inferior instead of using waitpid.
9125 * linux-low.c (linux_join): New.
9126 (linux_target_op): Add linux_join.
9127 * spu-low.c (spu_join): New.
9128 (spu_target_ops): Add spu_join.
9129 * win32-low.c (win32_detach): Adapt to new interface.
9130 Reopen current_process_handle before detaching. Issue a child
9131 resume before detaching.
9133 (win32_target_op): Add win32_join.
9135 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9137 * win32-low.c (win32-attach): Fix return value.
9138 * target.h (target_ops): Describe ATTACH return values.
9140 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9142 * win32-low.c (GETPROCADDRESS): Define.
9143 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9144 (winapi_DebugSetProcessKillOnExit): Likewise.
9145 (win32_create_inferior): Force usage of ansi CreateProcessA.
9146 (win32_attach): Use GETPROCADDRESS.
9147 (win32_detach): Likewise.
9149 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9151 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9153 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9155 * win32-low.c: Commit leftover changes from 2007-03-29.
9157 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9159 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9160 fields short instead of int. Add explicit padding.
9161 (i387_cache_to_fsave): Remove unnecessary casts.
9162 (i387_fsave_to_cache): Doc fix.
9163 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9165 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9167 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9168 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9170 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9172 * configure.srv (arm*-*-mingw32ce*): Move near the other
9175 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9177 * configure.ac: Add errno checking.
9178 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9179 sys/file.h and malloc.h.
9180 (AC_CHECK_DECLS): Add perror.
9181 (srv_mingwce): Handle.
9182 * configure.srv (i[34567]86-*-cygwin*): Add
9183 win32-i386-low.o to srv_tgtobj.
9184 (i[34567]86-*-mingw*): Likewise.
9185 (arm*-*-mingw32ce*): Add case.
9186 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9187 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9188 [__MINGW32CE__] (strerror): New function.
9189 [__MINGW32CE__] (errno): Define to GetLastError.
9190 [__MINGW32CE__] (COUNTOF): New macro.
9191 (remote_open): Remove extra close call.
9192 * mem-break.c (delete_breakpoint_at): New function.
9193 * mem-break.h (delete_breakpoint_at): Declare.
9194 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9195 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9196 [USE_WIN32API] (read, write): Add char* casts.
9197 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9198 * server.h: Include wincecompat.h on Windows CE.
9199 [HAVE_ERRNO_H]: Check.
9200 (perror): Declare if not declared.
9201 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9202 (perror_with_name): Remove errno declaration.
9203 * wincecompat.h: New.
9204 * wincecompat.c: New.
9206 * win32-arm-low.c: New.
9207 * win32-i386-low.c: New.
9208 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9209 (OUTMSG2): Make it safe.
9211 (COUNTOF): New macro.
9212 (NUM_REGS): Get it from the low target.
9213 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9214 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9215 (thread_rec): Let low target handle debug registers.
9216 (child_add_thread): Likewise.
9217 (child_init_thread_list): Likewise.
9218 (continue_one_thread): Likewise.
9220 (do_child_fetch_inferior_registers): Move to ...
9221 * win32-i386-low.c: ... here, and rename to ...
9222 (do_fetch_inferior_registers): ... this.
9223 * win32-low.c (child_fetch_inferior_registers):
9224 Go through the low target.
9225 (do_child_store_inferior_registers): Use regptr.
9226 (strwinerror): New function.
9227 (win32_create_inferior): Handle Windows CE.
9228 Use strwinerror instead of strerror on Windows error
9229 codes. Add program to the error output.
9230 Don't close the main thread handle on Windows CE.
9231 (win32_attach): Use coredll.dll on Windows CE.
9232 (win32_kill): Close current process and current
9234 (win32_detach): Use coredll.dll on Windows CE.
9235 (win32_resume): Let low target handle debug registers, and
9237 (handle_exception): Add/Remove initial breakpoint. Avoid
9238 non-existant WSTOPSIG on Windows CE.
9239 (win32_read_inferior_memory): Cast to remove warning.
9240 (win32_arch_string): Go through the low target.
9241 (initialize_low): Call set_breakpoint_data with the low
9242 target's breakpoint.
9243 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9244 FOP_REGNUM, mappings): Move to ...
9245 * win32-i386-low.c: ... here.
9246 * win32-low.c (win32_thread_info): Move to ...
9247 * win32-low.h: ... here.
9248 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9249 win32-arm-low.c and wincecompat.c.
9250 (all:): Add $EXEEXT.
9251 (install-only:): Likewise.
9252 (gdbserver:): Likewise.
9253 (gdbreplay:): Likewise.
9254 * config.in: Regenerate.
9255 * configure: Regenerate.
9257 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9259 * win32-low.c: Rename typedef thread_info to
9260 win32_thread_info throughout.
9262 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9264 * win32-i386-low.c: Rename to ...
9265 * win32-low.c: ... this.
9266 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9267 * Makefile.in: Likewise.
9269 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9271 * remote-utils.c (monitor_output): Constify msg parameter.
9272 * server.h (monitor_output): Likewise.
9273 * win32-i386-low.c (handle_output_debug_string): New.
9274 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9275 handle_output_debug_string.
9276 (get_child_debug_event): Likewise.
9278 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9280 * server.c (main): Correct strtoul check.
9282 2007-03-27 Jon Ringle <jon@ringle.org>
9284 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9286 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9288 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9290 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9292 * terminal.h: Check HAVE_SGTTY_H.
9294 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9296 * remote-utils.c (remote_open): Print out the assigned port number.
9298 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9300 * remote-utils.c (monitor_output): New function.
9301 * server.c (debug_threads): Define here.
9302 (monitor_show_help): New function.
9303 (handle_query): Handle qRcmd.
9304 (main): Do not handle 'd' packet.
9305 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9306 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9309 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9311 * Makefile.in (EXEEXT): New.
9312 (clean): Use $(EXEEXT).
9314 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9316 * target.h (target_ops): Rename send_signal to request_interrupt,
9317 and remove enum target_signal parameter.
9318 * linux-low.c (linux_request_interrupt): Rename from
9319 linux_send_signal, and always send SIGINT.
9320 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9321 and always send SIGINT.
9322 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9324 (input_interrupt): Likewise.
9326 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9328 * server.c (get_features_xml): Check if target implemented
9330 * win32-i386-low.c (win32_arch_string): New.
9331 (win32_target_ops): Add win32_arch_string as arch_string member.
9333 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9335 * spu-low.c (spu_arch_string): New.
9336 (spu_target_ops): Add spu_arch_string.
9338 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9340 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9341 * configure.ac: Do not check for terminal.h.
9342 * configure, config.in: Regenerated.
9344 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9346 * Makefile.in (OBS): Add $(XML_BUILTIN).
9347 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9349 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9350 (arm-with-iwmmxt.c): New.
9351 * config.in, configure: Regenerate.
9352 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9353 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9354 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9355 (arm*-*-linux*): Add iWMMXt and regset support.
9356 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9357 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9358 (arm_store_wmmxregset, target_regsets): New.
9359 * server.c (get_features_xml): Take annex argument. Check builtin
9361 (handle_query): Handle multiple annexes.
9363 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9365 * remote-utils.c [USE_WIN32API] (read, write): Define.
9366 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9369 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9371 * linux-i386-low.c (the_low_target): Set arch_string.
9372 * linux-x86-64-low.c (the_low_target): Likewise.
9373 * linux-low.c (linux_arch_string): New.
9374 (linux_target_ops): Add it.
9375 * linux-low.h (struct linux_target_ops): Add arch_string.
9376 * server.c (write_qxfer_response): Use const void * for DATA.
9377 (get_features_xml): New.
9378 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9379 * target.h (struct target_ops): Add arch_string method.
9381 2007-01-03 Denis Pilat <denis.pilat@st.com>
9382 Daniel Jacobowitz <dan@codesourcery.com>
9384 * linux-low.c (linux_kill): Handle being called with no threads.
9385 * win32-i386-low.c (win32_kill): Likewise.
9386 (get_child_debug_event): Clear current_process_handle.
9388 2006-12-30 Denis PILAT <denis.pilat@st.com>
9389 Daniel Jacobowitz <dan@codesourcery.com>
9391 * remote-utils.c (remote_open): Check the type of specified
9392 serial port devices before opening them.
9393 * server.c (main): Kill the inferior if an error occurs during
9394 the first remote_open.
9396 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9398 * README: Update supported targets.
9400 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9402 * Makefile.in (clean): Remove reg-mips64.c.
9403 (reg-mips64.c, reg-mips64.o): New rules.
9404 * configure.srv: Handle mips64. Include regset support for mips.
9405 * linux-mips-low.c (union mips_register): New.
9406 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9407 (mips_breakpoint, mips_breakpoint_at): Use int.
9408 (mips_collect_register, mips_supply_register)
9409 (mips_collect_register_32bit, mips_supply_register_32bit)
9410 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9411 (mips_store_fpregset, target_regsets): New.
9412 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9414 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9416 * configure.srv: Add target "spu*-*-*".
9417 * Makefile.in (clean): Remove reg-spu.c.
9418 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9419 * spu-low.c: New file.
9421 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9423 * configure.ac: Correct td_thr_tls_get_addr test.
9424 * configure: Regenerated.
9426 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9428 * linux-low.c (linux_wait_for_event): Reformat. Use the
9430 * remote-utils.c (decode_address_to_semicolon): New.
9431 * server.c (pass_signals, handle_general_set): New.
9432 (handle_query): Mention QPassSignals for qSupported.
9433 (main): Call handle_general_set.
9434 * server.h (pass_signals, decode_address_to_semicolon): New.
9436 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9438 * server.c (handle_query): Correct error handling for read_auxv.
9440 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9442 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9443 and srv_linux_thread_db to yes.
9444 * linux-s390-low.c (s390_fill_gregset): New function.
9445 (target_regsets): Define data structure.
9447 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9449 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9450 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9451 * config.in, configure: Regenerated.
9452 * inferiors.c (gdb_id_to_thread): New function.
9453 (gdb_id_to_thread_id): Use it.
9454 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9455 * linux-low.h (struct process_info): Add th member.
9456 (thread_db_get_tls_address): New prototype.
9457 * remote-utils.c (decode_address): Make non-static.
9458 * server.c (handle_query): Handle qGetTLSAddr.
9459 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9460 * target.h (struct target_ops): Add get_tls_address.
9461 * thread-db.c (maybe_attach_thread): Save the thread handle.
9462 (thread_db_get_tls_address): New.
9464 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9466 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9467 (linux_resume_one_process): Take a siginfo_t *. Update all
9468 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9469 (struct pending_signals): Add a siginfo_t.
9470 (linux_wait_for_process): Always set last_status.
9471 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9472 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9473 * linux-low.h (struct process_info): Add last_status.
9475 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9477 * remote-utils.c (try_rle): New function.
9478 (putpkt_binary): Use it.
9480 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9482 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9483 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9484 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9485 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9486 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9489 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9491 * server.c (terminal_fd): New variable.
9492 (old_foreground_pgrp): Likewise.
9493 (restore_old_foreground_pgrp): New function.
9494 (start_inferior): Record the terminal file descriptor in terminal_fd
9495 and its original foreground group in old_foreground_pgrp. Register
9496 restore_old_foreground_pgrp with atexit().
9498 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9500 * server.c (handle_query): Correct qPart to qXfer.
9502 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9504 * configure.ac: Check for more headers which are missing on
9505 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9506 * configure.srv: Add Cygwin and mingw32.
9507 * remote-utils.c: Don't include headers unconditionally which
9508 are missing on mingw32. Include <winsock.h> for mingw32.
9509 (remote_open): Adjust for mingw32 support. Flush
9510 standard error after writing to it.
9511 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9512 (unblock_async_io, enable_async_io, disable_async_io)
9513 (readchar, getpkt): Update for Winsock support.
9514 (prepare_resume_reply): Expect a protocol signal number.
9515 * server.c: Disable <sys/wait.h> on mingw32.
9516 (start_inferior): Adjust for mingw32 support. Flush
9517 standard error after writing to it.
9518 (attach_inferior): Likewise. Use protocol signal
9520 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9522 * win32-i386-low.c: New file.
9523 * Makefile.in (XM_CLIBS): Set.
9524 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9525 (win32-i386-low.o): New dependency rule.
9526 * linux-low.c (linux_wait): Use target signal numbers.
9527 * target.h (struct target_ops): Doc fix.
9528 * server.h (target_signal_to_name): New prototype.
9529 * gdbreplay.c: Don't include headers unconditionally which
9530 are missing on mingw32. Include <winsock.h> for mingw32.
9531 (remote_close, remote_open): Adjust for Winsock support.
9532 * configure, config.in: Regenerated.
9534 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9536 * server.c (decode_xfer_read, write_qxfer_response): New.
9537 (handle_query): Take a packet length argument. Handle
9538 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9539 the qSupported response.
9540 (main): Update call to handle_query.
9542 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9544 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9545 (putpkt_binary): Renamed from putpkt and adjusted for binary
9547 (putpkt): New wrapper for putpkt_binary.
9548 (readchar): Don't mask off the high bit.
9549 (decode_X_packet): New function.
9550 * server.c (main): Call putpkt_binary if a handler sets the packet
9551 length. Save the length of the incoming packet. Handle 'X'.
9552 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9554 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9556 * server.c (handle_query): Handle qSupported.
9558 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9560 * remote-utils.c (all_symbols_looked_up): New variable.
9561 (look_up_one_symbol): Check it.
9562 * server.h (look_up_one_symbol): New declaration.
9563 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9565 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9567 * Makefile.in (linux-arm-low.o): Update dependencies.
9568 * linux-arm-low.c: Include "gdb_proc_service.h".
9569 (PTRACE_GET_THREAD_AREA): Define.
9570 (ps_get_thread_area): New function.
9572 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9574 * configure.srv (m68k*-*-uclinux*): New target.
9575 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9576 (linux_resume_one_process): Remove extraneous cast.
9577 (linux_read_offsets): New.
9578 (linux_target_op): Add linux_read_offsets on mmuless systems.
9579 * server.c (handle_query): Add qOffsets logic.
9580 * target.h (struct target_ops): Add read_offsets.
9582 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9584 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9585 (PTRACE_GET_THREAD_AREA): Define.
9586 (ps_get_thread_area): New function.
9587 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9588 (linux-x86-64-low.o): Update.
9590 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9592 * configure.ac: Remove checks for prfpregset_t.
9593 * gdb_proc_service.h: New file.
9594 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9595 new "gdb_proc_service.h".
9596 * proc-service.c: Likewise.
9597 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9598 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9599 * Makefile.in (gdb_proc_service_h): Updated.
9600 * configure, config.in: Regenerated.
9602 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9604 * remote-utils.c (prepare_resume_reply): Move declaration
9605 of gdb_id_from_wait to the top of the block.
9607 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9609 * linux-low.c (regsets_store_inferior_registers): Read the regset
9610 from the target before filling it.
9612 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9614 * server.c (attach_inferior): Return SIGTRAP for a successful
9617 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9619 * Makefile.in (OBS): Add version.o.
9620 (STAGESTUFF): Delete.
9621 (version.o): Add dependencies.
9622 (version.c): Replace rule.
9623 (clean): Remove version.c.
9624 * server.c (gdbserver_version): New.
9625 (gdbserver_usage): Use printf.
9626 (main): Handle --version and --help.
9627 * server.h (version, host_name): Add declarations.
9629 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9641 * linux-x86-64-low.c:
9644 * linux-ppc64-low.c:
9653 * linux-crisv32-low.c:
9665 * gdbserver.1: Add (C) after Copyright. Update the FSF
9668 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9670 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9671 (arm_breakpoint_at): Recognize both breakpoints.
9672 (the_low_target): Use the correct breakpoint instruction.
9674 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9676 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9677 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9678 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9679 (the_low_target): Update.
9681 2005-10-25 Andreas Schwab <schwab@suse.de>
9683 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9685 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9686 (ia64_num_regs): Reduce to 462.
9688 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9690 * acinclude.m4: Correct quoting.
9691 * aclocal.m4: Regenerated.
9693 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9694 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9695 (thread_db_init): Call thread_db_err_str.
9696 * configure.ac: Check for TD_VERSION.
9697 * config.in, configure: Regenerated.
9699 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9701 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9703 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9705 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9706 is not available. Define HAVE_PTRACE_GETREGS if it is.
9707 * config.in, configure: Regenerated.
9708 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9709 * linux-i386-low.c, linux-m68k-low.c: Update to use
9710 HAVE_PTRACE_GETREGS.
9711 * linux-low.c (regsets_fetch_inferior_registers)
9712 (regsets_store_inferior_registers): Only return 0 if we processed
9714 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9715 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9717 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9719 * inferiors.c (struct thread_info): Add gdb_id.
9720 (add_thread): Add gdb_id argument.
9721 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9722 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9723 calls to add_thread.
9724 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9725 * server.c (handle_query): Use thread_to_gdb_id.
9726 (handle_v_cont, main): Use gdb_id_to_thread_id.
9727 * server.h (add_thread): Update prototype.
9728 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9731 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9733 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9734 left-padded registers.
9735 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9736 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9738 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9740 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9741 * configure: Regenerate.
9742 * config.in: Regenerate.
9743 * server.h (NEED_DECLARATION_STRERROR):
9744 Replace with !HAVE_DECL_STRERROR.
9746 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9748 * linux-low.c (linux_wait, linux_send_signal): Don't test
9749 an unsigned long variable for > 0 if it could be MAX_ULONG.
9750 * server.c (myresume): Likewise.
9751 * target.c (set_desired_inferior): Likewise.
9753 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9755 * configure.ac: Simplify and improve check for socklen_t.
9756 * configure, config.in: Regenerate.
9758 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9760 * acconfig.h: Remove.
9761 * configure.ac: Add a test for socklen_t. Use three-argument
9762 AC_DEFINE throughout.
9763 * config.in: Regenerated using autoheader 2.59.
9764 * configure: Regenerated.
9766 * gdbreplay.c (socklen_t): Provide a default.
9767 (remote_open): Use socklen_t.
9768 * remote-utils.c (socklen_t): Provide a default.
9769 (remote_open): Use socklen_t.
9770 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9773 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9775 * linux-low.c (linux_read_memory, linux_write_memory)
9776 (linux_read_auxv): Likewise.
9777 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9778 (check_mem_write): Likewise.
9779 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9781 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9782 (registers_from_string, register_data): Likewise.
9783 * server.c (handle_query, main): Likewise.
9784 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9785 (decode_M_packet): Likewise.
9786 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9787 * target.h (struct target_ops): Update read_memory, write_memory,
9789 (read_inferior_memory, write_inferior_memory): Update.
9790 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9792 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9793 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9794 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9795 linux-s390-low.c, linux-sh-low.c: Update for changes in
9796 read_inferior_memory and the_low_target->breakpoint.
9798 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9800 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9801 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9802 * configure.srv: Add powerpc64-*-linux*.
9803 * linux-ppc64-low.c: New file.
9805 2005-05-23 Orjan Friberg <orjanf@axis.com>
9807 * linux-cris-low.c: New file with support for CRIS.
9808 * linux-crisv32-low.c: Ditto for CRISv32.
9809 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9810 (clean): Add reg-cris.c and reg-crisv32.c.
9811 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9812 reg-crisv32.o, and reg-crisv32.c to make rules.
9813 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9816 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9818 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9819 of sizeof (PTRACE_XFER_TYPE).
9820 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9822 2005-05-12 Orjan Friberg <orjanf@axis.com>
9824 * target.h (struct target_ops): Add insert_watchpoint,
9825 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9826 pointers for hardware watchpoint support.
9827 * linux-low.h (struct linux_target_ops): Ditto.
9828 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9829 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9830 to linux_target_ops.
9831 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9833 * server.c (main): Recognize 'Z' and 'z' packets.
9835 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9837 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9838 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9839 (the_low_target): Add new members.
9841 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9843 * proc-service.c (ps_lgetregs): Search all_processes instead of
9846 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9848 * server.c (start_inferior): Change return type to int.
9849 (attach_inferior): Change sigptr to int *.
9850 (handle_v_cont, handle_v_requests): Change signal to int *.
9851 (main): Change signal to int.
9853 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9855 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9856 * configure.srv: Add m32r*-*-linux*.
9857 * linux-m32r-low.c: New file.
9859 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9861 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9863 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9865 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9866 Take unsigned long arguments for PIDs.
9867 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9868 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9869 (wait_for_sigstop, linux_resume_one_process)
9870 (regsets_fetch_inferior_registers, linux_send_signal)
9871 (linux_read_auxv): Likewise. Update the types of variables holding
9872 PIDs. Update format string specifiers.
9873 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9874 * remote-utils.c (prepare_resume_reply): Likewise.
9875 * server.c (cont_thread, general_thread, step_thread)
9876 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9878 (handle_query): Update format specifiers.
9879 (handle_v_cont, main): Use strtoul for thread IDs.
9880 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9881 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9882 (general_thread, step_thread, thread_from_wait)
9883 (old_thread_from_wait): Update.
9884 * target.h (struct thread_resume): Use unsigned long for THREAD.
9885 (struct target_ops): Use unsigned long for arguments to attach and
9888 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9890 * acinclude.m4: Include bfd/bfd.m4 directly.
9891 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9892 <agriffis@toolchain.org>.
9893 * aclocal.m4, configure: Regenerated.
9895 2005-01-07 Andrew Cagney <cagney@gnu.org>
9897 * configure.ac: Rename configure.in, require autoconf 2.59.
9898 * configure: Re-generate.
9900 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9902 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9904 * aclocal.m4: Regenerated.
9905 * configure: Regenerated.
9907 2004-11-21 Andreas Schwab <schwab@suse.de>
9909 * linux-m68k-low.c (m68k_num_gregs): Define.
9910 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9911 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9912 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9913 (m68k_breakpoint_at): New. Add to the_low_target.
9915 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9916 srv_linux_thread_db to yes.
9918 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9920 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9921 (ARCH_SET_FS): Likewise.
9922 (ARCH_GET_FS): Likewise.
9923 (ARCH_GET_GS): Likewise.
9925 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9927 * linux-i386-low.c (ps_get_thread_area): New.
9928 * linux-x86-64-low.c (ps_get_thread_area): New.
9929 * linux-low.c: Include <sys/syscall.h>.
9930 (linux_kill_one_process): Don't kill the first thread here.
9931 (linux_kill): Kill the first thread here.
9932 (kill_lwp): New function.
9933 (send_sigstop, linux_send_signal): Use it.
9934 * proc-service.c: Clean up #ifdefs.
9935 (fpregset_info): Delete.
9936 (ps_lgetregs): Update and enable implementation.
9937 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9939 * remote-utils.c (struct sym_cache, symbol_cache): New.
9940 (input_interrupt): Print a clearer message.
9941 (async_io_enabled): New variable.
9942 (enable_async_io, disable_async_io): Use it. Update comments.
9943 (look_up_one_symbol): Use the symbol cache.
9944 * thread-db.c (thread_db_look_up_symbols): New function.
9945 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
9947 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9949 * configure.in: Test for -rdynamic.
9950 * configure: Regenerated.
9951 * Makefile (INTERNAL_LDFLAGS): New.
9952 (gdbserver, gdbreplay): Use it.
9954 2004-09-02 Andrew Cagney <cagney@gnu.org>
9956 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9958 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
9960 * linux-low.c (linux_wait): Clear all_processes list also.
9962 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9964 * linux-low.c: Include <errno.h>. Remove extern declaration of
9967 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
9969 * gdbreplay.c, server.h, utils.c: Update copyright years.
9971 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9973 * server.c (main): Print child status or termination signal from
9974 variable 'signal', not 'sig'.
9976 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
9978 * linux-low.c (linux_read_memory): Change return type to
9979 int. Check for and return error from ptrace().
9980 * target.c (read_inferior_memory): Change return type to int. Pass
9981 back return status from the_target->read_memory().
9982 * target.h (struct target_ops): Adapt *read_memory() prototype.
9984 (read_inferior_memory): Adapt prototype.
9985 * server.c (main): Return an error packet if
9986 read_inferior_memory() returns an error.
9988 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
9990 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
9991 Unify with other clean targets.
9993 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9995 * server.c (handle_v_cont): Call set_desired_inferior.
9997 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
9999 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10001 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10003 * linux-low.c (linux_wait): Unblock async I/O.
10004 (linux_resume): Block and enable async I/O.
10005 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10006 * server.h (block_async_io, unblock_async_io): Add prototypes.
10008 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10010 * remote-utils.c (remote_open): Print a status notice after
10011 opening a TCP port.
10012 * server.c (attach_inferior): Print a status notice after
10015 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10017 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10019 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10021 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10023 * server.c, target.h: Update copyright years.
10025 2004-02-25 Roland McGrath <roland@redhat.com>
10027 * target.h (struct target_ops): New member `read_auxv'.
10028 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10029 * linux-low.c (linux_read_auxv): New function.
10030 (linux_target_ops): Initialize `read_auxv' member to that.
10032 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10034 Committed by Jim Blandy <jimb@redhat.com>.
10036 * linux-s390-low.c (s390_num_regs): Update.
10037 (s390_regmap): Remove control registers. Use __s390x__ predefine
10038 instead of GPR_SIZE to distiguish s390 and s390x targets.
10040 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10042 * linux-low.c: Update copyright year.
10043 (check_removed_breakpoint): Clear pending_is_breakpoint.
10044 (linux_set_resume_request, linux_queue_one_thread)
10045 (resume_status_pending_p): New functions.
10046 (linux_continue_one_thread): Use process->resume.
10047 (linux_resume): Only resume threads if there are no pending events.
10048 * linux-low.h (struct process_info): Add resume request
10051 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10053 * regcache.c (new_register_cache): Clear the allocated register
10054 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10056 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10058 * linux-low.c (linux_resume): Take a struct thread_resume *
10060 (linux_wait): Update call.
10061 (resume_ptr): New static variable.
10062 (linux_continue_one_thread): Renamed from
10063 linux_continue_one_process. Use resume_ptr.
10064 (linux_resume): Use linux_continue_one_thread.
10065 * server.c (handle_v_cont, handle_v_requests): New functions.
10066 (myresume): New function.
10067 (main): Handle 'v' case.
10068 * target.h (struct thread_resume): New type.
10069 (struct target_ops): Change argument of "resume" to struct
10071 (myresume): Delete macro.
10073 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10075 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10076 (uninstall): Support DESTDIR.
10078 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10080 * configure.srv: Add xscale*linux copy of arm*linux entry.
10082 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10084 * linux-arm-low.c (arm_reinsert_addr): New function.
10085 (the_low_target): Add arm_reinsert_addr.
10087 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10089 * mem-break.c: Remove whitespace at end of file.
10091 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10093 * configure.in: Check whether we need to prototype strerror.
10094 * server.h: Optionally prototype strerror.
10095 * gdbreplay.c (perror_with_name): Use strerror.
10096 * linux-low.c (linux_attach_lwp): Use strerror.
10097 * utils.c (perror_with_name): Use strerror.
10098 * config.in, configure: Regenerated.
10100 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10102 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10103 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10105 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10107 * Makefile.in (SFILES): Update.
10108 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10109 low-sun3.c: Remove files.
10111 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10113 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10114 (linux_detach_one_process, linux_detach): New functions.
10115 (linux_target_ops): Add linux_detach.
10116 * server.c (main): Handle 'D' packet.
10117 * target.h (struct target_ops): Add "detach" member.
10118 (detach_inferior): Define.
10120 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10122 From Kelley Cook <kelleycook@wideopenwest.com>:
10123 * configure.srv: Accept i[34567]86 variants.
10125 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10127 * linux-low.c (linux_wait_for_event): Correct comment typos.
10128 (linux_resume_one_process): Call check_removed_breakpoint.
10129 (linux_send_signal): New function.
10130 (linux_target_ops): Add linux_send_signal.
10131 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10133 * target.h (struct target_ops): Add send_signal.
10135 2003-05-29 Jim Blandy <jimb@redhat.com>
10137 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10138 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10139 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10140 away part of the register's value.
10142 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10144 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10145 (linux_wait_for_event, linux_init_signals): Likewise.
10147 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10149 * configure.in: Check for stdlib.h.
10150 * configure: Regenerated.
10151 * config.in: Regenerated.
10153 2003-01-04 Andreas Schwab <schwab@suse.de>
10155 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10157 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10159 * Makefile.in: Remove obsolete code.
10161 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10163 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10164 defined(PT_FPR0_HI).
10166 2002-11-17 Stuart Hughes <seh@zee2.com>
10168 * linux-arm-low.c (arm_num_regs): Increase.
10169 (arm_regmap): Include status register.
10171 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10173 * linux-low.c (register_addr): Remove incorrect -1 check.
10175 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10177 * linux-low.c (linux_create_inferior): Call setpgid. Return
10179 (unstopped_p, linux_signal_pid): Remove.
10180 (linux_target_ops): Remove linux_signal_pid.
10181 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10182 global instead of target method.
10183 * target.h (struct target_ops): Remove signal_pid. Update comment
10184 for create_inferior.
10185 * server.c (signal_pid): New variable.
10186 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10187 gdbserver. Set the child to be the foreground process group.
10188 (attach_inferior): Set signal_pid.
10190 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10192 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10194 2002-08-20 Jim Blandy <jimb@redhat.com>
10196 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10199 2002-08-01 Andrew Cagney <cagney@redhat.com>
10201 * Makefile.in: Make chill references obsolete.
10203 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10205 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10206 * configure: Regenerate.
10207 * config.in: Regenerate.
10209 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10211 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10212 (perror_with_name, remote_close, remote_open, expect, play): Static.
10214 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10216 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10217 byte offsets instead of an array of indexes.
10218 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10220 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10222 * regcache.c: Add comment.
10224 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10226 * thread-db.c: New file.
10227 * proc-service.c: New file.
10228 * acinclude.m4: New file.
10229 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10230 proc-service.o, and thread-db.o.
10231 (linux-low.o): Add USE_THREAD_DB.
10232 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10233 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10234 * aclocal.m4: Regenerated.
10235 * config.in: Regenerated.
10236 * configure: Regenerated.
10237 * configure.in: Check for proc_service.h, sys/procfs.h,
10238 thread_db.h, and linux/elf.h headrs.
10239 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10240 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10241 Check for -lthread_db and thread support.
10242 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10243 PowerPC, and SuperH.
10244 * i387-fp.c: Constify arguments.
10245 * i387-fp.h: Likewise.
10246 * inferiors.c: (struct thread_info): Renamed from
10247 `struct inferior_info'. Remove PID member. Use generic inferior
10248 list header. All uses updated.
10249 (inferiors, signal_pid): Removed.
10250 (all_threads): New variable.
10251 (get_thread): Define.
10252 (add_inferior_to_list): New function.
10253 (for_each_inferior): New function.
10254 (change_inferior_id): New function.
10255 (add_inferior): Removed.
10256 (remove_inferior): New function.
10257 (add_thread): New function.
10258 (free_one_thread): New function.
10259 (remove_thread): New function.
10260 (clear_inferiors): Use for_each_inferior and free_one_thread.
10261 (find_inferior): New function.
10262 (find_inferior_id): New function.
10263 (inferior_target_data): Update argument type.
10264 (set_inferior_target_data): Likewise.
10265 (inferior_regcache_data): Likewise.
10266 (set_inferior_regcache_data): Likewise.
10267 * linux-low.c (linux_bp_reinsert): Remove.
10268 (all_processes, stopping_threads, using_thrads)
10269 (struct pending_signals, debug_threads, pid_of): New.
10270 (inferior_pid): Replace with macro.
10271 (struct inferior_linux_data): Remove.
10272 (get_stop_pc, add_process): New functions.
10273 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10274 Use add_process and add_thread.
10275 (linux_attach_lwp): New function, based on old linux_attach. Use
10276 add_process and add_thread. Set stop_expected for new threads.
10277 (linux_attach): New function.
10278 (linux_kill_one_process): New function.
10279 (linux_kill): Kill all LWPs.
10280 (linux_thread_alive): Use find_inferior_id.
10281 (check_removed_breakpoints, status_pending_p): New functions.
10282 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10283 Update. Use WNOHANG. Wait for cloned processes also. Update process
10284 struct for the found process.
10285 (linux_wait_for_event): New function.
10286 (linux_wait): Use it. Support LWPs.
10287 (send_sigstop, wait_for_sigstop, stop_all_processes)
10288 (linux_resume_one_process, linux_continue_one_process): New functions.
10289 (linux_resume): Support LWPs.
10290 (REGISTER_RAW_SIZE): Remove.
10291 (fetch_register): Use register_size instead. Call supply_register.
10292 (usr_store_inferior_registers): Likewise. Call collect_register.
10293 Fix recursive case.
10294 (regsets_fetch_inferior_registers): Improve error message.
10295 (regsets_store_inferior_registers): Add debugging.
10296 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10297 (unstopped_p, linux_signal_pid): New functions.
10298 (linux_target_ops): Add linux_signal_pid.
10299 (linux_init_signals): New function.
10300 (initialize_low): Call it. Initialize using_threads.
10301 * regcache.c (inferior_regcache_data): Add valid
10303 (get_regcache): Fetch registers lazily. Add fetch argument
10304 and update all callers.
10305 (regcache_invalidate_one, regcache_invalidate): New
10307 (new_register_cache): Renamed from create_register_cache.
10308 Return the new regcache.
10309 (free_register_cache): Change argument to a void *.
10310 (registers_to_string, registers_from_string): Call get_regcache
10311 with fetch flag set.
10312 (register_data): Make static. Pass fetch flag to get_regcache.
10313 (supply_register): Call get_regcache with fetch flag clear.
10314 (collect_register): Call get_regcache with fetch flag set.
10315 (collect_register_as_string): New function.
10316 * regcache.h: Update.
10317 * remote-utils.c (putpkt): Flush after debug output and use
10319 Handle input interrupts while waiting for an ACK.
10320 (input_interrupt): Use signal_pid method.
10321 (getpkt): Flush after debug output and use stderr.
10322 (outreg): Use collect_register_as_string.
10323 (new_thread_notify, dead_thread_notify): New functions.
10324 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10325 and general_thread.
10326 (look_up_one_symbol): Flush after debug output.
10327 * server.c (step_thread, server_waiting): New variables.
10328 (start_inferior): Don't use signal_pid. Update call to mywait.
10329 (attach_inferior): Update call to mywait.
10330 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10331 (main): Don't fetch/store registers explicitly. Use
10332 set_desired_inferior. Support proposed ``Hs'' packet. Update
10334 * server.h: Update.
10335 (struct inferior_list, struct_inferior_list_entry): New.
10336 * target.c (set_desired_inferior): New.
10337 (write_inferior_memory): Constify.
10338 (mywait): New function.
10339 * target.h: Update.
10340 (struct target_ops): New signal_pid method.
10341 (mywait): Removed macro, added prototype.
10343 * linux-low.h (regset_func): Removed.
10344 (regset_fill_func, regset_store_func): New.
10345 (enum regset_type): New.
10346 (struct regset_info): Add type field. Use new operation types.
10347 (struct linux_target_ops): stop_pc renamed to get_pc.
10348 Add decr_pc_after_break and breakpoint_at.
10349 (get_process, get_thread_proess, get_process_thread)
10350 (strut process_info, all_processes, linux_attach_lwp)
10351 (thread_db_init): New.
10353 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10354 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10355 (the_low_target): Add new members.
10356 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10357 (i386_store_fpxregset): Constify.
10358 (target_regsets): Add new kind identifier.
10359 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10360 (i386_set_pc): Add debugging.
10361 (i386_breakpoint_at): New function.
10362 (the_low_target): Add new members.
10363 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10364 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10365 (mips_breakpoint_at): New.
10366 (the_low_target): Add new members.
10367 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10368 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10369 (the_low_target): Add new members.
10370 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10371 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10372 (the_low_target): Add new members.
10373 * linux-x86-64-low.c (target_regsets): Add new kind
10376 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10378 From Martin Pool <mbp@samba.org>:
10379 * server.c (gdbserver_usage): New function.
10382 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10384 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10385 stop_at -> stop_pc.
10387 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10389 * Makefile.in: Remove obsolete code.
10391 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10393 * linux-low.c (regsets_fetch_inferior_registers),
10394 (regsets_store_inferior_registers): Removed cast to int from
10396 * regcache.h: Added declaration of struct inferior_info.
10398 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10400 * inferiors.c (struct inferior_info): Add regcache_data.
10401 (add_inferior): Call create_register_cache.
10402 (clear_inferiors): Call free_register_cache.
10403 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10404 * regcache.c (struct inferior_regcache_data): New.
10405 (registers): Remove.
10406 (get_regcache): New function.
10407 (create_register_cache, free_register_cache): New functions.
10408 (set_register_cache): Don't initialize the register cache here.
10409 (registers_to_string, registers_from_string, register_data): Call
10411 * regcache.h: Add prototypes.
10412 * server.h: Likewise.
10414 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10416 * mem-break.c: New file.
10417 * mem-break.h: New file.
10418 * Makefile.in: Add mem-break.o rule; update server.h
10420 * inferiors.c (struct inferior_info): Add target_data
10422 (clear_inferiors): Free target_data member if set.
10423 (inferior_target_data, set_inferior_target_data): New functions.
10424 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10425 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10426 * linux-low.c (linux_bp_reinsert): New variable.
10427 (struct inferior_linux_data): New.
10428 (linux_create_inferior): Use set_inferior_target_data.
10429 (linux_attach): Likewise. Call add_inferior.
10430 (linux_wait_for_one_inferior): New function.
10431 (linux_wait): Call it.
10432 (linux_write_memory): Add const.
10433 (initialize_low): Call set_breakpoint_data.
10434 * linux-low.h (struct linux_target_ops): Add breakpoint
10436 * server.c (attach_inferior): Remove extra add_inferior
10438 * server.h: Include mem-break.h. Update inferior.c
10440 * target.c (read_inferior_memory)
10441 (write_inferior_memory): New functions.
10442 * target.h (read_inferior_memory)
10443 (write_inferior_memory): Change macros to prototypes.
10444 (struct target_ops): Update comments. Add const to write_memory
10447 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10449 * linux-low.c (usr_store_inferior_registers): Support
10450 registers which are allowed to fail to store.
10451 * linux-low.h (linux_target_ops): Likewise.
10452 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10453 (ppc_cannot_store_register): FPSCR may not be storable.
10455 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10457 * server.h: Include <string.h> if HAVE_STRING_H.
10458 * ChangeLog: Correct paths in last ChangeLog entry.
10460 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10462 * linux-low.h: Remove obsolete prototypes.
10463 (struct linux_target_ops): New.
10464 (extern the_low_target): New.
10465 * linux-low.c (num_regs, regmap): Remove declarations.
10466 (register_addr): Use the_low_target explicitly.
10467 (fetch_register): Likewise.
10468 (usr_fetch_inferior_registers): Likewise.
10469 (usr_store_inferior_registers): Likewise.
10470 * linux-arm-low.c (num_regs): Remove.
10471 (arm_num_regs): Define.
10472 (arm_regmap): Renamed from regmap, made static.
10473 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10475 (arm_cannot_store_register): Renamed from cannot_store_register,
10477 (the_low_target): New.
10478 * linux-i386-low.c (num_regs): Remove.
10479 (i386_num_regs): Define.
10480 (i386_regmap): Renamed from regmap, made static.
10481 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10483 (i386_cannot_store_register): Renamed from cannot_store_register,
10485 (the_low_target): New.
10486 * linux-ia64-low.c (num_regs): Remove.
10487 (ia64_num_regs): Define.
10488 (ia64_regmap): Renamed from regmap, made static.
10489 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10491 (ia64_cannot_store_register): Renamed from cannot_store_register,
10493 (the_low_target): New.
10494 * linux-m68k-low.c (num_regs): Remove.
10495 (m68k_num_regs): Define.
10496 (m68k_regmap): Renamed from regmap, made static.
10497 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10499 (m68k_cannot_store_register): Renamed from cannot_store_register,
10501 (the_low_target): New.
10502 * linux-mips-low.c (num_regs): Remove.
10503 (mips_num_regs): Define.
10504 (mips_regmap): Renamed from regmap, made static.
10505 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10507 (mips_cannot_store_register): Renamed from cannot_store_register,
10509 (the_low_target): New.
10510 * linux-ppc-low.c (num_regs): Remove.
10511 (ppc_num_regs): Define.
10512 (ppc_regmap): Renamed from regmap, made static.
10513 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10515 (ppc_cannot_store_register): Renamed from cannot_store_register,
10517 (the_low_target): New.
10518 * linux-s390-low.c (num_regs): Remove.
10519 (s390_num_regs): Define.
10520 (s390_regmap): Renamed from regmap, made static.
10521 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10523 (s390_cannot_store_register): Renamed from cannot_store_register,
10525 (the_low_target): New.
10526 * linux-sh-low.c (num_regs): Remove.
10527 (sh_num_regs): Define.
10528 (sh_regmap): Renamed from regmap, made static.
10529 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10531 (sh_cannot_store_register): Renamed from cannot_store_register,
10533 (the_low_target): New.
10534 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10535 (the_low_target): New.
10537 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10539 * Makefile.in: Add stamp-h target.
10540 * configure.in: Create stamp-h.
10541 * configure: Regenerated.
10543 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10545 * inferiors.c: New file.
10546 * target.c: New file.
10547 * target.h: New file.
10548 * Makefile.in: Add target.o and inferiors.o. Update
10550 * linux-low.c (inferior_pid): New static variable,
10551 moved from server.c.
10552 (linux_create_inferior): Renamed from create_inferior.
10553 Call add_inferior. Return 0 on success instead of a PID.
10554 (linux_attach): Renamed from myattach.
10555 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10556 (linux_thread_alive): Renamed from mythread_alive.
10557 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10559 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10560 (regsets_store_inferior_registers): Correct error message.
10561 Add missing ``return 0''.
10562 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10563 (linux_store_registers): Renamed from store_inferior_registers.
10564 (linux_read_memory): Renamed from read_inferior_memory.
10565 (linux_write_memory): Renamed from write_inferior_memory.
10566 (linux_target_ops): New structure.
10567 (initialize_low): Call set_target_ops ().
10568 * remote-utils.c (unhexify): New function.
10569 (hexify): New function.
10570 (input_interrupt): Send signals to ``signal_pid''.
10571 * server.c (inferior_pid): Remove.
10572 (start_inferior): Update create_inferior call.
10573 (attach_inferior): Call add_inferior.
10574 (handle_query): New function.
10575 (main): Call handle_query for `q' packets.
10576 * server.h: Include "target.h". Remove obsolete prototypes.
10577 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10579 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10581 * Makefile.in: Add WARN_CFLAGS. Update configury
10583 * configure.in: Check for <string.h>
10584 * configure: Regenerate.
10585 * config.in: Regenerate.
10586 * gdbreplay.c: Include needed system headers.
10587 (remote_open): Remove strchr prototype.
10588 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10589 * regcache.c (supply_register): Change buf argument to const void *.
10590 (supply_register_by_name): Likewise.
10591 (collect_register): Change buf argument to void *.
10592 (collect_register_by_name): Likewise.
10593 * regcache.h: Add missing prototypes.
10594 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10595 * server.c (handle_query): New function.
10596 (attached): New static variable, moved out of main.
10597 (main): Quiet longjmp clobber warnings.
10598 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10599 * utils.c (error): Remove NORETURN.