1 2015-02-23 Pedro Alves <palves@redhat.com>
3 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4 thread was doing a step-over; always adjust the PC if
5 we stepped over a permanent breakpoint.
6 (linux_wait_1): If we stepped over breakpoint that was on top of a
7 permanent breakpoint, manually advance the PC past it.
9 2015-02-23 Pedro Alves <palves@redhat.com>
11 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
13 (x86_fill_gregset, x86_store_gregset): Use it when handling
16 2015-02-20 Pedro Alves <palves@redhat.com>
18 * thread-db.c: Include "nat/linux-procfs.h".
19 (thread_db_init): Skip listing new threads if the kernel supports
20 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
22 2015-02-20 Pedro Alves <palves@redhat.com>
24 * linux-low.c (status_pending_p_callback): Use ptid_match.
26 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
29 * linux-low.c (wstatus_maybe_breakpoint): Remove.
30 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
31 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
33 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
36 * tracepoint.c (cmd_qtinit): Add check for current_thread.
38 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
40 * linux-low.c (linux_low_btrace_conf): Print size.
41 * server.c (handle_btrace_conf_general_set): New.
42 (hanle_general_set): Call handle_btrace_conf_general_set.
43 (handle_query): Report Qbtrace-conf:bts:size as supported.
45 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
47 * linux-low.c (linux_low_enable_btrace): Update parameters.
48 (linux_low_btrace_conf): New.
49 (linux_target_ops)<to_btrace_conf>: Initialize.
50 * server.c (current_btrace_conf): New.
51 (handle_btrace_enable): Rename to ...
52 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
53 to target_enable_btrace. Update comment. Update users.
54 (handle_qxfer_btrace_conf): New.
55 (qxfer_packets): Add btrace-conf entry.
56 (handle_query): Report qXfer:btrace-conf:read as supported packet.
57 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
58 (target_ops)<read_btrace_conf>: New.
59 (target_enable_btrace): Update parameters.
60 (target_read_btrace_conf): New.
62 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
64 * server.c (handle_btrace_general_set): Remove call to
65 target_supports_btrace.
66 (supported_btrace_packets): New.
67 (handle_query): Call supported_btrace_packets.
68 * target.h: include btrace-common.h.
69 (btrace_target_info): Removed.
70 (supports_btrace, target_supports_btrace): Update parameters.
72 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
74 * Makefile.in (SFILES): Add common/btrace-common.c.
75 (OBS): Add common/btrace-common.o.
76 (btrace-common.o): Add build rules.
77 * linux-low: Include btrace-common.h.
78 (linux_low_read_btrace): Use struct btrace_data. Call
79 btrace_data_init and btrace_data_fini.
81 2015-02-06 Pedro Alves <palves@redhat.com>
83 * thread-db.c (find_new_threads_callback): Add debug output.
85 2015-02-04 Pedro Alves <palves@redhat.com>
87 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
88 (resume_stopped_resumed_lwps): New function.
89 (linux_wait_for_event_filtered): Use it.
91 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
93 * Makefile.in (SFILES): Add linux-personality.c.
94 (linux-personality.o): New rule.
95 * configure.srv (srv_linux_obj): Add linux-personality.o to the
96 list of objects to be built.
97 * linux-low.c: Include nat/linux-personality.h.
98 (linux_create_inferior): Remove code to disable address space
99 randomization (moved to ../nat/linux-personality.c). Create
100 cleanup to disable address space randomization.
102 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
104 * Makefile.in (posix-strerror.o): New rule.
105 (mingw-strerror.o): Likewise.
106 * configure: Regenerated.
107 * configure.ac: Source file ../common/common.host. Initialize new
108 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
110 2015-01-14 Yao Qi <yao@codesourcery.com>
112 * Makefile.in (SFILES): Add nat/ppc-linux.c.
113 (ppc-linux.o): New rule.
114 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
115 * configure.ac: AC_CHECK_FUNCS(getauxval).
116 * config.in: Re-generated.
117 * configure: Re-generated.
118 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
119 ppc64_64bit_inferior_p
121 2015-01-14 Yao Qi <yao@codesourcery.com>
123 * linux-ppc-low.c: Include "nat/ppc-linux.h".
124 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
125 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
126 (PT_ORIG_R3, PT_TRAP): Likewise.
127 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
128 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
129 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
131 2015-01-10 Joel Brobecker <brobecker@adacore.com>
133 * i387-fp.c (i387_cache_to_xsave): In look over
134 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
135 zmmh_low_space field by use of zmmh_high_space.
137 2015-01-09 Pedro Alves <palves@redhat.com>
139 * linux-low.c (step_over_bkpt): Move higher up in the file.
140 (handle_extended_wait): Don't store the stop_pc here.
141 (get_stop_pc): Adjust comments and rename to ...
142 (check_stopped_by_breakpoint): ... this. Record whether the LWP
143 stopped for a software breakpoint or hardware breakpoint.
144 (thread_still_has_status_pending_p): New function.
145 (status_pending_p_callback): Use
146 thread_still_has_status_pending_p. If the event is no longer
147 interesting, resume the LWP.
148 (handle_tracepoints): Add assert.
149 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
150 (wstatus_maybe_breakpoint): New function.
151 (cancel_breakpoint): Delete function.
152 (check_stopped_by_watchpoint): New function, factored out from
153 linux_low_filter_event.
154 (lp_status_maybe_breakpoint): Delete function.
155 (linux_low_filter_event): Remove filter_ptid argument.
156 Leave thread group exits pending here. Store the LWP's stop PC.
157 Always leave events pending.
158 (linux_wait_for_event_filtered): Pull all events out of the
159 kernel, and leave them all pending.
160 (count_events_callback, select_event_lwp_callback): Consider all
162 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
163 (select_event_lwp): Only give preference to the stepping LWP in
164 all-stop mode. Adjust comments.
165 (ignore_event): New function.
166 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
167 references to cancel_breakpoints. Adjust to renames. Also give
168 equal priority to all LWPs that have had events in non-stop mode.
169 If reporting a software breakpoint event, unadjust the LWP's PC.
170 (linux_wait): If linux_wait_1 returned an ignored event, retry.
171 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
173 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
174 (resume_status_pending_p): Use thread_still_has_status_pending_p.
175 (linux_stopped_by_watchpoint): Adjust.
176 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
177 * linux-low.h (enum lwp_stop_reason): New.
178 (struct lwp_info) <stop_pc>: Adjust comment.
179 <stopped_by_watchpoint>: Delete field.
180 <stop_reason>: New field.
181 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
182 * mem-break.c (software_breakpoint_inserted_here)
183 (hardware_breakpoint_inserted_here): New function.
184 * mem-break.h (software_breakpoint_inserted_here)
185 (hardware_breakpoint_inserted_here): Declare.
186 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
187 (cancel_breakpoints): Delete.
188 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
189 (upload_fast_traceframes): Remove references to
192 2015-01-09 Pedro Alves <palves@redhat.com>
194 * thread-db.c (find_new_threads_callback): Ignore thread if the
195 kernel thread ID is -1.
197 2015-01-09 Pedro Alves <palves@redhat.com>
199 * linux-low.c (linux_attach_fail_reason_string): Move to
200 nat/linux-ptrace.c, and rename.
201 (linux_attach_lwp): Update comment.
202 (attach_proc_task_lwp_callback): New function.
203 (linux_attach): Adjust to rename and use
204 linux_proc_attach_tgid_threads.
205 (linux_attach_fail_reason_string): Delete declaration.
207 2015-01-01 Joel Brobecker <brobecker@adacore.com>
209 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
210 * server.c (gdbserver_version): Likewise.
212 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
214 * remote-utils.c: Include ctype.h.
215 (input_interrupt): Explicitly handle the case when the char
216 received is the NUL byte. Improve the printing of non-ASCII
219 2014-12-16 Joel Brobecker <brobecker@adacore.com>
221 * linux-low.c (linux_low_filter_event): Update call to
222 linux_enable_event_reporting following the addition of
223 a new parameter to that function.
225 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
228 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
229 (AARCH64_FPCR_REGNO): Likewise.
230 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
231 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
232 (aarch64_store_fpregset): Likewise.
234 2014-12-15 Joel Brobecker <brobecker@adacore.com>
236 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
237 Remove FIXME comment about assumption about N.
239 2014-12-13 Joel Brobecker <brobecker@adacore.com>
241 * configure.ac: If large-file support is disabled in GDBserver,
242 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
243 * configure: Regenerate.
245 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
247 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
248 warning upon ENODATA from ptrace.
249 * linux-s390-low.c (s390_store_tdb): New.
250 (s390_regsets): Add regset for NT_S390_TDB.
252 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
254 * linux-low.c (regsets_store_inferior_registers): Skip regsets
255 without a fill_function.
256 * linux-s390-low.c (s390_fill_last_break): Remove.
257 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
258 (s390_arch_setup): Use regset's size instead of fill_function for
261 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
263 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
264 the regset's store function when ptrace returned an error.
265 * regcache.c (get_thread_regcache): Invalidate register cache
266 before fetching inferior's registers.
268 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
270 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
271 while-loop as for-loop.
272 (regsets_store_inferior_registers): Likewise.
274 2014-11-28 Yao Qi <yao@codesourcery.com>
276 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
277 * config.in, configure: Re-generate.
278 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
281 2014-11-21 Yao Qi <yao@codesourcery.com>
283 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
284 (AC_CHECK_HEADERS): Remove malloc.h.
285 * configure: Re-generated.
286 * config.in: Re-generated.
287 * server.h: Don't include alloca.h and malloc.h.
288 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
289 Don't include malloc.h.
291 2014-11-17 Joel Brobecker <brobecker@adacore.com>
293 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
294 corresponding ERRNO check in same block.
296 2014-11-12 Pedro Alves <palves@redhat.com>
298 * server.c (cont_thread): Update comment.
299 (start_inferior, attach_inferior): No longer clear cont_thread.
300 (handle_v_cont): No longer set cont_thread.
301 (captured_main): Clear cont_thread each time a GDB connects.
303 2014-11-12 Pedro Alves <palves@redhat.com>
305 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
306 thread, and don't resume all threads if the Hc thread has exited.
308 2014-11-12 Pedro Alves <palves@redhat.com>
310 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
311 the process group instead of to a specific LWP.
313 2014-10-15 Pedro Alves <palves@redhat.com>
316 * win32-arm-low.c (arm_set_thread_context): Remove current_event
318 (arm_set_thread_context): Delete.
319 (the_low_target): Adjust.
320 * win32-i386-low.c (debug_registers_changed)
321 (debug_registers_used): Delete.
322 (update_debug_registers_callback): New function.
323 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
324 needing to update their debug registers.
325 (win32_get_current_dr): New function.
326 (x86_dr_low_get_addr, x86_dr_low_get_control)
327 (x86_dr_low_get_status): Fetch the debug register from the thread
329 (i386_initial_stuff): Adjust.
330 (i386_get_thread_context): Remove current_event parameter. Don't
331 clear debug_registers_changed nor copy DR values to
333 (i386_set_thread_context): Delete.
334 (i386_prepare_to_resume): New function.
335 (i386_thread_added): Mark the thread as needing to update irs
337 (the_low_target): Remove i386_set_thread_context and install
338 i386_prepare_to_resume.
339 * win32-low.c (win32_get_thread_context): Adjust.
340 (win32_set_thread_context): Use SetThreadContext
342 (win32_prepare_to_resume): New function.
343 (win32_require_context): New function, factored out from ...
344 (thread_rec): ... this.
345 (continue_one_thread): Call win32_prepare_to_resume on each thread
346 we're about to continue.
347 (win32_resume): Call win32_prepare_to_resume on the event thread.
348 * win32-low.h (struct win32_thread_info)
349 <debug_registers_changed>: New field.
350 (struct win32_target_ops): Change prototype of set_thread_context,
351 delete set_thread_context and add prepare_to_resume.
352 (win32_require_context): New declaration.
354 2014-10-08 Gary Benson <gbenson@redhat.com>
356 * server.h: Do not include common-exceptions.h.
358 2014-10-08 Gary Benson <gbenson@redhat.com>
360 * server.h: Do not include cleanups.h.
362 2014-09-30 James Hogan <james.hogan@imgtec.com>
364 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
367 2014-09-23 Yao Qi <yao@codesourcery.com>
369 * linux-low.c (lp_status_maybe_breakpoint): New function.
370 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
371 (count_events_callback): Likewise.
372 (select_event_lwp_callback): Likewise.
373 (cancel_breakpoints_callback): Likewise.
375 2014-09-19 Don Breazeal <donb@codesourcery.com>
377 * linux-low.c (handle_extended_wait): Call
378 linux_ptrace_get_extended_event.
379 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
380 linux_is_extended_waitstatus.
382 2014-09-16 Joel Brobecker <brobecker@adacore.com>
384 * Makefile.in (CPPFLAGS): Define.
385 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
386 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
388 2014-09-16 Gary Benson <gbenson@redhat.com>
390 * inferiors.h (current_inferior): Renamed as...
391 (current_thread): New variable. All uses updated.
392 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
393 (maybe_move_out_of_jump_pad): Likewise.
394 (cancel_breakpoint): Likewise.
395 (linux_low_filter_event): Likewise.
396 (wait_for_sigstop): Likewise.
397 (linux_resume_one_lwp): Likewise.
398 (need_step_over_p): Likewise.
399 (start_step_over): Likewise.
400 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
401 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
402 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
403 and save_inferior as saved_thread.
404 * regcache.c (get_thread_regcache): Renamed saved_inferior as
406 (regcache_invalidate_thread): Likewise.
407 * remote-utils.c (prepare_resume_reply): Likewise.
408 * thread-db.c (thread_db_get_tls_address): Likewise.
409 (disable_thread_event_reporting): Likewise.
410 (remove_thread_event_breakpoints): Likewise.
411 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
413 * target.h (set_desired_inferior): Renamed as...
414 (set_desired_thread): New declaration. All uses updated.
415 * server.c (myresume): Updated comment to reference thread instead
417 (handle_serial_event): Likewise.
418 (handle_target_event): Likewise.
420 2014-09-12 Tom Tromey <tromey@redhat.com>
421 Gary Benson <gbenson@redhat.com>
423 * regcache.h: Include common-regcache.h.
424 (regcache_read_pc): Don't declare.
425 * regcache.c (get_thread_regcache_for_ptid): New function.
427 2014-09-11 Tom Tromey <tromey@redhat.com>
428 Gary Benson <gbenson@redhat.com>
430 * symbol.c: New file.
431 * Makefile.in (SFILES): Add symbol.c.
434 2014-09-11 Gary Benson <gbenson@redhat.com>
436 * target.c (target_stop_ptid, target_continue_ptid): New
439 2014-09-11 Tom Tromey <tromey@redhat.com>
440 Gary Benson <gbenson@redhat.com>
442 * target.h: Include target/target.h.
443 * target.c (target_read_memory, target_read_uint32)
444 (target_write_memory): New functions.
446 2014-09-11 Gary Benson <gbenson@redhat.com>
448 * server.h (debug_hw_points): Don't declare.
449 * server.c (debug_hw_points): Don't define. Replace all uses
450 with show_debug_regs.
451 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
452 all uses with show_debug_regs.
454 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
456 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
457 endianness into account.
458 (ppc_supply_ptrace_register): Likewise.
460 2014-09-03 James Hogan <james.hogan@imgtec.com>
462 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
463 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
465 2014-09-03 Gary Benson <gbenson@redhat.com>
467 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
468 ALL_DEBUG_ADDRESS_REGISTERS.
470 2014-09-02 Gary Benson <gbenson@redhat.com>
472 * i386-low.h: Renamed as...
473 * x86-low.h: New file. All type, function and variable name
474 prefixes changed from "i386_" to "x86_". All references updated.
475 * i386-low.c: Renamed as...
476 * x86-low.c: New file. All type, function and variable name
477 prefixes changed from "i386_" to "x86_". All references updated.
479 2014-09-02 Gary Benson <gbenson@redhat.com>
481 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
482 (x86_linux_new_thread): Likewise.
484 2014-08-29 Gary Benson <gbenson@redhat.com>
486 * server.h (setjmp.h): Do not include.
487 (toplevel): Do not declare.
488 (common-exceptions.h): Include.
489 (cleanups.h): Likewise.
490 * server.c (toplevel): Do not define.
491 (exit_code): New static global.
492 (detach_or_kill_for_exit_cleanup): New function.
493 (main): New function. Original main renamed to...
494 (captured_main): New function.
495 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
497 2014-08-29 Gary Benson <gbenson@redhat.com>
499 * Makefile.in (SFILES): Add common/common-exceptions.c.
500 (OBS): Add common-exceptions.o.
501 (common-exceptions.o): New rule.
502 * utils.c (prepare_to_throw_exception): New function.
504 2014-08-29 Gary Benson <gbenson@redhat.com>
506 * config.in: Regenerate.
507 * configure: Likewise.
509 2014-08-29 Gary Benson <gbenson@redhat.com>
511 * Makefile.in (SFILES): Add common/cleanups.c.
513 (cleanups.o): New rule.
515 2014-08-29 Gary Benson <gbenson@redhat.com>
517 * utils.c (internal_vwarning): New function.
519 2014-08-28 Gary Benson <gbenson@redhat.com>
521 * utils.h (fatal): Remove declaration.
522 * utils.c (fatal): Remove function.
524 2014-08-28 Gary Benson <gbenson@redhat.com>
526 * tracepoint.c (gdb_agent_init): Replace fatal with
528 (initialize_tracepoint): Likewise.
530 2014-08-28 Gary Benson <gbenson@redhat.com>
532 * remote-utils.c (remote_prepare): Replace fatal with error.
534 2014-08-28 Gary Benson <gbenson@redhat.com>
536 * linux-low.c (linux_async): Replace fatal with warning.
538 (linux_start_non_stop): Return -1 if linux_async failed.
540 2014-08-28 Gary Benson <gbenson@redhat.com>
542 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
544 (i386_dr_low_get_addr): Remove vague comment.
545 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
548 2014-08-28 Gary Benson <gbenson@redhat.com>
550 * inferiors.c (get_thread_process): Replace check with gdb_assert.
551 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
553 (linux_resume_one_lwp): Likewise.
554 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
556 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
558 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
559 (init_register_cache): Replace fatal with gdb_assert_not_reached.
560 (find_register_by_name): Replace fatal with internal_error.
561 (find_regno): Likewise.
562 * tdesc.c (init_target_desc): Replace check with gdb_assert.
563 * thread-db.c (thread_db_create_event): Likewise.
564 (thread_db_load_search): Likewise.
565 (try_thread_db_load_1): Likewise.
566 * tracepoint.c (get_jump_space_head): Replace fatal with
568 (claim_trampoline_space): Likewise.
569 (have_fast_tracepoint_trampoline_buffer): Likewise.
570 (cmd_qtstart): Likewise.
571 (stop_tracing): Likewise.
572 (fast_tracepoint_collecting): Likewise.
573 (target_malloc): Likewise.
574 (download_tracepoint): Likewise.
575 (download_trace_state_variables): Replace check with gdb_assert.
576 (upload_fast_traceframes): Replace fatal with internal_error.
578 2014-08-19 Tom Tromey <tromey@redhat.com>
579 Gary Benson <gbenson@redhat.com>
581 * Makefile.in (SFILES): Add common/common-debug.c.
582 (OBS): Add common-debug.o.
583 (common-debug.o): New rule.
584 * debug.h (debug_printf): Don't declare.
585 * debug.c (debug_printf): Renamed and rewritten as...
586 (debug_vprintf): New function.
588 2014-08-19 Gary Benson <gbenson@redhat.com>
590 * utils.h: Do not include print-utils.h.
592 2014-08-19 Tom Tromey <tromey@redhat.com>
593 Gary Benson <gbenson@redhat.com>
595 * server.h: Add static assertion.
596 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
598 2014-08-19 Tom Tromey <tromey@redhat.com>
599 Gary Benson <gbenson@redhat.com>
601 * Makefile.in (SFILES): Add common/errors.c.
603 (IPA_OBS): Add errors-ipa.o.
604 (errors.o): New rule.
605 (errors-ipa.o): Likewise.
606 * utils.h (perror_with_name, error, warning): Don't declare.
607 * utils.c (warning): Renamed and rewritten as...
608 (vwarning): New function.
609 (error): Renamed and rewritten as...
610 (verror): New function.
611 (internal_error): Renamed and rewritten as...
612 (internal_verror): New function.
614 2014-08-07 Gary Benson <gbenson@redhat.com>
616 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
617 * configure: Regenerate.
618 * config.in: Likewise.
619 * server.h: Do not include errno.h.
620 * event-loop.c: Likewise.
621 * hostio-errno.c: Likewise.
622 * linux-low.c: Likewise.
623 * remote-utils.c: Likewise.
624 * spu-low.c: Likewise.
626 * gdbreplay.c: Unconditionally include errno.h.
628 2014-08-07 Gary Benson <gbenson@redhat.com>
630 * server.h: Do not include string.h.
631 * event-loop.c: Likewise.
632 * linux-low.c: Likewise.
633 * regcache.c: Likewise.
634 * remote-utils.c: Likewise.
635 * spu-low.c: Likewise.
638 2014-08-07 Gary Benson <gbenson@redhat.com>
640 * server.h: Do not include gdb_assert.h.
642 2014-08-07 Gary Benson <gbenson@redhat.com>
644 * server.h: Do not include common-utils.h.
646 2014-08-07 Gary Benson <gbenson@redhat.com>
648 * server.h: Do not include ptid.h.
651 2014-08-07 Gary Benson <gbenson@redhat.com>
653 * server.h: Do not include gdb_locale.h.
655 2014-08-07 Gary Benson <gbenson@redhat.com>
657 * server.h: Do not include gdb/signals.h.
658 * win32-low.c: Likewise.
660 2014-08-07 Gary Benson <gbenson@redhat.com>
662 * server.h: Do not include pathmax.h.
664 2014-08-07 Gary Benson <gbenson@redhat.com>
666 * server.h: Do not include libiberty.h.
667 * linux-bfin-low.c: Likewise.
669 2014-08-07 Gary Benson <gbenson@redhat.com>
671 * server.h: Do not include ansidecl.h.
673 2014-08-07 Gary Benson <gbenson@redhat.com>
675 * linux-x86-low.c: Do not include stddef.h.
676 * lynx-ppc-low.c: Likewise.
677 * tracepoint.c: Likewise.
679 2014-08-07 Gary Benson <gbenson@redhat.com>
681 * server.h: Do not include stdarg.h.
682 * nto-low.c: Likewise.
684 2014-08-07 Gary Benson <gbenson@redhat.com>
686 * server.h: Do not include stdlib.h.
687 * inferiors.c: Likewise.
688 * linux-low.c: Likewise.
689 * regcache.c: Likewise.
690 * spu-low.c: Likewise.
691 * tracepoint.c: Likewise.
694 2014-08-07 Gary Benson <gbenson@redhat.com>
696 * server.h: Do not include stdio.h.
697 * linux-low.c: Likewise.
698 * remote-utils.c: Likewise.
699 * spu-low.c: Likewise.
701 * wincecompat.c: Likewise.
703 2014-08-06 Gary Benson <gbenson@redhat.com>
705 * regcache.c (init_register_cache): Move conditionals inside if.
707 2014-08-06 Gary Benson <gbenson@redhat.com>
709 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
711 2014-07-31 Gary Benson <gbenson@redhat.com>
713 * ax.h: Do not include server.h.
714 * gdbthread.h: Likewise.
715 * lynx-low.h: Likewise.
718 2014-07-30 Gary Benson <gbenson@redhat.com>
720 * server.h: Include common-defs.h.
721 Do not include config.h or build-gnulib-gdbserver/config.h.
723 2014-07-30 Gary Benson <gbenson@redhat.com>
725 * hostio-errno.c: Move server.h to top of includes list.
726 * inferiors.c: Likewise.
727 * linux-x86-low.c: Likewise.
728 * notif.c: Include server.h.
730 2014-07-24 Tom Tromey <tromey@redhat.com>
731 Gary Benson <gbenson@redhat.com>
733 * server.h (CORE_ADDR): Now unsigned.
735 2014-07-16 Pedro Alves <palves@redhat.com>
737 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
739 2014-07-15 Pedro Alves <palves@redhat.com>
741 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
744 2014-07-11 Pedro Alves <palves@redhat.com>
746 * linux-low.c (kill_wait_lwp): New function, based on
747 kill_one_lwp_callback, but use my_waitpid directly.
748 (kill_one_lwp_callback, linux_kill): Use it.
750 2014-06-23 Pedro Alves <palves@redhat.com>
752 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
753 before setting DR0..DR3.
755 2014-06-20 Gary Benson <gbenson@redhat.com>
757 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
758 * configure: Regenerated.
759 * config.in: Likewise.
761 2014-06-20 Gary Benson <gbenson@redhat.com>
763 * Makefile.in (SFILES): Update locations for files moved
765 (object file files): Reordered.
767 2014-06-20 Gary Benson <gbenson@redhat.com>
769 * i386-low.h (i386_dr_low_can_set_addr): Removed.
770 (i386_dr_low_set_addr): Likewise.
771 (i386_dr_low_get_addr): Likewise.
772 (i386_dr_low_can_set_control): Likewise.
773 (i386_dr_low_set_control): Likewise.
774 (i386_dr_low_get_control): Likewise.
775 (i386_dr_low_get_status): Likewise.
776 (i386_get_debug_register_length): Likewise.
777 * linux-x86-low.c (i386_dr_low_set_addr):
778 Changed signature. Made static.
779 (i386_dr_low_get_addr): Likewise.
780 (i386_dr_low_set_control): Likewise.
781 (i386_dr_low_get_control): Likewise.
782 (i386_dr_low_get_status): Likewise.
783 (i386_dr_low): New global variable.
784 * win32-i386-low.c (i386_dr_low_set_addr):
785 Changed signature. Made static.
786 (i386_dr_low_get_addr): Likewise.
787 (i386_dr_low_set_control): Likewise.
788 (i386_dr_low_get_control): Likewise.
789 (i386_dr_low_get_status): Likewise.
790 (i386_dr_low): New global variable.
792 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
794 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
795 * Makefile.in (AR, AR_FLAGS): Define.
796 * configure: Regenerate.
798 2014-06-19 Gary Benson <gbenson@redhat.com>
800 * Makefile.in (i386-dregs.o): New rule.
801 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
802 * i386-low.c (target.h): Remove include.
803 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
804 (DR_CONTROL_SHIFT): Likewise.
805 (DR_CONTROL_SIZE): Likewise.
806 (DR_RW_EXECUTE): Likewise.
807 (DR_RW_WRITE): Likewise.
808 (DR_RW_READ): Likewise.
809 (DR_RW_IORW): Likewise.
810 (DR_LEN_1): Likewise.
811 (DR_LEN_2): Likewise.
812 (DR_LEN_4): Likewise.
813 (DR_LEN_8): Likewise.
814 (DR_LOCAL_ENABLE_SHIFT): Likewise.
815 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
816 (DR_ENABLE_SIZE): Likewise.
817 (DR_LOCAL_SLOWDOWN): Likewise.
818 (DR_GLOBAL_SLOWDOWN): Likewise.
819 (DR_CONTROL_RESERVED): Likewise.
820 (I386_DR_CONTROL_MASK): Likewise.
821 (I386_DR_VACANT): Likewise.
822 (I386_DR_LOCAL_ENABLE): Likewise.
823 (I386_DR_GLOBAL_ENABLE): Likewise.
824 (I386_DR_DISABLE): Likewise.
825 (I386_DR_SET_RW_LEN): Likewise.
826 (I386_DR_GET_RW_LEN): Likewise.
827 (I386_DR_WATCH_HIT): Likewise.
828 (i386_wp_op_t): Likewise.
829 (i386_show_dr): Likewise.
830 (i386_length_and_rw_bits): Likewise.
831 (i386_insert_aligned_watchpoint): Likewise.
832 (i386_remove_aligned_watchpoint): Likewise.
833 (i386_handle_nonaligned_watchpoint): Likewise.
834 i386_update_inferior_debug_regs(): Likewise.
835 (i386_dr_insert_watchpoint): Likewise.
836 (i386_dr_remove_watchpoint): Likewise.
837 (i386_dr_region_ok_for_watchpoint): Likewise.
838 (i386_dr_stopped_data_address): Likewise.
839 (i386_dr_stopped_by_watchpoint): Likewise.
841 2014-06-19 Gary Benson <gbenson@redhat.com>
843 * i386-low.c (i386_dr_show): Renamed to
844 i386_show_dr and made static. All uses updated.
845 (i386_dr_length_and_rw_bits): Renamed to
846 i386_length_and_rw_bits and made static.
848 (i386_dr_insert_aligned_watchpoint): Renamed to
849 i386_insert_aligned_watchpoint and made static.
851 (i386_dr_remove_aligned_watchpoint): Renamed to
852 i386_remove_aligned_watchpoint and made static.
854 (i386_dr_update_inferior_debug_regs): Renamed to
855 i386_update_inferior_debug_regs and made static.
858 2014-06-18 Gary Benson <gbenson@redhat.com>
860 * i386-low.h (i386_dr_low_can_set_addr): New macro.
861 (i386_dr_low_can_set_control): Likewise.
862 (i386_get_debug_register_length): Likewise.
863 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
864 (i386_dr_low_can_set_control): Likewise.
865 (i386_get_debug_register_length): Likewise.
867 2014-06-17 Gary Benson <gbenson@redhat.com>
869 * i386-low.h (i386-dregs.h): New include.
870 (DR_FIRSTADDR): Now in i386-dregs.h.
871 (DR_LASTADDR): Likewise.
872 (DR_NADDR): Likewise.
873 (DR_STATUS): Likewise.
874 (DR_CONTROL): Likewise.
875 (i386_debug_reg_state): Likewise.
876 (i386_dr_insert_watchpoint): Likewise.
877 (i386_dr_remove_watchpoint): Likewise.
878 (i386_dr_region_ok_for_watchpoint): Likewise.
879 (i386_dr_stopped_data_address): Likewise.
880 (i386_dr_stopped_by_watchpoint): Likewise.
881 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
883 2014-06-18 Gary Benson <gbenson@redhat.com>
885 * i386-low.h (i386_low_insert_watchpoint): Renamed to
886 i386_dr_insert_watchpoint.
887 (i386_low_remove_watchpoint): Renamed to
888 i386_dr_remove_watchpoint.
889 (i386_low_region_ok_for_watchpoint): Renamed to
890 i386_dr_region_ok_for_watchpoint.
891 (i386_low_stopped_data_address): Renamed to
892 i386_dr_stopped_data_address.
893 (i386_low_stopped_by_watchpoint): Renamed to
894 i386_dr_stopped_by_watchpoint.
895 * i386-low.c (i386_show_dr): Renamed to
896 i386_dr_show and made nonstatic. All uses updated.
897 (i386_length_and_rw_bits): Renamed to
898 i386_dr_length_and_rw_bits and made nonstatic.
900 (i386_insert_aligned_watchpoint): Renamed to
901 i386_dr_insert_aligned_watchpoint and made nonstatic.
903 (i386_remove_aligned_watchpoint): Renamed to
904 i386_dr_remove_aligned_watchpoint and made nonstatic.
906 (i386_update_inferior_debug_regs): Renamed to
907 i386_dr_update_inferior_debug_regs and made nonstatic.
909 (i386_low_insert_watchpoint): Renamed to
910 i386_dr_insert_watchpoint. All uses updated.
911 (i386_low_remove_watchpoint): Renamed to
912 i386_dr_remove_watchpoint. All uses updated.
913 (i386_low_region_ok_for_watchpoint): Renamed to
914 i386_dr_region_ok_for_watchpoint. All uses updated.
915 (i386_low_stopped_data_address): Renamed to
916 i386_dr_stopped_data_address. All uses updated.
917 (i386_low_stopped_by_watchpoint): Renamed to
918 i386_dr_stopped_by_watchpoint. All uses updated.
920 2014-06-18 Gary Benson <gbenson@redhat.com>
922 * i386-low.c (i386_dr_low_can_set_addr): New macro.
923 (i386_dr_low_can_set_control): Likewise.
924 (i386_insert_aligned_watchpoint): New check.
926 2014-06-18 Gary Benson <gbenson@redhat.com>
928 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
931 2014-06-18 Gary Benson <gbenson@redhat.com>
933 * i386-low.c (i386_length_and_rw_bits): Use internal_error
934 instead of fatal and error.
935 (i386_handle_nonaligned_watchpoint): Likewise.
937 2014-06-18 Gary Benson <gbenson@redhat.com>
939 * i386-low.c (i386_get_debug_register_length): New macro.
940 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
941 (i386_show_dr): Use debug_printf instead of fprintf. Use
942 phex to format values.
944 2014-06-18 Gary Benson <gbenson@redhat.com>
946 * i386-low.h: Comment changes.
947 * i386-low.c: Likewise.
949 2014-06-18 Gary Benson <gbenson@redhat.com>
951 * i386-low.c: Whitespace changes.
953 2014-06-12 Tom Tromey <tromey@redhat.com>
955 * utils.c (freeargv): Remove.
957 2014-06-12 Tom Tromey <tromey@redhat.com>
959 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
960 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
961 (parse_debug_format_options): Likewise.
962 (gdbserver_usage): Likewise.
963 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
964 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
965 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
967 ($(LIBGNU)): Depend on libiberty.
968 (all-lib): Recurse into all subdirs.
969 (install-only): Invoke "install" target in subdirs.
970 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
972 * configure: Rebuild.
973 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
974 for vasprintf, vsnprintf, or gettimeofday.
975 * configure.srv: Don't add safe-ctype.o or lbasename.o to
978 2014-06-05 Joel Brobecker <brobecker@adacore.com>
980 * development.sh: Delete.
981 * Makefile.in (config.status): Adjust dependency on development.sh.
982 * configure.ac: Adjust development.sh source call.
983 * configure: Regenerate.
985 2014-06-02 Pedro Alves <palves@redhat.com>
987 * ax.c (gdb_free_agent_expr): New function.
988 * ax.h (gdb_free_agent_expr): New declaration.
989 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
991 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
993 (clear_breakpoint_conditions_and_commands): New function.
994 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
995 (clear_breakpoint_conditions_and_commands): New declaration.
997 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
999 * linux-aarch64-low.c (asm/ptrace.h): Include.
1001 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1003 Fix TLS access for -static -pthread.
1004 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1005 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1006 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1008 2014-05-20 Pedro Alves <palves@redhat.com>
1010 * linux-aarch64-low.c (aarch64_insert_point)
1011 (aarch64_remove_point): No longer check whether the type is
1012 supported here. Adjust to new interface.
1013 (the_low_target): Install aarch64_supports_z_point_type as
1014 supports_z_point_type method.
1015 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1016 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1017 instead of a Z packet char. Adjust.
1018 (arm_supports_z_point_type): New function.
1019 (arm_insert_point, arm_remove_point): Adjust to new interface.
1020 (the_low_target): Install arm_supports_z_point_type.
1021 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1022 (cris_insert_point, cris_remove_point): Adjust to new interface.
1023 Don't check whether the type is supported here.
1024 (the_low_target): Install cris_supports_z_point_type.
1025 * linux-low.c (linux_supports_z_point_type): New function.
1026 (linux_insert_point, linux_remove_point): Adjust to new interface.
1027 * linux-low.h (struct linux_target_ops) <insert_point,
1028 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1029 raw_breakpoint pointer parameter.
1030 <supports_z_point_type>: New method.
1031 * linux-mips-low.c (mips_supports_z_point_type): New function.
1032 (mips_insert_point, mips_remove_point): Adjust to new interface.
1033 Use mips_supports_z_point_type.
1034 (the_low_target): Install mips_supports_z_point_type.
1035 * linux-ppc-low.c (the_low_target): Install NULL as
1036 supports_z_point_type method.
1037 * linux-s390-low.c (the_low_target): Install NULL as
1038 supports_z_point_type method.
1039 * linux-sparc-low.c (the_low_target): Install NULL as
1040 supports_z_point_type method.
1041 * linux-x86-low.c (x86_supports_z_point_type): New function.
1042 (x86_insert_point): Adjust to new insert_point interface. Use
1043 insert_memory_breakpoint. Adjust to new
1044 i386_low_insert_watchpoint interface.
1045 (x86_remove_point): Adjust to remove_point interface. Use
1046 remove_memory_breakpoint. Adjust to new
1047 i386_low_remove_watchpoint interface.
1048 (the_low_target): Install x86_supports_z_point_type.
1049 * lynx-low.c (lynx_target_ops): Install NULL as
1050 supports_z_point_type callback.
1051 * nto-low.c (nto_supports_z_point_type): New.
1052 (nto_insert_point, nto_remove_point): Adjust to new interface.
1053 (nto_target_ops): Install nto_supports_z_point_type.
1054 * mem-break.c: Adjust intro comment.
1055 (struct raw_breakpoint) <raw_type, size>: New fields.
1056 <inserted>: Update comment.
1057 <shlib_disabled>: Delete field.
1058 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1059 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1060 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1061 (raw_bkpt_type_to_target_hw_bp_type): New function.
1062 (find_enabled_raw_code_breakpoint_at): New function.
1063 (find_raw_breakpoint_at): New type and size parameters. Use them.
1064 (insert_memory_breakpoint): New function, based off
1065 set_raw_breakpoint_at.
1066 (remove_memory_breakpoint): New function.
1067 (set_raw_breakpoint_at): Reimplement.
1068 (set_breakpoint): New, based on set_breakpoint_at.
1069 (set_breakpoint_at): Reimplement.
1070 (delete_raw_breakpoint): Go through the_target->remove_point
1071 instead of assuming memory breakpoints.
1072 (find_gdb_breakpoint_at): Delete.
1073 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1074 (find_gdb_breakpoint): New function.
1075 (set_gdb_breakpoint_at): Delete.
1076 (z_type_supported): New function.
1077 (set_gdb_breakpoint_1): New function, loosely based off
1078 set_gdb_breakpoint_at.
1079 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1080 (delete_gdb_breakpoint_at): Delete.
1081 (delete_gdb_breakpoint_1): New function, loosely based off
1082 delete_gdb_breakpoint_at.
1083 (delete_gdb_breakpoint): New function.
1084 (clear_gdb_breakpoint_conditions): Rename to ...
1085 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1087 (add_condition_to_breakpoint): Make static.
1088 (add_breakpoint_condition): Take a struct breakpoint pointer
1089 instead of an address. Adjust.
1090 (gdb_condition_true_at_breakpoint): Rename to ...
1091 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1093 (gdb_condition_true_at_breakpoint): Reimplement.
1094 (add_breakpoint_commands): Take a struct breakpoint pointer
1095 instead of an address. Adjust.
1096 (gdb_no_commands_at_breakpoint): Rename to ...
1097 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1098 parameter. Return true if no breakpoint was found. Change debug
1100 (gdb_no_commands_at_breakpoint): Reimplement.
1101 (run_breakpoint_commands): Rename to ...
1102 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1103 and change return type to boolean.
1104 (run_breakpoint_commands): New function.
1105 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1106 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1107 breakpoint. Go through the_target->remove_point instead of
1108 assuming memory breakpoint.
1109 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1110 software and hardware breakpoints.
1111 (reinsert_raw_breakpoint): Go through the_target->insert_point
1112 instead of assuming memory breakpoint.
1113 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1114 software and hardware breakpoints.
1115 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1116 Check both software and hardware breakpoints.
1117 (validate_inserted_breakpoint): Assert the breakpoint is a
1118 software breakpoint. Set the inserted flag to -1 instead of
1119 setting shlib_disabled.
1120 (delete_disabled_breakpoints): Adjust.
1121 (validate_breakpoints): Only validate software breakpoints.
1122 Adjust to inserted flag change.
1123 (check_mem_read, check_mem_write): Skip breakpoint types other
1124 than software breakpoints. Adjust to inserted flag change.
1125 * mem-break.h (enum raw_bkpt_type): New enum.
1126 (raw_breakpoint, struct process_info): Forward declare.
1127 (Z_packet_to_target_hw_bp_type): Delete declaration.
1128 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1129 (set_gdb_breakpoint, delete_gdb_breakpoint)
1130 (clear_breakpoint_conditions): New declarations.
1131 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1132 (breakpoint_inserted_here): Update comment.
1133 (add_breakpoint_condition, add_breakpoint_commands): Replace
1134 address parameter with a breakpoint pointer parameter.
1135 (gdb_breakpoint_here): Update comment.
1136 (delete_gdb_breakpoint_at): Delete.
1137 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1138 * server.c (process_point_options): Take a struct breakpoint
1139 pointer instead of an address. Adjust.
1140 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1141 delete_gdb_breakpoint.
1142 * spu-low.c (spu_target_ops): Install NULL as
1143 supports_z_point_type method.
1144 * target.h: Include mem-break.h.
1145 (struct target_ops) <prepare_to_access_memory>: Update comment.
1146 <supports_z_point_type>: New field.
1147 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1148 instead of a char. Also take a raw breakpoint pointer.
1149 * win32-arm-low.c (the_low_target): Install NULL as
1150 supports_z_point_type.
1151 * win32-i386-low.c (i386_supports_z_point_type): New function.
1152 (i386_insert_point, i386_remove_point): Adjust to new interface.
1153 (the_low_target): Install i386_supports_z_point_type.
1154 * win32-low.c (win32_supports_z_point_type): New function.
1155 (win32_insert_point, win32_remove_point): Adjust to new interface.
1156 (win32_target_ops): Install win32_supports_z_point_type.
1157 * win32-low.h (struct win32_target_ops):
1158 <supports_z_point_type>: New method.
1159 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1160 instead of a char. Also take a raw breakpoint pointer.
1162 2014-05-20 Pedro Alves <palves@redhat.com>
1164 * mem-break.h: Include break-common.h.
1165 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1166 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1167 (Z_packet_to_target_hw_bp_type): New declaration.
1168 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1169 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1170 (Z_PACKET_ACCESS_WP): Delete macros.
1171 (Z_packet_to_hw_type): Delete function.
1172 * i386-low.h: Don't include break-common.h here.
1173 (Z_packet_to_hw_type): Delete declaration.
1174 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1175 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1176 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1177 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1178 * linux-aarch64-low.c: Don't include break-common.h here.
1179 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1180 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1181 (Z_packet_to_target_hw_bp_type): Delete function.
1182 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1184 (mips_insert_point, mips_remove_point): Use
1185 Z_packet_to_target_hw_bp_type.
1187 2014-05-20 Pedro Alves <palves@redhat.com>
1189 * linux-aarch64-low.c: Include break-common.h.
1190 (enum target_point_type): Delete.
1191 (Z_packet_to_point_type): Rename to ...
1192 (Z_packet_to_target_hw_bp_type): ... this, and return a
1193 target_hw_bp_type instead.
1194 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1195 instead of an enum target_point_type.
1196 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1198 (aarch64_dr_state_insert_one_point)
1199 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1200 (aarch64_handle_aligned_watchpoint)
1201 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1202 Take an enum target_hw_bp_type instead of an enum
1204 (aarch64_supports_z_point_type): New function.
1205 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1206 use Z_packet_to_target_hw_bp_type.
1208 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1210 * configure.ac: Only use -Werror by default when DEVELOPMENT
1212 * configure: Regenerate.
1214 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1216 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1217 * linux-x86-low.c (X86_64_USER_REGS): New.
1218 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1220 2014-04-28 Yao Qi <yao@codesourcery.com>
1222 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1225 2014-04-25 Pedro Alves <palves@redhat.com>
1228 * linux-low.c (linux_attach_fail_reason_string): New function.
1229 (linux_attach_lwp): Delete.
1230 (linux_attach_lwp_1): Rename to ...
1231 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1232 argument. Remove "initial" parameter. Return int instead of
1233 void. Don't error or warn here.
1234 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1235 failure to attach to the tgid. Call warning when failing to
1237 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1238 argument. Remove "initial" parameter. Return int instead of
1239 void. Don't error or warn here.
1240 (linux_attach_fail_reason_string): New declaration.
1241 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1242 interface change. Use linux_attach_fail_reason_string.
1244 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1245 Walfred Tedeschi <walfred.tedeschi@intel.com>
1247 * Makefile.in: Added rules to handle new files
1248 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1249 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1250 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1251 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1252 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1253 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1255 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1256 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1257 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1258 i386/x32-avx512.xml.
1259 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1260 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1261 i386/x32-avx512-linux.xml.
1262 * i387-fp.c (num_avx512_k_registers): New constant for number
1264 (num_avx512_zmmh_low_registers): New constant for number of
1265 lower ZMM registers (0-15).
1266 (num_avx512_zmmh_high_registers): New constant for number of
1267 higher ZMM registers (16-31).
1268 (num_avx512_ymmh_registers): New contant for number of higher
1269 YMM registers (ymm16-31 added by avx521 on x86_64).
1270 (num_avx512_xmm_registers): New constant for number of higher
1271 XMM registers (xmm16-31 added by AVX512 on x86_64).
1272 (struct i387_xsave): Add space for AVX512 registers.
1273 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1274 Add code to handle AVX512 registers.
1275 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1276 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1277 prototypei from generated file.
1278 (tdesc_amd64_avx512_linux): Likewise.
1279 (init_registers_x32_avx512_linux): Likewise.
1280 (tdesc_x32_avx512_linux): Likewise.
1281 (init_registers_i386_avx512_linux): Likewise.
1282 (tdesc_i386_avx512_linux): Likewise.
1283 (x86_64_regmap): Add AVX512 registers.
1284 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1286 (initialize_low_arch): Add code to initialize AVX512 registers.
1288 2014-04-23 Pedro Alves <palves@redhat.com>
1290 * mem-break.c (find_gdb_breakpoint_at): Make static.
1291 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1293 2014-04-23 Pedro Alves <palves@redhat.com>
1295 * i386-low.c: Don't include break-common.h here.
1296 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1297 prototype to take target_hw_bp_type as argument instead of a Z
1299 * i386-low.h: Include break-common.h here.
1300 (Z_packet_to_hw_type): Declare.
1301 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1303 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1304 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1305 (x86_remove_point): Convert the packet number to a
1306 target_hw_bp_type before calling i386_low_remove_watchpoint.
1307 * win32-i386-low.c (i386_insert_point): Convert the packet number
1308 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1309 (i386_remove_point): Convert the packet number to a
1310 target_hw_bp_type before calling i386_low_remove_watchpoint.
1312 2014-04-23 Pedro Alves <palves@redhat.com>
1314 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1316 2014-04-10 Pedro Alves <palves@redhat.com>
1318 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1319 Check if the condition or command is NULL before checking if the
1320 breakpoint is known. On success, return true.
1321 * mem-break.h (add_breakpoint_condition): Document return.
1322 (add_breakpoint_commands): Add describing comment.
1323 * server.c (skip_to_semicolon): New function.
1324 (process_point_options): Use it.
1326 2014-04-09 Pedro Alves <palves@redhat.com>
1328 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1331 2014-02-27 Pedro Alves <palves@redhat.com>
1334 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1336 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1338 (last_thread_of_process_p): Take a PID argument instead of a
1340 (linux_wait_for_lwp): Delete.
1341 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1343 (linux_low_filter_event): New function, party factored out from
1344 linux_wait_for_event.
1345 (linux_wait_for_event): Rename to ...
1346 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1347 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1348 sigsuspend. Check for zombie leaders.
1349 (linux_wait_for_event): Reimplement as wrapper around
1350 linux_wait_for_event_filtered.
1351 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1352 a normal or signal exit is seen, it's the whole process exiting.
1353 (wait_for_sigstop): No longer a for_each_inferior callback.
1354 Rewrite on top of linux_wait_for_event_filtered.
1355 (stop_all_lwps): Call wait_for_sigstop directly.
1356 * server.c (resume, handle_target_event): Handle
1357 TARGET_WAITKIND_NO_RESUMED.
1359 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1361 * win32-low.c (psapi_get_dll_name,
1362 * win32_CreateToolhelp32Snapshot): Delete.
1363 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1364 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1366 (handle_load_dll): Add function description.
1367 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1369 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1371 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1373 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1374 base address when calling win32_add_one_solib.
1375 (handle_load_dll): Delete local variable load_addr.
1376 Remove 0x1000 offset applied to DLL base address when calling
1377 win32_add_one_solib.
1378 (handle_unload_dll): Add comment.
1380 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1382 * win32-low.c (win32_add_all_dlls): Renames
1383 win32_ensure_ntdll_loaded. Rewrite function documentation.
1384 Adjust implementation to always load all DLLs.
1385 Add 0x1000 offset to DLL base address when calling
1386 win32_add_one_solib.
1387 (child_initialization_done): New static global.
1388 (do_initial_child_stuff): Set child_initialization_done to
1389 zero during child initialization, and 1 after. Replace call
1390 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1392 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1393 (handle_unload_dll): Add function documentation.
1394 (get_child_debug_event): Ignore load and unload DLL events
1395 during child initialization.
1397 2014-02-20 Doug Evans <dje@google.com>
1399 Remove global all_lwps.
1400 * inferiors.h (ptid_of): Move here from linux-low.h.
1401 (pid_of, lwpid_of): Ditto.
1402 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1403 parameter is a struct thread_info * now.
1404 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1405 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1406 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1408 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1409 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1410 * linux-arm-low.c (update_registers_callback): Update, "entry"
1411 parameter is a struct thread_info * now.
1412 Fetch lwpid from current_inferior directly.
1413 (arm_insert_point): Pass &all_threads to find_inferior instead of
1415 (arm_remove_point): Ditto.
1416 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1417 (arm_prepare_to_resume): Fetch pid from thread.
1418 (arm_read_description): Fetch lwpid from current_inferior directly.
1419 * linux-low.c (all_lwps): Delete.
1420 (delete_lwp): Delete call to remove_inferior.
1421 (handle_extended_wait): Fetch lwpid from thread.
1422 (add_lwp): Don't set lwp->entry.id. Remove call to
1423 add_inferior_to_list.
1424 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1425 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1426 (kill_one_lwp_callback): Ditto.
1427 (linux_kill): Don't dereference NULL pointer.
1428 Fetch ptid,lwpid from thread.
1429 (get_detach_signal): Fetch ptid from thread.
1430 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1431 Simplify call to regcache_invalidate_thread.
1432 (delete_lwp_callback): Update, "entry" parameter is a
1433 struct thread_info * now. Fetch pid from thread.
1434 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1435 (status_pending_p_callback): Update, "entry" parameter is a
1436 struct thread_info * now. Fetch ptid from thread.
1437 (find_lwp_pid): Update, "entry" parameter is a
1438 struct thread_info * now.
1439 (linux_wait_for_lwp): Fetch pid from thread.
1440 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1441 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1442 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1443 (dequeue_one_deferred_signal): Ditto.
1444 (cancel_breakpoint): Fetch ptid from current_inferior.
1445 (linux_wait_for_event): Pass &all_threads to find_inferior,
1446 not &all_lwps. Fetch ptid, lwpid from thread.
1447 (count_events_callback): Update, "entry" parameter is a
1448 struct thread_info * now.
1449 (select_singlestep_lwp_callback): Ditto.
1450 (select_event_lwp_callback): Ditto.
1451 (cancel_breakpoints_callback): Ditto.
1452 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1454 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1455 (unsuspend_one_lwp): Update, "entry" parameter is a
1456 struct thread_info * now.
1457 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1459 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1460 Fetch lwpid from thread, not lwp.
1461 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1462 Pass &all_threads to find_inferior, not &all_lwps.
1463 (send_sigstop): Fetch lwpid from thread, not lwp.
1464 (send_sigstop_callback): Update, "entry" parameter is a
1465 struct thread_info * now.
1466 (suspend_and_send_sigstop_callback): Ditto.
1467 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1468 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1469 struct thread_info * now.
1470 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1472 (lwp_running): Update, "entry" parameter is a
1473 struct thread_info * now.
1474 (stop_all_lwps): Fetch ptid from thread.
1475 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1476 (linux_resume_one_lwp): Fetch lwpid from thread.
1477 (linux_set_resume_request): Update, "entry" parameter is a
1478 struct thread_info * now. Fetch pid, lwpid from thread.
1479 (resume_status_pending_p): Update, "entry" parameter is a
1480 struct thread_info * now.
1481 (need_step_over_p): Ditto. Fetch lwpid from thread.
1482 (start_step_over): Fetch lwpid from thread.
1483 (linux_resume_one_thread): Update, "entry" parameter is a
1484 struct thread_info * now. Fetch lwpid from thread.
1485 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1486 (proceed_one_lwp): Update, "entry" parameter is a
1487 struct thread_info * now. Fetch lwpid from thread.
1488 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1489 struct thread_info * now.
1490 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1491 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1492 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1494 (regsets_store_inferior_registers): Ditto.
1495 (fetch_register, store_register): Ditto.
1496 (linux_read_memory, linux_write_memory): Ditto.
1497 (linux_request_interrupt): Ditto.
1498 (linux_read_auxv): Ditto.
1499 (linux_xfer_siginfo): Ditto.
1500 (linux_qxfer_spu): Ditto.
1501 (linux_qxfer_libraries_svr4): Ditto.
1502 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1503 moved to inferiors.h.
1505 (get_thread_lwp): Update.
1506 (struct lwp_info): Delete member "entry". Simplify comment for
1509 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1510 current_inferior directly.
1511 (update_watch_registers_callback): Update, "entry" parameter is a
1512 struct thread_info * now. Fetch pid from thread.
1513 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1514 (mips_insert_point): Fetch lwpid from current_inferior.
1515 Pass &all_threads to find_inferior, not &all_lwps.
1516 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1517 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1519 (mips_stopped_data_address): Ditto.
1520 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1522 * linux-tile-low.c (tile_arch_setup): Ditto.
1523 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1524 (update_debug_registers_callback): Update, "entry" parameter is a
1525 struct thread_info * now. Fetch pid from thread.
1526 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1527 Pass &all_threads to find_inferior, not &all_lwps.
1528 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1529 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1530 Pass &all_threads to find_inferior, not &all_lwps.
1531 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1532 (i386_dr_low_get_status): Ditto.
1533 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1534 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1535 (x86_linux_read_description): Ditto.
1536 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1538 2014-02-20 Doug Evans <dje@google.com>
1540 * inferiors.c (get_first_inferior): Fix buglet.
1542 2014-02-19 Doug Evans <dje@google.com>
1544 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1545 * inferiors.c (add_thread): Change result type to struct thread_info *.
1546 All callers updated.
1547 (add_lwp): Call add_thread here instead of in callers.
1548 All callers updated.
1549 * linux-low.h (get_lwp_thread): Rewrite.
1550 (struct lwp_info): New member "thread".
1552 2014-02-19 Doug Evans <dje@google.com>
1554 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1555 All callers updated.
1557 2014-02-19 Doug Evans <dje@google.com>
1559 * inferiors.c (add_thread): Fix whitespace.
1561 2014-02-19 Doug Evans <dje@google.com>
1563 * dll.c (clear_dlls): Replace accessing list implemention details
1565 * gdbthread.h (get_first_thread): Declare.
1566 * inferiors.c (for_each_inferior_with_data): New function.
1567 (get_first_thread): New function.
1568 (find_thread_ptid): Simplify.
1569 (get_first_inferior): New function.
1570 (clear_list): Delete.
1571 (one_inferior_p): New function.
1572 (clear_inferior_list): New function.
1573 (clear_inferiors): Update.
1574 * inferiors.h (for_each_inferior_with_data): Declare.
1575 (clear_inferior_list): Declare.
1576 (one_inferior_p): Declare.
1577 (get_first_inferior): Declare.
1578 * linux-low.c (linux_wait_for_event): Replace accessing list
1579 implemention details with API function.
1580 * server.c (target_running): Ditto.
1581 (accumulate_file_name_length): New function.
1582 (emit_dll_description): New function.
1583 (handle_qxfer_libraries): Replace accessing list implemention
1584 details with API function.
1585 (handle_qxfer_threads_worker): New function.
1586 (handle_qxfer_threads_proper): Replace accessing list implemention
1587 details with API function.
1588 (handle_query): Ditto.
1589 (visit_actioned_threads_callback_ftype): New typedef.
1590 (visit_actioned_threads_data): New struct.
1591 (visit_actioned_threads): Rewrite to be find_inferior callback.
1592 (resume): Call find_inferior.
1593 (handle_status): Replace accessing list implemention
1594 details with API function.
1595 (process_serial_event): Replace accessing list implemention details
1597 * target.c (set_desired_inferior): Replace accessing list implemention
1598 details with API function.
1599 * tracepoint.c (same_process_p): New function.
1600 (gdb_agent_about_to_close): Replace accessing list implemention
1601 details with API function.
1602 * win32-low.c (child_delete_thread): Replace accessing list
1603 implemention details with API function.
1604 (match_dll_by_basename): New function.
1605 (dll_is_loaded_by_basename): New function.
1606 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1607 details call to dll_is_loaded_by_basename.
1609 2014-02-19 Doug Evans <dje@google.com>
1611 * dll.h (struct dll_info): Add comment.
1612 * gdbthread.h (struct thread_info): Add comment.
1613 (current_ptid): Simplify.
1614 * inferiors.c (add_process): Update.
1615 (remove_process): Update.
1616 * inferiors.h (struct process_info): Rename member "head" to "entry".
1617 * linux-low.c (delete_lwp): Update.
1619 (last_thread_of_process_p): Update.
1620 (kill_one_lwp_callback, linux_kill): Update.
1621 (status_pending_p_callback): Update.
1622 (wait_for_sigstop): Update. Simplify read of ptid.
1623 (start_step_over): Update.
1624 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1625 (get_lwp_thread): Update.
1626 (struct lwp_info): Rename member "head" to "entry".
1627 * regcache.h (inferior_list_entry): Delete.
1628 * server.c (kill_inferior_callback): Update.
1629 (detach_or_kill_inferior_callback): Update.
1630 (print_started_pid): Update.
1631 (print_attached_pid): Update.
1632 (process_serial_event): Simplify read of ptid.
1633 * thread-db.c (thread_db_create_event): Update.
1634 (thread_db_get_tls_address): Update.
1635 * win32-low.c (current_inferior_ptid): Simplify.
1637 2014-02-19 Tom Tromey <tromey@redhat.com>
1639 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1641 (target_supports_btrace): Update.
1643 2014-02-14 Yao Qi <yao@codesourcery.com>
1645 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1646 (rsp-low-ipa.o): New target.
1648 2014-02-12 Tom Tromey <tromey@redhat.com>
1650 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1651 convert_ascii_to_int.
1652 * regcache.c (registers_to_string): Likewise.
1653 * remote-utils.c (decode_M_packet): Likewise.
1654 * server.c (process_serial_event): Likewise.
1656 2014-02-12 Tom Tromey <tromey@redhat.com>
1658 * server.c (handle_query, handle_v_run): Use hex2bin, not
1660 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1662 2014-02-12 Tom Tromey <tromey@redhat.com>
1664 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1665 convert_int_to_ascii.
1666 * regcache.c (registers_to_string, collect_register_as_string):
1668 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1670 * server.c (process_serial_event): Likewise.
1671 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1672 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1674 2014-02-12 Tom Tromey <tromey@redhat.com>
1676 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1677 bin2hex, not hexify.
1678 * tracepoint.c (cmd_qtstatus): Likewise.
1680 2014-02-12 Tom Tromey <tromey@redhat.com>
1682 * remote-utils.c (monitor_output): Pass explicit length to
1685 2014-02-12 Tom Tromey <tromey@redhat.com>
1687 * tracepoint.c: Include rsp-low.h.
1688 * server.c: Include rsp-low.h.
1689 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1690 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1692 * remote-utils.c: Include rsp-low.h.
1693 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1694 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1695 (convert_int_to_ascii, convert_ascii_to_int): Move to
1697 * regcache.c: Include rsp-low.h.
1698 * ax.c: Include rsp-low.h.
1699 * Makefile.in (SFILES): Add common/rsp-low.c.
1700 (OBS): Add rsp-low.o.
1701 (rsp-low.o): New target.
1703 2014-02-12 Tom Tromey <tromey@redhat.com>
1705 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1706 Include print-utils.h.
1707 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1708 (plongest, thirty_two, phex_nz): Remove.
1709 * Makefile.in (SFILES): Add common/print-utils.c.
1710 (OBS): Add print-utils.o.
1711 (print-utils-ipa.o): New target.
1712 (print-utils.o): New target.
1713 (IPA_OBJS): Add print-utils-ipa.o.
1715 2014-02-06 Tom Tromey <tromey@redhat.com>
1717 * Makefile.in (SFILES): Fix indentation.
1719 2014-02-05 Doug Evans <dje@google.com>
1721 * linux-low.c (linux_wait_for_event): Improve comment.
1722 (linux_wait_1): Keep current_inferior in sync with event_child.
1724 2014-01-22 Doug Evans <dje@google.com>
1726 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1728 2014-01-22 Doug Evans <dje@google.com>
1730 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1731 * configure: Regenerate.
1732 * config.in: Regenerate.
1733 * Makefile.in (SFILES): Add debug.c.
1735 * debug.c: New file.
1736 * debug.h: New file.
1737 * linux-aarch64-low.c (*): Update all debugging printfs to use
1738 debug_printf instead of fprintf.
1739 * linux-arm-low.c (*): Ditto.
1740 * linux-cris-low.c (*): Ditto.
1741 * linux-crisv32-low.c (*): Ditto.
1742 * linux-m32r-low.c (*): Ditto.
1743 * linux-sparc-low.c (*): Ditto.
1744 * linux-x86.c (*): Ditto.
1745 * linux-low.c (*): Ditto.
1746 (linux_wait_1): Add calls to debug_enter, debug_exit.
1747 (linux_wait): Remove redundant debugging printf.
1748 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1749 (linux_resume, unstop_all_lwps): Ditto.
1750 * mem-break.c (*): Update all debugging printfs to use
1751 debug_printf instead of fprintf.
1752 * remote-utils.c (*): Ditto.
1753 * thread-db.c (*): Ditto.
1754 * server.c #include <ctype.h>, "gdb_vecs.h".
1755 (debug_threads): Moved to debug.c.
1756 (*): Update all debugging printfs to use debug_printf instead of
1758 (start_inferior): Replace call to fflush with call to debug_flush.
1759 (monitor_show_help): Mention set debug-format.
1760 (parse_debug_format_options): New function.
1761 (handle_monitor_command): Handle "monitor set debug-format".
1762 (gdbserver_usage): Mention --debug-format.
1763 (main): Parse --debug-format.
1764 * server.h (debug_threads): Declaration moved to debug.h.
1766 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1767 trace_debug_1 that uses debug_printf.
1768 (tracepoint_look_up_symbols): Update all debugging printfs to use
1769 debug_printf instead of fprintf.
1771 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1773 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1776 2014-01-17 Pedro Alves <palves@redhat.com>
1779 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1780 defined after including gdb_proc_service.h.
1782 2014-01-16 Doug Evans <dje@google.com>
1784 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1785 (match_dll): Use it.
1787 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1789 * target.h (target_ops) <read_btrace>: Change parameters and
1790 return type to allow error reporting.
1791 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1792 trace reading errors on.
1793 * linux-low.c (linux_low_read_btrace): Pass trace reading
1795 (linux_low_disable_btrace): New.
1797 2014-01-15 Doug Evans <dje@google.com>
1799 * inferiors.c (thread_id_to_gdb_id): Delete.
1800 * inferiors.h (thread_id_to_gdb_id): Delete.
1802 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1804 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1805 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1808 2014-01-08 Pedro Alves <palves@redhat.com>
1810 * server.c (handle_status): Don't discard previous queued stop
1811 replies or thread's pending status here.
1812 (main) <disconnection>: Do it here instead.
1814 2014-01-08 Pedro Alves <palves@redhat.com>
1816 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1817 * server.c (visit_actioned_threads, handle_pending_status): New
1819 (handle_v_cont): Factor out parts to ...
1820 (resume): ... this new function. If in all-stop, and a thread
1821 being resumed has a pending status, report it without actually
1823 (myresume): Adjust to use the new 'resume' function.
1824 (clear_pending_status_callback, set_pending_status_callback)
1825 (find_status_pending_thread_callback): New functions.
1826 (handle_status): Handle the case of multiple threads having
1827 interesting statuses to report. Report threads' real last signal
1828 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
1829 with an interesting thread to report the status for, instead of
1830 always reporting the status of the first thread.
1832 2014-01-01 Joel Brobecker <brobecker@adacore.com>
1834 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1835 * gdbreplay.c (gdbreplay_version): Likewise.
1837 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
1839 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1840 iov.iov_len with the real length in use.
1842 2013-12-13 Joel Brobecker <brobecker@adacore.com>
1844 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1845 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1846 for all targets that use win32-low.c.
1847 * win32-low.c (win32_ensure_ntdll_loaded): New function.
1848 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1850 2013-12-13 Pedro Alves <palves@redhat.com>
1852 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1853 if equal to TARGET_WAITKIND_LOADED.
1854 * win32-low.c (cached_status): New static global.
1855 (win32_wait): Add declaration.
1856 (do_initial_child_stuff): Flush all initial pending debug events
1857 up to the initial breakpoint.
1858 (win32_wait): If CACHED_STATUS was set, return that instead
1859 of doing a real wait. Remove the code resuming the execution
1860 of the inferior after receiving a TARGET_WAITKIND_LOADED event
1861 during the initial phase. Also remove the code changing
1862 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1863 TARGET_WAITKIND_STOPPED.
1865 2013-12-11 Yao Qi <yao@codesourcery.com>
1867 * notif.c (handle_notif_ack): Return 0 if no notification
1870 2013-11-20 Doug Evans <dje@google.com>
1872 * linux-low.c (linux_set_resume_request): Fix comment.
1874 2013-11-20 Doug Evans <dje@google.com>
1876 * linux-low.c (resume_status_pending_p): Tweak comment.
1878 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
1880 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1881 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1882 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1883 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1884 (srv_amd64_regobj): Add amd64-mpx.o.
1885 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1886 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1887 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1888 * i387-fp.c (num_pl_bnd_register) Added constant.
1889 (num_pl_bnd_cfg_registers) Added constant.
1890 (struct i387_xsave) Added reserved area and MPX fields.
1891 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1892 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1894 (tdesc_i386_mpx_linux): Add MPX amd64 target.
1895 (init_registers_amd64_mpx_linux): Declare new function.
1896 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1897 (x86_64_regmap): Add MPX registers.
1898 (x86_linux_read_description): Add MPX case.
1899 (initialize_low_arch): Initialize MPX targets.
1901 2013-11-18 Tom Tromey <tromey@redhat.com>
1903 * configure: Rebuild.
1904 * configure.ac: Don't check for stdlib.h.
1905 * gdbreplay.c: Unconditionally include stdlib.h.
1907 2013-11-18 Tom Tromey <tromey@redhat.com>
1909 * config.in: Rebuild.
1910 * configure: Rebuild.
1911 * configure.ac: Don't use AC_HEADER_DIRENT.
1913 2013-11-18 Tom Tromey <tromey@redhat.com>
1915 * server.h: Don't check HAVE_STRING_H.
1916 * gdbreplay.c: Don't check HAVE_STRING_H.
1917 * configure: Rebuild.
1919 2013-11-18 Tom Tromey <tromey@redhat.com>
1921 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1924 2013-11-08 Tom Tromey <tromey@redhat.com>
1926 * configure, config.in: Rebuild.
1927 * configure.ac: Remove unused configury.
1929 2013-11-08 Tom Tromey <tromey@redhat.com>
1931 * acinclude.m4: Include common.m4, codeset.m4.
1932 * configure, config.in: Rebuild.
1933 * configure.ac: Use GDB_AC_COMMON.
1935 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
1937 * linux-s390-low.c (HWCAP_S390_TE): New define.
1938 (s390_arch_setup): Consider the TE field in the HWCAP for
1939 determining 'have_regset_tdb'.
1941 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
1944 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1947 2013-10-02 Pedro Alves <palves@redhat.com>
1949 * server.c (process_serial_event): Don't output "GDBserver
1950 exiting" if GDB is connected through stdio.
1951 * target.c (mywait): Likewise, be silent if GDB is connected
1954 2013-10-01 Joel Brobecker <brobecker@adacore.com>
1956 * lynx-low.c (lynx_add_threads_after_attach): New function.
1957 (lynx_attach): Remove call to add_thread. Add call to
1958 lynx_add_threads_after_attach instead.
1960 2013-09-28 Mike Frysinger <vapier@gentoo.org>
1962 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1963 * config.in, configure: Regenerated.
1965 2013-09-18 Yao Qi <yao@codesourcery.com>
1968 * server.c (start_inferior): Clear 'resume_info'.
1970 2013-09-16 Jiong Wang <jiwang@tilera.com>
1972 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1975 2013-09-16 Jiong Wang <jiwang@tilera.com>
1977 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1978 linux-tile-low.o to srv_tgtobj.
1980 2013-09-16 Will Newton <will.newton@linaro.org>
1982 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1985 2013-09-06 Pedro Alves <palves@redhat.com>
1987 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1988 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1989 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1990 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1991 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1992 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1994 2013-09-06 Pedro Alves <palves@redhat.com>
1996 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1997 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1999 2013-09-06 Pedro Alves <palves@redhat.com>
2001 * linux-amd64-ipa.c: Include tracepoint.h.
2002 * linux-i386-ipa.c: Include tracepoint.h.
2004 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2006 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2007 (ps_get_thread_area): New function.
2009 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2011 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2012 (initialize_low_arch): Call init_registers_crisv32 rather than
2013 init_register_crisv32.
2015 2013-09-05 Pedro Alves <palves@redhat.com>
2017 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2019 * hostio.h: ... this new file.
2020 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2021 win32-low.c: Include hostio.h.
2023 2013-09-05 Pedro Alves <palves@redhat.com>
2025 * server.h (gdb_client_data, handler_func, callback_handler_func)
2026 (delete_file_handler, add_file_handler, append_callback_event)
2027 (delete_callback_event, start_event_loop, initialize_event_loop):
2028 Move to event-loop.h and include it.
2029 * event-loop.h: New file.
2031 2013-09-05 Pedro Alves <palves@redhat.com>
2033 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2034 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2035 (loaded_dll, unloaded_dll): Move to ...
2036 * dll.h: ... this new file.
2037 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2039 2013-09-05 Pedro Alves <palves@redhat.com>
2041 * server.h (current_process, get_thread_process, all_processes)
2042 (add_inferior_to_list, for_each_inferior, current_inferior)
2043 (remove_inferior, add_process, remove_process, find_process_pid)
2044 (have_started_inferiors_p, have_attached_inferiors_p)
2045 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2046 (clear_inferiors, find_inferior, find_inferior_id)
2047 (inferior_target_data, set_inferior_target_data)
2048 (inferior_regcache_data, set_inferior_regcache_data): Move to
2049 inferiors.h, and include it.
2050 * inferiors.h: New file.
2052 2013-09-05 Pedro Alves <palves@redhat.com>
2054 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2058 2013-09-05 Pedro Alves <palves@redhat.com>
2060 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2062 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2063 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2064 (handle_tracepoint_general_set, handle_tracepoint_query)
2065 (tracepoint_finished_step, tracepoint_was_hit)
2066 (release_while_stepping_state_list, current_traceframe)
2067 (in_readonly_region, traceframe_read_mem)
2068 (fetch_traceframe_registers, traceframe_read_sdata)
2069 (traceframe_read_info, struct fast_tpoint_collect_status)
2070 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2071 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2072 (supply_fast_tracepoint_registers)
2073 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2074 (ipa_tdesc, claim_trampoline_space)
2075 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2076 (agent_mem_read, agent_get_trace_state_variable_value)
2077 (agent_set_trace_state_variable_value, agent_tsv_read)
2078 (agent_mem_read_string, get_raw_reg_func_addr)
2079 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2080 * tracepoint.h: ... this new file.
2082 2013-09-05 Pedro Alves <palves@redhat.com>
2084 * server.h (perror_with_name, error, fatal, warning, paddress)
2085 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2087 * utils.h: New file.
2089 2013-09-05 Pedro Alves <palves@redhat.com>
2091 * server.h (remote_debug, noack_mode, transport_is_reliable)
2092 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2093 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2094 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2095 (write_enn, initialize_async_io, enable_async_io)
2096 (disable_async_io, check_remote_input_interrupt_request)
2097 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2098 (dead_thread_notify, prepare_resume_reply)
2099 (decode_address_to_semicolon, decode_address, decode_m_packet)
2100 (decode_M_packet, decode_X_packet, decode_xfer_write)
2101 (decode_search_memory_packet, unhexify, hexify)
2102 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2103 (look_up_one_symbol, relocate_instruction)
2104 (monitor_output): Move to remote-utils.h, and include it.
2105 * remote-utils.h: New file.
2107 2013-09-05 Pedro Alves <palves@redhat.com>
2109 * server.h (_): Delete.
2111 2013-09-02 Pedro Alves <palves@redhat.com>
2113 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2114 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2116 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2118 2013-09-02 Pierre Muller <muller@sourceware.org>
2120 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2121 or WriteProcessMemory complete successfully and handle
2122 ERROR_PARTIAL_COPY error.
2124 2013-09-02 Pedro Alves <palves@redhat.com>
2126 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2127 error instead of EIO.
2129 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2132 * linux-low.c: Include filestuff.h.
2133 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2134 * lynx-low.c: Include filestuff.h.
2135 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2136 * server.c: Include filestuff.h.
2137 (main): Call notice_open_fds.
2138 * spu-low.c: Include filestuff.h.
2139 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2141 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2143 * Makefile.in: Explain why ../target and ../nat are not
2144 listed as include file search paths.
2145 (linux-waitpid.o): New object file rule.
2146 * configure.srv (srv_native_linux_obj): New variable.
2147 Replace all occurrences of linux native object files with
2148 $srv_native_linux_obj.
2149 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2150 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2151 (linux_enable_event_reporting): Remove declaration.
2152 (my_waitpid): Moved to common/linux-waitpid.c.
2153 (linux_wait_for_event): Pass ptid when calling
2154 linux_enable_event_reporting.
2155 (linux_supports_tracefork_flag): Remove.
2156 (linux_enable_event_reporting): Likewise.
2157 (linux_tracefork_grandchild): Remove.
2158 (STACK_SIZE): Moved to common/linux-ptrace.c.
2159 (linux_tracefork_child): Remove.
2160 (linux_test_for_tracefork): Remove.
2161 (linux_look_up_symbols): Call linux_supports_traceclone.
2162 (initialize_low): Remove call to linux_test_for_tracefork.
2163 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2164 common/linux-ptrace.h.
2165 (PTRACE_TYPE_ARG4): Likewise.
2166 Include linux-ptrace.h.
2168 2013-08-21 Pedro Alves <palves@redhat.com>
2170 * config.in: Renegerate.
2172 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2174 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2175 (SFILES): Remove $(srcdir)/common/target-common.c and
2176 add $(srcdir)/target/waitstatus.c.
2177 (OBS): Remove target-common.o and add waitstatus.o.
2178 (server_h): Remove $(srcdir)/../common/target-common.h and
2179 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2180 and $(srcdir)/../target/waitstatus.h.
2181 (target-common.o): Remove.
2182 (waitstatus.o): New target object file.
2183 * target.h: Do not include target-common.h and
2184 include target/resume.h, target/wait.h and
2185 target/waitstatus.h.
2187 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2189 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2190 to PTRACE_TYPE_ARG3.
2191 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2192 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2194 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2195 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2197 2013-07-27 Jie Zhang <jie@codesourcery.com>
2198 Daniel Jacobowitz <dan@codesourcery.com>
2199 Yao Qi <yao@codesourcery.com>
2201 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2202 (mips-linux-watch.o): New rule.
2203 (mips_linux_watch_h): New variable.
2204 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2206 * linux-mips-low.c: Include mips-linux-watch.h.
2207 (struct arch_process_info, struct arch_lwp_info): New.
2208 (update_watch_registers_callback): New function.
2209 (mips_linux_new_process, mips_linux_new_thread) New functions.
2210 (mips_linux_prepare_to_resume, mips_insert_point): New
2212 (mips_remove_point, mips_stopped_by_watchpoint): New
2214 (rsp_bp_type_to_target_hw_bp_type): New function.
2215 (mips_stopped_data_address): New function.
2216 (the_low_target): Add watchpoint support functions.
2218 2013-07-27 Yao Qi <yao@codesourcery.com>
2220 * i386-low.c: Include break-common.h.
2221 (enum target_hw_bp_type): Remove.
2223 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2225 * Makefile.in (SFILES): /common/target-common.c.
2226 (OBS): Add target-common.o.
2227 (server_h): Add $(srcdir)/../common/target-common.h.
2228 (target-common.o): New target.
2229 * server.c (queue_stop_reply_callback): Free
2230 status string after use.
2231 * target.c (target_waitstatus_to_string): Remove.
2232 * target.h: Include target-common.h.
2233 (resume_kind): Likewise.
2234 (target_waitkind): Likewise.
2235 (target_waitstatus): Likewise.
2236 (TARGET_WNOHANG): Likewise.
2238 2013-07-04 Yao Qi <yao@codesourcery.com>
2240 * Makefile.in (host_alias): Use @host_noncanonical@.
2241 (target_alias): Use @target_noncanonical@.
2242 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2243 ACX_NONCANONICAL_HOST.
2244 * configure: Regenerated.
2247 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2249 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2250 * configure: Rebuild.
2251 * Makefile.in (version_host, version_target): Get from configure.
2252 (version.c): Use $(version_host) and $(version_target).
2254 2013-07-03 Pedro Alves <palves@redhat.com>
2256 * Makefile.in (config.status): Depend on development.sh.
2257 * acinclude.m4: Include libmcheck.m4.
2258 * configure: Regenerate.
2260 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2262 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2263 attribute inside the parentheses.
2264 (winapi_DebugSetProcessKillOnExit): Ditto.
2265 (winapi_DebugBreakProcess): Ditto.
2266 (winapi_GenerateConsoleCtrlEvent): Ditto.
2268 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2270 * notif.h (notif_event): Add a dummy member to avoid compiler
2273 2013-07-01 Pedro Alves <palves@redhat.com>
2275 * hostio.c (HOSTIO_PATH_MAX): Define.
2276 (require_filename, handle_open, handle_unlink, handle_readlink):
2279 2013-07-01 Pedro Alves <palves@redhat.com>
2281 * server.h: Include "pathmax.h".
2282 * linux-low.c: Don't include sys/param.h.
2283 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2285 * win32-low.c: Don't include sys/param.h.
2286 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2288 2013-07-01 Pedro Alves <palves@redhat.com>
2290 * event-loop.c: Don't check HAVE_UNISTD_H before including
2292 * gdbreplay.c: Likewise.
2293 * remote-utils.c: Likewise.
2294 * server.c: Likewise.
2295 * configure.ac: Don't check for unistd.h.
2296 * configure: Regenerate.
2298 2013-06-28 Tom Tromey <tromey@redhat.com>
2300 * Makefile.in (version.c): Use version.in, not
2303 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2305 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2306 * configure: Rebuild.
2307 * Makefile.in (version_host, version_target): Get from configure.
2308 (version.c): Use $(version_host) and $(version_target).
2310 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2312 Fix trace-status to output user name without trailing colon.
2313 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2315 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2317 Fix trace-status to output proper start-time and stop-time.
2318 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2319 output start time and stop time in hex as gdb expects.
2321 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2323 * tracepoint.c (build_traceframe_info_xml): Output trace state
2324 variables present in the trace buffer.
2326 2013-06-24 Tom Tromey <tromey@redhat.com>
2328 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2330 (version.o): Remove.
2331 * gdbreplay.c: Include version.h.
2332 (version, host_name): Don't declare.
2333 * server.h: Include version.h.
2334 (version, host_name): Don't declare.
2336 2013-06-12 Pedro Alves <palves@redhat.com>
2338 * linux-x86-low.c (linux_is_elf64): Delete global.
2339 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2340 with local linux_pid_exe_is_elf_64_file use.
2342 2013-06-11 Pedro Alves <palves@redhat.com>
2344 * linux-low.c (regset_disabled, disable_regset): New functions.
2345 (regsets_fetch_inferior_registers)
2346 (regsets_store_inferior_registers): Use them.
2347 (initialize_regsets_info); Don't allocate the disabled_regsets
2349 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2352 2013-06-11 Pedro Alves <palves@redhat.com>
2354 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2357 2013-06-11 Pedro Alves <palves@redhat.com>
2359 * linux-x86-low.c (initialize_low_arch): Call
2360 init_registers_x32_avx_linux.
2362 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2364 Fix compatibility with Android Bionic.
2365 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2368 2013-06-07 Pedro Alves <palves@redhat.com>
2371 * Makefile.in (OBS): Add tdesc.o.
2372 (IPA_OBJS): Add tdesc-ipa.o.
2373 (tdesc-ipa.o): New rule.
2374 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2376 * linux-low.c (new_inferior): Delete.
2377 (disabled_regsets, num_regsets): Delete.
2378 (linux_add_process): Adjust to set the new per-process
2380 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2381 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2382 was a stop. When calling arch_setup, switch the current inferior
2383 to the thread that got an event.
2384 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2385 (regsets_fetch_inferior_registers)
2386 (regsets_store_inferior_registers): New regsets_info parameter.
2388 (linux_register_in_regsets): New regs_info parameter. Adjust to
2390 (register_addr, fetch_register, store_register): New usrregs_info
2391 parameter. Adjust to use it.
2392 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2393 parameter regs_info. Adjust to use it.
2394 (linux_fetch_registers): Get the current inferior's regs_info, and
2396 (linux_store_registers): Ditto.
2397 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2398 (initialize_low): Don't initialize the target_regsets here. Call
2399 initialize_low_arch.
2400 * linux-low.h (target_regsets): Delete declaration.
2401 (struct regsets_info): New.
2402 (struct usrregs_info): New.
2403 (struct regs_info): New.
2404 (struct process_info_private) <new_inferior>: New field.
2405 (struct linux_target_ops): Delete the num_regs, regmap, and
2406 regset_bitmap fields. New field regs_info.
2407 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2408 * i387-fp.c (num_xmm_registers): Delete.
2409 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2410 calls to new interface.
2411 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2412 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2413 Infer the number of xmm registers from the regcache's target
2415 * i387-fp.h (num_xmm_registers): Delete.
2416 * inferiors.c (add_thread): Don't install the thread's regcache
2418 * proc-service.c (gregset_info): Fetch the current inferior's
2419 regs_info. Adjust to use it.
2420 * regcache.c: Include tdesc.h.
2421 (register_bytes, reg_defs, num_registers)
2422 (gdbserver_expedite_regs): Delete.
2423 (get_thread_regcache): If the thread doesn't have a regcache yet,
2424 create one, instead of aborting gdbserver.
2425 (regcache_invalidate_one): Rename to ...
2426 (regcache_invalidate_thread): ... this.
2427 (regcache_invalidate_one): New.
2428 (regcache_invalidate): Only invalidate registers of the current
2430 (init_register_cache): Add target_desc parameter, and use it.
2431 (new_register_cache): Ditto. Assert the target description has a
2432 non zero registers_size.
2433 (regcache_cpy): Add assertions. Adjust.
2434 (realloc_register_cache, set_register_cache): Delete.
2435 (registers_to_string, registers_from_string): Adjust.
2436 (find_register_by_name, find_regno, find_register_by_number)
2437 (register_cache_size): Add target_desc parameter, and use it.
2438 (free_register_cache_thread, free_register_cache_thread_one)
2439 (regcache_release, register_cache_size): New.
2440 (register_size): Add target_desc parameter, and use it.
2441 (register_data, supply_register, supply_register_zeroed)
2442 (supply_regblock, supply_register_by_name, collect_register)
2443 (collect_register_as_string, collect_register_by_name): Adjust.
2444 * regcache.h (struct target_desc): Forward declare.
2445 (struct regcache) <tdesc>: New field.
2446 (init_register_cache, new_register_cache): Add target_desc
2448 (regcache_invalidate_thread): Declare.
2449 (regcache_invalidate_one): Delete declaration.
2450 (regcache_release): Declare.
2451 (find_register_by_number, register_cache_size, register_size)
2452 (find_regno): Add target_desc parameter.
2453 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2455 * remote-utils.c: Include tdesc.h.
2456 (outreg, prepare_resume_reply): Adjust.
2457 * server.c: Include tdesc.h.
2458 (gdbserver_xmltarget): Delete declaration.
2459 (get_features_xml, process_serial_event): Adjust.
2460 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2462 (struct process_info) <tdesc>: New field.
2463 (ipa_tdesc): Declare.
2464 * tdesc.c: New file.
2465 * tdesc.h: New file.
2466 * tracepoint.c: Include tdesc.h.
2467 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2468 (get_context_regcache): Adjust to pass ipa_tdesc down.
2469 (do_action_at_tracepoint): Adjust to get the register cache size
2470 from the context regcache's description.
2471 (traceframe_walk_blocks): Adjust to get the register cache size
2472 from the current trace frame's description.
2473 (traceframe_get_pc): Adjust to get current trace frame's
2474 description and pass it down.
2475 (gdb_collect): Adjust to get the register cache size from the
2477 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2478 (gdbserver_xmltarget): Delete.
2479 (initialize_low_tracepoint): Set the ipa's target description.
2480 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2481 (initialize_low_tracepoint): Set the ipa's target description.
2482 * linux-x86-low.c: Include tdesc.h.
2483 [__x86_64__] (is_64bit_tdesc): New.
2484 (ps_get_thread_area, x86_get_thread_area): Use it.
2485 (i386_cannot_store_register): Rename to ...
2486 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2487 (i386_cannot_fetch_register): Rename to ...
2488 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2489 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2491 (target_regsets): Rename to ...
2492 (x86_regsets): ... this.
2493 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2495 (x86_siginfo_fixup): Use is_64bit_tdesc.
2496 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2497 (tdesc_x32_avx_linux, tdesc_x32_linux)
2498 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2500 (x86_linux_update_xmltarget): Delete.
2501 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2502 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2503 (AMD64_LINUX_USER64_CS): New.
2504 (x86_linux_read_description): New, based on
2505 x86_linux_update_xmltarget.
2506 (same_process_callback): New.
2507 (x86_arch_setup_process_callback): New.
2508 (x86_linux_update_xmltarget): New.
2509 (x86_regsets_info): New.
2510 (amd64_linux_regs_info): New.
2511 (i386_linux_usrregs_info): New.
2512 (i386_linux_regs_info): New.
2513 (x86_linux_regs_info): New.
2514 (x86_arch_setup): Reimplement.
2515 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2516 (x86_emit_ops): Ditto.
2517 (the_low_target): Adjust. Install x86_linux_regs_info,
2518 x86_cannot_fetch_register, and x86_cannot_store_register.
2519 (initialize_low_arch): New.
2520 * linux-ia64-low.c (tdesc_ia64): Declare.
2521 (ia64_fetch_register): Adjust.
2522 (ia64_usrregs_info, regs_info): New globals.
2523 (ia64_regs_info): New function.
2524 (the_low_target): Adjust.
2525 (initialize_low_arch): New function.
2526 * linux-sparc-low.c (tdesc_sparc64): Declare.
2527 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2529 (sparc_arch_setup): New function.
2530 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2531 (the_low_target): Adjust.
2532 (initialize_low_arch): New function.
2533 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2534 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2535 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2536 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2537 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2538 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2539 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2540 (tdesc_powerpc_isa205_vsx64l): Declare.
2541 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2542 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2543 (ppc_set_pc, ppc_get_hwcap): Adjust.
2544 (ppc_usrregs_info): Forward declare.
2545 (!__powerpc64__) ppc_regmap_adjusted: New global.
2546 (ppc_arch_setup): Adjust to the current process'es target
2548 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2549 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2550 (ppc_store_evrregset): Adjust.
2551 (target_regsets): Rename to ...
2552 (ppc_regsets): ... this, and make static.
2553 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2554 (ppc_regs_info): New function.
2555 (the_low_target): Adjust.
2556 (initialize_low_arch): New function.
2557 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2558 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2559 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2560 (tdesc_s390x_linux64v2): Declare.
2561 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2562 (s390_fill_gregset, s390_store_last_break): Adjust.
2563 (target_regsets): Rename to ...
2564 (s390_regsets): ... this, and make static.
2565 (s390_get_pc, s390_set_pc): Adjust.
2566 (s390_get_hwcap): New target_desc parameter, and use it.
2567 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2568 (s390_arch_setup): Adjust to set the current process'es target
2569 description. Don't adjust the regmap.
2570 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2571 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2572 (regs_info_3264): New globals.
2573 (s390_regs_info): New function.
2574 (the_low_target): Adjust.
2575 (initialize_low_arch): New function.
2576 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2577 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2578 [__mips64] (init_registers_mips_linux)
2579 (init_registers_mips_dsp_linux): Delete defines.
2580 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2581 (have_dsp): New global.
2582 (mips_read_description): New, based on mips_arch_setup.
2583 (mips_arch_setup): Reimplement.
2584 (get_usrregs_info): New function.
2585 (mips_cannot_fetch_register, mips_cannot_store_register)
2586 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2587 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2588 (target_regsets): Rename to ...
2589 (mips_regsets): ... this, and make static.
2590 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2591 (dsp_regs_info, regs_info): New globals.
2592 (mips_regs_info): New function.
2593 (the_low_target): Adjust.
2594 (initialize_low_arch): New function.
2595 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2596 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2598 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2599 (arm_read_description): New, with bits factored from
2601 (arm_arch_setup): Reimplement.
2602 (target_regsets): Rename to ...
2603 (arm_regsets): ... this, and make static.
2604 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2605 (arm_regs_info): New function.
2606 (the_low_target): Adjust.
2607 (initialize_low_arch): New function.
2608 * linux-m68k-low.c (tdesc_m68k): Declare.
2609 (target_regsets): Rename to ...
2610 (m68k_regsets): ... this, and make static.
2611 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2612 (m68k_regs_info): New function.
2613 (m68k_arch_setup): New function.
2614 (the_low_target): Adjust.
2615 (initialize_low_arch): New function.
2616 * linux-sh-low.c (tdesc_sharch): Declare.
2617 (target_regsets): Rename to ...
2618 (sh_regsets): ... this, and make static.
2619 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2620 (sh_regs_info, sh_arch_setup): New functions.
2621 (the_low_target): Adjust.
2622 (initialize_low_arch): New function.
2623 * linux-bfin-low.c (tdesc_bfin): Declare.
2624 (bfin_arch_setup): New function.
2625 (bfin_usrregs_info, regs_info): New globals.
2626 (bfin_regs_info): New function.
2627 (the_low_target): Adjust.
2628 (initialize_low_arch): New function.
2629 * linux-cris-low.c (tdesc_cris): Declare.
2630 (cris_arch_setup): New function.
2631 (cris_usrregs_info, regs_info): New globals.
2632 (cris_regs_info): New function.
2633 (the_low_target): Adjust.
2634 (initialize_low_arch): New function.
2635 * linux-cris-low.c (tdesc_crisv32): Declare.
2636 (cris_arch_setup): New function.
2637 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2638 (cris_regs_info): New function.
2639 (the_low_target): Adjust.
2640 (initialize_low_arch): New function.
2641 * linux-m32r-low.c (tdesc_m32r): Declare.
2642 (m32r_arch_setup): New function.
2643 (m32r_usrregs_info, regs_info): New globals.
2644 (m32r_regs_info): Adjust.
2645 (initialize_low_arch): New function.
2646 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2647 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2648 (tic6x_usrregs_info): Forward declare.
2649 (tic6x_read_description): New function, based on ...
2650 (tic6x_arch_setup): ... this. Reimplement.
2651 (target_regsets): Rename to ...
2652 (tic6x_regsets): ... this, and make static.
2653 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2654 (tic6x_regs_info): New function.
2655 (the_low_target): Adjust.
2656 (initialize_low_arch): New function.
2657 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2658 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2659 (target_regsets): Rename to ...
2660 (xtensa_regsets): ... this, and make static.
2661 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2663 (xtensa_arch_setup, xtensa_regs_info): New functions.
2664 (the_low_target): Adjust.
2665 (initialize_low_arch): New function.
2666 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2667 (nios2_arch_setup): Set the current process'es tdesc.
2668 (target_regsets): Rename to ...
2669 (nios2_regsets): ... this.
2670 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2671 (nios2_regs_info): New function.
2672 (the_low_target): Adjust.
2673 (initialize_low_arch): New function.
2674 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2675 (aarch64_arch_setup): Set the current process'es tdesc.
2676 (target_regsets): Rename to ...
2677 (aarch64_regsets): ... this.
2678 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2679 (aarch64_regs_info): New function.
2680 (the_low_target): Adjust.
2681 (initialize_low_arch): New function.
2682 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2684 (target_regsets): Rename to ...
2685 (tile_regsets): ... this.
2686 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2687 (tile_regs_info): New function.
2688 (tile_arch_setup): Set the current process'es tdesc.
2689 (the_low_target): Adjust.
2690 (initialize_low_arch): New function.
2691 * spu-low.c (tdesc_spu): Declare.
2692 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2693 * win32-arm-low.c (tdesc_arm): Declare.
2694 (arm_arch_setup): New function.
2695 (the_low_target): Install arm_arch_setup instead of
2697 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2698 (init_windows_x86): Rename to ...
2699 (i386_arch_setup): ... this. Set `win32_tdesc'.
2700 (the_low_target): Adjust.
2701 * win32-low.c (win32_tdesc): New global.
2702 (child_add_thread): Don't create the thread cache here.
2703 (do_initial_child_stuff): Set the new process'es tdesc.
2704 * win32-low.h (struct target_desc): Forward declare.
2705 (win32_tdesc): Declare.
2706 * lynx-i386-low.c (tdesc_i386): Declare global.
2707 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2708 * lynx-low.c (lynx_tdesc): New global.
2709 (lynx_add_process): Set the new process'es tdesc.
2710 * lynx-low.h (struct target_desc): Forward declare.
2711 (lynx_tdesc): Declare global.
2712 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2713 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2714 * nto-low.c (nto_tdesc): New global.
2715 (do_attach): Set the new process'es tdesc.
2716 * nto-low.h (struct target_desc): Forward declare.
2717 (nto_tdesc): Declare.
2718 * nto-x86-low.c (tdesc_i386): Declare.
2719 (nto_x86_arch_setup): Set `nto_tdesc'.
2721 2013-06-04 Gary Benson <gbenson@redhat.com>
2723 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2724 to qSupported response when appropriate.
2725 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2726 with nonzero-length annex.
2727 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2728 arguments supplied in annex.
2730 2013-05-31 Doug Evans <dje@google.com>
2733 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2734 64 bits in 64-cross-32 environment.
2736 2013-05-28 Pedro Alves <palves@redhat.com>
2738 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2739 (aarch64-without-fpu.c): Delete rule.
2740 * configure.srv (aarch64*-*-linux*): Remove references to
2741 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2742 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2745 2013-05-24 Pedro Alves <palves@redhat.com>
2747 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2748 instead of strchr/decode_address. Error if the range isn't split
2749 with a ','. Don't assume there's be a ':' in the action.
2751 2013-05-23 Yao Qi <yao@codesourcery.com>
2752 Pedro Alves <palves@redhat.com>
2754 * linux-low.c (lwp_in_step_range): New function.
2755 (linux_wait_1): If the thread was range stepping and stopped
2756 outside the stepping range, report the stop to GDB. Otherwise,
2757 continue stepping. Add range stepping debug output.
2758 (linux_set_resume_request): Copy the step range from the resume
2760 (linux_supports_range_stepping): New.
2761 (linux_target_ops) <supports_range_stepping>: Set to
2762 linux_supports_range_stepping.
2763 * linux-low.h (struct linux_target_ops)
2764 <supports_range_stepping>: New field.
2765 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2766 * linux-x86-low.c (x86_supports_range_stepping): New.
2767 (the_low_target) <supports_range_stepping>: Set to
2768 x86_supports_range_stepping.
2769 * server.c (handle_v_cont): Handle 'r' action.
2770 (handle_v_requests): Append ";r" if the target supports range
2772 * target.h (struct thread_resume) <step_range_start,
2773 step_range_end>: New fields.
2774 (struct target_ops) <supports_range_stepping>:
2776 (target_supports_range_stepping): New macro.
2778 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2780 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2781 confusion in comment.
2783 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2785 * lynx-low.c (struct process_info_private): New type.
2786 (lynx_add_process): New function.
2787 (lynx_create_inferior, lynx_attach): Replace calls to
2788 add_process by calls to lynx_add_process.
2789 (lynx_resume): If PTID is null, then try using
2790 current_process()->private->last_wait_event_ptid.
2792 (lynx_clear_inferiors): Delete. The contents of that function
2793 has been inlined in lynx_mourn;
2794 (lynx_wait_1): Save the ptid in the process's private data.
2795 (lynx_mourn): Free the process' private data. Replace call
2796 to lynx_clear_inferiors by call to clear_inferiors.
2798 2013-05-17 Yao Qi <yao@codesourcery.com>
2800 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2803 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2805 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2806 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2807 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2808 PT_TEXT_END_ADDR guards. Update comments.
2809 (linux_target_op) <read_offsets>: Conditionally define to
2810 linux_read_offsets if the target is UCLIBC and if it defines
2811 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2813 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
2814 Andrew Jenner <andrew@codesourcery.com>
2816 * Makefile.in (SFILES): Add linux-nios2-low.c.
2817 (clean): Add action to delete nios2-linux.c.
2818 (nios2-linux.c): New rule.
2819 * configure.srv: Add nios2*-*-linux*.
2820 * linux-nios2-low.c: New.
2822 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
2824 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2826 2013-04-25 Hui Zhu <hui@codesourcery.com>
2829 * ax.c (ax_printf): Add fflush.
2831 2013-04-22 Tom Tromey <tromey@redhat.com>
2833 * Makefile.in (SFILES): Add filestuff.c.
2834 (OBS): Add filestuff.o.
2835 (filestuff.o): New target.
2836 * config.in, configure: Rebuild.
2837 * configure.ac: Check for fdwalk, pipe2.
2839 2013-04-17 Pedro Alves <palves@redhat.com>
2841 * configure.ac (USE_THREAD_DB): Delete variable.
2842 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2843 Don't AC_SUBST USE_THREAD_DB.
2844 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2845 * config.in, configure: Regenerate.
2847 2013-04-16 Pedro Alves <palves@redhat.com>
2849 * linux-low.h (struct lwp_info) <thread_known>: Move under
2850 the USE_THREAD_DB #ifdef.
2852 2013-04-16 Pedro Alves <palves@redhat.com>
2854 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2855 (linux-low.o): Delete rule.
2856 * linux-low.h: Always include "gdb_thread_db.h" instead of
2857 conditionally including thread_db.h.
2858 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2861 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2863 * Makefile.in (install-only): Fix make install regression.
2865 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
2867 Convert man pages to texinfo, new gdbinit.5 texinfo page.
2868 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2870 * gdbserver.1: Remove.
2872 2013-03-22 Pedro Alves <palves@redhat.com>
2874 * linux-low.c (handle_extended_wait): Don't call
2875 linux_enable_event_reporting.
2877 2013-03-15 Tony Theodore <tonyt@logyst.com>
2880 * Makefile.in (SHELL): Use @SHELL@.
2882 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
2884 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2887 2013-03-13 Joel Brobecker <brobecker@adacore.com>
2889 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2890 Remove extraneous NULL element.
2892 2013-03-13 Yao Qi <yao@codesourcery.com>
2894 * tracepoint.c (traceframe_read_tsv): Look for the last matched
2895 'V' block in trace frame.
2897 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2899 * target.h (struct target_ops): Add btrace ops.
2900 (target_supports_btrace): New macro.
2901 (target_enable_btrace): New macro.
2902 (target_disable_btrace): New macro.
2903 (target_read_btrace): New macro.
2904 * gdbthread.h (struct thread_info): Add btrace field.
2905 * server.c: Include btrace-common.h.
2906 (handle_btrace_general_set): New function.
2907 (handle_btrace_enable): New function.
2908 (handle_btrace_disable): New function.
2909 (handle_general_set): Call handle_btrace_general_set.
2910 (handle_qxfer_btrace): New function.
2911 (struct qxfer qxfer_packets[]): Add btrace entry.
2912 * inferiors.c (remove_thread): Disable btrace.
2913 * linux-low: Include linux-btrace.h.
2914 (linux_low_enable_btrace): New function.
2915 (linux_low_read_btrace): New function.
2916 (linux_target_ops): Add btrace ops.
2917 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2918 Add srv_linux_btrace=yes.
2919 (x86_64-*-linux*): Add linux-btrace.o.
2920 Add srv_linux_btrace=yes.
2921 * configure.ac: Define HAVE_LINUX_BTRACE.
2922 * config.in: Regenerated.
2923 * configure: Regenerated.
2925 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2927 * server.c (handle_qxfer): Preserve error message if -3 is
2929 (qxfer): Document the -3 return value.
2931 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
2933 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2934 (linux_btrace_h): New variable.
2935 (linux-btrace.o): New rule.
2937 2013-03-08 Stan Shebs <stan@codesourcery.com>
2938 Hafiz Abid Qadeer <abidh@codesourcery.com>
2940 * tracepoint.c (trace_buffer_size): New global.
2941 (DEFAULT_TRACE_BUFFER_SIZE): New define.
2942 (init_trace_buffer): Change to one-argument function. Allocate
2943 trace buffer memory.
2944 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2945 handle QTBuffer:size packet.
2946 (cmd_bigqtbuffer_size): New function.
2947 (initialize_tracepoint): Call init_trace_buffer with
2948 DEFAULT_TRACE_BUFFER_SIZE.
2949 * server.c (handle_query): Add QTBuffer:size in the
2952 2013-03-07 Yao Qi <yao@codesourcery.com>
2954 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2955 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2957 (cmd_qtsp): Adjust condition. Do post increment.
2958 Set cur_action and cur_step_action back to 0.
2960 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
2963 * linux-low.c (linux_write_memory): Return early success if LEN is
2966 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
2968 * configure.srv: Add x86_64-*-cygwin* as target.
2970 2013-02-28 Tom Tromey <tromey@redhat.com>
2972 * configure.ac: Invoke AC_SYS_LARGEFILE.
2973 * configure, config.in: Rebuild.
2975 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
2977 * win32-low.c: Throughout, fix format strings and casts of
2978 printf-like functions to avoid type related warnings on all
2980 (get_child_debug_event): Print dwDebugEventCode as hex since
2981 that's how it's usually documented.
2983 2013-02-28 Yao Qi <yao@codesourcery.com>
2985 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2988 2013-02-27 Jiong Wang <jiwang@tilera.com>
2990 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2991 (reg-tilegx32.c): New rule.
2992 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2993 * linux-tile-low.c (tile_arch_setup): New function. Invoke
2994 different register info initializer according to elf class.
2995 (init_registers_tilgx32): New function. The tilegx32 register info
2997 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2998 (tile_store_gregset): Likewise.
3000 2013-02-27 Yao Qi <yao@codesourcery.com>
3002 * server.c (process_point_options): Print debug message when
3003 debug_threads is true.
3005 2013-02-26 Yao Qi <yao@codesourcery.com>
3007 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3009 2013-02-19 Pedro Alves <palves@redhat.com>
3010 Kai Tietz <ktietz@redhat.com>
3014 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3015 instead of strtoul to extract address from packet.
3016 (process_serial_event) <'z'>: Likewise.
3018 2013-02-18 Yao Qi <yao@codesourcery.com>
3020 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3022 2013-02-14 Pedro Alves <palves@redhat.com>
3026 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3027 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3029 2013-02-14 Pedro Alves <palves@redhat.com>
3031 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3033 2013-02-14 Pedro Alves <palves@redhat.com>
3035 * tracepoint.c (save_string): Delete.
3036 (add_tracepoint_action): Use savestring instead of save_string.
3038 2013-02-12 Pedro Alves <palves@redhat.com>
3040 * linux-xtensa-low.c: Ditto.
3041 * xtensa-xtregs.c: Ditto.
3043 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3045 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3048 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3050 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3051 aarch64_num_wp_regs and aarch64_num_bp_regs to
3052 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3054 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3056 * linux-aarch64-low.c (ps_get_thread_area): Replace
3057 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3059 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3060 Marcus Shawcroft <marcus.shawcroft@arm.com>
3061 Nigel Stephens <nigel.stephens@arm.com>
3062 Yufeng Zhang <yufeng.zhang@arm.com>
3064 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3065 (aarch64.c, aarch64-without-fpu.c): New targets.
3066 * configure.srv (aarch64*-*-linux*): New.
3067 * linux-aarch64-low.c: New file.
3069 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3071 * linux-low.c (handle_extended_wait, linux_create_inferior)
3072 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3073 (dequeue_one_deferred_signal, linux_resume_one_thread)
3074 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3075 (linux_tracefork_grandchild, linux_test_for_tracefork)
3076 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3077 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3078 where the argument is 0.
3080 2013-01-25 Yao Qi <yao@codesourcery.com>
3082 * event-loop.c: Include "queue.h".
3083 (gdb_event_p): New typedef.
3084 (struct gdb_event) <next_event>: Remove.
3085 (event_queue): Change to QUEUE(gdb_event_p).
3086 (async_queue_event): Remove.
3087 (gdb_event_xfree): New.
3088 (initialize_event_loop): New.
3089 (process_event): Use API from QUEUE.
3090 (wait_for_event): Likewise.
3091 * server.c (main): Call initialize_event_loop.
3092 * server.h (initialize_event_loop): Declare.
3094 2013-01-18 Yao Qi <yao@codesourcery.com>
3096 * ax.h (struct eval_agent_expr_context): New.
3097 (gdb_eval_agent_expr): Update declaration.
3098 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3099 TFRAME. Add new argument CTX.
3100 * server.h (struct eval_agent_expr_context): Declare.
3101 (agent_mem_read, agent_tsv_read): Update declaration.
3102 (agent_mem_read_string): Likewise.
3103 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3104 (add_traceframe_block): Add new argument TPOINT.
3105 Increase TPOINT->traceframe_usage.
3106 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3107 eval_tracepoint_agent_expr.
3108 (condition_true_at_tracepoint): Likewise.
3109 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3110 (agent_mem_read_string, agent_tsv_read): Likewise.
3112 2013-01-16 Yao Qi <yao@codesourcery.com>
3114 * linux-low.c (linux_resume_one_lwp): Don't check
3115 'lwp->bp_reinsert != 0'.
3117 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3118 Pedro Alves <palves@redhat.com>
3120 * lynx-low.c (ptrace_request_to_str): Define a temporary
3121 macro and use it to simplify this function's implementation.
3123 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3125 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3128 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3130 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3132 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3134 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3136 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3138 * lynx-low.c (lynx_resume): Use the resume_info parameter
3139 to determine the ptid for the lynx_ptrace call, unless
3140 it is equal to minus_one_ptid, in which case we use the
3141 ptid of the current_inferior.
3142 (lynx_wait_1): After having received a thread create/exit
3143 event, resume the inferior's execution using the signaling
3144 thread's ptid, rather than the old ptid.
3146 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3148 * lynx-low.c (lynx_resume): Delete variable ret.
3150 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3152 * gdbreplay.c (gdbreplay_version): Update copyright year.
3153 * server.c (gdbserver_version): Likewise.
3155 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3157 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3160 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3162 * lynx-low.c (ptrace_request_to_str): Add handling for
3165 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3167 * lynx-low.c (lynx_attach): Delete variable new_process.
3169 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3171 * lynx-low.c (lynx_create_inferior): Delete variable
3174 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3176 * lynx-low.c (ptrace_request_to_str): Do not handle
3177 PTRACE_GETTHREADLIST if this macro does not exist.
3179 2012-12-15 Yao Qi <yao@codesourcery.com>
3181 * Makefile.in (OBS): Add notif.o.
3182 * notif.c, notif.h: New.
3183 * server.c: Include "notif.h".
3184 (struct vstop_notif) <next>: Remove.
3186 (queue_stop_reply): Update.
3187 (push_event, send_next_stop_reply): Remove.
3188 (discard_queued_stop_replies): Update.
3189 (notif_stop): New variable.
3190 (handle_v_stopped): Remove.
3191 (handle_v_requests): Don't call handle_v_stopped. Call
3192 handle_ack_notif instead.
3193 (queue_stop_reply_callback): Call notif_event_enque instead
3194 of queue_stop_reply.
3195 (handle_status): Don't call send_next_stop_reply, call
3196 notif_write_event instead.
3197 (kill_inferior_callback): Likewise.
3198 (detach_or_kill_inferior_callback): Likewise.
3199 (main): Call initialize_notif.
3200 (process_serial_event): Call QUEUE_is_empty.
3201 (handle_target_event): Call notif_push instead of push event.
3202 * server.h (push_event): Remove declaration.
3204 2012-12-10 Tom Tromey <tromey@redhat.com>
3206 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3207 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3210 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3211 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3212 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3213 (amd64-linux-ipa.o, ax.o): Rewrite.
3214 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3215 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3216 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3217 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3218 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3219 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3220 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3221 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3222 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3223 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3224 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3225 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3226 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3227 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3228 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3229 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3230 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3231 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3232 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3233 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3234 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3235 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3236 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3237 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3238 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3239 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3240 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3241 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3242 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3243 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3244 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3245 (reg-tilegx.o): Remove.
3246 (all_object_files): New macro.
3247 Include .deps files.
3248 * aclocal.m4, configure: Rebuild.
3249 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3250 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3251 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3253 2012-12-05 Tom Tromey <tromey@redhat.com>
3256 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3258 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3260 * configure.ac: Check for linux/perf_event.h.
3261 * config.in: Regenerated.
3262 * configure: Regenerated.
3264 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3266 * hostio.c (handle_readlink): Decrease buffer size
3267 parameter passed to readlink by one byte.
3269 2012-11-26 Yao Qi <yao@codesourcery.com>
3271 * configure.ac (build_warnings): Append '-Wempty-body'.
3272 * configure: Regenerated.
3273 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3276 2012-11-15 Pierre Muller <muller@sourceware.org>
3278 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3279 * config.in: Regenerate.
3280 * configure: Regenerate.
3281 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3282 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3283 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3284 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3286 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3287 instead of <sys/wait.h> header.
3288 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3290 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3292 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3293 (various make rules): Remove -DGDBSERVER
3295 2012-11-09 Yao Qi <yao@codesourcery.com>
3297 * spu-low.c (current_ptid): Move it to ..
3298 * gdbthread.h: ... here. New.
3299 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3300 * server.c (myresume, process_serial_event): Likewise.
3301 * thread-db.c (thread_db_find_new_threads): Likewise.
3302 * tracepoint.c (run_inferior_command): Likewise.
3304 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3306 * server.c (handle_search_memory_1): Include access length in
3309 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3311 * linux-crisv32-low.c: Fix compile errors.
3313 2012-09-04 Yao Qi <yao@codesourcery.com>
3315 * tracepoint.c (cmd_qtsv): Adjust debug message.
3316 Don't check CUR_TPOINT.
3318 2012-08-28 Yao Qi <yao@codesourcery.com>
3320 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3321 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3322 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3323 Remove declarations of xmalloc, xreallloc, xstrdup and
3325 * Makefile.in (libiberty_h): New.
3326 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3327 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3329 2012-08-23 Yao Qi <yao@codesourcery.com>
3331 * server.h: Remove declaration of 'xsnprintf'.
3333 2012-08-22 Keith Seitz <keiths@redhat.com>
3335 * server.h: Include build-gnulib-gbserver/config.h.
3336 * gdbreplay.c: Likewise.
3338 2012-08-08 Doug Evans <dje@google.com>
3340 * Makefile.in (SFILES): Add gdb_vecs.c.
3341 (OBS): Add gdb_vecs.o.
3342 (gdb_vecs_h, host_defs_h): New variables.
3343 (thread-db.o): Add $(gdb_vecs_h) dependency.
3344 (gdb_vecs.o): New rule.
3345 * thread-db.c: #include "gdb_vecs.h".
3346 (thread_db_load_search): Use a vector to iterate over path elements.
3347 Handle text appearing after "$pdir".
3349 * configure.ac: Add check for strstr.
3350 * config.in: Regenerate.
3351 * configure: Regenerate.
3353 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3355 * hostio.c (handle_pread): If pread fails, fall back to attempting
3357 (handle_pwrite): Likewise for pwrite.
3359 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3361 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3362 between unsupported TYPE and unimplementable ADDR/LEN combination.
3363 (arm_insert_point): Act on new return value.
3365 2012-07-31 Pedro Alves <palves@redhat.com>
3367 * server.c (process_point_options): Only skip tokens if we find
3368 one that is unrecognized. Don't treat 'X' specially while
3369 skipping unrecognized tokens.
3371 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3373 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3374 to 4-byte-align HW breakpoint addresses for Thumb.
3376 2012-07-27 Yao Qi <yao@codesourcery.com>
3380 * server.h: Declare gdb_agent_about_to_close.
3381 * target.c (kill_inferior): Include "agent.h".
3382 New. Send command 'kill'.
3383 * target.h (kill_inferior): Removed macro.
3384 * tracepoint.c (gdb_agent_about_to_close): New.
3385 (gdb_agent_helper_thread): Handle command 'close'.
3386 Wait endlessly until the inferior stops.
3387 Install gdb_agent_remove_socket to atexit hook.
3388 (agent_socket_name): New static variable.
3389 (gdb_agent_socket_init): Replace local variable 'name' with
3390 'agent_socket_name'.
3391 (gdb_agent_remove_socket): New.
3393 2012-07-27 Yao Qi <yao@codesourcery.com>
3395 * server.c (process_point_options): Stop at 'X' when parsing.
3397 2012-07-19 Michael Eager <eager@eagercon.com>
3399 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3401 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3402 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3403 hardware breakpoint.
3405 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3407 * gdbserver/linux-low.c (initialize_low): Call
3408 linux_ptrace_init_warnings.
3410 2012-07-02 Doug Evans <dje@google.com>
3412 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3415 2012-07-02 Stan Shebs <stan@codesourcery.com>
3417 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3418 (ax.o): Add it to build rule.
3420 (OBS): Add format.o.
3421 (IPA_OBS): Add format.o.
3422 * server.c (handle_query): Claim support for breakpoint commands.
3423 (process_point_options): Add command case.
3424 (process_serial_event): Leave running if there are printfs in
3426 * mem-break.h (any_persistent_commands): Declare.
3427 (add_breakpoint_commands): Declare.
3428 (gdb_no_commands_at_breakpoint): Declare.
3429 (run_breakpoint_commands): Declare.
3430 * mem-break.c (struct point_command_list): New struct.
3431 (struct breakpoint): New field command_list.
3432 (any_persistent_commands): New function.
3433 (add_commands_to_breakpoint): New function.
3434 (add_breakpoint_commands): New function.
3435 (gdb_no_commands_at_breakpoint): New function.
3436 (run_breakpoint_commands): New function.
3437 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3439 * ax.c: Include format.h.
3440 (ax_printf): New function.
3441 (gdb_eval_agent_expr): Add printf opcode.
3443 2012-06-13 Yao Qi <yao@codesourcery.com>
3445 * server.c (start_inferior): Remove duplicated writes to fields
3446 'last_resume_kind' and 'last_status' of 'current_inferior'.
3448 2012-06-12 Yao Qi <yao@codesourcery.com>
3449 Pedro Alves <palves@redhat.com>
3451 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3453 * server.c (handle_v_cont): Extend comment.
3455 2012-06-11 Yao Qi <yao@codesourcery.com>
3457 * linux-low.c (linux_attach): Add 'static'.
3459 2012-06-06 Yao Qi <yao@codesourcery.com>
3461 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3463 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3465 Fix gcc -flto compilation warning.
3466 * server.c (main): Make variable multi_mode and attach volatile.
3468 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3470 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3471 if the platform doesn't know about it.
3473 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3475 * Makefile.in (SFILES): Add linux-tile-low.c.
3476 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3477 * configure.srv: Handle tilegx-*-linux*.
3478 * linux-tile-low.c: New file.
3480 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3482 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3484 2012-05-24 Pedro Alves <palves@redhat.com>
3488 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3490 2012-05-24 Pedro Alves <palves@redhat.com>
3494 Replace target_signal with gdb_signal throughout.
3496 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3498 * linux-low.c (linux_store_registers): Avoid the copying sequence
3499 when no data has been retrieved by ptrace.
3501 2012-05-22 Will Deacon <will.deacon@arm.com>
3503 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3504 Include asm/ptrace.h.
3505 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3508 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3510 * linux-low.c (linux_store_registers): Don't re-retrieve data
3511 with ptrace that has already been obtained from /proc. Always
3512 copy any data retrieved with ptrace to the buffer supplied.
3514 2012-05-11 Yao Qi <yao@codesourcery.com>
3515 Pedro Alves <palves@redhat.com>
3517 * linux-low.c (enum stopping_threads_kind): New.
3518 (stopping_threads): Change type to `enum stopping_threads_kind'.
3519 (handle_extended_wait): If stopping and suspending threads, leave
3520 the new_lwp suspended too.
3521 (linux_wait_for_event): Adjust.
3522 (stop_all_lwps): Set `stopping_threads' to
3523 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3524 whether we're suspending threads or just stopping them. Assert no
3527 2012-04-29 Yao Qi <yao@codesourcery.com>
3529 * server.h: Move some code to ...
3530 * gdbthread.h: ... here. New.
3531 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3532 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3533 (nto-low.o, win32-low.o): Likewise.
3534 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3535 * regcache.c, remote-utils.c, server.c: Likewise.
3536 * target.c, tracepoint.c, win32-low.c: Likewise.
3538 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3540 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3541 (PTRACE_ARG4_TYPE): Likewise.
3542 (PTRACE_XFER_TYPE): Likewise.
3543 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3544 ptrace to PTRACE_ARG3_TYPE.
3545 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3546 (PTRACE_ARG4_TYPE): Likewise.
3547 (PTRACE_XFER_TYPE): Likewise.
3548 (linux_detach_one_lwp): Cast fourth argument of
3549 ptrace to long then PTRACE_ARG4_TYPE.
3550 (regsets_fetch_inferior_registers): Cast third argument of
3551 ptrace to long then PTRACE_ARG3_TYPE.
3552 (regsets_store_inferior_registers): Likewise.
3554 2012-04-20 Pedro Alves <palves@redhat.com>
3556 * configure: Regenerate.
3558 2012-04-19 Pedro Alves <palves@redhat.com>
3560 * Makefile.in (GNULIB_BUILDDIR): New.
3561 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3562 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3563 (all, install-only, uninstall, clean-info, all-lib, clean): No
3564 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3565 (maintainer-clean realclean distclean): Use subdir_do.
3567 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3568 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3569 * acinclude.m4: Include acx_configure_dir.m4.
3570 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3571 calls. Call AC_PROG_RANLIB. Configure gnulib using
3574 (GNULIB_STDINT_H): Adjust.
3575 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3576 * gdbreplay.c: Include build-gnulib/config.h.
3577 * server.h: Likewise.
3578 * aclocal.m4: Regenerate.
3579 * config.in: Regenerate.
3580 * configure: Regenerate.
3582 2012-04-19 Pedro Alves <palves@redhat.com>
3584 * Makefile.in (LIBGNU, INCGNU): Adjust.
3585 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3586 (all, install-only, uninstall, clean-info, all-lib, clean)
3587 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3588 * configure.ac: Adjust AC_OUTPUT output.
3589 * aclocal.m4: Regenerate.
3590 * configure: Regenerate.
3592 2012-04-19 Pedro Alves <palves@redhat.com>
3594 * Makefile.in (generated_files): New.
3595 (server_h): Remove the explicit dependency on config.h, and depend
3596 on $generated_files.
3598 2012-04-19 Pedro Alves <palves@redhat.com>
3600 * Makefile.in (INCGNU): Add -Ignulib.
3602 2012-04-19 Pedro Alves <palves@redhat.com>
3604 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3605 (INCGNU): ... this, and spell out -I here.
3606 (GNULIB_LIB): Rename to ...
3608 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3610 2012-04-19 Pedro Alves <palves@redhat.com>
3612 * config.in: Regenerate.
3614 2012-04-19 Pedro Alves <palves@redhat.com>
3616 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3617 * server.h (memmem): Remove declaration.
3618 * config.in: Regenerate.
3619 * configure: Regenerate.
3621 2012-04-19 Yao Qi <yao@codesourcery.com>
3623 * Makefile.in (SFILES): Add common/vec.c.
3627 2012-04-19 Yao Qi <yao@codesourcery.com>
3629 * remote-utils.c (prepare_resume_reply): Replace with macro
3630 target_core_of_thread.
3631 * server.c (handle_qxfer_threads_proper): Likewise.
3632 * target.h (traget_core_of_thread): New macro.
3634 2012-04-18 Pedro Alves <palves@redhat.com>
3636 * aclocal.m4: Regenerate.
3637 * configure: Regenerate.
3639 2012-04-16 Yao Qi <yao@codesourcery.com>
3641 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3642 duplicated on address.
3644 2012-04-16 Yao Qi <yao@codesourcery.com>
3646 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3647 (struct tracepoint_action_ops) <send>: New field.
3648 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3649 (agent_expr_send, x_tracepoint_action_send): New.
3650 (l_tracepoint_action_send): New.
3651 (cmd_qtdp): Download and install tracepoint
3652 according to `use_agent'.
3653 (run_inferior_command): Add one more parameter `len'.
3655 (tracepoint_send_agent): New.
3656 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3658 2012-04-16 Yao Qi <yao@codesourcery.com>
3660 * tracepoint.c (download_tracepoints): Moved to ...
3661 (cmd_qtstart): ... here.
3663 2012-04-14 Yao Qi <yao@codesourcery.com>
3665 * tracepoint.c: Include inttypes.h.
3666 (struct collect_memory_action): Use sized types.
3667 (struct tracepoint): Likewise.
3668 (cmd_qtdp, stop_tracing): Update print specifiers.
3669 (cmd_qtp, response_tracepoint): Likewise.
3670 (collect_data_at_tracepoint): Likewise.
3671 (collect_data_at_step): Likewise.
3673 2012-04-14 Yao Qi <yao@codesourcery.com>
3675 Import gnulib module inttypes.
3676 * aclocal.m4, config.in, configure: Regenerated.
3678 2012-04-14 Yao Qi <yao@codesourcery.com>
3680 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3681 Makefile and config.status at last.
3683 2012-04-13 Yao Qi <yao@codesourcery.com>
3685 * tracepoint.c: Include stdint.h unconditionally.
3687 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3689 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3690 on BFD_HAVE_SYS_PROCFS_TYPE.
3691 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3692 * configure: Regenerate.
3693 * config.in: Likewise.
3695 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3697 * Makefile.in (clean): Also remove x32.c x32-linux.c
3698 x32-avx.c x32-avx-linux.c.
3699 (x32.o): New target.
3701 (x32-linux.o): Likewise.
3702 (x32-linux.c): Likewise.
3703 (x32-avx.o): Likewise.
3704 (x32-avx.c): Likewise.
3705 (x32-avx-linux.o): Likewise.
3706 (x32-avx-linux.c): Likewise.
3708 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3709 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3710 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3711 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3712 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3713 i386/x32-avx-linux.xml.
3715 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3716 (init_registers_x32_avx_linux): Likwise.
3717 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3718 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3720 2012-04-13 Pedro Alves <palves@redhat.com>
3722 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3723 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3724 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3725 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3728 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3730 * linux-x86-low.c (compat_x32_clock_t): New.
3731 (compat_x32_siginfo_t): Likewise.
3732 (compat_x32_siginfo_from_siginfo): Likewise.
3733 (siginfo_from_compat_x32_siginfo): Likewise.
3734 (linux_is_elf64): Likewise.
3735 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3736 and siginfo_from_compat_x32_siginfo for x32.
3737 (x86_arch_setup): Set linux_is_elf64.
3739 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3742 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3744 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3745 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3746 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3747 compatible with process.
3749 2012-04-12 Yao Qi <yao@codesourcery.com>
3751 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3752 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3753 (install-only, install-info, clean): Handle sub dir gnulib.
3754 (all-lib, am--refresh): New targets.
3755 (memmem.o): Remove target.
3756 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3757 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3758 (AC_REPLACE_FUNCS): Remove memmem.
3759 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3760 (AC_OUTPUT): Generate Makefile in gnulib/.
3761 * aclocal.m4, config.in, configure: Regenerated.
3763 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3767 2012-04-05 Pedro Alves <palves@redhat.com>
3769 -Werror=strict-aliasing
3771 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3774 2012-04-04 Pedro Alves <palves@redhat.com>
3776 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3777 (sparc_store_gregset_from_stack, sparc_store_gregset)
3778 (sparc_breakpoint_at): Fix formatting.
3780 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3782 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3784 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3785 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3786 * config.in: Regenerate.
3787 * configure: Likewise.
3789 2012-03-29 Pedro Alves <palves@redhat.com>
3791 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3792 Correct ptrace arguments.
3794 2012-03-28 Pedro Alves <palves@redhat.com>
3796 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3797 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3798 (IA64_FR1_REGNUM): New defines.
3799 (ia64_fetch_register): New.
3800 (the_low_target): Install it.
3801 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3803 * linux-low.c (linux_fetch_registers): Try the
3804 the_low_target.fetch_register hook first.
3806 * linux-arm-low.c (the_low_target): Adjust.
3807 * linux-bfin-low.c (the_low_target): Adjust.
3808 * linux-cris-low.c (the_low_target): Adjust.
3809 * linux-crisv32-low.c (the_low_target): Adjust.
3810 * linux-m32r-low.c (the_low_target): Adjust.
3811 * linux-m68k-low.c (the_low_target): Adjust.
3812 * linux-mips-low.c (the_low_target): Adjust.
3813 * linux-ppc-low.c (the_low_target): Adjust.
3814 * linux-s390-low.c (the_low_target): Adjust.
3815 * linux-sh-low.c (the_low_target): Adjust.
3816 * linux-sparc-low.c (the_low_target): Adjust.
3817 * linux-tic6x-low.c (the_low_target): Adjust.
3818 * linux-x86-low.c (the_low_target): Adjust.
3819 * linux-xtensa-low.c (the_low_target): Adjust.
3821 2012-03-26 Pedro Alves <palves@redhat.com>
3823 * server.c (handle_qxfer_libraries): Don't bail early if
3824 the_target->qxfer_libraries_svr4 is not NULL.
3826 2012-03-26 Pedro Alves <palves@redhat.com>
3828 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3830 2012-03-23 Pedro Alves <palves@redhat.com>
3832 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3833 "library-list-svr4" element's start tag when the the DSO list is
3836 2012-03-23 Pedro Alves <palves@redhat.com>
3838 * linux-low.c (read_one_ptr): Read the inferior's pointer through
3839 a variable whose type size is the same as the inferior's pointer
3842 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
3844 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3846 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3847 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3848 * linux-low.h: Include <signal.h>.
3849 (struct siginfo): Remove forward declaration.
3850 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3853 2012-03-21 Mike Frysinger <vapier@gentoo.org>
3855 * .gitignore: Ignore more files.
3857 2012-03-19 Pedro Alves <palves@redhat.com>
3858 Jan Kratochvil <jan.kratochvil@redhat.com>
3860 * server.c (cont_thread, general_thread): Add describing comments.
3861 (start_inferior): Clear `cont_thread'.
3862 (handle_v_cont): Don't set `cont_thread' if resuming all threads
3865 2012-03-15 Yao Qi <yao@codesourcery.com>
3867 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3869 (cmd_qtdp): ... here.
3871 2012-03-15 Yao Qi <yao@codesourcery.com>
3873 * tracepoint.c (struct tracepoint_action_ops): New.
3874 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3875 (m_tracepoint_action_download): New.
3876 (r_tracepoint_action_download): New.
3877 (x_tracepoint_action_download): New.
3878 (l_tracepoint_action_download): New.
3879 (add_tracepoint_action): Install `action->ops' according type.
3880 (download_tracepoint_1): Move code `download' function pointer
3881 of various tracepoint_action_ops.
3883 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3885 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
3886 linux_ptrace_attach_warnings.
3888 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
3890 * Makefile.in (linux-ptrace.o): New.
3891 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3892 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3893 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3894 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3895 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3897 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3899 2012-03-08 Yao Qi <yao@codesourcery.com>
3900 Pedro Alves <palves@redhat.com>
3902 Fix PR server/13392.
3903 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3905 * tracepoint.c (remove_tracepoint): New.
3906 (cmd_qtdp): Call remove_tracepoint when failed to install.
3908 2012-03-07 Pedro Alves <palves@redhat.com>
3910 * linux-low.c (get_detach_signal): New.
3911 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3912 Pass on pending signals to PTRACE_DETACH. Check the result of the
3914 * server.c (program_signals, program_signals_p): New.
3915 (handle_general_set): Handle QProgramSignals.
3916 * server.h (program_signals, program_signals_p): Declare.
3918 2012-03-05 Pedro Alves <palves@redhat.com>
3919 Jan Kratochvil <jan.kratochvil@redhat.com>
3921 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3924 2012-03-03 Yao Qi <yao@codesourcery.com>
3926 * tracepoint.c (tracepoint_look_up_symbols): Update call to
3927 agent_look_up_symbols.
3929 2012-03-03 Yao Qi <yao@codesourcery.com>
3931 * Makefile.in (linux-low.o): Keep dependence on agent.h.
3932 (linux-x86-low.o): Likewise.
3933 * server.h: Remove in_process_agent_loaded.
3934 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
3938 2012-03-03 Yao Qi <yao@codesourcery.com>
3940 * tracepoint.c (gdb_agent_capability): New global.
3941 (in_process_agent_loaded_ust): Renamed to
3942 `in_process_agent_supports_ust'.
3944 (in_process_agent_supports_ust): Call agent_capability_check.
3945 (clear_installed_tracepoints): Assert that agent supports
3948 2012-03-03 Yao Qi <yao@codesourcery.com>
3950 * linux-low.c (linux_supports_agent): New.
3951 (linux_target_ops): Initialize field `supports_agent' with
3952 linux_supports_agent.
3953 * target.h (struct target_ops) <supports_agent>: New.
3954 (target_supports_agent): New macro.
3955 * server.c (handle_general_set): Handle packet 'QAgent'.
3956 (handle_query): Send `QAgent+'.
3957 * Makefile.in (server.o): Depends on agent.h.
3959 2012-03-03 Yao Qi <yao@codesourcery.com>
3961 * Makefile.in (OBS): Add agent.o.
3962 Add new rule for agent.o.
3963 Track dependence of tracepoint.c on agent.h.
3964 * tracepoint.c (run_inferior_command_1):
3965 (run_inferior_command): Call agent_run_command.
3966 (gdb_ust_connect_sync_socket): Deleted. Move it to
3968 (resume_thread, stop_thread): Likewise.
3969 (gdb_ust_socket_init): Renamed to ...
3970 (gdb_agent_socket_init): ... New.
3971 (gdb_ust_thread): Renamed to ...
3972 (gdb_agent_helper_thread): ... New.
3973 (gdb_ust_init): Move some code to ...
3974 (gdb_agent_init): ... here. New.
3975 [HAVE_UST]: Call gdb_ust_init.
3976 (initialize_tracepoint_ftlib): Call gdb_agent_init.
3977 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3978 * config.in, configure: Regenerated.
3980 2012-03-02 Pedro Alves <palves@redhat.com>
3982 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3983 * linux-low.c (struct simple_pid_list): New.
3984 (stopped_pids): New a struct simple_pid_list pointer.
3985 (add_to_pid_list, pull_pid_from_list): New.
3986 (handle_extended_wait): Don't assume the first signal new children
3987 report is SIGSTOP. Adjust call to pull_pid_from_list.
3988 (linux_wait_for_lwp): Adjust.
3990 2012-03-02 Yao Qi <yao@codesourcery.com>
3992 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3995 2012-03-02 Yao Qi <yao@codesourcery.com>
3997 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3998 `stop_pc' and `tpoint'. Update caller.
4000 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4002 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4003 * linux-low.c (use_linux_regsets): New macro.
4004 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4005 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4006 (linux_register_in_regsets): New function.
4007 (usr_fetch_inferior_registers): Skip registers covered by
4009 (usr_store_inferior_registers): Likewise.
4010 (usr_fetch_inferior_registers): New macro.
4011 (usr_store_inferior_registers): Likewise.
4012 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4013 (linux_store_registers): Likewise.
4014 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4016 (init_registers_mips64_dsp_linux): Likewise.
4017 (init_registers_mips_linux): New macro.
4018 (init_registers_mips_dsp_linux): Likewise.
4019 (mips_dsp_num_regs): Likewise.
4020 (DSP_BASE, DSP_CONTROL): New fallback macros.
4021 (mips_base_regs): New macro.
4022 (mips_regmap): Use it. Fix the size.
4023 (mips_dsp_regmap): New variable.
4024 (mips_dsp_regset_bitmap): Likewise.
4025 (mips_arch_setup): New function.
4026 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4028 (mips_cannot_store_register): Likewise.
4029 (the_low_target): Update .arch_setup, .num_regs and .regmap
4030 initializers. Add .regset_bitmap initializer.
4031 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4033 * linux-bfin-low.c (the_low_target): Likewise.
4034 * linux-cris-low.c (the_low_target): Likewise.
4035 * linux-crisv32-low.c (the_low_target): Likewise.
4036 * linux-ia64-low.c (the_low_target): Likewise.
4037 * linux-m32r-low.c (the_low_target): Likewise.
4038 * linux-m68k-low.c (the_low_target): Likewise.
4039 * linux-ppc-low.c (the_low_target): Likewise.
4040 * linux-s390-low.c (the_low_target): Likewise.
4041 * linux-sh-low.c (the_low_target): Likewise.
4042 * linux-sparc-low.c (the_low_target): Likewise.
4043 * linux-tic6x-low.c (the_low_target): Likewise.
4044 * linux-x86-low.c (the_low_target): Likewise.
4045 * linux-xtensa-low.c (the_low_target): Likewise.
4046 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4047 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4048 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4050 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4051 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4053 2012-02-29 Yao Qi <yao@codesourcery.com>
4054 Pedro Alves <palves@redhat.com>
4056 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4057 `step_over_finished' is true.
4059 2012-02-27 Pedro Alves <palves@redhat.com>
4061 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4062 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4064 2012-02-27 Pedro Alves <palves@redhat.com>
4067 * linux-low.c (pid_is_stopped): New.
4068 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4070 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4072 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4075 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4077 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4079 2012-02-24 Luis Machado <lgustavo@codesourcery>
4081 * server.c (handle_query): Advertise support for target-side
4082 breakpoint condition evaluation.
4083 (process_point_options): New function.
4084 (process_serial_event): When inserting a breakpoint, check for
4085 a target-side condition that should be evaluated.
4087 * mem-break.c: Include regcache.h and ax.h.
4088 (point_cond_list_t): New data structure.
4089 (breakpoint) <cond_list>: New field.
4090 (find_gdb_breakpoint_at): Make non-static.
4091 (delete_gdb_breakpoint_at): Clear any target-side
4093 (clear_gdb_breakpoint_conditions): New function.
4094 (add_condition_to_breakpoint): Likewise.
4095 (add_breakpoint_condition): Likewise.
4096 (gdb_condition_true_at_breakpoint): Likewise.
4097 (gdb_breakpoint_here): Return result directly instead
4098 of going through a local variable.
4100 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4101 (clear_gdb_breakpoint_conditions): Likewise.
4102 (add_breakpoint_condition): Likewise.
4103 (gdb_condition_true_at_breakpoint): Likewise.
4105 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4106 (need_step_over_p): Take target-side breakpoint condition into
4109 2012-02-24 Luis Machado <lgustavo@codesourcery>
4111 * server.h: Include tracepoint.h.
4112 (agent_mem_read, agent_get_trace_state_variable_value,
4113 agent_set_trace_state_variable_value,
4114 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4115 get_set_tsv_func_addr): New prototypes.
4117 * ax.h: New include file.
4118 * ax.c: New source file.
4120 * tracepoint.c: Include ax.h.
4121 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4122 agent_expr, eval_result_type): Move to ax.h.
4123 (parse_agent_expr): Rename to ...
4124 (gdb_parse_agent_expr): ... this, make it non-static and move
4126 (unparse_agent_expr) Rename to ...
4127 (gdb_unparse_agent_expr): ... this, make it non-static and move
4129 (eval_agent_expr): Rename to ...
4130 (eval_tracepoint_agent_expr): ... this.
4131 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4132 forward declarations.
4133 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4134 (agent_get_trace_state_variable_value): New function.
4135 (agent_set_trace_state_variable_value): New function.
4136 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4137 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4138 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4139 (condition_true_at_tracepoint): Likewise.
4140 (parse_agent_expr): Rename to ...
4141 (gdb_parse_agent_expr): ... this and move to ax.c.
4142 (unparse_agent_expr): Rename to ...
4143 (gdb_unparse_agent_expr): ... this and move to ax.c.
4144 (gdb_agent_op_name): Move to ax.c.
4145 (eval_agent_expr): Rename to ...
4146 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4148 (eval_tracepoint_agent_expr): New function.
4149 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4151 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4153 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4154 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4155 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4156 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4157 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4158 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4159 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4160 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4161 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4162 (compile_bytecodes): Remove forward declaration.
4163 (is_goto_target): Move to ax.c.
4164 (compile_bytecodes): Move to ax.c and call
4165 agent_get_trace_state_variable_value (...) and
4166 agent_set_trace_state_variable_value (...).
4168 * Makefile.in: Update ax.c and IPA dependencies.
4170 2012-02-24 Pedro Alves <palves@redhat.com>
4172 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4173 (cmd_bigqtbuffer_circular): ... this. Only handle
4174 'QTBuffer:circular:'.
4175 (handle_tracepoint_general_set): Adjust.
4177 2012-02-16 Yao Qi <yao@codesourcery.com>
4179 * inferiors.c: Move code to ...
4180 * dll.c: .... here. New.
4181 * server.h: Declare clear_dlls.
4182 * Makefile.in (SFILES): Add dll.c.
4186 2012-02-11 Yao Qi <yao@codesourcery.com>
4188 * server.c: (handle_monitor_command): Add a new parameter
4190 (handle_query): Update caller.
4192 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4194 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4195 * configure, config.in: Regenerate.
4196 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4199 2012-02-02 Pedro Alves <palves@redhat.com>
4201 Try SIGKILL first, then PTRACE_KILL.
4202 * linux-low.c (linux_kill_one_lwp): New.
4203 (linux_kill_one_lwp): Rename to ...
4204 (kill_one_lwp_callback): ... this. Use the new
4207 2012-02-02 Pedro Alves <palves@redhat.com>
4209 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4212 2012-01-27 Pedro Alves <palves@redhat.com>
4214 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4215 (elf_64_file_p): Make static.
4216 (linux_pid_exe_is_elf_64_file): New.
4217 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4218 Delete declarations.
4219 (linux_pid_exe_is_elf_64_file): Declare.
4220 * linux-x86-low.c (x86_arch_setup): Use
4221 linux_pid_exe_is_elf_64_file.
4223 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4225 * linux-low.c (linux_wait_for_event_1): Rename to ...
4226 (linux_wait_for_event): ... here and merge it with former
4227 linux_wait_for_event - new variable wait_ptid, use it.
4228 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4230 2012-01-23 Pedro Alves <palves@redhat.com>
4232 * server.c (main): Avoid yet another case of infinite loop while
4233 detaching/killing after a longjmp.
4235 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4238 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4240 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4242 * hostio.c (handle_readlink): New function.
4243 (handle_vFile): Call it to handle "vFile:readlink" packets.
4245 2012-01-20 Pedro Alves <palves@redhat.com>
4246 Ulrich Weigand <ulrich.weigand@linaro.org>
4248 * server.c (handle_v_requests): Only support vAttach and vRun to
4249 start multiple processes when in extended protocol mode.
4251 2012-01-17 Pedro Alves <palves@redhat.com>
4253 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4254 memalign plus mprotect to allocate the scratch buffer.
4256 2012-01-13 Pedro Alves <palves@redhat.com>
4258 * server.c (attach_inferior): Clear `cont_thread'.
4260 2012-01-13 Pedro Alves <palves@redhat.com>
4262 * server.c (main): Avoid infinite loop while detaching/killing
4265 2012-01-09 Doug Evans <dje@google.com>
4267 * server.c (start_inferior): Set last_ptid in --wrapper case.
4269 2012-01-06 Yao Qi <yao@codesourcery.com>
4271 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4273 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4275 2012-01-04 Yao Qi <yao@codesourcery.com>
4277 * tracepoint.c (cmd_qtdp): Print debug message
4278 for static tracepoint.
4280 2012-01-04 Yao Qi <yao@codesourcery.com>
4282 * tracepoint.c (trace_vdebug): Differentiate debug message
4283 between gdbserver and IPA.
4285 2012-01-03 Yao Qi <yao@codesourcery.com>
4287 * tracepoint.c (tracepoint_was_hit): Don't collect for
4290 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4292 * terminal.h: Reformat copyright header.
4294 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4296 * server.c (gdbserver_version): Update copyright year.
4297 * gdbreplay.c (gdbreplay_version): Likewise.
4299 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4301 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4304 2011-12-18 Hui Zhu <teawater@gmail.com>
4305 * linux-low.c (linux_create_inferior): Save return value to ret.
4307 2011-12-18 Hui Zhu <teawater@gmail.com>
4309 * linux-low.c (linux_create_inferior): Save return value to ret.
4311 2011-12-16 Doug Evans <dje@google.com>
4313 * linux-low.c (linux_create_inferior): If stdio connection,
4314 redirect stdin from /dev/null, stdout to stderr.
4315 * remote-utils.c (remote_is_stdio): New static global.
4316 (remote_connection_is_stdio): New function.
4317 (remote_prepare): Handle stdio connection.
4318 (remote_open): Ditto.
4319 (remote_close): Don't close stdin for stdio connections.
4320 (read_prim,write_prim): New functions. Replace all calls to
4321 read/write to these.
4322 * server.c (main): Watch for "-" argument. Move call to
4323 remote_prepare before start_inferior.
4324 * server.h (STDIO_CONNECTION_NAME): New macro.
4325 (remote_connection_is_stdio): Declare.
4327 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4328 in debugging output.
4330 2011-12-15 Yao Qi <yao@codesourcery.com>
4332 * tracepoint.c: Include sys/syscall.h.
4333 (gdb_ust_thread): Remove preprocessor conditional.
4335 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4337 * linux-low.c (linux_detach_one_lwp): Call
4338 the_low_target.prepare_to_resume before detaching.
4340 2011-12-14 Yao Qi <yao@codesourcery.com>
4342 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4345 2011-12-14 Yao Qi <yao@codesourcery.com>
4347 * i386-low.c (i386_low_stopped_data_address): Initialize local
4350 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4354 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4355 DR_CONTROL unless necessary. Extend comments.
4356 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4357 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4359 2011-12-13 Yao Qi <yao@codesourcery.com>
4361 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4363 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4365 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4367 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4368 Print new debug message for such case.
4370 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4372 Fix overlapping memcpy.
4373 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4374 the read_inferior_memory transfer.
4375 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4376 write_inferior_memory transfer.
4377 (set_fast_tracepoint_jump): New variable buf. Use it for the
4378 read_inferior_memory and write_inferior_memory transfers.
4379 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4380 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4381 Use it for the write_inferior_memory transfer.
4382 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4385 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4387 * linux-low.c (fetch_register, store_register): Make code
4388 consistent, fix formatting.
4390 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4392 * linux-low.c (usr_store_inferior_registers): Factor out code
4393 to handle individual registers into...
4394 (store_register): ... this new function.
4396 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4398 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4399 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4400 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4401 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4402 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4403 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4404 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4405 (srv_xmlfiles): Add new XML files.
4407 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4409 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4410 (init_registers_s390_linux32v1): Add prototype.
4411 (init_registers_s390_linux32v2): Likewise.
4412 (init_registers_s390_linux64v1): Likewise.
4413 (init_registers_s390_linux64v2): Likewise.
4414 (init_registers_s390x_linux64v1): Likewise.
4415 (init_registers_s390x_linux64v2): Likewise.
4416 (s390_num_regs): Increment to 52.
4417 (s390_regmap): Add orig_r2 register.
4418 (s390_num_regs_3264): Increment to 68.
4419 (s390_regmap_3264): Add orig_r2 register.
4420 (s390_collect_ptrace_register): Handle orig_r2 register.
4421 (s390_supply_ptrace_register): Likewise.
4422 (s390_fill_last_break): New function.
4423 (s390_store_last_break): Likewise.
4424 (s390_fill_system_call): New function.
4425 (s390_store_system_call): Likewise.
4426 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4428 (s390_check_regset): New function.
4429 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4430 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4431 Update target_regsets for available register sets.
4433 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4434 Jan Kratochvil <jan.kratochvil@redhat.com>
4436 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4437 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4439 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4440 * linux-low.h (struct process_info_private): New member r_debug.
4441 * server.c (handle_qxfer_libraries): Call
4442 the_target->qxfer_libraries_svr4.
4443 (handle_qxfer_libraries_svr4): New function.
4444 (qxfer_packets): New entry "libraries-svr4".
4445 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4446 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4447 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4448 PACKET_qXfer_libraries_svr4.
4450 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4452 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4453 PSW address/mask between 8-byte and 16-byte formats.
4454 (s390_supply_ptrace_register): Likewise.
4455 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4456 basic addressing mode bit.
4458 2011-11-24 Stan Shebs <stan@codesourcery.com>
4460 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4462 2011-11-17 Stan Shebs <stan@codesourcery.com>
4464 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4465 (tracing_start_time): New global.
4466 (tracing_stop_time): New global.
4467 (tracing_user_name): New global.
4468 (tracing_notes): New global.
4469 (tracing_stop_note): New global.
4470 (cmd_qtstart): Set traceframe_usage, start_time.
4471 (stop_tracing): Set stop_time.
4472 (cmd_qtstatus): Report additional status.
4473 (cmd_qtp): New function.
4474 (handle_tracepoint_query): Call it.
4475 (cmd_qtnotes): New function.
4476 (handle_tracepoint_general_set): Call it.
4477 (get_timestamp): Rename from tsv_get_timestamp.
4479 2011-11-14 Stan Shebs <stan@codesourcery.com>
4480 Kwok Cheung Yeung <kcy@codesourcery.com>
4482 * linux-x86-low.c (small_jump_insn): New.
4483 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4484 trampoline and error message, build a trampoline and issue a small
4485 jump instruction to it.
4486 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4487 trampoline and error message.
4488 (x86_get_min_fast_tracepoint_insn_len): New.
4489 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4490 * linux-low.h (struct linux_target_ops): Add arguments to
4491 install_fast_tracepoint_jump_pad operation, add new operation.
4492 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4494 (linux_get_min_fast_tracepoint_insn_len): New function.
4495 (linux_target_op): Add new operation.
4496 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4497 (gdb_trampoline_buffer_end): Ditto.
4498 (gdb_trampoline_buffer_error): Ditto.
4499 (struct ipa_sym_addresses): Add fields for new IPA variables.
4500 (symbol_list): Add entries for new IPA variables.
4501 (struct tracepoint): Add fields to hold the address range of the
4502 trampoline used by the tracepoint.
4503 (trampoline_buffer_head): New static variable.
4504 (trampoline_buffer_tail): Ditto.
4505 (claim_trampoline_space): New function.
4506 (have_fast_tracepoint_trampoline_buffer): New function.
4507 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4509 (install_fast_tracepoint): Ditto, also add error buffer argument.
4510 (cmd_qtminftpilen): New function.
4511 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4512 (fast_tracepoint_from_trampoline_address): New function.
4513 (fast_tracepoint_collecting): Handle trampoline as part of jump
4515 (set_trampoline_buffer_space): New function.
4516 (initialize_tracepoint): Initialize new IPA variables.
4517 * target.h (struct target_ops): Add arguments to
4518 install_fast_tracepoint_jump_pad operation, add new
4519 get_min_fast_tracepoint_insn_len operation.
4520 (target_get_min_fast_tracepoint_insn_len): New.
4521 (install_fast_tracepoint_jump_pad): Add arguments.
4522 * server.h (IPA_BUFSIZ): Define.
4523 * linux-i386-ipa.c: Include extra header files.
4524 (initialize_fast_tracepoint_trampoline_buffer): New function.
4525 (initialize_low_tracepoint): Call it.
4526 * server.h (set_trampoline_buffer_space): Declare.
4527 (claim_trampoline_space): Ditto.
4528 (have_fast_tracepoint_trampoline_buffer): Ditto.
4530 2011-11-14 Yao Qi <yao@codesourcery.com>
4532 * server.c (handle_query): Handle InstallInTrace for qSupported.
4533 * tracepoint.c (add_tracepoint): Sort list.
4534 (install_tracepoint, download_tracepoint): New.
4535 (cmd_qtdp): Call them to install and download tracepoints.
4536 (sort_tracepoints): Removed.
4537 (cmd_qtstart): Update.
4539 2011-11-14 Yao Qi <yao@codesourcery.com>
4541 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4542 * mem-break.h: Declare.
4543 * tracepoint.c (cmd_qtstart): Move some code to ...
4544 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4546 (download_tracepoints): Move some code to ...
4547 (download_tracepoint_1): ... here. New.
4549 2011-11-08 Yao Qi <yao@codesourcery.com>
4551 * remote-utils.c (relocate_instruction): A comment fix.
4553 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4555 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4556 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4557 dr_status_mirror and dr_control_mirror from debug_reg_state.
4558 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4559 (i386_initial_stuff): Remove use of deleted globals.
4560 (i386_get_thread_context, i386_set_thread_context,
4561 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4562 from debug_reg_state.
4564 2011-11-05 Yao Qi <yao@codesourcery.com>
4566 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4567 address as TPOINT's.
4569 2011-11-02 Stan Shebs <stan@codesourcery.com>
4571 * tracepoint.c (agent_mem_read_string): New function.
4572 (eval_agent_expr): Call it for tracenz.
4573 * server.c (handle_query): Report support for tracenz.
4575 2011-11-02 Yao Qi <yao@codesourcery.com>
4577 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4579 2011-11-02 Yao Qi <yao@codesourcery.com>
4581 * target.h: Fix a typo in comment.
4583 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4585 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4586 clobber the breakpoints' shadows with fast tracepoint jumps.
4587 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4588 * target.c (write_inferior_memory): Also pass MYADDR down to
4591 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4593 * configure.ac: Check support for personality routine.
4594 * configure: Regenerate.
4595 * config.in: Likewise.
4596 * linux-low.c: Include <sys/personality.h>.
4597 Define ADDR_NO_RANDOMIZE if necessary.
4598 (linux_create_inferior): Disable address space randomization when
4599 forking inferior, if requested.
4600 (linux_supports_disable_randomization): New function.
4601 (linux_target_ops): Install it.
4602 * server.h (disable_randomization): Declare.
4603 * server.c (disable_randomization): New global variable.
4604 (handle_general_set): Handle QDisableRandomization.
4605 (handle_query): Likewise for qSupported.
4606 (main): Support --disable-randomization and --no-disable-randomization
4607 command line arguments.
4608 * target.h (struct target_ops): Add supports_disable_randomization.
4609 (target_supports_disable_randomization): New macro.
4611 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4613 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4615 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4616 [!PT_GETDSBT] (target_loadmap): New definition.
4617 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4618 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4619 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4620 and PT_GETDSBT to LINUX_LOADMAP.
4621 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4622 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4624 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4626 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4627 (arm_linux_hwbp_cap): New static variable.
4628 (arm_linux_get_hwbp_cap): Replace by ...
4629 (arm_linux_init_hwbp_cap): ... this new function.
4630 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4631 (arm_linux_get_hw_watchpoint_count): Likewise.
4632 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4633 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4634 (arm_prepare_to_resume): Use perror_with_name instead of error.
4636 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4638 * linux-arm-low.c: Include <signal.h>.
4639 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4640 (struct arm_linux_hwbp_cap): New data type.
4641 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4642 (struct arm_linux_hw_breakpoint): New data type.
4643 (MAX_BPTS, MAX_WPTS): Define.
4644 (struct arch_process_info, struct arch_lwp_info): New data types.
4645 (arm_linux_get_hwbp_cap): New function.
4646 (arm_linux_get_hw_breakpoint_count): Likewise.
4647 (arm_linux_get_hw_watchpoint_count): Likewise.
4648 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4649 (arm_hwbp_control_initialize): Likewise.
4650 (arm_hwbp_control_is_enabled): Likewise.
4651 (arm_hwbp_control_is_initialized): Likewise.
4652 (arm_hwbp_control_disable): Likewise.
4653 (arm_linux_hw_breakpoint_equal): Likewise.
4654 (arm_linux_hw_point_initialize): Likewise.
4655 (struct update_registers_data): New data structure.
4656 (update_registers_callback: New function.
4657 (arm_insert_point): Likewise.
4658 (arm_remove_point): Likewise.
4659 (arm_stopped_by_watchpoint): Likewise.
4660 (arm_stopped_data_address): Likewise.
4661 (arm_new_process): Likewise.
4662 (arm_new_thread): Likewise.
4663 (arm_prepare_to_resume): Likewise.
4664 (the_low_target): Register arm_insert_point, arm_remove_point,
4665 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4666 arm_new_thread, and arm_prepare_to_resume.
4668 2011-09-15 Stan Shebs <stan@codesourcery.com>
4670 * server.h (struct emit_ops): Add compare-goto fields.
4671 * tracepoint.c (gdb_agent_op_sizes): New table.
4672 (emit_eq_goto): New function.
4673 (emit_ne_goto): New function.
4674 (emit_lt_goto): New function.
4675 (emit_le_goto): New function.
4676 (emit_gt_goto): New function.
4677 (emit_ge_goto): New function.
4678 (is_goto_target): New function.
4679 (compile_bytecodes): Recognize special cases of compare-goto
4680 combinations and call specialized emitters for them.
4681 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4682 (amd64_emit_ne_goto): New function.
4683 (amd64_emit_lt_goto): New function.
4684 (amd64_emit_le_goto): New function.
4685 (amd64_emit_gt_goto): New function.
4686 (amd64_emit_ge_goto): New function.
4687 (amd64_emit_ops): Add the new functions.
4688 (i386_emit_eq_goto): New function.
4689 (i386_emit_ne_goto): New function.
4690 (i386_emit_lt_goto): New function.
4691 (i386_emit_le_goto): New function.
4692 (i386_emit_gt_goto): New function.
4693 (i386_emit_ge_goto): New function.
4694 (i386_emit_ops): Add the new functions.
4696 2011-09-08 Stan Shebs <stan@codesourcery.com>
4698 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4699 (i386_emit_epilogue): Restore %ebx.
4701 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4703 * server.c (step_thread): Remove definition.
4704 (process_serial_event): Don't handle Hs.
4705 * server.h (step_thread): Remove declaration.
4706 * target.c (set_desired_inferior): Remove use of step_thread.
4708 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4710 * linux-low.c: Include linux-procfs.h.
4711 (linux_attach_lwp_1): Update comments.
4712 (linux_attach): Scan for existing threads when attaching to a
4713 process that is the tgid.
4714 * Makefile.in: Update dependencies.
4716 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4718 * configure.srv: Add linux-procfs.o dependencies.
4720 2011-08-14 Yao Qi <yao@codesourcery.com>
4722 * target.h (struct target_ops): Fix indent.
4723 * win32-low.c (win32_target_ops): Fix comment.
4725 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4726 Yao Qi <yao@codesourcery.com>
4728 * Makefile.in (clean): Remove tic6x-*.c files.
4729 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4730 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4731 (tic6x-c64xp-linux.c): Likewise.
4732 * configure.srv: Add support for tic6x-*-uclinux.
4733 * linux-tic6x-low.c: New.
4734 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4736 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4737 Yao Qi <yao@codesourcery.com>
4739 * target.h (struct target_ops): Add read_loadmap.
4740 * linux-low.c (struct target_loadseg): New type.
4741 (struct target_loadmap): New type.
4742 (linux_read_loadmap): New function.
4743 (linux_target_ops): Add linux_read_loadmap.
4744 * server.c (handle_query): Support qXfer:fdpic:read packet.
4745 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4748 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4750 * win32-low.c: Include <stdint.h>.
4752 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4754 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4755 to the inferior here.
4756 (i386_remove_aligned_watchpoint): Ditto.
4757 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4758 fit part of the watchpoint in the debug registers.
4759 (i386_update_inferior_debug_regs): New.
4760 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4761 registers, and only update the inferior on success.
4762 (i386_low_remove_watchpoint): Ditto.
4764 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4766 * linux-low.c (compare_ints, unique, list_threads, show_process,
4767 linux_core_of_thread): Delete.
4768 (linux_target_ops): Change linux_core_of_thread to
4769 linux_common_core_of_thread.
4770 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4771 * utils.c (malloc_failure): Change type of argument.
4772 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4773 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4774 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4775 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4776 (IPA_OBJS): Add common-utils-ipa.o.
4777 (ptid_h, linux_osdata_h): New macros.
4778 (server_h): Add common/common-utils.h, common/xml-utils.h,
4779 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4781 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4782 ptid.o, buffer.o): New rules.
4783 (linux-low.o): Add common/linux-osdata.h as a dependency.
4784 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4785 * configure.ac: Add AC_HEADER_DIRENT check.
4786 * config.in: Regenerate.
4787 * configure: Regenerate.
4788 * remote-utils.c (xml_escape_text): Delete.
4789 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4790 buffer_xml_printf): Move to common/buffer.c.
4791 * server.c (main): Remove call to initialize_inferiors.
4792 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4793 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4794 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4795 internal_error, gdb_assert, gdb_assert_fail): Delete.
4796 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4797 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4799 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4800 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4801 initialize_inferiors): Delete.
4803 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4805 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4808 2011-05-31 Pedro Alves <pedro@codesourcery.com>
4810 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4812 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4814 2011-05-26 Yao Qi <yao@codesourcery.com>
4816 * Makefile.in (thread-db.o): Track dependence to
4817 common/gdb_thread_db.h.
4818 * thread-db.c: include gdb_thread_db.h from right place.
4820 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
4822 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4823 __FILE__ and __LINE__ to internal_error.
4825 2011-05-13 Doug Evans <dje@google.com>
4827 * thread-db.c (try_thread_db_load_from_sdir): New function.
4828 (try_thread_db_load_from_dir): New function.
4829 (thread_db_load_search): Handle $sdir, ignore $pdir.
4830 Remove trying of system directories if search of
4831 libthread-db-search-path fails, that is now done via $sdir.
4833 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
4835 * server.c (handle_query): Add EnableDisableTracepoints to the list
4836 of supported features.
4837 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4839 (cmd_qtenable_disable): New.
4840 (cmd_qtstart): Install tracepoints even if disabled.
4841 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4842 receiving a QTEnable or QTDisable packet.
4843 (gdb_collect): Skip data collection if fast tracepoint is disabled.
4844 (ust_marker_to_static_tracepoint): Do not ignore disabled static
4846 (gdb_probe): Skip data collection if static tracepoint is disabled.
4848 2011-05-10 Doug Evans <dje@google.com>
4850 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4852 2011-05-04 Doug Evans <dje@google.com>
4854 * linux-low.c (linux_join): Skip process lookup.
4855 * spu-low.c (spu_join): Ditto.
4856 * server.c (join_inferiors_callback): Delete.
4857 (process_serial_event): For 'D' packet (detach) call join_inferior
4860 2011-05-04 Joseph Myers <joseph@codesourcery.com>
4862 * README: Don't mention xscale*-*-linux*.
4863 * configure.srv (xscale*-*-linux*): Don't handle target.
4865 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
4867 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4869 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4870 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4871 (i386_emit_void_call_2): Likewise.
4873 2011-04-26 Yao Qi <yao@codesourcery.com>
4875 * linux-low.c: Move common macros to linux-ptrace.h.
4876 Include linux-ptrace.h.
4877 * Makefile.in (linux_ptrace_h): New.
4878 (linux-low.o): Depends on linux-ptrace.h.
4880 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
4882 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4883 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
4884 (remote_prepare): New function with most of the TCP code from ...
4885 (remote_open): ... here. Detect PORT here unconditionally. Move also
4886 setting transport_is_reliable.
4887 * server.c (run_once): New variable.
4888 (gdbserver_usage): Document it.
4889 (main): Set run_once for `--once'. Call remote_prepare. Exit after
4890 the first run if RUN_ONCE.
4891 * server.h (run_once, remote_prepare): New declarations.
4893 2011-04-19 Tom Tromey <tromey@redhat.com>
4895 * win32-low.c (handle_load_dll): Remove duplicate "the".
4897 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
4899 Remove support for old Cygwin 1.5 versions.
4900 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4901 function to avoid warning.
4902 (win32_add_one_solib): Use cygwin_conv_path function to avoid
4905 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
4907 * gdbserver/server.h (Macro _): Define it if not available.
4909 2011-03-14 Michael Snyder <msnyder@vmware.com>
4911 * hostio.c (handle_close): Remove unnecessary null test.
4913 2011-03-10 Joel Brobecker <brobecker@adacore.com>
4915 * Makefile.in (maintainer-clean realclean distclean): Remove
4916 "make ... subdir_do" command.
4918 2011-03-10 Michael Snyder <msnyder@vmware.com>
4920 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4922 * server.c (handle_v_run): Free alloced buffer on early return.
4924 2011-03-09 Yao Qi <yao@codesourcery.com>
4927 2011-03-04 Yao Qi <yao@codesourcery.com>
4929 * Makefile.in: Remove GNU make feature --directory.
4931 2011-03-05 Yao Qi <yao@codesourcery.com>
4933 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4934 (subdir_do): New make target. Copied from gdb/Makefile.
4935 (maintainer-clean, realclean, distclean, clean): Call corresponding
4936 make targets in common/Makefile.
4938 2011-02-11 Yao Qi <yao@codesourcery.com>
4940 * configure.ac: Call AC_PROG_RANLIB.
4941 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
4942 * configure: Regenerate.
4944 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4946 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4948 2011-03-06 Yao Qi <yao@codesourcery.com>
4950 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4952 2011-03-05 Yao Qi <yao@codesourcery.com>
4954 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4955 (subdir_do): New make target. Copied from gdb/Makefile.
4956 (maintainer-clean, realclean, distclean, clean): Call corresponding
4957 make targets in common/Makefile.
4959 2011-03-04 Yao Qi <yao@codesourcery.com>
4961 * Makefile.in: Remove GNU make feature --directory.
4963 2011-03-04 Michael Snyder <msnyder@vmware.com>
4965 * server.c (queue_stop_reply): Call xmalloc not malloc.
4967 2011-03-02 Michael Snyder <msnyder@vmware.com>
4969 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4971 2011-02-28 Michael Snyder <msnyder@vmware.com>
4973 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4974 (cmd_qtframe): Ditto.
4975 (cmd_qtbuffer): Ditto.
4976 (cmd_bigqtbuffer): Ditto.
4978 * utils.c (decimal2str): Initialize 'width' to nine, then
4981 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
4983 * hostio.c (require_data): Free *data, not data.
4985 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4987 * hostio.c (require_data): Use free, not xfree.
4989 2011-02-27 Michael Snyder <msnyder@vmware.com>
4991 * server.c (handle_query): Discard unused value.
4993 * hostio.c (require_data): Free malloc memory before returning
4996 2011-02-26 Michael Snyder <msnyder@vmware.com>
4998 * linux-low.c (list_threads): Call closedir for dirent.
5000 2011-02-27 Michael Snyder <msnyder@vmware.com>
5002 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5003 a case statement falls through.
5005 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5007 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5010 2011-02-26 Michael Snyder <msnyder@vmware.com>
5012 * utils.c (decimal2str): Eliminate dead code and dead param.
5013 (pulongest): Drop dead param from call to decimal2str.
5016 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5018 Revert the following patch (not approved yet):
5019 2011-02-21 Hui Zhu <teawater@gmail.com>
5020 * tracepoint.c (tp_printf): New function.
5021 (eval_agent_expr): Handle gdb_agent_op_printf.
5023 2011-02-21 Hui Zhu <teawater@gmail.com>
5025 * tracepoint.c (tp_printf): New function.
5026 (eval_agent_expr): Handle gdb_agent_op_printf.
5028 2011-02-18 Tom Tromey <tromey@redhat.com>
5030 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5031 (tracepoint.o): Likewise.
5032 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5033 (gdb_agent_op_names): Likewise.
5035 2011-02-18 Tom Tromey <tromey@redhat.com>
5037 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5038 gdb_agent_op_rot>: New constants.
5039 (gdb_agent_op_names): Add pick and roll.
5040 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5043 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5045 * aclocal.m4: Regenerated with aclocal-1.11.1.
5047 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5049 * server.c (handle_qxfer_traceframe_info): New.
5050 (qxfer_packets): Register "traceframe-info".
5051 (handle_query): Report support for qXfer:traceframe-info:read+.
5052 * tracepoint.c (match_blocktype): New.
5053 (traceframe_find_block_type): Rename to ...
5054 (traceframe_walk_blocks): ... this. Add callback filter argument,
5056 (traceframe_find_block_type): New, reimplemented on top of
5057 traceframe_walk_blocks.
5058 (build_traceframe_info_xml): New.
5059 (traceframe_read_info): New.
5060 * server.h (traceframe_read_info): Declare.
5062 2011-02-11 Yao Qi <yao@codesourcery.com>
5064 * configure.ac: Call AC_PROG_RANLIB.
5065 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5066 * configure: Regenerate.
5068 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5070 * server.c (gdb_read_memory): Change return semantics to allow
5072 (handle_search_memory_1): Adjust.
5073 (process_serial_event) <'m' packet>: Handle partial transfers.
5074 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5076 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5078 * regcache.c (init_register_cache): Initialize
5079 regcache->register_status.
5080 (free_register_cache): Release regcache->register_status.
5081 (regcache_cpy): Copy register_status.
5082 (registers_to_string): Print 'x's for unavailable registers.
5083 (supply_register): Mark the register's status valid or
5084 unavailable, depending on whether a buffer was passed in or not.
5085 (supply_register_zeroed): New.
5086 (supply_regblock): Mark the registers' status valid or
5087 unavailable, depending on whether a buffer was passed in or not.
5088 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5089 (struct regcache): New `register_status' field.
5090 (supply_register_zeroed): Declare.
5091 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5092 supply_register_zeroed, rather than passing a NULL buffer to
5094 * tracepoint.c (fetch_traceframe_registers): Update comment.
5096 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5098 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5101 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5103 * server.h (decode_xfer_write): Change prototype.
5104 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5105 and don't extract the annex here.
5106 * server.c (decode_xfer_read): Remove `annex' parameter,
5107 and don't extract the annex here.
5109 (struct qxfer): New.
5110 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5111 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5112 (handle_qxfer_statictrace): New functions, abstracted out from
5113 handle_query, and made to use the struct qxfer interface.
5114 (handle_threads_qxfer_proper): Rename to ...
5115 (handle_qxfer_threads_proper): ... this.
5116 (handle_threads_qxfer): Rename to ...
5117 (handle_qxfer_threads): ... this. Adjust.
5118 (qxfer_packets): New array.
5119 (handle_qxfer): New function.
5120 (handle_query): Use handle_qxfer.
5122 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5124 * gdbreplay.c: Shorten lines of >= 80 columns.
5125 * linux-low.c: Ditto.
5126 * linux-ppc-low.c: Ditto.
5127 * linux-s390-low.c: Ditto.
5128 * linux-sparc-low.c: Ditto.
5129 * linux-x86-low.c: Ditto.
5130 * linux-xtensa-low.c: Ditto.
5131 * mem-break.c: Ditto.
5133 * regcache.h: Ditto.
5134 * remote-utils.c: Ditto.
5137 * thread-db.c: Ditto.
5138 * tracepoint.c: Ditto.
5140 * win32-low.h: Ditto.
5142 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5144 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5147 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5149 * server.c (gdbserver_version): Update copyright year in version
5151 * gdbreplay.c (gdbreplay_version): Ditto.
5153 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5155 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5156 * linux-bfin-low.c: New file.
5157 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5158 PT_DATA_ADDR for BFIN targets.
5159 * Makefile.in (SFILES): Add linux-bfin-low.c.
5160 (clean): Remove reg-bfin.c.
5161 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5162 * README: Mention supported Blackfin targets.
5164 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5166 * .gitignore: New file.
5168 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5170 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5172 2010-10-22 Jie Zhang <jie@codesourcery.com>
5174 * Makefile.in: Add FLAGS_TO_PASS variable.
5175 (install): Remove dependency of install-only and recursively
5176 invoke make for install-only.
5178 2010-10-04 Doug Evans <dje@google.com>
5180 * Makefile.in (uninstall): Use $(DESTDIR).
5182 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5186 * linux-x86-low.c (compat_siginfo_from_siginfo)
5187 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5188 si_code is < 0. Check for si_code == SI_TIMER before checking for
5191 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5193 * lynx-i386-low.c: New file.
5194 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5196 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5198 * lynx-low.c (ptrace_request_to_str): Remove handling for
5199 request values that have been removed in LynxOS 5.x.
5201 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5203 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5206 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5208 * configure.ac: Add --enable-inprocess-agent option.
5209 * configure: Rebuilt.
5211 2010-09-06 Yao Qi <yao@codesourcery.com>
5213 * linux-low.c (linux_kill): Remove unused variable.
5214 (linux_stabilize_threads): Likewise.
5215 * server.c (start_inferior): Likewise.
5216 (queue_stop_reply_callback): Likewise.
5217 * tracepoint.c (do_action_at_tracepoint): Likewise.
5219 2010-09-06 Yao Qi <yao@codesourcery.com>
5221 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5224 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5226 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5228 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5230 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5233 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5235 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5236 gdbserver/lynx-ppc-low.c: New files.
5237 * Makefile.in (lynx_low_h): New variable.
5238 (lynx-low.o, lynx-ppc-low.o): New rules.
5239 * configure.ac: On LynxOS, link with -lnetinet.
5240 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5241 * configure: regenerate.
5243 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5245 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5246 * configure.ac: Add check for vasprintf and vsnprintf.
5247 * configure, config.in: Regenerate.
5248 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5250 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5252 * gdbreplay.c: Move include of alloca.h up, next to include of
5254 * server.h: Add include of malloc.h.
5255 * mem-break.c: Remove include of malloc.h.
5256 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5258 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5260 * Makefile.in (memmem.o): Build with -Wno-error.
5262 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5264 * utils.c (xsnprintf): Make non-static.
5265 * server.h: Add xsnprintf declaration.
5266 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5267 replace calls to snprintf by calls to xsnprintf throughout.
5269 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5271 * configure.ac: Add configure check for alloca.
5272 * configure, config.in: Regenerate.
5273 * server.h: Include alloca.h if it exists.
5274 * gdbreplay.c: Include alloca.h if it exists.
5276 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5278 * linux-low.c (__SIGRTMIN): Define if not already defined.
5279 (linux_create_inferior): Check for __ANDROID__ rather than
5281 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5282 are already deferred.
5283 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5284 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5285 stopped and already has a pending signal to report.
5286 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5287 a pending signal to report or is moving out of a jump pad.
5288 (linux_init_signals): Check for __ANDROID__ rather than
5291 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5293 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5294 debug_threads check. Avoid a linear search when not doing debug
5297 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5299 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5300 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5301 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5302 (process_event): Change local fd's type to gdb_fildes_t.
5303 (create_file_handler): Adjust prototype.
5304 (delete_file_handler): Adjust prototype.
5305 (handle_file_event): Adjust prototype. Use pfildes.
5306 (create_file_event): Adjsut prototype.
5307 * remote-utils.c (remote_desc, listen_desc): Change type to
5309 * server.h: New gdb_fildes_t typedef.
5310 [USE_WIN32API]: Include winsock2.h.
5311 (delete_file_handler, add_file_handler): Adjust prototypes.
5313 * utils.c (pfildes): New.
5315 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5317 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5318 * configure: Regenerate.
5320 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5322 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5323 (linux_done_accessing_memory): ... this.
5324 (linux_target_ops): Adjust.
5325 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5326 * nto-low.c (nto_target_ops): Adjust comment.
5327 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5328 * spu-low.c (spu_target_ops): Adjust comment.
5329 * target.h (target_ops): Rename unprepare_to_access_memory field
5330 to done_accessing_memory.
5331 (unprepare_to_access_memory): Rename to ...
5332 (done_accessing_memory): ... this.
5334 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5336 * linux-low.c (linux_prepare_to_access_memory): New.
5337 (linux_unprepare_to_access_memory): New.
5338 (linux_target_ops): Install them.
5339 * server.c (read_memory): Rename to ...
5340 (gdb_read_memory): ... this. Use
5341 prepare_to_access_memory/prepare_to_access_memory.
5342 (write_memory): Rename to ...
5343 (gdb_write_memory): ... this. Use
5344 prepare_to_access_memory/prepare_to_access_memory.
5345 (handle_search_memory_1): Adjust.
5346 (process_serial_event): Adjust.
5347 * target.h (struct target_ops): New fields
5348 prepare_to_access_memory and unprepare_to_access_memory.
5349 (prepare_to_access_memory, unprepare_to_access_memory): New.
5350 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5351 prepare_to_access_memory/prepare_to_access_memory.
5352 * nto-low.c (nto_target_ops): Adjust.
5353 * spu-low.c (spu_target_ops): Adjust.
5354 * win32-low.c (win32_target_ops): Adjust.
5356 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5358 * Makefile.in (WARN_CFLAGS): Get it from configure.
5359 (WERROR_CFLAGS): New.
5360 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5361 * configure.ac: Introduce --enable-werror, which adds -Werror to
5362 the compiler command line. Enabled by default. Disable with
5363 --disable-werror. Add -Wdeclaration-after-statement
5364 Wpointer-arith and -Wformat-nonliteral to warning flags.
5365 * configure: Regenerate.
5367 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5369 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5371 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5373 * gdbreplay.c (remote_error): New.
5375 (expect): Use gdbchar. Check for error reading from GDB.
5376 Clarify sync error output.
5377 (play): Check for errors writing to GDB.
5378 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5379 * remote-utils.c (getpkt): Check for errors writing to the remote
5382 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5384 * linux-low.c (linux_wait_1): Move non-debugging code out of
5385 `debug_threads' control.
5387 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5389 * linux-low.c (linux_wait_1): Don't set last_status here.
5390 * server.c (push_event, queue_stop_reply_callback): Assert we're
5391 not pushing a TARGET_WAITKIND_IGNORE event.
5392 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5393 (myresume, handle_target_event): Set the thread's last_resume_kind
5394 and last_status from the target returned status.
5396 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5400 * linux-x86-low.c (update_debug_registers_callback): New.
5401 (i386_dr_low_set_addr): Use it.
5402 (i386_dr_low_get_addr): New.
5403 (i386_dr_low_set_control): Use update_debug_registers_callback.
5404 (i386_dr_low_get_control): New.
5405 (i386_dr_low_get_status): Adjust.
5406 * linux-low.c (linux_stop_lwp): New.
5407 * linux-low.h (linux_stop_lwp): Declare.
5409 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5410 argument instead of a i386_debug_reg_state.
5411 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5412 a i386_debug_reg_state.
5413 (i386_insert_aligned_watchpoint): Adjust.
5414 (i386_remove_aligned_watchpoint): Adjust.
5415 (i386_low_stopped_data_address): Read the debug registers from the
5416 inferior instead of from the mirrors.
5417 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5418 (i386_dr_low_get_addr): Declare.
5419 (i386_dr_low_get_control): Declare.
5420 (i386_dr_low_get_status): Change prototype.
5422 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5423 (i386_dr_low_get_addr): New.
5424 (i386_dr_low_get_control): New.
5425 (i386_dr_low_get_status): Adjust prototype. Return
5427 (i386_initial_stuff): Clear dr_status_mirror and
5429 (i386_get_thread_context): Adjust.
5430 (i386_set_thread_context): Adjust.
5431 (i386_thread_added): Adjust.
5433 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5435 * linux-low.h (linux_thread_area): Delete declaration.
5437 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5439 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5440 after its termination.
5442 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5444 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5445 (gdb_wants_all_stopped): Delete.
5446 (linux_wait_1): Don't call them.
5447 * server.c (handle_v_cont): Tag all threads as want-stopped.
5448 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5449 stopped as "client-wants-stopped".
5451 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5453 * Makefile.in (signals_h): New.
5454 (server_h): Depend on it.
5455 (server.o): Don't depend on $(signals_def).
5456 (signals.o): Depend on $(signals_def).
5458 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5460 * Makefile.in (signals_def): New.
5461 (server_h): Append include/gdb/signals.h and signals_def.
5462 (server.o): Append signals_def.
5464 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5466 * server.c (handle_target_event): Use target_signal_to_host for
5467 resume_info.sig initialization.
5468 * target.h (struct thread_resume) <sig>: New comment.
5470 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5472 * server.c (handle_query): strcpy() the returned string from paddress()
5473 instead of sprintf().
5474 * utils.c (paddress): Return phex_nz().
5476 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5478 * server.c (handle_v_cont): Call mourn_inferior if process
5480 (myresume): Likewise.
5482 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5484 Static tracepoints, and integration with UST.
5486 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5487 * mem-break.c (uninsert_all_breakpoints)
5488 (reinsert_all_breakpoints): New.
5489 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5490 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5491 (gdb_agent_ust_loaded, helper_thread_id)
5492 (gdb_agent_helper_thread_id): New macros.
5493 (struct ipa_sym_addresses): Add addr_ust_loaded,
5494 addr_helper_thread_id, addr_cmd_buf.
5495 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5496 (in_process_agent_loaded_ust): New.
5497 (write_e_ust_not_loaded): New.
5498 (maybe_write_ipa_ust_not_loaded): New.
5499 (struct collect_static_trace_data_action): New.
5500 (enum tracepoint_type) <static_tracepoint>: New.
5501 (struct tracepoint) <handle>: Mention static tracepoints.
5502 (struct static_tracepoint_ctx): New.
5503 (CMD_BUF_SIZE): New.
5504 (add_tracepoint_action): Handle static tracepoint actions.
5505 (unprobe_marker_at): New.
5506 (clear_installed_tracepoints): Handle static tracepoints.
5507 (cmd_qtdp): Handle static tracepoints.
5508 (probe_marker_at): New.
5509 (cmd_qtstart): Handle static tracepoints.
5510 (response_tracepoint): Handle static tracepoints.
5511 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5512 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5513 (get_context_regcache): Handle static tracepoints.
5514 (do_action_at_tracepoint): Handle static tracepoint actions.
5515 (traceframe_find_block_type): Handle static trace data blocks.
5516 (traceframe_read_sdata): New.
5517 (download_tracepoints): Download static tracepoint actions.
5518 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5519 (GDB_PROBE_NAME): New.
5524 (ust_marker_to_static_tracepoint): New.
5526 (collect_ust_data_at_tracepoint): New.
5527 (gdb_ust_probe): New.
5528 (UNIX_PATH_MAX, SOCK_DIR): New.
5529 (gdb_ust_connect_sync_socket): New.
5530 (resume_thread, stop_thread): New.
5531 (run_inferior_command): New.
5532 (init_named_socket): New.
5533 (gdb_ust_socket_init): New.
5534 (cstr_to_hexstr): New.
5536 (first_marker, next_marker): New.
5537 (response_ust_marker): New.
5538 (cmd_qtfstm, cmd_qtsstm): New.
5539 (unprobe_marker_at, probe_marker_at): New.
5540 (cmd_qtstmat, gdb_ust_thread): New.
5541 (gdb_ust_init): New.
5542 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5543 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5545 (x86_64_st_collect_regmap): New.
5546 (X86_64_NUM_ST_COLLECT_GREGS): New.
5547 (AMD64_RIP_REGNUM): New.
5548 (supply_static_tracepoint_registers): New.
5549 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5551 (i386_st_collect_regmap): New.
5552 (i386_NUM_ST_COLLECT_GREGS): New.
5553 (supply_static_tracepoint_registers): New.
5554 * server.c (handle_query): Handle qXfer:statictrace:read.
5555 <qSupported>: Report support for StaticTracepoints, and
5556 qXfer:statictrace:read features.
5557 * server.h (traceframe_read_sdata)
5558 (supply_static_tracepoint_registers): Declare.
5559 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5560 (unpack_varlen_hex): Include in IPA build.
5561 * Makefile.in (ustlibs, ustinc): New.
5562 (IPA_OBJS): Add remote-utils-ipa.o.
5563 ($(IPA_LIB)): Link -ldl and -lpthread.
5565 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5566 * config.in, configure: Regenerate.
5568 2010-06-20 Ian Lance Taylor <iant@google.com>
5569 Pedro Alves <pedro@codesourcery.com>
5571 * linux-x86-low.c (always_true): Delete.
5572 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5573 trying to fool the compiler with always_true.
5575 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5577 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5578 conditions in gdbserver.
5580 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5582 * spu-low.c (spu_read_memory): Wrap around local store limit.
5583 (spu_write_memory): Likewise.
5585 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5587 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5588 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5590 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5592 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5593 uses with LONGEST uses.
5595 2010-06-14 Stan Shebs <stan@codesourcery.com>
5596 Pedro Alves <pedro@codesourcery.com>
5600 * linux-x86-low.c: Include limits.h.
5605 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5606 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5607 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5608 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5609 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5610 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5611 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5612 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5613 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5614 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5615 (amd64_emit_void_call_2): New.
5616 (amd64_emit_ops): New.
5617 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5618 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5619 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5620 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5621 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5622 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5623 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5624 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5625 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5626 (i386_emit_stack_adjust, i386_emit_int_call_1)
5627 (i386_emit_void_call_2): New.
5628 (i386_emit_ops): New.
5629 (x86_emit_ops): New.
5630 (the_low_target): Install x86_emit_ops.
5631 * server.h (struct emit_ops): New.
5632 (get_raw_reg_func_addr): Declare.
5633 (current_insn_ptr, emit_error): Declare.
5634 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5635 (set_trace_state_variable_value): New defines.
5636 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5637 addr_get_trace_state_variable_value and
5638 addr_set_trace_state_variable_value.
5639 (symbol_list): New fields for get_raw_reg,
5640 get_trace_state_variable_value and set_trace_state_variable_value.
5641 (condfn): New typedef.
5642 (struct tracepoint): New field `compiled_cond'.
5643 (do_action_at_tracepoint): Clear compiled_cond.
5644 (get_trace_state_variable_value, set_trace_state_variable_value):
5646 (condition_true_at_tracepoint): If there's a compiled condition,
5648 (current_insn_ptr, emit_error): New globals.
5649 (struct bytecode_address): New.
5650 (get_raw_reg_func_addr): New.
5651 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5652 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5653 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5654 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5655 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5656 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5657 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5658 (compile_tracepoint_condition, compile_bytecodes): New.
5659 * target.h (emit_ops): Forward declare.
5660 (struct target_ops): New field emit_ops.
5661 (target_emit_ops): New.
5662 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5663 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5664 * linux-low.c (linux_emit_ops): New.
5665 (linux_target_ops): Install it.
5666 * linux-low.h (struct linux_target_ops): New field emit_ops.
5668 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5670 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5671 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5673 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5674 Stan Shebs <stan@codesourcery.com>
5676 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5677 (all): Depend on $(extra_libraries).
5678 (install-only): Install the IPA.
5679 (IPA_OBJS, IPA_LIB): New.
5680 (clean): Remove the IPA lib.
5681 (IPAGENT_CFLAGS): New.
5682 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5683 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5684 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5685 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5686 * configure.ac: Check for atomic builtins support in the compiler.
5687 (IPA_DEPFILES, extra_libraries): Define.
5688 * configure.srv (ipa_obj): Add description.
5689 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5690 (i[34567]86-*-linux*): Set ipa_obj.
5691 (x86_64-*-linux*): Set ipa_obj.
5692 * linux-low.c (stabilizing_threads): New.
5693 (supports_fast_tracepoints): New.
5694 (linux_detach): Stabilize threads before detaching.
5695 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5696 the lwp is either not stabilizing, or is moving out of a jump pad.
5697 (linux_fast_tracepoint_collecting): New.
5698 (maybe_move_out_of_jump_pad): New.
5699 (enqueue_one_deferred_signal): New.
5700 (dequeue_one_deferred_signal): New.
5701 (linux_wait_for_event_1): If moving out of a jump pad, defer
5702 pending signals to later.
5703 (linux_stabilize_threads): New.
5704 (linux_wait_1): Check if threads need moving out of jump pads, and
5706 (stuck_in_jump_pad_callback): New.
5707 (move_out_of_jump_pad_callback): New.
5709 (linux_resume_one_lwp): Handle moving out of jump pads.
5710 (linux_set_resume_request): Dequeue deferred signals.
5711 (need_step_over_p): Also step over fast tracepoint jumps.
5712 (start_step_over): Also uninsert fast tracepoint jumps.
5713 (finish_step_over): Also reinsert fast tracepoint jumps.
5714 (linux_install_fast_tracepoint_jump): New.
5715 (linux_target_ops): Install linux_stabilize_threads and
5716 linux_install_fast_tracepoint_jump_pad.
5717 * linux-low.h (linux_target_ops) <get_thread_area,
5718 install_fast_tracepoint_jump_pad>: New fields.
5719 (struct lwp_info) <collecting_fast_tracepoint,
5720 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5721 (linux_get_thread_area): Declare.
5722 * linux-x86-low.c (jump_insn): New.
5723 (x86_get_thread_area): New.
5724 (append_insns): New.
5726 (amd64_install_fast_tracepoint_jump_pad): New.
5727 (i386_install_fast_tracepoint_jump_pad): New.
5728 (x86_install_fast_tracepoint_jump_pad): New.
5729 (the_low_target): Install x86_get_thread_area and
5730 x86_install_fast_tracepoint_jump_pad.
5731 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5732 (struct fast_tracepoint_jump): New.
5733 (fast_tracepoint_jump_insn): New.
5734 (fast_tracepoint_jump_shadow): New.
5735 (find_fast_tracepoint_jump_at): New.
5736 (fast_tracepoint_jump_here): New.
5737 (delete_fast_tracepoint_jump): New.
5738 (set_fast_tracepoint_jump): New.
5739 (uninsert_fast_tracepoint_jumps_at): New.
5740 (reinsert_fast_tracepoint_jumps_at): New.
5741 (set_breakpoint_at): Use write_inferior_memory.
5742 (uninsert_raw_breakpoint): Use write_inferior_memory.
5743 (check_mem_read): Mask out fast tracepoint jumps.
5744 (check_mem_write): Mask out fast tracepoint jumps.
5745 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5746 (set_fast_tracepoint_jump): Declare.
5747 (delete_fast_tracepoint_jump)
5748 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5749 (reinsert_fast_tracepoint_jumps_at): Declare.
5750 * regcache.c: Don't compile many functions when building the
5751 in-process agent library.
5752 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5753 the register buffer in the heap.
5754 (free_register_cache): If the register buffer isn't owned by the
5755 regcache, don't free it.
5756 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5757 pre-existing register caches.
5758 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5760 (convert_ascii_to_int): : Constify `from' parameter type.
5761 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5762 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5763 the needed buffer in-place.
5764 (relocate_instruction): New.
5765 * server.c (handle_query) <qSymbols>: If the target supports
5766 tracepoints, give it a chance of looking up symbols. Report
5767 support for fast tracepoints.
5768 (handle_status): Stabilize threads.
5769 (process_serial_event): Adjust.
5770 * server.h (struct fast_tracepoint_jump): Forward declare.
5771 (struct process_info) <fast_tracepoint_jumps>: New field.
5772 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5773 (decode_X_packet, decode_M_packet): Adjust.
5774 (relocate_instruction): Declare.
5775 (in_process_agent_loaded): Declare.
5776 (tracepoint_look_up_symbols): Declare.
5777 (struct fast_tpoint_collect_status): Declare.
5778 (fast_tracepoint_collecting): Declare.
5779 (force_unlock_trace_buffer): Declare.
5780 (handle_tracepoint_bkpts): Declare.
5781 (initialize_low_tracepoint)
5782 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5783 * target.h (struct target_ops) <stabilize_threads,
5784 install_fast_tracepoint_jump_pad>: New fields.
5785 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5786 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5787 [HAVE_STDINT_H]: Include stdint.h.
5788 (trace_debug_1): Rename to ...
5789 (trace_vdebug): ... this.
5790 (trace_debug): Rename to ...
5791 (trace_debug_1): ... this. Add `level' parameter.
5793 (ATTR_USED, ATTR_NOINLINE): New.
5794 (IP_AGENT_EXPORT): New.
5795 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5796 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5797 (about_to_request_buffer_space, trace_buffer_is_full)
5798 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5799 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5800 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5801 (traceframe_write_count, traceframes_created)
5802 (trace_state_variables)
5803 New renaming defines.
5804 (struct ipa_sym_addresses): New.
5805 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5807 (ipa_sym_addrs): New.
5808 (all_tracepoint_symbols_looked_up): New.
5809 (in_process_agent_loaded): New.
5810 (write_e_ipa_not_loaded): New.
5811 (maybe_write_ipa_not_loaded): New.
5812 (tracepoint_look_up_symbols): New.
5813 (debug_threads) [IN_PROCESS_AGENT]: New.
5814 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5815 (UNKNOWN_SIDE_EFFECTS): New.
5816 (stop_tracing): New.
5817 (flush_trace_buffer): New.
5818 (stop_tracing_bkpt): New.
5819 (flush_trace_buffer_bkpt): New.
5820 (read_inferior_integer): New.
5821 (read_inferior_uinteger): New.
5822 (read_inferior_data_pointer): New.
5823 (write_inferior_data_pointer): New.
5824 (write_inferior_integer): New.
5825 (write_inferior_uinteger): New.
5826 (struct collect_static_trace_data_action): Delete.
5827 (enum tracepoint_type): New.
5828 (struct tracepoint) <type>: New field `type'.
5829 <actions_str, step_actions, step_actions_str>: Only include in
5831 <orig_size, obj_addr_on_target, adjusted_insn_addr>
5832 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5833 (tracepoints): Use IP_AGENT_EXPORT.
5834 (last_tracepoint): Don't include in the IPA.
5835 (stopping_tracepoint): Use IP_AGENT_EXPORT.
5836 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5837 (alloced_trace_state_variables): New.
5838 (trace_state_variables): Use IP_AGENT_EXPORT.
5839 (traceframe_t): Delete unused variable.
5840 (circular_trace_buffer): Don't include in the IPA.
5841 (trace_buffer_start): Delete.
5842 (struct trace_buffer_control): New.
5843 (trace_buffer_free): Delete.
5844 (struct ipa_trace_buffer_control): New.
5845 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5846 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5848 (trace_buffer_ctrl): New.
5849 (TRACE_BUFFER_CTRL_CURR): New.
5850 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5851 Reimplement as macros.
5852 (trace_buffer_wrap): Delete.
5853 (traceframe_write_count, traceframe_read_count)
5854 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5855 (struct tracepoint_hit_ctx) <type>: New field.
5856 (struct fast_tracepoint_ctx): New.
5857 (memory_barrier): New.
5859 (record_tracepoint_error): Update atomically in the IPA.
5860 (clear_inferior_trace_buffer): New.
5861 (about_to_request_buffer_space): New.
5862 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5863 updating the same buffer.
5864 (add_tracepoint): Default the tracepoint's type to trap
5865 tracepoint, and orig_size to -1.
5866 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5868 (create_trace_state_variable): New parameter `gdb'. Handle it.
5869 (clear_installed_tracepoints): Clear fast tracepoint jumps.
5870 (cmd_qtdp): Handle fast tracepoints.
5872 (max_jump_pad_size): New.
5873 (gdb_jump_pad_head): New.
5874 (get_jump_space_head): New.
5875 (claim_jump_space): New.
5876 (sort_tracepoints): New.
5877 (MAX_JUMP_SIZE): New.
5878 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
5880 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5881 support. Upload fast traceframes, and delete internal IPA
5883 (stop_tracing_handler): New.
5884 (flush_trace_buffer_handler): New.
5885 (cmd_qtstop): Upload fast tracepoints.
5886 (response_tracepoint): Handle fast tracepoints.
5887 (tracepoint_finished_step): Upload fast traceframes. Set the
5888 tracepoint hit context's tracepoint type.
5889 (handle_tracepoint_bkpts): New.
5890 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5891 type. Add comment about fast tracepoints.
5892 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5893 non-existing action_str field.
5894 (get_context_regcache): Handle fast tracepoints.
5895 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5897 (fast_tracepoint_from_jump_pad_address): New.
5898 (fast_tracepoint_from_ipa_tpoint_address): New.
5899 (collecting_t): New.
5900 (force_unlock_trace_buffer): New.
5901 (fast_tracepoint_collecting): New.
5904 (write_inferior_data_ptr): New.
5905 (target_tp_heap): New.
5906 (target_malloc): New.
5907 (download_agent_expr): New.
5909 (download_tracepoints): New.
5910 (download_trace_state_variables): New.
5911 (upload_fast_traceframes): New.
5912 (IPA_FIRST_TRACEFRAME): New.
5913 (IPA_NEXT_TRACEFRAME_1): New.
5914 (IPA_NEXT_TRACEFRAME): New.
5915 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5916 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5917 (gdb_jump_pad_buffer_end): New.
5918 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5919 (initialize_tracepoint): Adjust.
5920 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5921 buffer. Initialize the low module.
5922 * utils.c (PREFIX, TOOLNAME): New.
5923 (malloc_failure): Use PREFIX.
5924 (error): In the IPA, an error causes an exit.
5925 (fatal, warning): Use PREFIX.
5926 (internal_error): Use TOOLNAME.
5927 (NUMCELLS): Increase to 10.
5928 * configure, config.in: Regenerate.
5930 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5932 * server.c (handle_query) <qSupported>: Do two passes over the
5933 qSupported string to avoid nesting strtok.
5935 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5937 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5939 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
5941 * configure: Regenerate.
5942 * proc-service.list: New.
5944 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5946 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5949 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
5951 * gdbreplay.c (remote_open): Check error return from socket() call by
5952 its equality to -1 not by it being negative.
5953 * remote-utils.c (remote_open): Likewise.
5955 2010-05-23 Pedro Alves <pedro@codesourcery.com>
5957 * config.h: Regenerate.
5959 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5961 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5962 doesn't provide PTRACE_GET_THREAD_AREA.
5964 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
5966 * linux-m68k-low.c: Include <asm/ptrace.h>
5967 (ps_get_thread_area): Implement.
5969 2010-05-03 Doug Evans <dje@google.com>
5971 * event-loop.c (struct callback_event): New struct.
5972 (callback_list): New global.
5973 (append_callback_event, delete_callback_event): New functions.
5974 (process_callback): New function.
5975 (start_event_loop): Call it.
5976 * remote-utils.c (NOT_SCHEDULED): Define.
5977 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5978 moved out of readchar.
5979 (readchar): Rewrite. Call reschedule before returning.
5980 (reset_readchar): New function.
5981 (remote_close): Call it.
5982 (process_remaining, reschedule): New functions.
5983 * server.h (callback_handler_func): New typedef.
5984 (append_callback_event, delete_callback_event): Declare.
5986 2010-05-03 Pedro Alves <pedro@codesourcery.com>
5988 * proc-service.c (ps_pglobal_lookup): Use
5989 thread_db_look_up_one_symbol.
5990 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5991 parameter. Use it instead of all_symbols_looked_up.
5992 * server.h (struct process_info) <all_symbols_looked_up>: Delete
5994 (all_symbols_looked_up): Don't declare.
5995 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5996 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5998 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5999 Set all_symbols_looked_up here.
6000 (thread_db_look_up_one_symbol): New.
6001 (thread_db_get_tls_address): Adjust.
6002 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6003 thread_db object on the heap, and tentatively set it in the
6005 (thread_db_init): Don't set all_symbols_looked_up here.
6006 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6008 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6010 * linux-low.c (linux_kill, linux_detach): Adjust.
6011 (status_pending_p_callback): Remove redundant statement. Check
6012 for !TARGET_WAITIKIND_IGNORE, instead of
6013 TARGET_WAITKIND_STOPPED.
6014 (handle_tracepoints): Make sure LWP is locked. Adjust.
6015 (linux_wait_for_event_1): Adjust.
6016 (linux_cancel_breakpoints): New.
6017 (unsuspend_one_lwp): New.
6018 (unsuspend_all_lwps): New.
6019 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6020 (send_sigstop_callback): Change return type to int, add new
6021 `except' parameter and handle it.
6022 (suspend_and_send_sigstop_callback): New.
6023 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6024 pass them down. If SUSPEND, also increment the lwp's suspend
6026 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6027 (need_step_over_p): Don't consider suspended LWPs.
6028 (start_step_over): Adjust.
6029 (proceed_one_lwp): Change return type to int, add new `except'
6030 parameter and handle it.
6031 (unsuspend_and_proceed_one_lwp): New.
6032 (proceed_all_lwps): Use find_inferior instead of
6034 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6035 also decrement the suspend count of LWPs. Pass `except' down,
6036 instead of hacking its suspend count.
6037 (linux_pause_all): Add `freeze' parameter. Adjust.
6038 (linux_unpause_all): New.
6039 (linux_target_ops): Install linux_unpause_all.
6040 * server.c (handle_status): Adjust.
6041 * target.h (struct target_ops): New fields `unpause_all' and
6042 `cancel_breakpoints'. Add new parameter to `pause_all'.
6043 (pause_all): Add new `freeze' parameter.
6045 (cancel_breakpoints): New.
6046 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6048 (cmd_qtstart): Pause threads.
6049 (stop_tracing): Pause threads, and cancel breakpoints.
6050 * win32-low.c (win32_target_ops): Adjust.
6052 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6054 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6055 the inferior right away from here...
6056 (linux_wait_1): ... to here, and adjust to check the thread's
6057 last_resume_kind instead of the lwp's step or stop_expected flags.
6059 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6061 * README: Use consistent `GDB' and `GDBserver' spellings.
6063 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6065 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6066 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6067 (linux_detach_one_lwp): Assume the lwp is stopped.
6068 (any_thread_of): Delete.
6069 (linux_detach): Stop all lwps here. Don't blindly delete all
6071 (delete_lwp_callback): New.
6072 (linux_mourn): Delete all lwps of the process that is gone.
6073 (linux_wait_1): Don't delete the last lwp of the process here.
6074 * mem-break.h (mark_breakpoints_out): Declare.
6075 * mem-break.c (mark_breakpoints_out): New.
6076 (free_all_breakpoints): Use it.
6077 * server.c (handle_target_event): If the process is gone, mark
6079 * thread-db.c (struct thread_db) <create_bp>: New field.
6080 (thread_db_enable_reporting): Fix prototype. Store a thread event
6081 breakpoint reference in the thread_db struct.
6082 (thread_db_load_search): Clear the thread_db object.
6083 (try_thread_db_load_1): Ditto.
6084 (switch_to_process): New.
6085 (disable_thread_event_reporting): Use it.
6086 (remove_thread_event_breakpoints): New.
6087 (thread_db_detach, thread_db_mourn): Use it.
6089 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6091 * linux-low.c (linux_enable_event_reporting): New.
6092 (linux_wait_for_event_1, handle_extended_wait): Use it.
6094 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6096 * linux-low.c (linux_kill_one_lwp, linux_kill)
6097 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6098 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6099 SIGSTOP even if the LWP is stopped.
6100 (send_sigstop_callback): New.
6101 (stop_all_lwps): Use send_sigstop_callback instead.
6102 (linux_resume_one_thread): Adjust.
6103 (proceed_one_lwp): Still proceed an LWP that the client has
6104 requested to stop, if we haven't reported it as stopped yet. Make
6105 sure that LWPs the client want stopped, have a pending SIGSTOP.
6107 2010-04-26 Doug Evans <dje@google.com>
6109 * server.c (handle_general_set): Make static.
6111 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6112 Print received char after testing for error/eof instead of before.
6113 (input_interrupt): Tweak comment.
6115 2010-04-23 Doug Evans <dje@google.com>
6117 * server.c (start_inferior): Print inferior argv if --debug.
6119 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6121 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6122 * nto-x86-low.c: Include server.h
6124 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6126 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6127 be consistent with other sources of this directory.
6128 (init_registers_amd64): Correct name of source file of this function
6131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6133 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6136 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6138 * win32-i386-low.c: Add 64-bit support.
6139 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6140 (init_registers_amd64): Declare.
6141 (mappings): Add 64-bit version of array.
6142 (init_windows_x86): New function.
6143 (the_low_target): Change init_arch field to init_windows_x86.
6145 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6147 * win32-low.c: Adapt to support also 64-bit architecture.
6148 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6149 (get_image_name): Use SIZE_T type for local variable `done'.
6150 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6151 (toolhelp_get_dll_name): Idem.
6152 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6153 Use uintptr_t typecast to avoid warning.
6154 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6155 (handle_exception): Use phex_nz to avoid warning.
6156 (win32_wait): Remove unused local variable `process'.
6158 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6160 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6163 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6165 * configure.ac: Use `ws2_32' library for srv_mingw.
6166 * configure: Regenerate.
6167 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6168 * remote-utils.c: Likewise.
6170 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6172 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6173 if __x86_64__ is defined.
6175 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6177 * configure: Regenerate.
6179 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6181 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6182 * target.h (target_ops): New get_tib_address field.
6183 * win32-low.h (win32_thread_info): Add thread_local_base field.
6184 * win32-low.c (child_add_thread): Add tlb argument.
6185 Set thread_local_base field to TLB.
6186 (get_child_debug_event): Adapt to child_add_thread change.
6187 (win32_get_tib_address): New function.
6188 (win32_target_ops): Set get_tib_address field to
6189 win32_get_tib_address.
6190 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6192 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6194 * linux-low.c (linux_mourn): Also remove the process.
6195 * server.c (handle_target_event): Don't remove the process here.
6196 * nto-low.c (nto_mourn): New.
6197 (nto_target_ops): Install it.
6198 * spu-low.c (spu_mourn): New.
6199 (spu_target_ops): Install it.
6200 * win32-low.c (win32_mourn): New.
6201 (win32_target_ops): Install it.
6203 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6205 * server.h (buffer_xml_printf): Remove redundant `;'.
6207 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6209 * regcache.c (set_register_cache): Invalidate regcaches before
6210 changing the register cache layout.
6211 (regcache_invalidate_one): Allow a NULL regcache.
6212 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6213 regcaches before changing the register cache layout or the target
6216 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6218 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6219 variable warning on Linux/x86-64.
6221 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6223 GDBserver disconnected tracing support.
6225 * linux-low.c (linux_remove_process): Delete.
6226 (add_lwp): Don't set last_resume_kind here.
6227 (linux_kill): Use `mourn'.
6228 (linux_detach): Use `thread_db_detach', and `mourn'.
6230 (linux_attach_lwp_1): Adjust comment.
6231 (linux_attach): last_resume_kind moved the thread_info; adjust.
6232 (status_pending_p_callback): Adjust.
6233 (linux_wait_for_event_1): Adjust.
6234 (count_events_callback, select_singlestep_lwp_callback)
6235 (select_event_lwp_callback, cancel_breakpoints_callback)
6236 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6237 (proceed_one_lwp): Adjust.
6238 (linux_async): Add debug output.
6239 (linux_thread_stopped): New.
6240 (linux_pause_all): New.
6241 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6243 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6244 (thread_db_free): Delete declaration.
6245 (thread_db_detach, thread_db_mourn): Declare.
6246 * thread-db.c (thread_db_init): Use thread_db_mourn.
6247 (thread_db_free): Delete, split in two.
6248 (disable_thread_event_reporting): New.
6249 (thread_db_detach): New.
6250 (thread_db_mourn): New.
6252 * server.h (struct thread_info) <last_resume_kind>: New field.
6253 <attached>: Add comment.
6254 <gdb_detached>: New field.
6255 (handler_func): Change return type to int.
6256 (handle_serial_event, handle_target_event): Ditto.
6257 (gdb_connected): Declare.
6259 (disconnected_tracing): Declare.
6260 (stop_tracing): Declare.
6262 * server.c (handle_query) <qSupported>: Report support for
6263 disconnected tracing.
6264 (queue_stop_reply_callback): Account for running threads.
6265 (gdb_wants_thread_stopped): New.
6266 (gdb_wants_all_threads_stopped): New.
6267 (gdb_reattached_process): New.
6268 (handle_status): Clear the `gdb_detached' flag of all processes.
6269 In all-stop, stop all threads.
6270 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6271 (process_serial_event): If the remote connection breaks, or if an
6272 exit was forced with "monitor exit", force an event loop exit.
6273 Handle disconnected tracing on detach.
6274 (handle_serial_event): Adjust.
6275 (handle_target_event): If GDB isn't connected, forward events back
6276 to the inferior, unless the last process exited, in which case,
6277 exit gdbserver. Adjust interface.
6279 * remote-utils.c (remote_open): Don't block in accept. Instead
6280 register an event loop source on the listen socket file
6281 descriptor. Refactor bits into ...
6282 (listen_desc): ... this new global.
6283 (gdb_connected): ... this new function.
6284 (enable_async_notification): ... this new function.
6285 (handle_accept_event): ... this new function.
6286 (remote_close): Clear remote_desc.
6288 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6290 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6292 (mourn_inferior): Define.
6293 (target_process_qsupported): Avoid the dangling else problem.
6294 (thread_stopped): Define.
6295 (pause_all): Define.
6296 (target_waitstatus_to_string): Declare.
6297 * target.c (target_waitstatus_to_string): New.
6299 * tracepoint.c (tracing): Make extern.
6300 (disconnected_tracing): New.
6301 (stop_tracing): Make extern. Handle tracing stops due to GDB
6303 (cmd_qtdisconnected): New.
6304 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6305 (handle_tracepoint_general_set): Handle QTDisconnected.
6307 * event-loop.c (event_handler_func): Change return type to int.
6308 (process_event): Bail out if the event handler wants the event
6310 (handle_file_event): Ditto.
6311 (start_event_loop): Bail out if the event handler wants the event
6314 * nto-low.c (nto_target_ops): Adjust.
6315 * spu-low.c (spu_wait): Don't remove the process here.
6316 (spu_target_ops): Adjust.
6317 * win32-low.c (win32_wait): Don't remove the process here.
6318 (win32_target_ops): Adjust.
6320 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6322 * regcache.c (realloc_register_cache): Invalidate inferior's
6323 regcache before recreating it.
6325 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6327 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6329 2010-04-09 Stan Shebs <stan@codesourcery.com>
6330 Pedro Alves <pedro@codesourcery.com>
6332 * server.h (LONGEST): New.
6333 (struct thread_info) <while_stepping>: New field.
6334 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6336 (initialize_tracepoint, handle_tracepoint_general_set)
6337 (handle_tracepoint_query, tracepoint_finished_step)
6338 (tracepoint_was_hit, release_while_stepping_state_list):
6339 (current_traceframe): Declare.
6340 * server.c (handle_general_set): Handle tracepoint packets.
6342 (write_memory): New.
6343 (handle_search_memory_1): Use read_memory.
6344 (handle_query): Report support for conditional tracepoints, trace
6345 state variables, and tracepoint sources. Handle tracepoint
6347 (main): Initialize the tracepoints module.
6348 (process_serial_event): Handle traceframe reads/writes.
6350 * linux-low.c (handle_tracepoints): New.
6351 (linux_wait_1): Call it.
6352 (linux_resume_one_lwp): Handle while-stepping.
6353 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6354 (linux_target_ops): Install them.
6355 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6357 * linux-x86-low.c (x86_supports_tracepoints): New.
6358 (the_low_target). Install it.
6360 * mem-break.h (delete_breakpoint): Declare.
6361 * mem-break.c (delete_breakpoint): Make external.
6363 * target.h (struct target_ops): Add `supports_tracepoints',
6364 `read_pc', and `write_pc' fields.
6365 (target_supports_tracepoints): Define.
6366 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6369 * regcache.h (struct regcache) <registers_owned>: New field.
6370 (init_register_cache, regcache_cpy): Declare.
6371 (regcache_read_pc, regcache_write_pc): Declare.
6372 (register_cache_size): Declare.
6373 (supply_regblock): Declare.
6374 * regcache.c (init_register_cache): New.
6375 (new_register_cache): Use it.
6376 (regcache_cpy): New.
6377 (register_cache_size): New.
6378 (supply_regblock): New.
6379 (regcache_read_pc, regcache_write_pc): New.
6381 * tracepoint.c: New.
6383 * Makefile.in (OBS): Add tracepoint.o.
6384 (tracepoint.o): New rule.
6386 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6388 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6390 (i386-mmx.c): Likewise.
6391 (i386-mmx-linux.o): Likewise.
6392 (i386-mmx-linux.c): Likewise.
6394 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6395 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6396 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6397 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6399 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6400 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6401 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6403 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6405 * Makefile.in (clean): Updated.
6407 (i386-avx.c): Likewise.
6408 (i386-avx-linux.o): Likewise.
6409 (i386-avx-linux.c): Likewise.
6410 (amd64-avx.o): Likewise.
6411 (amd64-avx.c): Likewise.
6412 (amd64-avx-linux.o): Likewise.
6413 (amd64-avx-linux.c): Likewise.
6415 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6416 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6417 (srv_amd64_regobj): Add amd64-avx.o.
6418 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6419 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6420 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6421 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6422 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6423 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6424 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6426 * i387-fp.c: Include "i386-xstate.h".
6428 (i387_cache_to_xsave): Likewise.
6429 (i387_xsave_to_cache): Likewise.
6430 (x86_xcr0): Likewise.
6432 * i387-fp.h (i387_cache_to_xsave): Likewise.
6433 (i387_xsave_to_cache): Likewise.
6434 (x86_xcr0): Likewise.
6436 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6437 * linux-crisv32-low.c (target_regsets): Likewise.
6438 * linux-m68k-low.c (target_regsets): Likewise.
6439 * linux-mips-low.c (target_regsets): Likewise.
6440 * linux-ppc-low.c (target_regsets): Likewise.
6441 * linux-s390-low.c (target_regsets): Likewise.
6442 * linux-sh-low.c (target_regsets): Likewise.
6443 * linux-sparc-low.c (target_regsets): Likewise.
6444 * linux-xtensa-low.c (target_regsets): Likewise.
6446 * linux-low.c: Include <sys/uio.h>.
6447 (regsets_fetch_inferior_registers): Support nt_type.
6448 (regsets_store_inferior_registers): Likewise.
6449 (linux_process_qsupported): New.
6450 (linux_target_ops): Add linux_process_qsupported.
6452 * linux-low.h (regset_info): Add nt_type.
6453 (linux_target_ops): Add process_qsupported.
6455 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6457 (init_registers_i386_avx_linux): New.
6458 (init_registers_amd64_avx_linux): Likewise.
6459 (xmltarget_i386_linux_no_xml): Likewise.
6460 (xmltarget_amd64_linux_no_xml): Likewise.
6461 (PTRACE_GETREGSET): Likewise.
6462 (PTRACE_SETREGSET): Likewise.
6463 (x86_fill_xstateregset): Likewise.
6464 (x86_store_xstateregset): Likewise.
6465 (use_xml): Likewise.
6466 (x86_linux_update_xmltarget): Likewise.
6467 (x86_linux_process_qsupported): Likewise.
6468 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6469 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6470 init_registers_i386_linux here. Call
6471 x86_linux_update_xmltarget.
6472 (the_low_target): Add x86_linux_process_qsupported.
6474 * server.c (handle_query): Call target_process_qsupported.
6476 * target.h (target_ops): Add process_qsupported.
6477 (target_process_qsupported): New.
6479 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6481 * inferiors.c (add_thread): Set last_status kind to
6482 TARGET_WAITKIND_IGNORE.
6483 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6484 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6485 (linux_wait_1): Move `thread' local definition to block that uses
6486 it. Don't NULL initialize `event_child'.
6487 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6488 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6489 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6491 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6493 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6494 an extended waitstatus, or by a watchpoint.
6495 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6496 thread was stepping or has been stopped by a watchpoint.
6498 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6500 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6501 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6502 of another, then delete the previous, and validate all
6504 (validate_inserted_breakpoint): New.
6505 (delete_disabled_breakpoints): New.
6506 (validate_breakpoints): New.
6507 (check_mem_read): Validate breakpoints before trusting their
6508 shadow. Delete disabled breakpoints.
6509 (check_mem_write): Validate breakpoints before trusting they
6510 should be inserted. Delete disabled breakpoints.
6511 * mem-break.h (validate_breakpoints):
6512 * server.c (handle_query): Validate breakpoints when we see a
6515 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6517 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6518 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6519 if we could tell there's a GDB breakpoint at stop_pc.
6520 (need_step_over_p): Don't do a step over if we find a GDB
6521 breakpoint at the resume PC.
6523 * mem-break.c (struct raw_breakpoint): New.
6524 (enum bkpt_type): New type `gdb_breakpoint'.
6525 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6526 fields. New field `raw'.
6527 (find_raw_breakpoint_at): New.
6528 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6530 (set_breakpoint_at): Adjust.
6531 (delete_raw_breakpoint): New.
6532 (release_breakpoint): New.
6533 (delete_breakpoint): Rename to...
6534 (delete_breakpoint_1): ... this. Add proc parameter. Use
6535 release_breakpoint. Return ENOENT.
6536 (delete_breakpoint): Reimplement.
6537 (find_breakpoint_at): Delete.
6538 (find_gdb_breakpoint_at): New.
6539 (delete_breakpoint_at): Delete.
6540 (set_gdb_breakpoint_at): New.
6541 (delete_gdb_breakpoint_at): New.
6542 (gdb_breakpoint_here): New.
6543 (set_reinsert_breakpoint): Use release_breakpoint.
6544 (uninsert_breakpoint): Rename to ...
6545 (uninsert_raw_breakpoint): ... this.
6546 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6547 (reinsert_raw_breakpoint): Change parameter type to
6549 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6551 (check_breakpoints): Adjust. Use release_breakpoint.
6552 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6553 (breakpoint_inserted_here): Ditto.
6554 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6555 Don't trust the breakpoint's shadow if it is not inserted.
6556 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6557 (delete_all_breakpoints): Adjust.
6558 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6559 use delete_breakpoint_1.
6561 * mem-break.h (breakpoints_supported): Delete declaration.
6562 (set_gdb_breakpoint_at): Declare.
6563 (gdb_breakpoint_here): Declare.
6564 (delete_breakpoint_at): Delete.
6565 (delete_gdb_breakpoint_at): Declare.
6567 * server.h (struct raw_breakpoint): Forward declare.
6568 (struct process_info): New field `raw_breakpoints'.
6570 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6573 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6575 * linux-low.c (status_pending_p_callback): Fix comment.
6576 (linux_wait_for_event_1): Move most of the internal breakpoint
6577 handling from here...
6578 (linux_wait_1): ... to here.
6579 (count_events_callback): New.
6580 (select_singlestep_lwp_callback): New.
6581 (select_event_lwp_callback): New.
6582 (cancel_breakpoints_callback): New.
6583 (select_event_lwp): New.
6584 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6585 priority to all LWPs that have had events that should be reported
6586 to the client. Cancel breakpoints when about to reporting the
6587 event to the client, not while stopping lwps. No longer cancel
6588 finished single-steps here.
6589 (cancel_finished_single_step): Delete.
6590 (cancel_finished_single_steps): Delete.
6592 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6594 * mem-break.c (enum bkpt_type): New.
6595 (struct breakpoint): New field `type'.
6596 (set_breakpoint_at): Change return type to struct breakpoint
6597 pointer. Set type to `other_breakpoint' by default.
6598 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6599 in the breakpoint list.
6600 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6601 (reinsert_breakpoint): Rename to ...
6602 (reinsert_raw_breakpoint): ... this.
6603 (reinsert_breakpoints_at): Adjust.
6604 * mem-break.h (struct breakpoint): Declare.
6605 (set_breakpoint_at): Change return type to struct breakpoint
6608 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6610 * server.c (handle_query): Assign, not compare.
6612 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6614 Teach linux gdbserver to step-over-breakpoints.
6616 * linux-low.c (can_hardware_single_step): New.
6617 (supports_breakpoints): New.
6618 (handle_extended_wait): If stopping threads, read the stop pc of
6621 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6622 low target doesn't support retrieving the PC.
6623 (add_lwp): Set last_resume_kind to resume_continue.
6624 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6625 (linux_attach): Don't clear stop_expected. Set the lwp's
6626 last_resume_kind to resume_stop.
6627 (linux_detach_one_lwp): Don't check for removed breakpoints.
6628 (check_removed_breakpoint): Delete.
6629 (status_pending_p): Rename to ...
6630 (status_pending_p_callback): ... this. Don't check for removed
6631 breakpoints. Don't consider threads that are stopped from GDB's
6633 (linux_wait_for_lwp): Always read the stop_pc here.
6634 (cancel_breakpoint): New.
6635 (step_over_bkpt): New global.
6636 (linux_wait_for_event_1): Implement stepping over breakpoints.
6637 (gdb_wants_lwp_stopped): New.
6638 (gdb_wants_all_stopped): New.
6639 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6640 single-step traps here. Store the thread's last reported target
6642 (send_sigstop): Don't clear stop_expected. Always set it,
6644 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6645 (cancel_finished_single_step): New.
6646 (cancel_finished_single_steps): New.
6647 (wait_for_sigstop): Don't cancel finished single-step traps here.
6648 (linux_resume_one_lwp): Don't check for removed breakpoints.
6649 Don't set `step' on non-hardware step archs.
6650 (linux_set_resume_request): Ignore resume_stop requests if already
6651 stopping or stopped. Set the lwp's last_resume_kind.
6652 (resume_status_pending_p): Don't check for removed breakpoints.
6653 (need_step_over_p): New.
6654 (start_step_over): New.
6655 (finish_step_over): New.
6656 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6657 requests. Clear the thread's last reported target waitstatus.
6658 Don't use the `suspended' flag. Don't consider pending breakpoints.
6659 (linux_resume): Start a step-over if necessary.
6660 (proceed_one_lwp): New.
6661 (proceed_all_lwps): New.
6662 (unstop_all_lwps): New.
6663 * linux-low.h (struct lwp_info): Rewrite comment for the
6664 `suspended' flag. Add the `stop_pc' field. Delete the
6665 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6666 Add `'last_resume_kind' and `need_step_over' fields.
6667 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6668 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6669 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6670 (set_raw_breakpoint_at): New.
6671 (set_breakpoint_at): Rewrite to use it.
6672 (reinsert_breakpoint_handler): Delete.
6673 (set_reinsert_breakpoint): New.
6674 (reinsert_breakpoint_by_bp): Delete.
6675 (delete_reinsert_breakpoints): New.
6676 (uninsert_breakpoint): Rewrite.
6677 (uninsert_breakpoints_at): New.
6678 (reinsert_breakpoint): Rewrite.
6679 (reinsert_breakpoints_at): New.
6680 (check_breakpoints): Rewrite.
6681 (breakpoint_here): New.
6682 (breakpoint_inserted_here): New.
6683 (check_mem_read): Adjust.
6684 * mem-break.h (breakpoints_supported, breakpoint_here)
6685 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6686 (reinsert_breakpoint_by_bp): Delete declaration.
6687 (delete_reinsert_breakpoints): Declare.
6688 (reinsert_breakpoint): Delete declaration.
6689 (reinsert_breakpoints_at): Declare.
6690 (uninsert_breakpoint): Delete declaration.
6691 (uninsert_breakpoints_at): Declare.
6692 (check_breakpoints): Adjust prototype.
6693 * server.h: Adjust include order.
6694 (struct thread_info): Declare here. Add a `last_status' field.
6696 2010-03-23 Michael Snyder <msnyder@vmware.com>
6698 * server.c (crc32): New function.
6699 (handle_query): Add handling for 'qCRC:' request.
6701 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6703 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6704 lwp had been stopped by a watchpoint.
6706 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6708 * server.h (internal_error): Declare.
6709 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6710 * utils.c (internal_error): New function.
6712 2010-03-15 Andreas Schwab <schwab@redhat.com>
6714 * configure.srv: Fix typo setting srv_regobj.
6716 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6718 * linux-low.c (fetch_register): Avoid passing a non string literal
6720 (usr_store_inferior_registers): Ditto.
6722 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6724 * linux-low.c (linux_write_memory): Bail out early if peeking
6727 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6729 * linux-low.h (struct lwp_info): New fields
6730 `stopped_by_watchpoint' and `stopped_data_address'.
6731 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6732 here, and cache them in the lwp object.
6733 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6735 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6737 (linux_stopped_by_watchpoint): Rewrite.
6738 (linux_stopped_data_address): Rewrite.
6740 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6742 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6743 switching the current inferior, not before.
6745 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6747 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6748 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6749 i386-linux.c and amd64-linux.c.
6750 (reg-i386.o): Removed.
6751 (reg-i386.c): Likewise.
6752 (reg-i386-linux.o): Likewise.
6753 (reg-i386-linux.c): Likewise.
6754 (reg-x86-64.o): Likewise.
6755 (reg-x86-64.c): Likewise.
6756 (reg-x86-64-linux.o): Likewise.
6757 (reg-x86-64-linux.c): Likewise.
6760 (i386-linux.o): Likewise.
6761 (i386-linux.c): Likewise.
6762 (amd64.o): Likewise.
6763 (amd64.c): Likewise.
6764 (amd64-linux.o): Likewise.
6765 (amd64-linux.c): Likewise.
6767 * configure.srv (srv_i386_regobj): New.
6768 (srv_i386_linux_regobj): Likewise.
6769 (srv_amd64_regobj): Likewise.
6770 (srv_amd64_linux_regobj): Likewise.
6771 (srv_i386_32bit_xmlfiles): Likewise.
6772 (srv_i386_64bit_xmlfiles): Likewise.
6773 (srv_i386_xmlfiles): Likewise.
6774 (srv_amd64_xmlfiles): Likewise.
6775 (srv_i386_linux_xmlfiles): Likewise.
6776 (srv_amd64_linux_xmlfiles): Likewise.
6777 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6778 srv_xmlfiles to $srv_i386_xmlfiles.
6779 (i[34567]86-*-mingw32ce*): Likewise.
6780 (i[34567]86-*-mingw*): Likewise.
6781 (i[34567]86-*-nto*): Likewise.
6782 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6783 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6784 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6785 (x86_64-*-linux*): Likewise.
6787 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6788 (init_registers_amd64_linux): New.
6789 (x86_arch_setup): Replace init_registers_x86_64_linux with
6790 init_registers_amd64_linux.
6792 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6794 * configure.ac: Check for libdl. If it is not available link against
6795 static libthread_db.
6796 * configure: Regenerate.
6798 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6802 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6803 handing a read watchpoint.
6804 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6806 2010-02-12 Doug Evans <dje@google.com>
6808 * linux-low.c (linux_supports_tracefork_flag): Document.
6809 (linux_look_up_symbols): Add comment.
6811 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
6813 * regcache.c (supply_register): Clear regcache if buf is NULL.
6815 2010-02-02 Nicolas Roche <roche@sourceware.org>
6816 Joel Brobecker <brobecker@adacore.com>
6818 * inferiors.c (find_inferior): Add function documentation.
6819 (unloaded_dll): Handle the case where the unloaded dll has not
6820 been previously registered in the dll list.
6822 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
6824 * linux-arm-low.c (thumb_breakpoint_len): Delete.
6825 (thumb2_breakpoint): New.
6826 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6828 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
6830 * linux-low.c (get_stop_pc): Check for SIGTRAP.
6831 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6834 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6836 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6838 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6840 * linux-s390-low.c (s390_collect_ptrace_register)
6841 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6843 2010-01-21 Doug Evans <dje@google.com>
6845 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6846 (PTRACE_ARG4_TYPE): New macro.
6847 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6848 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6849 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6850 (usr_store_inferior_registers): Ditto.
6851 (linux_read_memory, linux_write_memory): Ditto.
6852 (linux_test_for_tracefork): Ditto.
6854 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6855 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6857 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6859 * proc-service.c (ps_lgetregs): Don't refetch registers from the
6862 2010-01-21 Pedro Alves <pedro@codesourcery.com>
6864 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6865 prototype to take a regcache. Adjust.
6867 2010-01-20 Pedro Alves <pedro@codesourcery.com>
6869 * regcache.h (struct thread_info): Forward declare.
6870 (struct regcache): New.
6871 (new_register_cache): Adjust prototype.
6872 (get_thread_regcache): Declare.
6873 (free_register_cache): Adjust prototype.
6874 (registers_to_string, registers_from_string): Ditto.
6875 (supply_register, supply_register_by_name, collect_register)
6876 (collect_register_as_string, collect_register_by_name): Ditto.
6877 * regcache.c (struct inferior_regcache_data): Delete.
6878 (get_regcache): Rename to ...
6879 (get_thread_regcache): ... this. Adjust. Switch inferior before
6881 (regcache_invalidate_one): Adjust.
6882 (regcache_invalidate): Fix prototype.
6883 (new_register_cache): Return the new register cache.
6884 (free_register_cache): Change prototype.
6885 (realloc_register_cache): Adjust.
6886 (registers_to_string): Change prototype to take a regcache. Adjust.
6887 (registers_from_string): Ditto.
6888 (register_data): Ditto.
6889 (supply_register): Ditto.
6890 (supply_register_by_name): Ditto.
6891 (collect_register): Ditto.
6892 (collect_register_as_string): Ditto.
6893 (collect_register_by_name): Ditto.
6894 * server.c (process_serial_event): Adjust.
6895 * linux-low.h (regset_fill_func, regset_store_func): Change
6897 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6899 * linux-low.c (get_stop_pc): Adjust.
6900 (check_removed_breakpoint): Adjust.
6901 (linux_wait_for_event): Adjust.
6902 (linux_resume_one_lwp): Adjust.
6903 (fetch_register): Add regcache parameter. Adjust.
6904 (usr_store_inferior_registers): Ditto.
6905 (regsets_fetch_inferior_registers): Ditto.
6906 (regsets_store_inferior_registers): Ditto.
6907 (linux_fetch_registers, linux_store_registers): Ditto.
6908 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6910 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6912 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6913 prototype to take a regcache.
6914 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6915 * remote-utils.c (convert_ascii_to_int, outreg)
6916 (prepare_resume_reply): Change prototype to take a regcache.
6918 * target.h (struct target_ops) <fetch_registers, store_registers>:
6919 Change prototype to take a regcache.
6920 (fetch_inferior_registers, store_inferior_registers): Change
6921 prototype to take a regcache. Adjust.
6922 * proc-service.c (ps_lgetregs): Adjust.
6923 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6924 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6925 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6926 take a regcache. Adjust.
6927 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6928 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6929 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6930 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
6931 * linux-cris-low.c (cris_get_pc, cris_set_pc)
6932 (cris_cannot_fetch_register):
6933 (cris_breakpoint_at): Change prototype to take a regcache.
6935 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6936 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6937 to take a regcache. Adjust.
6938 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6940 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6941 take a regcache. Adjust.
6942 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6943 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6944 (m68k_set_pc): Change prototype to take a regcache. Adjust.
6945 * linux-mips-low.c (mips_get_pc):
6946 (mips_set_pc): Change prototype to take a regcache. Adjust.
6947 (mips_reinsert_addr): Adjust.
6948 (mips_collect_register): Change prototype to take a regcache.
6950 (mips_supply_register):
6951 (mips_collect_register_32bit, mips_supply_register_32bit)
6952 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6953 (mips_store_fpregset): Ditto.
6954 * linux-ppc-low.c (ppc_supply_ptrace_register)
6955 (ppc_supply_ptrace_register): Ditto.
6956 (parse_spufs_run): Adjust.
6957 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6958 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6959 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6960 take a regcache. Adjust.
6961 * linux-s390-low.c (s390_collect_ptrace_register)
6962 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6963 (s390_set_pc): Change prototype to take a regcache. Adjust.
6964 (s390_arch_setup): Adjust.
6965 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6966 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
6967 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6968 (sparc_fill_gregset, sparc_store_gregset_from_stack)
6969 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6971 (sparc_breakpoint_at): Adjust.
6972 * linux-xtensa-low.c (xtensa_fill_gregset):
6973 (xtensa_store_gregset):
6974 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6975 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
6976 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6977 prototype to take a regcache. Adjust.
6978 * win32-arm-low.c (arm_fetch_inferior_register)
6979 (arm_store_inferior_register): Change prototype to take a
6981 * win32-i386-low.c (i386_fetch_inferior_register)
6982 (i386_store_inferior_register): Change prototype to take a
6984 * win32-low.c (child_fetch_inferior_registers)
6985 (child_store_inferior_registers): Change prototype to take a
6987 (win32_wait): Adjust.
6988 (win32_fetch_inferior_registers): Change prototype to take a
6990 (win32_store_inferior_registers): Adjust.
6991 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6992 store_inferior_register>: Change prototype to take a regcache.
6994 2010-01-20 Doug Evans <dje@google.com>
6996 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6998 (linux_wait_for_event1, linux_init_signals): Ditto.
6999 (W_STOPCODE): Provide definition if missing.
7001 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7003 * linux-low.c (linux_core_of_thread): New.
7004 (compare_ints, show_process, list_threads): New.
7005 (linux_qxfer_osdata): Report threads and cores.
7006 (linux_target_op): Register linux_core_of_thread.
7007 * remote-utils.c (prepare_resume_reply): Report the core.
7008 (buffer_xml_printf): Support %d specifier.
7009 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7011 (handle_query): Handle qXfer:threads. Announce availability
7013 * target.h (struct target_ops): New field core_of_thread.
7015 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7017 * Makefile.in (clean): Remove new generated files.
7018 (reg-s390.o, reg-s390.c): Remove rules.
7019 (reg-s390x.o, reg-s390x.c): Likewise.
7020 (s390-linux32.o, s390-linux32.c): Add rules.
7021 (s390-linux64.o, s390-linux64.c): Likewise.
7022 (s390x-linux64.o, s390x-linux64.c): Likewise.
7023 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7024 * linux-s390-low.c: Include <elf.h>.
7025 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7026 (init_registers_s390): Remove prototype.
7027 (init_registers_s390x): Likewise.
7028 (init_registers_s390_linux32): Add prototype.
7029 (init_registers_s390_linux64): Likewise.
7030 (init_registers_s390x_linux64): Likewise.
7031 (s390_num_regs_3264): New define.
7032 (s390_regmap_3264): New global variable.
7033 (s390_cannot_fetch_register): Remove obsolete check.
7034 (s390_cannot_store_register): Likewise.
7035 (s390_collect_ptrace_register): Handle upper/lower register halves.
7036 (s390_supply_ptrace_register): Likewise.
7037 (s390_fill_gregset): Update to register number changes.
7038 (s390_get_hwcap): New routine.
7039 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7040 Install appropriate regmap and register set.
7042 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7044 * server.c (gdbserver_version): Update copyright year to 2010.
7045 * gdbreplay.c (gdbreplay_version): Likewise.
7047 2009-12-28 Doug Evans <dje@google.com>
7049 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7050 elf/external.h. Include <elf.h> instead but only if necessary.
7052 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7054 * linux-low.c (linux_remove_process): Remove `detaching'
7055 parameter. Don't release/detach from thread_db here.
7056 (linux_kill): Release/detach from thread_db here, ...
7057 (linux_detach): ... and here, before actually detaching.
7058 (linux_wait_1): ... and here, when a process exits.
7059 * thread-db.c (any_thread_of): New.
7060 (thread_db_free): Switch the current inferior to a thread of the
7063 2009-12-21 Doug Evans <dje@google.com>
7065 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7067 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7068 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7069 warning ifndef __NR_tkill. Move setting of errno there too.
7070 Delete unnecessary resetting of errno after syscall.
7071 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7073 * configure.ac: Check for dladdr.
7074 * config.in: Regenerate.
7075 * configure: Regenerate.
7076 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7077 (try_thread_db_load): Update.
7079 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7081 2009-12-18 Doug Evans <dje@google.com>
7083 * event-loop.c: Include unistd.h if it exists.
7085 * linux-low.c (my_waitpid): Move definition away from being in
7086 between linux_tracefork_child/linux_test_for_tracefork.
7088 * gdb_proc_service.h (psaddr_t): Fix type.
7089 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7090 signature to match glibc.
7092 2009-12-16 Doug Evans <dje@google.com>
7094 * linux-low.c (linux_read_memory): Fix argument to read.
7096 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7098 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7099 events, don't leave current_inferior pointing at null.
7101 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7103 * win32-low.c (LOG): Delete.
7104 (OUTMSG): Output to stderr.
7105 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7106 on compile time LOG macro.
7107 (win32_wait): Fix debug output.
7109 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7111 * win32-low.c (win32_add_one_solib): If the dll name is
7112 "ntdll.dll", prepend the system directory to the dll path.
7114 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7116 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7118 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7119 Vladimir Prus <vladimir@codesourcery.com>
7121 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7122 * configure.ac: Check for __mcoldfire__ and set
7123 gdb_cv_m68k_is_coldfire.
7124 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7125 reg-cf.o and reg-m68k.o.
7126 * configure: Regenerated.
7128 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7130 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7131 Pass it to thread_db_free.
7132 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7133 proper `detaching' argument to linux_remove_process.
7134 * linux-low.h (thread_db_free): Add `detaching' parameter.
7135 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7137 (thread_db_free): Add `detaching' parameter. Only
7138 call td_ta_clear_event if detaching from process.
7140 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7142 * thread-db.c (thread_db_free): Fix typo.
7144 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7147 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7149 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7151 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7152 with an i686 compiler.
7153 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7155 * configure: Rebuilt.
7157 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7161 * server.c (handle_search_memory_1): Correct read_addr initialization
7162 in loop for searching subsequent chunks.
7164 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7166 * configure.ac: New --with-libthread-db option.
7167 * thread-db.c: Allow direct dependence on libthread_db.
7168 (thread_db_free): Adjust.
7169 * config.in: Regenerate.
7170 * configure: Likewise.
7172 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7175 * thread-db.c (attach_thread): New function.
7176 (maybe_attach_thread): Return success/failure.
7177 (find_new_threads_callback): Adjust.
7178 (thread_db_find_new_threads): Loop until no new threads.
7180 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7182 * proc-service.c (ps_lgetregs): Formatting.
7184 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7186 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7187 * configure.ac: Adjust.
7188 * linux-low.h (struct process_info_private): Move members to struct
7190 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7191 * linux-low.c (linux_remove_process): Adjust.
7192 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7193 * server.c (handle_query): Move code ...
7194 (handle_monitor_command): ... here. New function.
7195 * target.h (struct target_ops): New member.
7196 * thread-db.c (struct thread_db): New.
7197 (libthread_db_search_path): New variable.
7198 (thread_db_create_event, thread_db_enable_reporting)
7199 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7200 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7201 (try_thread_db_load_1, dladdr_to_soname): New functions.
7202 (try_thread_db_load, thread_db_load_search): New functions.
7203 (thread_db_init): Search for libthread_db.
7204 (thread_db_free): New function.
7205 (thread_db_handle_monitor_command): Likewise.
7206 * config.in: Regenerate.
7207 * configure: Regenerate.
7209 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7211 * spu-low.c (spu_kill): Wait for inferior to terminate.
7212 Call clear_inferiors.
7213 (spu_detach): Call clear_inferiors.
7215 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7217 * aclocal.m4: Regenerate.
7218 * config.in: Likewise.
7219 * configure: Likewise.
7221 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7223 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7224 (parse_spufs_run): New function.
7225 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7226 (ppc_breakpoint_at): Handle SPU breakpoints.
7228 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7230 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7231 (SPUFS_MAGIC): Define.
7232 (spu_enumerate_spu_ids): New function.
7233 (linux_qxfer_spu): New function.
7234 (linux_target_ops): Install linux_qxfer_spu.
7236 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7238 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7239 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7240 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7241 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7242 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7243 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7244 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7245 (init_registers_powerpc_cell32l): Add prototype.
7246 (init_registers_powerpc_cell64l): Likewise.
7247 (ppc_arch_setup): Detect Cell/B.E. architecture.
7249 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7251 * Makefile.in (datarootdir): New variable.
7253 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7255 * linux-low.c (linux_write_memory): Update debugging output.
7256 * Makefile.in (clean): Add new descriptions.
7257 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7258 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7259 * configure.srv: Add new files for arm*-*-linux*.
7260 * linux-arm-low.c: Add new declarations.
7261 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7262 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7263 (HWCAP_VFPv3D16): New.
7264 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7265 instead of __IWMMXT__.
7266 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7267 (arm_arch_setup): New.
7268 (target_regsets): Remove #ifdef. Add VFP regset.
7269 (the_low_target): Use arm_arch_setup.
7271 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7273 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7274 the main thread again.
7276 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7278 Adding Neutrino gdbserver.
7279 * configure: Regenerated.
7280 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7281 * configure.srv (i[34567]86-*-nto*): New target.
7282 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7283 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7284 (nto_comctrl) [__QNX__]: New function.
7285 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7287 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7289 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7292 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7293 Pedro Alves <pedro@codesourcery.com>
7295 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7296 don't support CONTEXT_EXTENDED_REGISTERS.
7297 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7298 (the_low_target): Install them.
7299 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7300 failing with ERROR_PIPE_NOT_CONNECTED.
7302 2009-06-30 Doug Evans <dje@google.com>
7303 Pierre Muller <muller@ics.u-strasbg.fr>
7305 Add h/w watchpoint support to x86-linux, win32-i386.
7306 * Makefile.in (SFILES): Add i386-low.c
7307 (i386_low_h): Define.
7308 (i386-low.o): Add dependencies.
7309 (linux-x86-low.o): Add i386-low.h dependency.
7310 (win32-i386-low.o): Ditto.
7311 * i386-low.c: New file.
7312 * i386-low.h: New file.
7313 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7314 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7315 * linux-low.c (linux_add_process): Initialize arch_private.
7316 (linux_remove_process): Free arch_private.
7317 (add_lwp): Initialize arch_private.
7318 (delete_lwp): Free arch_private.
7319 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7321 * linux-low.h (process_info_private): New member arch_private.
7322 (lwp_info): New member arch_private.
7323 (linux_target_ops): New members new_process, new_thread,
7325 (ptid_of): New macro.
7326 * linux-x86-low.c: Include stddef.h, i386-low.h.
7327 (arch_process_info): New struct.
7328 (arch_lwp_info): New struct.
7329 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7330 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7331 (i386_dr_low_get_status): New function.
7332 (x86_insert_point, x86_remove_point): New functions.
7333 (x86_stopped_by_watchpoint): New function.
7334 (x86_stopped_data_address): New function.
7335 (x86_linux_new_process, x86_linux_new_thread): New functions.
7336 (x86_linux_prepare_to_resume): New function.
7337 (the_low_target): Add entries for insert_point, remove_point,
7338 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7340 * server.c (debug_hw_points): New global.
7341 (monitor_show_help): Document set debug-hw-points.
7342 (handle_query): Process "set debug-hw-points".
7343 * server.h (debug_hw_points): Declare.
7344 (paddress): Declare.
7345 * utils.c (NUMCELLS, CELLSIZE): New macros.
7346 (get_sell, xsnprintf, paddress): New functions.
7347 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7348 remove_point, stopped_by_watchpoint, stopped_data_address.
7349 * win32-i386-low.c: Include i386-low.h.
7350 (debug_reg_state): Replaces dr.
7351 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7352 (i386_dr_low_get_status): New function.
7353 (i386_insert_point, i386_remove_point): New functions.
7354 (i386_stopped_by_watchpoint): New function.
7355 (i386_stopped_data_address): New function.
7356 (i386_initial_stuff): Update.
7357 (get_thread_context,set_thread_context,i386_thread_added): Update.
7358 (the_low_target): Add entries for insert_point,
7359 remove_point, stopped_by_watchpoint, stopped_data_address.
7360 * win32-low.c (win32_insert_watchpoint): New function.
7361 (win32_remove_watchpoint): New function.
7362 (win32_stopped_by_watchpoint): New function.
7363 (win32_stopped_data_address): New function.
7364 (win32_target_ops): Add entries for insert_watchpoint,
7365 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7366 * win32-low.h (win32_target_ops): New members insert_point,
7367 remove_point, stopped_by_watchpoint, stopped_data_address.
7369 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7371 * server.c (process_serial_event): Re-return unsupported, not
7372 error, if the type isn't recognized. Re-allow supporting only
7373 insert or remove packets. Also call require_running for
7374 breakpoints. Add missing break statement to default case. Tidy.
7375 * target.h (struct target_ops): Rename insert_watchpoint to
7376 insert_point, and remove_watchpoint to remove_point.
7378 * linux-low.h (struct linux_target_ops): Likewise.
7379 * linux-low.c (linux_insert_watchpoint): Rename to ...
7380 (linux_insert_point): ... this. Adjust.
7381 (linux_remove_watchpoint): Rename to ...
7382 (linux_remove_point): ... this. Adjust.
7383 (linux_target_ops): Adjust.
7384 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7385 (cris_insert_point): ... this.
7386 (cris_remove_watchpoint): Rename to ...
7387 (cris_remove_point): ... this.
7388 (the_low_target): Adjust.
7390 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7392 * server.c (handle_v_kill): Pass signal_pid to
7393 kill_inferior if multi_process is zero.
7395 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7397 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7398 * target.h (target_ops): Comment for *_watchpoint to make it clear
7399 the functions can get types '0' and '1'.
7401 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7403 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7404 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7405 * regcache.c (get_regcache): Likewise.
7406 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7407 * win32-low.c (child_fetch_inferior_registers): Remove check for
7410 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7411 Pedro Alves <pedro@codesourcery.com>
7413 * target.h (struct target_ops) <supports_multi_process>: New
7415 (target_supports_multi_process): New.
7416 * server.c (handle_query): Even if GDB reports support, only
7417 enable multi-process if the target also supports it. Report
7418 multi-process support only if the target backend supports it.
7419 * linux-low.c (linux_supports_multi_process): New function.
7420 (linux_target_ops): Install it as target_supports_multi_process
7423 2009-05-24 Doug Evans <dje@google.com>
7425 Global renaming of find_thread_pid to find_thread_ptid.
7426 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7427 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7428 All callers updated.
7430 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7431 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7434 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7435 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7436 (linux_resume_one_lwp): Ditto.
7438 2009-05-23 Doug Evans <dje@google.com>
7440 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7441 from struct inferior_list_entry * to struct lwp_info *.
7442 All callers updated.
7444 2009-05-13 Doug Evans <dje@google.com>
7446 * linux-x86-low.c: Don't include assert.h.
7447 (x86_siginfo_fixup): Use fatal, not assert.
7448 (x86_arch_setup): Fix comment.
7450 2009-05-12 Doug Evans <dje@google.com>
7452 Biarch support for i386/amd64 gdbserver.
7453 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7454 Add linux-x86-low.c.
7455 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7456 (linux-x86-low.o): Add.
7457 * linux-x86-64-low.c: Delete.
7458 * linux-i386-low.c: Delete.
7459 * linux-x86-low.c: New file.
7460 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7462 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7464 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7465 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7466 (linux_child_pid_to_exec_file): New function.
7467 (elf_64_header_p, elf_64_file_p): New functions.
7468 (siginfo_fixup): New function.
7469 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7470 give target a chance to convert layout.
7471 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7472 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7474 2009-05-07 Doug Evans <dje@google.com>
7476 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7477 (regsets_store_inferior_registers): Ditto.
7479 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7483 * linux-low.c (must_set_ptrace_flags): Delete.
7484 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7486 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7487 `lwp->must_set_ptrace_flags' instead.
7488 (linux_wait_for_event_1): Set ptrace options here.
7489 (linux_wait_1): ... not here.
7491 2009-04-30 Doug Evans <dje@google.com>
7493 * inferiors.c (started_inferior_callback): New function.
7494 (attached_inferior_callback): New function.
7495 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7496 * server.c (print_started_pid, print_attached_pid): New functions.
7497 (detach_or_kill_for_exit): New function.
7498 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7499 * server.h (have_started_inferiors_p): Declare.
7500 (have_attached_inferiors_p): Declare.
7502 * inferiors.c (remove_process): Fix memory leak, free process.
7503 * linux-low.c (linux_remove_process): New function.
7504 (linux_kill): Call it instead of remove_process.
7505 (linux_detach, linux_wait_1): Ditto.
7507 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7509 * configure.srv: Add x86 Windows CE target.
7511 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7513 * inferiors.c (get_thread_process): Make global.
7514 * server.h (get_thread_process): Add prototype.
7515 * thread-db.c (find_one_thread): Use get_thread_process
7516 instead of current_process.
7517 (thread_db_get_tls_address): Do not crash if called when
7518 thread layer is not yet initialized.
7520 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7522 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7523 * spu-low.c (current_tid): Rename to ...
7524 (current_ptid): ... this.
7525 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7526 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7527 ptid_get_lwp (current_ptid) instead of current_tid.
7528 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7529 instead of current_tid. Use find_process_pid to verify pid
7530 argument is valid. Pass proper argument to remove_process.
7531 (spu_thread_alive): Compare current_ptid instead of current_tid.
7532 (spu_resume): Likewise.
7534 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7536 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7539 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7541 Implement the multiprocess extensions, and add linux multiprocess
7544 * server.h (ULONGEST): Declare.
7545 (struct ptid, ptid_t): New.
7546 (minus_one_ptid, null_ptid): Declare.
7547 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7548 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7549 (struct inferior_list_entry): Change `id' type from unsigned from
7551 (struct sym_cache, struct breakpoint, struct
7552 process_info_private): Forward declare.
7553 (struct process_info): Declare.
7554 (current_process): Declare.
7555 (all_processes): Declare.
7556 (initialize_inferiors): Declare.
7557 (add_thread): Adjust to use ptid_t.
7558 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7559 (add_process, remove_process, find_thread_pid): Declare.
7560 (find_inferior_id): Adjust to use ptid_t.
7561 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7562 (multi_process): Declare.
7563 (push_event): Adjust to use ptid_t.
7564 (read_ptid, write_ptid): Declare.
7565 (prepare_resume_reply): Adjust to use ptid_t.
7566 (clear_symbol_cache): Declare.
7567 * inferiors.c (all_processes): New.
7568 (null_ptid, minus_one_ptid): New.
7569 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7570 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7571 (add_thread): Change unsigned long to ptid. Remove gdb_id
7573 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7574 (gdb_id_to_thread): Rename to ...
7575 (find_thread_pid): ... this. Change unsigned long to ptid.
7576 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7577 (loaded_dll, pull_pid_from_list): Adjust.
7578 (add_process, remove_process, find_process_pid)
7579 (get_thread_process, current_process, initialize_inferiors): New.
7580 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7581 (struct target_waitstatus) <related_pid>: Ditto.
7582 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7584 (struct target_ops) <join>: Add `pid' argument.
7585 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7586 (struct target_ops) <wait>: Add `ptid' field. Change return type
7588 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7589 (mywait): Add `ptid' argument. Change return type to ptid_t.
7590 (target_pid_to_str): Declare.
7591 * target.c (set_desired_inferior): Adjust to use ptids.
7592 (mywait): Add new `ptid' argument. Adjust.
7593 (target_pid_to_str): New.
7594 * mem-break.h (free_all_breakpoints): Declare.
7595 * mem-break.c (breakpoints): Delelete.
7596 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7597 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7598 to use per-process breakpoint list.
7599 (free_all_breakpoints): New.
7600 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7601 (symbol_cache, all_symbols_looked_up): Delete.
7603 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7605 (prepare_resume_reply): Change ptid argument's type from unsigned
7606 long to ptid_t. Adjust. Implement W;process and X;process.
7607 (free_sym_cache, clear_symbol_cache): New.
7608 (look_up_one_symbol): Adjust to per-process symbol cache. *
7609 * server.c (cont_thread, general_thread, step_thread): Change type
7612 (multi_process): New.
7613 (last_ptid): Change type to ptid_t.
7614 (struct vstop_notif) <ptid>: Change type to ptid_t.
7615 (queue_stop_reply, push_event): Change `ptid' argument's type to
7617 (discard_queued_stop_replies): Add `pid' argument.
7618 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7619 changes. Don't reference the `attached' global.
7620 (attach_inferior): Adjust to mywait interface changes.
7621 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7622 features. Handle and report "multiprocess+". Handle
7624 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7626 (handle_v_kill): New.
7627 (handle_v_stopped): Adjust to use target_pid_to_str.
7628 (handle_v_requests): Allow multiple attaches and runs when
7629 multiprocess extensions are in effect. Handle "vKill".
7630 (myresume): Adjust to use ptids.
7631 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7632 (handle_status): Adjust to discard_queued_stop_replies interface
7634 (first_thread_of, kill_inferior_callback)
7635 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7636 (main): Call initialize_inferiors. Adjust to use ptids, killing
7637 and detaching from all inferiors. Handle multiprocess packet
7639 * linux-low.h: Include gdb_proc_service.h.
7640 (struct process_info_private): New.
7641 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7642 <lwpid_of>: Use ptid_get_lwp.
7643 (get_lwp_thread): Adjust.
7644 (struct lwp_info): Add `dead' member.
7645 (find_lwp_pid): Declare.
7646 * linux-low.c (thread_db_active): Delete.
7647 (new_inferior): Adjust comment.
7648 (inferior_pid): Delete.
7649 (linux_add_process): New.
7650 (handle_extended_wait): Adjust.
7651 (add_lwp): Change unsigned long to ptid.
7652 (linux_create_inferior): Add process to processes table. Adjust
7653 to use ptids. Don't set new_inferior here.
7654 (linux_attach_lwp): Rename to ...
7655 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7656 it. Adjust to use ptids.
7657 (linux_attach_lwp): New.
7658 (linux_attach): Add process to processes table. Don't set
7660 (struct counter): New.
7661 (second_thread_of_pid_p, last_thread_of_process_p): New.
7662 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7664 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7665 processes. Remove process from process table.
7666 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7667 to multiple processes.
7668 (any_thread_of): New.
7669 (linux_detach): Add `pid' argument, and handle it. Remove process
7670 from processes table.
7671 (linux_join): Add `pid' argument. Handle it.
7672 (linux_thread_alive): Change unsighed long argument to ptid_t.
7673 Consider dead lwps as not being alive.
7674 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7675 threads we're not interested in.
7676 (same_lwp, find_lwp_pid): New.
7677 (linux_wait_for_lwp): Change `pid' argument's type from int to
7679 (linux_wait_for_event): Rename to ...
7680 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7681 from int to ptid_t. Adjust.
7682 (linux_wait_for_event): New.
7683 (linux_wait_1): Add `ptid' argument. Change return type to
7684 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7685 that exit from the process table.
7686 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7688 (mark_lwp_dead): New.
7689 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7690 stopping all threads, mark its main lwp as dead.
7691 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7693 (fetch_register, usr_store_inferior_registers)
7694 (regsets_fetch_inferior_registers)
7695 (regsets_store_inferior_registers, linux_read_memory)
7696 (linux_write_memory): Inline `inferior_pid'.
7697 (linux_look_up_symbols): Adjust to use per-process
7699 (linux_request_interrupt): Adjust to use ptids.
7700 (linux_read_auxv): Inline `inferior_pid'.
7701 (initialize_low): Don't reference thread_db_active.
7702 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7703 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7704 (ps_getpid): Return the pid of the current inferior.
7705 * thread-db.c (proc_handle, thread_agent): Delete.
7706 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7708 (find_one_thread): Change argument type to ptid_t. Adjust to
7710 (maybe_attach_thread): Adjust to per-process data and ptids.
7711 (thread_db_find_new_threads): Ditto.
7712 (thread_db_init): Ditto.
7713 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7714 processes table. Adjust to use ptids.
7715 (spu_kill, spu_detach): Adjust interface. Remove process from
7717 (spu_join, spu_thread_alive): Adjust interface.
7718 (spu_wait): Adjust interface. Remove process from processes
7719 table. Adjust to use ptids.
7720 * win32-low.c (current_inferior_tid): Delete.
7721 (current_inferior_ptid): New.
7722 (debug_event_ptid): New.
7723 (thread_rec): Take a ptid. Adjust.
7724 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7725 (child_delete_thread): Ditto.
7726 (do_initial_child_stuff): Add `attached' argument. Add process to
7728 (child_fetch_inferior_registers, child_store_inferior_registers):
7730 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7731 (win32_attach): Pass 1 to do_initial_child_stuff.
7732 (win32_kill): Adjust interface. Remove process from processes
7734 (win32_detach): Ditto.
7735 (win32_join): Adjust interface.
7736 (win32_thread_alive): Take a ptid.
7737 (win32_resume): Adjust to use ptids.
7738 (get_child_debug_event): Ditto.
7739 (win32_wait): Adjust interface. Remove exiting process from
7742 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7744 Non-stop mode support.
7746 * server.h (non_stop): Declare.
7747 (gdb_client_data, handler_func): Declare.
7748 (delete_file_handler, add_file_handler, start_event_loop):
7750 (handle_serial_event, handle_target_event, push_event)
7751 (putpkt_notif): Declare.
7752 * target.h (enum resume_kind): New.
7753 (struct thread_resume): Replace `step' field by `kind' field.
7754 (TARGET_WNOHANG): Define.
7755 (struct target_ops) <wait>: Add `options' argument.
7756 <supports_non_stop, async, start_non_stop>: New fields.
7757 (target_supports_non_stop, target_async): New.
7758 (start_non_stop): Declare.
7759 (mywait): Add `options' argument.
7760 * target.c (mywait): Add `options' argument. Print child exit
7762 (start_non_stop): New.
7763 * server.c (non_stop, own_buf, mem_buf): New globals.
7764 (struct vstop_notif): New.
7765 (notif_queue): New global.
7766 (queue_stop_reply, push_event, discard_queued_stop_replies)
7767 (send_next_stop_reply): New.
7768 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7770 (attach_inferior): In non-stop mode, don't wait for the target
7772 (handle_general_set): Handle QNonStop.
7773 (handle_query): When handling qC, return the current general
7774 thread, instead of the first thread of the list.
7775 (handle_query): If the backend supports non-stop mode, include
7776 QNonStop+ in the qSupported query response.
7777 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7779 (handle_v_attach, handle_v_run): Handle non-stop mode.
7780 (handle_v_stopped): New.
7781 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7782 (myresume): Adjust to use resume_kind. Handle non-stop.
7783 (queue_stop_reply_callback): New.
7784 (handle_status): Handle non-stop mode.
7785 (main): Clear non_stop flag on reconnection. Use the event-loop.
7786 Refactor serial protocol handling from here ...
7787 (process_serial_event): ... to this new function. When GDB
7788 selects any thread, select one here. In non-stop mode, wait until
7789 GDB acks all pending events before exiting.
7790 (handle_serial_event, handle_target_event): New.
7791 * remote-utils.c (remote_open): Install remote_desc in the event
7793 (remote_close): Remove remote_desc from the event loop.
7794 (putpkt_binary): Rename to...
7795 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7796 (putpkt_binary): New as wrapper around putpkt_binary_1.
7797 (putpkt_notif): New.
7798 (prepare_resume_reply): In non-stop mode, don't change the
7800 * event-loop.c: New.
7801 * Makefile.in (OBJ): Add event-loop.o.
7802 (event-loop.o): New rule.
7804 * linux-low.h (pid_of): Moved here.
7806 (get_lwp_thread): Use lwpid_of.
7807 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7808 * linux-low.c (pid_of): Delete.
7809 (inferior_pid): Use lwpid_of.
7810 (linux_event_pipe): New.
7811 (target_is_async_p): New.
7813 (handle_extended_wait): Use lwpid_of.
7814 (add_lwp): Don't set lwpid field.
7815 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
7816 (linux_kill_one_lwp): If killing a running lwp, stop it first.
7817 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
7818 (linux_detach_one_lwp): If detaching from a running lwp, stop it
7819 first. Adjust to linux_wait_for_event interface changes. Use
7821 (linux_detach): Don't delete the main lwp here.
7822 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
7823 (status_pending_p): Don't consider explicitly suspended lwps.
7824 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7825 pointer. Add OPTIONS argument. Change return type to int. Use
7826 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
7827 (linux_wait_for_event): Take an integer pid instead of a lwp_info
7828 pointer. Add status pointer argument. Return a pid instead of a
7829 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
7830 changes. In non-stop mode, don't switch to a random thread.
7831 (linux_wait): Rename to...
7832 (linux_wait_1): ... this. Add target_options argument, and handle
7833 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
7834 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
7835 clean exit and signal exit code. Don't stop all threads in
7836 non-stop mode. In all-stop mode, only stop all threads when
7837 reporting a stop to GDB. Handle explicit thread stop requests.
7838 (async_file_flush, async_file_mark): New.
7840 (send_sigstop): Use lwpid_of.
7841 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
7842 interface changes. In non-stop mode, don't switch to a random
7844 (linux_resume_one_lwp): Use lwpid_of.
7845 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7846 (linux_resume_one_thread): ... this. Handle resume_stop. In
7847 non-stop mode, don't look for pending flag in all threads.
7848 (resume_status_pending_p): Don't consider explicitly suspended
7850 (my_waitpid): Reimplement. Emulate __WALL.
7851 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7853 (sigchld_handler, linux_supports_non_stop, linux_async)
7854 (linux_start_non_stop): New.
7855 (linux_target_ops): Register linux_supports_non_stop, linux_async
7856 and linux_start_non_stop.
7857 (initialize_low): Install SIGCHLD handler.
7858 * thread-db.c (thread_db_create_event, find_one_thread)
7859 (thread_db_get_tls_address): Use lwpid_of.
7860 * win32-low.c (win32_detach): Adjust to use resume_kind.
7861 (win32_wait): Add `options' argument.
7862 * spu-low.c (spu_resume): Adjust to use resume_kind.
7863 (spu_wait): Add `options' argument.
7865 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7867 Decouple target code from remote protocol.
7869 * target.h (enum target_waitkind): New.
7870 (struct target_waitstatus): New.
7871 (struct target_ops) <wait>: Return an unsigned long. Take a
7872 target_waitstatus pointer instead of a char pointer.
7874 * target.c (mywait): Change prototype to return an unsigned long.
7875 Take a target_waitstatus pointer instead of a char pointer. Adjust.
7876 * server.h (thread_from_wait, old_thread_from_wait): Delete
7878 (prepare_resume_reply): Change prototype to take a
7880 * server.c (thread_from_wait, old_thread_from_wait): Delete.
7881 (last_status, last_ptid): New.
7882 (start_inferior): Remove "statusptr" argument. Adjust. Return a
7883 pid instead of a signal.
7884 (attach_inferior): Remove "status" and "signal" parameters.
7886 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7888 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7889 (handle_v_requests, myresume): Remove "status" and "signal"
7891 (handle_status): New.
7892 (main): Delete local `status'. Adjust.
7893 * remote-utils.c: Include target.h.
7894 (prepare_resume_reply): Change prototype to take a
7895 target_waitstatus. Adjust.
7897 * linux-low.c (linux_wait): Adjust to new target_ops->wait
7899 * spu-low.c (spu_wait): Adjust.
7900 * win32-low.c (enum target_waitkind, struct target_waitstatus):
7902 (win32_wait): Adjust.
7904 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7906 * target.h (struct thread_resume): Delete leave_stopped member.
7907 (struct target_ops): Add a `n' argument to the `resume' callback.
7908 * server.c (start_inferior): Adjust.
7909 (handle_v_cont, myresume): Adjust.
7910 * linux-low.c (check_removed_breakpoint): Adjust to resume
7911 interface change, and to removed leave_stopped field.
7912 (resume_ptr): Delete.
7913 (struct thread_resume_array): New.
7914 (linux_set_resume_request): Add new `arg' parameter. Adjust to
7915 resume interface change.
7916 (linux_continue_one_thread, linux_queue_one_thread)
7917 (resume_status_pending_p): Check if the resume field is NULL
7918 instead of checking the leave_stopped member.
7919 (linux_resume): Adjust to the target resume interface change.
7920 * spu-low.c (spu_resume): Adjust to the target resume interface
7922 * win32-low.c (win32_detach, win32_resume): Ditto.
7924 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7926 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7928 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7930 (linux_continue_one_thread): Only preserve the stepping flag if
7931 there's a pending breakpoint.
7933 2009-03-31 Pedro Alves <pedro@codesourcery.com>
7935 * server.c (main): After the inferior having exited, call
7936 remote_close before exiting gdbserver.
7938 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
7940 Fix size of FPSCR in Power 7 processors.
7941 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7942 (PPC_FEATURE_HAS_DFP): New #define.
7943 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7946 2009-03-23 Pedro Alves <pedro@codesourcery.com>
7948 * server.c (handle_query) Whitespace and formatting.
7950 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7952 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7953 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7954 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7955 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7956 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7957 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7958 Makefile.in, configure.ac: Fix whitespace throughout.
7959 * configure: Regenerate.
7961 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7963 * inferiors.c (find_inferior): Make it safe for the callback
7964 function to delete the currently iterated inferior.
7966 2009-03-22 Pedro Alves <pedro@codesourcery.com>
7968 * Makefile.in (linuw_low_h): Move higher.
7969 (thread-db.o): Depend on $(linux_low_h).
7971 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7973 Rename "process" to "lwp" throughout.
7975 * linux-low.c (all_processes): Rename to...
7976 (all_lwps): ... this.
7977 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7978 (add_process): Rename to ...
7979 (add_lwp): ... this. Adjust.
7980 (linux_create_inferior): Adjust.
7981 (linux_attach_lwp): Adjust.
7982 (linux_attach): Adjust.
7983 (linux_kill_one_process): Rename to ...
7984 (linux_kill_one_lwp): ... this. Adjust.
7985 (linux_kill): Adjust.
7986 (linux_detach_one_process): Rename to ...
7987 (linux_detach_one_lwp): ... this. Adjust.
7988 (linux_detach): Adjust.
7989 (check_removed_breakpoint): Adjust.
7990 (status_pending_p): Adjust.
7991 (linux_wait_for_process): Rename to ...
7992 (linux_wait_for_lwp): ... this. Adjust.
7993 (linux_wait_for_event): Adjust.
7994 (send_sigstop): Adjust.
7995 (wait_for_sigstop): Adjust.
7996 (stop_all_processes): Rename to ...
7997 (stop_all_lwps): ... this.
7998 (linux_resume_one_process): Rename to ...
7999 (linux_resume_one_lwp): ... this. Adjust.
8000 (linux_set_resume_request, linux_continue_one_thread)
8001 (linux_queue_one_thread, resume_status_pending_p)
8002 (usr_store_inferior_registers, regsets_store_inferior_registers)
8003 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8005 * linux-low.h (get_process): Rename to ...
8006 (get_lwp): ... this. Adjust.
8007 (get_thread_process): Rename to ...
8008 (get_thread_lwp): ... this. Adjust.
8009 (get_process_thread): Rename to ...
8010 (get_lwp_thread): ... this. Adjust.
8011 (struct process_info): Rename to ...
8012 (struct lwp_info): ... this.
8013 (all_processes): Rename to ...
8014 (all_lwps): ... this.
8015 * proc-service.c (ps_lgetregs): Adjust.
8016 * thread-db.c (thread_db_create_event, find_one_thread)
8017 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8019 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8021 * server.c (handle_query): Handle "qAttached".
8023 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8025 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8026 GPLv3, update license URL.
8028 2009-03-01 Doug Evans <dje@google.com>
8030 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8031 (server_h): Add gdb_signals.h.
8032 (signals.o): Update.
8033 * server.h (target_signal_from_host,target_signal_to_host_p)
8034 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8036 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8038 * remote-utils.c (getpkt): Also generate remote-debug
8039 information if noack_mode is set.
8041 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8043 * server.c (handle_query): Report qXfer:siginfo:read and
8044 qXfer:siginfo:write as supported and handle them.
8045 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8046 * linux-low.c (linux_xfer_siginfo): New.
8047 (linux_target_ops): Set it.
8049 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8051 * server.c (gdbserver_usage): Mention --remote-debug.
8052 (main): Accept '--remote-debug' switch.
8054 2009-01-18 Doug Evans <dje@google.com>
8056 * regcache.c (new_register_cache): No need to check result of xcalloc.
8057 * server.c (handle_search_memory): Back out calls to xmalloc,
8058 result is checked and error is returned to user upon failure.
8059 (handle_query): Ditto. Add more checks for result of malloc.
8060 (handle_v_cont): Check result of malloc, report error back to
8062 (handle_v_run): Ditto. Call freeargv.
8063 * server.h (freeargv): Declare.
8064 * utils.c (freeargv): New fn.
8066 2009-01-15 Doug Evans <dje@google.com>
8068 * gdbreplay.c (perror_with_name): Make arg const char *.
8069 * server.h (target_signal_to_name): Make return type const char *.
8070 * thread-db.c (thread_db_err_str): Make return type const char *.
8071 * utils.c (perror_with_name): Make arg const char *.
8073 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8075 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8076 when handling a EXIT_PROCESS_DEBUG_EVENT.
8078 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8080 * gdbreplay.c (gdbreplay_version): Update copyright year.
8081 * server.c (gdbserver_version): Likewise.
8083 2009-01-05 Doug Evans <dje@google.com>
8085 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8086 (handle_extended_wait): Improve comment.
8088 2008-12-13 Doug Evans <dje@google.com>
8090 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8091 * server.h (ATTR_MALLOC): New macro.
8092 (xmalloc,xcalloc,xstrdup): Declare.
8093 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8094 * inferiors.c: Ditto.
8095 * linux-low.c: Ditto.
8096 * mem-break.c: Ditto.
8097 * regcache.c: Ditto.
8098 * remote-utils.c: Ditto.
8101 * win32-low.c: Ditto.
8103 2008-12-12 Doug Evans <dje@google.com>
8105 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8106 in debugging printf.
8108 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8110 2008-12-09 Doug Evans <dje@google.com>
8112 * linux-low.h (struct process_info): Delete member tid, unused.
8113 * thread-db.c (find_one_thread): Update.
8114 (maybe_attach_thread): Update.
8116 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8118 * target.h (struct target_ops): Add qxfer_osdata member.
8119 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8121 (linux_qxfer_osdata): New functions.
8122 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8124 * server.c (handle_query): Handle "qXfer:osdata:read:".
8125 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8126 (buffer_xml_printf): New functions.
8127 * server.h (struct buffer): New.
8128 (buffer_grow_str, buffer_grow_str0): New macros.
8129 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8130 (buffer_xml_printf): Declare.
8132 2008-11-24 Doug Evans <dje@google.com>
8134 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8136 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8138 * server.c (handle_v_run): Always use the supplied argument list.
8140 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8142 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8143 (xtensa_regmap_table): Add entry for scompare1.
8145 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8147 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8148 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8149 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8150 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8151 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8152 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8153 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8154 XML target descriptions.
8155 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8156 when inferior is running on an ISA 2.05 or later processor. Add
8157 special case to return offset for full 64-bit slot of FPSCR when
8160 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8162 * Makefile.in (SFILES, clean): Added sparc64 files.
8163 (reg-sparc64.o, reg-sparc64.c): New.
8164 * configure.srv (sparc*-*-linux*): New configuration.
8165 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8166 syscall arguments for SPARC.
8167 (regsets_store_inferior_registers): Likewise.
8168 * linux-sparc-low.c: New file.
8170 2008-10-21 Doug Evans <dje@google.com>
8172 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8173 (READLINE_DIR,READLINE_DEP): Delete.
8174 (INTERNAL_CFLAGS): Update.
8175 (LINTFLAGS): Update.
8177 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8179 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8180 whole argv from the last run, not just argv[0].
8182 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8184 * regcache.c (new_register_cache): Return NULL if the register
8185 cache size isn't known yet.
8186 (free_register_cache): Avoid dereferencing a NULL regcache.
8188 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8190 * configure.srv: Merge MIPS and MIPS64.
8192 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8194 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8196 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8198 * Makefile.in: Add required vsx dependencies.
8200 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8201 Declare init_registers_powerpc_vsx32l.
8202 Declare init_registers_powerpc_vsx64l.
8203 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8204 (ppc_arch_setup): Check for VSX in hwcap.
8205 (ppc_fill_vsxregset): New function.
8206 (ppc_store_vsxregset): New function.
8207 Add new VSX entry in regset_info target_regsets.
8209 * configure.srv: Add new VSX dependencies.
8211 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8213 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8214 (remote_open): Set or clear transport_is_reliable.
8215 (putpkt_binary): Don't expect acks in noack mode.
8216 (getpkt): Don't send ack/nac in noack mode.
8217 * server.c (handle_general_set): Handle QStartNoAckMode.
8218 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8220 (main): Reset noack_mode on every connection.
8221 * server.h (noack_mode): Declare.
8223 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8225 * Makefile.in (GDBREPLAY_OBS): New variable.
8226 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8228 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8229 Daniel Jacobowitz <dan@codesourcery.com>
8231 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8232 (usr_store_inferior_registers): Likewise.
8233 (regsets_store_inferior_registers): Likewise.
8235 2008-07-31 Rolf Jansen <rj@surtec.com>
8236 Pedro Alves <pedro@codesourcery.com>
8238 * configure.ac: Check for memmem declaration.
8239 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8240 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8241 (disable_packet_qfThreadInfo): Unconditionally compile.
8242 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8243 * configure, config.in: Regenerate.
8245 2008-07-28 Doug Kwan <dougkwan@google.com>
8247 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8248 (linux_write_memory): Remove declaration of errno.
8250 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8252 * linux-low.c (handle_extended_wait): Do not use "status"
8253 variable uninitialized.
8255 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8257 * server.c (handle_v_attach): Inhibit reporting dll changes.
8259 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8261 * remote-utils.c (prepare_resume_reply): If requested, don't
8262 output "thread:TID" in the T stop reply.
8264 * server.c (disable_packet_vCont, disable_packet_Tthread)
8265 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8266 (handle_query): If requested, disable support for qC, qfThreadInfo
8268 (handle_v_requests): If requested, disable support for vCont.
8269 (gdbserver_show_disableable): New.
8270 (main): Handle --disable-packet and --disable-packet=LIST.
8272 * server.h (disable_packet_vCont, disable_packet_Tthread)
8273 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8275 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8277 * server.c (gdbserver_usage): Mention --version.
8279 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8281 * Makefile.in (gdbreplay.o): New rule.
8283 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8285 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8286 message, not gdbserver.
8288 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8289 Nathan Sidwell <nathan@codesourcery.com>
8290 Joseph Myers <joseph@codesourcery.com>
8292 * acinclude.m4: Include ../../config/acx.m4.
8293 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8294 * configure, config.in: Regenerate.
8295 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8296 * server.c (gdbserver_version): Print PKGVERSION.
8297 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8298 (main): Adjust gdbserver_usage calls.
8299 * gdbreplay.c (version, host_name): Add declarations.
8300 (gdbreplay_version, gdbreplay_usage): New.
8301 (main): Accept --version and --help options.
8303 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8305 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8306 (arm_breakpoint_at): Handle Thumb.
8307 (the_low_target): Add comment.
8309 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8311 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8313 2008-05-09 Doug Evans <dje@google.com>
8315 * server.h (decode_search_memory_packet): Declare.
8316 * remote-utils.c (decode_search_memory_packet): New fn.
8317 * server.c (handle_search_memory_1): New fn.
8318 (handle_search_memory): New fn.
8319 (handle_query): Process qSearch:memory packets.
8321 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8323 * regcache.c (registers_length): Remove.
8324 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8325 full register packet.
8326 * regcache.h (registers_length): Remove prototype.
8327 * server.h (PBUFSIZ): Define to 16384.
8329 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8331 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8332 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8333 powerpc-64l.o, and powerpc-altivec64l.o.
8334 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8335 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8336 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8337 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8338 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8341 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8342 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8343 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8344 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8345 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8346 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8347 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8348 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8349 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8350 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8353 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8354 (init_registers_powerpc_32l): ... this new prototype.
8355 (init_registers_powerpc_32): Remove, replace by ...
8356 (init_registers_powerpc_altivec32l): ... this new prototype.
8357 (init_registers_powerpc_e500): Remove, replace by ...
8358 (init_registers_powerpc_e500l): ... this new prototype.
8359 (init_registers_ppc64): Remove, replace by ...
8360 (init_registers_powerpc_64l): ... this new prototype.
8361 (init_registers_powerpc_64): Remove, replace by ...
8362 (init_registers_powerpc_altivec64l): ... this new prototype.
8363 (ppc_num_regs): Set to 73.
8364 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8365 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8366 (ppc_cannot_store_register): Handle orig_r3 and trap.
8367 (ppc_arch_setup): Update init_registers_... calls.
8368 (ppc_fill_gregset): Handle orig_r3 and trap.
8370 * inferiors.c (clear_inferiors): Reset current_inferior.
8372 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8374 * acinclude.m4: Add override.m4.
8375 * configure: Regenerate.
8377 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8379 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8380 initial call to init_register_ppc64.
8382 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8384 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8385 single powerpc*-*-linux* case.
8386 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8388 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8390 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8391 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8393 * linux-ppc-low.c: Include <elf.h>.
8394 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8395 (ppc_hwcap): New global variable.
8396 (ppc_regmap): Remove __SPE__ #ifdef sections.
8397 (ppc_regmap_e500): New global variable.
8398 (ppc_cannot_store_register): Update __SPE__ special case.
8399 (ppc_get_hwcap): New function.
8400 (ppc_arch_setup): Use it to determine whether inferior supports
8401 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8402 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8403 Do not access registers if target does not support AltiVec.
8404 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8405 Do not access registers if target does not support SPE.
8406 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8408 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8410 * linux-low.c (disabled_regsets, num_regsets): New.
8411 (use_regsets_p): Delete.
8412 (linux_wait_for_process): Clear disabled_regsets.
8413 (regsets_fetch_inferior_registers): Check and set it.
8414 (regsets_store_inferior_registers): Likewise.
8415 (linux_fetch_registers, linux_store_registers): Do not use
8417 (initialize_low): Allocate disabled_regsets.
8419 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8421 * Makefile.in (LIBOBJS): New.
8423 (memmem.o): New rule.
8424 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8425 * configure: Regenerated.
8427 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8429 * server.c (handle_query): Never return "unsupported" for
8430 qXfer:features:read queries.
8432 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8434 * server.c (get_features_xml): Fix inverted condition.
8435 (handle_query): Always support qXfer:feature:read.
8437 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8439 * server.c (wrapper_argv): New.
8440 (start_inferior): Handle wrapper_argv. If set, expect an extra
8442 (gdbserver_usage): Document --wrapper.
8443 (main): Parse --wrapper.
8445 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8447 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8448 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8449 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8450 (ppc_set_pc): Likewise.
8451 (ppc_arch_setup): New function.
8452 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8453 of collect_register.
8454 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8456 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8458 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8459 instead of linux-ppc64-low.o.
8460 * linux-ppc64-low.c: Remove file.
8461 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8462 (linux-ppc64-low.o): Remove rule.
8464 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8465 (init_registers_powerpc_64): Likewise.
8466 (ppc_regmap): Conditionally define depending on __powerpc64__.
8467 (ppc_cannot_store_register): Do not special-case "fpscr" when
8468 compiled on __powerpc64__.
8469 (ppc_collect_ptrace_register): New function.
8470 (ppc_supply_ptrace_register): New function.
8471 (ppc_breakpoint): Change type to "unsigned int".
8472 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8473 (the_low_target): Conditionally provide initializers for the
8474 arch_setup member depending on __powerpc64__. Install
8475 collect_ptrace_register and supply_ptrace_register members.
8477 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8479 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8480 * server.c (gdbserver_xmltarget): Define.
8481 (get_features_xml): Use it to replace "target.xml" and arch_string.
8483 * configure.srv: Remove srv_xmltarget. Add XML files that were
8484 mentioned there to srv_xmlfiles instead. Remove conditional tests
8485 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8486 srv_xmlfiles and srv_regobj to include all possible choices.
8487 * configure.ac (srv_xmltarget): Remove.
8488 (srv_xmlfiles): Do not add "target.xml".
8489 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8490 checks for supplementary target information.
8491 * configure: Regenerate.
8492 * Makefile.in (XML_TARGET): Remove.
8493 (target.xml): Remove rule.
8494 (clean): Do not clean up target.xml.
8495 (.PRECIOUS): Do not mention target.xml.
8497 * target.h (struct target_ops): Remove arch_string member.
8498 * linux-low.c (linux_arch_string): Remove.
8499 (linux_target_ops): Remove arch_string initializer.
8500 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8501 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8502 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8503 * spu-low.c (spu_arch_string): Remove.
8504 (spu_target_ops): Remove arch_string initializer.
8505 * win32-low.c (win32_arch_string): Remove.
8506 (win32_target_ops): Remove arch_string initializer.
8507 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8508 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8509 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8511 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8513 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8514 by collect_ptrace_register and supply_ptrace_register hooks.
8515 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8516 instead of checking for the_low_target.left_pad_xfer.
8517 (usr_store_inferior_registers): Use collect_ptrace_register callback
8518 instead of checking for the_low_target.left_pad_xfer.
8520 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8521 (s390_supply_ptrace_register): Likewise.
8522 (s390_fill_gregset): Call s390_collect_ptrace_register.
8523 (the_low_target): Update.
8525 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8526 (ppc_supply_ptrace_register): Likewise.
8527 (the_low_target): Update.
8529 * linux-i386-low.c (the_low_target): Update.
8530 * linux-x86-64-low.c (the_low_target): Update.
8532 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8534 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8535 reg-s390.o and reg-s390x.o.
8537 * linux-low.c (new_inferior): New global variable.
8538 (linux_create_inferior, linux_attach): Set it.
8539 (linux_wait_for_process): Call the_low_target.arch_setup after the
8540 target has stopped for the first time.
8541 (initialize_low): Do not call the_low_target.arch_setup.
8543 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8544 (s390_set_pc): Likewise.
8545 (s390_arch_setup): New function.
8546 (the_low_target): Use s390_arch_setup as arch_setup routine.
8548 * regcache.c (realloc_register_cache): New function.
8549 (set_register_cache): Call it for each existing regcache.
8551 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8553 * server.h (init_registers): Remove prototype.
8555 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8556 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8557 instead of init_registers ().
8558 * linux-arm-low.c (init_registers_arm): Add prototype.
8559 (init_registers_arm_with_iwmmxt): Likewise.
8560 (the_low_target): Add initializer for arch_setup field.
8561 * linux-cris-low.c (init_registers_cris): Add prototype.
8562 (the_low_target): Add initializer for arch_setup field.
8563 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8564 (the_low_target): Add initializer for arch_setup field.
8565 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8566 (the_low_target): Add initializer for arch_setup field.
8567 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8568 (the_low_target): Add initializer for arch_setup field.
8569 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8570 (the_low_target): Add initializer for arch_setup field.
8571 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8572 (the_low_target): Add initializer for arch_setup field.
8573 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8574 (init_registers_mips64_linux): Likewise.
8575 (the_low_target): Add initializer for arch_setup field.
8576 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8577 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8578 (the_low_target): Add initializer for arch_setup field.
8579 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8580 (init_registers_powerpc_64): Likewise.
8581 (the_low_target): Add initializer for arch_setup field.
8582 * linux-s390-low.c (init_registers_s390): Add prototype.
8583 (init_registers_s390x): Likewise.
8584 (the_low_target): Add initializer for arch_setup field.
8585 * linux-sh-low.c (init_registers_sh): Add prototype.
8586 (the_low_target): Add initializer for arch_setup field.
8587 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8588 (the_low_target): Add initializer for arch_setup field.
8589 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8590 (the_low_target): Add initializer for arch_setup field.
8592 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8593 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8594 instead of init_registers ().
8595 * win32-arm-low.c (init_registers_arm): Add prototype.
8596 (the_low_target): Add initializer for arch_setup field.
8597 * win32-i386-low.c (init_registers_i386): Add prototype.
8598 (the_low_target): Add initializer for arch_setup field.
8600 * spu-low.c (init_registers_spu): Add prototype.
8601 (initialize_low): Call initialie_registers_spu () instead of
8602 initialize_registers ().
8604 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8606 * server.c (handle_v_requests): When handling the vRun and vAttach
8607 packets, if already debugging a process, don't kill it. Return an
8610 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8612 * server.c (handle_query): Correct length check.
8614 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8616 * win32-low.c (do_initial_child_stuff): Add process handle
8617 parameter. Set current_process_handle and current_process_id from the
8618 parameters. Clear globals.
8619 (win32_create_inferior): Don't set current_process_handle and
8620 current_process_id here. Instead pass them on the call to
8621 do_initial_child_stuff.
8622 (win32_attach): Likewise.
8623 (win32_clear_inferiors): New.
8624 (win32_kill): Don't close the current process handle or the
8625 current thread handle here. Instead call win32_clear_inferiors.
8626 (win32_detach): Don't open a new handle to the process. Call
8627 win32_clear_inferiors.
8628 (win32_join): Don't rely on current_process_handle; open a new
8629 handle using the process id.
8630 (win32_wait): Call win32_clear_inferiors when the inferior process
8633 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8635 * server.c (monitor_show_help): Add "exit".
8637 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8639 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8640 (clean): Add reg-xtensa.c.
8641 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8642 * configure.srv (xtensa*-*-linux*) New target.
8643 * linux-xtensa-low.c: New.
8644 * xtensa-xtregs.c: New.
8646 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8648 * hostio.c: Don't include errno.h.
8649 (errno_to_fileio_errno): Move to hostio-errno.
8650 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8651 error number outputting to the target->hostio_last_error callback.
8652 (hostio_packet_error): Use FILEIO_EINVAL directly.
8653 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8654 calls to hostio_error.
8655 * hostio-errno.c: New.
8656 * server.h (hostio_last_error_from_errno): Declare.
8657 * target.h (target_ops): Add hostio_last_error member.
8658 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8659 as hostio_last_error handler.
8660 * spu-low.c (spu_target_ops): Likewise.
8661 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8662 (wince_hostio_last_error): New functions.
8663 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8664 as hostio_last_error handler.
8665 (win32_target_ops) [!_WIN32_WCE]: Register
8666 hostio_last_error_from_errno as hostio_last_error handler.
8667 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8668 (hostio-errno.o): New rule.
8669 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8670 * configure.srv (srv_hostio_err_objs): New variable. Default to
8672 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8673 * configure: Regenerate.
8675 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8677 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8678 (linux_kill, linux_detach): Clean up the process list.
8679 * remote-utils.c (remote_open): Improve port number parsing.
8680 (putpkt_binary, input_interrupt): Only send interrupts if the target
8682 * server.c (extended_protocol): Make static.
8683 (attached): Define earlier.
8684 (exit_requested, response_needed, program_argv): New variables.
8685 (target_running): New.
8686 (start_inferior): Clear attached here.
8687 (attach_inferior): Set attached here.
8688 (require_running): Define.
8689 (handle_query): Use require_running and target_running. Implement
8691 (handle_v_attach, handle_v_run): New.
8692 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8693 (gdbserver_usage): Update.
8694 (main): Redo argument parsing. Handle --debug and --multi. Handle
8695 --attach along with other options or after the port. Save
8696 program_argv. Support no initial program. Resynchronize
8697 communication with GDB after an error. Handle "monitor exit".
8698 Use require_running and target_running. Always allow the extended
8699 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8700 restart in extended mode.
8701 * README: Refer to the GDB manual. Update --attach usage.
8703 2007-12-20 Andreas Schwab <schwab@suse.de>
8705 * linux-low.c (STACK_SIZE): Define.
8706 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8707 (linux_test_for_tracefork): Likewise.
8709 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8711 * linux-low.c (linux_wait_for_event): Update messages. Do not
8712 reinsert auto-delete breakpoints.
8713 * mem-break.c (struct breakpoint): Change return type of handler to
8715 (set_breakpoint_at): Update handler type.
8716 (reinsert_breakpoint_handler): Return 1 instead of calling
8718 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8720 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8721 * mem-break.h (set_breakpoint_at): Update handler type.
8722 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8723 * win32-low.c (auto_delete_breakpoint): New.
8724 (get_child_debug_event): Use it.
8726 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8728 * configure.ac: Check for pread and pwrite.
8729 * hostio.c (handle_pread): Fall back to lseek and read.
8730 (handle_pwrite): Fall back to lseek and write.
8731 * config.in, configure: Regenerated.
8733 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8735 * server.c (myresume): Add own_buf argument.
8736 (main): Update calls.
8738 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8740 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8741 * remote-utils.c (remote_open): Do not call disable_async_io.
8742 (block_async_io): Delete.
8743 (unblock_async_io): Make static.
8744 (initialize_async_io): New.
8745 * server.c (handle_v_cont): Handle async I/O here.
8746 (myresume): Likewise. Move other common resume tasks here...
8747 (main): ... from here. Call initialize_async_io. Disable async
8748 I/O before the main loop.
8749 * server.h (initialize_async_io): Declare.
8750 (block_async_io, unblock_async_io): Delete prototypes.
8751 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8753 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8755 * remote-utils.c (readchar): Allow binary data in received messages.
8757 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8759 * win32-low.c (attaching): New global.
8760 (win32_create_inferior): Clear the `attaching' global.
8761 (win32_attach): Set the `attaching' global.
8762 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8763 attaching. Only set a breakpoint at the entry point if not
8766 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8768 * server.c (main): Don't report dll events on the initial
8769 connection on attaches.
8771 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8773 * server.c (main): Relax numerical bases supported for the pid of
8774 the --attach command line argument.
8776 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8778 * win32-low.c (win32_attach): Call OpenProcess before
8779 DebugActiveProcess, not after. Add last error output to error
8782 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8784 * win32-low.c (win32_get_thread_context)
8785 (win32_set_thread_context): New functions.
8786 (thread_rec): Use win32_get_thread_context.
8787 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8788 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8791 2007-12-03 Leo Zayas
8792 Pedro Alves <pedro_alves@portugalmail.pt>
8794 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8796 (child_add_thread): Minor cleanup.
8797 (child_continue): Resume artificially suspended threads before
8798 calling ContinueDebugEvent.
8799 (suspend_one_thread): New.
8800 (fake_breakpoint_event): New.
8801 (get_child_debug_event): Change return type to int. Check here if
8802 gdb sent an interrupt request. If a soft interrupt was requested,
8803 fake a breakpoint event. Return 0 if there is no event to handle,
8805 (win32_wait): Don't check here if gdb sent an interrupt request.
8806 Ensure there is a valid event to handle.
8807 (win32_request_interrupt): Add soft interruption method as last
8810 2007-12-03 Leo Zayas
8811 Pedro Alves <pedro_alves@portugalmail.pt>
8813 * win32-low.h (win32_thread_info): Add descriptions to the
8814 structure members. Replace `suspend_count' counter by a
8816 * win32-low.c (thread_rec): Update condition of when to get the
8817 context from the inferior. Rely on ContextFlags being set if it
8818 has already been retrieved. Only suspend the inferior thread if
8819 we haven't already. Warn if that fails.
8820 (continue_one_thread): s/suspend_count/suspended/. Only call
8821 ResumeThread once. Warn if that fails.
8823 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8825 * win32-low.c (win32_wait): Don't read from the inferior when it
8828 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
8830 * Makefile.in (win32_low_h): New variable.
8831 (win32-low.o): Add dependency on $(win32_low_h).
8832 (win32-arm-low.o, win32-i386-low.o): New rules.
8834 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8836 * hostio.c: Correct copyright year.
8838 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
8840 * Makefile.in (OBS): Add hostio.o.
8841 (hostio.o): New rule.
8842 * server.h (handle_vFile): Declare.
8843 * hostio.c: New file.
8844 * server.c (handle_v_requests): Take packet_len and new_packet_len
8845 for binary packets. Call handle_vFile.
8846 (main): Update call to handle_v_requests.
8848 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
8850 * linux-low.c: Include <sched.h>.
8852 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
8854 * linux-low.c (linux_tracefork_grandchild): New.
8855 (linux_tracefork_child): Use clone.
8856 (linux_test_for_tracefork): Use clone; allocate and free a stack.
8858 2007-10-31 Joel Brobecker <brobecker@adacore.com>
8860 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8862 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
8864 * linux-low.c (handle_extended_wait): Handle unexpected signals.
8866 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
8868 * inferiors.c (change_inferior_id): Delete.
8869 (add_pid_to_list, pull_pid_from_list): New.
8870 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8871 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8872 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8873 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8874 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8875 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8876 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8877 (using_threads): Always set to 1.
8878 (handle_extended_wait): New.
8879 (add_process): Do not set TID.
8880 (linux_create_inferior): Set must_set_ptrace_flags.
8881 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
8882 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
8883 (linux_thread_alive): Rename TID argument to LWPID.
8884 (linux_wait_for_process): Handle unknown processes. Do not use TID.
8885 (linux_wait_for_event): Do not use TID or check using_threads. Update
8886 call to dead_thread_notify. Call handle_extended_wait.
8887 (linux_create_inferior): Use PTRACE_SETOPTIONS.
8888 (send_sigstop): Delete sigstop_sent.
8889 (wait_for_sigstop): Avoid TID.
8890 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8891 (linux_test_for_tracefork): New.
8892 (linux_lookup_signals): Use thread_db_active and
8893 linux_supports_tracefork_flag.
8894 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8895 * linux-low.h (get_process_thread): Avoid TID.
8896 (struct process_ifo): Move thread_known and tid to the end. Remove
8898 (linux_attach_lwp, thread_db_init): Update prototypes.
8899 * server.h (change_inferior_id): Delete prototype.
8900 (add_pid_to_list, pull_pid_from_list): New prototypes.
8901 * thread-db.c (thread_db_use_events): New.
8902 (find_first_thread): Rename to...
8903 (find_one_thread): ...this. Update callers and messages. Do not
8904 call fatal. Check thread_db_use_events. Do not call
8905 change_inferior_id or new_thread_notify.
8906 (maybe_attach_thread): Update. Do not call new_thread_notify.
8907 (thread_db_init): Set thread_db_use_events. Check use_events.
8908 * utils.c (fatal, warning): Correct message prefix.
8910 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
8912 * Makefile.in (clean): Remove new files.
8913 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8914 (powerpc-64.o, powerpc-64.c): New rules.
8915 * configure.srv: Use alternate register sets for powerpc64-*-linux*
8916 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8918 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8920 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8921 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8922 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8923 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8924 (target_regsets): Add AltiVec and SPE register sets.
8925 * configure.ac: Check for AltiVec and SPE.
8926 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8927 (ppc_fill_vrregset, ppc_store_vrregset): New.
8928 (target_regsets): Add AltiVec register set.
8929 * configure: Regenerated.
8931 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
8933 * linux-low.c (O_LARGEFILE): Define.
8934 (linux_read_memory): Use /proc/PID/mem.
8935 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
8936 * configure, config.in: Regenerated.
8938 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8940 * linux-low.c (linux_wait_for_event): Do not pass signals while
8943 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8945 * win32-low.c (create_process): New.
8946 (win32_create_inferior): Use create_process instead of
8947 CreateProcess. If create_process failed retry appending an ".exe"
8948 suffix. Store the GetLastError result immediatelly after
8949 create_process calls and use it on the call to error.
8951 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
8953 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8955 2007-08-23 Joel Brobecker <brobecker@adacore.com>
8957 * configure.ac: Switch license to GPLv3.
8959 2007-08-01 Michael Snyder <msnyder@access-company.com>
8961 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8963 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
8965 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8967 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8968 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
8969 CloseToolhelp32Snapshot.
8970 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8971 CloseToolhelp32Snapshot.
8973 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
8975 * server.c (main): Check for inferior exit before main loop.
8977 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
8979 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8980 instead of on tmp_desc.
8982 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
8983 Daniel Jacobowitz <dan@codesourcery.com>
8985 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8986 (add_thread): Minor cleanups.
8987 (clear_inferiors): Move lower in the file. Clear the DLL
8989 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8990 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8991 (xml_escape_text): New.
8992 * server.c (handle_query): Handle qXfer:libraries:read. Report it
8994 (handle_v_cont): Report errors.
8995 (gdbserver_version): Update.
8996 (main): Correct size of own_buf. Do not report initial DLL events.
8997 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8998 (unloaded_dll, xml_escape_text): New.
8999 * win32-low.c (enum target_waitkind): Update comments.
9000 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9001 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9002 (win32_EnumProcessModules, win32_GetModuleInformation)
9003 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9004 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9005 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9006 (win32_Module32First, win32_Module32Next, load_toolhelp)
9007 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9008 (get_child_debug_event): Handle DLL events.
9009 (win32_wait): Likewise.
9011 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9013 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9014 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9016 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9018 * win32-low.c (handle_output_debug_string): Ignore event if not
9021 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9023 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9025 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9027 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9029 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9031 * inferiors.c (change_inferior_id): Add comment.
9032 * linux-low.c (check_removed_breakpoint): Add an early
9033 prototype. Improve debug output.
9034 (linux_attach): Doc update.
9035 (linux_detach_one_process, linux_detach): Clean up before releasing
9037 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9038 * linux-low.h (struct process_info): Doc improvement.
9039 * mem-break.c (delete_all_breakpoints): New.
9040 * mem-break.h (delete_all_breakpoints): New prototype.
9041 * thread-db.c (find_first_thread): New.
9042 (thread_db_create_event): Call it instead of
9043 thread_db_find_new_threads. Clean up unused variables.
9044 (maybe_attach_thread): Remove first thread handling.
9045 (thread_db_find_new_threads): Use find_first_thread.
9046 (thread_db_get_tls_address): Likewise.
9048 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9050 * thread-db.c (thread_db_find_new_threads): Add prototype.
9051 (thread_db_create_event): Check for the main thread before adding
9053 (maybe_attach_thread): Only enable event reporting if TID == 0.
9054 (thread_db_get_tls_address): Check for new threads.
9056 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9058 * linux-low.c (linux_create_inferior): Try execv before execvp.
9059 * spu-low.c (spu_create_inferior): Likewise.
9061 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9063 * linux-low.c (linux_create_inferior): Change execv to execvp.
9064 * spu-low.c (spu_create_inferior): Likewies.
9066 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9068 * Makefile.in (clean): Clean new files instead of deleted ones.
9069 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9070 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9072 * configure.srv: Specify XML files and new regformats for MIPS and
9074 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9075 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9076 an entry for the restart register.
9077 (mips_cannot_fetch_register, mips_cannot_store_register)
9078 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9079 register names to match the XML descriptions.
9080 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9081 restart register instead of $0.
9083 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9084 Markus Deuling <deuling@de.ibm.com>
9086 * remote-utils.c (decode_xfer_write): New function.
9087 * server.h (decode_xfer_write): Add prototype.
9088 * server.c (handle_query): Add PACKET_LEN argument. Support
9089 qXfer:spu:read and qXfer:spu:write packets.
9090 (main): Pass packet_len to handle_query.
9091 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9092 * target.h (target_ops): Add qxfer_spu.
9094 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9096 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9097 accessing non-seekable spufs files.
9099 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9101 * server.c (handle_query): Add reply for qC packet.
9103 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9104 Leo Zayas <lerele@champenstudios@com>
9106 * server.h (check_remote_input_interrupt_request): New function.
9107 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9108 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9109 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9110 (check_remote_input_interrupt_request): New function.
9111 * server.h (check_remote_input_interrupt_request): Declare.
9112 * win32-low.c (winapi_DebugBreakProcess,
9113 winapi_GenerateConsoleCtrlEvent): New typedefs.
9114 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9116 (win32_wait): Check for remote interrupt request
9117 with check_remote_input_interrupt_request.
9118 (win32_request_interrupt): New function.
9119 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9121 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9123 * win32-low.c (debug_registers_changed,
9124 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9125 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9126 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9127 (thread_rec): Get context using the low target.
9128 (child_add_thread): Call thread_added on the low target,
9129 which does the same thing.
9131 (do_initial_child_stuff): Remove debug registers references.
9132 Set context using the low target. Resume threads after
9133 setting the contexts.
9134 (child_continue): Remove dead variable. Remove debug
9135 registers references.
9136 (child_fetch_inferior_registers): Go through the low target.
9137 (do_child_store_inferior_registers): Remove.
9138 (child_store_inferior_registers): Go through the low target.
9139 (win32_resume): Remove debug registers references.
9140 Set context using the low target.
9141 (handle_exception): Change return type to void. Don't record
9142 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9143 first chance exception.
9144 (get_child_debug_event): Change return type to void. Remove
9145 goto loop. Always return after waiting for debug event.
9146 (win32_wait): Convert to switch statement. Handle spurious
9149 * win32-i386-low.c (debug_registers_changed,
9150 debug_registers_used): New.
9151 (initial_stuff): Rename to ...
9152 (i386_initial_stuff): ... this. Clear debug registers
9154 (store_debug_registers): Delete.
9155 (i386_get_thread_context): New.
9156 (load_debug_registers): Delete.
9157 (i386_set_thread_context): New.
9158 (i386_thread_added): New.
9159 (single_step): Rename to ...
9160 (i386_single_step): ... this.
9161 (do_fetch_inferior_registers): Rename to ...
9162 (i386_fetch_inferior_register): ... this.
9163 (i386_store_inferior_register): New.
9164 (the_low_target): Adapt to new interface.
9166 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9167 (arm_get_thread_context): New.
9168 (arm_set_thread_context): New.
9170 (do_fetch_inferior_registers): Rename to ...
9171 (arm_fetch_inferior_register): ... this.
9172 (arm_store_inferior_register): New.
9173 (arm_wince_breakpoint): Reimplement as unsigned long.
9174 (arm_wince_breakpoint_len): Define.
9175 (the_low_target): Adapt to new interface.
9177 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9178 load_debug_registers. Add get_thread_context, set_thread_context,
9179 thread_added and store_inferior_register. Rename
9180 fetch_inferior_registers to fetch_inferior_register.
9181 (regptr): Remove declaration.
9183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9185 * linux-low.c (linux_detach): Change return type to int. Return 0.
9186 * spu-low.c (spu_detach): Likewise.
9188 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9190 * target.h (target_ops): Change return type of detach to int.
9192 (join_inferior): New.
9193 * server.c (main): Don't skip detach support on mingw32.
9194 If the inferior doesn't support detaching return error.
9195 Call join_inferior instead of using waitpid.
9196 * linux-low.c (linux_join): New.
9197 (linux_target_op): Add linux_join.
9198 * spu-low.c (spu_join): New.
9199 (spu_target_ops): Add spu_join.
9200 * win32-low.c (win32_detach): Adapt to new interface.
9201 Reopen current_process_handle before detaching. Issue a child
9202 resume before detaching.
9204 (win32_target_op): Add win32_join.
9206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9208 * win32-low.c (win32-attach): Fix return value.
9209 * target.h (target_ops): Describe ATTACH return values.
9211 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9213 * win32-low.c (GETPROCADDRESS): Define.
9214 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9215 (winapi_DebugSetProcessKillOnExit): Likewise.
9216 (win32_create_inferior): Force usage of ansi CreateProcessA.
9217 (win32_attach): Use GETPROCADDRESS.
9218 (win32_detach): Likewise.
9220 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9222 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9224 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9226 * win32-low.c: Commit leftover changes from 2007-03-29.
9228 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9230 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9231 fields short instead of int. Add explicit padding.
9232 (i387_cache_to_fsave): Remove unnecessary casts.
9233 (i387_fsave_to_cache): Doc fix.
9234 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9236 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9238 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9239 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9241 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9243 * configure.srv (arm*-*-mingw32ce*): Move near the other
9246 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9248 * configure.ac: Add errno checking.
9249 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9250 sys/file.h and malloc.h.
9251 (AC_CHECK_DECLS): Add perror.
9252 (srv_mingwce): Handle.
9253 * configure.srv (i[34567]86-*-cygwin*): Add
9254 win32-i386-low.o to srv_tgtobj.
9255 (i[34567]86-*-mingw*): Likewise.
9256 (arm*-*-mingw32ce*): Add case.
9257 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9258 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9259 [__MINGW32CE__] (strerror): New function.
9260 [__MINGW32CE__] (errno): Define to GetLastError.
9261 [__MINGW32CE__] (COUNTOF): New macro.
9262 (remote_open): Remove extra close call.
9263 * mem-break.c (delete_breakpoint_at): New function.
9264 * mem-break.h (delete_breakpoint_at): Declare.
9265 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9266 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9267 [USE_WIN32API] (read, write): Add char* casts.
9268 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9269 * server.h: Include wincecompat.h on Windows CE.
9270 [HAVE_ERRNO_H]: Check.
9271 (perror): Declare if not declared.
9272 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9273 (perror_with_name): Remove errno declaration.
9274 * wincecompat.h: New.
9275 * wincecompat.c: New.
9277 * win32-arm-low.c: New.
9278 * win32-i386-low.c: New.
9279 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9280 (OUTMSG2): Make it safe.
9282 (COUNTOF): New macro.
9283 (NUM_REGS): Get it from the low target.
9284 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9285 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9286 (thread_rec): Let low target handle debug registers.
9287 (child_add_thread): Likewise.
9288 (child_init_thread_list): Likewise.
9289 (continue_one_thread): Likewise.
9291 (do_child_fetch_inferior_registers): Move to ...
9292 * win32-i386-low.c: ... here, and rename to ...
9293 (do_fetch_inferior_registers): ... this.
9294 * win32-low.c (child_fetch_inferior_registers):
9295 Go through the low target.
9296 (do_child_store_inferior_registers): Use regptr.
9297 (strwinerror): New function.
9298 (win32_create_inferior): Handle Windows CE.
9299 Use strwinerror instead of strerror on Windows error
9300 codes. Add program to the error output.
9301 Don't close the main thread handle on Windows CE.
9302 (win32_attach): Use coredll.dll on Windows CE.
9303 (win32_kill): Close current process and current
9305 (win32_detach): Use coredll.dll on Windows CE.
9306 (win32_resume): Let low target handle debug registers, and
9308 (handle_exception): Add/Remove initial breakpoint. Avoid
9309 non-existant WSTOPSIG on Windows CE.
9310 (win32_read_inferior_memory): Cast to remove warning.
9311 (win32_arch_string): Go through the low target.
9312 (initialize_low): Call set_breakpoint_data with the low
9313 target's breakpoint.
9314 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9315 FOP_REGNUM, mappings): Move to ...
9316 * win32-i386-low.c: ... here.
9317 * win32-low.c (win32_thread_info): Move to ...
9318 * win32-low.h: ... here.
9319 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9320 win32-arm-low.c and wincecompat.c.
9321 (all:): Add $EXEEXT.
9322 (install-only:): Likewise.
9323 (gdbserver:): Likewise.
9324 (gdbreplay:): Likewise.
9325 * config.in: Regenerate.
9326 * configure: Regenerate.
9328 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9330 * win32-low.c: Rename typedef thread_info to
9331 win32_thread_info throughout.
9333 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9335 * win32-i386-low.c: Rename to ...
9336 * win32-low.c: ... this.
9337 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9338 * Makefile.in: Likewise.
9340 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9342 * remote-utils.c (monitor_output): Constify msg parameter.
9343 * server.h (monitor_output): Likewise.
9344 * win32-i386-low.c (handle_output_debug_string): New.
9345 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9346 handle_output_debug_string.
9347 (get_child_debug_event): Likewise.
9349 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9351 * server.c (main): Correct strtoul check.
9353 2007-03-27 Jon Ringle <jon@ringle.org>
9355 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9357 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9359 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9361 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9363 * terminal.h: Check HAVE_SGTTY_H.
9365 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9367 * remote-utils.c (remote_open): Print out the assigned port number.
9369 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9371 * remote-utils.c (monitor_output): New function.
9372 * server.c (debug_threads): Define here.
9373 (monitor_show_help): New function.
9374 (handle_query): Handle qRcmd.
9375 (main): Do not handle 'd' packet.
9376 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9377 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9380 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9382 * Makefile.in (EXEEXT): New.
9383 (clean): Use $(EXEEXT).
9385 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9387 * target.h (target_ops): Rename send_signal to request_interrupt,
9388 and remove enum target_signal parameter.
9389 * linux-low.c (linux_request_interrupt): Rename from
9390 linux_send_signal, and always send SIGINT.
9391 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9392 and always send SIGINT.
9393 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9395 (input_interrupt): Likewise.
9397 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9399 * server.c (get_features_xml): Check if target implemented
9401 * win32-i386-low.c (win32_arch_string): New.
9402 (win32_target_ops): Add win32_arch_string as arch_string member.
9404 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9406 * spu-low.c (spu_arch_string): New.
9407 (spu_target_ops): Add spu_arch_string.
9409 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9411 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9412 * configure.ac: Do not check for terminal.h.
9413 * configure, config.in: Regenerated.
9415 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9417 * Makefile.in (OBS): Add $(XML_BUILTIN).
9418 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9420 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9421 (arm-with-iwmmxt.c): New.
9422 * config.in, configure: Regenerate.
9423 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9424 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9425 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9426 (arm*-*-linux*): Add iWMMXt and regset support.
9427 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9428 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9429 (arm_store_wmmxregset, target_regsets): New.
9430 * server.c (get_features_xml): Take annex argument. Check builtin
9432 (handle_query): Handle multiple annexes.
9434 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9436 * remote-utils.c [USE_WIN32API] (read, write): Define.
9437 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9440 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9442 * linux-i386-low.c (the_low_target): Set arch_string.
9443 * linux-x86-64-low.c (the_low_target): Likewise.
9444 * linux-low.c (linux_arch_string): New.
9445 (linux_target_ops): Add it.
9446 * linux-low.h (struct linux_target_ops): Add arch_string.
9447 * server.c (write_qxfer_response): Use const void * for DATA.
9448 (get_features_xml): New.
9449 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9450 * target.h (struct target_ops): Add arch_string method.
9452 2007-01-03 Denis Pilat <denis.pilat@st.com>
9453 Daniel Jacobowitz <dan@codesourcery.com>
9455 * linux-low.c (linux_kill): Handle being called with no threads.
9456 * win32-i386-low.c (win32_kill): Likewise.
9457 (get_child_debug_event): Clear current_process_handle.
9459 2006-12-30 Denis PILAT <denis.pilat@st.com>
9460 Daniel Jacobowitz <dan@codesourcery.com>
9462 * remote-utils.c (remote_open): Check the type of specified
9463 serial port devices before opening them.
9464 * server.c (main): Kill the inferior if an error occurs during
9465 the first remote_open.
9467 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9469 * README: Update supported targets.
9471 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9473 * Makefile.in (clean): Remove reg-mips64.c.
9474 (reg-mips64.c, reg-mips64.o): New rules.
9475 * configure.srv: Handle mips64. Include regset support for mips.
9476 * linux-mips-low.c (union mips_register): New.
9477 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9478 (mips_breakpoint, mips_breakpoint_at): Use int.
9479 (mips_collect_register, mips_supply_register)
9480 (mips_collect_register_32bit, mips_supply_register_32bit)
9481 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9482 (mips_store_fpregset, target_regsets): New.
9483 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9485 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9487 * configure.srv: Add target "spu*-*-*".
9488 * Makefile.in (clean): Remove reg-spu.c.
9489 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9490 * spu-low.c: New file.
9492 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9494 * configure.ac: Correct td_thr_tls_get_addr test.
9495 * configure: Regenerated.
9497 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9499 * linux-low.c (linux_wait_for_event): Reformat. Use the
9501 * remote-utils.c (decode_address_to_semicolon): New.
9502 * server.c (pass_signals, handle_general_set): New.
9503 (handle_query): Mention QPassSignals for qSupported.
9504 (main): Call handle_general_set.
9505 * server.h (pass_signals, decode_address_to_semicolon): New.
9507 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9509 * server.c (handle_query): Correct error handling for read_auxv.
9511 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9513 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9514 and srv_linux_thread_db to yes.
9515 * linux-s390-low.c (s390_fill_gregset): New function.
9516 (target_regsets): Define data structure.
9518 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9520 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9521 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9522 * config.in, configure: Regenerated.
9523 * inferiors.c (gdb_id_to_thread): New function.
9524 (gdb_id_to_thread_id): Use it.
9525 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9526 * linux-low.h (struct process_info): Add th member.
9527 (thread_db_get_tls_address): New prototype.
9528 * remote-utils.c (decode_address): Make non-static.
9529 * server.c (handle_query): Handle qGetTLSAddr.
9530 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9531 * target.h (struct target_ops): Add get_tls_address.
9532 * thread-db.c (maybe_attach_thread): Save the thread handle.
9533 (thread_db_get_tls_address): New.
9535 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9537 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9538 (linux_resume_one_process): Take a siginfo_t *. Update all
9539 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9540 (struct pending_signals): Add a siginfo_t.
9541 (linux_wait_for_process): Always set last_status.
9542 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9543 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9544 * linux-low.h (struct process_info): Add last_status.
9546 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9548 * remote-utils.c (try_rle): New function.
9549 (putpkt_binary): Use it.
9551 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9553 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9554 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9555 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9556 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9557 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9560 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9562 * server.c (terminal_fd): New variable.
9563 (old_foreground_pgrp): Likewise.
9564 (restore_old_foreground_pgrp): New function.
9565 (start_inferior): Record the terminal file descriptor in terminal_fd
9566 and its original foreground group in old_foreground_pgrp. Register
9567 restore_old_foreground_pgrp with atexit().
9569 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9571 * server.c (handle_query): Correct qPart to qXfer.
9573 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9575 * configure.ac: Check for more headers which are missing on
9576 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9577 * configure.srv: Add Cygwin and mingw32.
9578 * remote-utils.c: Don't include headers unconditionally which
9579 are missing on mingw32. Include <winsock.h> for mingw32.
9580 (remote_open): Adjust for mingw32 support. Flush
9581 standard error after writing to it.
9582 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9583 (unblock_async_io, enable_async_io, disable_async_io)
9584 (readchar, getpkt): Update for Winsock support.
9585 (prepare_resume_reply): Expect a protocol signal number.
9586 * server.c: Disable <sys/wait.h> on mingw32.
9587 (start_inferior): Adjust for mingw32 support. Flush
9588 standard error after writing to it.
9589 (attach_inferior): Likewise. Use protocol signal
9591 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9593 * win32-i386-low.c: New file.
9594 * Makefile.in (XM_CLIBS): Set.
9595 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9596 (win32-i386-low.o): New dependency rule.
9597 * linux-low.c (linux_wait): Use target signal numbers.
9598 * target.h (struct target_ops): Doc fix.
9599 * server.h (target_signal_to_name): New prototype.
9600 * gdbreplay.c: Don't include headers unconditionally which
9601 are missing on mingw32. Include <winsock.h> for mingw32.
9602 (remote_close, remote_open): Adjust for Winsock support.
9603 * configure, config.in: Regenerated.
9605 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9607 * server.c (decode_xfer_read, write_qxfer_response): New.
9608 (handle_query): Take a packet length argument. Handle
9609 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9610 the qSupported response.
9611 (main): Update call to handle_query.
9613 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9615 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9616 (putpkt_binary): Renamed from putpkt and adjusted for binary
9618 (putpkt): New wrapper for putpkt_binary.
9619 (readchar): Don't mask off the high bit.
9620 (decode_X_packet): New function.
9621 * server.c (main): Call putpkt_binary if a handler sets the packet
9622 length. Save the length of the incoming packet. Handle 'X'.
9623 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9625 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9627 * server.c (handle_query): Handle qSupported.
9629 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9631 * remote-utils.c (all_symbols_looked_up): New variable.
9632 (look_up_one_symbol): Check it.
9633 * server.h (look_up_one_symbol): New declaration.
9634 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9636 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9638 * Makefile.in (linux-arm-low.o): Update dependencies.
9639 * linux-arm-low.c: Include "gdb_proc_service.h".
9640 (PTRACE_GET_THREAD_AREA): Define.
9641 (ps_get_thread_area): New function.
9643 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9645 * configure.srv (m68k*-*-uclinux*): New target.
9646 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9647 (linux_resume_one_process): Remove extraneous cast.
9648 (linux_read_offsets): New.
9649 (linux_target_op): Add linux_read_offsets on mmuless systems.
9650 * server.c (handle_query): Add qOffsets logic.
9651 * target.h (struct target_ops): Add read_offsets.
9653 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9655 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9656 (PTRACE_GET_THREAD_AREA): Define.
9657 (ps_get_thread_area): New function.
9658 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9659 (linux-x86-64-low.o): Update.
9661 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9663 * configure.ac: Remove checks for prfpregset_t.
9664 * gdb_proc_service.h: New file.
9665 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9666 new "gdb_proc_service.h".
9667 * proc-service.c: Likewise.
9668 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9669 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9670 * Makefile.in (gdb_proc_service_h): Updated.
9671 * configure, config.in: Regenerated.
9673 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9675 * remote-utils.c (prepare_resume_reply): Move declaration
9676 of gdb_id_from_wait to the top of the block.
9678 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9680 * linux-low.c (regsets_store_inferior_registers): Read the regset
9681 from the target before filling it.
9683 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9685 * server.c (attach_inferior): Return SIGTRAP for a successful
9688 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9690 * Makefile.in (OBS): Add version.o.
9691 (STAGESTUFF): Delete.
9692 (version.o): Add dependencies.
9693 (version.c): Replace rule.
9694 (clean): Remove version.c.
9695 * server.c (gdbserver_version): New.
9696 (gdbserver_usage): Use printf.
9697 (main): Handle --version and --help.
9698 * server.h (version, host_name): Add declarations.
9700 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9712 * linux-x86-64-low.c:
9715 * linux-ppc64-low.c:
9724 * linux-crisv32-low.c:
9736 * gdbserver.1: Add (C) after Copyright. Update the FSF
9739 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9741 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9742 (arm_breakpoint_at): Recognize both breakpoints.
9743 (the_low_target): Use the correct breakpoint instruction.
9745 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9747 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9748 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9749 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9750 (the_low_target): Update.
9752 2005-10-25 Andreas Schwab <schwab@suse.de>
9754 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9756 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9757 (ia64_num_regs): Reduce to 462.
9759 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9761 * acinclude.m4: Correct quoting.
9762 * aclocal.m4: Regenerated.
9764 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9765 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9766 (thread_db_init): Call thread_db_err_str.
9767 * configure.ac: Check for TD_VERSION.
9768 * config.in, configure: Regenerated.
9770 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9772 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9774 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9776 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9777 is not available. Define HAVE_PTRACE_GETREGS if it is.
9778 * config.in, configure: Regenerated.
9779 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9780 * linux-i386-low.c, linux-m68k-low.c: Update to use
9781 HAVE_PTRACE_GETREGS.
9782 * linux-low.c (regsets_fetch_inferior_registers)
9783 (regsets_store_inferior_registers): Only return 0 if we processed
9785 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9786 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9788 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9790 * inferiors.c (struct thread_info): Add gdb_id.
9791 (add_thread): Add gdb_id argument.
9792 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9793 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9794 calls to add_thread.
9795 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9796 * server.c (handle_query): Use thread_to_gdb_id.
9797 (handle_v_cont, main): Use gdb_id_to_thread_id.
9798 * server.h (add_thread): Update prototype.
9799 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9802 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9804 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9805 left-padded registers.
9806 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9807 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9809 2005-07-01 Steve Ellcey <sje@cup.hp.com>
9811 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9812 * configure: Regenerate.
9813 * config.in: Regenerate.
9814 * server.h (NEED_DECLARATION_STRERROR):
9815 Replace with !HAVE_DECL_STRERROR.
9817 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
9819 * linux-low.c (linux_wait, linux_send_signal): Don't test
9820 an unsigned long variable for > 0 if it could be MAX_ULONG.
9821 * server.c (myresume): Likewise.
9822 * target.c (set_desired_inferior): Likewise.
9824 2005-06-13 Mark Kettenis <kettenis@gnu.org>
9826 * configure.ac: Simplify and improve check for socklen_t.
9827 * configure, config.in: Regenerate.
9829 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
9831 * acconfig.h: Remove.
9832 * configure.ac: Add a test for socklen_t. Use three-argument
9833 AC_DEFINE throughout.
9834 * config.in: Regenerated using autoheader 2.59.
9835 * configure: Regenerated.
9837 * gdbreplay.c (socklen_t): Provide a default.
9838 (remote_open): Use socklen_t.
9839 * remote-utils.c (socklen_t): Provide a default.
9840 (remote_open): Use socklen_t.
9841 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9844 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9846 * linux-low.c (linux_read_memory, linux_write_memory)
9847 (linux_read_auxv): Likewise.
9848 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9849 (check_mem_write): Likewise.
9850 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9852 * regcache.c (struct inferior_rgcache_data, registers_to_string)
9853 (registers_from_string, register_data): Likewise.
9854 * server.c (handle_query, main): Likewise.
9855 * server.h (convert_ascii_to_int, convert_int_to_ascii)
9856 (decode_M_packet): Likewise.
9857 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9858 * target.h (struct target_ops): Update read_memory, write_memory,
9860 (read_inferior_memory, write_inferior_memory): Update.
9861 * linux-low.h (struct linux_target_ops): Change type of breakpoint
9863 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9864 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9865 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9866 linux-s390-low.c, linux-sh-low.c: Update for changes in
9867 read_inferior_memory and the_low_target->breakpoint.
9869 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
9871 * Makefile.in (SFILES): Add linux-ppc64-low.c.
9872 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9873 * configure.srv: Add powerpc64-*-linux*.
9874 * linux-ppc64-low.c: New file.
9876 2005-05-23 Orjan Friberg <orjanf@axis.com>
9878 * linux-cris-low.c: New file with support for CRIS.
9879 * linux-crisv32-low.c: Ditto for CRISv32.
9880 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9881 (clean): Add reg-cris.c and reg-crisv32.c.
9882 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9883 reg-crisv32.o, and reg-crisv32.c to make rules.
9884 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9887 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
9889 * linux-low.c (fetch_register): Ensure buffer size is a multiple
9890 of sizeof (PTRACE_XFER_TYPE).
9891 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
9893 2005-05-12 Orjan Friberg <orjanf@axis.com>
9895 * target.h (struct target_ops): Add insert_watchpoint,
9896 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9897 pointers for hardware watchpoint support.
9898 * linux-low.h (struct linux_target_ops): Ditto.
9899 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9900 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
9901 to linux_target_ops.
9902 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9904 * server.c (main): Recognize 'Z' and 'z' packets.
9906 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
9908 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9909 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9910 (the_low_target): Add new members.
9912 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9914 * proc-service.c (ps_lgetregs): Search all_processes instead of
9917 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
9919 * server.c (start_inferior): Change return type to int.
9920 (attach_inferior): Change sigptr to int *.
9921 (handle_v_cont, handle_v_requests): Change signal to int *.
9922 (main): Change signal to int.
9924 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
9926 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9927 * configure.srv: Add m32r*-*-linux*.
9928 * linux-m32r-low.c: New file.
9930 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
9932 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9934 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9936 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9937 Take unsigned long arguments for PIDs.
9938 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9939 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9940 (wait_for_sigstop, linux_resume_one_process)
9941 (regsets_fetch_inferior_registers, linux_send_signal)
9942 (linux_read_auxv): Likewise. Update the types of variables holding
9943 PIDs. Update format string specifiers.
9944 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9945 * remote-utils.c (prepare_resume_reply): Likewise.
9946 * server.c (cont_thread, general_thread, step_thread)
9947 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9949 (handle_query): Update format specifiers.
9950 (handle_v_cont, main): Use strtoul for thread IDs.
9951 * server.h (struct inferior_list_entry): Use unsigned long for ID.
9952 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9953 (general_thread, step_thread, thread_from_wait)
9954 (old_thread_from_wait): Update.
9955 * target.h (struct thread_resume): Use unsigned long for THREAD.
9956 (struct target_ops): Use unsigned long for arguments to attach and
9959 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
9961 * acinclude.m4: Include bfd/bfd.m4 directly.
9962 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
9963 <agriffis@toolchain.org>.
9964 * aclocal.m4, configure: Regenerated.
9966 2005-01-07 Andrew Cagney <cagney@gnu.org>
9968 * configure.ac: Rename configure.in, require autoconf 2.59.
9969 * configure: Re-generate.
9971 2004-12-08 Daniel Jacobowitz <dan@debian.org>
9973 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
9975 * aclocal.m4: Regenerated.
9976 * configure: Regenerated.
9978 2004-11-21 Andreas Schwab <schwab@suse.de>
9980 * linux-m68k-low.c (m68k_num_gregs): Define.
9981 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9982 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9983 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9984 (m68k_breakpoint_at): New. Add to the_low_target.
9986 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9987 srv_linux_thread_db to yes.
9989 2004-10-20 Joel Brobecker <brobecker@gnat.com>
9991 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9992 (ARCH_SET_FS): Likewise.
9993 (ARCH_GET_FS): Likewise.
9994 (ARCH_GET_GS): Likewise.
9996 2004-10-16 Daniel Jacobowitz <dan@debian.org>
9998 * linux-i386-low.c (ps_get_thread_area): New.
9999 * linux-x86-64-low.c (ps_get_thread_area): New.
10000 * linux-low.c: Include <sys/syscall.h>.
10001 (linux_kill_one_process): Don't kill the first thread here.
10002 (linux_kill): Kill the first thread here.
10003 (kill_lwp): New function.
10004 (send_sigstop, linux_send_signal): Use it.
10005 * proc-service.c: Clean up #ifdefs.
10006 (fpregset_info): Delete.
10007 (ps_lgetregs): Update and enable implementation.
10008 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10010 * remote-utils.c (struct sym_cache, symbol_cache): New.
10011 (input_interrupt): Print a clearer message.
10012 (async_io_enabled): New variable.
10013 (enable_async_io, disable_async_io): Use it. Update comments.
10014 (look_up_one_symbol): Use the symbol cache.
10015 * thread-db.c (thread_db_look_up_symbols): New function.
10016 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10018 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10020 * configure.in: Test for -rdynamic.
10021 * configure: Regenerated.
10022 * Makefile (INTERNAL_LDFLAGS): New.
10023 (gdbserver, gdbreplay): Use it.
10025 2004-09-02 Andrew Cagney <cagney@gnu.org>
10027 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10029 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10031 * linux-low.c (linux_wait): Clear all_processes list also.
10033 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10035 * linux-low.c: Include <errno.h>. Remove extern declaration of
10038 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10040 * gdbreplay.c, server.h, utils.c: Update copyright years.
10042 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10044 * server.c (main): Print child status or termination signal from
10045 variable 'signal', not 'sig'.
10047 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10049 * linux-low.c (linux_read_memory): Change return type to
10050 int. Check for and return error from ptrace().
10051 * target.c (read_inferior_memory): Change return type to int. Pass
10052 back return status from the_target->read_memory().
10053 * target.h (struct target_ops): Adapt *read_memory() prototype.
10055 (read_inferior_memory): Adapt prototype.
10056 * server.c (main): Return an error packet if
10057 read_inferior_memory() returns an error.
10059 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10061 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10062 Unify with other clean targets.
10064 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10066 * server.c (handle_v_cont): Call set_desired_inferior.
10068 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10070 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10072 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10074 * linux-low.c (linux_wait): Unblock async I/O.
10075 (linux_resume): Block and enable async I/O.
10076 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10077 * server.h (block_async_io, unblock_async_io): Add prototypes.
10079 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10081 * remote-utils.c (remote_open): Print a status notice after
10082 opening a TCP port.
10083 * server.c (attach_inferior): Print a status notice after
10086 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10088 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10090 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10092 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10094 * server.c, target.h: Update copyright years.
10096 2004-02-25 Roland McGrath <roland@redhat.com>
10098 * target.h (struct target_ops): New member `read_auxv'.
10099 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10100 * linux-low.c (linux_read_auxv): New function.
10101 (linux_target_ops): Initialize `read_auxv' member to that.
10103 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10105 Committed by Jim Blandy <jimb@redhat.com>.
10107 * linux-s390-low.c (s390_num_regs): Update.
10108 (s390_regmap): Remove control registers. Use __s390x__ predefine
10109 instead of GPR_SIZE to distiguish s390 and s390x targets.
10111 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10113 * linux-low.c: Update copyright year.
10114 (check_removed_breakpoint): Clear pending_is_breakpoint.
10115 (linux_set_resume_request, linux_queue_one_thread)
10116 (resume_status_pending_p): New functions.
10117 (linux_continue_one_thread): Use process->resume.
10118 (linux_resume): Only resume threads if there are no pending events.
10119 * linux-low.h (struct process_info): Add resume request
10122 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10124 * regcache.c (new_register_cache): Clear the allocated register
10125 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10127 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10129 * linux-low.c (linux_resume): Take a struct thread_resume *
10131 (linux_wait): Update call.
10132 (resume_ptr): New static variable.
10133 (linux_continue_one_thread): Renamed from
10134 linux_continue_one_process. Use resume_ptr.
10135 (linux_resume): Use linux_continue_one_thread.
10136 * server.c (handle_v_cont, handle_v_requests): New functions.
10137 (myresume): New function.
10138 (main): Handle 'v' case.
10139 * target.h (struct thread_resume): New type.
10140 (struct target_ops): Change argument of "resume" to struct
10142 (myresume): Delete macro.
10144 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10146 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10147 (uninstall): Support DESTDIR.
10149 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10151 * configure.srv: Add xscale*linux copy of arm*linux entry.
10153 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10155 * linux-arm-low.c (arm_reinsert_addr): New function.
10156 (the_low_target): Add arm_reinsert_addr.
10158 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10160 * mem-break.c: Remove whitespace at end of file.
10162 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10164 * configure.in: Check whether we need to prototype strerror.
10165 * server.h: Optionally prototype strerror.
10166 * gdbreplay.c (perror_with_name): Use strerror.
10167 * linux-low.c (linux_attach_lwp): Use strerror.
10168 * utils.c (perror_with_name): Use strerror.
10169 * config.in, configure: Regenerated.
10171 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10173 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10174 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10176 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10178 * Makefile.in (SFILES): Update.
10179 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10180 low-sun3.c: Remove files.
10182 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10184 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10185 (linux_detach_one_process, linux_detach): New functions.
10186 (linux_target_ops): Add linux_detach.
10187 * server.c (main): Handle 'D' packet.
10188 * target.h (struct target_ops): Add "detach" member.
10189 (detach_inferior): Define.
10191 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10193 From Kelley Cook <kelleycook@wideopenwest.com>:
10194 * configure.srv: Accept i[34567]86 variants.
10196 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10198 * linux-low.c (linux_wait_for_event): Correct comment typos.
10199 (linux_resume_one_process): Call check_removed_breakpoint.
10200 (linux_send_signal): New function.
10201 (linux_target_ops): Add linux_send_signal.
10202 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10204 * target.h (struct target_ops): Add send_signal.
10206 2003-05-29 Jim Blandy <jimb@redhat.com>
10208 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10209 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10210 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10211 away part of the register's value.
10213 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10215 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10216 (linux_wait_for_event, linux_init_signals): Likewise.
10218 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10220 * configure.in: Check for stdlib.h.
10221 * configure: Regenerated.
10222 * config.in: Regenerated.
10224 2003-01-04 Andreas Schwab <schwab@suse.de>
10226 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10228 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10230 * Makefile.in: Remove obsolete code.
10232 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10234 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10235 defined(PT_FPR0_HI).
10237 2002-11-17 Stuart Hughes <seh@zee2.com>
10239 * linux-arm-low.c (arm_num_regs): Increase.
10240 (arm_regmap): Include status register.
10242 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10244 * linux-low.c (register_addr): Remove incorrect -1 check.
10246 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10248 * linux-low.c (linux_create_inferior): Call setpgid. Return
10250 (unstopped_p, linux_signal_pid): Remove.
10251 (linux_target_ops): Remove linux_signal_pid.
10252 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10253 global instead of target method.
10254 * target.h (struct target_ops): Remove signal_pid. Update comment
10255 for create_inferior.
10256 * server.c (signal_pid): New variable.
10257 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10258 gdbserver. Set the child to be the foreground process group.
10259 (attach_inferior): Set signal_pid.
10261 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10263 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10265 2002-08-20 Jim Blandy <jimb@redhat.com>
10267 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10270 2002-08-01 Andrew Cagney <cagney@redhat.com>
10272 * Makefile.in: Make chill references obsolete.
10274 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10276 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10277 * configure: Regenerate.
10278 * config.in: Regenerate.
10280 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10282 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10283 (perror_with_name, remote_close, remote_open, expect, play): Static.
10285 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10287 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10288 byte offsets instead of an array of indexes.
10289 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10291 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10293 * regcache.c: Add comment.
10295 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10297 * thread-db.c: New file.
10298 * proc-service.c: New file.
10299 * acinclude.m4: New file.
10300 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10301 proc-service.o, and thread-db.o.
10302 (linux-low.o): Add USE_THREAD_DB.
10303 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10304 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10305 * aclocal.m4: Regenerated.
10306 * config.in: Regenerated.
10307 * configure: Regenerated.
10308 * configure.in: Check for proc_service.h, sys/procfs.h,
10309 thread_db.h, and linux/elf.h headrs.
10310 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10311 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10312 Check for -lthread_db and thread support.
10313 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10314 PowerPC, and SuperH.
10315 * i387-fp.c: Constify arguments.
10316 * i387-fp.h: Likewise.
10317 * inferiors.c: (struct thread_info): Renamed from
10318 `struct inferior_info'. Remove PID member. Use generic inferior
10319 list header. All uses updated.
10320 (inferiors, signal_pid): Removed.
10321 (all_threads): New variable.
10322 (get_thread): Define.
10323 (add_inferior_to_list): New function.
10324 (for_each_inferior): New function.
10325 (change_inferior_id): New function.
10326 (add_inferior): Removed.
10327 (remove_inferior): New function.
10328 (add_thread): New function.
10329 (free_one_thread): New function.
10330 (remove_thread): New function.
10331 (clear_inferiors): Use for_each_inferior and free_one_thread.
10332 (find_inferior): New function.
10333 (find_inferior_id): New function.
10334 (inferior_target_data): Update argument type.
10335 (set_inferior_target_data): Likewise.
10336 (inferior_regcache_data): Likewise.
10337 (set_inferior_regcache_data): Likewise.
10338 * linux-low.c (linux_bp_reinsert): Remove.
10339 (all_processes, stopping_threads, using_thrads)
10340 (struct pending_signals, debug_threads, pid_of): New.
10341 (inferior_pid): Replace with macro.
10342 (struct inferior_linux_data): Remove.
10343 (get_stop_pc, add_process): New functions.
10344 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10345 Use add_process and add_thread.
10346 (linux_attach_lwp): New function, based on old linux_attach. Use
10347 add_process and add_thread. Set stop_expected for new threads.
10348 (linux_attach): New function.
10349 (linux_kill_one_process): New function.
10350 (linux_kill): Kill all LWPs.
10351 (linux_thread_alive): Use find_inferior_id.
10352 (check_removed_breakpoints, status_pending_p): New functions.
10353 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10354 Update. Use WNOHANG. Wait for cloned processes also. Update process
10355 struct for the found process.
10356 (linux_wait_for_event): New function.
10357 (linux_wait): Use it. Support LWPs.
10358 (send_sigstop, wait_for_sigstop, stop_all_processes)
10359 (linux_resume_one_process, linux_continue_one_process): New functions.
10360 (linux_resume): Support LWPs.
10361 (REGISTER_RAW_SIZE): Remove.
10362 (fetch_register): Use register_size instead. Call supply_register.
10363 (usr_store_inferior_registers): Likewise. Call collect_register.
10364 Fix recursive case.
10365 (regsets_fetch_inferior_registers): Improve error message.
10366 (regsets_store_inferior_registers): Add debugging.
10367 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10368 (unstopped_p, linux_signal_pid): New functions.
10369 (linux_target_ops): Add linux_signal_pid.
10370 (linux_init_signals): New function.
10371 (initialize_low): Call it. Initialize using_threads.
10372 * regcache.c (inferior_regcache_data): Add valid
10374 (get_regcache): Fetch registers lazily. Add fetch argument
10375 and update all callers.
10376 (regcache_invalidate_one, regcache_invalidate): New
10378 (new_register_cache): Renamed from create_register_cache.
10379 Return the new regcache.
10380 (free_register_cache): Change argument to a void *.
10381 (registers_to_string, registers_from_string): Call get_regcache
10382 with fetch flag set.
10383 (register_data): Make static. Pass fetch flag to get_regcache.
10384 (supply_register): Call get_regcache with fetch flag clear.
10385 (collect_register): Call get_regcache with fetch flag set.
10386 (collect_register_as_string): New function.
10387 * regcache.h: Update.
10388 * remote-utils.c (putpkt): Flush after debug output and use
10390 Handle input interrupts while waiting for an ACK.
10391 (input_interrupt): Use signal_pid method.
10392 (getpkt): Flush after debug output and use stderr.
10393 (outreg): Use collect_register_as_string.
10394 (new_thread_notify, dead_thread_notify): New functions.
10395 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10396 and general_thread.
10397 (look_up_one_symbol): Flush after debug output.
10398 * server.c (step_thread, server_waiting): New variables.
10399 (start_inferior): Don't use signal_pid. Update call to mywait.
10400 (attach_inferior): Update call to mywait.
10401 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10402 (main): Don't fetch/store registers explicitly. Use
10403 set_desired_inferior. Support proposed ``Hs'' packet. Update
10405 * server.h: Update.
10406 (struct inferior_list, struct_inferior_list_entry): New.
10407 * target.c (set_desired_inferior): New.
10408 (write_inferior_memory): Constify.
10409 (mywait): New function.
10410 * target.h: Update.
10411 (struct target_ops): New signal_pid method.
10412 (mywait): Removed macro, added prototype.
10414 * linux-low.h (regset_func): Removed.
10415 (regset_fill_func, regset_store_func): New.
10416 (enum regset_type): New.
10417 (struct regset_info): Add type field. Use new operation types.
10418 (struct linux_target_ops): stop_pc renamed to get_pc.
10419 Add decr_pc_after_break and breakpoint_at.
10420 (get_process, get_thread_proess, get_process_thread)
10421 (strut process_info, all_processes, linux_attach_lwp)
10422 (thread_db_init): New.
10424 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10425 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10426 (the_low_target): Add new members.
10427 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10428 (i386_store_fpxregset): Constify.
10429 (target_regsets): Add new kind identifier.
10430 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10431 (i386_set_pc): Add debugging.
10432 (i386_breakpoint_at): New function.
10433 (the_low_target): Add new members.
10434 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10435 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10436 (mips_breakpoint_at): New.
10437 (the_low_target): Add new members.
10438 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10439 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10440 (the_low_target): Add new members.
10441 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10442 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10443 (the_low_target): Add new members.
10444 * linux-x86-64-low.c (target_regsets): Add new kind
10447 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10449 From Martin Pool <mbp@samba.org>:
10450 * server.c (gdbserver_usage): New function.
10453 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10455 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10456 stop_at -> stop_pc.
10458 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10460 * Makefile.in: Remove obsolete code.
10462 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10464 * linux-low.c (regsets_fetch_inferior_registers),
10465 (regsets_store_inferior_registers): Removed cast to int from
10467 * regcache.h: Added declaration of struct inferior_info.
10469 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10471 * inferiors.c (struct inferior_info): Add regcache_data.
10472 (add_inferior): Call create_register_cache.
10473 (clear_inferiors): Call free_register_cache.
10474 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10475 * regcache.c (struct inferior_regcache_data): New.
10476 (registers): Remove.
10477 (get_regcache): New function.
10478 (create_register_cache, free_register_cache): New functions.
10479 (set_register_cache): Don't initialize the register cache here.
10480 (registers_to_string, registers_from_string, register_data): Call
10482 * regcache.h: Add prototypes.
10483 * server.h: Likewise.
10485 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10487 * mem-break.c: New file.
10488 * mem-break.h: New file.
10489 * Makefile.in: Add mem-break.o rule; update server.h
10491 * inferiors.c (struct inferior_info): Add target_data
10493 (clear_inferiors): Free target_data member if set.
10494 (inferior_target_data, set_inferior_target_data): New functions.
10495 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10496 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10497 * linux-low.c (linux_bp_reinsert): New variable.
10498 (struct inferior_linux_data): New.
10499 (linux_create_inferior): Use set_inferior_target_data.
10500 (linux_attach): Likewise. Call add_inferior.
10501 (linux_wait_for_one_inferior): New function.
10502 (linux_wait): Call it.
10503 (linux_write_memory): Add const.
10504 (initialize_low): Call set_breakpoint_data.
10505 * linux-low.h (struct linux_target_ops): Add breakpoint
10507 * server.c (attach_inferior): Remove extra add_inferior
10509 * server.h: Include mem-break.h. Update inferior.c
10511 * target.c (read_inferior_memory)
10512 (write_inferior_memory): New functions.
10513 * target.h (read_inferior_memory)
10514 (write_inferior_memory): Change macros to prototypes.
10515 (struct target_ops): Update comments. Add const to write_memory
10518 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10520 * linux-low.c (usr_store_inferior_registers): Support
10521 registers which are allowed to fail to store.
10522 * linux-low.h (linux_target_ops): Likewise.
10523 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10524 (ppc_cannot_store_register): FPSCR may not be storable.
10526 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10528 * server.h: Include <string.h> if HAVE_STRING_H.
10529 * ChangeLog: Correct paths in last ChangeLog entry.
10531 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10533 * linux-low.h: Remove obsolete prototypes.
10534 (struct linux_target_ops): New.
10535 (extern the_low_target): New.
10536 * linux-low.c (num_regs, regmap): Remove declarations.
10537 (register_addr): Use the_low_target explicitly.
10538 (fetch_register): Likewise.
10539 (usr_fetch_inferior_registers): Likewise.
10540 (usr_store_inferior_registers): Likewise.
10541 * linux-arm-low.c (num_regs): Remove.
10542 (arm_num_regs): Define.
10543 (arm_regmap): Renamed from regmap, made static.
10544 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10546 (arm_cannot_store_register): Renamed from cannot_store_register,
10548 (the_low_target): New.
10549 * linux-i386-low.c (num_regs): Remove.
10550 (i386_num_regs): Define.
10551 (i386_regmap): Renamed from regmap, made static.
10552 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10554 (i386_cannot_store_register): Renamed from cannot_store_register,
10556 (the_low_target): New.
10557 * linux-ia64-low.c (num_regs): Remove.
10558 (ia64_num_regs): Define.
10559 (ia64_regmap): Renamed from regmap, made static.
10560 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10562 (ia64_cannot_store_register): Renamed from cannot_store_register,
10564 (the_low_target): New.
10565 * linux-m68k-low.c (num_regs): Remove.
10566 (m68k_num_regs): Define.
10567 (m68k_regmap): Renamed from regmap, made static.
10568 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10570 (m68k_cannot_store_register): Renamed from cannot_store_register,
10572 (the_low_target): New.
10573 * linux-mips-low.c (num_regs): Remove.
10574 (mips_num_regs): Define.
10575 (mips_regmap): Renamed from regmap, made static.
10576 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10578 (mips_cannot_store_register): Renamed from cannot_store_register,
10580 (the_low_target): New.
10581 * linux-ppc-low.c (num_regs): Remove.
10582 (ppc_num_regs): Define.
10583 (ppc_regmap): Renamed from regmap, made static.
10584 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10586 (ppc_cannot_store_register): Renamed from cannot_store_register,
10588 (the_low_target): New.
10589 * linux-s390-low.c (num_regs): Remove.
10590 (s390_num_regs): Define.
10591 (s390_regmap): Renamed from regmap, made static.
10592 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10594 (s390_cannot_store_register): Renamed from cannot_store_register,
10596 (the_low_target): New.
10597 * linux-sh-low.c (num_regs): Remove.
10598 (sh_num_regs): Define.
10599 (sh_regmap): Renamed from regmap, made static.
10600 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10602 (sh_cannot_store_register): Renamed from cannot_store_register,
10604 (the_low_target): New.
10605 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10606 (the_low_target): New.
10608 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10610 * Makefile.in: Add stamp-h target.
10611 * configure.in: Create stamp-h.
10612 * configure: Regenerated.
10614 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10616 * inferiors.c: New file.
10617 * target.c: New file.
10618 * target.h: New file.
10619 * Makefile.in: Add target.o and inferiors.o. Update
10621 * linux-low.c (inferior_pid): New static variable,
10622 moved from server.c.
10623 (linux_create_inferior): Renamed from create_inferior.
10624 Call add_inferior. Return 0 on success instead of a PID.
10625 (linux_attach): Renamed from myattach.
10626 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10627 (linux_thread_alive): Renamed from mythread_alive.
10628 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10630 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10631 (regsets_store_inferior_registers): Correct error message.
10632 Add missing ``return 0''.
10633 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10634 (linux_store_registers): Renamed from store_inferior_registers.
10635 (linux_read_memory): Renamed from read_inferior_memory.
10636 (linux_write_memory): Renamed from write_inferior_memory.
10637 (linux_target_ops): New structure.
10638 (initialize_low): Call set_target_ops ().
10639 * remote-utils.c (unhexify): New function.
10640 (hexify): New function.
10641 (input_interrupt): Send signals to ``signal_pid''.
10642 * server.c (inferior_pid): Remove.
10643 (start_inferior): Update create_inferior call.
10644 (attach_inferior): Call add_inferior.
10645 (handle_query): New function.
10646 (main): Call handle_query for `q' packets.
10647 * server.h: Include "target.h". Remove obsolete prototypes.
10648 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10650 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10652 * Makefile.in: Add WARN_CFLAGS. Update configury
10654 * configure.in: Check for <string.h>
10655 * configure: Regenerate.
10656 * config.in: Regenerate.
10657 * gdbreplay.c: Include needed system headers.
10658 (remote_open): Remove strchr prototype.
10659 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10660 * regcache.c (supply_register): Change buf argument to const void *.
10661 (supply_register_by_name): Likewise.
10662 (collect_register): Change buf argument to void *.
10663 (collect_register_by_name): Likewise.
10664 * regcache.h: Add missing prototypes.
10665 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10666 * server.c (handle_query): New function.
10667 (attached): New static variable, moved out of main.
10668 (main): Quiet longjmp clobber warnings.
10669 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10670 * utils.c (error): Remove NORETURN.