1 2015-03-04 Pedro Alves <palves@redhat.com>
3 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4 Decide whether a breakpoint triggered based on the SIGTRAP's
6 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8 (linux_low_filter_event): Check for breakpoints before checking
10 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
12 (linux_stopped_by_sw_breakpoint)
13 (linux_supports_stopped_by_sw_breakpoint)
14 (linux_stopped_by_hw_breakpoint)
15 (linux_supports_stopped_by_hw_breakpoint): New functions.
16 (linux_target_ops): Install new target methods.
18 2015-03-04 Pedro Alves <palves@redhat.com>
20 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
21 * server.c (swbreak_feature, hwbreak_feature): New globals.
22 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
23 (captured_main): Clear swbreak_feature and hwbreak_feature.
24 * server.h (swbreak_feature, hwbreak_feature): Declare.
25 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
26 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
27 supports_stopped_by_hw_breakpoint>: New fields.
28 (target_supports_stopped_by_sw_breakpoint)
29 (target_stopped_by_sw_breakpoint)
30 (target_supports_stopped_by_hw_breakpoint)
31 (target_stopped_by_hw_breakpoint): Declare.
33 2015-03-04 Pedro Alves <palves@redhat.com>
35 enum lwp_stop_reason -> enum target_stop_reason
36 * linux-low.c (check_stopped_by_breakpoint): Adjust.
37 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
38 (linux_wait_1, stuck_in_jump_pad_callback)
39 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
40 (linux_stopped_by_watchpoint):
41 * linux-low.h (enum lwp_stop_reason): Delete.
42 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
43 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
45 2015-03-04 Yao Qi <yao.qi@linaro.org>
47 * Makefile.in (SFILES): Add linux-aarch64-low.c.
49 2015-03-03 Gary Benson <gbenson@redhat.com>
51 * hostio.c (handle_vFile): Fix prefix lengths.
53 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
55 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
58 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
60 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
61 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
62 (clean): Add "rm -f" for above C files.
63 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
64 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
65 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
66 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
67 * linux-s390-low.c (HWCAP_S390_VX): New macro.
68 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
69 (init_registers_s390x_vx_linux64)
70 (init_registers_s390x_tevx_linux64)
71 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
72 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
74 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
75 (s390_store_vxrs_high): New functions.
76 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
78 (s390_arch_setup): Add logic for selecting one of the new target
79 descriptions. Activate the new vector regsets if applicable.
80 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
81 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
82 and init_registers_s390x_tevx_linux64.
84 2015-03-01 Pedro Alves <palves@redhat.com>
86 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
89 2015-02-27 Pedro Alves <palves@redhat.com>
91 * linux-x86-low.c (u_debugreg_offset): New function.
92 (x86_linux_dr_get, x86_linux_dr_set): Use it.
94 2015-02-27 Pedro Alves <palves@redhat.com>
96 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
97 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
98 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
99 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
100 (ps_lsetfpregs, ps_getpid)
101 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
102 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
103 (ps_lsetxregs, ps_plog): Declare.
105 2015-02-27 Pedro Alves <palves@redhat.com>
107 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
108 IP_AGENT_EXPORT_FUNC.
109 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
110 IP_AGENT_EXPORT_FUNC.
111 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
112 (IP_AGENT_EXPORT): Delete.
113 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
114 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
115 (gdb_trampoline_buffer_error, collecting, gdb_collect)
116 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
117 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
118 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
119 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
120 (traceframe_read_count, traceframe_write_count)
121 (traceframes_created, trace_state_variables, get_raw_reg)
122 (get_trace_state_variable_value, set_trace_state_variable_value)
123 (ust_loaded, helper_thread_id, cmd_buf): Use
124 IPA_SYM_EXPORTED_NAME.
125 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
126 (tracepoints) Use IP_AGENT_EXPORT_VAR.
127 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
128 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
129 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
130 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
131 EXTERN_C_PUSH/EXTERN_C_POP.
132 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
133 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
134 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
135 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
136 (traceframe_write_count, traceframe_read_count)
137 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
138 (about_to_request_buffer_space, get_trace_state_variable_value)
139 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
140 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
141 EXTERN_C_PUSH/EXTERN_C_POP.
142 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
143 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
144 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
145 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
146 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
147 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
148 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
149 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
151 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
152 (IP_AGENT_EXPORT_VAR_DECL): Define.
154 (gdb_agent_get_raw_reg): Declare.
156 2015-02-27 Tom Tromey <tromey@redhat.com>
157 Pedro Alves <palves@redhat.com>
159 Rename symbols whose names are reserved C++ keywords throughout.
161 2015-02-27 Pedro Alves <palves@redhat.com>
163 * Makefile.in (COMPILER): New, get it from autoconf.
164 (CXX): Get from autoconf instead.
165 (COMPILE.pre): Use COMPILER.
166 (CC-LD): Rename to ...
167 (CC_LD): ... this. Use COMPILER.
168 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
169 (CXX_FOR_TARGET): Default to g++ instead of gcc.
170 * acinclude.m4: Include build-with-cxx.m4.
171 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
172 Disable -Werror by default if building in C++ mode.
173 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
174 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
175 the C++ compiler. Save/restore CXXFLAGS too.
176 * configure: Regenerate.
178 2015-02-27 Pedro Alves <palves@redhat.com>
180 * acinclude.m4: Include libiberty.m4.
181 * configure.ac: Call libiberty_INIT.
182 * config.in, configure: Regenerate.
184 2015-02-26 Pedro Alves <palves@redhat.com>
186 * linux-low.c (linux_wait_1): When incrementing the PC past a
187 program breakpoint always use the_low_target.breakpoint_len as
188 increment, rather than the maximum between that and
189 the_low_target.decr_pc_after_break.
191 2015-02-23 Pedro Alves <palves@redhat.com>
193 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
194 thread was doing a step-over; always adjust the PC if
195 we stepped over a permanent breakpoint.
196 (linux_wait_1): If we stepped over breakpoint that was on top of a
197 permanent breakpoint, manually advance the PC past it.
199 2015-02-23 Pedro Alves <palves@redhat.com>
201 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
203 (x86_fill_gregset, x86_store_gregset): Use it when handling
206 2015-02-20 Pedro Alves <palves@redhat.com>
208 * thread-db.c: Include "nat/linux-procfs.h".
209 (thread_db_init): Skip listing new threads if the kernel supports
210 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
212 2015-02-20 Pedro Alves <palves@redhat.com>
214 * linux-low.c (status_pending_p_callback): Use ptid_match.
216 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
219 * linux-low.c (wstatus_maybe_breakpoint): Remove.
220 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
221 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
223 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
226 * tracepoint.c (cmd_qtinit): Add check for current_thread.
228 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
230 * linux-low.c (linux_low_btrace_conf): Print size.
231 * server.c (handle_btrace_conf_general_set): New.
232 (hanle_general_set): Call handle_btrace_conf_general_set.
233 (handle_query): Report Qbtrace-conf:bts:size as supported.
235 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
237 * linux-low.c (linux_low_enable_btrace): Update parameters.
238 (linux_low_btrace_conf): New.
239 (linux_target_ops)<to_btrace_conf>: Initialize.
240 * server.c (current_btrace_conf): New.
241 (handle_btrace_enable): Rename to ...
242 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
243 to target_enable_btrace. Update comment. Update users.
244 (handle_qxfer_btrace_conf): New.
245 (qxfer_packets): Add btrace-conf entry.
246 (handle_query): Report qXfer:btrace-conf:read as supported packet.
247 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
248 (target_ops)<read_btrace_conf>: New.
249 (target_enable_btrace): Update parameters.
250 (target_read_btrace_conf): New.
252 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
254 * server.c (handle_btrace_general_set): Remove call to
255 target_supports_btrace.
256 (supported_btrace_packets): New.
257 (handle_query): Call supported_btrace_packets.
258 * target.h: include btrace-common.h.
259 (btrace_target_info): Removed.
260 (supports_btrace, target_supports_btrace): Update parameters.
262 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
264 * Makefile.in (SFILES): Add common/btrace-common.c.
265 (OBS): Add common/btrace-common.o.
266 (btrace-common.o): Add build rules.
267 * linux-low: Include btrace-common.h.
268 (linux_low_read_btrace): Use struct btrace_data. Call
269 btrace_data_init and btrace_data_fini.
271 2015-02-06 Pedro Alves <palves@redhat.com>
273 * thread-db.c (find_new_threads_callback): Add debug output.
275 2015-02-04 Pedro Alves <palves@redhat.com>
277 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
278 (resume_stopped_resumed_lwps): New function.
279 (linux_wait_for_event_filtered): Use it.
281 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
283 * Makefile.in (SFILES): Add linux-personality.c.
284 (linux-personality.o): New rule.
285 * configure.srv (srv_linux_obj): Add linux-personality.o to the
286 list of objects to be built.
287 * linux-low.c: Include nat/linux-personality.h.
288 (linux_create_inferior): Remove code to disable address space
289 randomization (moved to ../nat/linux-personality.c). Create
290 cleanup to disable address space randomization.
292 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
294 * Makefile.in (posix-strerror.o): New rule.
295 (mingw-strerror.o): Likewise.
296 * configure: Regenerated.
297 * configure.ac: Source file ../common/common.host. Initialize new
298 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
300 2015-01-14 Yao Qi <yao@codesourcery.com>
302 * Makefile.in (SFILES): Add nat/ppc-linux.c.
303 (ppc-linux.o): New rule.
304 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
305 * configure.ac: AC_CHECK_FUNCS(getauxval).
306 * config.in: Re-generated.
307 * configure: Re-generated.
308 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
309 ppc64_64bit_inferior_p
311 2015-01-14 Yao Qi <yao@codesourcery.com>
313 * linux-ppc-low.c: Include "nat/ppc-linux.h".
314 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
315 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
316 (PT_ORIG_R3, PT_TRAP): Likewise.
317 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
318 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
319 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
321 2015-01-10 Joel Brobecker <brobecker@adacore.com>
323 * i387-fp.c (i387_cache_to_xsave): In look over
324 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
325 zmmh_low_space field by use of zmmh_high_space.
327 2015-01-09 Pedro Alves <palves@redhat.com>
329 * linux-low.c (step_over_bkpt): Move higher up in the file.
330 (handle_extended_wait): Don't store the stop_pc here.
331 (get_stop_pc): Adjust comments and rename to ...
332 (check_stopped_by_breakpoint): ... this. Record whether the LWP
333 stopped for a software breakpoint or hardware breakpoint.
334 (thread_still_has_status_pending_p): New function.
335 (status_pending_p_callback): Use
336 thread_still_has_status_pending_p. If the event is no longer
337 interesting, resume the LWP.
338 (handle_tracepoints): Add assert.
339 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
340 (wstatus_maybe_breakpoint): New function.
341 (cancel_breakpoint): Delete function.
342 (check_stopped_by_watchpoint): New function, factored out from
343 linux_low_filter_event.
344 (lp_status_maybe_breakpoint): Delete function.
345 (linux_low_filter_event): Remove filter_ptid argument.
346 Leave thread group exits pending here. Store the LWP's stop PC.
347 Always leave events pending.
348 (linux_wait_for_event_filtered): Pull all events out of the
349 kernel, and leave them all pending.
350 (count_events_callback, select_event_lwp_callback): Consider all
352 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
353 (select_event_lwp): Only give preference to the stepping LWP in
354 all-stop mode. Adjust comments.
355 (ignore_event): New function.
356 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
357 references to cancel_breakpoints. Adjust to renames. Also give
358 equal priority to all LWPs that have had events in non-stop mode.
359 If reporting a software breakpoint event, unadjust the LWP's PC.
360 (linux_wait): If linux_wait_1 returned an ignored event, retry.
361 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
363 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
364 (resume_status_pending_p): Use thread_still_has_status_pending_p.
365 (linux_stopped_by_watchpoint): Adjust.
366 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
367 * linux-low.h (enum lwp_stop_reason): New.
368 (struct lwp_info) <stop_pc>: Adjust comment.
369 <stopped_by_watchpoint>: Delete field.
370 <stop_reason>: New field.
371 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
372 * mem-break.c (software_breakpoint_inserted_here)
373 (hardware_breakpoint_inserted_here): New function.
374 * mem-break.h (software_breakpoint_inserted_here)
375 (hardware_breakpoint_inserted_here): Declare.
376 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
377 (cancel_breakpoints): Delete.
378 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
379 (upload_fast_traceframes): Remove references to
382 2015-01-09 Pedro Alves <palves@redhat.com>
384 * thread-db.c (find_new_threads_callback): Ignore thread if the
385 kernel thread ID is -1.
387 2015-01-09 Pedro Alves <palves@redhat.com>
389 * linux-low.c (linux_attach_fail_reason_string): Move to
390 nat/linux-ptrace.c, and rename.
391 (linux_attach_lwp): Update comment.
392 (attach_proc_task_lwp_callback): New function.
393 (linux_attach): Adjust to rename and use
394 linux_proc_attach_tgid_threads.
395 (linux_attach_fail_reason_string): Delete declaration.
397 2015-01-01 Joel Brobecker <brobecker@adacore.com>
399 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
400 * server.c (gdbserver_version): Likewise.
402 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
404 * remote-utils.c: Include ctype.h.
405 (input_interrupt): Explicitly handle the case when the char
406 received is the NUL byte. Improve the printing of non-ASCII
409 2014-12-16 Joel Brobecker <brobecker@adacore.com>
411 * linux-low.c (linux_low_filter_event): Update call to
412 linux_enable_event_reporting following the addition of
413 a new parameter to that function.
415 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
418 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
419 (AARCH64_FPCR_REGNO): Likewise.
420 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
421 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
422 (aarch64_store_fpregset): Likewise.
424 2014-12-15 Joel Brobecker <brobecker@adacore.com>
426 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
427 Remove FIXME comment about assumption about N.
429 2014-12-13 Joel Brobecker <brobecker@adacore.com>
431 * configure.ac: If large-file support is disabled in GDBserver,
432 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
433 * configure: Regenerate.
435 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
437 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
438 warning upon ENODATA from ptrace.
439 * linux-s390-low.c (s390_store_tdb): New.
440 (s390_regsets): Add regset for NT_S390_TDB.
442 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
444 * linux-low.c (regsets_store_inferior_registers): Skip regsets
445 without a fill_function.
446 * linux-s390-low.c (s390_fill_last_break): Remove.
447 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
448 (s390_arch_setup): Use regset's size instead of fill_function for
451 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
453 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
454 the regset's store function when ptrace returned an error.
455 * regcache.c (get_thread_regcache): Invalidate register cache
456 before fetching inferior's registers.
458 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
460 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
461 while-loop as for-loop.
462 (regsets_store_inferior_registers): Likewise.
464 2014-11-28 Yao Qi <yao@codesourcery.com>
466 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
467 * config.in, configure: Re-generate.
468 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
471 2014-11-21 Yao Qi <yao@codesourcery.com>
473 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
474 (AC_CHECK_HEADERS): Remove malloc.h.
475 * configure: Re-generated.
476 * config.in: Re-generated.
477 * server.h: Don't include alloca.h and malloc.h.
478 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
479 Don't include malloc.h.
481 2014-11-17 Joel Brobecker <brobecker@adacore.com>
483 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
484 corresponding ERRNO check in same block.
486 2014-11-12 Pedro Alves <palves@redhat.com>
488 * server.c (cont_thread): Update comment.
489 (start_inferior, attach_inferior): No longer clear cont_thread.
490 (handle_v_cont): No longer set cont_thread.
491 (captured_main): Clear cont_thread each time a GDB connects.
493 2014-11-12 Pedro Alves <palves@redhat.com>
495 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
496 thread, and don't resume all threads if the Hc thread has exited.
498 2014-11-12 Pedro Alves <palves@redhat.com>
500 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
501 the process group instead of to a specific LWP.
503 2014-10-15 Pedro Alves <palves@redhat.com>
506 * win32-arm-low.c (arm_set_thread_context): Remove current_event
508 (arm_set_thread_context): Delete.
509 (the_low_target): Adjust.
510 * win32-i386-low.c (debug_registers_changed)
511 (debug_registers_used): Delete.
512 (update_debug_registers_callback): New function.
513 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
514 needing to update their debug registers.
515 (win32_get_current_dr): New function.
516 (x86_dr_low_get_addr, x86_dr_low_get_control)
517 (x86_dr_low_get_status): Fetch the debug register from the thread
519 (i386_initial_stuff): Adjust.
520 (i386_get_thread_context): Remove current_event parameter. Don't
521 clear debug_registers_changed nor copy DR values to
523 (i386_set_thread_context): Delete.
524 (i386_prepare_to_resume): New function.
525 (i386_thread_added): Mark the thread as needing to update irs
527 (the_low_target): Remove i386_set_thread_context and install
528 i386_prepare_to_resume.
529 * win32-low.c (win32_get_thread_context): Adjust.
530 (win32_set_thread_context): Use SetThreadContext
532 (win32_prepare_to_resume): New function.
533 (win32_require_context): New function, factored out from ...
534 (thread_rec): ... this.
535 (continue_one_thread): Call win32_prepare_to_resume on each thread
536 we're about to continue.
537 (win32_resume): Call win32_prepare_to_resume on the event thread.
538 * win32-low.h (struct win32_thread_info)
539 <debug_registers_changed>: New field.
540 (struct win32_target_ops): Change prototype of set_thread_context,
541 delete set_thread_context and add prepare_to_resume.
542 (win32_require_context): New declaration.
544 2014-10-08 Gary Benson <gbenson@redhat.com>
546 * server.h: Do not include common-exceptions.h.
548 2014-10-08 Gary Benson <gbenson@redhat.com>
550 * server.h: Do not include cleanups.h.
552 2014-09-30 James Hogan <james.hogan@imgtec.com>
554 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
557 2014-09-23 Yao Qi <yao@codesourcery.com>
559 * linux-low.c (lp_status_maybe_breakpoint): New function.
560 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
561 (count_events_callback): Likewise.
562 (select_event_lwp_callback): Likewise.
563 (cancel_breakpoints_callback): Likewise.
565 2014-09-19 Don Breazeal <donb@codesourcery.com>
567 * linux-low.c (handle_extended_wait): Call
568 linux_ptrace_get_extended_event.
569 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
570 linux_is_extended_waitstatus.
572 2014-09-16 Joel Brobecker <brobecker@adacore.com>
574 * Makefile.in (CPPFLAGS): Define.
575 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
576 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
578 2014-09-16 Gary Benson <gbenson@redhat.com>
580 * inferiors.h (current_inferior): Renamed as...
581 (current_thread): New variable. All uses updated.
582 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
583 (maybe_move_out_of_jump_pad): Likewise.
584 (cancel_breakpoint): Likewise.
585 (linux_low_filter_event): Likewise.
586 (wait_for_sigstop): Likewise.
587 (linux_resume_one_lwp): Likewise.
588 (need_step_over_p): Likewise.
589 (start_step_over): Likewise.
590 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
591 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
592 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
593 and save_inferior as saved_thread.
594 * regcache.c (get_thread_regcache): Renamed saved_inferior as
596 (regcache_invalidate_thread): Likewise.
597 * remote-utils.c (prepare_resume_reply): Likewise.
598 * thread-db.c (thread_db_get_tls_address): Likewise.
599 (disable_thread_event_reporting): Likewise.
600 (remove_thread_event_breakpoints): Likewise.
601 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
603 * target.h (set_desired_inferior): Renamed as...
604 (set_desired_thread): New declaration. All uses updated.
605 * server.c (myresume): Updated comment to reference thread instead
607 (handle_serial_event): Likewise.
608 (handle_target_event): Likewise.
610 2014-09-12 Tom Tromey <tromey@redhat.com>
611 Gary Benson <gbenson@redhat.com>
613 * regcache.h: Include common-regcache.h.
614 (regcache_read_pc): Don't declare.
615 * regcache.c (get_thread_regcache_for_ptid): New function.
617 2014-09-11 Tom Tromey <tromey@redhat.com>
618 Gary Benson <gbenson@redhat.com>
620 * symbol.c: New file.
621 * Makefile.in (SFILES): Add symbol.c.
624 2014-09-11 Gary Benson <gbenson@redhat.com>
626 * target.c (target_stop_ptid, target_continue_ptid): New
629 2014-09-11 Tom Tromey <tromey@redhat.com>
630 Gary Benson <gbenson@redhat.com>
632 * target.h: Include target/target.h.
633 * target.c (target_read_memory, target_read_uint32)
634 (target_write_memory): New functions.
636 2014-09-11 Gary Benson <gbenson@redhat.com>
638 * server.h (debug_hw_points): Don't declare.
639 * server.c (debug_hw_points): Don't define. Replace all uses
640 with show_debug_regs.
641 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
642 all uses with show_debug_regs.
644 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
646 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
647 endianness into account.
648 (ppc_supply_ptrace_register): Likewise.
650 2014-09-03 James Hogan <james.hogan@imgtec.com>
652 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
653 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
655 2014-09-03 Gary Benson <gbenson@redhat.com>
657 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
658 ALL_DEBUG_ADDRESS_REGISTERS.
660 2014-09-02 Gary Benson <gbenson@redhat.com>
662 * i386-low.h: Renamed as...
663 * x86-low.h: New file. All type, function and variable name
664 prefixes changed from "i386_" to "x86_". All references updated.
665 * i386-low.c: Renamed as...
666 * x86-low.c: New file. All type, function and variable name
667 prefixes changed from "i386_" to "x86_". All references updated.
669 2014-09-02 Gary Benson <gbenson@redhat.com>
671 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
672 (x86_linux_new_thread): Likewise.
674 2014-08-29 Gary Benson <gbenson@redhat.com>
676 * server.h (setjmp.h): Do not include.
677 (toplevel): Do not declare.
678 (common-exceptions.h): Include.
679 (cleanups.h): Likewise.
680 * server.c (toplevel): Do not define.
681 (exit_code): New static global.
682 (detach_or_kill_for_exit_cleanup): New function.
683 (main): New function. Original main renamed to...
684 (captured_main): New function.
685 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
687 2014-08-29 Gary Benson <gbenson@redhat.com>
689 * Makefile.in (SFILES): Add common/common-exceptions.c.
690 (OBS): Add common-exceptions.o.
691 (common-exceptions.o): New rule.
692 * utils.c (prepare_to_throw_exception): New function.
694 2014-08-29 Gary Benson <gbenson@redhat.com>
696 * config.in: Regenerate.
697 * configure: Likewise.
699 2014-08-29 Gary Benson <gbenson@redhat.com>
701 * Makefile.in (SFILES): Add common/cleanups.c.
703 (cleanups.o): New rule.
705 2014-08-29 Gary Benson <gbenson@redhat.com>
707 * utils.c (internal_vwarning): New function.
709 2014-08-28 Gary Benson <gbenson@redhat.com>
711 * utils.h (fatal): Remove declaration.
712 * utils.c (fatal): Remove function.
714 2014-08-28 Gary Benson <gbenson@redhat.com>
716 * tracepoint.c (gdb_agent_init): Replace fatal with
718 (initialize_tracepoint): Likewise.
720 2014-08-28 Gary Benson <gbenson@redhat.com>
722 * remote-utils.c (remote_prepare): Replace fatal with error.
724 2014-08-28 Gary Benson <gbenson@redhat.com>
726 * linux-low.c (linux_async): Replace fatal with warning.
728 (linux_start_non_stop): Return -1 if linux_async failed.
730 2014-08-28 Gary Benson <gbenson@redhat.com>
732 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
734 (i386_dr_low_get_addr): Remove vague comment.
735 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
738 2014-08-28 Gary Benson <gbenson@redhat.com>
740 * inferiors.c (get_thread_process): Replace check with gdb_assert.
741 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
743 (linux_resume_one_lwp): Likewise.
744 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
746 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
748 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
749 (init_register_cache): Replace fatal with gdb_assert_not_reached.
750 (find_register_by_name): Replace fatal with internal_error.
751 (find_regno): Likewise.
752 * tdesc.c (init_target_desc): Replace check with gdb_assert.
753 * thread-db.c (thread_db_create_event): Likewise.
754 (thread_db_load_search): Likewise.
755 (try_thread_db_load_1): Likewise.
756 * tracepoint.c (get_jump_space_head): Replace fatal with
758 (claim_trampoline_space): Likewise.
759 (have_fast_tracepoint_trampoline_buffer): Likewise.
760 (cmd_qtstart): Likewise.
761 (stop_tracing): Likewise.
762 (fast_tracepoint_collecting): Likewise.
763 (target_malloc): Likewise.
764 (download_tracepoint): Likewise.
765 (download_trace_state_variables): Replace check with gdb_assert.
766 (upload_fast_traceframes): Replace fatal with internal_error.
768 2014-08-19 Tom Tromey <tromey@redhat.com>
769 Gary Benson <gbenson@redhat.com>
771 * Makefile.in (SFILES): Add common/common-debug.c.
772 (OBS): Add common-debug.o.
773 (common-debug.o): New rule.
774 * debug.h (debug_printf): Don't declare.
775 * debug.c (debug_printf): Renamed and rewritten as...
776 (debug_vprintf): New function.
778 2014-08-19 Gary Benson <gbenson@redhat.com>
780 * utils.h: Do not include print-utils.h.
782 2014-08-19 Tom Tromey <tromey@redhat.com>
783 Gary Benson <gbenson@redhat.com>
785 * server.h: Add static assertion.
786 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
788 2014-08-19 Tom Tromey <tromey@redhat.com>
789 Gary Benson <gbenson@redhat.com>
791 * Makefile.in (SFILES): Add common/errors.c.
793 (IPA_OBS): Add errors-ipa.o.
794 (errors.o): New rule.
795 (errors-ipa.o): Likewise.
796 * utils.h (perror_with_name, error, warning): Don't declare.
797 * utils.c (warning): Renamed and rewritten as...
798 (vwarning): New function.
799 (error): Renamed and rewritten as...
800 (verror): New function.
801 (internal_error): Renamed and rewritten as...
802 (internal_verror): New function.
804 2014-08-07 Gary Benson <gbenson@redhat.com>
806 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
807 * configure: Regenerate.
808 * config.in: Likewise.
809 * server.h: Do not include errno.h.
810 * event-loop.c: Likewise.
811 * hostio-errno.c: Likewise.
812 * linux-low.c: Likewise.
813 * remote-utils.c: Likewise.
814 * spu-low.c: Likewise.
816 * gdbreplay.c: Unconditionally include errno.h.
818 2014-08-07 Gary Benson <gbenson@redhat.com>
820 * server.h: Do not include string.h.
821 * event-loop.c: Likewise.
822 * linux-low.c: Likewise.
823 * regcache.c: Likewise.
824 * remote-utils.c: Likewise.
825 * spu-low.c: Likewise.
828 2014-08-07 Gary Benson <gbenson@redhat.com>
830 * server.h: Do not include gdb_assert.h.
832 2014-08-07 Gary Benson <gbenson@redhat.com>
834 * server.h: Do not include common-utils.h.
836 2014-08-07 Gary Benson <gbenson@redhat.com>
838 * server.h: Do not include ptid.h.
841 2014-08-07 Gary Benson <gbenson@redhat.com>
843 * server.h: Do not include gdb_locale.h.
845 2014-08-07 Gary Benson <gbenson@redhat.com>
847 * server.h: Do not include gdb/signals.h.
848 * win32-low.c: Likewise.
850 2014-08-07 Gary Benson <gbenson@redhat.com>
852 * server.h: Do not include pathmax.h.
854 2014-08-07 Gary Benson <gbenson@redhat.com>
856 * server.h: Do not include libiberty.h.
857 * linux-bfin-low.c: Likewise.
859 2014-08-07 Gary Benson <gbenson@redhat.com>
861 * server.h: Do not include ansidecl.h.
863 2014-08-07 Gary Benson <gbenson@redhat.com>
865 * linux-x86-low.c: Do not include stddef.h.
866 * lynx-ppc-low.c: Likewise.
867 * tracepoint.c: Likewise.
869 2014-08-07 Gary Benson <gbenson@redhat.com>
871 * server.h: Do not include stdarg.h.
872 * nto-low.c: Likewise.
874 2014-08-07 Gary Benson <gbenson@redhat.com>
876 * server.h: Do not include stdlib.h.
877 * inferiors.c: Likewise.
878 * linux-low.c: Likewise.
879 * regcache.c: Likewise.
880 * spu-low.c: Likewise.
881 * tracepoint.c: Likewise.
884 2014-08-07 Gary Benson <gbenson@redhat.com>
886 * server.h: Do not include stdio.h.
887 * linux-low.c: Likewise.
888 * remote-utils.c: Likewise.
889 * spu-low.c: Likewise.
891 * wincecompat.c: Likewise.
893 2014-08-06 Gary Benson <gbenson@redhat.com>
895 * regcache.c (init_register_cache): Move conditionals inside if.
897 2014-08-06 Gary Benson <gbenson@redhat.com>
899 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
901 2014-07-31 Gary Benson <gbenson@redhat.com>
903 * ax.h: Do not include server.h.
904 * gdbthread.h: Likewise.
905 * lynx-low.h: Likewise.
908 2014-07-30 Gary Benson <gbenson@redhat.com>
910 * server.h: Include common-defs.h.
911 Do not include config.h or build-gnulib-gdbserver/config.h.
913 2014-07-30 Gary Benson <gbenson@redhat.com>
915 * hostio-errno.c: Move server.h to top of includes list.
916 * inferiors.c: Likewise.
917 * linux-x86-low.c: Likewise.
918 * notif.c: Include server.h.
920 2014-07-24 Tom Tromey <tromey@redhat.com>
921 Gary Benson <gbenson@redhat.com>
923 * server.h (CORE_ADDR): Now unsigned.
925 2014-07-16 Pedro Alves <palves@redhat.com>
927 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
929 2014-07-15 Pedro Alves <palves@redhat.com>
931 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
934 2014-07-11 Pedro Alves <palves@redhat.com>
936 * linux-low.c (kill_wait_lwp): New function, based on
937 kill_one_lwp_callback, but use my_waitpid directly.
938 (kill_one_lwp_callback, linux_kill): Use it.
940 2014-06-23 Pedro Alves <palves@redhat.com>
942 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
943 before setting DR0..DR3.
945 2014-06-20 Gary Benson <gbenson@redhat.com>
947 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
948 * configure: Regenerated.
949 * config.in: Likewise.
951 2014-06-20 Gary Benson <gbenson@redhat.com>
953 * Makefile.in (SFILES): Update locations for files moved
955 (object file files): Reordered.
957 2014-06-20 Gary Benson <gbenson@redhat.com>
959 * i386-low.h (i386_dr_low_can_set_addr): Removed.
960 (i386_dr_low_set_addr): Likewise.
961 (i386_dr_low_get_addr): Likewise.
962 (i386_dr_low_can_set_control): Likewise.
963 (i386_dr_low_set_control): Likewise.
964 (i386_dr_low_get_control): Likewise.
965 (i386_dr_low_get_status): Likewise.
966 (i386_get_debug_register_length): Likewise.
967 * linux-x86-low.c (i386_dr_low_set_addr):
968 Changed signature. Made static.
969 (i386_dr_low_get_addr): Likewise.
970 (i386_dr_low_set_control): Likewise.
971 (i386_dr_low_get_control): Likewise.
972 (i386_dr_low_get_status): Likewise.
973 (i386_dr_low): New global variable.
974 * win32-i386-low.c (i386_dr_low_set_addr):
975 Changed signature. Made static.
976 (i386_dr_low_get_addr): Likewise.
977 (i386_dr_low_set_control): Likewise.
978 (i386_dr_low_get_control): Likewise.
979 (i386_dr_low_get_status): Likewise.
980 (i386_dr_low): New global variable.
982 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
984 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
985 * Makefile.in (AR, AR_FLAGS): Define.
986 * configure: Regenerate.
988 2014-06-19 Gary Benson <gbenson@redhat.com>
990 * Makefile.in (i386-dregs.o): New rule.
991 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
992 * i386-low.c (target.h): Remove include.
993 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
994 (DR_CONTROL_SHIFT): Likewise.
995 (DR_CONTROL_SIZE): Likewise.
996 (DR_RW_EXECUTE): Likewise.
997 (DR_RW_WRITE): Likewise.
998 (DR_RW_READ): Likewise.
999 (DR_RW_IORW): Likewise.
1000 (DR_LEN_1): Likewise.
1001 (DR_LEN_2): Likewise.
1002 (DR_LEN_4): Likewise.
1003 (DR_LEN_8): Likewise.
1004 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1005 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1006 (DR_ENABLE_SIZE): Likewise.
1007 (DR_LOCAL_SLOWDOWN): Likewise.
1008 (DR_GLOBAL_SLOWDOWN): Likewise.
1009 (DR_CONTROL_RESERVED): Likewise.
1010 (I386_DR_CONTROL_MASK): Likewise.
1011 (I386_DR_VACANT): Likewise.
1012 (I386_DR_LOCAL_ENABLE): Likewise.
1013 (I386_DR_GLOBAL_ENABLE): Likewise.
1014 (I386_DR_DISABLE): Likewise.
1015 (I386_DR_SET_RW_LEN): Likewise.
1016 (I386_DR_GET_RW_LEN): Likewise.
1017 (I386_DR_WATCH_HIT): Likewise.
1018 (i386_wp_op_t): Likewise.
1019 (i386_show_dr): Likewise.
1020 (i386_length_and_rw_bits): Likewise.
1021 (i386_insert_aligned_watchpoint): Likewise.
1022 (i386_remove_aligned_watchpoint): Likewise.
1023 (i386_handle_nonaligned_watchpoint): Likewise.
1024 i386_update_inferior_debug_regs(): Likewise.
1025 (i386_dr_insert_watchpoint): Likewise.
1026 (i386_dr_remove_watchpoint): Likewise.
1027 (i386_dr_region_ok_for_watchpoint): Likewise.
1028 (i386_dr_stopped_data_address): Likewise.
1029 (i386_dr_stopped_by_watchpoint): Likewise.
1031 2014-06-19 Gary Benson <gbenson@redhat.com>
1033 * i386-low.c (i386_dr_show): Renamed to
1034 i386_show_dr and made static. All uses updated.
1035 (i386_dr_length_and_rw_bits): Renamed to
1036 i386_length_and_rw_bits and made static.
1038 (i386_dr_insert_aligned_watchpoint): Renamed to
1039 i386_insert_aligned_watchpoint and made static.
1041 (i386_dr_remove_aligned_watchpoint): Renamed to
1042 i386_remove_aligned_watchpoint and made static.
1044 (i386_dr_update_inferior_debug_regs): Renamed to
1045 i386_update_inferior_debug_regs and made static.
1048 2014-06-18 Gary Benson <gbenson@redhat.com>
1050 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1051 (i386_dr_low_can_set_control): Likewise.
1052 (i386_get_debug_register_length): Likewise.
1053 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1054 (i386_dr_low_can_set_control): Likewise.
1055 (i386_get_debug_register_length): Likewise.
1057 2014-06-17 Gary Benson <gbenson@redhat.com>
1059 * i386-low.h (i386-dregs.h): New include.
1060 (DR_FIRSTADDR): Now in i386-dregs.h.
1061 (DR_LASTADDR): Likewise.
1062 (DR_NADDR): Likewise.
1063 (DR_STATUS): Likewise.
1064 (DR_CONTROL): Likewise.
1065 (i386_debug_reg_state): Likewise.
1066 (i386_dr_insert_watchpoint): Likewise.
1067 (i386_dr_remove_watchpoint): Likewise.
1068 (i386_dr_region_ok_for_watchpoint): Likewise.
1069 (i386_dr_stopped_data_address): Likewise.
1070 (i386_dr_stopped_by_watchpoint): Likewise.
1071 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1073 2014-06-18 Gary Benson <gbenson@redhat.com>
1075 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1076 i386_dr_insert_watchpoint.
1077 (i386_low_remove_watchpoint): Renamed to
1078 i386_dr_remove_watchpoint.
1079 (i386_low_region_ok_for_watchpoint): Renamed to
1080 i386_dr_region_ok_for_watchpoint.
1081 (i386_low_stopped_data_address): Renamed to
1082 i386_dr_stopped_data_address.
1083 (i386_low_stopped_by_watchpoint): Renamed to
1084 i386_dr_stopped_by_watchpoint.
1085 * i386-low.c (i386_show_dr): Renamed to
1086 i386_dr_show and made nonstatic. All uses updated.
1087 (i386_length_and_rw_bits): Renamed to
1088 i386_dr_length_and_rw_bits and made nonstatic.
1090 (i386_insert_aligned_watchpoint): Renamed to
1091 i386_dr_insert_aligned_watchpoint and made nonstatic.
1093 (i386_remove_aligned_watchpoint): Renamed to
1094 i386_dr_remove_aligned_watchpoint and made nonstatic.
1096 (i386_update_inferior_debug_regs): Renamed to
1097 i386_dr_update_inferior_debug_regs and made nonstatic.
1099 (i386_low_insert_watchpoint): Renamed to
1100 i386_dr_insert_watchpoint. All uses updated.
1101 (i386_low_remove_watchpoint): Renamed to
1102 i386_dr_remove_watchpoint. All uses updated.
1103 (i386_low_region_ok_for_watchpoint): Renamed to
1104 i386_dr_region_ok_for_watchpoint. All uses updated.
1105 (i386_low_stopped_data_address): Renamed to
1106 i386_dr_stopped_data_address. All uses updated.
1107 (i386_low_stopped_by_watchpoint): Renamed to
1108 i386_dr_stopped_by_watchpoint. All uses updated.
1110 2014-06-18 Gary Benson <gbenson@redhat.com>
1112 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1113 (i386_dr_low_can_set_control): Likewise.
1114 (i386_insert_aligned_watchpoint): New check.
1116 2014-06-18 Gary Benson <gbenson@redhat.com>
1118 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1121 2014-06-18 Gary Benson <gbenson@redhat.com>
1123 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1124 instead of fatal and error.
1125 (i386_handle_nonaligned_watchpoint): Likewise.
1127 2014-06-18 Gary Benson <gbenson@redhat.com>
1129 * i386-low.c (i386_get_debug_register_length): New macro.
1130 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1131 (i386_show_dr): Use debug_printf instead of fprintf. Use
1132 phex to format values.
1134 2014-06-18 Gary Benson <gbenson@redhat.com>
1136 * i386-low.h: Comment changes.
1137 * i386-low.c: Likewise.
1139 2014-06-18 Gary Benson <gbenson@redhat.com>
1141 * i386-low.c: Whitespace changes.
1143 2014-06-12 Tom Tromey <tromey@redhat.com>
1145 * utils.c (freeargv): Remove.
1147 2014-06-12 Tom Tromey <tromey@redhat.com>
1149 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1150 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1151 (parse_debug_format_options): Likewise.
1152 (gdbserver_usage): Likewise.
1153 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1154 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1155 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1157 ($(LIBGNU)): Depend on libiberty.
1158 (all-lib): Recurse into all subdirs.
1159 (install-only): Invoke "install" target in subdirs.
1160 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1162 * configure: Rebuild.
1163 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1164 for vasprintf, vsnprintf, or gettimeofday.
1165 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1168 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1170 * development.sh: Delete.
1171 * Makefile.in (config.status): Adjust dependency on development.sh.
1172 * configure.ac: Adjust development.sh source call.
1173 * configure: Regenerate.
1175 2014-06-02 Pedro Alves <palves@redhat.com>
1177 * ax.c (gdb_free_agent_expr): New function.
1178 * ax.h (gdb_free_agent_expr): New declaration.
1179 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1181 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1183 (clear_breakpoint_conditions_and_commands): New function.
1184 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1185 (clear_breakpoint_conditions_and_commands): New declaration.
1187 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1189 * linux-aarch64-low.c (asm/ptrace.h): Include.
1191 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1193 Fix TLS access for -static -pthread.
1194 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1195 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1196 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1198 2014-05-20 Pedro Alves <palves@redhat.com>
1200 * linux-aarch64-low.c (aarch64_insert_point)
1201 (aarch64_remove_point): No longer check whether the type is
1202 supported here. Adjust to new interface.
1203 (the_low_target): Install aarch64_supports_z_point_type as
1204 supports_z_point_type method.
1205 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1206 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1207 instead of a Z packet char. Adjust.
1208 (arm_supports_z_point_type): New function.
1209 (arm_insert_point, arm_remove_point): Adjust to new interface.
1210 (the_low_target): Install arm_supports_z_point_type.
1211 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1212 (cris_insert_point, cris_remove_point): Adjust to new interface.
1213 Don't check whether the type is supported here.
1214 (the_low_target): Install cris_supports_z_point_type.
1215 * linux-low.c (linux_supports_z_point_type): New function.
1216 (linux_insert_point, linux_remove_point): Adjust to new interface.
1217 * linux-low.h (struct linux_target_ops) <insert_point,
1218 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1219 raw_breakpoint pointer parameter.
1220 <supports_z_point_type>: New method.
1221 * linux-mips-low.c (mips_supports_z_point_type): New function.
1222 (mips_insert_point, mips_remove_point): Adjust to new interface.
1223 Use mips_supports_z_point_type.
1224 (the_low_target): Install mips_supports_z_point_type.
1225 * linux-ppc-low.c (the_low_target): Install NULL as
1226 supports_z_point_type method.
1227 * linux-s390-low.c (the_low_target): Install NULL as
1228 supports_z_point_type method.
1229 * linux-sparc-low.c (the_low_target): Install NULL as
1230 supports_z_point_type method.
1231 * linux-x86-low.c (x86_supports_z_point_type): New function.
1232 (x86_insert_point): Adjust to new insert_point interface. Use
1233 insert_memory_breakpoint. Adjust to new
1234 i386_low_insert_watchpoint interface.
1235 (x86_remove_point): Adjust to remove_point interface. Use
1236 remove_memory_breakpoint. Adjust to new
1237 i386_low_remove_watchpoint interface.
1238 (the_low_target): Install x86_supports_z_point_type.
1239 * lynx-low.c (lynx_target_ops): Install NULL as
1240 supports_z_point_type callback.
1241 * nto-low.c (nto_supports_z_point_type): New.
1242 (nto_insert_point, nto_remove_point): Adjust to new interface.
1243 (nto_target_ops): Install nto_supports_z_point_type.
1244 * mem-break.c: Adjust intro comment.
1245 (struct raw_breakpoint) <raw_type, size>: New fields.
1246 <inserted>: Update comment.
1247 <shlib_disabled>: Delete field.
1248 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1249 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1250 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1251 (raw_bkpt_type_to_target_hw_bp_type): New function.
1252 (find_enabled_raw_code_breakpoint_at): New function.
1253 (find_raw_breakpoint_at): New type and size parameters. Use them.
1254 (insert_memory_breakpoint): New function, based off
1255 set_raw_breakpoint_at.
1256 (remove_memory_breakpoint): New function.
1257 (set_raw_breakpoint_at): Reimplement.
1258 (set_breakpoint): New, based on set_breakpoint_at.
1259 (set_breakpoint_at): Reimplement.
1260 (delete_raw_breakpoint): Go through the_target->remove_point
1261 instead of assuming memory breakpoints.
1262 (find_gdb_breakpoint_at): Delete.
1263 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1264 (find_gdb_breakpoint): New function.
1265 (set_gdb_breakpoint_at): Delete.
1266 (z_type_supported): New function.
1267 (set_gdb_breakpoint_1): New function, loosely based off
1268 set_gdb_breakpoint_at.
1269 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1270 (delete_gdb_breakpoint_at): Delete.
1271 (delete_gdb_breakpoint_1): New function, loosely based off
1272 delete_gdb_breakpoint_at.
1273 (delete_gdb_breakpoint): New function.
1274 (clear_gdb_breakpoint_conditions): Rename to ...
1275 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1277 (add_condition_to_breakpoint): Make static.
1278 (add_breakpoint_condition): Take a struct breakpoint pointer
1279 instead of an address. Adjust.
1280 (gdb_condition_true_at_breakpoint): Rename to ...
1281 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1283 (gdb_condition_true_at_breakpoint): Reimplement.
1284 (add_breakpoint_commands): Take a struct breakpoint pointer
1285 instead of an address. Adjust.
1286 (gdb_no_commands_at_breakpoint): Rename to ...
1287 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1288 parameter. Return true if no breakpoint was found. Change debug
1290 (gdb_no_commands_at_breakpoint): Reimplement.
1291 (run_breakpoint_commands): Rename to ...
1292 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1293 and change return type to boolean.
1294 (run_breakpoint_commands): New function.
1295 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1296 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1297 breakpoint. Go through the_target->remove_point instead of
1298 assuming memory breakpoint.
1299 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1300 software and hardware breakpoints.
1301 (reinsert_raw_breakpoint): Go through the_target->insert_point
1302 instead of assuming memory breakpoint.
1303 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1304 software and hardware breakpoints.
1305 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1306 Check both software and hardware breakpoints.
1307 (validate_inserted_breakpoint): Assert the breakpoint is a
1308 software breakpoint. Set the inserted flag to -1 instead of
1309 setting shlib_disabled.
1310 (delete_disabled_breakpoints): Adjust.
1311 (validate_breakpoints): Only validate software breakpoints.
1312 Adjust to inserted flag change.
1313 (check_mem_read, check_mem_write): Skip breakpoint types other
1314 than software breakpoints. Adjust to inserted flag change.
1315 * mem-break.h (enum raw_bkpt_type): New enum.
1316 (raw_breakpoint, struct process_info): Forward declare.
1317 (Z_packet_to_target_hw_bp_type): Delete declaration.
1318 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1319 (set_gdb_breakpoint, delete_gdb_breakpoint)
1320 (clear_breakpoint_conditions): New declarations.
1321 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1322 (breakpoint_inserted_here): Update comment.
1323 (add_breakpoint_condition, add_breakpoint_commands): Replace
1324 address parameter with a breakpoint pointer parameter.
1325 (gdb_breakpoint_here): Update comment.
1326 (delete_gdb_breakpoint_at): Delete.
1327 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1328 * server.c (process_point_options): Take a struct breakpoint
1329 pointer instead of an address. Adjust.
1330 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1331 delete_gdb_breakpoint.
1332 * spu-low.c (spu_target_ops): Install NULL as
1333 supports_z_point_type method.
1334 * target.h: Include mem-break.h.
1335 (struct target_ops) <prepare_to_access_memory>: Update comment.
1336 <supports_z_point_type>: New field.
1337 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1338 instead of a char. Also take a raw breakpoint pointer.
1339 * win32-arm-low.c (the_low_target): Install NULL as
1340 supports_z_point_type.
1341 * win32-i386-low.c (i386_supports_z_point_type): New function.
1342 (i386_insert_point, i386_remove_point): Adjust to new interface.
1343 (the_low_target): Install i386_supports_z_point_type.
1344 * win32-low.c (win32_supports_z_point_type): New function.
1345 (win32_insert_point, win32_remove_point): Adjust to new interface.
1346 (win32_target_ops): Install win32_supports_z_point_type.
1347 * win32-low.h (struct win32_target_ops):
1348 <supports_z_point_type>: New method.
1349 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1350 instead of a char. Also take a raw breakpoint pointer.
1352 2014-05-20 Pedro Alves <palves@redhat.com>
1354 * mem-break.h: Include break-common.h.
1355 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1356 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1357 (Z_packet_to_target_hw_bp_type): New declaration.
1358 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1359 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1360 (Z_PACKET_ACCESS_WP): Delete macros.
1361 (Z_packet_to_hw_type): Delete function.
1362 * i386-low.h: Don't include break-common.h here.
1363 (Z_packet_to_hw_type): Delete declaration.
1364 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1365 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1366 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1367 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1368 * linux-aarch64-low.c: Don't include break-common.h here.
1369 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1370 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1371 (Z_packet_to_target_hw_bp_type): Delete function.
1372 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1374 (mips_insert_point, mips_remove_point): Use
1375 Z_packet_to_target_hw_bp_type.
1377 2014-05-20 Pedro Alves <palves@redhat.com>
1379 * linux-aarch64-low.c: Include break-common.h.
1380 (enum target_point_type): Delete.
1381 (Z_packet_to_point_type): Rename to ...
1382 (Z_packet_to_target_hw_bp_type): ... this, and return a
1383 target_hw_bp_type instead.
1384 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1385 instead of an enum target_point_type.
1386 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1388 (aarch64_dr_state_insert_one_point)
1389 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1390 (aarch64_handle_aligned_watchpoint)
1391 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1392 Take an enum target_hw_bp_type instead of an enum
1394 (aarch64_supports_z_point_type): New function.
1395 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1396 use Z_packet_to_target_hw_bp_type.
1398 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1400 * configure.ac: Only use -Werror by default when DEVELOPMENT
1402 * configure: Regenerate.
1404 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1406 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1407 * linux-x86-low.c (X86_64_USER_REGS): New.
1408 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1410 2014-04-28 Yao Qi <yao@codesourcery.com>
1412 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1415 2014-04-25 Pedro Alves <palves@redhat.com>
1418 * linux-low.c (linux_attach_fail_reason_string): New function.
1419 (linux_attach_lwp): Delete.
1420 (linux_attach_lwp_1): Rename to ...
1421 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1422 argument. Remove "initial" parameter. Return int instead of
1423 void. Don't error or warn here.
1424 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1425 failure to attach to the tgid. Call warning when failing to
1427 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1428 argument. Remove "initial" parameter. Return int instead of
1429 void. Don't error or warn here.
1430 (linux_attach_fail_reason_string): New declaration.
1431 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1432 interface change. Use linux_attach_fail_reason_string.
1434 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1435 Walfred Tedeschi <walfred.tedeschi@intel.com>
1437 * Makefile.in: Added rules to handle new files
1438 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1439 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1440 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1441 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1442 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1443 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1445 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1446 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1447 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1448 i386/x32-avx512.xml.
1449 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1450 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1451 i386/x32-avx512-linux.xml.
1452 * i387-fp.c (num_avx512_k_registers): New constant for number
1454 (num_avx512_zmmh_low_registers): New constant for number of
1455 lower ZMM registers (0-15).
1456 (num_avx512_zmmh_high_registers): New constant for number of
1457 higher ZMM registers (16-31).
1458 (num_avx512_ymmh_registers): New contant for number of higher
1459 YMM registers (ymm16-31 added by avx521 on x86_64).
1460 (num_avx512_xmm_registers): New constant for number of higher
1461 XMM registers (xmm16-31 added by AVX512 on x86_64).
1462 (struct i387_xsave): Add space for AVX512 registers.
1463 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1464 Add code to handle AVX512 registers.
1465 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1466 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1467 prototypei from generated file.
1468 (tdesc_amd64_avx512_linux): Likewise.
1469 (init_registers_x32_avx512_linux): Likewise.
1470 (tdesc_x32_avx512_linux): Likewise.
1471 (init_registers_i386_avx512_linux): Likewise.
1472 (tdesc_i386_avx512_linux): Likewise.
1473 (x86_64_regmap): Add AVX512 registers.
1474 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1476 (initialize_low_arch): Add code to initialize AVX512 registers.
1478 2014-04-23 Pedro Alves <palves@redhat.com>
1480 * mem-break.c (find_gdb_breakpoint_at): Make static.
1481 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1483 2014-04-23 Pedro Alves <palves@redhat.com>
1485 * i386-low.c: Don't include break-common.h here.
1486 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1487 prototype to take target_hw_bp_type as argument instead of a Z
1489 * i386-low.h: Include break-common.h here.
1490 (Z_packet_to_hw_type): Declare.
1491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1493 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1494 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1495 (x86_remove_point): Convert the packet number to a
1496 target_hw_bp_type before calling i386_low_remove_watchpoint.
1497 * win32-i386-low.c (i386_insert_point): Convert the packet number
1498 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1499 (i386_remove_point): Convert the packet number to a
1500 target_hw_bp_type before calling i386_low_remove_watchpoint.
1502 2014-04-23 Pedro Alves <palves@redhat.com>
1504 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1506 2014-04-10 Pedro Alves <palves@redhat.com>
1508 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1509 Check if the condition or command is NULL before checking if the
1510 breakpoint is known. On success, return true.
1511 * mem-break.h (add_breakpoint_condition): Document return.
1512 (add_breakpoint_commands): Add describing comment.
1513 * server.c (skip_to_semicolon): New function.
1514 (process_point_options): Use it.
1516 2014-04-09 Pedro Alves <palves@redhat.com>
1518 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1521 2014-02-27 Pedro Alves <palves@redhat.com>
1524 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1526 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1528 (last_thread_of_process_p): Take a PID argument instead of a
1530 (linux_wait_for_lwp): Delete.
1531 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1533 (linux_low_filter_event): New function, party factored out from
1534 linux_wait_for_event.
1535 (linux_wait_for_event): Rename to ...
1536 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1537 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1538 sigsuspend. Check for zombie leaders.
1539 (linux_wait_for_event): Reimplement as wrapper around
1540 linux_wait_for_event_filtered.
1541 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1542 a normal or signal exit is seen, it's the whole process exiting.
1543 (wait_for_sigstop): No longer a for_each_inferior callback.
1544 Rewrite on top of linux_wait_for_event_filtered.
1545 (stop_all_lwps): Call wait_for_sigstop directly.
1546 * server.c (resume, handle_target_event): Handle
1547 TARGET_WAITKIND_NO_RESUMED.
1549 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1551 * win32-low.c (psapi_get_dll_name,
1552 * win32_CreateToolhelp32Snapshot): Delete.
1553 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1554 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1556 (handle_load_dll): Add function description.
1557 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1559 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1561 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1563 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1564 base address when calling win32_add_one_solib.
1565 (handle_load_dll): Delete local variable load_addr.
1566 Remove 0x1000 offset applied to DLL base address when calling
1567 win32_add_one_solib.
1568 (handle_unload_dll): Add comment.
1570 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1572 * win32-low.c (win32_add_all_dlls): Renames
1573 win32_ensure_ntdll_loaded. Rewrite function documentation.
1574 Adjust implementation to always load all DLLs.
1575 Add 0x1000 offset to DLL base address when calling
1576 win32_add_one_solib.
1577 (child_initialization_done): New static global.
1578 (do_initial_child_stuff): Set child_initialization_done to
1579 zero during child initialization, and 1 after. Replace call
1580 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1582 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1583 (handle_unload_dll): Add function documentation.
1584 (get_child_debug_event): Ignore load and unload DLL events
1585 during child initialization.
1587 2014-02-20 Doug Evans <dje@google.com>
1589 Remove global all_lwps.
1590 * inferiors.h (ptid_of): Move here from linux-low.h.
1591 (pid_of, lwpid_of): Ditto.
1592 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1593 parameter is a struct thread_info * now.
1594 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1595 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1596 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1598 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1599 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1600 * linux-arm-low.c (update_registers_callback): Update, "entry"
1601 parameter is a struct thread_info * now.
1602 Fetch lwpid from current_inferior directly.
1603 (arm_insert_point): Pass &all_threads to find_inferior instead of
1605 (arm_remove_point): Ditto.
1606 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1607 (arm_prepare_to_resume): Fetch pid from thread.
1608 (arm_read_description): Fetch lwpid from current_inferior directly.
1609 * linux-low.c (all_lwps): Delete.
1610 (delete_lwp): Delete call to remove_inferior.
1611 (handle_extended_wait): Fetch lwpid from thread.
1612 (add_lwp): Don't set lwp->entry.id. Remove call to
1613 add_inferior_to_list.
1614 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1615 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1616 (kill_one_lwp_callback): Ditto.
1617 (linux_kill): Don't dereference NULL pointer.
1618 Fetch ptid,lwpid from thread.
1619 (get_detach_signal): Fetch ptid from thread.
1620 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1621 Simplify call to regcache_invalidate_thread.
1622 (delete_lwp_callback): Update, "entry" parameter is a
1623 struct thread_info * now. Fetch pid from thread.
1624 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1625 (status_pending_p_callback): Update, "entry" parameter is a
1626 struct thread_info * now. Fetch ptid from thread.
1627 (find_lwp_pid): Update, "entry" parameter is a
1628 struct thread_info * now.
1629 (linux_wait_for_lwp): Fetch pid from thread.
1630 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1631 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1632 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1633 (dequeue_one_deferred_signal): Ditto.
1634 (cancel_breakpoint): Fetch ptid from current_inferior.
1635 (linux_wait_for_event): Pass &all_threads to find_inferior,
1636 not &all_lwps. Fetch ptid, lwpid from thread.
1637 (count_events_callback): Update, "entry" parameter is a
1638 struct thread_info * now.
1639 (select_singlestep_lwp_callback): Ditto.
1640 (select_event_lwp_callback): Ditto.
1641 (cancel_breakpoints_callback): Ditto.
1642 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1644 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1645 (unsuspend_one_lwp): Update, "entry" parameter is a
1646 struct thread_info * now.
1647 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1649 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1650 Fetch lwpid from thread, not lwp.
1651 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1652 Pass &all_threads to find_inferior, not &all_lwps.
1653 (send_sigstop): Fetch lwpid from thread, not lwp.
1654 (send_sigstop_callback): Update, "entry" parameter is a
1655 struct thread_info * now.
1656 (suspend_and_send_sigstop_callback): Ditto.
1657 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1658 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1659 struct thread_info * now.
1660 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1662 (lwp_running): Update, "entry" parameter is a
1663 struct thread_info * now.
1664 (stop_all_lwps): Fetch ptid from thread.
1665 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1666 (linux_resume_one_lwp): Fetch lwpid from thread.
1667 (linux_set_resume_request): Update, "entry" parameter is a
1668 struct thread_info * now. Fetch pid, lwpid from thread.
1669 (resume_status_pending_p): Update, "entry" parameter is a
1670 struct thread_info * now.
1671 (need_step_over_p): Ditto. Fetch lwpid from thread.
1672 (start_step_over): Fetch lwpid from thread.
1673 (linux_resume_one_thread): Update, "entry" parameter is a
1674 struct thread_info * now. Fetch lwpid from thread.
1675 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1676 (proceed_one_lwp): Update, "entry" parameter is a
1677 struct thread_info * now. Fetch lwpid from thread.
1678 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1679 struct thread_info * now.
1680 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1681 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1682 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1684 (regsets_store_inferior_registers): Ditto.
1685 (fetch_register, store_register): Ditto.
1686 (linux_read_memory, linux_write_memory): Ditto.
1687 (linux_request_interrupt): Ditto.
1688 (linux_read_auxv): Ditto.
1689 (linux_xfer_siginfo): Ditto.
1690 (linux_qxfer_spu): Ditto.
1691 (linux_qxfer_libraries_svr4): Ditto.
1692 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1693 moved to inferiors.h.
1695 (get_thread_lwp): Update.
1696 (struct lwp_info): Delete member "entry". Simplify comment for
1699 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1700 current_inferior directly.
1701 (update_watch_registers_callback): Update, "entry" parameter is a
1702 struct thread_info * now. Fetch pid from thread.
1703 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1704 (mips_insert_point): Fetch lwpid from current_inferior.
1705 Pass &all_threads to find_inferior, not &all_lwps.
1706 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1707 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1709 (mips_stopped_data_address): Ditto.
1710 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1712 * linux-tile-low.c (tile_arch_setup): Ditto.
1713 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1714 (update_debug_registers_callback): Update, "entry" parameter is a
1715 struct thread_info * now. Fetch pid from thread.
1716 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1717 Pass &all_threads to find_inferior, not &all_lwps.
1718 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1719 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1720 Pass &all_threads to find_inferior, not &all_lwps.
1721 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1722 (i386_dr_low_get_status): Ditto.
1723 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1724 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1725 (x86_linux_read_description): Ditto.
1726 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1728 2014-02-20 Doug Evans <dje@google.com>
1730 * inferiors.c (get_first_inferior): Fix buglet.
1732 2014-02-19 Doug Evans <dje@google.com>
1734 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1735 * inferiors.c (add_thread): Change result type to struct thread_info *.
1736 All callers updated.
1737 (add_lwp): Call add_thread here instead of in callers.
1738 All callers updated.
1739 * linux-low.h (get_lwp_thread): Rewrite.
1740 (struct lwp_info): New member "thread".
1742 2014-02-19 Doug Evans <dje@google.com>
1744 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1745 All callers updated.
1747 2014-02-19 Doug Evans <dje@google.com>
1749 * inferiors.c (add_thread): Fix whitespace.
1751 2014-02-19 Doug Evans <dje@google.com>
1753 * dll.c (clear_dlls): Replace accessing list implemention details
1755 * gdbthread.h (get_first_thread): Declare.
1756 * inferiors.c (for_each_inferior_with_data): New function.
1757 (get_first_thread): New function.
1758 (find_thread_ptid): Simplify.
1759 (get_first_inferior): New function.
1760 (clear_list): Delete.
1761 (one_inferior_p): New function.
1762 (clear_inferior_list): New function.
1763 (clear_inferiors): Update.
1764 * inferiors.h (for_each_inferior_with_data): Declare.
1765 (clear_inferior_list): Declare.
1766 (one_inferior_p): Declare.
1767 (get_first_inferior): Declare.
1768 * linux-low.c (linux_wait_for_event): Replace accessing list
1769 implemention details with API function.
1770 * server.c (target_running): Ditto.
1771 (accumulate_file_name_length): New function.
1772 (emit_dll_description): New function.
1773 (handle_qxfer_libraries): Replace accessing list implemention
1774 details with API function.
1775 (handle_qxfer_threads_worker): New function.
1776 (handle_qxfer_threads_proper): Replace accessing list implemention
1777 details with API function.
1778 (handle_query): Ditto.
1779 (visit_actioned_threads_callback_ftype): New typedef.
1780 (visit_actioned_threads_data): New struct.
1781 (visit_actioned_threads): Rewrite to be find_inferior callback.
1782 (resume): Call find_inferior.
1783 (handle_status): Replace accessing list implemention
1784 details with API function.
1785 (process_serial_event): Replace accessing list implemention details
1787 * target.c (set_desired_inferior): Replace accessing list implemention
1788 details with API function.
1789 * tracepoint.c (same_process_p): New function.
1790 (gdb_agent_about_to_close): Replace accessing list implemention
1791 details with API function.
1792 * win32-low.c (child_delete_thread): Replace accessing list
1793 implemention details with API function.
1794 (match_dll_by_basename): New function.
1795 (dll_is_loaded_by_basename): New function.
1796 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1797 details call to dll_is_loaded_by_basename.
1799 2014-02-19 Doug Evans <dje@google.com>
1801 * dll.h (struct dll_info): Add comment.
1802 * gdbthread.h (struct thread_info): Add comment.
1803 (current_ptid): Simplify.
1804 * inferiors.c (add_process): Update.
1805 (remove_process): Update.
1806 * inferiors.h (struct process_info): Rename member "head" to "entry".
1807 * linux-low.c (delete_lwp): Update.
1809 (last_thread_of_process_p): Update.
1810 (kill_one_lwp_callback, linux_kill): Update.
1811 (status_pending_p_callback): Update.
1812 (wait_for_sigstop): Update. Simplify read of ptid.
1813 (start_step_over): Update.
1814 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1815 (get_lwp_thread): Update.
1816 (struct lwp_info): Rename member "head" to "entry".
1817 * regcache.h (inferior_list_entry): Delete.
1818 * server.c (kill_inferior_callback): Update.
1819 (detach_or_kill_inferior_callback): Update.
1820 (print_started_pid): Update.
1821 (print_attached_pid): Update.
1822 (process_serial_event): Simplify read of ptid.
1823 * thread-db.c (thread_db_create_event): Update.
1824 (thread_db_get_tls_address): Update.
1825 * win32-low.c (current_inferior_ptid): Simplify.
1827 2014-02-19 Tom Tromey <tromey@redhat.com>
1829 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1831 (target_supports_btrace): Update.
1833 2014-02-14 Yao Qi <yao@codesourcery.com>
1835 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1836 (rsp-low-ipa.o): New target.
1838 2014-02-12 Tom Tromey <tromey@redhat.com>
1840 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1841 convert_ascii_to_int.
1842 * regcache.c (registers_to_string): Likewise.
1843 * remote-utils.c (decode_M_packet): Likewise.
1844 * server.c (process_serial_event): Likewise.
1846 2014-02-12 Tom Tromey <tromey@redhat.com>
1848 * server.c (handle_query, handle_v_run): Use hex2bin, not
1850 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1852 2014-02-12 Tom Tromey <tromey@redhat.com>
1854 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1855 convert_int_to_ascii.
1856 * regcache.c (registers_to_string, collect_register_as_string):
1858 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1860 * server.c (process_serial_event): Likewise.
1861 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1862 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1864 2014-02-12 Tom Tromey <tromey@redhat.com>
1866 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1867 bin2hex, not hexify.
1868 * tracepoint.c (cmd_qtstatus): Likewise.
1870 2014-02-12 Tom Tromey <tromey@redhat.com>
1872 * remote-utils.c (monitor_output): Pass explicit length to
1875 2014-02-12 Tom Tromey <tromey@redhat.com>
1877 * tracepoint.c: Include rsp-low.h.
1878 * server.c: Include rsp-low.h.
1879 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1880 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1882 * remote-utils.c: Include rsp-low.h.
1883 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1884 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1885 (convert_int_to_ascii, convert_ascii_to_int): Move to
1887 * regcache.c: Include rsp-low.h.
1888 * ax.c: Include rsp-low.h.
1889 * Makefile.in (SFILES): Add common/rsp-low.c.
1890 (OBS): Add rsp-low.o.
1891 (rsp-low.o): New target.
1893 2014-02-12 Tom Tromey <tromey@redhat.com>
1895 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1896 Include print-utils.h.
1897 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1898 (plongest, thirty_two, phex_nz): Remove.
1899 * Makefile.in (SFILES): Add common/print-utils.c.
1900 (OBS): Add print-utils.o.
1901 (print-utils-ipa.o): New target.
1902 (print-utils.o): New target.
1903 (IPA_OBJS): Add print-utils-ipa.o.
1905 2014-02-06 Tom Tromey <tromey@redhat.com>
1907 * Makefile.in (SFILES): Fix indentation.
1909 2014-02-05 Doug Evans <dje@google.com>
1911 * linux-low.c (linux_wait_for_event): Improve comment.
1912 (linux_wait_1): Keep current_inferior in sync with event_child.
1914 2014-01-22 Doug Evans <dje@google.com>
1916 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1918 2014-01-22 Doug Evans <dje@google.com>
1920 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1921 * configure: Regenerate.
1922 * config.in: Regenerate.
1923 * Makefile.in (SFILES): Add debug.c.
1925 * debug.c: New file.
1926 * debug.h: New file.
1927 * linux-aarch64-low.c (*): Update all debugging printfs to use
1928 debug_printf instead of fprintf.
1929 * linux-arm-low.c (*): Ditto.
1930 * linux-cris-low.c (*): Ditto.
1931 * linux-crisv32-low.c (*): Ditto.
1932 * linux-m32r-low.c (*): Ditto.
1933 * linux-sparc-low.c (*): Ditto.
1934 * linux-x86.c (*): Ditto.
1935 * linux-low.c (*): Ditto.
1936 (linux_wait_1): Add calls to debug_enter, debug_exit.
1937 (linux_wait): Remove redundant debugging printf.
1938 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1939 (linux_resume, unstop_all_lwps): Ditto.
1940 * mem-break.c (*): Update all debugging printfs to use
1941 debug_printf instead of fprintf.
1942 * remote-utils.c (*): Ditto.
1943 * thread-db.c (*): Ditto.
1944 * server.c #include <ctype.h>, "gdb_vecs.h".
1945 (debug_threads): Moved to debug.c.
1946 (*): Update all debugging printfs to use debug_printf instead of
1948 (start_inferior): Replace call to fflush with call to debug_flush.
1949 (monitor_show_help): Mention set debug-format.
1950 (parse_debug_format_options): New function.
1951 (handle_monitor_command): Handle "monitor set debug-format".
1952 (gdbserver_usage): Mention --debug-format.
1953 (main): Parse --debug-format.
1954 * server.h (debug_threads): Declaration moved to debug.h.
1956 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1957 trace_debug_1 that uses debug_printf.
1958 (tracepoint_look_up_symbols): Update all debugging printfs to use
1959 debug_printf instead of fprintf.
1961 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1963 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1966 2014-01-17 Pedro Alves <palves@redhat.com>
1969 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1970 defined after including gdb_proc_service.h.
1972 2014-01-16 Doug Evans <dje@google.com>
1974 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1975 (match_dll): Use it.
1977 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
1979 * target.h (target_ops) <read_btrace>: Change parameters and
1980 return type to allow error reporting.
1981 * server.c (handle_qxfer_btrace): Support delta reads. Pass
1982 trace reading errors on.
1983 * linux-low.c (linux_low_read_btrace): Pass trace reading
1985 (linux_low_disable_btrace): New.
1987 2014-01-15 Doug Evans <dje@google.com>
1989 * inferiors.c (thread_id_to_gdb_id): Delete.
1990 * inferiors.h (thread_id_to_gdb_id): Delete.
1992 2014-01-13 Eli Zaretskii <eliz@gnu.org>
1994 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1995 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
1998 2014-01-08 Pedro Alves <palves@redhat.com>
2000 * server.c (handle_status): Don't discard previous queued stop
2001 replies or thread's pending status here.
2002 (main) <disconnection>: Do it here instead.
2004 2014-01-08 Pedro Alves <palves@redhat.com>
2006 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2007 * server.c (visit_actioned_threads, handle_pending_status): New
2009 (handle_v_cont): Factor out parts to ...
2010 (resume): ... this new function. If in all-stop, and a thread
2011 being resumed has a pending status, report it without actually
2013 (myresume): Adjust to use the new 'resume' function.
2014 (clear_pending_status_callback, set_pending_status_callback)
2015 (find_status_pending_thread_callback): New functions.
2016 (handle_status): Handle the case of multiple threads having
2017 interesting statuses to report. Report threads' real last signal
2018 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2019 with an interesting thread to report the status for, instead of
2020 always reporting the status of the first thread.
2022 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2024 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2025 * gdbreplay.c (gdbreplay_version): Likewise.
2027 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2029 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2030 iov.iov_len with the real length in use.
2032 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2034 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2035 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2036 for all targets that use win32-low.c.
2037 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2038 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2040 2013-12-13 Pedro Alves <palves@redhat.com>
2042 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2043 if equal to TARGET_WAITKIND_LOADED.
2044 * win32-low.c (cached_status): New static global.
2045 (win32_wait): Add declaration.
2046 (do_initial_child_stuff): Flush all initial pending debug events
2047 up to the initial breakpoint.
2048 (win32_wait): If CACHED_STATUS was set, return that instead
2049 of doing a real wait. Remove the code resuming the execution
2050 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2051 during the initial phase. Also remove the code changing
2052 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2053 TARGET_WAITKIND_STOPPED.
2055 2013-12-11 Yao Qi <yao@codesourcery.com>
2057 * notif.c (handle_notif_ack): Return 0 if no notification
2060 2013-11-20 Doug Evans <dje@google.com>
2062 * linux-low.c (linux_set_resume_request): Fix comment.
2064 2013-11-20 Doug Evans <dje@google.com>
2066 * linux-low.c (resume_status_pending_p): Tweak comment.
2068 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2070 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2071 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2072 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2073 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2074 (srv_amd64_regobj): Add amd64-mpx.o.
2075 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2076 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2077 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2078 * i387-fp.c (num_pl_bnd_register) Added constant.
2079 (num_pl_bnd_cfg_registers) Added constant.
2080 (struct i387_xsave) Added reserved area and MPX fields.
2081 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2082 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2084 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2085 (init_registers_amd64_mpx_linux): Declare new function.
2086 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2087 (x86_64_regmap): Add MPX registers.
2088 (x86_linux_read_description): Add MPX case.
2089 (initialize_low_arch): Initialize MPX targets.
2091 2013-11-18 Tom Tromey <tromey@redhat.com>
2093 * configure: Rebuild.
2094 * configure.ac: Don't check for stdlib.h.
2095 * gdbreplay.c: Unconditionally include stdlib.h.
2097 2013-11-18 Tom Tromey <tromey@redhat.com>
2099 * config.in: Rebuild.
2100 * configure: Rebuild.
2101 * configure.ac: Don't use AC_HEADER_DIRENT.
2103 2013-11-18 Tom Tromey <tromey@redhat.com>
2105 * server.h: Don't check HAVE_STRING_H.
2106 * gdbreplay.c: Don't check HAVE_STRING_H.
2107 * configure: Rebuild.
2109 2013-11-18 Tom Tromey <tromey@redhat.com>
2111 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2114 2013-11-08 Tom Tromey <tromey@redhat.com>
2116 * configure, config.in: Rebuild.
2117 * configure.ac: Remove unused configury.
2119 2013-11-08 Tom Tromey <tromey@redhat.com>
2121 * acinclude.m4: Include common.m4, codeset.m4.
2122 * configure, config.in: Rebuild.
2123 * configure.ac: Use GDB_AC_COMMON.
2125 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2127 * linux-s390-low.c (HWCAP_S390_TE): New define.
2128 (s390_arch_setup): Consider the TE field in the HWCAP for
2129 determining 'have_regset_tdb'.
2131 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2134 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2137 2013-10-02 Pedro Alves <palves@redhat.com>
2139 * server.c (process_serial_event): Don't output "GDBserver
2140 exiting" if GDB is connected through stdio.
2141 * target.c (mywait): Likewise, be silent if GDB is connected
2144 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2146 * lynx-low.c (lynx_add_threads_after_attach): New function.
2147 (lynx_attach): Remove call to add_thread. Add call to
2148 lynx_add_threads_after_attach instead.
2150 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2152 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2153 * config.in, configure: Regenerated.
2155 2013-09-18 Yao Qi <yao@codesourcery.com>
2158 * server.c (start_inferior): Clear 'resume_info'.
2160 2013-09-16 Jiong Wang <jiwang@tilera.com>
2162 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2165 2013-09-16 Jiong Wang <jiwang@tilera.com>
2167 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2168 linux-tile-low.o to srv_tgtobj.
2170 2013-09-16 Will Newton <will.newton@linaro.org>
2172 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2175 2013-09-06 Pedro Alves <palves@redhat.com>
2177 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2178 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2179 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2180 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2181 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2182 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2184 2013-09-06 Pedro Alves <palves@redhat.com>
2186 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2187 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2189 2013-09-06 Pedro Alves <palves@redhat.com>
2191 * linux-amd64-ipa.c: Include tracepoint.h.
2192 * linux-i386-ipa.c: Include tracepoint.h.
2194 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2196 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2197 (ps_get_thread_area): New function.
2199 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2201 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2202 (initialize_low_arch): Call init_registers_crisv32 rather than
2203 init_register_crisv32.
2205 2013-09-05 Pedro Alves <palves@redhat.com>
2207 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2209 * hostio.h: ... this new file.
2210 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2211 win32-low.c: Include hostio.h.
2213 2013-09-05 Pedro Alves <palves@redhat.com>
2215 * server.h (gdb_client_data, handler_func, callback_handler_func)
2216 (delete_file_handler, add_file_handler, append_callback_event)
2217 (delete_callback_event, start_event_loop, initialize_event_loop):
2218 Move to event-loop.h and include it.
2219 * event-loop.h: New file.
2221 2013-09-05 Pedro Alves <palves@redhat.com>
2223 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2224 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2225 (loaded_dll, unloaded_dll): Move to ...
2226 * dll.h: ... this new file.
2227 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2229 2013-09-05 Pedro Alves <palves@redhat.com>
2231 * server.h (current_process, get_thread_process, all_processes)
2232 (add_inferior_to_list, for_each_inferior, current_inferior)
2233 (remove_inferior, add_process, remove_process, find_process_pid)
2234 (have_started_inferiors_p, have_attached_inferiors_p)
2235 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2236 (clear_inferiors, find_inferior, find_inferior_id)
2237 (inferior_target_data, set_inferior_target_data)
2238 (inferior_regcache_data, set_inferior_regcache_data): Move to
2239 inferiors.h, and include it.
2240 * inferiors.h: New file.
2242 2013-09-05 Pedro Alves <palves@redhat.com>
2244 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2248 2013-09-05 Pedro Alves <palves@redhat.com>
2250 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2252 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2253 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2254 (handle_tracepoint_general_set, handle_tracepoint_query)
2255 (tracepoint_finished_step, tracepoint_was_hit)
2256 (release_while_stepping_state_list, current_traceframe)
2257 (in_readonly_region, traceframe_read_mem)
2258 (fetch_traceframe_registers, traceframe_read_sdata)
2259 (traceframe_read_info, struct fast_tpoint_collect_status)
2260 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2261 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2262 (supply_fast_tracepoint_registers)
2263 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2264 (ipa_tdesc, claim_trampoline_space)
2265 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2266 (agent_mem_read, agent_get_trace_state_variable_value)
2267 (agent_set_trace_state_variable_value, agent_tsv_read)
2268 (agent_mem_read_string, get_raw_reg_func_addr)
2269 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2270 * tracepoint.h: ... this new file.
2272 2013-09-05 Pedro Alves <palves@redhat.com>
2274 * server.h (perror_with_name, error, fatal, warning, paddress)
2275 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2277 * utils.h: New file.
2279 2013-09-05 Pedro Alves <palves@redhat.com>
2281 * server.h (remote_debug, noack_mode, transport_is_reliable)
2282 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2283 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2284 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2285 (write_enn, initialize_async_io, enable_async_io)
2286 (disable_async_io, check_remote_input_interrupt_request)
2287 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2288 (dead_thread_notify, prepare_resume_reply)
2289 (decode_address_to_semicolon, decode_address, decode_m_packet)
2290 (decode_M_packet, decode_X_packet, decode_xfer_write)
2291 (decode_search_memory_packet, unhexify, hexify)
2292 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2293 (look_up_one_symbol, relocate_instruction)
2294 (monitor_output): Move to remote-utils.h, and include it.
2295 * remote-utils.h: New file.
2297 2013-09-05 Pedro Alves <palves@redhat.com>
2299 * server.h (_): Delete.
2301 2013-09-02 Pedro Alves <palves@redhat.com>
2303 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2304 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2306 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2308 2013-09-02 Pierre Muller <muller@sourceware.org>
2310 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2311 or WriteProcessMemory complete successfully and handle
2312 ERROR_PARTIAL_COPY error.
2314 2013-09-02 Pedro Alves <palves@redhat.com>
2316 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2317 error instead of EIO.
2319 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2322 * linux-low.c: Include filestuff.h.
2323 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2324 * lynx-low.c: Include filestuff.h.
2325 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2326 * server.c: Include filestuff.h.
2327 (main): Call notice_open_fds.
2328 * spu-low.c: Include filestuff.h.
2329 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2331 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2333 * Makefile.in: Explain why ../target and ../nat are not
2334 listed as include file search paths.
2335 (linux-waitpid.o): New object file rule.
2336 * configure.srv (srv_native_linux_obj): New variable.
2337 Replace all occurrences of linux native object files with
2338 $srv_native_linux_obj.
2339 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2340 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2341 (linux_enable_event_reporting): Remove declaration.
2342 (my_waitpid): Moved to common/linux-waitpid.c.
2343 (linux_wait_for_event): Pass ptid when calling
2344 linux_enable_event_reporting.
2345 (linux_supports_tracefork_flag): Remove.
2346 (linux_enable_event_reporting): Likewise.
2347 (linux_tracefork_grandchild): Remove.
2348 (STACK_SIZE): Moved to common/linux-ptrace.c.
2349 (linux_tracefork_child): Remove.
2350 (linux_test_for_tracefork): Remove.
2351 (linux_look_up_symbols): Call linux_supports_traceclone.
2352 (initialize_low): Remove call to linux_test_for_tracefork.
2353 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2354 common/linux-ptrace.h.
2355 (PTRACE_TYPE_ARG4): Likewise.
2356 Include linux-ptrace.h.
2358 2013-08-21 Pedro Alves <palves@redhat.com>
2360 * config.in: Renegerate.
2362 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2364 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2365 (SFILES): Remove $(srcdir)/common/target-common.c and
2366 add $(srcdir)/target/waitstatus.c.
2367 (OBS): Remove target-common.o and add waitstatus.o.
2368 (server_h): Remove $(srcdir)/../common/target-common.h and
2369 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2370 and $(srcdir)/../target/waitstatus.h.
2371 (target-common.o): Remove.
2372 (waitstatus.o): New target object file.
2373 * target.h: Do not include target-common.h and
2374 include target/resume.h, target/wait.h and
2375 target/waitstatus.h.
2377 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2379 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2380 to PTRACE_TYPE_ARG3.
2381 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2382 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2384 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2385 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2387 2013-07-27 Jie Zhang <jie@codesourcery.com>
2388 Daniel Jacobowitz <dan@codesourcery.com>
2389 Yao Qi <yao@codesourcery.com>
2391 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2392 (mips-linux-watch.o): New rule.
2393 (mips_linux_watch_h): New variable.
2394 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2396 * linux-mips-low.c: Include mips-linux-watch.h.
2397 (struct arch_process_info, struct arch_lwp_info): New.
2398 (update_watch_registers_callback): New function.
2399 (mips_linux_new_process, mips_linux_new_thread) New functions.
2400 (mips_linux_prepare_to_resume, mips_insert_point): New
2402 (mips_remove_point, mips_stopped_by_watchpoint): New
2404 (rsp_bp_type_to_target_hw_bp_type): New function.
2405 (mips_stopped_data_address): New function.
2406 (the_low_target): Add watchpoint support functions.
2408 2013-07-27 Yao Qi <yao@codesourcery.com>
2410 * i386-low.c: Include break-common.h.
2411 (enum target_hw_bp_type): Remove.
2413 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2415 * Makefile.in (SFILES): /common/target-common.c.
2416 (OBS): Add target-common.o.
2417 (server_h): Add $(srcdir)/../common/target-common.h.
2418 (target-common.o): New target.
2419 * server.c (queue_stop_reply_callback): Free
2420 status string after use.
2421 * target.c (target_waitstatus_to_string): Remove.
2422 * target.h: Include target-common.h.
2423 (resume_kind): Likewise.
2424 (target_waitkind): Likewise.
2425 (target_waitstatus): Likewise.
2426 (TARGET_WNOHANG): Likewise.
2428 2013-07-04 Yao Qi <yao@codesourcery.com>
2430 * Makefile.in (host_alias): Use @host_noncanonical@.
2431 (target_alias): Use @target_noncanonical@.
2432 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2433 ACX_NONCANONICAL_HOST.
2434 * configure: Regenerated.
2437 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2439 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2440 * configure: Rebuild.
2441 * Makefile.in (version_host, version_target): Get from configure.
2442 (version.c): Use $(version_host) and $(version_target).
2444 2013-07-03 Pedro Alves <palves@redhat.com>
2446 * Makefile.in (config.status): Depend on development.sh.
2447 * acinclude.m4: Include libmcheck.m4.
2448 * configure: Regenerate.
2450 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2452 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2453 attribute inside the parentheses.
2454 (winapi_DebugSetProcessKillOnExit): Ditto.
2455 (winapi_DebugBreakProcess): Ditto.
2456 (winapi_GenerateConsoleCtrlEvent): Ditto.
2458 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2460 * notif.h (notif_event): Add a dummy member to avoid compiler
2463 2013-07-01 Pedro Alves <palves@redhat.com>
2465 * hostio.c (HOSTIO_PATH_MAX): Define.
2466 (require_filename, handle_open, handle_unlink, handle_readlink):
2469 2013-07-01 Pedro Alves <palves@redhat.com>
2471 * server.h: Include "pathmax.h".
2472 * linux-low.c: Don't include sys/param.h.
2473 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2475 * win32-low.c: Don't include sys/param.h.
2476 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2478 2013-07-01 Pedro Alves <palves@redhat.com>
2480 * event-loop.c: Don't check HAVE_UNISTD_H before including
2482 * gdbreplay.c: Likewise.
2483 * remote-utils.c: Likewise.
2484 * server.c: Likewise.
2485 * configure.ac: Don't check for unistd.h.
2486 * configure: Regenerate.
2488 2013-06-28 Tom Tromey <tromey@redhat.com>
2490 * Makefile.in (version.c): Use version.in, not
2493 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2495 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2496 * configure: Rebuild.
2497 * Makefile.in (version_host, version_target): Get from configure.
2498 (version.c): Use $(version_host) and $(version_target).
2500 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2502 Fix trace-status to output user name without trailing colon.
2503 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2505 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2507 Fix trace-status to output proper start-time and stop-time.
2508 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2509 output start time and stop time in hex as gdb expects.
2511 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2513 * tracepoint.c (build_traceframe_info_xml): Output trace state
2514 variables present in the trace buffer.
2516 2013-06-24 Tom Tromey <tromey@redhat.com>
2518 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2520 (version.o): Remove.
2521 * gdbreplay.c: Include version.h.
2522 (version, host_name): Don't declare.
2523 * server.h: Include version.h.
2524 (version, host_name): Don't declare.
2526 2013-06-12 Pedro Alves <palves@redhat.com>
2528 * linux-x86-low.c (linux_is_elf64): Delete global.
2529 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2530 with local linux_pid_exe_is_elf_64_file use.
2532 2013-06-11 Pedro Alves <palves@redhat.com>
2534 * linux-low.c (regset_disabled, disable_regset): New functions.
2535 (regsets_fetch_inferior_registers)
2536 (regsets_store_inferior_registers): Use them.
2537 (initialize_regsets_info); Don't allocate the disabled_regsets
2539 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2542 2013-06-11 Pedro Alves <palves@redhat.com>
2544 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2547 2013-06-11 Pedro Alves <palves@redhat.com>
2549 * linux-x86-low.c (initialize_low_arch): Call
2550 init_registers_x32_avx_linux.
2552 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2554 Fix compatibility with Android Bionic.
2555 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2558 2013-06-07 Pedro Alves <palves@redhat.com>
2561 * Makefile.in (OBS): Add tdesc.o.
2562 (IPA_OBJS): Add tdesc-ipa.o.
2563 (tdesc-ipa.o): New rule.
2564 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2566 * linux-low.c (new_inferior): Delete.
2567 (disabled_regsets, num_regsets): Delete.
2568 (linux_add_process): Adjust to set the new per-process
2570 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2571 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2572 was a stop. When calling arch_setup, switch the current inferior
2573 to the thread that got an event.
2574 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2575 (regsets_fetch_inferior_registers)
2576 (regsets_store_inferior_registers): New regsets_info parameter.
2578 (linux_register_in_regsets): New regs_info parameter. Adjust to
2580 (register_addr, fetch_register, store_register): New usrregs_info
2581 parameter. Adjust to use it.
2582 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2583 parameter regs_info. Adjust to use it.
2584 (linux_fetch_registers): Get the current inferior's regs_info, and
2586 (linux_store_registers): Ditto.
2587 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2588 (initialize_low): Don't initialize the target_regsets here. Call
2589 initialize_low_arch.
2590 * linux-low.h (target_regsets): Delete declaration.
2591 (struct regsets_info): New.
2592 (struct usrregs_info): New.
2593 (struct regs_info): New.
2594 (struct process_info_private) <new_inferior>: New field.
2595 (struct linux_target_ops): Delete the num_regs, regmap, and
2596 regset_bitmap fields. New field regs_info.
2597 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2598 * i387-fp.c (num_xmm_registers): Delete.
2599 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2600 calls to new interface.
2601 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2602 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2603 Infer the number of xmm registers from the regcache's target
2605 * i387-fp.h (num_xmm_registers): Delete.
2606 * inferiors.c (add_thread): Don't install the thread's regcache
2608 * proc-service.c (gregset_info): Fetch the current inferior's
2609 regs_info. Adjust to use it.
2610 * regcache.c: Include tdesc.h.
2611 (register_bytes, reg_defs, num_registers)
2612 (gdbserver_expedite_regs): Delete.
2613 (get_thread_regcache): If the thread doesn't have a regcache yet,
2614 create one, instead of aborting gdbserver.
2615 (regcache_invalidate_one): Rename to ...
2616 (regcache_invalidate_thread): ... this.
2617 (regcache_invalidate_one): New.
2618 (regcache_invalidate): Only invalidate registers of the current
2620 (init_register_cache): Add target_desc parameter, and use it.
2621 (new_register_cache): Ditto. Assert the target description has a
2622 non zero registers_size.
2623 (regcache_cpy): Add assertions. Adjust.
2624 (realloc_register_cache, set_register_cache): Delete.
2625 (registers_to_string, registers_from_string): Adjust.
2626 (find_register_by_name, find_regno, find_register_by_number)
2627 (register_cache_size): Add target_desc parameter, and use it.
2628 (free_register_cache_thread, free_register_cache_thread_one)
2629 (regcache_release, register_cache_size): New.
2630 (register_size): Add target_desc parameter, and use it.
2631 (register_data, supply_register, supply_register_zeroed)
2632 (supply_regblock, supply_register_by_name, collect_register)
2633 (collect_register_as_string, collect_register_by_name): Adjust.
2634 * regcache.h (struct target_desc): Forward declare.
2635 (struct regcache) <tdesc>: New field.
2636 (init_register_cache, new_register_cache): Add target_desc
2638 (regcache_invalidate_thread): Declare.
2639 (regcache_invalidate_one): Delete declaration.
2640 (regcache_release): Declare.
2641 (find_register_by_number, register_cache_size, register_size)
2642 (find_regno): Add target_desc parameter.
2643 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2645 * remote-utils.c: Include tdesc.h.
2646 (outreg, prepare_resume_reply): Adjust.
2647 * server.c: Include tdesc.h.
2648 (gdbserver_xmltarget): Delete declaration.
2649 (get_features_xml, process_serial_event): Adjust.
2650 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2652 (struct process_info) <tdesc>: New field.
2653 (ipa_tdesc): Declare.
2654 * tdesc.c: New file.
2655 * tdesc.h: New file.
2656 * tracepoint.c: Include tdesc.h.
2657 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2658 (get_context_regcache): Adjust to pass ipa_tdesc down.
2659 (do_action_at_tracepoint): Adjust to get the register cache size
2660 from the context regcache's description.
2661 (traceframe_walk_blocks): Adjust to get the register cache size
2662 from the current trace frame's description.
2663 (traceframe_get_pc): Adjust to get current trace frame's
2664 description and pass it down.
2665 (gdb_collect): Adjust to get the register cache size from the
2667 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2668 (gdbserver_xmltarget): Delete.
2669 (initialize_low_tracepoint): Set the ipa's target description.
2670 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2671 (initialize_low_tracepoint): Set the ipa's target description.
2672 * linux-x86-low.c: Include tdesc.h.
2673 [__x86_64__] (is_64bit_tdesc): New.
2674 (ps_get_thread_area, x86_get_thread_area): Use it.
2675 (i386_cannot_store_register): Rename to ...
2676 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2677 (i386_cannot_fetch_register): Rename to ...
2678 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2679 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2681 (target_regsets): Rename to ...
2682 (x86_regsets): ... this.
2683 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2685 (x86_siginfo_fixup): Use is_64bit_tdesc.
2686 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2687 (tdesc_x32_avx_linux, tdesc_x32_linux)
2688 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2690 (x86_linux_update_xmltarget): Delete.
2691 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2692 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2693 (AMD64_LINUX_USER64_CS): New.
2694 (x86_linux_read_description): New, based on
2695 x86_linux_update_xmltarget.
2696 (same_process_callback): New.
2697 (x86_arch_setup_process_callback): New.
2698 (x86_linux_update_xmltarget): New.
2699 (x86_regsets_info): New.
2700 (amd64_linux_regs_info): New.
2701 (i386_linux_usrregs_info): New.
2702 (i386_linux_regs_info): New.
2703 (x86_linux_regs_info): New.
2704 (x86_arch_setup): Reimplement.
2705 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2706 (x86_emit_ops): Ditto.
2707 (the_low_target): Adjust. Install x86_linux_regs_info,
2708 x86_cannot_fetch_register, and x86_cannot_store_register.
2709 (initialize_low_arch): New.
2710 * linux-ia64-low.c (tdesc_ia64): Declare.
2711 (ia64_fetch_register): Adjust.
2712 (ia64_usrregs_info, regs_info): New globals.
2713 (ia64_regs_info): New function.
2714 (the_low_target): Adjust.
2715 (initialize_low_arch): New function.
2716 * linux-sparc-low.c (tdesc_sparc64): Declare.
2717 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2719 (sparc_arch_setup): New function.
2720 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2721 (the_low_target): Adjust.
2722 (initialize_low_arch): New function.
2723 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2724 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2725 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2726 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2727 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2728 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2729 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2730 (tdesc_powerpc_isa205_vsx64l): Declare.
2731 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2732 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2733 (ppc_set_pc, ppc_get_hwcap): Adjust.
2734 (ppc_usrregs_info): Forward declare.
2735 (!__powerpc64__) ppc_regmap_adjusted: New global.
2736 (ppc_arch_setup): Adjust to the current process'es target
2738 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2739 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2740 (ppc_store_evrregset): Adjust.
2741 (target_regsets): Rename to ...
2742 (ppc_regsets): ... this, and make static.
2743 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2744 (ppc_regs_info): New function.
2745 (the_low_target): Adjust.
2746 (initialize_low_arch): New function.
2747 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2748 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2749 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2750 (tdesc_s390x_linux64v2): Declare.
2751 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2752 (s390_fill_gregset, s390_store_last_break): Adjust.
2753 (target_regsets): Rename to ...
2754 (s390_regsets): ... this, and make static.
2755 (s390_get_pc, s390_set_pc): Adjust.
2756 (s390_get_hwcap): New target_desc parameter, and use it.
2757 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2758 (s390_arch_setup): Adjust to set the current process'es target
2759 description. Don't adjust the regmap.
2760 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2761 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2762 (regs_info_3264): New globals.
2763 (s390_regs_info): New function.
2764 (the_low_target): Adjust.
2765 (initialize_low_arch): New function.
2766 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2767 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2768 [__mips64] (init_registers_mips_linux)
2769 (init_registers_mips_dsp_linux): Delete defines.
2770 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2771 (have_dsp): New global.
2772 (mips_read_description): New, based on mips_arch_setup.
2773 (mips_arch_setup): Reimplement.
2774 (get_usrregs_info): New function.
2775 (mips_cannot_fetch_register, mips_cannot_store_register)
2776 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2777 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2778 (target_regsets): Rename to ...
2779 (mips_regsets): ... this, and make static.
2780 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2781 (dsp_regs_info, regs_info): New globals.
2782 (mips_regs_info): New function.
2783 (the_low_target): Adjust.
2784 (initialize_low_arch): New function.
2785 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2786 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2788 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2789 (arm_read_description): New, with bits factored from
2791 (arm_arch_setup): Reimplement.
2792 (target_regsets): Rename to ...
2793 (arm_regsets): ... this, and make static.
2794 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2795 (arm_regs_info): New function.
2796 (the_low_target): Adjust.
2797 (initialize_low_arch): New function.
2798 * linux-m68k-low.c (tdesc_m68k): Declare.
2799 (target_regsets): Rename to ...
2800 (m68k_regsets): ... this, and make static.
2801 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2802 (m68k_regs_info): New function.
2803 (m68k_arch_setup): New function.
2804 (the_low_target): Adjust.
2805 (initialize_low_arch): New function.
2806 * linux-sh-low.c (tdesc_sharch): Declare.
2807 (target_regsets): Rename to ...
2808 (sh_regsets): ... this, and make static.
2809 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2810 (sh_regs_info, sh_arch_setup): New functions.
2811 (the_low_target): Adjust.
2812 (initialize_low_arch): New function.
2813 * linux-bfin-low.c (tdesc_bfin): Declare.
2814 (bfin_arch_setup): New function.
2815 (bfin_usrregs_info, regs_info): New globals.
2816 (bfin_regs_info): New function.
2817 (the_low_target): Adjust.
2818 (initialize_low_arch): New function.
2819 * linux-cris-low.c (tdesc_cris): Declare.
2820 (cris_arch_setup): New function.
2821 (cris_usrregs_info, regs_info): New globals.
2822 (cris_regs_info): New function.
2823 (the_low_target): Adjust.
2824 (initialize_low_arch): New function.
2825 * linux-cris-low.c (tdesc_crisv32): Declare.
2826 (cris_arch_setup): New function.
2827 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2828 (cris_regs_info): New function.
2829 (the_low_target): Adjust.
2830 (initialize_low_arch): New function.
2831 * linux-m32r-low.c (tdesc_m32r): Declare.
2832 (m32r_arch_setup): New function.
2833 (m32r_usrregs_info, regs_info): New globals.
2834 (m32r_regs_info): Adjust.
2835 (initialize_low_arch): New function.
2836 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2837 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2838 (tic6x_usrregs_info): Forward declare.
2839 (tic6x_read_description): New function, based on ...
2840 (tic6x_arch_setup): ... this. Reimplement.
2841 (target_regsets): Rename to ...
2842 (tic6x_regsets): ... this, and make static.
2843 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2844 (tic6x_regs_info): New function.
2845 (the_low_target): Adjust.
2846 (initialize_low_arch): New function.
2847 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2848 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2849 (target_regsets): Rename to ...
2850 (xtensa_regsets): ... this, and make static.
2851 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2853 (xtensa_arch_setup, xtensa_regs_info): New functions.
2854 (the_low_target): Adjust.
2855 (initialize_low_arch): New function.
2856 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2857 (nios2_arch_setup): Set the current process'es tdesc.
2858 (target_regsets): Rename to ...
2859 (nios2_regsets): ... this.
2860 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2861 (nios2_regs_info): New function.
2862 (the_low_target): Adjust.
2863 (initialize_low_arch): New function.
2864 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2865 (aarch64_arch_setup): Set the current process'es tdesc.
2866 (target_regsets): Rename to ...
2867 (aarch64_regsets): ... this.
2868 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2869 (aarch64_regs_info): New function.
2870 (the_low_target): Adjust.
2871 (initialize_low_arch): New function.
2872 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2874 (target_regsets): Rename to ...
2875 (tile_regsets): ... this.
2876 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2877 (tile_regs_info): New function.
2878 (tile_arch_setup): Set the current process'es tdesc.
2879 (the_low_target): Adjust.
2880 (initialize_low_arch): New function.
2881 * spu-low.c (tdesc_spu): Declare.
2882 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2883 * win32-arm-low.c (tdesc_arm): Declare.
2884 (arm_arch_setup): New function.
2885 (the_low_target): Install arm_arch_setup instead of
2887 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2888 (init_windows_x86): Rename to ...
2889 (i386_arch_setup): ... this. Set `win32_tdesc'.
2890 (the_low_target): Adjust.
2891 * win32-low.c (win32_tdesc): New global.
2892 (child_add_thread): Don't create the thread cache here.
2893 (do_initial_child_stuff): Set the new process'es tdesc.
2894 * win32-low.h (struct target_desc): Forward declare.
2895 (win32_tdesc): Declare.
2896 * lynx-i386-low.c (tdesc_i386): Declare global.
2897 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2898 * lynx-low.c (lynx_tdesc): New global.
2899 (lynx_add_process): Set the new process'es tdesc.
2900 * lynx-low.h (struct target_desc): Forward declare.
2901 (lynx_tdesc): Declare global.
2902 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2903 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2904 * nto-low.c (nto_tdesc): New global.
2905 (do_attach): Set the new process'es tdesc.
2906 * nto-low.h (struct target_desc): Forward declare.
2907 (nto_tdesc): Declare.
2908 * nto-x86-low.c (tdesc_i386): Declare.
2909 (nto_x86_arch_setup): Set `nto_tdesc'.
2911 2013-06-04 Gary Benson <gbenson@redhat.com>
2913 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2914 to qSupported response when appropriate.
2915 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2916 with nonzero-length annex.
2917 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2918 arguments supplied in annex.
2920 2013-05-31 Doug Evans <dje@google.com>
2923 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2924 64 bits in 64-cross-32 environment.
2926 2013-05-28 Pedro Alves <palves@redhat.com>
2928 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2929 (aarch64-without-fpu.c): Delete rule.
2930 * configure.srv (aarch64*-*-linux*): Remove references to
2931 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2932 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2935 2013-05-24 Pedro Alves <palves@redhat.com>
2937 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2938 instead of strchr/decode_address. Error if the range isn't split
2939 with a ','. Don't assume there's be a ':' in the action.
2941 2013-05-23 Yao Qi <yao@codesourcery.com>
2942 Pedro Alves <palves@redhat.com>
2944 * linux-low.c (lwp_in_step_range): New function.
2945 (linux_wait_1): If the thread was range stepping and stopped
2946 outside the stepping range, report the stop to GDB. Otherwise,
2947 continue stepping. Add range stepping debug output.
2948 (linux_set_resume_request): Copy the step range from the resume
2950 (linux_supports_range_stepping): New.
2951 (linux_target_ops) <supports_range_stepping>: Set to
2952 linux_supports_range_stepping.
2953 * linux-low.h (struct linux_target_ops)
2954 <supports_range_stepping>: New field.
2955 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2956 * linux-x86-low.c (x86_supports_range_stepping): New.
2957 (the_low_target) <supports_range_stepping>: Set to
2958 x86_supports_range_stepping.
2959 * server.c (handle_v_cont): Handle 'r' action.
2960 (handle_v_requests): Append ";r" if the target supports range
2962 * target.h (struct thread_resume) <step_range_start,
2963 step_range_end>: New fields.
2964 (struct target_ops) <supports_range_stepping>:
2966 (target_supports_range_stepping): New macro.
2968 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2970 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2971 confusion in comment.
2973 2013-05-17 Joel Brobecker <brobecker@adacore.com>
2975 * lynx-low.c (struct process_info_private): New type.
2976 (lynx_add_process): New function.
2977 (lynx_create_inferior, lynx_attach): Replace calls to
2978 add_process by calls to lynx_add_process.
2979 (lynx_resume): If PTID is null, then try using
2980 current_process()->private->last_wait_event_ptid.
2982 (lynx_clear_inferiors): Delete. The contents of that function
2983 has been inlined in lynx_mourn;
2984 (lynx_wait_1): Save the ptid in the process's private data.
2985 (lynx_mourn): Free the process' private data. Replace call
2986 to lynx_clear_inferiors by call to clear_inferiors.
2988 2013-05-17 Yao Qi <yao@codesourcery.com>
2990 * i386-low.c (i386_length_and_rw_bits): Move the comment to
2993 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
2995 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2996 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
2997 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2998 PT_TEXT_END_ADDR guards. Update comments.
2999 (linux_target_op) <read_offsets>: Conditionally define to
3000 linux_read_offsets if the target is UCLIBC and if it defines
3001 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3003 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3004 Andrew Jenner <andrew@codesourcery.com>
3006 * Makefile.in (SFILES): Add linux-nios2-low.c.
3007 (clean): Add action to delete nios2-linux.c.
3008 (nios2-linux.c): New rule.
3009 * configure.srv: Add nios2*-*-linux*.
3010 * linux-nios2-low.c: New.
3012 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3014 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3016 2013-04-25 Hui Zhu <hui@codesourcery.com>
3019 * ax.c (ax_printf): Add fflush.
3021 2013-04-22 Tom Tromey <tromey@redhat.com>
3023 * Makefile.in (SFILES): Add filestuff.c.
3024 (OBS): Add filestuff.o.
3025 (filestuff.o): New target.
3026 * config.in, configure: Rebuild.
3027 * configure.ac: Check for fdwalk, pipe2.
3029 2013-04-17 Pedro Alves <palves@redhat.com>
3031 * configure.ac (USE_THREAD_DB): Delete variable.
3032 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3033 Don't AC_SUBST USE_THREAD_DB.
3034 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3035 * config.in, configure: Regenerate.
3037 2013-04-16 Pedro Alves <palves@redhat.com>
3039 * linux-low.h (struct lwp_info) <thread_known>: Move under
3040 the USE_THREAD_DB #ifdef.
3042 2013-04-16 Pedro Alves <palves@redhat.com>
3044 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3045 (linux-low.o): Delete rule.
3046 * linux-low.h: Always include "gdb_thread_db.h" instead of
3047 conditionally including thread_db.h.
3048 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3051 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3053 * Makefile.in (install-only): Fix make install regression.
3055 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3057 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3058 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3060 * gdbserver.1: Remove.
3062 2013-03-22 Pedro Alves <palves@redhat.com>
3064 * linux-low.c (handle_extended_wait): Don't call
3065 linux_enable_event_reporting.
3067 2013-03-15 Tony Theodore <tonyt@logyst.com>
3070 * Makefile.in (SHELL): Use @SHELL@.
3072 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3074 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3077 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3079 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3080 Remove extraneous NULL element.
3082 2013-03-13 Yao Qi <yao@codesourcery.com>
3084 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3085 'V' block in trace frame.
3087 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3089 * target.h (struct target_ops): Add btrace ops.
3090 (target_supports_btrace): New macro.
3091 (target_enable_btrace): New macro.
3092 (target_disable_btrace): New macro.
3093 (target_read_btrace): New macro.
3094 * gdbthread.h (struct thread_info): Add btrace field.
3095 * server.c: Include btrace-common.h.
3096 (handle_btrace_general_set): New function.
3097 (handle_btrace_enable): New function.
3098 (handle_btrace_disable): New function.
3099 (handle_general_set): Call handle_btrace_general_set.
3100 (handle_qxfer_btrace): New function.
3101 (struct qxfer qxfer_packets[]): Add btrace entry.
3102 * inferiors.c (remove_thread): Disable btrace.
3103 * linux-low: Include linux-btrace.h.
3104 (linux_low_enable_btrace): New function.
3105 (linux_low_read_btrace): New function.
3106 (linux_target_ops): Add btrace ops.
3107 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3108 Add srv_linux_btrace=yes.
3109 (x86_64-*-linux*): Add linux-btrace.o.
3110 Add srv_linux_btrace=yes.
3111 * configure.ac: Define HAVE_LINUX_BTRACE.
3112 * config.in: Regenerated.
3113 * configure: Regenerated.
3115 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3117 * server.c (handle_qxfer): Preserve error message if -3 is
3119 (qxfer): Document the -3 return value.
3121 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3123 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3124 (linux_btrace_h): New variable.
3125 (linux-btrace.o): New rule.
3127 2013-03-08 Stan Shebs <stan@codesourcery.com>
3128 Hafiz Abid Qadeer <abidh@codesourcery.com>
3130 * tracepoint.c (trace_buffer_size): New global.
3131 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3132 (init_trace_buffer): Change to one-argument function. Allocate
3133 trace buffer memory.
3134 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3135 handle QTBuffer:size packet.
3136 (cmd_bigqtbuffer_size): New function.
3137 (initialize_tracepoint): Call init_trace_buffer with
3138 DEFAULT_TRACE_BUFFER_SIZE.
3139 * server.c (handle_query): Add QTBuffer:size in the
3142 2013-03-07 Yao Qi <yao@codesourcery.com>
3144 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3145 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3147 (cmd_qtsp): Adjust condition. Do post increment.
3148 Set cur_action and cur_step_action back to 0.
3150 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3153 * linux-low.c (linux_write_memory): Return early success if LEN is
3156 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3158 * configure.srv: Add x86_64-*-cygwin* as target.
3160 2013-02-28 Tom Tromey <tromey@redhat.com>
3162 * configure.ac: Invoke AC_SYS_LARGEFILE.
3163 * configure, config.in: Rebuild.
3165 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3167 * win32-low.c: Throughout, fix format strings and casts of
3168 printf-like functions to avoid type related warnings on all
3170 (get_child_debug_event): Print dwDebugEventCode as hex since
3171 that's how it's usually documented.
3173 2013-02-28 Yao Qi <yao@codesourcery.com>
3175 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3178 2013-02-27 Jiong Wang <jiwang@tilera.com>
3180 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3181 (reg-tilegx32.c): New rule.
3182 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3183 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3184 different register info initializer according to elf class.
3185 (init_registers_tilgx32): New function. The tilegx32 register info
3187 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3188 (tile_store_gregset): Likewise.
3190 2013-02-27 Yao Qi <yao@codesourcery.com>
3192 * server.c (process_point_options): Print debug message when
3193 debug_threads is true.
3195 2013-02-26 Yao Qi <yao@codesourcery.com>
3197 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3199 2013-02-19 Pedro Alves <palves@redhat.com>
3200 Kai Tietz <ktietz@redhat.com>
3204 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3205 instead of strtoul to extract address from packet.
3206 (process_serial_event) <'z'>: Likewise.
3208 2013-02-18 Yao Qi <yao@codesourcery.com>
3210 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3212 2013-02-14 Pedro Alves <palves@redhat.com>
3216 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3217 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3219 2013-02-14 Pedro Alves <palves@redhat.com>
3221 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3223 2013-02-14 Pedro Alves <palves@redhat.com>
3225 * tracepoint.c (save_string): Delete.
3226 (add_tracepoint_action): Use savestring instead of save_string.
3228 2013-02-12 Pedro Alves <palves@redhat.com>
3230 * linux-xtensa-low.c: Ditto.
3231 * xtensa-xtregs.c: Ditto.
3233 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3235 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3238 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3240 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3241 aarch64_num_wp_regs and aarch64_num_bp_regs to
3242 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3244 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3246 * linux-aarch64-low.c (ps_get_thread_area): Replace
3247 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3249 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3250 Marcus Shawcroft <marcus.shawcroft@arm.com>
3251 Nigel Stephens <nigel.stephens@arm.com>
3252 Yufeng Zhang <yufeng.zhang@arm.com>
3254 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3255 (aarch64.c, aarch64-without-fpu.c): New targets.
3256 * configure.srv (aarch64*-*-linux*): New.
3257 * linux-aarch64-low.c: New file.
3259 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3261 * linux-low.c (handle_extended_wait, linux_create_inferior)
3262 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3263 (dequeue_one_deferred_signal, linux_resume_one_thread)
3264 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3265 (linux_tracefork_grandchild, linux_test_for_tracefork)
3266 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3267 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3268 where the argument is 0.
3270 2013-01-25 Yao Qi <yao@codesourcery.com>
3272 * event-loop.c: Include "queue.h".
3273 (gdb_event_p): New typedef.
3274 (struct gdb_event) <next_event>: Remove.
3275 (event_queue): Change to QUEUE(gdb_event_p).
3276 (async_queue_event): Remove.
3277 (gdb_event_xfree): New.
3278 (initialize_event_loop): New.
3279 (process_event): Use API from QUEUE.
3280 (wait_for_event): Likewise.
3281 * server.c (main): Call initialize_event_loop.
3282 * server.h (initialize_event_loop): Declare.
3284 2013-01-18 Yao Qi <yao@codesourcery.com>
3286 * ax.h (struct eval_agent_expr_context): New.
3287 (gdb_eval_agent_expr): Update declaration.
3288 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3289 TFRAME. Add new argument CTX.
3290 * server.h (struct eval_agent_expr_context): Declare.
3291 (agent_mem_read, agent_tsv_read): Update declaration.
3292 (agent_mem_read_string): Likewise.
3293 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3294 (add_traceframe_block): Add new argument TPOINT.
3295 Increase TPOINT->traceframe_usage.
3296 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3297 eval_tracepoint_agent_expr.
3298 (condition_true_at_tracepoint): Likewise.
3299 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3300 (agent_mem_read_string, agent_tsv_read): Likewise.
3302 2013-01-16 Yao Qi <yao@codesourcery.com>
3304 * linux-low.c (linux_resume_one_lwp): Don't check
3305 'lwp->bp_reinsert != 0'.
3307 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3308 Pedro Alves <palves@redhat.com>
3310 * lynx-low.c (ptrace_request_to_str): Define a temporary
3311 macro and use it to simplify this function's implementation.
3313 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3315 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3320 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3322 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3324 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3326 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3328 * lynx-low.c (lynx_resume): Use the resume_info parameter
3329 to determine the ptid for the lynx_ptrace call, unless
3330 it is equal to minus_one_ptid, in which case we use the
3331 ptid of the current_inferior.
3332 (lynx_wait_1): After having received a thread create/exit
3333 event, resume the inferior's execution using the signaling
3334 thread's ptid, rather than the old ptid.
3336 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3338 * lynx-low.c (lynx_resume): Delete variable ret.
3340 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3342 * gdbreplay.c (gdbreplay_version): Update copyright year.
3343 * server.c (gdbserver_version): Likewise.
3345 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3347 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3350 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3352 * lynx-low.c (ptrace_request_to_str): Add handling for
3355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3357 * lynx-low.c (lynx_attach): Delete variable new_process.
3359 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3361 * lynx-low.c (lynx_create_inferior): Delete variable
3364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3366 * lynx-low.c (ptrace_request_to_str): Do not handle
3367 PTRACE_GETTHREADLIST if this macro does not exist.
3369 2012-12-15 Yao Qi <yao@codesourcery.com>
3371 * Makefile.in (OBS): Add notif.o.
3372 * notif.c, notif.h: New.
3373 * server.c: Include "notif.h".
3374 (struct vstop_notif) <next>: Remove.
3376 (queue_stop_reply): Update.
3377 (push_event, send_next_stop_reply): Remove.
3378 (discard_queued_stop_replies): Update.
3379 (notif_stop): New variable.
3380 (handle_v_stopped): Remove.
3381 (handle_v_requests): Don't call handle_v_stopped. Call
3382 handle_ack_notif instead.
3383 (queue_stop_reply_callback): Call notif_event_enque instead
3384 of queue_stop_reply.
3385 (handle_status): Don't call send_next_stop_reply, call
3386 notif_write_event instead.
3387 (kill_inferior_callback): Likewise.
3388 (detach_or_kill_inferior_callback): Likewise.
3389 (main): Call initialize_notif.
3390 (process_serial_event): Call QUEUE_is_empty.
3391 (handle_target_event): Call notif_push instead of push event.
3392 * server.h (push_event): Remove declaration.
3394 2012-12-10 Tom Tromey <tromey@redhat.com>
3396 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3397 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3400 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3401 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3402 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3403 (amd64-linux-ipa.o, ax.o): Rewrite.
3404 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3405 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3406 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3407 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3408 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3409 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3410 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3411 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3412 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3413 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3414 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3415 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3416 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3417 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3418 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3419 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3420 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3421 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3422 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3423 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3424 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3425 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3426 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3427 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3428 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3429 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3430 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3431 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3432 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3433 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3434 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3435 (reg-tilegx.o): Remove.
3436 (all_object_files): New macro.
3437 Include .deps files.
3438 * aclocal.m4, configure: Rebuild.
3439 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3440 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3441 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3443 2012-12-05 Tom Tromey <tromey@redhat.com>
3446 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3448 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3450 * configure.ac: Check for linux/perf_event.h.
3451 * config.in: Regenerated.
3452 * configure: Regenerated.
3454 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3456 * hostio.c (handle_readlink): Decrease buffer size
3457 parameter passed to readlink by one byte.
3459 2012-11-26 Yao Qi <yao@codesourcery.com>
3461 * configure.ac (build_warnings): Append '-Wempty-body'.
3462 * configure: Regenerated.
3463 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3466 2012-11-15 Pierre Muller <muller@sourceware.org>
3468 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3469 * config.in: Regenerate.
3470 * configure: Regenerate.
3471 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3472 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3473 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3474 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3476 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3477 instead of <sys/wait.h> header.
3478 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3480 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3482 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3483 (various make rules): Remove -DGDBSERVER
3485 2012-11-09 Yao Qi <yao@codesourcery.com>
3487 * spu-low.c (current_ptid): Move it to ..
3488 * gdbthread.h: ... here. New.
3489 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3490 * server.c (myresume, process_serial_event): Likewise.
3491 * thread-db.c (thread_db_find_new_threads): Likewise.
3492 * tracepoint.c (run_inferior_command): Likewise.
3494 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3496 * server.c (handle_search_memory_1): Include access length in
3499 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3501 * linux-crisv32-low.c: Fix compile errors.
3503 2012-09-04 Yao Qi <yao@codesourcery.com>
3505 * tracepoint.c (cmd_qtsv): Adjust debug message.
3506 Don't check CUR_TPOINT.
3508 2012-08-28 Yao Qi <yao@codesourcery.com>
3510 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3511 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3512 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3513 Remove declarations of xmalloc, xreallloc, xstrdup and
3515 * Makefile.in (libiberty_h): New.
3516 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3517 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3519 2012-08-23 Yao Qi <yao@codesourcery.com>
3521 * server.h: Remove declaration of 'xsnprintf'.
3523 2012-08-22 Keith Seitz <keiths@redhat.com>
3525 * server.h: Include build-gnulib-gbserver/config.h.
3526 * gdbreplay.c: Likewise.
3528 2012-08-08 Doug Evans <dje@google.com>
3530 * Makefile.in (SFILES): Add gdb_vecs.c.
3531 (OBS): Add gdb_vecs.o.
3532 (gdb_vecs_h, host_defs_h): New variables.
3533 (thread-db.o): Add $(gdb_vecs_h) dependency.
3534 (gdb_vecs.o): New rule.
3535 * thread-db.c: #include "gdb_vecs.h".
3536 (thread_db_load_search): Use a vector to iterate over path elements.
3537 Handle text appearing after "$pdir".
3539 * configure.ac: Add check for strstr.
3540 * config.in: Regenerate.
3541 * configure: Regenerate.
3543 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3545 * hostio.c (handle_pread): If pread fails, fall back to attempting
3547 (handle_pwrite): Likewise for pwrite.
3549 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3551 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3552 between unsupported TYPE and unimplementable ADDR/LEN combination.
3553 (arm_insert_point): Act on new return value.
3555 2012-07-31 Pedro Alves <palves@redhat.com>
3557 * server.c (process_point_options): Only skip tokens if we find
3558 one that is unrecognized. Don't treat 'X' specially while
3559 skipping unrecognized tokens.
3561 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3563 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3564 to 4-byte-align HW breakpoint addresses for Thumb.
3566 2012-07-27 Yao Qi <yao@codesourcery.com>
3570 * server.h: Declare gdb_agent_about_to_close.
3571 * target.c (kill_inferior): Include "agent.h".
3572 New. Send command 'kill'.
3573 * target.h (kill_inferior): Removed macro.
3574 * tracepoint.c (gdb_agent_about_to_close): New.
3575 (gdb_agent_helper_thread): Handle command 'close'.
3576 Wait endlessly until the inferior stops.
3577 Install gdb_agent_remove_socket to atexit hook.
3578 (agent_socket_name): New static variable.
3579 (gdb_agent_socket_init): Replace local variable 'name' with
3580 'agent_socket_name'.
3581 (gdb_agent_remove_socket): New.
3583 2012-07-27 Yao Qi <yao@codesourcery.com>
3585 * server.c (process_point_options): Stop at 'X' when parsing.
3587 2012-07-19 Michael Eager <eager@eagercon.com>
3589 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3591 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3592 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3593 hardware breakpoint.
3595 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3597 * gdbserver/linux-low.c (initialize_low): Call
3598 linux_ptrace_init_warnings.
3600 2012-07-02 Doug Evans <dje@google.com>
3602 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3605 2012-07-02 Stan Shebs <stan@codesourcery.com>
3607 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3608 (ax.o): Add it to build rule.
3610 (OBS): Add format.o.
3611 (IPA_OBS): Add format.o.
3612 * server.c (handle_query): Claim support for breakpoint commands.
3613 (process_point_options): Add command case.
3614 (process_serial_event): Leave running if there are printfs in
3616 * mem-break.h (any_persistent_commands): Declare.
3617 (add_breakpoint_commands): Declare.
3618 (gdb_no_commands_at_breakpoint): Declare.
3619 (run_breakpoint_commands): Declare.
3620 * mem-break.c (struct point_command_list): New struct.
3621 (struct breakpoint): New field command_list.
3622 (any_persistent_commands): New function.
3623 (add_commands_to_breakpoint): New function.
3624 (add_breakpoint_commands): New function.
3625 (gdb_no_commands_at_breakpoint): New function.
3626 (run_breakpoint_commands): New function.
3627 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3629 * ax.c: Include format.h.
3630 (ax_printf): New function.
3631 (gdb_eval_agent_expr): Add printf opcode.
3633 2012-06-13 Yao Qi <yao@codesourcery.com>
3635 * server.c (start_inferior): Remove duplicated writes to fields
3636 'last_resume_kind' and 'last_status' of 'current_inferior'.
3638 2012-06-12 Yao Qi <yao@codesourcery.com>
3639 Pedro Alves <palves@redhat.com>
3641 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3643 * server.c (handle_v_cont): Extend comment.
3645 2012-06-11 Yao Qi <yao@codesourcery.com>
3647 * linux-low.c (linux_attach): Add 'static'.
3649 2012-06-06 Yao Qi <yao@codesourcery.com>
3651 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3653 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3655 Fix gcc -flto compilation warning.
3656 * server.c (main): Make variable multi_mode and attach volatile.
3658 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3660 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3661 if the platform doesn't know about it.
3663 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3665 * Makefile.in (SFILES): Add linux-tile-low.c.
3666 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3667 * configure.srv: Handle tilegx-*-linux*.
3668 * linux-tile-low.c: New file.
3670 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3672 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3674 2012-05-24 Pedro Alves <palves@redhat.com>
3678 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3680 2012-05-24 Pedro Alves <palves@redhat.com>
3684 Replace target_signal with gdb_signal throughout.
3686 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3688 * linux-low.c (linux_store_registers): Avoid the copying sequence
3689 when no data has been retrieved by ptrace.
3691 2012-05-22 Will Deacon <will.deacon@arm.com>
3693 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3694 Include asm/ptrace.h.
3695 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3698 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3700 * linux-low.c (linux_store_registers): Don't re-retrieve data
3701 with ptrace that has already been obtained from /proc. Always
3702 copy any data retrieved with ptrace to the buffer supplied.
3704 2012-05-11 Yao Qi <yao@codesourcery.com>
3705 Pedro Alves <palves@redhat.com>
3707 * linux-low.c (enum stopping_threads_kind): New.
3708 (stopping_threads): Change type to `enum stopping_threads_kind'.
3709 (handle_extended_wait): If stopping and suspending threads, leave
3710 the new_lwp suspended too.
3711 (linux_wait_for_event): Adjust.
3712 (stop_all_lwps): Set `stopping_threads' to
3713 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3714 whether we're suspending threads or just stopping them. Assert no
3717 2012-04-29 Yao Qi <yao@codesourcery.com>
3719 * server.h: Move some code to ...
3720 * gdbthread.h: ... here. New.
3721 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3722 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3723 (nto-low.o, win32-low.o): Likewise.
3724 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3725 * regcache.c, remote-utils.c, server.c: Likewise.
3726 * target.c, tracepoint.c, win32-low.c: Likewise.
3728 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3730 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3731 (PTRACE_ARG4_TYPE): Likewise.
3732 (PTRACE_XFER_TYPE): Likewise.
3733 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3734 ptrace to PTRACE_ARG3_TYPE.
3735 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3736 (PTRACE_ARG4_TYPE): Likewise.
3737 (PTRACE_XFER_TYPE): Likewise.
3738 (linux_detach_one_lwp): Cast fourth argument of
3739 ptrace to long then PTRACE_ARG4_TYPE.
3740 (regsets_fetch_inferior_registers): Cast third argument of
3741 ptrace to long then PTRACE_ARG3_TYPE.
3742 (regsets_store_inferior_registers): Likewise.
3744 2012-04-20 Pedro Alves <palves@redhat.com>
3746 * configure: Regenerate.
3748 2012-04-19 Pedro Alves <palves@redhat.com>
3750 * Makefile.in (GNULIB_BUILDDIR): New.
3751 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3752 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3753 (all, install-only, uninstall, clean-info, all-lib, clean): No
3754 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3755 (maintainer-clean realclean distclean): Use subdir_do.
3757 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3758 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3759 * acinclude.m4: Include acx_configure_dir.m4.
3760 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3761 calls. Call AC_PROG_RANLIB. Configure gnulib using
3764 (GNULIB_STDINT_H): Adjust.
3765 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3766 * gdbreplay.c: Include build-gnulib/config.h.
3767 * server.h: Likewise.
3768 * aclocal.m4: Regenerate.
3769 * config.in: Regenerate.
3770 * configure: Regenerate.
3772 2012-04-19 Pedro Alves <palves@redhat.com>
3774 * Makefile.in (LIBGNU, INCGNU): Adjust.
3775 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3776 (all, install-only, uninstall, clean-info, all-lib, clean)
3777 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3778 * configure.ac: Adjust AC_OUTPUT output.
3779 * aclocal.m4: Regenerate.
3780 * configure: Regenerate.
3782 2012-04-19 Pedro Alves <palves@redhat.com>
3784 * Makefile.in (generated_files): New.
3785 (server_h): Remove the explicit dependency on config.h, and depend
3786 on $generated_files.
3788 2012-04-19 Pedro Alves <palves@redhat.com>
3790 * Makefile.in (INCGNU): Add -Ignulib.
3792 2012-04-19 Pedro Alves <palves@redhat.com>
3794 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3795 (INCGNU): ... this, and spell out -I here.
3796 (GNULIB_LIB): Rename to ...
3798 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3800 2012-04-19 Pedro Alves <palves@redhat.com>
3802 * config.in: Regenerate.
3804 2012-04-19 Pedro Alves <palves@redhat.com>
3806 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3807 * server.h (memmem): Remove declaration.
3808 * config.in: Regenerate.
3809 * configure: Regenerate.
3811 2012-04-19 Yao Qi <yao@codesourcery.com>
3813 * Makefile.in (SFILES): Add common/vec.c.
3817 2012-04-19 Yao Qi <yao@codesourcery.com>
3819 * remote-utils.c (prepare_resume_reply): Replace with macro
3820 target_core_of_thread.
3821 * server.c (handle_qxfer_threads_proper): Likewise.
3822 * target.h (traget_core_of_thread): New macro.
3824 2012-04-18 Pedro Alves <palves@redhat.com>
3826 * aclocal.m4: Regenerate.
3827 * configure: Regenerate.
3829 2012-04-16 Yao Qi <yao@codesourcery.com>
3831 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3832 duplicated on address.
3834 2012-04-16 Yao Qi <yao@codesourcery.com>
3836 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3837 (struct tracepoint_action_ops) <send>: New field.
3838 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3839 (agent_expr_send, x_tracepoint_action_send): New.
3840 (l_tracepoint_action_send): New.
3841 (cmd_qtdp): Download and install tracepoint
3842 according to `use_agent'.
3843 (run_inferior_command): Add one more parameter `len'.
3845 (tracepoint_send_agent): New.
3846 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3848 2012-04-16 Yao Qi <yao@codesourcery.com>
3850 * tracepoint.c (download_tracepoints): Moved to ...
3851 (cmd_qtstart): ... here.
3853 2012-04-14 Yao Qi <yao@codesourcery.com>
3855 * tracepoint.c: Include inttypes.h.
3856 (struct collect_memory_action): Use sized types.
3857 (struct tracepoint): Likewise.
3858 (cmd_qtdp, stop_tracing): Update print specifiers.
3859 (cmd_qtp, response_tracepoint): Likewise.
3860 (collect_data_at_tracepoint): Likewise.
3861 (collect_data_at_step): Likewise.
3863 2012-04-14 Yao Qi <yao@codesourcery.com>
3865 Import gnulib module inttypes.
3866 * aclocal.m4, config.in, configure: Regenerated.
3868 2012-04-14 Yao Qi <yao@codesourcery.com>
3870 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3871 Makefile and config.status at last.
3873 2012-04-13 Yao Qi <yao@codesourcery.com>
3875 * tracepoint.c: Include stdint.h unconditionally.
3877 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3879 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3880 on BFD_HAVE_SYS_PROCFS_TYPE.
3881 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3882 * configure: Regenerate.
3883 * config.in: Likewise.
3885 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3887 * Makefile.in (clean): Also remove x32.c x32-linux.c
3888 x32-avx.c x32-avx-linux.c.
3889 (x32.o): New target.
3891 (x32-linux.o): Likewise.
3892 (x32-linux.c): Likewise.
3893 (x32-avx.o): Likewise.
3894 (x32-avx.c): Likewise.
3895 (x32-avx-linux.o): Likewise.
3896 (x32-avx-linux.c): Likewise.
3898 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3899 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3900 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3901 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3902 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3903 i386/x32-avx-linux.xml.
3905 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3906 (init_registers_x32_avx_linux): Likwise.
3907 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3908 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3910 2012-04-13 Pedro Alves <palves@redhat.com>
3912 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3913 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3914 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3915 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3918 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3920 * linux-x86-low.c (compat_x32_clock_t): New.
3921 (compat_x32_siginfo_t): Likewise.
3922 (compat_x32_siginfo_from_siginfo): Likewise.
3923 (siginfo_from_compat_x32_siginfo): Likewise.
3924 (linux_is_elf64): Likewise.
3925 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3926 and siginfo_from_compat_x32_siginfo for x32.
3927 (x86_arch_setup): Set linux_is_elf64.
3929 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3932 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3934 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3935 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3936 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3937 compatible with process.
3939 2012-04-12 Yao Qi <yao@codesourcery.com>
3941 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3942 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3943 (install-only, install-info, clean): Handle sub dir gnulib.
3944 (all-lib, am--refresh): New targets.
3945 (memmem.o): Remove target.
3946 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3947 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3948 (AC_REPLACE_FUNCS): Remove memmem.
3949 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3950 (AC_OUTPUT): Generate Makefile in gnulib/.
3951 * aclocal.m4, config.in, configure: Regenerated.
3953 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3955 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3957 2012-04-05 Pedro Alves <palves@redhat.com>
3959 -Werror=strict-aliasing
3961 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3964 2012-04-04 Pedro Alves <palves@redhat.com>
3966 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3967 (sparc_store_gregset_from_stack, sparc_store_gregset)
3968 (sparc_breakpoint_at): Fix formatting.
3970 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3972 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3974 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3975 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3976 * config.in: Regenerate.
3977 * configure: Likewise.
3979 2012-03-29 Pedro Alves <palves@redhat.com>
3981 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3982 Correct ptrace arguments.
3984 2012-03-28 Pedro Alves <palves@redhat.com>
3986 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3987 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3988 (IA64_FR1_REGNUM): New defines.
3989 (ia64_fetch_register): New.
3990 (the_low_target): Install it.
3991 * linux-low.h (struct linux_target_ops) <fetch_register>: New
3993 * linux-low.c (linux_fetch_registers): Try the
3994 the_low_target.fetch_register hook first.
3996 * linux-arm-low.c (the_low_target): Adjust.
3997 * linux-bfin-low.c (the_low_target): Adjust.
3998 * linux-cris-low.c (the_low_target): Adjust.
3999 * linux-crisv32-low.c (the_low_target): Adjust.
4000 * linux-m32r-low.c (the_low_target): Adjust.
4001 * linux-m68k-low.c (the_low_target): Adjust.
4002 * linux-mips-low.c (the_low_target): Adjust.
4003 * linux-ppc-low.c (the_low_target): Adjust.
4004 * linux-s390-low.c (the_low_target): Adjust.
4005 * linux-sh-low.c (the_low_target): Adjust.
4006 * linux-sparc-low.c (the_low_target): Adjust.
4007 * linux-tic6x-low.c (the_low_target): Adjust.
4008 * linux-x86-low.c (the_low_target): Adjust.
4009 * linux-xtensa-low.c (the_low_target): Adjust.
4011 2012-03-26 Pedro Alves <palves@redhat.com>
4013 * server.c (handle_qxfer_libraries): Don't bail early if
4014 the_target->qxfer_libraries_svr4 is not NULL.
4016 2012-03-26 Pedro Alves <palves@redhat.com>
4018 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4020 2012-03-23 Pedro Alves <palves@redhat.com>
4022 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4023 "library-list-svr4" element's start tag when the the DSO list is
4026 2012-03-23 Pedro Alves <palves@redhat.com>
4028 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4029 a variable whose type size is the same as the inferior's pointer
4032 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4034 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4036 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4037 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4038 * linux-low.h: Include <signal.h>.
4039 (struct siginfo): Remove forward declaration.
4040 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4043 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4045 * .gitignore: Ignore more files.
4047 2012-03-19 Pedro Alves <palves@redhat.com>
4048 Jan Kratochvil <jan.kratochvil@redhat.com>
4050 * server.c (cont_thread, general_thread): Add describing comments.
4051 (start_inferior): Clear `cont_thread'.
4052 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4055 2012-03-15 Yao Qi <yao@codesourcery.com>
4057 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4059 (cmd_qtdp): ... here.
4061 2012-03-15 Yao Qi <yao@codesourcery.com>
4063 * tracepoint.c (struct tracepoint_action_ops): New.
4064 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4065 (m_tracepoint_action_download): New.
4066 (r_tracepoint_action_download): New.
4067 (x_tracepoint_action_download): New.
4068 (l_tracepoint_action_download): New.
4069 (add_tracepoint_action): Install `action->ops' according type.
4070 (download_tracepoint_1): Move code `download' function pointer
4071 of various tracepoint_action_ops.
4073 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4075 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4076 linux_ptrace_attach_warnings.
4078 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4080 * Makefile.in (linux-ptrace.o): New.
4081 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4082 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4083 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4084 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4085 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4087 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4089 2012-03-08 Yao Qi <yao@codesourcery.com>
4090 Pedro Alves <palves@redhat.com>
4092 Fix PR server/13392.
4093 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4095 * tracepoint.c (remove_tracepoint): New.
4096 (cmd_qtdp): Call remove_tracepoint when failed to install.
4098 2012-03-07 Pedro Alves <palves@redhat.com>
4100 * linux-low.c (get_detach_signal): New.
4101 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4102 Pass on pending signals to PTRACE_DETACH. Check the result of the
4104 * server.c (program_signals, program_signals_p): New.
4105 (handle_general_set): Handle QProgramSignals.
4106 * server.h (program_signals, program_signals_p): Declare.
4108 2012-03-05 Pedro Alves <palves@redhat.com>
4109 Jan Kratochvil <jan.kratochvil@redhat.com>
4111 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4114 2012-03-03 Yao Qi <yao@codesourcery.com>
4116 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4117 agent_look_up_symbols.
4119 2012-03-03 Yao Qi <yao@codesourcery.com>
4121 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4122 (linux-x86-low.o): Likewise.
4123 * server.h: Remove in_process_agent_loaded.
4124 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4128 2012-03-03 Yao Qi <yao@codesourcery.com>
4130 * tracepoint.c (gdb_agent_capability): New global.
4131 (in_process_agent_loaded_ust): Renamed to
4132 `in_process_agent_supports_ust'.
4134 (in_process_agent_supports_ust): Call agent_capability_check.
4135 (clear_installed_tracepoints): Assert that agent supports
4138 2012-03-03 Yao Qi <yao@codesourcery.com>
4140 * linux-low.c (linux_supports_agent): New.
4141 (linux_target_ops): Initialize field `supports_agent' with
4142 linux_supports_agent.
4143 * target.h (struct target_ops) <supports_agent>: New.
4144 (target_supports_agent): New macro.
4145 * server.c (handle_general_set): Handle packet 'QAgent'.
4146 (handle_query): Send `QAgent+'.
4147 * Makefile.in (server.o): Depends on agent.h.
4149 2012-03-03 Yao Qi <yao@codesourcery.com>
4151 * Makefile.in (OBS): Add agent.o.
4152 Add new rule for agent.o.
4153 Track dependence of tracepoint.c on agent.h.
4154 * tracepoint.c (run_inferior_command_1):
4155 (run_inferior_command): Call agent_run_command.
4156 (gdb_ust_connect_sync_socket): Deleted. Move it to
4158 (resume_thread, stop_thread): Likewise.
4159 (gdb_ust_socket_init): Renamed to ...
4160 (gdb_agent_socket_init): ... New.
4161 (gdb_ust_thread): Renamed to ...
4162 (gdb_agent_helper_thread): ... New.
4163 (gdb_ust_init): Move some code to ...
4164 (gdb_agent_init): ... here. New.
4165 [HAVE_UST]: Call gdb_ust_init.
4166 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4167 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4168 * config.in, configure: Regenerated.
4170 2012-03-02 Pedro Alves <palves@redhat.com>
4172 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4173 * linux-low.c (struct simple_pid_list): New.
4174 (stopped_pids): New a struct simple_pid_list pointer.
4175 (add_to_pid_list, pull_pid_from_list): New.
4176 (handle_extended_wait): Don't assume the first signal new children
4177 report is SIGSTOP. Adjust call to pull_pid_from_list.
4178 (linux_wait_for_lwp): Adjust.
4180 2012-03-02 Yao Qi <yao@codesourcery.com>
4182 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4185 2012-03-02 Yao Qi <yao@codesourcery.com>
4187 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4188 `stop_pc' and `tpoint'. Update caller.
4190 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4192 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4193 * linux-low.c (use_linux_regsets): New macro.
4194 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4195 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4196 (linux_register_in_regsets): New function.
4197 (usr_fetch_inferior_registers): Skip registers covered by
4199 (usr_store_inferior_registers): Likewise.
4200 (usr_fetch_inferior_registers): New macro.
4201 (usr_store_inferior_registers): Likewise.
4202 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4203 (linux_store_registers): Likewise.
4204 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4206 (init_registers_mips64_dsp_linux): Likewise.
4207 (init_registers_mips_linux): New macro.
4208 (init_registers_mips_dsp_linux): Likewise.
4209 (mips_dsp_num_regs): Likewise.
4210 (DSP_BASE, DSP_CONTROL): New fallback macros.
4211 (mips_base_regs): New macro.
4212 (mips_regmap): Use it. Fix the size.
4213 (mips_dsp_regmap): New variable.
4214 (mips_dsp_regset_bitmap): Likewise.
4215 (mips_arch_setup): New function.
4216 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4218 (mips_cannot_store_register): Likewise.
4219 (the_low_target): Update .arch_setup, .num_regs and .regmap
4220 initializers. Add .regset_bitmap initializer.
4221 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4223 * linux-bfin-low.c (the_low_target): Likewise.
4224 * linux-cris-low.c (the_low_target): Likewise.
4225 * linux-crisv32-low.c (the_low_target): Likewise.
4226 * linux-ia64-low.c (the_low_target): Likewise.
4227 * linux-m32r-low.c (the_low_target): Likewise.
4228 * linux-m68k-low.c (the_low_target): Likewise.
4229 * linux-ppc-low.c (the_low_target): Likewise.
4230 * linux-s390-low.c (the_low_target): Likewise.
4231 * linux-sh-low.c (the_low_target): Likewise.
4232 * linux-sparc-low.c (the_low_target): Likewise.
4233 * linux-tic6x-low.c (the_low_target): Likewise.
4234 * linux-x86-low.c (the_low_target): Likewise.
4235 * linux-xtensa-low.c (the_low_target): Likewise.
4236 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4237 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4238 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4240 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4241 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4243 2012-02-29 Yao Qi <yao@codesourcery.com>
4244 Pedro Alves <palves@redhat.com>
4246 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4247 `step_over_finished' is true.
4249 2012-02-27 Pedro Alves <palves@redhat.com>
4251 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4252 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4254 2012-02-27 Pedro Alves <palves@redhat.com>
4257 * linux-low.c (pid_is_stopped): New.
4258 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4260 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4262 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4265 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4267 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4269 2012-02-24 Luis Machado <lgustavo@codesourcery>
4271 * server.c (handle_query): Advertise support for target-side
4272 breakpoint condition evaluation.
4273 (process_point_options): New function.
4274 (process_serial_event): When inserting a breakpoint, check for
4275 a target-side condition that should be evaluated.
4277 * mem-break.c: Include regcache.h and ax.h.
4278 (point_cond_list_t): New data structure.
4279 (breakpoint) <cond_list>: New field.
4280 (find_gdb_breakpoint_at): Make non-static.
4281 (delete_gdb_breakpoint_at): Clear any target-side
4283 (clear_gdb_breakpoint_conditions): New function.
4284 (add_condition_to_breakpoint): Likewise.
4285 (add_breakpoint_condition): Likewise.
4286 (gdb_condition_true_at_breakpoint): Likewise.
4287 (gdb_breakpoint_here): Return result directly instead
4288 of going through a local variable.
4290 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4291 (clear_gdb_breakpoint_conditions): Likewise.
4292 (add_breakpoint_condition): Likewise.
4293 (gdb_condition_true_at_breakpoint): Likewise.
4295 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4296 (need_step_over_p): Take target-side breakpoint condition into
4299 2012-02-24 Luis Machado <lgustavo@codesourcery>
4301 * server.h: Include tracepoint.h.
4302 (agent_mem_read, agent_get_trace_state_variable_value,
4303 agent_set_trace_state_variable_value,
4304 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4305 get_set_tsv_func_addr): New prototypes.
4307 * ax.h: New include file.
4308 * ax.c: New source file.
4310 * tracepoint.c: Include ax.h.
4311 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4312 agent_expr, eval_result_type): Move to ax.h.
4313 (parse_agent_expr): Rename to ...
4314 (gdb_parse_agent_expr): ... this, make it non-static and move
4316 (unparse_agent_expr) Rename to ...
4317 (gdb_unparse_agent_expr): ... this, make it non-static and move
4319 (eval_agent_expr): Rename to ...
4320 (eval_tracepoint_agent_expr): ... this.
4321 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4322 forward declarations.
4323 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4324 (agent_get_trace_state_variable_value): New function.
4325 (agent_set_trace_state_variable_value): New function.
4326 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4327 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4328 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4329 (condition_true_at_tracepoint): Likewise.
4330 (parse_agent_expr): Rename to ...
4331 (gdb_parse_agent_expr): ... this and move to ax.c.
4332 (unparse_agent_expr): Rename to ...
4333 (gdb_unparse_agent_expr): ... this and move to ax.c.
4334 (gdb_agent_op_name): Move to ax.c.
4335 (eval_agent_expr): Rename to ...
4336 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4338 (eval_tracepoint_agent_expr): New function.
4339 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4341 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4343 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4344 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4345 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4346 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4347 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4348 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4349 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4350 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4351 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4352 (compile_bytecodes): Remove forward declaration.
4353 (is_goto_target): Move to ax.c.
4354 (compile_bytecodes): Move to ax.c and call
4355 agent_get_trace_state_variable_value (...) and
4356 agent_set_trace_state_variable_value (...).
4358 * Makefile.in: Update ax.c and IPA dependencies.
4360 2012-02-24 Pedro Alves <palves@redhat.com>
4362 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4363 (cmd_bigqtbuffer_circular): ... this. Only handle
4364 'QTBuffer:circular:'.
4365 (handle_tracepoint_general_set): Adjust.
4367 2012-02-16 Yao Qi <yao@codesourcery.com>
4369 * inferiors.c: Move code to ...
4370 * dll.c: .... here. New.
4371 * server.h: Declare clear_dlls.
4372 * Makefile.in (SFILES): Add dll.c.
4376 2012-02-11 Yao Qi <yao@codesourcery.com>
4378 * server.c: (handle_monitor_command): Add a new parameter
4380 (handle_query): Update caller.
4382 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4384 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4385 * configure, config.in: Regenerate.
4386 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4389 2012-02-02 Pedro Alves <palves@redhat.com>
4391 Try SIGKILL first, then PTRACE_KILL.
4392 * linux-low.c (linux_kill_one_lwp): New.
4393 (linux_kill_one_lwp): Rename to ...
4394 (kill_one_lwp_callback): ... this. Use the new
4397 2012-02-02 Pedro Alves <palves@redhat.com>
4399 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4402 2012-01-27 Pedro Alves <palves@redhat.com>
4404 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4405 (elf_64_file_p): Make static.
4406 (linux_pid_exe_is_elf_64_file): New.
4407 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4408 Delete declarations.
4409 (linux_pid_exe_is_elf_64_file): Declare.
4410 * linux-x86-low.c (x86_arch_setup): Use
4411 linux_pid_exe_is_elf_64_file.
4413 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4415 * linux-low.c (linux_wait_for_event_1): Rename to ...
4416 (linux_wait_for_event): ... here and merge it with former
4417 linux_wait_for_event - new variable wait_ptid, use it.
4418 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4420 2012-01-23 Pedro Alves <palves@redhat.com>
4422 * server.c (main): Avoid yet another case of infinite loop while
4423 detaching/killing after a longjmp.
4425 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4428 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4430 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4432 * hostio.c (handle_readlink): New function.
4433 (handle_vFile): Call it to handle "vFile:readlink" packets.
4435 2012-01-20 Pedro Alves <palves@redhat.com>
4436 Ulrich Weigand <ulrich.weigand@linaro.org>
4438 * server.c (handle_v_requests): Only support vAttach and vRun to
4439 start multiple processes when in extended protocol mode.
4441 2012-01-17 Pedro Alves <palves@redhat.com>
4443 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4444 memalign plus mprotect to allocate the scratch buffer.
4446 2012-01-13 Pedro Alves <palves@redhat.com>
4448 * server.c (attach_inferior): Clear `cont_thread'.
4450 2012-01-13 Pedro Alves <palves@redhat.com>
4452 * server.c (main): Avoid infinite loop while detaching/killing
4455 2012-01-09 Doug Evans <dje@google.com>
4457 * server.c (start_inferior): Set last_ptid in --wrapper case.
4459 2012-01-06 Yao Qi <yao@codesourcery.com>
4461 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4463 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4465 2012-01-04 Yao Qi <yao@codesourcery.com>
4467 * tracepoint.c (cmd_qtdp): Print debug message
4468 for static tracepoint.
4470 2012-01-04 Yao Qi <yao@codesourcery.com>
4472 * tracepoint.c (trace_vdebug): Differentiate debug message
4473 between gdbserver and IPA.
4475 2012-01-03 Yao Qi <yao@codesourcery.com>
4477 * tracepoint.c (tracepoint_was_hit): Don't collect for
4480 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4482 * terminal.h: Reformat copyright header.
4484 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4486 * server.c (gdbserver_version): Update copyright year.
4487 * gdbreplay.c (gdbreplay_version): Likewise.
4489 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4491 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4494 2011-12-18 Hui Zhu <teawater@gmail.com>
4495 * linux-low.c (linux_create_inferior): Save return value to ret.
4497 2011-12-18 Hui Zhu <teawater@gmail.com>
4499 * linux-low.c (linux_create_inferior): Save return value to ret.
4501 2011-12-16 Doug Evans <dje@google.com>
4503 * linux-low.c (linux_create_inferior): If stdio connection,
4504 redirect stdin from /dev/null, stdout to stderr.
4505 * remote-utils.c (remote_is_stdio): New static global.
4506 (remote_connection_is_stdio): New function.
4507 (remote_prepare): Handle stdio connection.
4508 (remote_open): Ditto.
4509 (remote_close): Don't close stdin for stdio connections.
4510 (read_prim,write_prim): New functions. Replace all calls to
4511 read/write to these.
4512 * server.c (main): Watch for "-" argument. Move call to
4513 remote_prepare before start_inferior.
4514 * server.h (STDIO_CONNECTION_NAME): New macro.
4515 (remote_connection_is_stdio): Declare.
4517 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4518 in debugging output.
4520 2011-12-15 Yao Qi <yao@codesourcery.com>
4522 * tracepoint.c: Include sys/syscall.h.
4523 (gdb_ust_thread): Remove preprocessor conditional.
4525 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4527 * linux-low.c (linux_detach_one_lwp): Call
4528 the_low_target.prepare_to_resume before detaching.
4530 2011-12-14 Yao Qi <yao@codesourcery.com>
4532 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4535 2011-12-14 Yao Qi <yao@codesourcery.com>
4537 * i386-low.c (i386_low_stopped_data_address): Initialize local
4540 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4544 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4545 DR_CONTROL unless necessary. Extend comments.
4546 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4547 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4549 2011-12-13 Yao Qi <yao@codesourcery.com>
4551 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4553 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4555 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4557 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4558 Print new debug message for such case.
4560 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4562 Fix overlapping memcpy.
4563 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4564 the read_inferior_memory transfer.
4565 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4566 write_inferior_memory transfer.
4567 (set_fast_tracepoint_jump): New variable buf. Use it for the
4568 read_inferior_memory and write_inferior_memory transfers.
4569 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4570 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4571 Use it for the write_inferior_memory transfer.
4572 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4575 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4577 * linux-low.c (fetch_register, store_register): Make code
4578 consistent, fix formatting.
4580 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4582 * linux-low.c (usr_store_inferior_registers): Factor out code
4583 to handle individual registers into...
4584 (store_register): ... this new function.
4586 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4588 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4589 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4590 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4591 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4592 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4593 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4594 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4595 (srv_xmlfiles): Add new XML files.
4597 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4599 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4600 (init_registers_s390_linux32v1): Add prototype.
4601 (init_registers_s390_linux32v2): Likewise.
4602 (init_registers_s390_linux64v1): Likewise.
4603 (init_registers_s390_linux64v2): Likewise.
4604 (init_registers_s390x_linux64v1): Likewise.
4605 (init_registers_s390x_linux64v2): Likewise.
4606 (s390_num_regs): Increment to 52.
4607 (s390_regmap): Add orig_r2 register.
4608 (s390_num_regs_3264): Increment to 68.
4609 (s390_regmap_3264): Add orig_r2 register.
4610 (s390_collect_ptrace_register): Handle orig_r2 register.
4611 (s390_supply_ptrace_register): Likewise.
4612 (s390_fill_last_break): New function.
4613 (s390_store_last_break): Likewise.
4614 (s390_fill_system_call): New function.
4615 (s390_store_system_call): Likewise.
4616 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4618 (s390_check_regset): New function.
4619 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4620 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4621 Update target_regsets for available register sets.
4623 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4624 Jan Kratochvil <jan.kratochvil@redhat.com>
4626 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4627 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4629 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4630 * linux-low.h (struct process_info_private): New member r_debug.
4631 * server.c (handle_qxfer_libraries): Call
4632 the_target->qxfer_libraries_svr4.
4633 (handle_qxfer_libraries_svr4): New function.
4634 (qxfer_packets): New entry "libraries-svr4".
4635 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4636 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4637 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4638 PACKET_qXfer_libraries_svr4.
4640 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4642 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4643 PSW address/mask between 8-byte and 16-byte formats.
4644 (s390_supply_ptrace_register): Likewise.
4645 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4646 basic addressing mode bit.
4648 2011-11-24 Stan Shebs <stan@codesourcery.com>
4650 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4652 2011-11-17 Stan Shebs <stan@codesourcery.com>
4654 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4655 (tracing_start_time): New global.
4656 (tracing_stop_time): New global.
4657 (tracing_user_name): New global.
4658 (tracing_notes): New global.
4659 (tracing_stop_note): New global.
4660 (cmd_qtstart): Set traceframe_usage, start_time.
4661 (stop_tracing): Set stop_time.
4662 (cmd_qtstatus): Report additional status.
4663 (cmd_qtp): New function.
4664 (handle_tracepoint_query): Call it.
4665 (cmd_qtnotes): New function.
4666 (handle_tracepoint_general_set): Call it.
4667 (get_timestamp): Rename from tsv_get_timestamp.
4669 2011-11-14 Stan Shebs <stan@codesourcery.com>
4670 Kwok Cheung Yeung <kcy@codesourcery.com>
4672 * linux-x86-low.c (small_jump_insn): New.
4673 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4674 trampoline and error message, build a trampoline and issue a small
4675 jump instruction to it.
4676 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4677 trampoline and error message.
4678 (x86_get_min_fast_tracepoint_insn_len): New.
4679 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4680 * linux-low.h (struct linux_target_ops): Add arguments to
4681 install_fast_tracepoint_jump_pad operation, add new operation.
4682 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4684 (linux_get_min_fast_tracepoint_insn_len): New function.
4685 (linux_target_op): Add new operation.
4686 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4687 (gdb_trampoline_buffer_end): Ditto.
4688 (gdb_trampoline_buffer_error): Ditto.
4689 (struct ipa_sym_addresses): Add fields for new IPA variables.
4690 (symbol_list): Add entries for new IPA variables.
4691 (struct tracepoint): Add fields to hold the address range of the
4692 trampoline used by the tracepoint.
4693 (trampoline_buffer_head): New static variable.
4694 (trampoline_buffer_tail): Ditto.
4695 (claim_trampoline_space): New function.
4696 (have_fast_tracepoint_trampoline_buffer): New function.
4697 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4699 (install_fast_tracepoint): Ditto, also add error buffer argument.
4700 (cmd_qtminftpilen): New function.
4701 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4702 (fast_tracepoint_from_trampoline_address): New function.
4703 (fast_tracepoint_collecting): Handle trampoline as part of jump
4705 (set_trampoline_buffer_space): New function.
4706 (initialize_tracepoint): Initialize new IPA variables.
4707 * target.h (struct target_ops): Add arguments to
4708 install_fast_tracepoint_jump_pad operation, add new
4709 get_min_fast_tracepoint_insn_len operation.
4710 (target_get_min_fast_tracepoint_insn_len): New.
4711 (install_fast_tracepoint_jump_pad): Add arguments.
4712 * server.h (IPA_BUFSIZ): Define.
4713 * linux-i386-ipa.c: Include extra header files.
4714 (initialize_fast_tracepoint_trampoline_buffer): New function.
4715 (initialize_low_tracepoint): Call it.
4716 * server.h (set_trampoline_buffer_space): Declare.
4717 (claim_trampoline_space): Ditto.
4718 (have_fast_tracepoint_trampoline_buffer): Ditto.
4720 2011-11-14 Yao Qi <yao@codesourcery.com>
4722 * server.c (handle_query): Handle InstallInTrace for qSupported.
4723 * tracepoint.c (add_tracepoint): Sort list.
4724 (install_tracepoint, download_tracepoint): New.
4725 (cmd_qtdp): Call them to install and download tracepoints.
4726 (sort_tracepoints): Removed.
4727 (cmd_qtstart): Update.
4729 2011-11-14 Yao Qi <yao@codesourcery.com>
4731 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4732 * mem-break.h: Declare.
4733 * tracepoint.c (cmd_qtstart): Move some code to ...
4734 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4736 (download_tracepoints): Move some code to ...
4737 (download_tracepoint_1): ... here. New.
4739 2011-11-08 Yao Qi <yao@codesourcery.com>
4741 * remote-utils.c (relocate_instruction): A comment fix.
4743 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4745 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4746 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4747 dr_status_mirror and dr_control_mirror from debug_reg_state.
4748 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4749 (i386_initial_stuff): Remove use of deleted globals.
4750 (i386_get_thread_context, i386_set_thread_context,
4751 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4752 from debug_reg_state.
4754 2011-11-05 Yao Qi <yao@codesourcery.com>
4756 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4757 address as TPOINT's.
4759 2011-11-02 Stan Shebs <stan@codesourcery.com>
4761 * tracepoint.c (agent_mem_read_string): New function.
4762 (eval_agent_expr): Call it for tracenz.
4763 * server.c (handle_query): Report support for tracenz.
4765 2011-11-02 Yao Qi <yao@codesourcery.com>
4767 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4769 2011-11-02 Yao Qi <yao@codesourcery.com>
4771 * target.h: Fix a typo in comment.
4773 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4775 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4776 clobber the breakpoints' shadows with fast tracepoint jumps.
4777 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4778 * target.c (write_inferior_memory): Also pass MYADDR down to
4781 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4783 * configure.ac: Check support for personality routine.
4784 * configure: Regenerate.
4785 * config.in: Likewise.
4786 * linux-low.c: Include <sys/personality.h>.
4787 Define ADDR_NO_RANDOMIZE if necessary.
4788 (linux_create_inferior): Disable address space randomization when
4789 forking inferior, if requested.
4790 (linux_supports_disable_randomization): New function.
4791 (linux_target_ops): Install it.
4792 * server.h (disable_randomization): Declare.
4793 * server.c (disable_randomization): New global variable.
4794 (handle_general_set): Handle QDisableRandomization.
4795 (handle_query): Likewise for qSupported.
4796 (main): Support --disable-randomization and --no-disable-randomization
4797 command line arguments.
4798 * target.h (struct target_ops): Add supports_disable_randomization.
4799 (target_supports_disable_randomization): New macro.
4801 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4803 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4805 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4806 [!PT_GETDSBT] (target_loadmap): New definition.
4807 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4808 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4809 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4810 and PT_GETDSBT to LINUX_LOADMAP.
4811 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4812 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4814 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4816 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4817 (arm_linux_hwbp_cap): New static variable.
4818 (arm_linux_get_hwbp_cap): Replace by ...
4819 (arm_linux_init_hwbp_cap): ... this new function.
4820 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4821 (arm_linux_get_hw_watchpoint_count): Likewise.
4822 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4823 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4824 (arm_prepare_to_resume): Use perror_with_name instead of error.
4826 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4828 * linux-arm-low.c: Include <signal.h>.
4829 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4830 (struct arm_linux_hwbp_cap): New data type.
4831 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4832 (struct arm_linux_hw_breakpoint): New data type.
4833 (MAX_BPTS, MAX_WPTS): Define.
4834 (struct arch_process_info, struct arch_lwp_info): New data types.
4835 (arm_linux_get_hwbp_cap): New function.
4836 (arm_linux_get_hw_breakpoint_count): Likewise.
4837 (arm_linux_get_hw_watchpoint_count): Likewise.
4838 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4839 (arm_hwbp_control_initialize): Likewise.
4840 (arm_hwbp_control_is_enabled): Likewise.
4841 (arm_hwbp_control_is_initialized): Likewise.
4842 (arm_hwbp_control_disable): Likewise.
4843 (arm_linux_hw_breakpoint_equal): Likewise.
4844 (arm_linux_hw_point_initialize): Likewise.
4845 (struct update_registers_data): New data structure.
4846 (update_registers_callback: New function.
4847 (arm_insert_point): Likewise.
4848 (arm_remove_point): Likewise.
4849 (arm_stopped_by_watchpoint): Likewise.
4850 (arm_stopped_data_address): Likewise.
4851 (arm_new_process): Likewise.
4852 (arm_new_thread): Likewise.
4853 (arm_prepare_to_resume): Likewise.
4854 (the_low_target): Register arm_insert_point, arm_remove_point,
4855 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4856 arm_new_thread, and arm_prepare_to_resume.
4858 2011-09-15 Stan Shebs <stan@codesourcery.com>
4860 * server.h (struct emit_ops): Add compare-goto fields.
4861 * tracepoint.c (gdb_agent_op_sizes): New table.
4862 (emit_eq_goto): New function.
4863 (emit_ne_goto): New function.
4864 (emit_lt_goto): New function.
4865 (emit_le_goto): New function.
4866 (emit_gt_goto): New function.
4867 (emit_ge_goto): New function.
4868 (is_goto_target): New function.
4869 (compile_bytecodes): Recognize special cases of compare-goto
4870 combinations and call specialized emitters for them.
4871 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4872 (amd64_emit_ne_goto): New function.
4873 (amd64_emit_lt_goto): New function.
4874 (amd64_emit_le_goto): New function.
4875 (amd64_emit_gt_goto): New function.
4876 (amd64_emit_ge_goto): New function.
4877 (amd64_emit_ops): Add the new functions.
4878 (i386_emit_eq_goto): New function.
4879 (i386_emit_ne_goto): New function.
4880 (i386_emit_lt_goto): New function.
4881 (i386_emit_le_goto): New function.
4882 (i386_emit_gt_goto): New function.
4883 (i386_emit_ge_goto): New function.
4884 (i386_emit_ops): Add the new functions.
4886 2011-09-08 Stan Shebs <stan@codesourcery.com>
4888 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4889 (i386_emit_epilogue): Restore %ebx.
4891 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4893 * server.c (step_thread): Remove definition.
4894 (process_serial_event): Don't handle Hs.
4895 * server.h (step_thread): Remove declaration.
4896 * target.c (set_desired_inferior): Remove use of step_thread.
4898 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4900 * linux-low.c: Include linux-procfs.h.
4901 (linux_attach_lwp_1): Update comments.
4902 (linux_attach): Scan for existing threads when attaching to a
4903 process that is the tgid.
4904 * Makefile.in: Update dependencies.
4906 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4908 * configure.srv: Add linux-procfs.o dependencies.
4910 2011-08-14 Yao Qi <yao@codesourcery.com>
4912 * target.h (struct target_ops): Fix indent.
4913 * win32-low.c (win32_target_ops): Fix comment.
4915 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4916 Yao Qi <yao@codesourcery.com>
4918 * Makefile.in (clean): Remove tic6x-*.c files.
4919 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4920 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4921 (tic6x-c64xp-linux.c): Likewise.
4922 * configure.srv: Add support for tic6x-*-uclinux.
4923 * linux-tic6x-low.c: New.
4924 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4926 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4927 Yao Qi <yao@codesourcery.com>
4929 * target.h (struct target_ops): Add read_loadmap.
4930 * linux-low.c (struct target_loadseg): New type.
4931 (struct target_loadmap): New type.
4932 (linux_read_loadmap): New function.
4933 (linux_target_ops): Add linux_read_loadmap.
4934 * server.c (handle_query): Support qXfer:fdpic:read packet.
4935 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4938 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4940 * win32-low.c: Include <stdint.h>.
4942 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4944 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4945 to the inferior here.
4946 (i386_remove_aligned_watchpoint): Ditto.
4947 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4948 fit part of the watchpoint in the debug registers.
4949 (i386_update_inferior_debug_regs): New.
4950 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4951 registers, and only update the inferior on success.
4952 (i386_low_remove_watchpoint): Ditto.
4954 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4956 * linux-low.c (compare_ints, unique, list_threads, show_process,
4957 linux_core_of_thread): Delete.
4958 (linux_target_ops): Change linux_core_of_thread to
4959 linux_common_core_of_thread.
4960 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4961 * utils.c (malloc_failure): Change type of argument.
4962 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4963 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4964 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4965 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4966 (IPA_OBJS): Add common-utils-ipa.o.
4967 (ptid_h, linux_osdata_h): New macros.
4968 (server_h): Add common/common-utils.h, common/xml-utils.h,
4969 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4971 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4972 ptid.o, buffer.o): New rules.
4973 (linux-low.o): Add common/linux-osdata.h as a dependency.
4974 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4975 * configure.ac: Add AC_HEADER_DIRENT check.
4976 * config.in: Regenerate.
4977 * configure: Regenerate.
4978 * remote-utils.c (xml_escape_text): Delete.
4979 (buffer_grow, buffer_free, buffer_init, buffer_finish,
4980 buffer_xml_printf): Move to common/buffer.c.
4981 * server.c (main): Remove call to initialize_inferiors.
4982 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4983 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4984 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4985 internal_error, gdb_assert, gdb_assert_fail): Delete.
4986 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4987 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4989 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4990 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4991 initialize_inferiors): Delete.
4993 2011-07-20 Pedro Alves <pedro@codesourcery.com>
4995 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4998 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5000 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5002 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5004 2011-05-26 Yao Qi <yao@codesourcery.com>
5006 * Makefile.in (thread-db.o): Track dependence to
5007 common/gdb_thread_db.h.
5008 * thread-db.c: include gdb_thread_db.h from right place.
5010 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5012 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5013 __FILE__ and __LINE__ to internal_error.
5015 2011-05-13 Doug Evans <dje@google.com>
5017 * thread-db.c (try_thread_db_load_from_sdir): New function.
5018 (try_thread_db_load_from_dir): New function.
5019 (thread_db_load_search): Handle $sdir, ignore $pdir.
5020 Remove trying of system directories if search of
5021 libthread-db-search-path fails, that is now done via $sdir.
5023 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5025 * server.c (handle_query): Add EnableDisableTracepoints to the list
5026 of supported features.
5027 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5029 (cmd_qtenable_disable): New.
5030 (cmd_qtstart): Install tracepoints even if disabled.
5031 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5032 receiving a QTEnable or QTDisable packet.
5033 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5034 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5036 (gdb_probe): Skip data collection if static tracepoint is disabled.
5038 2011-05-10 Doug Evans <dje@google.com>
5040 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5042 2011-05-04 Doug Evans <dje@google.com>
5044 * linux-low.c (linux_join): Skip process lookup.
5045 * spu-low.c (spu_join): Ditto.
5046 * server.c (join_inferiors_callback): Delete.
5047 (process_serial_event): For 'D' packet (detach) call join_inferior
5050 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5052 * README: Don't mention xscale*-*-linux*.
5053 * configure.srv (xscale*-*-linux*): Don't handle target.
5055 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5057 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5059 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5060 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5061 (i386_emit_void_call_2): Likewise.
5063 2011-04-26 Yao Qi <yao@codesourcery.com>
5065 * linux-low.c: Move common macros to linux-ptrace.h.
5066 Include linux-ptrace.h.
5067 * Makefile.in (linux_ptrace_h): New.
5068 (linux-low.o): Depends on linux-ptrace.h.
5070 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5072 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5073 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5074 (remote_prepare): New function with most of the TCP code from ...
5075 (remote_open): ... here. Detect PORT here unconditionally. Move also
5076 setting transport_is_reliable.
5077 * server.c (run_once): New variable.
5078 (gdbserver_usage): Document it.
5079 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5080 the first run if RUN_ONCE.
5081 * server.h (run_once, remote_prepare): New declarations.
5083 2011-04-19 Tom Tromey <tromey@redhat.com>
5085 * win32-low.c (handle_load_dll): Remove duplicate "the".
5087 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5089 Remove support for old Cygwin 1.5 versions.
5090 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5091 function to avoid warning.
5092 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5095 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5097 * gdbserver/server.h (Macro _): Define it if not available.
5099 2011-03-14 Michael Snyder <msnyder@vmware.com>
5101 * hostio.c (handle_close): Remove unnecessary null test.
5103 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5105 * Makefile.in (maintainer-clean realclean distclean): Remove
5106 "make ... subdir_do" command.
5108 2011-03-10 Michael Snyder <msnyder@vmware.com>
5110 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5112 * server.c (handle_v_run): Free alloced buffer on early return.
5114 2011-03-09 Yao Qi <yao@codesourcery.com>
5117 2011-03-04 Yao Qi <yao@codesourcery.com>
5119 * Makefile.in: Remove GNU make feature --directory.
5121 2011-03-05 Yao Qi <yao@codesourcery.com>
5123 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5124 (subdir_do): New make target. Copied from gdb/Makefile.
5125 (maintainer-clean, realclean, distclean, clean): Call corresponding
5126 make targets in common/Makefile.
5128 2011-02-11 Yao Qi <yao@codesourcery.com>
5130 * configure.ac: Call AC_PROG_RANLIB.
5131 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5132 * configure: Regenerate.
5134 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5136 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5138 2011-03-06 Yao Qi <yao@codesourcery.com>
5140 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5142 2011-03-05 Yao Qi <yao@codesourcery.com>
5144 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5145 (subdir_do): New make target. Copied from gdb/Makefile.
5146 (maintainer-clean, realclean, distclean, clean): Call corresponding
5147 make targets in common/Makefile.
5149 2011-03-04 Yao Qi <yao@codesourcery.com>
5151 * Makefile.in: Remove GNU make feature --directory.
5153 2011-03-04 Michael Snyder <msnyder@vmware.com>
5155 * server.c (queue_stop_reply): Call xmalloc not malloc.
5157 2011-03-02 Michael Snyder <msnyder@vmware.com>
5159 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5161 2011-02-28 Michael Snyder <msnyder@vmware.com>
5163 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5164 (cmd_qtframe): Ditto.
5165 (cmd_qtbuffer): Ditto.
5166 (cmd_bigqtbuffer): Ditto.
5168 * utils.c (decimal2str): Initialize 'width' to nine, then
5171 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5173 * hostio.c (require_data): Free *data, not data.
5175 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5177 * hostio.c (require_data): Use free, not xfree.
5179 2011-02-27 Michael Snyder <msnyder@vmware.com>
5181 * server.c (handle_query): Discard unused value.
5183 * hostio.c (require_data): Free malloc memory before returning
5186 2011-02-26 Michael Snyder <msnyder@vmware.com>
5188 * linux-low.c (list_threads): Call closedir for dirent.
5190 2011-02-27 Michael Snyder <msnyder@vmware.com>
5192 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5193 a case statement falls through.
5195 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5197 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5200 2011-02-26 Michael Snyder <msnyder@vmware.com>
5202 * utils.c (decimal2str): Eliminate dead code and dead param.
5203 (pulongest): Drop dead param from call to decimal2str.
5206 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5208 Revert the following patch (not approved yet):
5209 2011-02-21 Hui Zhu <teawater@gmail.com>
5210 * tracepoint.c (tp_printf): New function.
5211 (eval_agent_expr): Handle gdb_agent_op_printf.
5213 2011-02-21 Hui Zhu <teawater@gmail.com>
5215 * tracepoint.c (tp_printf): New function.
5216 (eval_agent_expr): Handle gdb_agent_op_printf.
5218 2011-02-18 Tom Tromey <tromey@redhat.com>
5220 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5221 (tracepoint.o): Likewise.
5222 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5223 (gdb_agent_op_names): Likewise.
5225 2011-02-18 Tom Tromey <tromey@redhat.com>
5227 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5228 gdb_agent_op_rot>: New constants.
5229 (gdb_agent_op_names): Add pick and roll.
5230 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5233 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5235 * aclocal.m4: Regenerated with aclocal-1.11.1.
5237 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5239 * server.c (handle_qxfer_traceframe_info): New.
5240 (qxfer_packets): Register "traceframe-info".
5241 (handle_query): Report support for qXfer:traceframe-info:read+.
5242 * tracepoint.c (match_blocktype): New.
5243 (traceframe_find_block_type): Rename to ...
5244 (traceframe_walk_blocks): ... this. Add callback filter argument,
5246 (traceframe_find_block_type): New, reimplemented on top of
5247 traceframe_walk_blocks.
5248 (build_traceframe_info_xml): New.
5249 (traceframe_read_info): New.
5250 * server.h (traceframe_read_info): Declare.
5252 2011-02-11 Yao Qi <yao@codesourcery.com>
5254 * configure.ac: Call AC_PROG_RANLIB.
5255 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5256 * configure: Regenerate.
5258 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5260 * server.c (gdb_read_memory): Change return semantics to allow
5262 (handle_search_memory_1): Adjust.
5263 (process_serial_event) <'m' packet>: Handle partial transfers.
5264 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5266 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5268 * regcache.c (init_register_cache): Initialize
5269 regcache->register_status.
5270 (free_register_cache): Release regcache->register_status.
5271 (regcache_cpy): Copy register_status.
5272 (registers_to_string): Print 'x's for unavailable registers.
5273 (supply_register): Mark the register's status valid or
5274 unavailable, depending on whether a buffer was passed in or not.
5275 (supply_register_zeroed): New.
5276 (supply_regblock): Mark the registers' status valid or
5277 unavailable, depending on whether a buffer was passed in or not.
5278 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5279 (struct regcache): New `register_status' field.
5280 (supply_register_zeroed): Declare.
5281 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5282 supply_register_zeroed, rather than passing a NULL buffer to
5284 * tracepoint.c (fetch_traceframe_registers): Update comment.
5286 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5288 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5291 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5293 * server.h (decode_xfer_write): Change prototype.
5294 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5295 and don't extract the annex here.
5296 * server.c (decode_xfer_read): Remove `annex' parameter,
5297 and don't extract the annex here.
5299 (struct qxfer): New.
5300 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5301 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5302 (handle_qxfer_statictrace): New functions, abstracted out from
5303 handle_query, and made to use the struct qxfer interface.
5304 (handle_threads_qxfer_proper): Rename to ...
5305 (handle_qxfer_threads_proper): ... this.
5306 (handle_threads_qxfer): Rename to ...
5307 (handle_qxfer_threads): ... this. Adjust.
5308 (qxfer_packets): New array.
5309 (handle_qxfer): New function.
5310 (handle_query): Use handle_qxfer.
5312 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5314 * gdbreplay.c: Shorten lines of >= 80 columns.
5315 * linux-low.c: Ditto.
5316 * linux-ppc-low.c: Ditto.
5317 * linux-s390-low.c: Ditto.
5318 * linux-sparc-low.c: Ditto.
5319 * linux-x86-low.c: Ditto.
5320 * linux-xtensa-low.c: Ditto.
5321 * mem-break.c: Ditto.
5323 * regcache.h: Ditto.
5324 * remote-utils.c: Ditto.
5327 * thread-db.c: Ditto.
5328 * tracepoint.c: Ditto.
5330 * win32-low.h: Ditto.
5332 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5334 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5337 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5339 * server.c (gdbserver_version): Update copyright year in version
5341 * gdbreplay.c (gdbreplay_version): Ditto.
5343 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5345 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5346 * linux-bfin-low.c: New file.
5347 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5348 PT_DATA_ADDR for BFIN targets.
5349 * Makefile.in (SFILES): Add linux-bfin-low.c.
5350 (clean): Remove reg-bfin.c.
5351 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5352 * README: Mention supported Blackfin targets.
5354 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5356 * .gitignore: New file.
5358 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5360 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5362 2010-10-22 Jie Zhang <jie@codesourcery.com>
5364 * Makefile.in: Add FLAGS_TO_PASS variable.
5365 (install): Remove dependency of install-only and recursively
5366 invoke make for install-only.
5368 2010-10-04 Doug Evans <dje@google.com>
5370 * Makefile.in (uninstall): Use $(DESTDIR).
5372 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5376 * linux-x86-low.c (compat_siginfo_from_siginfo)
5377 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5378 si_code is < 0. Check for si_code == SI_TIMER before checking for
5381 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5383 * lynx-i386-low.c: New file.
5384 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5386 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5388 * lynx-low.c (ptrace_request_to_str): Remove handling for
5389 request values that have been removed in LynxOS 5.x.
5391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5393 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5396 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5398 * configure.ac: Add --enable-inprocess-agent option.
5399 * configure: Rebuilt.
5401 2010-09-06 Yao Qi <yao@codesourcery.com>
5403 * linux-low.c (linux_kill): Remove unused variable.
5404 (linux_stabilize_threads): Likewise.
5405 * server.c (start_inferior): Likewise.
5406 (queue_stop_reply_callback): Likewise.
5407 * tracepoint.c (do_action_at_tracepoint): Likewise.
5409 2010-09-06 Yao Qi <yao@codesourcery.com>
5411 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5414 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5416 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5418 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5420 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5423 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5425 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5426 gdbserver/lynx-ppc-low.c: New files.
5427 * Makefile.in (lynx_low_h): New variable.
5428 (lynx-low.o, lynx-ppc-low.o): New rules.
5429 * configure.ac: On LynxOS, link with -lnetinet.
5430 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5431 * configure: regenerate.
5433 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5435 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5436 * configure.ac: Add check for vasprintf and vsnprintf.
5437 * configure, config.in: Regenerate.
5438 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5442 * gdbreplay.c: Move include of alloca.h up, next to include of
5444 * server.h: Add include of malloc.h.
5445 * mem-break.c: Remove include of malloc.h.
5446 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5448 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5450 * Makefile.in (memmem.o): Build with -Wno-error.
5452 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5454 * utils.c (xsnprintf): Make non-static.
5455 * server.h: Add xsnprintf declaration.
5456 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5457 replace calls to snprintf by calls to xsnprintf throughout.
5459 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5461 * configure.ac: Add configure check for alloca.
5462 * configure, config.in: Regenerate.
5463 * server.h: Include alloca.h if it exists.
5464 * gdbreplay.c: Include alloca.h if it exists.
5466 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5468 * linux-low.c (__SIGRTMIN): Define if not already defined.
5469 (linux_create_inferior): Check for __ANDROID__ rather than
5471 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5472 are already deferred.
5473 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5474 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5475 stopped and already has a pending signal to report.
5476 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5477 a pending signal to report or is moving out of a jump pad.
5478 (linux_init_signals): Check for __ANDROID__ rather than
5481 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5483 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5484 debug_threads check. Avoid a linear search when not doing debug
5487 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5489 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5490 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5491 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5492 (process_event): Change local fd's type to gdb_fildes_t.
5493 (create_file_handler): Adjust prototype.
5494 (delete_file_handler): Adjust prototype.
5495 (handle_file_event): Adjust prototype. Use pfildes.
5496 (create_file_event): Adjsut prototype.
5497 * remote-utils.c (remote_desc, listen_desc): Change type to
5499 * server.h: New gdb_fildes_t typedef.
5500 [USE_WIN32API]: Include winsock2.h.
5501 (delete_file_handler, add_file_handler): Adjust prototypes.
5503 * utils.c (pfildes): New.
5505 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5507 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5508 * configure: Regenerate.
5510 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5512 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5513 (linux_done_accessing_memory): ... this.
5514 (linux_target_ops): Adjust.
5515 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5516 * nto-low.c (nto_target_ops): Adjust comment.
5517 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5518 * spu-low.c (spu_target_ops): Adjust comment.
5519 * target.h (target_ops): Rename unprepare_to_access_memory field
5520 to done_accessing_memory.
5521 (unprepare_to_access_memory): Rename to ...
5522 (done_accessing_memory): ... this.
5524 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5526 * linux-low.c (linux_prepare_to_access_memory): New.
5527 (linux_unprepare_to_access_memory): New.
5528 (linux_target_ops): Install them.
5529 * server.c (read_memory): Rename to ...
5530 (gdb_read_memory): ... this. Use
5531 prepare_to_access_memory/prepare_to_access_memory.
5532 (write_memory): Rename to ...
5533 (gdb_write_memory): ... this. Use
5534 prepare_to_access_memory/prepare_to_access_memory.
5535 (handle_search_memory_1): Adjust.
5536 (process_serial_event): Adjust.
5537 * target.h (struct target_ops): New fields
5538 prepare_to_access_memory and unprepare_to_access_memory.
5539 (prepare_to_access_memory, unprepare_to_access_memory): New.
5540 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5541 prepare_to_access_memory/prepare_to_access_memory.
5542 * nto-low.c (nto_target_ops): Adjust.
5543 * spu-low.c (spu_target_ops): Adjust.
5544 * win32-low.c (win32_target_ops): Adjust.
5546 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5548 * Makefile.in (WARN_CFLAGS): Get it from configure.
5549 (WERROR_CFLAGS): New.
5550 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5551 * configure.ac: Introduce --enable-werror, which adds -Werror to
5552 the compiler command line. Enabled by default. Disable with
5553 --disable-werror. Add -Wdeclaration-after-statement
5554 Wpointer-arith and -Wformat-nonliteral to warning flags.
5555 * configure: Regenerate.
5557 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5559 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5561 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5563 * gdbreplay.c (remote_error): New.
5565 (expect): Use gdbchar. Check for error reading from GDB.
5566 Clarify sync error output.
5567 (play): Check for errors writing to GDB.
5568 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5569 * remote-utils.c (getpkt): Check for errors writing to the remote
5572 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5574 * linux-low.c (linux_wait_1): Move non-debugging code out of
5575 `debug_threads' control.
5577 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5579 * linux-low.c (linux_wait_1): Don't set last_status here.
5580 * server.c (push_event, queue_stop_reply_callback): Assert we're
5581 not pushing a TARGET_WAITKIND_IGNORE event.
5582 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5583 (myresume, handle_target_event): Set the thread's last_resume_kind
5584 and last_status from the target returned status.
5586 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5590 * linux-x86-low.c (update_debug_registers_callback): New.
5591 (i386_dr_low_set_addr): Use it.
5592 (i386_dr_low_get_addr): New.
5593 (i386_dr_low_set_control): Use update_debug_registers_callback.
5594 (i386_dr_low_get_control): New.
5595 (i386_dr_low_get_status): Adjust.
5596 * linux-low.c (linux_stop_lwp): New.
5597 * linux-low.h (linux_stop_lwp): Declare.
5599 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5600 argument instead of a i386_debug_reg_state.
5601 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5602 a i386_debug_reg_state.
5603 (i386_insert_aligned_watchpoint): Adjust.
5604 (i386_remove_aligned_watchpoint): Adjust.
5605 (i386_low_stopped_data_address): Read the debug registers from the
5606 inferior instead of from the mirrors.
5607 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5608 (i386_dr_low_get_addr): Declare.
5609 (i386_dr_low_get_control): Declare.
5610 (i386_dr_low_get_status): Change prototype.
5612 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5613 (i386_dr_low_get_addr): New.
5614 (i386_dr_low_get_control): New.
5615 (i386_dr_low_get_status): Adjust prototype. Return
5617 (i386_initial_stuff): Clear dr_status_mirror and
5619 (i386_get_thread_context): Adjust.
5620 (i386_set_thread_context): Adjust.
5621 (i386_thread_added): Adjust.
5623 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5625 * linux-low.h (linux_thread_area): Delete declaration.
5627 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5629 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5630 after its termination.
5632 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5634 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5635 (gdb_wants_all_stopped): Delete.
5636 (linux_wait_1): Don't call them.
5637 * server.c (handle_v_cont): Tag all threads as want-stopped.
5638 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5639 stopped as "client-wants-stopped".
5641 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5643 * Makefile.in (signals_h): New.
5644 (server_h): Depend on it.
5645 (server.o): Don't depend on $(signals_def).
5646 (signals.o): Depend on $(signals_def).
5648 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5650 * Makefile.in (signals_def): New.
5651 (server_h): Append include/gdb/signals.h and signals_def.
5652 (server.o): Append signals_def.
5654 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5656 * server.c (handle_target_event): Use target_signal_to_host for
5657 resume_info.sig initialization.
5658 * target.h (struct thread_resume) <sig>: New comment.
5660 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5662 * server.c (handle_query): strcpy() the returned string from paddress()
5663 instead of sprintf().
5664 * utils.c (paddress): Return phex_nz().
5666 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5668 * server.c (handle_v_cont): Call mourn_inferior if process
5670 (myresume): Likewise.
5672 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5674 Static tracepoints, and integration with UST.
5676 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5677 * mem-break.c (uninsert_all_breakpoints)
5678 (reinsert_all_breakpoints): New.
5679 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5680 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5681 (gdb_agent_ust_loaded, helper_thread_id)
5682 (gdb_agent_helper_thread_id): New macros.
5683 (struct ipa_sym_addresses): Add addr_ust_loaded,
5684 addr_helper_thread_id, addr_cmd_buf.
5685 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5686 (in_process_agent_loaded_ust): New.
5687 (write_e_ust_not_loaded): New.
5688 (maybe_write_ipa_ust_not_loaded): New.
5689 (struct collect_static_trace_data_action): New.
5690 (enum tracepoint_type) <static_tracepoint>: New.
5691 (struct tracepoint) <handle>: Mention static tracepoints.
5692 (struct static_tracepoint_ctx): New.
5693 (CMD_BUF_SIZE): New.
5694 (add_tracepoint_action): Handle static tracepoint actions.
5695 (unprobe_marker_at): New.
5696 (clear_installed_tracepoints): Handle static tracepoints.
5697 (cmd_qtdp): Handle static tracepoints.
5698 (probe_marker_at): New.
5699 (cmd_qtstart): Handle static tracepoints.
5700 (response_tracepoint): Handle static tracepoints.
5701 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5702 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5703 (get_context_regcache): Handle static tracepoints.
5704 (do_action_at_tracepoint): Handle static tracepoint actions.
5705 (traceframe_find_block_type): Handle static trace data blocks.
5706 (traceframe_read_sdata): New.
5707 (download_tracepoints): Download static tracepoint actions.
5708 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5709 (GDB_PROBE_NAME): New.
5714 (ust_marker_to_static_tracepoint): New.
5716 (collect_ust_data_at_tracepoint): New.
5717 (gdb_ust_probe): New.
5718 (UNIX_PATH_MAX, SOCK_DIR): New.
5719 (gdb_ust_connect_sync_socket): New.
5720 (resume_thread, stop_thread): New.
5721 (run_inferior_command): New.
5722 (init_named_socket): New.
5723 (gdb_ust_socket_init): New.
5724 (cstr_to_hexstr): New.
5726 (first_marker, next_marker): New.
5727 (response_ust_marker): New.
5728 (cmd_qtfstm, cmd_qtsstm): New.
5729 (unprobe_marker_at, probe_marker_at): New.
5730 (cmd_qtstmat, gdb_ust_thread): New.
5731 (gdb_ust_init): New.
5732 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5733 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5735 (x86_64_st_collect_regmap): New.
5736 (X86_64_NUM_ST_COLLECT_GREGS): New.
5737 (AMD64_RIP_REGNUM): New.
5738 (supply_static_tracepoint_registers): New.
5739 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5741 (i386_st_collect_regmap): New.
5742 (i386_NUM_ST_COLLECT_GREGS): New.
5743 (supply_static_tracepoint_registers): New.
5744 * server.c (handle_query): Handle qXfer:statictrace:read.
5745 <qSupported>: Report support for StaticTracepoints, and
5746 qXfer:statictrace:read features.
5747 * server.h (traceframe_read_sdata)
5748 (supply_static_tracepoint_registers): Declare.
5749 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5750 (unpack_varlen_hex): Include in IPA build.
5751 * Makefile.in (ustlibs, ustinc): New.
5752 (IPA_OBJS): Add remote-utils-ipa.o.
5753 ($(IPA_LIB)): Link -ldl and -lpthread.
5755 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5756 * config.in, configure: Regenerate.
5758 2010-06-20 Ian Lance Taylor <iant@google.com>
5759 Pedro Alves <pedro@codesourcery.com>
5761 * linux-x86-low.c (always_true): Delete.
5762 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5763 trying to fool the compiler with always_true.
5765 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5767 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5768 conditions in gdbserver.
5770 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5772 * spu-low.c (spu_read_memory): Wrap around local store limit.
5773 (spu_write_memory): Likewise.
5775 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5777 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5778 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5780 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5782 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5783 uses with LONGEST uses.
5785 2010-06-14 Stan Shebs <stan@codesourcery.com>
5786 Pedro Alves <pedro@codesourcery.com>
5790 * linux-x86-low.c: Include limits.h.
5795 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5796 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5797 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5798 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5799 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5800 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5801 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5802 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5803 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5804 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5805 (amd64_emit_void_call_2): New.
5806 (amd64_emit_ops): New.
5807 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5808 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5809 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5810 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5811 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5812 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5813 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5814 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5815 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5816 (i386_emit_stack_adjust, i386_emit_int_call_1)
5817 (i386_emit_void_call_2): New.
5818 (i386_emit_ops): New.
5819 (x86_emit_ops): New.
5820 (the_low_target): Install x86_emit_ops.
5821 * server.h (struct emit_ops): New.
5822 (get_raw_reg_func_addr): Declare.
5823 (current_insn_ptr, emit_error): Declare.
5824 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5825 (set_trace_state_variable_value): New defines.
5826 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5827 addr_get_trace_state_variable_value and
5828 addr_set_trace_state_variable_value.
5829 (symbol_list): New fields for get_raw_reg,
5830 get_trace_state_variable_value and set_trace_state_variable_value.
5831 (condfn): New typedef.
5832 (struct tracepoint): New field `compiled_cond'.
5833 (do_action_at_tracepoint): Clear compiled_cond.
5834 (get_trace_state_variable_value, set_trace_state_variable_value):
5836 (condition_true_at_tracepoint): If there's a compiled condition,
5838 (current_insn_ptr, emit_error): New globals.
5839 (struct bytecode_address): New.
5840 (get_raw_reg_func_addr): New.
5841 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5842 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5843 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5844 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5845 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5846 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5847 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5848 (compile_tracepoint_condition, compile_bytecodes): New.
5849 * target.h (emit_ops): Forward declare.
5850 (struct target_ops): New field emit_ops.
5851 (target_emit_ops): New.
5852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5853 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5854 * linux-low.c (linux_emit_ops): New.
5855 (linux_target_ops): Install it.
5856 * linux-low.h (struct linux_target_ops): New field emit_ops.
5858 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5860 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5861 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5863 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5864 Stan Shebs <stan@codesourcery.com>
5866 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5867 (all): Depend on $(extra_libraries).
5868 (install-only): Install the IPA.
5869 (IPA_OBJS, IPA_LIB): New.
5870 (clean): Remove the IPA lib.
5871 (IPAGENT_CFLAGS): New.
5872 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5873 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5874 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5875 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5876 * configure.ac: Check for atomic builtins support in the compiler.
5877 (IPA_DEPFILES, extra_libraries): Define.
5878 * configure.srv (ipa_obj): Add description.
5879 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5880 (i[34567]86-*-linux*): Set ipa_obj.
5881 (x86_64-*-linux*): Set ipa_obj.
5882 * linux-low.c (stabilizing_threads): New.
5883 (supports_fast_tracepoints): New.
5884 (linux_detach): Stabilize threads before detaching.
5885 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5886 the lwp is either not stabilizing, or is moving out of a jump pad.
5887 (linux_fast_tracepoint_collecting): New.
5888 (maybe_move_out_of_jump_pad): New.
5889 (enqueue_one_deferred_signal): New.
5890 (dequeue_one_deferred_signal): New.
5891 (linux_wait_for_event_1): If moving out of a jump pad, defer
5892 pending signals to later.
5893 (linux_stabilize_threads): New.
5894 (linux_wait_1): Check if threads need moving out of jump pads, and
5896 (stuck_in_jump_pad_callback): New.
5897 (move_out_of_jump_pad_callback): New.
5899 (linux_resume_one_lwp): Handle moving out of jump pads.
5900 (linux_set_resume_request): Dequeue deferred signals.
5901 (need_step_over_p): Also step over fast tracepoint jumps.
5902 (start_step_over): Also uninsert fast tracepoint jumps.
5903 (finish_step_over): Also reinsert fast tracepoint jumps.
5904 (linux_install_fast_tracepoint_jump): New.
5905 (linux_target_ops): Install linux_stabilize_threads and
5906 linux_install_fast_tracepoint_jump_pad.
5907 * linux-low.h (linux_target_ops) <get_thread_area,
5908 install_fast_tracepoint_jump_pad>: New fields.
5909 (struct lwp_info) <collecting_fast_tracepoint,
5910 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5911 (linux_get_thread_area): Declare.
5912 * linux-x86-low.c (jump_insn): New.
5913 (x86_get_thread_area): New.
5914 (append_insns): New.
5916 (amd64_install_fast_tracepoint_jump_pad): New.
5917 (i386_install_fast_tracepoint_jump_pad): New.
5918 (x86_install_fast_tracepoint_jump_pad): New.
5919 (the_low_target): Install x86_get_thread_area and
5920 x86_install_fast_tracepoint_jump_pad.
5921 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5922 (struct fast_tracepoint_jump): New.
5923 (fast_tracepoint_jump_insn): New.
5924 (fast_tracepoint_jump_shadow): New.
5925 (find_fast_tracepoint_jump_at): New.
5926 (fast_tracepoint_jump_here): New.
5927 (delete_fast_tracepoint_jump): New.
5928 (set_fast_tracepoint_jump): New.
5929 (uninsert_fast_tracepoint_jumps_at): New.
5930 (reinsert_fast_tracepoint_jumps_at): New.
5931 (set_breakpoint_at): Use write_inferior_memory.
5932 (uninsert_raw_breakpoint): Use write_inferior_memory.
5933 (check_mem_read): Mask out fast tracepoint jumps.
5934 (check_mem_write): Mask out fast tracepoint jumps.
5935 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5936 (set_fast_tracepoint_jump): Declare.
5937 (delete_fast_tracepoint_jump)
5938 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5939 (reinsert_fast_tracepoint_jumps_at): Declare.
5940 * regcache.c: Don't compile many functions when building the
5941 in-process agent library.
5942 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5943 the register buffer in the heap.
5944 (free_register_cache): If the register buffer isn't owned by the
5945 regcache, don't free it.
5946 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5947 pre-existing register caches.
5948 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5950 (convert_ascii_to_int): : Constify `from' parameter type.
5951 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5952 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5953 the needed buffer in-place.
5954 (relocate_instruction): New.
5955 * server.c (handle_query) <qSymbols>: If the target supports
5956 tracepoints, give it a chance of looking up symbols. Report
5957 support for fast tracepoints.
5958 (handle_status): Stabilize threads.
5959 (process_serial_event): Adjust.
5960 * server.h (struct fast_tracepoint_jump): Forward declare.
5961 (struct process_info) <fast_tracepoint_jumps>: New field.
5962 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5963 (decode_X_packet, decode_M_packet): Adjust.
5964 (relocate_instruction): Declare.
5965 (in_process_agent_loaded): Declare.
5966 (tracepoint_look_up_symbols): Declare.
5967 (struct fast_tpoint_collect_status): Declare.
5968 (fast_tracepoint_collecting): Declare.
5969 (force_unlock_trace_buffer): Declare.
5970 (handle_tracepoint_bkpts): Declare.
5971 (initialize_low_tracepoint)
5972 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5973 * target.h (struct target_ops) <stabilize_threads,
5974 install_fast_tracepoint_jump_pad>: New fields.
5975 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5976 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5977 [HAVE_STDINT_H]: Include stdint.h.
5978 (trace_debug_1): Rename to ...
5979 (trace_vdebug): ... this.
5980 (trace_debug): Rename to ...
5981 (trace_debug_1): ... this. Add `level' parameter.
5983 (ATTR_USED, ATTR_NOINLINE): New.
5984 (IP_AGENT_EXPORT): New.
5985 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5986 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5987 (about_to_request_buffer_space, trace_buffer_is_full)
5988 (stopping_tracepoint, expr_eval_result, error_tracepoint)
5989 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5990 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5991 (traceframe_write_count, traceframes_created)
5992 (trace_state_variables)
5993 New renaming defines.
5994 (struct ipa_sym_addresses): New.
5995 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5997 (ipa_sym_addrs): New.
5998 (all_tracepoint_symbols_looked_up): New.
5999 (in_process_agent_loaded): New.
6000 (write_e_ipa_not_loaded): New.
6001 (maybe_write_ipa_not_loaded): New.
6002 (tracepoint_look_up_symbols): New.
6003 (debug_threads) [IN_PROCESS_AGENT]: New.
6004 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6005 (UNKNOWN_SIDE_EFFECTS): New.
6006 (stop_tracing): New.
6007 (flush_trace_buffer): New.
6008 (stop_tracing_bkpt): New.
6009 (flush_trace_buffer_bkpt): New.
6010 (read_inferior_integer): New.
6011 (read_inferior_uinteger): New.
6012 (read_inferior_data_pointer): New.
6013 (write_inferior_data_pointer): New.
6014 (write_inferior_integer): New.
6015 (write_inferior_uinteger): New.
6016 (struct collect_static_trace_data_action): Delete.
6017 (enum tracepoint_type): New.
6018 (struct tracepoint) <type>: New field `type'.
6019 <actions_str, step_actions, step_actions_str>: Only include in
6021 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6022 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6023 (tracepoints): Use IP_AGENT_EXPORT.
6024 (last_tracepoint): Don't include in the IPA.
6025 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6026 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6027 (alloced_trace_state_variables): New.
6028 (trace_state_variables): Use IP_AGENT_EXPORT.
6029 (traceframe_t): Delete unused variable.
6030 (circular_trace_buffer): Don't include in the IPA.
6031 (trace_buffer_start): Delete.
6032 (struct trace_buffer_control): New.
6033 (trace_buffer_free): Delete.
6034 (struct ipa_trace_buffer_control): New.
6035 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6036 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6038 (trace_buffer_ctrl): New.
6039 (TRACE_BUFFER_CTRL_CURR): New.
6040 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6041 Reimplement as macros.
6042 (trace_buffer_wrap): Delete.
6043 (traceframe_write_count, traceframe_read_count)
6044 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6045 (struct tracepoint_hit_ctx) <type>: New field.
6046 (struct fast_tracepoint_ctx): New.
6047 (memory_barrier): New.
6049 (record_tracepoint_error): Update atomically in the IPA.
6050 (clear_inferior_trace_buffer): New.
6051 (about_to_request_buffer_space): New.
6052 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6053 updating the same buffer.
6054 (add_tracepoint): Default the tracepoint's type to trap
6055 tracepoint, and orig_size to -1.
6056 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6058 (create_trace_state_variable): New parameter `gdb'. Handle it.
6059 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6060 (cmd_qtdp): Handle fast tracepoints.
6062 (max_jump_pad_size): New.
6063 (gdb_jump_pad_head): New.
6064 (get_jump_space_head): New.
6065 (claim_jump_space): New.
6066 (sort_tracepoints): New.
6067 (MAX_JUMP_SIZE): New.
6068 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6070 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6071 support. Upload fast traceframes, and delete internal IPA
6073 (stop_tracing_handler): New.
6074 (flush_trace_buffer_handler): New.
6075 (cmd_qtstop): Upload fast tracepoints.
6076 (response_tracepoint): Handle fast tracepoints.
6077 (tracepoint_finished_step): Upload fast traceframes. Set the
6078 tracepoint hit context's tracepoint type.
6079 (handle_tracepoint_bkpts): New.
6080 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6081 type. Add comment about fast tracepoints.
6082 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6083 non-existing action_str field.
6084 (get_context_regcache): Handle fast tracepoints.
6085 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6087 (fast_tracepoint_from_jump_pad_address): New.
6088 (fast_tracepoint_from_ipa_tpoint_address): New.
6089 (collecting_t): New.
6090 (force_unlock_trace_buffer): New.
6091 (fast_tracepoint_collecting): New.
6094 (write_inferior_data_ptr): New.
6095 (target_tp_heap): New.
6096 (target_malloc): New.
6097 (download_agent_expr): New.
6099 (download_tracepoints): New.
6100 (download_trace_state_variables): New.
6101 (upload_fast_traceframes): New.
6102 (IPA_FIRST_TRACEFRAME): New.
6103 (IPA_NEXT_TRACEFRAME_1): New.
6104 (IPA_NEXT_TRACEFRAME): New.
6105 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6106 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6107 (gdb_jump_pad_buffer_end): New.
6108 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6109 (initialize_tracepoint): Adjust.
6110 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6111 buffer. Initialize the low module.
6112 * utils.c (PREFIX, TOOLNAME): New.
6113 (malloc_failure): Use PREFIX.
6114 (error): In the IPA, an error causes an exit.
6115 (fatal, warning): Use PREFIX.
6116 (internal_error): Use TOOLNAME.
6117 (NUMCELLS): Increase to 10.
6118 * configure, config.in: Regenerate.
6120 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6122 * server.c (handle_query) <qSupported>: Do two passes over the
6123 qSupported string to avoid nesting strtok.
6125 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6127 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6129 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6131 * configure: Regenerate.
6132 * proc-service.list: New.
6134 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6136 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6139 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6141 * gdbreplay.c (remote_open): Check error return from socket() call by
6142 its equality to -1 not by it being negative.
6143 * remote-utils.c (remote_open): Likewise.
6145 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6147 * config.h: Regenerate.
6149 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6151 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6152 doesn't provide PTRACE_GET_THREAD_AREA.
6154 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6156 * linux-m68k-low.c: Include <asm/ptrace.h>
6157 (ps_get_thread_area): Implement.
6159 2010-05-03 Doug Evans <dje@google.com>
6161 * event-loop.c (struct callback_event): New struct.
6162 (callback_list): New global.
6163 (append_callback_event, delete_callback_event): New functions.
6164 (process_callback): New function.
6165 (start_event_loop): Call it.
6166 * remote-utils.c (NOT_SCHEDULED): Define.
6167 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6168 moved out of readchar.
6169 (readchar): Rewrite. Call reschedule before returning.
6170 (reset_readchar): New function.
6171 (remote_close): Call it.
6172 (process_remaining, reschedule): New functions.
6173 * server.h (callback_handler_func): New typedef.
6174 (append_callback_event, delete_callback_event): Declare.
6176 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6178 * proc-service.c (ps_pglobal_lookup): Use
6179 thread_db_look_up_one_symbol.
6180 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6181 parameter. Use it instead of all_symbols_looked_up.
6182 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6184 (all_symbols_looked_up): Don't declare.
6185 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6186 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6188 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6189 Set all_symbols_looked_up here.
6190 (thread_db_look_up_one_symbol): New.
6191 (thread_db_get_tls_address): Adjust.
6192 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6193 thread_db object on the heap, and tentatively set it in the
6195 (thread_db_init): Don't set all_symbols_looked_up here.
6196 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6198 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6200 * linux-low.c (linux_kill, linux_detach): Adjust.
6201 (status_pending_p_callback): Remove redundant statement. Check
6202 for !TARGET_WAITIKIND_IGNORE, instead of
6203 TARGET_WAITKIND_STOPPED.
6204 (handle_tracepoints): Make sure LWP is locked. Adjust.
6205 (linux_wait_for_event_1): Adjust.
6206 (linux_cancel_breakpoints): New.
6207 (unsuspend_one_lwp): New.
6208 (unsuspend_all_lwps): New.
6209 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6210 (send_sigstop_callback): Change return type to int, add new
6211 `except' parameter and handle it.
6212 (suspend_and_send_sigstop_callback): New.
6213 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6214 pass them down. If SUSPEND, also increment the lwp's suspend
6216 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6217 (need_step_over_p): Don't consider suspended LWPs.
6218 (start_step_over): Adjust.
6219 (proceed_one_lwp): Change return type to int, add new `except'
6220 parameter and handle it.
6221 (unsuspend_and_proceed_one_lwp): New.
6222 (proceed_all_lwps): Use find_inferior instead of
6224 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6225 also decrement the suspend count of LWPs. Pass `except' down,
6226 instead of hacking its suspend count.
6227 (linux_pause_all): Add `freeze' parameter. Adjust.
6228 (linux_unpause_all): New.
6229 (linux_target_ops): Install linux_unpause_all.
6230 * server.c (handle_status): Adjust.
6231 * target.h (struct target_ops): New fields `unpause_all' and
6232 `cancel_breakpoints'. Add new parameter to `pause_all'.
6233 (pause_all): Add new `freeze' parameter.
6235 (cancel_breakpoints): New.
6236 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6238 (cmd_qtstart): Pause threads.
6239 (stop_tracing): Pause threads, and cancel breakpoints.
6240 * win32-low.c (win32_target_ops): Adjust.
6242 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6244 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6245 the inferior right away from here...
6246 (linux_wait_1): ... to here, and adjust to check the thread's
6247 last_resume_kind instead of the lwp's step or stop_expected flags.
6249 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6251 * README: Use consistent `GDB' and `GDBserver' spellings.
6253 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6255 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6256 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6257 (linux_detach_one_lwp): Assume the lwp is stopped.
6258 (any_thread_of): Delete.
6259 (linux_detach): Stop all lwps here. Don't blindly delete all
6261 (delete_lwp_callback): New.
6262 (linux_mourn): Delete all lwps of the process that is gone.
6263 (linux_wait_1): Don't delete the last lwp of the process here.
6264 * mem-break.h (mark_breakpoints_out): Declare.
6265 * mem-break.c (mark_breakpoints_out): New.
6266 (free_all_breakpoints): Use it.
6267 * server.c (handle_target_event): If the process is gone, mark
6269 * thread-db.c (struct thread_db) <create_bp>: New field.
6270 (thread_db_enable_reporting): Fix prototype. Store a thread event
6271 breakpoint reference in the thread_db struct.
6272 (thread_db_load_search): Clear the thread_db object.
6273 (try_thread_db_load_1): Ditto.
6274 (switch_to_process): New.
6275 (disable_thread_event_reporting): Use it.
6276 (remove_thread_event_breakpoints): New.
6277 (thread_db_detach, thread_db_mourn): Use it.
6279 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6281 * linux-low.c (linux_enable_event_reporting): New.
6282 (linux_wait_for_event_1, handle_extended_wait): Use it.
6284 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6286 * linux-low.c (linux_kill_one_lwp, linux_kill)
6287 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6288 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6289 SIGSTOP even if the LWP is stopped.
6290 (send_sigstop_callback): New.
6291 (stop_all_lwps): Use send_sigstop_callback instead.
6292 (linux_resume_one_thread): Adjust.
6293 (proceed_one_lwp): Still proceed an LWP that the client has
6294 requested to stop, if we haven't reported it as stopped yet. Make
6295 sure that LWPs the client want stopped, have a pending SIGSTOP.
6297 2010-04-26 Doug Evans <dje@google.com>
6299 * server.c (handle_general_set): Make static.
6301 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6302 Print received char after testing for error/eof instead of before.
6303 (input_interrupt): Tweak comment.
6305 2010-04-23 Doug Evans <dje@google.com>
6307 * server.c (start_inferior): Print inferior argv if --debug.
6309 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6311 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6312 * nto-x86-low.c: Include server.h
6314 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6316 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6317 be consistent with other sources of this directory.
6318 (init_registers_amd64): Correct name of source file of this function
6321 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6323 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6326 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6328 * win32-i386-low.c: Add 64-bit support.
6329 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6330 (init_registers_amd64): Declare.
6331 (mappings): Add 64-bit version of array.
6332 (init_windows_x86): New function.
6333 (the_low_target): Change init_arch field to init_windows_x86.
6335 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6337 * win32-low.c: Adapt to support also 64-bit architecture.
6338 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6339 (get_image_name): Use SIZE_T type for local variable `done'.
6340 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6341 (toolhelp_get_dll_name): Idem.
6342 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6343 Use uintptr_t typecast to avoid warning.
6344 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6345 (handle_exception): Use phex_nz to avoid warning.
6346 (win32_wait): Remove unused local variable `process'.
6348 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6350 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6353 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6355 * configure.ac: Use `ws2_32' library for srv_mingw.
6356 * configure: Regenerate.
6357 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6358 * remote-utils.c: Likewise.
6360 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6362 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6363 if __x86_64__ is defined.
6365 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6367 * configure: Regenerate.
6369 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6371 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6372 * target.h (target_ops): New get_tib_address field.
6373 * win32-low.h (win32_thread_info): Add thread_local_base field.
6374 * win32-low.c (child_add_thread): Add tlb argument.
6375 Set thread_local_base field to TLB.
6376 (get_child_debug_event): Adapt to child_add_thread change.
6377 (win32_get_tib_address): New function.
6378 (win32_target_ops): Set get_tib_address field to
6379 win32_get_tib_address.
6380 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6382 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6384 * linux-low.c (linux_mourn): Also remove the process.
6385 * server.c (handle_target_event): Don't remove the process here.
6386 * nto-low.c (nto_mourn): New.
6387 (nto_target_ops): Install it.
6388 * spu-low.c (spu_mourn): New.
6389 (spu_target_ops): Install it.
6390 * win32-low.c (win32_mourn): New.
6391 (win32_target_ops): Install it.
6393 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6395 * server.h (buffer_xml_printf): Remove redundant `;'.
6397 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6399 * regcache.c (set_register_cache): Invalidate regcaches before
6400 changing the register cache layout.
6401 (regcache_invalidate_one): Allow a NULL regcache.
6402 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6403 regcaches before changing the register cache layout or the target
6406 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6408 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6409 variable warning on Linux/x86-64.
6411 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6413 GDBserver disconnected tracing support.
6415 * linux-low.c (linux_remove_process): Delete.
6416 (add_lwp): Don't set last_resume_kind here.
6417 (linux_kill): Use `mourn'.
6418 (linux_detach): Use `thread_db_detach', and `mourn'.
6420 (linux_attach_lwp_1): Adjust comment.
6421 (linux_attach): last_resume_kind moved the thread_info; adjust.
6422 (status_pending_p_callback): Adjust.
6423 (linux_wait_for_event_1): Adjust.
6424 (count_events_callback, select_singlestep_lwp_callback)
6425 (select_event_lwp_callback, cancel_breakpoints_callback)
6426 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6427 (proceed_one_lwp): Adjust.
6428 (linux_async): Add debug output.
6429 (linux_thread_stopped): New.
6430 (linux_pause_all): New.
6431 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6433 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6434 (thread_db_free): Delete declaration.
6435 (thread_db_detach, thread_db_mourn): Declare.
6436 * thread-db.c (thread_db_init): Use thread_db_mourn.
6437 (thread_db_free): Delete, split in two.
6438 (disable_thread_event_reporting): New.
6439 (thread_db_detach): New.
6440 (thread_db_mourn): New.
6442 * server.h (struct thread_info) <last_resume_kind>: New field.
6443 <attached>: Add comment.
6444 <gdb_detached>: New field.
6445 (handler_func): Change return type to int.
6446 (handle_serial_event, handle_target_event): Ditto.
6447 (gdb_connected): Declare.
6449 (disconnected_tracing): Declare.
6450 (stop_tracing): Declare.
6452 * server.c (handle_query) <qSupported>: Report support for
6453 disconnected tracing.
6454 (queue_stop_reply_callback): Account for running threads.
6455 (gdb_wants_thread_stopped): New.
6456 (gdb_wants_all_threads_stopped): New.
6457 (gdb_reattached_process): New.
6458 (handle_status): Clear the `gdb_detached' flag of all processes.
6459 In all-stop, stop all threads.
6460 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6461 (process_serial_event): If the remote connection breaks, or if an
6462 exit was forced with "monitor exit", force an event loop exit.
6463 Handle disconnected tracing on detach.
6464 (handle_serial_event): Adjust.
6465 (handle_target_event): If GDB isn't connected, forward events back
6466 to the inferior, unless the last process exited, in which case,
6467 exit gdbserver. Adjust interface.
6469 * remote-utils.c (remote_open): Don't block in accept. Instead
6470 register an event loop source on the listen socket file
6471 descriptor. Refactor bits into ...
6472 (listen_desc): ... this new global.
6473 (gdb_connected): ... this new function.
6474 (enable_async_notification): ... this new function.
6475 (handle_accept_event): ... this new function.
6476 (remote_close): Clear remote_desc.
6478 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6480 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6482 (mourn_inferior): Define.
6483 (target_process_qsupported): Avoid the dangling else problem.
6484 (thread_stopped): Define.
6485 (pause_all): Define.
6486 (target_waitstatus_to_string): Declare.
6487 * target.c (target_waitstatus_to_string): New.
6489 * tracepoint.c (tracing): Make extern.
6490 (disconnected_tracing): New.
6491 (stop_tracing): Make extern. Handle tracing stops due to GDB
6493 (cmd_qtdisconnected): New.
6494 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6495 (handle_tracepoint_general_set): Handle QTDisconnected.
6497 * event-loop.c (event_handler_func): Change return type to int.
6498 (process_event): Bail out if the event handler wants the event
6500 (handle_file_event): Ditto.
6501 (start_event_loop): Bail out if the event handler wants the event
6504 * nto-low.c (nto_target_ops): Adjust.
6505 * spu-low.c (spu_wait): Don't remove the process here.
6506 (spu_target_ops): Adjust.
6507 * win32-low.c (win32_wait): Don't remove the process here.
6508 (win32_target_ops): Adjust.
6510 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6512 * regcache.c (realloc_register_cache): Invalidate inferior's
6513 regcache before recreating it.
6515 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6517 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6519 2010-04-09 Stan Shebs <stan@codesourcery.com>
6520 Pedro Alves <pedro@codesourcery.com>
6522 * server.h (LONGEST): New.
6523 (struct thread_info) <while_stepping>: New field.
6524 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6526 (initialize_tracepoint, handle_tracepoint_general_set)
6527 (handle_tracepoint_query, tracepoint_finished_step)
6528 (tracepoint_was_hit, release_while_stepping_state_list):
6529 (current_traceframe): Declare.
6530 * server.c (handle_general_set): Handle tracepoint packets.
6532 (write_memory): New.
6533 (handle_search_memory_1): Use read_memory.
6534 (handle_query): Report support for conditional tracepoints, trace
6535 state variables, and tracepoint sources. Handle tracepoint
6537 (main): Initialize the tracepoints module.
6538 (process_serial_event): Handle traceframe reads/writes.
6540 * linux-low.c (handle_tracepoints): New.
6541 (linux_wait_1): Call it.
6542 (linux_resume_one_lwp): Handle while-stepping.
6543 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6544 (linux_target_ops): Install them.
6545 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6547 * linux-x86-low.c (x86_supports_tracepoints): New.
6548 (the_low_target). Install it.
6550 * mem-break.h (delete_breakpoint): Declare.
6551 * mem-break.c (delete_breakpoint): Make external.
6553 * target.h (struct target_ops): Add `supports_tracepoints',
6554 `read_pc', and `write_pc' fields.
6555 (target_supports_tracepoints): Define.
6556 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6559 * regcache.h (struct regcache) <registers_owned>: New field.
6560 (init_register_cache, regcache_cpy): Declare.
6561 (regcache_read_pc, regcache_write_pc): Declare.
6562 (register_cache_size): Declare.
6563 (supply_regblock): Declare.
6564 * regcache.c (init_register_cache): New.
6565 (new_register_cache): Use it.
6566 (regcache_cpy): New.
6567 (register_cache_size): New.
6568 (supply_regblock): New.
6569 (regcache_read_pc, regcache_write_pc): New.
6571 * tracepoint.c: New.
6573 * Makefile.in (OBS): Add tracepoint.o.
6574 (tracepoint.o): New rule.
6576 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6578 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6580 (i386-mmx.c): Likewise.
6581 (i386-mmx-linux.o): Likewise.
6582 (i386-mmx-linux.c): Likewise.
6584 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6585 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6586 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6587 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6589 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6590 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6591 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6593 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6595 * Makefile.in (clean): Updated.
6597 (i386-avx.c): Likewise.
6598 (i386-avx-linux.o): Likewise.
6599 (i386-avx-linux.c): Likewise.
6600 (amd64-avx.o): Likewise.
6601 (amd64-avx.c): Likewise.
6602 (amd64-avx-linux.o): Likewise.
6603 (amd64-avx-linux.c): Likewise.
6605 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6606 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6607 (srv_amd64_regobj): Add amd64-avx.o.
6608 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6609 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6610 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6611 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6612 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6613 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6614 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6616 * i387-fp.c: Include "i386-xstate.h".
6618 (i387_cache_to_xsave): Likewise.
6619 (i387_xsave_to_cache): Likewise.
6620 (x86_xcr0): Likewise.
6622 * i387-fp.h (i387_cache_to_xsave): Likewise.
6623 (i387_xsave_to_cache): Likewise.
6624 (x86_xcr0): Likewise.
6626 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6627 * linux-crisv32-low.c (target_regsets): Likewise.
6628 * linux-m68k-low.c (target_regsets): Likewise.
6629 * linux-mips-low.c (target_regsets): Likewise.
6630 * linux-ppc-low.c (target_regsets): Likewise.
6631 * linux-s390-low.c (target_regsets): Likewise.
6632 * linux-sh-low.c (target_regsets): Likewise.
6633 * linux-sparc-low.c (target_regsets): Likewise.
6634 * linux-xtensa-low.c (target_regsets): Likewise.
6636 * linux-low.c: Include <sys/uio.h>.
6637 (regsets_fetch_inferior_registers): Support nt_type.
6638 (regsets_store_inferior_registers): Likewise.
6639 (linux_process_qsupported): New.
6640 (linux_target_ops): Add linux_process_qsupported.
6642 * linux-low.h (regset_info): Add nt_type.
6643 (linux_target_ops): Add process_qsupported.
6645 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6647 (init_registers_i386_avx_linux): New.
6648 (init_registers_amd64_avx_linux): Likewise.
6649 (xmltarget_i386_linux_no_xml): Likewise.
6650 (xmltarget_amd64_linux_no_xml): Likewise.
6651 (PTRACE_GETREGSET): Likewise.
6652 (PTRACE_SETREGSET): Likewise.
6653 (x86_fill_xstateregset): Likewise.
6654 (x86_store_xstateregset): Likewise.
6655 (use_xml): Likewise.
6656 (x86_linux_update_xmltarget): Likewise.
6657 (x86_linux_process_qsupported): Likewise.
6658 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6659 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6660 init_registers_i386_linux here. Call
6661 x86_linux_update_xmltarget.
6662 (the_low_target): Add x86_linux_process_qsupported.
6664 * server.c (handle_query): Call target_process_qsupported.
6666 * target.h (target_ops): Add process_qsupported.
6667 (target_process_qsupported): New.
6669 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6671 * inferiors.c (add_thread): Set last_status kind to
6672 TARGET_WAITKIND_IGNORE.
6673 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6674 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6675 (linux_wait_1): Move `thread' local definition to block that uses
6676 it. Don't NULL initialize `event_child'.
6677 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6678 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6679 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6681 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6683 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6684 an extended waitstatus, or by a watchpoint.
6685 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6686 thread was stepping or has been stopped by a watchpoint.
6688 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6690 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6691 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6692 of another, then delete the previous, and validate all
6694 (validate_inserted_breakpoint): New.
6695 (delete_disabled_breakpoints): New.
6696 (validate_breakpoints): New.
6697 (check_mem_read): Validate breakpoints before trusting their
6698 shadow. Delete disabled breakpoints.
6699 (check_mem_write): Validate breakpoints before trusting they
6700 should be inserted. Delete disabled breakpoints.
6701 * mem-break.h (validate_breakpoints):
6702 * server.c (handle_query): Validate breakpoints when we see a
6705 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6707 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6708 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6709 if we could tell there's a GDB breakpoint at stop_pc.
6710 (need_step_over_p): Don't do a step over if we find a GDB
6711 breakpoint at the resume PC.
6713 * mem-break.c (struct raw_breakpoint): New.
6714 (enum bkpt_type): New type `gdb_breakpoint'.
6715 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6716 fields. New field `raw'.
6717 (find_raw_breakpoint_at): New.
6718 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6720 (set_breakpoint_at): Adjust.
6721 (delete_raw_breakpoint): New.
6722 (release_breakpoint): New.
6723 (delete_breakpoint): Rename to...
6724 (delete_breakpoint_1): ... this. Add proc parameter. Use
6725 release_breakpoint. Return ENOENT.
6726 (delete_breakpoint): Reimplement.
6727 (find_breakpoint_at): Delete.
6728 (find_gdb_breakpoint_at): New.
6729 (delete_breakpoint_at): Delete.
6730 (set_gdb_breakpoint_at): New.
6731 (delete_gdb_breakpoint_at): New.
6732 (gdb_breakpoint_here): New.
6733 (set_reinsert_breakpoint): Use release_breakpoint.
6734 (uninsert_breakpoint): Rename to ...
6735 (uninsert_raw_breakpoint): ... this.
6736 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6737 (reinsert_raw_breakpoint): Change parameter type to
6739 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6741 (check_breakpoints): Adjust. Use release_breakpoint.
6742 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6743 (breakpoint_inserted_here): Ditto.
6744 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6745 Don't trust the breakpoint's shadow if it is not inserted.
6746 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6747 (delete_all_breakpoints): Adjust.
6748 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6749 use delete_breakpoint_1.
6751 * mem-break.h (breakpoints_supported): Delete declaration.
6752 (set_gdb_breakpoint_at): Declare.
6753 (gdb_breakpoint_here): Declare.
6754 (delete_breakpoint_at): Delete.
6755 (delete_gdb_breakpoint_at): Declare.
6757 * server.h (struct raw_breakpoint): Forward declare.
6758 (struct process_info): New field `raw_breakpoints'.
6760 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6765 * linux-low.c (status_pending_p_callback): Fix comment.
6766 (linux_wait_for_event_1): Move most of the internal breakpoint
6767 handling from here...
6768 (linux_wait_1): ... to here.
6769 (count_events_callback): New.
6770 (select_singlestep_lwp_callback): New.
6771 (select_event_lwp_callback): New.
6772 (cancel_breakpoints_callback): New.
6773 (select_event_lwp): New.
6774 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6775 priority to all LWPs that have had events that should be reported
6776 to the client. Cancel breakpoints when about to reporting the
6777 event to the client, not while stopping lwps. No longer cancel
6778 finished single-steps here.
6779 (cancel_finished_single_step): Delete.
6780 (cancel_finished_single_steps): Delete.
6782 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6784 * mem-break.c (enum bkpt_type): New.
6785 (struct breakpoint): New field `type'.
6786 (set_breakpoint_at): Change return type to struct breakpoint
6787 pointer. Set type to `other_breakpoint' by default.
6788 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6789 in the breakpoint list.
6790 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6791 (reinsert_breakpoint): Rename to ...
6792 (reinsert_raw_breakpoint): ... this.
6793 (reinsert_breakpoints_at): Adjust.
6794 * mem-break.h (struct breakpoint): Declare.
6795 (set_breakpoint_at): Change return type to struct breakpoint
6798 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6800 * server.c (handle_query): Assign, not compare.
6802 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6804 Teach linux gdbserver to step-over-breakpoints.
6806 * linux-low.c (can_hardware_single_step): New.
6807 (supports_breakpoints): New.
6808 (handle_extended_wait): If stopping threads, read the stop pc of
6811 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6812 low target doesn't support retrieving the PC.
6813 (add_lwp): Set last_resume_kind to resume_continue.
6814 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6815 (linux_attach): Don't clear stop_expected. Set the lwp's
6816 last_resume_kind to resume_stop.
6817 (linux_detach_one_lwp): Don't check for removed breakpoints.
6818 (check_removed_breakpoint): Delete.
6819 (status_pending_p): Rename to ...
6820 (status_pending_p_callback): ... this. Don't check for removed
6821 breakpoints. Don't consider threads that are stopped from GDB's
6823 (linux_wait_for_lwp): Always read the stop_pc here.
6824 (cancel_breakpoint): New.
6825 (step_over_bkpt): New global.
6826 (linux_wait_for_event_1): Implement stepping over breakpoints.
6827 (gdb_wants_lwp_stopped): New.
6828 (gdb_wants_all_stopped): New.
6829 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6830 single-step traps here. Store the thread's last reported target
6832 (send_sigstop): Don't clear stop_expected. Always set it,
6834 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6835 (cancel_finished_single_step): New.
6836 (cancel_finished_single_steps): New.
6837 (wait_for_sigstop): Don't cancel finished single-step traps here.
6838 (linux_resume_one_lwp): Don't check for removed breakpoints.
6839 Don't set `step' on non-hardware step archs.
6840 (linux_set_resume_request): Ignore resume_stop requests if already
6841 stopping or stopped. Set the lwp's last_resume_kind.
6842 (resume_status_pending_p): Don't check for removed breakpoints.
6843 (need_step_over_p): New.
6844 (start_step_over): New.
6845 (finish_step_over): New.
6846 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6847 requests. Clear the thread's last reported target waitstatus.
6848 Don't use the `suspended' flag. Don't consider pending breakpoints.
6849 (linux_resume): Start a step-over if necessary.
6850 (proceed_one_lwp): New.
6851 (proceed_all_lwps): New.
6852 (unstop_all_lwps): New.
6853 * linux-low.h (struct lwp_info): Rewrite comment for the
6854 `suspended' flag. Add the `stop_pc' field. Delete the
6855 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6856 Add `'last_resume_kind' and `need_step_over' fields.
6857 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6858 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6859 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6860 (set_raw_breakpoint_at): New.
6861 (set_breakpoint_at): Rewrite to use it.
6862 (reinsert_breakpoint_handler): Delete.
6863 (set_reinsert_breakpoint): New.
6864 (reinsert_breakpoint_by_bp): Delete.
6865 (delete_reinsert_breakpoints): New.
6866 (uninsert_breakpoint): Rewrite.
6867 (uninsert_breakpoints_at): New.
6868 (reinsert_breakpoint): Rewrite.
6869 (reinsert_breakpoints_at): New.
6870 (check_breakpoints): Rewrite.
6871 (breakpoint_here): New.
6872 (breakpoint_inserted_here): New.
6873 (check_mem_read): Adjust.
6874 * mem-break.h (breakpoints_supported, breakpoint_here)
6875 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6876 (reinsert_breakpoint_by_bp): Delete declaration.
6877 (delete_reinsert_breakpoints): Declare.
6878 (reinsert_breakpoint): Delete declaration.
6879 (reinsert_breakpoints_at): Declare.
6880 (uninsert_breakpoint): Delete declaration.
6881 (uninsert_breakpoints_at): Declare.
6882 (check_breakpoints): Adjust prototype.
6883 * server.h: Adjust include order.
6884 (struct thread_info): Declare here. Add a `last_status' field.
6886 2010-03-23 Michael Snyder <msnyder@vmware.com>
6888 * server.c (crc32): New function.
6889 (handle_query): Add handling for 'qCRC:' request.
6891 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6893 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6894 lwp had been stopped by a watchpoint.
6896 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6898 * server.h (internal_error): Declare.
6899 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6900 * utils.c (internal_error): New function.
6902 2010-03-15 Andreas Schwab <schwab@redhat.com>
6904 * configure.srv: Fix typo setting srv_regobj.
6906 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6908 * linux-low.c (fetch_register): Avoid passing a non string literal
6910 (usr_store_inferior_registers): Ditto.
6912 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6914 * linux-low.c (linux_write_memory): Bail out early if peeking
6917 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6919 * linux-low.h (struct lwp_info): New fields
6920 `stopped_by_watchpoint' and `stopped_data_address'.
6921 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6922 here, and cache them in the lwp object.
6923 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6925 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6927 (linux_stopped_by_watchpoint): Rewrite.
6928 (linux_stopped_data_address): Rewrite.
6930 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6932 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6933 switching the current inferior, not before.
6935 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6937 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6938 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6939 i386-linux.c and amd64-linux.c.
6940 (reg-i386.o): Removed.
6941 (reg-i386.c): Likewise.
6942 (reg-i386-linux.o): Likewise.
6943 (reg-i386-linux.c): Likewise.
6944 (reg-x86-64.o): Likewise.
6945 (reg-x86-64.c): Likewise.
6946 (reg-x86-64-linux.o): Likewise.
6947 (reg-x86-64-linux.c): Likewise.
6950 (i386-linux.o): Likewise.
6951 (i386-linux.c): Likewise.
6952 (amd64.o): Likewise.
6953 (amd64.c): Likewise.
6954 (amd64-linux.o): Likewise.
6955 (amd64-linux.c): Likewise.
6957 * configure.srv (srv_i386_regobj): New.
6958 (srv_i386_linux_regobj): Likewise.
6959 (srv_amd64_regobj): Likewise.
6960 (srv_amd64_linux_regobj): Likewise.
6961 (srv_i386_32bit_xmlfiles): Likewise.
6962 (srv_i386_64bit_xmlfiles): Likewise.
6963 (srv_i386_xmlfiles): Likewise.
6964 (srv_amd64_xmlfiles): Likewise.
6965 (srv_i386_linux_xmlfiles): Likewise.
6966 (srv_amd64_linux_xmlfiles): Likewise.
6967 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
6968 srv_xmlfiles to $srv_i386_xmlfiles.
6969 (i[34567]86-*-mingw32ce*): Likewise.
6970 (i[34567]86-*-mingw*): Likewise.
6971 (i[34567]86-*-nto*): Likewise.
6972 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6973 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
6974 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6975 (x86_64-*-linux*): Likewise.
6977 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6978 (init_registers_amd64_linux): New.
6979 (x86_arch_setup): Replace init_registers_x86_64_linux with
6980 init_registers_amd64_linux.
6982 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
6984 * configure.ac: Check for libdl. If it is not available link against
6985 static libthread_db.
6986 * configure: Regenerate.
6988 2010-02-22 Pedro Alves <pedro@codesourcery.com>
6992 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6993 handing a read watchpoint.
6994 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6996 2010-02-12 Doug Evans <dje@google.com>
6998 * linux-low.c (linux_supports_tracefork_flag): Document.
6999 (linux_look_up_symbols): Add comment.
7001 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7003 * regcache.c (supply_register): Clear regcache if buf is NULL.
7005 2010-02-02 Nicolas Roche <roche@sourceware.org>
7006 Joel Brobecker <brobecker@adacore.com>
7008 * inferiors.c (find_inferior): Add function documentation.
7009 (unloaded_dll): Handle the case where the unloaded dll has not
7010 been previously registered in the dll list.
7012 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7014 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7015 (thumb2_breakpoint): New.
7016 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7018 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7020 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7021 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7024 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7026 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7028 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7030 * linux-s390-low.c (s390_collect_ptrace_register)
7031 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7033 2010-01-21 Doug Evans <dje@google.com>
7035 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7036 (PTRACE_ARG4_TYPE): New macro.
7037 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7038 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7039 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7040 (usr_store_inferior_registers): Ditto.
7041 (linux_read_memory, linux_write_memory): Ditto.
7042 (linux_test_for_tracefork): Ditto.
7044 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7045 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7047 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7049 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7052 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7054 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7055 prototype to take a regcache. Adjust.
7057 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7059 * regcache.h (struct thread_info): Forward declare.
7060 (struct regcache): New.
7061 (new_register_cache): Adjust prototype.
7062 (get_thread_regcache): Declare.
7063 (free_register_cache): Adjust prototype.
7064 (registers_to_string, registers_from_string): Ditto.
7065 (supply_register, supply_register_by_name, collect_register)
7066 (collect_register_as_string, collect_register_by_name): Ditto.
7067 * regcache.c (struct inferior_regcache_data): Delete.
7068 (get_regcache): Rename to ...
7069 (get_thread_regcache): ... this. Adjust. Switch inferior before
7071 (regcache_invalidate_one): Adjust.
7072 (regcache_invalidate): Fix prototype.
7073 (new_register_cache): Return the new register cache.
7074 (free_register_cache): Change prototype.
7075 (realloc_register_cache): Adjust.
7076 (registers_to_string): Change prototype to take a regcache. Adjust.
7077 (registers_from_string): Ditto.
7078 (register_data): Ditto.
7079 (supply_register): Ditto.
7080 (supply_register_by_name): Ditto.
7081 (collect_register): Ditto.
7082 (collect_register_as_string): Ditto.
7083 (collect_register_by_name): Ditto.
7084 * server.c (process_serial_event): Adjust.
7085 * linux-low.h (regset_fill_func, regset_store_func): Change
7087 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7089 * linux-low.c (get_stop_pc): Adjust.
7090 (check_removed_breakpoint): Adjust.
7091 (linux_wait_for_event): Adjust.
7092 (linux_resume_one_lwp): Adjust.
7093 (fetch_register): Add regcache parameter. Adjust.
7094 (usr_store_inferior_registers): Ditto.
7095 (regsets_fetch_inferior_registers): Ditto.
7096 (regsets_store_inferior_registers): Ditto.
7097 (linux_fetch_registers, linux_store_registers): Ditto.
7098 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7100 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7102 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7103 prototype to take a regcache.
7104 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7105 * remote-utils.c (convert_ascii_to_int, outreg)
7106 (prepare_resume_reply): Change prototype to take a regcache.
7108 * target.h (struct target_ops) <fetch_registers, store_registers>:
7109 Change prototype to take a regcache.
7110 (fetch_inferior_registers, store_inferior_registers): Change
7111 prototype to take a regcache. Adjust.
7112 * proc-service.c (ps_lgetregs): Adjust.
7113 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7114 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7115 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7116 take a regcache. Adjust.
7117 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7118 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7119 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7120 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7121 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7122 (cris_cannot_fetch_register):
7123 (cris_breakpoint_at): Change prototype to take a regcache.
7125 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7126 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7127 to take a regcache. Adjust.
7128 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7130 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7131 take a regcache. Adjust.
7132 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7133 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7134 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7135 * linux-mips-low.c (mips_get_pc):
7136 (mips_set_pc): Change prototype to take a regcache. Adjust.
7137 (mips_reinsert_addr): Adjust.
7138 (mips_collect_register): Change prototype to take a regcache.
7140 (mips_supply_register):
7141 (mips_collect_register_32bit, mips_supply_register_32bit)
7142 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7143 (mips_store_fpregset): Ditto.
7144 * linux-ppc-low.c (ppc_supply_ptrace_register)
7145 (ppc_supply_ptrace_register): Ditto.
7146 (parse_spufs_run): Adjust.
7147 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7148 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7149 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7150 take a regcache. Adjust.
7151 * linux-s390-low.c (s390_collect_ptrace_register)
7152 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7153 (s390_set_pc): Change prototype to take a regcache. Adjust.
7154 (s390_arch_setup): Adjust.
7155 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7156 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7157 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7158 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7159 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7161 (sparc_breakpoint_at): Adjust.
7162 * linux-xtensa-low.c (xtensa_fill_gregset):
7163 (xtensa_store_gregset):
7164 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7165 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7166 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7167 prototype to take a regcache. Adjust.
7168 * win32-arm-low.c (arm_fetch_inferior_register)
7169 (arm_store_inferior_register): Change prototype to take a
7171 * win32-i386-low.c (i386_fetch_inferior_register)
7172 (i386_store_inferior_register): Change prototype to take a
7174 * win32-low.c (child_fetch_inferior_registers)
7175 (child_store_inferior_registers): Change prototype to take a
7177 (win32_wait): Adjust.
7178 (win32_fetch_inferior_registers): Change prototype to take a
7180 (win32_store_inferior_registers): Adjust.
7181 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7182 store_inferior_register>: Change prototype to take a regcache.
7184 2010-01-20 Doug Evans <dje@google.com>
7186 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7188 (linux_wait_for_event1, linux_init_signals): Ditto.
7189 (W_STOPCODE): Provide definition if missing.
7191 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7193 * linux-low.c (linux_core_of_thread): New.
7194 (compare_ints, show_process, list_threads): New.
7195 (linux_qxfer_osdata): Report threads and cores.
7196 (linux_target_op): Register linux_core_of_thread.
7197 * remote-utils.c (prepare_resume_reply): Report the core.
7198 (buffer_xml_printf): Support %d specifier.
7199 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7201 (handle_query): Handle qXfer:threads. Announce availability
7203 * target.h (struct target_ops): New field core_of_thread.
7205 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7207 * Makefile.in (clean): Remove new generated files.
7208 (reg-s390.o, reg-s390.c): Remove rules.
7209 (reg-s390x.o, reg-s390x.c): Likewise.
7210 (s390-linux32.o, s390-linux32.c): Add rules.
7211 (s390-linux64.o, s390-linux64.c): Likewise.
7212 (s390x-linux64.o, s390x-linux64.c): Likewise.
7213 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7214 * linux-s390-low.c: Include <elf.h>.
7215 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7216 (init_registers_s390): Remove prototype.
7217 (init_registers_s390x): Likewise.
7218 (init_registers_s390_linux32): Add prototype.
7219 (init_registers_s390_linux64): Likewise.
7220 (init_registers_s390x_linux64): Likewise.
7221 (s390_num_regs_3264): New define.
7222 (s390_regmap_3264): New global variable.
7223 (s390_cannot_fetch_register): Remove obsolete check.
7224 (s390_cannot_store_register): Likewise.
7225 (s390_collect_ptrace_register): Handle upper/lower register halves.
7226 (s390_supply_ptrace_register): Likewise.
7227 (s390_fill_gregset): Update to register number changes.
7228 (s390_get_hwcap): New routine.
7229 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7230 Install appropriate regmap and register set.
7232 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7234 * server.c (gdbserver_version): Update copyright year to 2010.
7235 * gdbreplay.c (gdbreplay_version): Likewise.
7237 2009-12-28 Doug Evans <dje@google.com>
7239 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7240 elf/external.h. Include <elf.h> instead but only if necessary.
7242 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7244 * linux-low.c (linux_remove_process): Remove `detaching'
7245 parameter. Don't release/detach from thread_db here.
7246 (linux_kill): Release/detach from thread_db here, ...
7247 (linux_detach): ... and here, before actually detaching.
7248 (linux_wait_1): ... and here, when a process exits.
7249 * thread-db.c (any_thread_of): New.
7250 (thread_db_free): Switch the current inferior to a thread of the
7253 2009-12-21 Doug Evans <dje@google.com>
7255 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7257 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7258 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7259 warning ifndef __NR_tkill. Move setting of errno there too.
7260 Delete unnecessary resetting of errno after syscall.
7261 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7263 * configure.ac: Check for dladdr.
7264 * config.in: Regenerate.
7265 * configure: Regenerate.
7266 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7267 (try_thread_db_load): Update.
7269 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7271 2009-12-18 Doug Evans <dje@google.com>
7273 * event-loop.c: Include unistd.h if it exists.
7275 * linux-low.c (my_waitpid): Move definition away from being in
7276 between linux_tracefork_child/linux_test_for_tracefork.
7278 * gdb_proc_service.h (psaddr_t): Fix type.
7279 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7280 signature to match glibc.
7282 2009-12-16 Doug Evans <dje@google.com>
7284 * linux-low.c (linux_read_memory): Fix argument to read.
7286 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7288 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7289 events, don't leave current_inferior pointing at null.
7291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7293 * win32-low.c (LOG): Delete.
7294 (OUTMSG): Output to stderr.
7295 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7296 on compile time LOG macro.
7297 (win32_wait): Fix debug output.
7299 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7301 * win32-low.c (win32_add_one_solib): If the dll name is
7302 "ntdll.dll", prepend the system directory to the dll path.
7304 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7306 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7308 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7309 Vladimir Prus <vladimir@codesourcery.com>
7311 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7312 * configure.ac: Check for __mcoldfire__ and set
7313 gdb_cv_m68k_is_coldfire.
7314 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7315 reg-cf.o and reg-m68k.o.
7316 * configure: Regenerated.
7318 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7320 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7321 Pass it to thread_db_free.
7322 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7323 proper `detaching' argument to linux_remove_process.
7324 * linux-low.h (thread_db_free): Add `detaching' parameter.
7325 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7327 (thread_db_free): Add `detaching' parameter. Only
7328 call td_ta_clear_event if detaching from process.
7330 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7332 * thread-db.c (thread_db_free): Fix typo.
7334 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7337 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7339 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7341 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7342 with an i686 compiler.
7343 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7345 * configure: Rebuilt.
7347 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7351 * server.c (handle_search_memory_1): Correct read_addr initialization
7352 in loop for searching subsequent chunks.
7354 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7356 * configure.ac: New --with-libthread-db option.
7357 * thread-db.c: Allow direct dependence on libthread_db.
7358 (thread_db_free): Adjust.
7359 * config.in: Regenerate.
7360 * configure: Likewise.
7362 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7365 * thread-db.c (attach_thread): New function.
7366 (maybe_attach_thread): Return success/failure.
7367 (find_new_threads_callback): Adjust.
7368 (thread_db_find_new_threads): Loop until no new threads.
7370 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7372 * proc-service.c (ps_lgetregs): Formatting.
7374 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7376 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7377 * configure.ac: Adjust.
7378 * linux-low.h (struct process_info_private): Move members to struct
7380 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7381 * linux-low.c (linux_remove_process): Adjust.
7382 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7383 * server.c (handle_query): Move code ...
7384 (handle_monitor_command): ... here. New function.
7385 * target.h (struct target_ops): New member.
7386 * thread-db.c (struct thread_db): New.
7387 (libthread_db_search_path): New variable.
7388 (thread_db_create_event, thread_db_enable_reporting)
7389 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7390 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7391 (try_thread_db_load_1, dladdr_to_soname): New functions.
7392 (try_thread_db_load, thread_db_load_search): New functions.
7393 (thread_db_init): Search for libthread_db.
7394 (thread_db_free): New function.
7395 (thread_db_handle_monitor_command): Likewise.
7396 * config.in: Regenerate.
7397 * configure: Regenerate.
7399 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7401 * spu-low.c (spu_kill): Wait for inferior to terminate.
7402 Call clear_inferiors.
7403 (spu_detach): Call clear_inferiors.
7405 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7407 * aclocal.m4: Regenerate.
7408 * config.in: Likewise.
7409 * configure: Likewise.
7411 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7413 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7414 (parse_spufs_run): New function.
7415 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7416 (ppc_breakpoint_at): Handle SPU breakpoints.
7418 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7420 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7421 (SPUFS_MAGIC): Define.
7422 (spu_enumerate_spu_ids): New function.
7423 (linux_qxfer_spu): New function.
7424 (linux_target_ops): Install linux_qxfer_spu.
7426 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7428 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7429 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7430 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7431 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7432 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7433 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7434 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7435 (init_registers_powerpc_cell32l): Add prototype.
7436 (init_registers_powerpc_cell64l): Likewise.
7437 (ppc_arch_setup): Detect Cell/B.E. architecture.
7439 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7441 * Makefile.in (datarootdir): New variable.
7443 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7445 * linux-low.c (linux_write_memory): Update debugging output.
7446 * Makefile.in (clean): Add new descriptions.
7447 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7448 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7449 * configure.srv: Add new files for arm*-*-linux*.
7450 * linux-arm-low.c: Add new declarations.
7451 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7452 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7453 (HWCAP_VFPv3D16): New.
7454 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7455 instead of __IWMMXT__.
7456 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7457 (arm_arch_setup): New.
7458 (target_regsets): Remove #ifdef. Add VFP regset.
7459 (the_low_target): Use arm_arch_setup.
7461 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7463 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7464 the main thread again.
7466 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7468 Adding Neutrino gdbserver.
7469 * configure: Regenerated.
7470 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7471 * configure.srv (i[34567]86-*-nto*): New target.
7472 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7473 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7474 (nto_comctrl) [__QNX__]: New function.
7475 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7477 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7479 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7482 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7483 Pedro Alves <pedro@codesourcery.com>
7485 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7486 don't support CONTEXT_EXTENDED_REGISTERS.
7487 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7488 (the_low_target): Install them.
7489 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7490 failing with ERROR_PIPE_NOT_CONNECTED.
7492 2009-06-30 Doug Evans <dje@google.com>
7493 Pierre Muller <muller@ics.u-strasbg.fr>
7495 Add h/w watchpoint support to x86-linux, win32-i386.
7496 * Makefile.in (SFILES): Add i386-low.c
7497 (i386_low_h): Define.
7498 (i386-low.o): Add dependencies.
7499 (linux-x86-low.o): Add i386-low.h dependency.
7500 (win32-i386-low.o): Ditto.
7501 * i386-low.c: New file.
7502 * i386-low.h: New file.
7503 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7504 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7505 * linux-low.c (linux_add_process): Initialize arch_private.
7506 (linux_remove_process): Free arch_private.
7507 (add_lwp): Initialize arch_private.
7508 (delete_lwp): Free arch_private.
7509 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7511 * linux-low.h (process_info_private): New member arch_private.
7512 (lwp_info): New member arch_private.
7513 (linux_target_ops): New members new_process, new_thread,
7515 (ptid_of): New macro.
7516 * linux-x86-low.c: Include stddef.h, i386-low.h.
7517 (arch_process_info): New struct.
7518 (arch_lwp_info): New struct.
7519 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7520 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7521 (i386_dr_low_get_status): New function.
7522 (x86_insert_point, x86_remove_point): New functions.
7523 (x86_stopped_by_watchpoint): New function.
7524 (x86_stopped_data_address): New function.
7525 (x86_linux_new_process, x86_linux_new_thread): New functions.
7526 (x86_linux_prepare_to_resume): New function.
7527 (the_low_target): Add entries for insert_point, remove_point,
7528 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7530 * server.c (debug_hw_points): New global.
7531 (monitor_show_help): Document set debug-hw-points.
7532 (handle_query): Process "set debug-hw-points".
7533 * server.h (debug_hw_points): Declare.
7534 (paddress): Declare.
7535 * utils.c (NUMCELLS, CELLSIZE): New macros.
7536 (get_sell, xsnprintf, paddress): New functions.
7537 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7538 remove_point, stopped_by_watchpoint, stopped_data_address.
7539 * win32-i386-low.c: Include i386-low.h.
7540 (debug_reg_state): Replaces dr.
7541 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7542 (i386_dr_low_get_status): New function.
7543 (i386_insert_point, i386_remove_point): New functions.
7544 (i386_stopped_by_watchpoint): New function.
7545 (i386_stopped_data_address): New function.
7546 (i386_initial_stuff): Update.
7547 (get_thread_context,set_thread_context,i386_thread_added): Update.
7548 (the_low_target): Add entries for insert_point,
7549 remove_point, stopped_by_watchpoint, stopped_data_address.
7550 * win32-low.c (win32_insert_watchpoint): New function.
7551 (win32_remove_watchpoint): New function.
7552 (win32_stopped_by_watchpoint): New function.
7553 (win32_stopped_data_address): New function.
7554 (win32_target_ops): Add entries for insert_watchpoint,
7555 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7556 * win32-low.h (win32_target_ops): New members insert_point,
7557 remove_point, stopped_by_watchpoint, stopped_data_address.
7559 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7561 * server.c (process_serial_event): Re-return unsupported, not
7562 error, if the type isn't recognized. Re-allow supporting only
7563 insert or remove packets. Also call require_running for
7564 breakpoints. Add missing break statement to default case. Tidy.
7565 * target.h (struct target_ops): Rename insert_watchpoint to
7566 insert_point, and remove_watchpoint to remove_point.
7568 * linux-low.h (struct linux_target_ops): Likewise.
7569 * linux-low.c (linux_insert_watchpoint): Rename to ...
7570 (linux_insert_point): ... this. Adjust.
7571 (linux_remove_watchpoint): Rename to ...
7572 (linux_remove_point): ... this. Adjust.
7573 (linux_target_ops): Adjust.
7574 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7575 (cris_insert_point): ... this.
7576 (cris_remove_watchpoint): Rename to ...
7577 (cris_remove_point): ... this.
7578 (the_low_target): Adjust.
7580 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7582 * server.c (handle_v_kill): Pass signal_pid to
7583 kill_inferior if multi_process is zero.
7585 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7587 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7588 * target.h (target_ops): Comment for *_watchpoint to make it clear
7589 the functions can get types '0' and '1'.
7591 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7593 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7594 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7595 * regcache.c (get_regcache): Likewise.
7596 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7597 * win32-low.c (child_fetch_inferior_registers): Remove check for
7600 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7601 Pedro Alves <pedro@codesourcery.com>
7603 * target.h (struct target_ops) <supports_multi_process>: New
7605 (target_supports_multi_process): New.
7606 * server.c (handle_query): Even if GDB reports support, only
7607 enable multi-process if the target also supports it. Report
7608 multi-process support only if the target backend supports it.
7609 * linux-low.c (linux_supports_multi_process): New function.
7610 (linux_target_ops): Install it as target_supports_multi_process
7613 2009-05-24 Doug Evans <dje@google.com>
7615 Global renaming of find_thread_pid to find_thread_ptid.
7616 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7617 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7618 All callers updated.
7620 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7621 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7624 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7625 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7626 (linux_resume_one_lwp): Ditto.
7628 2009-05-23 Doug Evans <dje@google.com>
7630 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7631 from struct inferior_list_entry * to struct lwp_info *.
7632 All callers updated.
7634 2009-05-13 Doug Evans <dje@google.com>
7636 * linux-x86-low.c: Don't include assert.h.
7637 (x86_siginfo_fixup): Use fatal, not assert.
7638 (x86_arch_setup): Fix comment.
7640 2009-05-12 Doug Evans <dje@google.com>
7642 Biarch support for i386/amd64 gdbserver.
7643 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7644 Add linux-x86-low.c.
7645 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7646 (linux-x86-low.o): Add.
7647 * linux-x86-64-low.c: Delete.
7648 * linux-i386-low.c: Delete.
7649 * linux-x86-low.c: New file.
7650 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7652 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7654 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7655 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7656 (linux_child_pid_to_exec_file): New function.
7657 (elf_64_header_p, elf_64_file_p): New functions.
7658 (siginfo_fixup): New function.
7659 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7660 give target a chance to convert layout.
7661 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7662 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7664 2009-05-07 Doug Evans <dje@google.com>
7666 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7667 (regsets_store_inferior_registers): Ditto.
7669 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7673 * linux-low.c (must_set_ptrace_flags): Delete.
7674 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7676 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7677 `lwp->must_set_ptrace_flags' instead.
7678 (linux_wait_for_event_1): Set ptrace options here.
7679 (linux_wait_1): ... not here.
7681 2009-04-30 Doug Evans <dje@google.com>
7683 * inferiors.c (started_inferior_callback): New function.
7684 (attached_inferior_callback): New function.
7685 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7686 * server.c (print_started_pid, print_attached_pid): New functions.
7687 (detach_or_kill_for_exit): New function.
7688 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7689 * server.h (have_started_inferiors_p): Declare.
7690 (have_attached_inferiors_p): Declare.
7692 * inferiors.c (remove_process): Fix memory leak, free process.
7693 * linux-low.c (linux_remove_process): New function.
7694 (linux_kill): Call it instead of remove_process.
7695 (linux_detach, linux_wait_1): Ditto.
7697 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7699 * configure.srv: Add x86 Windows CE target.
7701 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7703 * inferiors.c (get_thread_process): Make global.
7704 * server.h (get_thread_process): Add prototype.
7705 * thread-db.c (find_one_thread): Use get_thread_process
7706 instead of current_process.
7707 (thread_db_get_tls_address): Do not crash if called when
7708 thread layer is not yet initialized.
7710 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7712 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7713 * spu-low.c (current_tid): Rename to ...
7714 (current_ptid): ... this.
7715 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7716 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7717 ptid_get_lwp (current_ptid) instead of current_tid.
7718 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7719 instead of current_tid. Use find_process_pid to verify pid
7720 argument is valid. Pass proper argument to remove_process.
7721 (spu_thread_alive): Compare current_ptid instead of current_tid.
7722 (spu_resume): Likewise.
7724 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7726 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7729 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7731 Implement the multiprocess extensions, and add linux multiprocess
7734 * server.h (ULONGEST): Declare.
7735 (struct ptid, ptid_t): New.
7736 (minus_one_ptid, null_ptid): Declare.
7737 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7738 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7739 (struct inferior_list_entry): Change `id' type from unsigned from
7741 (struct sym_cache, struct breakpoint, struct
7742 process_info_private): Forward declare.
7743 (struct process_info): Declare.
7744 (current_process): Declare.
7745 (all_processes): Declare.
7746 (initialize_inferiors): Declare.
7747 (add_thread): Adjust to use ptid_t.
7748 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7749 (add_process, remove_process, find_thread_pid): Declare.
7750 (find_inferior_id): Adjust to use ptid_t.
7751 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7752 (multi_process): Declare.
7753 (push_event): Adjust to use ptid_t.
7754 (read_ptid, write_ptid): Declare.
7755 (prepare_resume_reply): Adjust to use ptid_t.
7756 (clear_symbol_cache): Declare.
7757 * inferiors.c (all_processes): New.
7758 (null_ptid, minus_one_ptid): New.
7759 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7760 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7761 (add_thread): Change unsigned long to ptid. Remove gdb_id
7763 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7764 (gdb_id_to_thread): Rename to ...
7765 (find_thread_pid): ... this. Change unsigned long to ptid.
7766 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7767 (loaded_dll, pull_pid_from_list): Adjust.
7768 (add_process, remove_process, find_process_pid)
7769 (get_thread_process, current_process, initialize_inferiors): New.
7770 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7771 (struct target_waitstatus) <related_pid>: Ditto.
7772 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7774 (struct target_ops) <join>: Add `pid' argument.
7775 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7776 (struct target_ops) <wait>: Add `ptid' field. Change return type
7778 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7779 (mywait): Add `ptid' argument. Change return type to ptid_t.
7780 (target_pid_to_str): Declare.
7781 * target.c (set_desired_inferior): Adjust to use ptids.
7782 (mywait): Add new `ptid' argument. Adjust.
7783 (target_pid_to_str): New.
7784 * mem-break.h (free_all_breakpoints): Declare.
7785 * mem-break.c (breakpoints): Delelete.
7786 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7787 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7788 to use per-process breakpoint list.
7789 (free_all_breakpoints): New.
7790 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7791 (symbol_cache, all_symbols_looked_up): Delete.
7793 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7795 (prepare_resume_reply): Change ptid argument's type from unsigned
7796 long to ptid_t. Adjust. Implement W;process and X;process.
7797 (free_sym_cache, clear_symbol_cache): New.
7798 (look_up_one_symbol): Adjust to per-process symbol cache. *
7799 * server.c (cont_thread, general_thread, step_thread): Change type
7802 (multi_process): New.
7803 (last_ptid): Change type to ptid_t.
7804 (struct vstop_notif) <ptid>: Change type to ptid_t.
7805 (queue_stop_reply, push_event): Change `ptid' argument's type to
7807 (discard_queued_stop_replies): Add `pid' argument.
7808 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7809 changes. Don't reference the `attached' global.
7810 (attach_inferior): Adjust to mywait interface changes.
7811 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7812 features. Handle and report "multiprocess+". Handle
7814 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7816 (handle_v_kill): New.
7817 (handle_v_stopped): Adjust to use target_pid_to_str.
7818 (handle_v_requests): Allow multiple attaches and runs when
7819 multiprocess extensions are in effect. Handle "vKill".
7820 (myresume): Adjust to use ptids.
7821 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7822 (handle_status): Adjust to discard_queued_stop_replies interface
7824 (first_thread_of, kill_inferior_callback)
7825 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7826 (main): Call initialize_inferiors. Adjust to use ptids, killing
7827 and detaching from all inferiors. Handle multiprocess packet
7829 * linux-low.h: Include gdb_proc_service.h.
7830 (struct process_info_private): New.
7831 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7832 <lwpid_of>: Use ptid_get_lwp.
7833 (get_lwp_thread): Adjust.
7834 (struct lwp_info): Add `dead' member.
7835 (find_lwp_pid): Declare.
7836 * linux-low.c (thread_db_active): Delete.
7837 (new_inferior): Adjust comment.
7838 (inferior_pid): Delete.
7839 (linux_add_process): New.
7840 (handle_extended_wait): Adjust.
7841 (add_lwp): Change unsigned long to ptid.
7842 (linux_create_inferior): Add process to processes table. Adjust
7843 to use ptids. Don't set new_inferior here.
7844 (linux_attach_lwp): Rename to ...
7845 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7846 it. Adjust to use ptids.
7847 (linux_attach_lwp): New.
7848 (linux_attach): Add process to processes table. Don't set
7850 (struct counter): New.
7851 (second_thread_of_pid_p, last_thread_of_process_p): New.
7852 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7854 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7855 processes. Remove process from process table.
7856 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7857 to multiple processes.
7858 (any_thread_of): New.
7859 (linux_detach): Add `pid' argument, and handle it. Remove process
7860 from processes table.
7861 (linux_join): Add `pid' argument. Handle it.
7862 (linux_thread_alive): Change unsighed long argument to ptid_t.
7863 Consider dead lwps as not being alive.
7864 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7865 threads we're not interested in.
7866 (same_lwp, find_lwp_pid): New.
7867 (linux_wait_for_lwp): Change `pid' argument's type from int to
7869 (linux_wait_for_event): Rename to ...
7870 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7871 from int to ptid_t. Adjust.
7872 (linux_wait_for_event): New.
7873 (linux_wait_1): Add `ptid' argument. Change return type to
7874 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7875 that exit from the process table.
7876 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7878 (mark_lwp_dead): New.
7879 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7880 stopping all threads, mark its main lwp as dead.
7881 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7883 (fetch_register, usr_store_inferior_registers)
7884 (regsets_fetch_inferior_registers)
7885 (regsets_store_inferior_registers, linux_read_memory)
7886 (linux_write_memory): Inline `inferior_pid'.
7887 (linux_look_up_symbols): Adjust to use per-process
7889 (linux_request_interrupt): Adjust to use ptids.
7890 (linux_read_auxv): Inline `inferior_pid'.
7891 (initialize_low): Don't reference thread_db_active.
7892 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7893 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7894 (ps_getpid): Return the pid of the current inferior.
7895 * thread-db.c (proc_handle, thread_agent): Delete.
7896 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7898 (find_one_thread): Change argument type to ptid_t. Adjust to
7900 (maybe_attach_thread): Adjust to per-process data and ptids.
7901 (thread_db_find_new_threads): Ditto.
7902 (thread_db_init): Ditto.
7903 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7904 processes table. Adjust to use ptids.
7905 (spu_kill, spu_detach): Adjust interface. Remove process from
7907 (spu_join, spu_thread_alive): Adjust interface.
7908 (spu_wait): Adjust interface. Remove process from processes
7909 table. Adjust to use ptids.
7910 * win32-low.c (current_inferior_tid): Delete.
7911 (current_inferior_ptid): New.
7912 (debug_event_ptid): New.
7913 (thread_rec): Take a ptid. Adjust.
7914 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7915 (child_delete_thread): Ditto.
7916 (do_initial_child_stuff): Add `attached' argument. Add process to
7918 (child_fetch_inferior_registers, child_store_inferior_registers):
7920 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7921 (win32_attach): Pass 1 to do_initial_child_stuff.
7922 (win32_kill): Adjust interface. Remove process from processes
7924 (win32_detach): Ditto.
7925 (win32_join): Adjust interface.
7926 (win32_thread_alive): Take a ptid.
7927 (win32_resume): Adjust to use ptids.
7928 (get_child_debug_event): Ditto.
7929 (win32_wait): Adjust interface. Remove exiting process from
7932 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7934 Non-stop mode support.
7936 * server.h (non_stop): Declare.
7937 (gdb_client_data, handler_func): Declare.
7938 (delete_file_handler, add_file_handler, start_event_loop):
7940 (handle_serial_event, handle_target_event, push_event)
7941 (putpkt_notif): Declare.
7942 * target.h (enum resume_kind): New.
7943 (struct thread_resume): Replace `step' field by `kind' field.
7944 (TARGET_WNOHANG): Define.
7945 (struct target_ops) <wait>: Add `options' argument.
7946 <supports_non_stop, async, start_non_stop>: New fields.
7947 (target_supports_non_stop, target_async): New.
7948 (start_non_stop): Declare.
7949 (mywait): Add `options' argument.
7950 * target.c (mywait): Add `options' argument. Print child exit
7952 (start_non_stop): New.
7953 * server.c (non_stop, own_buf, mem_buf): New globals.
7954 (struct vstop_notif): New.
7955 (notif_queue): New global.
7956 (queue_stop_reply, push_event, discard_queued_stop_replies)
7957 (send_next_stop_reply): New.
7958 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7960 (attach_inferior): In non-stop mode, don't wait for the target
7962 (handle_general_set): Handle QNonStop.
7963 (handle_query): When handling qC, return the current general
7964 thread, instead of the first thread of the list.
7965 (handle_query): If the backend supports non-stop mode, include
7966 QNonStop+ in the qSupported query response.
7967 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
7969 (handle_v_attach, handle_v_run): Handle non-stop mode.
7970 (handle_v_stopped): New.
7971 (handle_v_requests): Report support for vCont;t. Handle vStopped.
7972 (myresume): Adjust to use resume_kind. Handle non-stop.
7973 (queue_stop_reply_callback): New.
7974 (handle_status): Handle non-stop mode.
7975 (main): Clear non_stop flag on reconnection. Use the event-loop.
7976 Refactor serial protocol handling from here ...
7977 (process_serial_event): ... to this new function. When GDB
7978 selects any thread, select one here. In non-stop mode, wait until
7979 GDB acks all pending events before exiting.
7980 (handle_serial_event, handle_target_event): New.
7981 * remote-utils.c (remote_open): Install remote_desc in the event
7983 (remote_close): Remove remote_desc from the event loop.
7984 (putpkt_binary): Rename to...
7985 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
7986 (putpkt_binary): New as wrapper around putpkt_binary_1.
7987 (putpkt_notif): New.
7988 (prepare_resume_reply): In non-stop mode, don't change the
7990 * event-loop.c: New.
7991 * Makefile.in (OBJ): Add event-loop.o.
7992 (event-loop.o): New rule.
7994 * linux-low.h (pid_of): Moved here.
7996 (get_lwp_thread): Use lwpid_of.
7997 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
7998 * linux-low.c (pid_of): Delete.
7999 (inferior_pid): Use lwpid_of.
8000 (linux_event_pipe): New.
8001 (target_is_async_p): New.
8003 (handle_extended_wait): Use lwpid_of.
8004 (add_lwp): Don't set lwpid field.
8005 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8006 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8007 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8008 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8009 first. Adjust to linux_wait_for_event interface changes. Use
8011 (linux_detach): Don't delete the main lwp here.
8012 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8013 (status_pending_p): Don't consider explicitly suspended lwps.
8014 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8015 pointer. Add OPTIONS argument. Change return type to int. Use
8016 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8017 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8018 pointer. Add status pointer argument. Return a pid instead of a
8019 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8020 changes. In non-stop mode, don't switch to a random thread.
8021 (linux_wait): Rename to...
8022 (linux_wait_1): ... this. Add target_options argument, and handle
8023 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8024 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8025 clean exit and signal exit code. Don't stop all threads in
8026 non-stop mode. In all-stop mode, only stop all threads when
8027 reporting a stop to GDB. Handle explicit thread stop requests.
8028 (async_file_flush, async_file_mark): New.
8030 (send_sigstop): Use lwpid_of.
8031 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8032 interface changes. In non-stop mode, don't switch to a random
8034 (linux_resume_one_lwp): Use lwpid_of.
8035 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8036 (linux_resume_one_thread): ... this. Handle resume_stop. In
8037 non-stop mode, don't look for pending flag in all threads.
8038 (resume_status_pending_p): Don't consider explicitly suspended
8040 (my_waitpid): Reimplement. Emulate __WALL.
8041 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8043 (sigchld_handler, linux_supports_non_stop, linux_async)
8044 (linux_start_non_stop): New.
8045 (linux_target_ops): Register linux_supports_non_stop, linux_async
8046 and linux_start_non_stop.
8047 (initialize_low): Install SIGCHLD handler.
8048 * thread-db.c (thread_db_create_event, find_one_thread)
8049 (thread_db_get_tls_address): Use lwpid_of.
8050 * win32-low.c (win32_detach): Adjust to use resume_kind.
8051 (win32_wait): Add `options' argument.
8052 * spu-low.c (spu_resume): Adjust to use resume_kind.
8053 (spu_wait): Add `options' argument.
8055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8057 Decouple target code from remote protocol.
8059 * target.h (enum target_waitkind): New.
8060 (struct target_waitstatus): New.
8061 (struct target_ops) <wait>: Return an unsigned long. Take a
8062 target_waitstatus pointer instead of a char pointer.
8064 * target.c (mywait): Change prototype to return an unsigned long.
8065 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8066 * server.h (thread_from_wait, old_thread_from_wait): Delete
8068 (prepare_resume_reply): Change prototype to take a
8070 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8071 (last_status, last_ptid): New.
8072 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8073 pid instead of a signal.
8074 (attach_inferior): Remove "status" and "signal" parameters.
8076 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8078 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8079 (handle_v_requests, myresume): Remove "status" and "signal"
8081 (handle_status): New.
8082 (main): Delete local `status'. Adjust.
8083 * remote-utils.c: Include target.h.
8084 (prepare_resume_reply): Change prototype to take a
8085 target_waitstatus. Adjust.
8087 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8089 * spu-low.c (spu_wait): Adjust.
8090 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8092 (win32_wait): Adjust.
8094 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8096 * target.h (struct thread_resume): Delete leave_stopped member.
8097 (struct target_ops): Add a `n' argument to the `resume' callback.
8098 * server.c (start_inferior): Adjust.
8099 (handle_v_cont, myresume): Adjust.
8100 * linux-low.c (check_removed_breakpoint): Adjust to resume
8101 interface change, and to removed leave_stopped field.
8102 (resume_ptr): Delete.
8103 (struct thread_resume_array): New.
8104 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8105 resume interface change.
8106 (linux_continue_one_thread, linux_queue_one_thread)
8107 (resume_status_pending_p): Check if the resume field is NULL
8108 instead of checking the leave_stopped member.
8109 (linux_resume): Adjust to the target resume interface change.
8110 * spu-low.c (spu_resume): Adjust to the target resume interface
8112 * win32-low.c (win32_detach, win32_resume): Ditto.
8114 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8116 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8118 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8120 (linux_continue_one_thread): Only preserve the stepping flag if
8121 there's a pending breakpoint.
8123 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8125 * server.c (main): After the inferior having exited, call
8126 remote_close before exiting gdbserver.
8128 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8130 Fix size of FPSCR in Power 7 processors.
8131 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8132 (PPC_FEATURE_HAS_DFP): New #define.
8133 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8136 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8138 * server.c (handle_query) Whitespace and formatting.
8140 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8142 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8143 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8144 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8145 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8146 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8147 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8148 Makefile.in, configure.ac: Fix whitespace throughout.
8149 * configure: Regenerate.
8151 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8153 * inferiors.c (find_inferior): Make it safe for the callback
8154 function to delete the currently iterated inferior.
8156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8158 * Makefile.in (linuw_low_h): Move higher.
8159 (thread-db.o): Depend on $(linux_low_h).
8161 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8163 Rename "process" to "lwp" throughout.
8165 * linux-low.c (all_processes): Rename to...
8166 (all_lwps): ... this.
8167 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8168 (add_process): Rename to ...
8169 (add_lwp): ... this. Adjust.
8170 (linux_create_inferior): Adjust.
8171 (linux_attach_lwp): Adjust.
8172 (linux_attach): Adjust.
8173 (linux_kill_one_process): Rename to ...
8174 (linux_kill_one_lwp): ... this. Adjust.
8175 (linux_kill): Adjust.
8176 (linux_detach_one_process): Rename to ...
8177 (linux_detach_one_lwp): ... this. Adjust.
8178 (linux_detach): Adjust.
8179 (check_removed_breakpoint): Adjust.
8180 (status_pending_p): Adjust.
8181 (linux_wait_for_process): Rename to ...
8182 (linux_wait_for_lwp): ... this. Adjust.
8183 (linux_wait_for_event): Adjust.
8184 (send_sigstop): Adjust.
8185 (wait_for_sigstop): Adjust.
8186 (stop_all_processes): Rename to ...
8187 (stop_all_lwps): ... this.
8188 (linux_resume_one_process): Rename to ...
8189 (linux_resume_one_lwp): ... this. Adjust.
8190 (linux_set_resume_request, linux_continue_one_thread)
8191 (linux_queue_one_thread, resume_status_pending_p)
8192 (usr_store_inferior_registers, regsets_store_inferior_registers)
8193 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8195 * linux-low.h (get_process): Rename to ...
8196 (get_lwp): ... this. Adjust.
8197 (get_thread_process): Rename to ...
8198 (get_thread_lwp): ... this. Adjust.
8199 (get_process_thread): Rename to ...
8200 (get_lwp_thread): ... this. Adjust.
8201 (struct process_info): Rename to ...
8202 (struct lwp_info): ... this.
8203 (all_processes): Rename to ...
8204 (all_lwps): ... this.
8205 * proc-service.c (ps_lgetregs): Adjust.
8206 * thread-db.c (thread_db_create_event, find_one_thread)
8207 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8209 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8211 * server.c (handle_query): Handle "qAttached".
8213 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8215 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8216 GPLv3, update license URL.
8218 2009-03-01 Doug Evans <dje@google.com>
8220 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8221 (server_h): Add gdb_signals.h.
8222 (signals.o): Update.
8223 * server.h (target_signal_from_host,target_signal_to_host_p)
8224 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8226 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8228 * remote-utils.c (getpkt): Also generate remote-debug
8229 information if noack_mode is set.
8231 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8233 * server.c (handle_query): Report qXfer:siginfo:read and
8234 qXfer:siginfo:write as supported and handle them.
8235 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8236 * linux-low.c (linux_xfer_siginfo): New.
8237 (linux_target_ops): Set it.
8239 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8241 * server.c (gdbserver_usage): Mention --remote-debug.
8242 (main): Accept '--remote-debug' switch.
8244 2009-01-18 Doug Evans <dje@google.com>
8246 * regcache.c (new_register_cache): No need to check result of xcalloc.
8247 * server.c (handle_search_memory): Back out calls to xmalloc,
8248 result is checked and error is returned to user upon failure.
8249 (handle_query): Ditto. Add more checks for result of malloc.
8250 (handle_v_cont): Check result of malloc, report error back to
8252 (handle_v_run): Ditto. Call freeargv.
8253 * server.h (freeargv): Declare.
8254 * utils.c (freeargv): New fn.
8256 2009-01-15 Doug Evans <dje@google.com>
8258 * gdbreplay.c (perror_with_name): Make arg const char *.
8259 * server.h (target_signal_to_name): Make return type const char *.
8260 * thread-db.c (thread_db_err_str): Make return type const char *.
8261 * utils.c (perror_with_name): Make arg const char *.
8263 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8265 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8266 when handling a EXIT_PROCESS_DEBUG_EVENT.
8268 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8270 * gdbreplay.c (gdbreplay_version): Update copyright year.
8271 * server.c (gdbserver_version): Likewise.
8273 2009-01-05 Doug Evans <dje@google.com>
8275 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8276 (handle_extended_wait): Improve comment.
8278 2008-12-13 Doug Evans <dje@google.com>
8280 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8281 * server.h (ATTR_MALLOC): New macro.
8282 (xmalloc,xcalloc,xstrdup): Declare.
8283 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8284 * inferiors.c: Ditto.
8285 * linux-low.c: Ditto.
8286 * mem-break.c: Ditto.
8287 * regcache.c: Ditto.
8288 * remote-utils.c: Ditto.
8291 * win32-low.c: Ditto.
8293 2008-12-12 Doug Evans <dje@google.com>
8295 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8296 in debugging printf.
8298 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8300 2008-12-09 Doug Evans <dje@google.com>
8302 * linux-low.h (struct process_info): Delete member tid, unused.
8303 * thread-db.c (find_one_thread): Update.
8304 (maybe_attach_thread): Update.
8306 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8308 * target.h (struct target_ops): Add qxfer_osdata member.
8309 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8311 (linux_qxfer_osdata): New functions.
8312 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8314 * server.c (handle_query): Handle "qXfer:osdata:read:".
8315 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8316 (buffer_xml_printf): New functions.
8317 * server.h (struct buffer): New.
8318 (buffer_grow_str, buffer_grow_str0): New macros.
8319 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8320 (buffer_xml_printf): Declare.
8322 2008-11-24 Doug Evans <dje@google.com>
8324 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8326 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8328 * server.c (handle_v_run): Always use the supplied argument list.
8330 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8332 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8333 (xtensa_regmap_table): Add entry for scompare1.
8335 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8337 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8338 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8339 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8340 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8341 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8342 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8343 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8344 XML target descriptions.
8345 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8346 when inferior is running on an ISA 2.05 or later processor. Add
8347 special case to return offset for full 64-bit slot of FPSCR when
8350 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8352 * Makefile.in (SFILES, clean): Added sparc64 files.
8353 (reg-sparc64.o, reg-sparc64.c): New.
8354 * configure.srv (sparc*-*-linux*): New configuration.
8355 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8356 syscall arguments for SPARC.
8357 (regsets_store_inferior_registers): Likewise.
8358 * linux-sparc-low.c: New file.
8360 2008-10-21 Doug Evans <dje@google.com>
8362 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8363 (READLINE_DIR,READLINE_DEP): Delete.
8364 (INTERNAL_CFLAGS): Update.
8365 (LINTFLAGS): Update.
8367 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8369 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8370 whole argv from the last run, not just argv[0].
8372 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8374 * regcache.c (new_register_cache): Return NULL if the register
8375 cache size isn't known yet.
8376 (free_register_cache): Avoid dereferencing a NULL regcache.
8378 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8380 * configure.srv: Merge MIPS and MIPS64.
8382 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8384 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8386 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8388 * Makefile.in: Add required vsx dependencies.
8390 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8391 Declare init_registers_powerpc_vsx32l.
8392 Declare init_registers_powerpc_vsx64l.
8393 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8394 (ppc_arch_setup): Check for VSX in hwcap.
8395 (ppc_fill_vsxregset): New function.
8396 (ppc_store_vsxregset): New function.
8397 Add new VSX entry in regset_info target_regsets.
8399 * configure.srv: Add new VSX dependencies.
8401 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8403 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8404 (remote_open): Set or clear transport_is_reliable.
8405 (putpkt_binary): Don't expect acks in noack mode.
8406 (getpkt): Don't send ack/nac in noack mode.
8407 * server.c (handle_general_set): Handle QStartNoAckMode.
8408 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8410 (main): Reset noack_mode on every connection.
8411 * server.h (noack_mode): Declare.
8413 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8415 * Makefile.in (GDBREPLAY_OBS): New variable.
8416 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8418 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8419 Daniel Jacobowitz <dan@codesourcery.com>
8421 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8422 (usr_store_inferior_registers): Likewise.
8423 (regsets_store_inferior_registers): Likewise.
8425 2008-07-31 Rolf Jansen <rj@surtec.com>
8426 Pedro Alves <pedro@codesourcery.com>
8428 * configure.ac: Check for memmem declaration.
8429 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8430 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8431 (disable_packet_qfThreadInfo): Unconditionally compile.
8432 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8433 * configure, config.in: Regenerate.
8435 2008-07-28 Doug Kwan <dougkwan@google.com>
8437 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8438 (linux_write_memory): Remove declaration of errno.
8440 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8442 * linux-low.c (handle_extended_wait): Do not use "status"
8443 variable uninitialized.
8445 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8447 * server.c (handle_v_attach): Inhibit reporting dll changes.
8449 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8451 * remote-utils.c (prepare_resume_reply): If requested, don't
8452 output "thread:TID" in the T stop reply.
8454 * server.c (disable_packet_vCont, disable_packet_Tthread)
8455 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8456 (handle_query): If requested, disable support for qC, qfThreadInfo
8458 (handle_v_requests): If requested, disable support for vCont.
8459 (gdbserver_show_disableable): New.
8460 (main): Handle --disable-packet and --disable-packet=LIST.
8462 * server.h (disable_packet_vCont, disable_packet_Tthread)
8463 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8465 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8467 * server.c (gdbserver_usage): Mention --version.
8469 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8471 * Makefile.in (gdbreplay.o): New rule.
8473 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8475 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8476 message, not gdbserver.
8478 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8479 Nathan Sidwell <nathan@codesourcery.com>
8480 Joseph Myers <joseph@codesourcery.com>
8482 * acinclude.m4: Include ../../config/acx.m4.
8483 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8484 * configure, config.in: Regenerate.
8485 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8486 * server.c (gdbserver_version): Print PKGVERSION.
8487 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8488 (main): Adjust gdbserver_usage calls.
8489 * gdbreplay.c (version, host_name): Add declarations.
8490 (gdbreplay_version, gdbreplay_usage): New.
8491 (main): Accept --version and --help options.
8493 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8495 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8496 (arm_breakpoint_at): Handle Thumb.
8497 (the_low_target): Add comment.
8499 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8501 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8503 2008-05-09 Doug Evans <dje@google.com>
8505 * server.h (decode_search_memory_packet): Declare.
8506 * remote-utils.c (decode_search_memory_packet): New fn.
8507 * server.c (handle_search_memory_1): New fn.
8508 (handle_search_memory): New fn.
8509 (handle_query): Process qSearch:memory packets.
8511 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8513 * regcache.c (registers_length): Remove.
8514 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8515 full register packet.
8516 * regcache.h (registers_length): Remove prototype.
8517 * server.h (PBUFSIZ): Define to 16384.
8519 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8521 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8522 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8523 powerpc-64l.o, and powerpc-altivec64l.o.
8524 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8525 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8526 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8527 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8528 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8531 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8532 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8533 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8534 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8535 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8536 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8537 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8538 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8539 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8540 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8543 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8544 (init_registers_powerpc_32l): ... this new prototype.
8545 (init_registers_powerpc_32): Remove, replace by ...
8546 (init_registers_powerpc_altivec32l): ... this new prototype.
8547 (init_registers_powerpc_e500): Remove, replace by ...
8548 (init_registers_powerpc_e500l): ... this new prototype.
8549 (init_registers_ppc64): Remove, replace by ...
8550 (init_registers_powerpc_64l): ... this new prototype.
8551 (init_registers_powerpc_64): Remove, replace by ...
8552 (init_registers_powerpc_altivec64l): ... this new prototype.
8553 (ppc_num_regs): Set to 73.
8554 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8555 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8556 (ppc_cannot_store_register): Handle orig_r3 and trap.
8557 (ppc_arch_setup): Update init_registers_... calls.
8558 (ppc_fill_gregset): Handle orig_r3 and trap.
8560 * inferiors.c (clear_inferiors): Reset current_inferior.
8562 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8564 * acinclude.m4: Add override.m4.
8565 * configure: Regenerate.
8567 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8569 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8570 initial call to init_register_ppc64.
8572 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8574 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8575 single powerpc*-*-linux* case.
8576 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8578 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8580 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8581 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8583 * linux-ppc-low.c: Include <elf.h>.
8584 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8585 (ppc_hwcap): New global variable.
8586 (ppc_regmap): Remove __SPE__ #ifdef sections.
8587 (ppc_regmap_e500): New global variable.
8588 (ppc_cannot_store_register): Update __SPE__ special case.
8589 (ppc_get_hwcap): New function.
8590 (ppc_arch_setup): Use it to determine whether inferior supports
8591 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8592 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8593 Do not access registers if target does not support AltiVec.
8594 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8595 Do not access registers if target does not support SPE.
8596 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8598 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8600 * linux-low.c (disabled_regsets, num_regsets): New.
8601 (use_regsets_p): Delete.
8602 (linux_wait_for_process): Clear disabled_regsets.
8603 (regsets_fetch_inferior_registers): Check and set it.
8604 (regsets_store_inferior_registers): Likewise.
8605 (linux_fetch_registers, linux_store_registers): Do not use
8607 (initialize_low): Allocate disabled_regsets.
8609 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8611 * Makefile.in (LIBOBJS): New.
8613 (memmem.o): New rule.
8614 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8615 * configure: Regenerated.
8617 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8619 * server.c (handle_query): Never return "unsupported" for
8620 qXfer:features:read queries.
8622 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8624 * server.c (get_features_xml): Fix inverted condition.
8625 (handle_query): Always support qXfer:feature:read.
8627 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8629 * server.c (wrapper_argv): New.
8630 (start_inferior): Handle wrapper_argv. If set, expect an extra
8632 (gdbserver_usage): Document --wrapper.
8633 (main): Parse --wrapper.
8635 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8637 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8638 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8639 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8640 (ppc_set_pc): Likewise.
8641 (ppc_arch_setup): New function.
8642 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8643 of collect_register.
8644 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8646 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8648 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8649 instead of linux-ppc64-low.o.
8650 * linux-ppc64-low.c: Remove file.
8651 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8652 (linux-ppc64-low.o): Remove rule.
8654 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8655 (init_registers_powerpc_64): Likewise.
8656 (ppc_regmap): Conditionally define depending on __powerpc64__.
8657 (ppc_cannot_store_register): Do not special-case "fpscr" when
8658 compiled on __powerpc64__.
8659 (ppc_collect_ptrace_register): New function.
8660 (ppc_supply_ptrace_register): New function.
8661 (ppc_breakpoint): Change type to "unsigned int".
8662 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8663 (the_low_target): Conditionally provide initializers for the
8664 arch_setup member depending on __powerpc64__. Install
8665 collect_ptrace_register and supply_ptrace_register members.
8667 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8669 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8670 * server.c (gdbserver_xmltarget): Define.
8671 (get_features_xml): Use it to replace "target.xml" and arch_string.
8673 * configure.srv: Remove srv_xmltarget. Add XML files that were
8674 mentioned there to srv_xmlfiles instead. Remove conditional tests
8675 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8676 srv_xmlfiles and srv_regobj to include all possible choices.
8677 * configure.ac (srv_xmltarget): Remove.
8678 (srv_xmlfiles): Do not add "target.xml".
8679 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8680 checks for supplementary target information.
8681 * configure: Regenerate.
8682 * Makefile.in (XML_TARGET): Remove.
8683 (target.xml): Remove rule.
8684 (clean): Do not clean up target.xml.
8685 (.PRECIOUS): Do not mention target.xml.
8687 * target.h (struct target_ops): Remove arch_string member.
8688 * linux-low.c (linux_arch_string): Remove.
8689 (linux_target_ops): Remove arch_string initializer.
8690 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8691 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8692 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8693 * spu-low.c (spu_arch_string): Remove.
8694 (spu_target_ops): Remove arch_string initializer.
8695 * win32-low.c (win32_arch_string): Remove.
8696 (win32_target_ops): Remove arch_string initializer.
8697 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8698 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8699 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8701 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8703 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8704 by collect_ptrace_register and supply_ptrace_register hooks.
8705 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8706 instead of checking for the_low_target.left_pad_xfer.
8707 (usr_store_inferior_registers): Use collect_ptrace_register callback
8708 instead of checking for the_low_target.left_pad_xfer.
8710 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8711 (s390_supply_ptrace_register): Likewise.
8712 (s390_fill_gregset): Call s390_collect_ptrace_register.
8713 (the_low_target): Update.
8715 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8716 (ppc_supply_ptrace_register): Likewise.
8717 (the_low_target): Update.
8719 * linux-i386-low.c (the_low_target): Update.
8720 * linux-x86-64-low.c (the_low_target): Update.
8722 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8724 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8725 reg-s390.o and reg-s390x.o.
8727 * linux-low.c (new_inferior): New global variable.
8728 (linux_create_inferior, linux_attach): Set it.
8729 (linux_wait_for_process): Call the_low_target.arch_setup after the
8730 target has stopped for the first time.
8731 (initialize_low): Do not call the_low_target.arch_setup.
8733 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8734 (s390_set_pc): Likewise.
8735 (s390_arch_setup): New function.
8736 (the_low_target): Use s390_arch_setup as arch_setup routine.
8738 * regcache.c (realloc_register_cache): New function.
8739 (set_register_cache): Call it for each existing regcache.
8741 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8743 * server.h (init_registers): Remove prototype.
8745 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8746 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8747 instead of init_registers ().
8748 * linux-arm-low.c (init_registers_arm): Add prototype.
8749 (init_registers_arm_with_iwmmxt): Likewise.
8750 (the_low_target): Add initializer for arch_setup field.
8751 * linux-cris-low.c (init_registers_cris): Add prototype.
8752 (the_low_target): Add initializer for arch_setup field.
8753 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8754 (the_low_target): Add initializer for arch_setup field.
8755 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8756 (the_low_target): Add initializer for arch_setup field.
8757 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8758 (the_low_target): Add initializer for arch_setup field.
8759 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8760 (the_low_target): Add initializer for arch_setup field.
8761 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8762 (the_low_target): Add initializer for arch_setup field.
8763 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8764 (init_registers_mips64_linux): Likewise.
8765 (the_low_target): Add initializer for arch_setup field.
8766 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8767 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8768 (the_low_target): Add initializer for arch_setup field.
8769 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8770 (init_registers_powerpc_64): Likewise.
8771 (the_low_target): Add initializer for arch_setup field.
8772 * linux-s390-low.c (init_registers_s390): Add prototype.
8773 (init_registers_s390x): Likewise.
8774 (the_low_target): Add initializer for arch_setup field.
8775 * linux-sh-low.c (init_registers_sh): Add prototype.
8776 (the_low_target): Add initializer for arch_setup field.
8777 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8778 (the_low_target): Add initializer for arch_setup field.
8779 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8780 (the_low_target): Add initializer for arch_setup field.
8782 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8783 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8784 instead of init_registers ().
8785 * win32-arm-low.c (init_registers_arm): Add prototype.
8786 (the_low_target): Add initializer for arch_setup field.
8787 * win32-i386-low.c (init_registers_i386): Add prototype.
8788 (the_low_target): Add initializer for arch_setup field.
8790 * spu-low.c (init_registers_spu): Add prototype.
8791 (initialize_low): Call initialie_registers_spu () instead of
8792 initialize_registers ().
8794 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8796 * server.c (handle_v_requests): When handling the vRun and vAttach
8797 packets, if already debugging a process, don't kill it. Return an
8800 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8802 * server.c (handle_query): Correct length check.
8804 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8806 * win32-low.c (do_initial_child_stuff): Add process handle
8807 parameter. Set current_process_handle and current_process_id from the
8808 parameters. Clear globals.
8809 (win32_create_inferior): Don't set current_process_handle and
8810 current_process_id here. Instead pass them on the call to
8811 do_initial_child_stuff.
8812 (win32_attach): Likewise.
8813 (win32_clear_inferiors): New.
8814 (win32_kill): Don't close the current process handle or the
8815 current thread handle here. Instead call win32_clear_inferiors.
8816 (win32_detach): Don't open a new handle to the process. Call
8817 win32_clear_inferiors.
8818 (win32_join): Don't rely on current_process_handle; open a new
8819 handle using the process id.
8820 (win32_wait): Call win32_clear_inferiors when the inferior process
8823 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8825 * server.c (monitor_show_help): Add "exit".
8827 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8829 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8830 (clean): Add reg-xtensa.c.
8831 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8832 * configure.srv (xtensa*-*-linux*) New target.
8833 * linux-xtensa-low.c: New.
8834 * xtensa-xtregs.c: New.
8836 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8838 * hostio.c: Don't include errno.h.
8839 (errno_to_fileio_errno): Move to hostio-errno.
8840 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8841 error number outputting to the target->hostio_last_error callback.
8842 (hostio_packet_error): Use FILEIO_EINVAL directly.
8843 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8844 calls to hostio_error.
8845 * hostio-errno.c: New.
8846 * server.h (hostio_last_error_from_errno): Declare.
8847 * target.h (target_ops): Add hostio_last_error member.
8848 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8849 as hostio_last_error handler.
8850 * spu-low.c (spu_target_ops): Likewise.
8851 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8852 (wince_hostio_last_error): New functions.
8853 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8854 as hostio_last_error handler.
8855 (win32_target_ops) [!_WIN32_WCE]: Register
8856 hostio_last_error_from_errno as hostio_last_error handler.
8857 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8858 (hostio-errno.o): New rule.
8859 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8860 * configure.srv (srv_hostio_err_objs): New variable. Default to
8862 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8863 * configure: Regenerate.
8865 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8867 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8868 (linux_kill, linux_detach): Clean up the process list.
8869 * remote-utils.c (remote_open): Improve port number parsing.
8870 (putpkt_binary, input_interrupt): Only send interrupts if the target
8872 * server.c (extended_protocol): Make static.
8873 (attached): Define earlier.
8874 (exit_requested, response_needed, program_argv): New variables.
8875 (target_running): New.
8876 (start_inferior): Clear attached here.
8877 (attach_inferior): Set attached here.
8878 (require_running): Define.
8879 (handle_query): Use require_running and target_running. Implement
8881 (handle_v_attach, handle_v_run): New.
8882 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8883 (gdbserver_usage): Update.
8884 (main): Redo argument parsing. Handle --debug and --multi. Handle
8885 --attach along with other options or after the port. Save
8886 program_argv. Support no initial program. Resynchronize
8887 communication with GDB after an error. Handle "monitor exit".
8888 Use require_running and target_running. Always allow the extended
8889 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8890 restart in extended mode.
8891 * README: Refer to the GDB manual. Update --attach usage.
8893 2007-12-20 Andreas Schwab <schwab@suse.de>
8895 * linux-low.c (STACK_SIZE): Define.
8896 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8897 (linux_test_for_tracefork): Likewise.
8899 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8901 * linux-low.c (linux_wait_for_event): Update messages. Do not
8902 reinsert auto-delete breakpoints.
8903 * mem-break.c (struct breakpoint): Change return type of handler to
8905 (set_breakpoint_at): Update handler type.
8906 (reinsert_breakpoint_handler): Return 1 instead of calling
8908 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8910 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8911 * mem-break.h (set_breakpoint_at): Update handler type.
8912 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8913 * win32-low.c (auto_delete_breakpoint): New.
8914 (get_child_debug_event): Use it.
8916 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8918 * configure.ac: Check for pread and pwrite.
8919 * hostio.c (handle_pread): Fall back to lseek and read.
8920 (handle_pwrite): Fall back to lseek and write.
8921 * config.in, configure: Regenerated.
8923 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8925 * server.c (myresume): Add own_buf argument.
8926 (main): Update calls.
8928 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8930 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8931 * remote-utils.c (remote_open): Do not call disable_async_io.
8932 (block_async_io): Delete.
8933 (unblock_async_io): Make static.
8934 (initialize_async_io): New.
8935 * server.c (handle_v_cont): Handle async I/O here.
8936 (myresume): Likewise. Move other common resume tasks here...
8937 (main): ... from here. Call initialize_async_io. Disable async
8938 I/O before the main loop.
8939 * server.h (initialize_async_io): Declare.
8940 (block_async_io, unblock_async_io): Delete prototypes.
8941 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8943 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8945 * remote-utils.c (readchar): Allow binary data in received messages.
8947 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8949 * win32-low.c (attaching): New global.
8950 (win32_create_inferior): Clear the `attaching' global.
8951 (win32_attach): Set the `attaching' global.
8952 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8953 attaching. Only set a breakpoint at the entry point if not
8956 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8958 * server.c (main): Don't report dll events on the initial
8959 connection on attaches.
8961 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8963 * server.c (main): Relax numerical bases supported for the pid of
8964 the --attach command line argument.
8966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8968 * win32-low.c (win32_attach): Call OpenProcess before
8969 DebugActiveProcess, not after. Add last error output to error
8972 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8974 * win32-low.c (win32_get_thread_context)
8975 (win32_set_thread_context): New functions.
8976 (thread_rec): Use win32_get_thread_context.
8977 (continue_one_thread, win32_resume): Use win32_set_thread_context.
8978 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8981 2007-12-03 Leo Zayas
8982 Pedro Alves <pedro_alves@portugalmail.pt>
8984 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8986 (child_add_thread): Minor cleanup.
8987 (child_continue): Resume artificially suspended threads before
8988 calling ContinueDebugEvent.
8989 (suspend_one_thread): New.
8990 (fake_breakpoint_event): New.
8991 (get_child_debug_event): Change return type to int. Check here if
8992 gdb sent an interrupt request. If a soft interrupt was requested,
8993 fake a breakpoint event. Return 0 if there is no event to handle,
8995 (win32_wait): Don't check here if gdb sent an interrupt request.
8996 Ensure there is a valid event to handle.
8997 (win32_request_interrupt): Add soft interruption method as last
9000 2007-12-03 Leo Zayas
9001 Pedro Alves <pedro_alves@portugalmail.pt>
9003 * win32-low.h (win32_thread_info): Add descriptions to the
9004 structure members. Replace `suspend_count' counter by a
9006 * win32-low.c (thread_rec): Update condition of when to get the
9007 context from the inferior. Rely on ContextFlags being set if it
9008 has already been retrieved. Only suspend the inferior thread if
9009 we haven't already. Warn if that fails.
9010 (continue_one_thread): s/suspend_count/suspended/. Only call
9011 ResumeThread once. Warn if that fails.
9013 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9015 * win32-low.c (win32_wait): Don't read from the inferior when it
9018 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9020 * Makefile.in (win32_low_h): New variable.
9021 (win32-low.o): Add dependency on $(win32_low_h).
9022 (win32-arm-low.o, win32-i386-low.o): New rules.
9024 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9026 * hostio.c: Correct copyright year.
9028 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9030 * Makefile.in (OBS): Add hostio.o.
9031 (hostio.o): New rule.
9032 * server.h (handle_vFile): Declare.
9033 * hostio.c: New file.
9034 * server.c (handle_v_requests): Take packet_len and new_packet_len
9035 for binary packets. Call handle_vFile.
9036 (main): Update call to handle_v_requests.
9038 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9040 * linux-low.c: Include <sched.h>.
9042 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9044 * linux-low.c (linux_tracefork_grandchild): New.
9045 (linux_tracefork_child): Use clone.
9046 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9048 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9050 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9052 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9054 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9056 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9058 * inferiors.c (change_inferior_id): Delete.
9059 (add_pid_to_list, pull_pid_from_list): New.
9060 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9061 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9062 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9063 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9064 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9065 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9066 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9067 (using_threads): Always set to 1.
9068 (handle_extended_wait): New.
9069 (add_process): Do not set TID.
9070 (linux_create_inferior): Set must_set_ptrace_flags.
9071 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9072 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9073 (linux_thread_alive): Rename TID argument to LWPID.
9074 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9075 (linux_wait_for_event): Do not use TID or check using_threads. Update
9076 call to dead_thread_notify. Call handle_extended_wait.
9077 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9078 (send_sigstop): Delete sigstop_sent.
9079 (wait_for_sigstop): Avoid TID.
9080 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9081 (linux_test_for_tracefork): New.
9082 (linux_lookup_signals): Use thread_db_active and
9083 linux_supports_tracefork_flag.
9084 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9085 * linux-low.h (get_process_thread): Avoid TID.
9086 (struct process_ifo): Move thread_known and tid to the end. Remove
9088 (linux_attach_lwp, thread_db_init): Update prototypes.
9089 * server.h (change_inferior_id): Delete prototype.
9090 (add_pid_to_list, pull_pid_from_list): New prototypes.
9091 * thread-db.c (thread_db_use_events): New.
9092 (find_first_thread): Rename to...
9093 (find_one_thread): ...this. Update callers and messages. Do not
9094 call fatal. Check thread_db_use_events. Do not call
9095 change_inferior_id or new_thread_notify.
9096 (maybe_attach_thread): Update. Do not call new_thread_notify.
9097 (thread_db_init): Set thread_db_use_events. Check use_events.
9098 * utils.c (fatal, warning): Correct message prefix.
9100 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9102 * Makefile.in (clean): Remove new files.
9103 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9104 (powerpc-64.o, powerpc-64.c): New rules.
9105 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9106 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9108 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9110 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9111 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9112 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9113 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9114 (target_regsets): Add AltiVec and SPE register sets.
9115 * configure.ac: Check for AltiVec and SPE.
9116 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9117 (ppc_fill_vrregset, ppc_store_vrregset): New.
9118 (target_regsets): Add AltiVec register set.
9119 * configure: Regenerated.
9121 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9123 * linux-low.c (O_LARGEFILE): Define.
9124 (linux_read_memory): Use /proc/PID/mem.
9125 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9126 * configure, config.in: Regenerated.
9128 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9130 * linux-low.c (linux_wait_for_event): Do not pass signals while
9133 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9135 * win32-low.c (create_process): New.
9136 (win32_create_inferior): Use create_process instead of
9137 CreateProcess. If create_process failed retry appending an ".exe"
9138 suffix. Store the GetLastError result immediatelly after
9139 create_process calls and use it on the call to error.
9141 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9143 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9145 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9147 * configure.ac: Switch license to GPLv3.
9149 2007-08-01 Michael Snyder <msnyder@access-company.com>
9151 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9153 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9155 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9157 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9158 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9159 CloseToolhelp32Snapshot.
9160 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9161 CloseToolhelp32Snapshot.
9163 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9165 * server.c (main): Check for inferior exit before main loop.
9167 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9169 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9170 instead of on tmp_desc.
9172 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9173 Daniel Jacobowitz <dan@codesourcery.com>
9175 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9176 (add_thread): Minor cleanups.
9177 (clear_inferiors): Move lower in the file. Clear the DLL
9179 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9180 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9181 (xml_escape_text): New.
9182 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9184 (handle_v_cont): Report errors.
9185 (gdbserver_version): Update.
9186 (main): Correct size of own_buf. Do not report initial DLL events.
9187 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9188 (unloaded_dll, xml_escape_text): New.
9189 * win32-low.c (enum target_waitkind): Update comments.
9190 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9191 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9192 (win32_EnumProcessModules, win32_GetModuleInformation)
9193 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9194 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9195 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9196 (win32_Module32First, win32_Module32Next, load_toolhelp)
9197 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9198 (get_child_debug_event): Handle DLL events.
9199 (win32_wait): Likewise.
9201 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9203 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9204 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9206 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9208 * win32-low.c (handle_output_debug_string): Ignore event if not
9211 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9213 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9215 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9217 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9219 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9221 * inferiors.c (change_inferior_id): Add comment.
9222 * linux-low.c (check_removed_breakpoint): Add an early
9223 prototype. Improve debug output.
9224 (linux_attach): Doc update.
9225 (linux_detach_one_process, linux_detach): Clean up before releasing
9227 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9228 * linux-low.h (struct process_info): Doc improvement.
9229 * mem-break.c (delete_all_breakpoints): New.
9230 * mem-break.h (delete_all_breakpoints): New prototype.
9231 * thread-db.c (find_first_thread): New.
9232 (thread_db_create_event): Call it instead of
9233 thread_db_find_new_threads. Clean up unused variables.
9234 (maybe_attach_thread): Remove first thread handling.
9235 (thread_db_find_new_threads): Use find_first_thread.
9236 (thread_db_get_tls_address): Likewise.
9238 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9240 * thread-db.c (thread_db_find_new_threads): Add prototype.
9241 (thread_db_create_event): Check for the main thread before adding
9243 (maybe_attach_thread): Only enable event reporting if TID == 0.
9244 (thread_db_get_tls_address): Check for new threads.
9246 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9248 * linux-low.c (linux_create_inferior): Try execv before execvp.
9249 * spu-low.c (spu_create_inferior): Likewise.
9251 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9253 * linux-low.c (linux_create_inferior): Change execv to execvp.
9254 * spu-low.c (spu_create_inferior): Likewies.
9256 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9258 * Makefile.in (clean): Clean new files instead of deleted ones.
9259 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9260 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9262 * configure.srv: Specify XML files and new regformats for MIPS and
9264 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9265 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9266 an entry for the restart register.
9267 (mips_cannot_fetch_register, mips_cannot_store_register)
9268 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9269 register names to match the XML descriptions.
9270 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9271 restart register instead of $0.
9273 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9274 Markus Deuling <deuling@de.ibm.com>
9276 * remote-utils.c (decode_xfer_write): New function.
9277 * server.h (decode_xfer_write): Add prototype.
9278 * server.c (handle_query): Add PACKET_LEN argument. Support
9279 qXfer:spu:read and qXfer:spu:write packets.
9280 (main): Pass packet_len to handle_query.
9281 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9282 * target.h (target_ops): Add qxfer_spu.
9284 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9286 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9287 accessing non-seekable spufs files.
9289 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9291 * server.c (handle_query): Add reply for qC packet.
9293 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9294 Leo Zayas <lerele@champenstudios@com>
9296 * server.h (check_remote_input_interrupt_request): New function.
9297 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9298 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9299 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9300 (check_remote_input_interrupt_request): New function.
9301 * server.h (check_remote_input_interrupt_request): Declare.
9302 * win32-low.c (winapi_DebugBreakProcess,
9303 winapi_GenerateConsoleCtrlEvent): New typedefs.
9304 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9306 (win32_wait): Check for remote interrupt request
9307 with check_remote_input_interrupt_request.
9308 (win32_request_interrupt): New function.
9309 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9311 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9313 * win32-low.c (debug_registers_changed,
9314 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9315 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9316 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9317 (thread_rec): Get context using the low target.
9318 (child_add_thread): Call thread_added on the low target,
9319 which does the same thing.
9321 (do_initial_child_stuff): Remove debug registers references.
9322 Set context using the low target. Resume threads after
9323 setting the contexts.
9324 (child_continue): Remove dead variable. Remove debug
9325 registers references.
9326 (child_fetch_inferior_registers): Go through the low target.
9327 (do_child_store_inferior_registers): Remove.
9328 (child_store_inferior_registers): Go through the low target.
9329 (win32_resume): Remove debug registers references.
9330 Set context using the low target.
9331 (handle_exception): Change return type to void. Don't record
9332 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9333 first chance exception.
9334 (get_child_debug_event): Change return type to void. Remove
9335 goto loop. Always return after waiting for debug event.
9336 (win32_wait): Convert to switch statement. Handle spurious
9339 * win32-i386-low.c (debug_registers_changed,
9340 debug_registers_used): New.
9341 (initial_stuff): Rename to ...
9342 (i386_initial_stuff): ... this. Clear debug registers
9344 (store_debug_registers): Delete.
9345 (i386_get_thread_context): New.
9346 (load_debug_registers): Delete.
9347 (i386_set_thread_context): New.
9348 (i386_thread_added): New.
9349 (single_step): Rename to ...
9350 (i386_single_step): ... this.
9351 (do_fetch_inferior_registers): Rename to ...
9352 (i386_fetch_inferior_register): ... this.
9353 (i386_store_inferior_register): New.
9354 (the_low_target): Adapt to new interface.
9356 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9357 (arm_get_thread_context): New.
9358 (arm_set_thread_context): New.
9360 (do_fetch_inferior_registers): Rename to ...
9361 (arm_fetch_inferior_register): ... this.
9362 (arm_store_inferior_register): New.
9363 (arm_wince_breakpoint): Reimplement as unsigned long.
9364 (arm_wince_breakpoint_len): Define.
9365 (the_low_target): Adapt to new interface.
9367 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9368 load_debug_registers. Add get_thread_context, set_thread_context,
9369 thread_added and store_inferior_register. Rename
9370 fetch_inferior_registers to fetch_inferior_register.
9371 (regptr): Remove declaration.
9373 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9375 * linux-low.c (linux_detach): Change return type to int. Return 0.
9376 * spu-low.c (spu_detach): Likewise.
9378 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9380 * target.h (target_ops): Change return type of detach to int.
9382 (join_inferior): New.
9383 * server.c (main): Don't skip detach support on mingw32.
9384 If the inferior doesn't support detaching return error.
9385 Call join_inferior instead of using waitpid.
9386 * linux-low.c (linux_join): New.
9387 (linux_target_op): Add linux_join.
9388 * spu-low.c (spu_join): New.
9389 (spu_target_ops): Add spu_join.
9390 * win32-low.c (win32_detach): Adapt to new interface.
9391 Reopen current_process_handle before detaching. Issue a child
9392 resume before detaching.
9394 (win32_target_op): Add win32_join.
9396 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9398 * win32-low.c (win32-attach): Fix return value.
9399 * target.h (target_ops): Describe ATTACH return values.
9401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9403 * win32-low.c (GETPROCADDRESS): Define.
9404 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9405 (winapi_DebugSetProcessKillOnExit): Likewise.
9406 (win32_create_inferior): Force usage of ansi CreateProcessA.
9407 (win32_attach): Use GETPROCADDRESS.
9408 (win32_detach): Likewise.
9410 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9412 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9414 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9416 * win32-low.c: Commit leftover changes from 2007-03-29.
9418 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9420 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9421 fields short instead of int. Add explicit padding.
9422 (i387_cache_to_fsave): Remove unnecessary casts.
9423 (i387_fsave_to_cache): Doc fix.
9424 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9426 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9428 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9429 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9431 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9433 * configure.srv (arm*-*-mingw32ce*): Move near the other
9436 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9438 * configure.ac: Add errno checking.
9439 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9440 sys/file.h and malloc.h.
9441 (AC_CHECK_DECLS): Add perror.
9442 (srv_mingwce): Handle.
9443 * configure.srv (i[34567]86-*-cygwin*): Add
9444 win32-i386-low.o to srv_tgtobj.
9445 (i[34567]86-*-mingw*): Likewise.
9446 (arm*-*-mingw32ce*): Add case.
9447 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9448 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9449 [__MINGW32CE__] (strerror): New function.
9450 [__MINGW32CE__] (errno): Define to GetLastError.
9451 [__MINGW32CE__] (COUNTOF): New macro.
9452 (remote_open): Remove extra close call.
9453 * mem-break.c (delete_breakpoint_at): New function.
9454 * mem-break.h (delete_breakpoint_at): Declare.
9455 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9456 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9457 [USE_WIN32API] (read, write): Add char* casts.
9458 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9459 * server.h: Include wincecompat.h on Windows CE.
9460 [HAVE_ERRNO_H]: Check.
9461 (perror): Declare if not declared.
9462 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9463 (perror_with_name): Remove errno declaration.
9464 * wincecompat.h: New.
9465 * wincecompat.c: New.
9467 * win32-arm-low.c: New.
9468 * win32-i386-low.c: New.
9469 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9470 (OUTMSG2): Make it safe.
9472 (COUNTOF): New macro.
9473 (NUM_REGS): Get it from the low target.
9474 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9475 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9476 (thread_rec): Let low target handle debug registers.
9477 (child_add_thread): Likewise.
9478 (child_init_thread_list): Likewise.
9479 (continue_one_thread): Likewise.
9481 (do_child_fetch_inferior_registers): Move to ...
9482 * win32-i386-low.c: ... here, and rename to ...
9483 (do_fetch_inferior_registers): ... this.
9484 * win32-low.c (child_fetch_inferior_registers):
9485 Go through the low target.
9486 (do_child_store_inferior_registers): Use regptr.
9487 (strwinerror): New function.
9488 (win32_create_inferior): Handle Windows CE.
9489 Use strwinerror instead of strerror on Windows error
9490 codes. Add program to the error output.
9491 Don't close the main thread handle on Windows CE.
9492 (win32_attach): Use coredll.dll on Windows CE.
9493 (win32_kill): Close current process and current
9495 (win32_detach): Use coredll.dll on Windows CE.
9496 (win32_resume): Let low target handle debug registers, and
9498 (handle_exception): Add/Remove initial breakpoint. Avoid
9499 non-existant WSTOPSIG on Windows CE.
9500 (win32_read_inferior_memory): Cast to remove warning.
9501 (win32_arch_string): Go through the low target.
9502 (initialize_low): Call set_breakpoint_data with the low
9503 target's breakpoint.
9504 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9505 FOP_REGNUM, mappings): Move to ...
9506 * win32-i386-low.c: ... here.
9507 * win32-low.c (win32_thread_info): Move to ...
9508 * win32-low.h: ... here.
9509 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9510 win32-arm-low.c and wincecompat.c.
9511 (all:): Add $EXEEXT.
9512 (install-only:): Likewise.
9513 (gdbserver:): Likewise.
9514 (gdbreplay:): Likewise.
9515 * config.in: Regenerate.
9516 * configure: Regenerate.
9518 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9520 * win32-low.c: Rename typedef thread_info to
9521 win32_thread_info throughout.
9523 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9525 * win32-i386-low.c: Rename to ...
9526 * win32-low.c: ... this.
9527 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9528 * Makefile.in: Likewise.
9530 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9532 * remote-utils.c (monitor_output): Constify msg parameter.
9533 * server.h (monitor_output): Likewise.
9534 * win32-i386-low.c (handle_output_debug_string): New.
9535 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9536 handle_output_debug_string.
9537 (get_child_debug_event): Likewise.
9539 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9541 * server.c (main): Correct strtoul check.
9543 2007-03-27 Jon Ringle <jon@ringle.org>
9545 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9547 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9549 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9551 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9553 * terminal.h: Check HAVE_SGTTY_H.
9555 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9557 * remote-utils.c (remote_open): Print out the assigned port number.
9559 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9561 * remote-utils.c (monitor_output): New function.
9562 * server.c (debug_threads): Define here.
9563 (monitor_show_help): New function.
9564 (handle_query): Handle qRcmd.
9565 (main): Do not handle 'd' packet.
9566 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9567 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9570 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9572 * Makefile.in (EXEEXT): New.
9573 (clean): Use $(EXEEXT).
9575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9577 * target.h (target_ops): Rename send_signal to request_interrupt,
9578 and remove enum target_signal parameter.
9579 * linux-low.c (linux_request_interrupt): Rename from
9580 linux_send_signal, and always send SIGINT.
9581 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9582 and always send SIGINT.
9583 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9585 (input_interrupt): Likewise.
9587 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9589 * server.c (get_features_xml): Check if target implemented
9591 * win32-i386-low.c (win32_arch_string): New.
9592 (win32_target_ops): Add win32_arch_string as arch_string member.
9594 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9596 * spu-low.c (spu_arch_string): New.
9597 (spu_target_ops): Add spu_arch_string.
9599 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9601 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9602 * configure.ac: Do not check for terminal.h.
9603 * configure, config.in: Regenerated.
9605 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9607 * Makefile.in (OBS): Add $(XML_BUILTIN).
9608 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9610 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9611 (arm-with-iwmmxt.c): New.
9612 * config.in, configure: Regenerate.
9613 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9614 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9615 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9616 (arm*-*-linux*): Add iWMMXt and regset support.
9617 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9618 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9619 (arm_store_wmmxregset, target_regsets): New.
9620 * server.c (get_features_xml): Take annex argument. Check builtin
9622 (handle_query): Handle multiple annexes.
9624 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9626 * remote-utils.c [USE_WIN32API] (read, write): Define.
9627 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9630 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9632 * linux-i386-low.c (the_low_target): Set arch_string.
9633 * linux-x86-64-low.c (the_low_target): Likewise.
9634 * linux-low.c (linux_arch_string): New.
9635 (linux_target_ops): Add it.
9636 * linux-low.h (struct linux_target_ops): Add arch_string.
9637 * server.c (write_qxfer_response): Use const void * for DATA.
9638 (get_features_xml): New.
9639 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9640 * target.h (struct target_ops): Add arch_string method.
9642 2007-01-03 Denis Pilat <denis.pilat@st.com>
9643 Daniel Jacobowitz <dan@codesourcery.com>
9645 * linux-low.c (linux_kill): Handle being called with no threads.
9646 * win32-i386-low.c (win32_kill): Likewise.
9647 (get_child_debug_event): Clear current_process_handle.
9649 2006-12-30 Denis PILAT <denis.pilat@st.com>
9650 Daniel Jacobowitz <dan@codesourcery.com>
9652 * remote-utils.c (remote_open): Check the type of specified
9653 serial port devices before opening them.
9654 * server.c (main): Kill the inferior if an error occurs during
9655 the first remote_open.
9657 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9659 * README: Update supported targets.
9661 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9663 * Makefile.in (clean): Remove reg-mips64.c.
9664 (reg-mips64.c, reg-mips64.o): New rules.
9665 * configure.srv: Handle mips64. Include regset support for mips.
9666 * linux-mips-low.c (union mips_register): New.
9667 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9668 (mips_breakpoint, mips_breakpoint_at): Use int.
9669 (mips_collect_register, mips_supply_register)
9670 (mips_collect_register_32bit, mips_supply_register_32bit)
9671 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9672 (mips_store_fpregset, target_regsets): New.
9673 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9675 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9677 * configure.srv: Add target "spu*-*-*".
9678 * Makefile.in (clean): Remove reg-spu.c.
9679 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9680 * spu-low.c: New file.
9682 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9684 * configure.ac: Correct td_thr_tls_get_addr test.
9685 * configure: Regenerated.
9687 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9689 * linux-low.c (linux_wait_for_event): Reformat. Use the
9691 * remote-utils.c (decode_address_to_semicolon): New.
9692 * server.c (pass_signals, handle_general_set): New.
9693 (handle_query): Mention QPassSignals for qSupported.
9694 (main): Call handle_general_set.
9695 * server.h (pass_signals, decode_address_to_semicolon): New.
9697 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9699 * server.c (handle_query): Correct error handling for read_auxv.
9701 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9703 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9704 and srv_linux_thread_db to yes.
9705 * linux-s390-low.c (s390_fill_gregset): New function.
9706 (target_regsets): Define data structure.
9708 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9710 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9711 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9712 * config.in, configure: Regenerated.
9713 * inferiors.c (gdb_id_to_thread): New function.
9714 (gdb_id_to_thread_id): Use it.
9715 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9716 * linux-low.h (struct process_info): Add th member.
9717 (thread_db_get_tls_address): New prototype.
9718 * remote-utils.c (decode_address): Make non-static.
9719 * server.c (handle_query): Handle qGetTLSAddr.
9720 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9721 * target.h (struct target_ops): Add get_tls_address.
9722 * thread-db.c (maybe_attach_thread): Save the thread handle.
9723 (thread_db_get_tls_address): New.
9725 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9727 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9728 (linux_resume_one_process): Take a siginfo_t *. Update all
9729 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9730 (struct pending_signals): Add a siginfo_t.
9731 (linux_wait_for_process): Always set last_status.
9732 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9733 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9734 * linux-low.h (struct process_info): Add last_status.
9736 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9738 * remote-utils.c (try_rle): New function.
9739 (putpkt_binary): Use it.
9741 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9743 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9744 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9745 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9746 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9747 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9750 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9752 * server.c (terminal_fd): New variable.
9753 (old_foreground_pgrp): Likewise.
9754 (restore_old_foreground_pgrp): New function.
9755 (start_inferior): Record the terminal file descriptor in terminal_fd
9756 and its original foreground group in old_foreground_pgrp. Register
9757 restore_old_foreground_pgrp with atexit().
9759 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9761 * server.c (handle_query): Correct qPart to qXfer.
9763 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9765 * configure.ac: Check for more headers which are missing on
9766 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9767 * configure.srv: Add Cygwin and mingw32.
9768 * remote-utils.c: Don't include headers unconditionally which
9769 are missing on mingw32. Include <winsock.h> for mingw32.
9770 (remote_open): Adjust for mingw32 support. Flush
9771 standard error after writing to it.
9772 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9773 (unblock_async_io, enable_async_io, disable_async_io)
9774 (readchar, getpkt): Update for Winsock support.
9775 (prepare_resume_reply): Expect a protocol signal number.
9776 * server.c: Disable <sys/wait.h> on mingw32.
9777 (start_inferior): Adjust for mingw32 support. Flush
9778 standard error after writing to it.
9779 (attach_inferior): Likewise. Use protocol signal
9781 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9783 * win32-i386-low.c: New file.
9784 * Makefile.in (XM_CLIBS): Set.
9785 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9786 (win32-i386-low.o): New dependency rule.
9787 * linux-low.c (linux_wait): Use target signal numbers.
9788 * target.h (struct target_ops): Doc fix.
9789 * server.h (target_signal_to_name): New prototype.
9790 * gdbreplay.c: Don't include headers unconditionally which
9791 are missing on mingw32. Include <winsock.h> for mingw32.
9792 (remote_close, remote_open): Adjust for Winsock support.
9793 * configure, config.in: Regenerated.
9795 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9797 * server.c (decode_xfer_read, write_qxfer_response): New.
9798 (handle_query): Take a packet length argument. Handle
9799 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9800 the qSupported response.
9801 (main): Update call to handle_query.
9803 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9805 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9806 (putpkt_binary): Renamed from putpkt and adjusted for binary
9808 (putpkt): New wrapper for putpkt_binary.
9809 (readchar): Don't mask off the high bit.
9810 (decode_X_packet): New function.
9811 * server.c (main): Call putpkt_binary if a handler sets the packet
9812 length. Save the length of the incoming packet. Handle 'X'.
9813 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9815 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9817 * server.c (handle_query): Handle qSupported.
9819 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9821 * remote-utils.c (all_symbols_looked_up): New variable.
9822 (look_up_one_symbol): Check it.
9823 * server.h (look_up_one_symbol): New declaration.
9824 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9826 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9828 * Makefile.in (linux-arm-low.o): Update dependencies.
9829 * linux-arm-low.c: Include "gdb_proc_service.h".
9830 (PTRACE_GET_THREAD_AREA): Define.
9831 (ps_get_thread_area): New function.
9833 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9835 * configure.srv (m68k*-*-uclinux*): New target.
9836 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9837 (linux_resume_one_process): Remove extraneous cast.
9838 (linux_read_offsets): New.
9839 (linux_target_op): Add linux_read_offsets on mmuless systems.
9840 * server.c (handle_query): Add qOffsets logic.
9841 * target.h (struct target_ops): Add read_offsets.
9843 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9845 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9846 (PTRACE_GET_THREAD_AREA): Define.
9847 (ps_get_thread_area): New function.
9848 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9849 (linux-x86-64-low.o): Update.
9851 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9853 * configure.ac: Remove checks for prfpregset_t.
9854 * gdb_proc_service.h: New file.
9855 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9856 new "gdb_proc_service.h".
9857 * proc-service.c: Likewise.
9858 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9859 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9860 * Makefile.in (gdb_proc_service_h): Updated.
9861 * configure, config.in: Regenerated.
9863 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9865 * remote-utils.c (prepare_resume_reply): Move declaration
9866 of gdb_id_from_wait to the top of the block.
9868 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9870 * linux-low.c (regsets_store_inferior_registers): Read the regset
9871 from the target before filling it.
9873 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9875 * server.c (attach_inferior): Return SIGTRAP for a successful
9878 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9880 * Makefile.in (OBS): Add version.o.
9881 (STAGESTUFF): Delete.
9882 (version.o): Add dependencies.
9883 (version.c): Replace rule.
9884 (clean): Remove version.c.
9885 * server.c (gdbserver_version): New.
9886 (gdbserver_usage): Use printf.
9887 (main): Handle --version and --help.
9888 * server.h (version, host_name): Add declarations.
9890 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9902 * linux-x86-64-low.c:
9905 * linux-ppc64-low.c:
9914 * linux-crisv32-low.c:
9926 * gdbserver.1: Add (C) after Copyright. Update the FSF
9929 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9931 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9932 (arm_breakpoint_at): Recognize both breakpoints.
9933 (the_low_target): Use the correct breakpoint instruction.
9935 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9937 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9938 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9939 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9940 (the_low_target): Update.
9942 2005-10-25 Andreas Schwab <schwab@suse.de>
9944 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9946 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9947 (ia64_num_regs): Reduce to 462.
9949 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9951 * acinclude.m4: Correct quoting.
9952 * aclocal.m4: Regenerated.
9954 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9955 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9956 (thread_db_init): Call thread_db_err_str.
9957 * configure.ac: Check for TD_VERSION.
9958 * config.in, configure: Regenerated.
9960 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9962 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9964 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9966 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9967 is not available. Define HAVE_PTRACE_GETREGS if it is.
9968 * config.in, configure: Regenerated.
9969 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9970 * linux-i386-low.c, linux-m68k-low.c: Update to use
9971 HAVE_PTRACE_GETREGS.
9972 * linux-low.c (regsets_fetch_inferior_registers)
9973 (regsets_store_inferior_registers): Only return 0 if we processed
9975 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9976 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9978 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9980 * inferiors.c (struct thread_info): Add gdb_id.
9981 (add_thread): Add gdb_id argument.
9982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9983 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9984 calls to add_thread.
9985 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9986 * server.c (handle_query): Use thread_to_gdb_id.
9987 (handle_v_cont, main): Use gdb_id_to_thread_id.
9988 * server.h (add_thread): Update prototype.
9989 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9992 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9994 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9995 left-padded registers.
9996 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9997 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9999 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10001 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10002 * configure: Regenerate.
10003 * config.in: Regenerate.
10004 * server.h (NEED_DECLARATION_STRERROR):
10005 Replace with !HAVE_DECL_STRERROR.
10007 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10009 * linux-low.c (linux_wait, linux_send_signal): Don't test
10010 an unsigned long variable for > 0 if it could be MAX_ULONG.
10011 * server.c (myresume): Likewise.
10012 * target.c (set_desired_inferior): Likewise.
10014 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10016 * configure.ac: Simplify and improve check for socklen_t.
10017 * configure, config.in: Regenerate.
10019 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10021 * acconfig.h: Remove.
10022 * configure.ac: Add a test for socklen_t. Use three-argument
10023 AC_DEFINE throughout.
10024 * config.in: Regenerated using autoheader 2.59.
10025 * configure: Regenerated.
10027 * gdbreplay.c (socklen_t): Provide a default.
10028 (remote_open): Use socklen_t.
10029 * remote-utils.c (socklen_t): Provide a default.
10030 (remote_open): Use socklen_t.
10031 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10034 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10036 * linux-low.c (linux_read_memory, linux_write_memory)
10037 (linux_read_auxv): Likewise.
10038 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10039 (check_mem_write): Likewise.
10040 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10042 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10043 (registers_from_string, register_data): Likewise.
10044 * server.c (handle_query, main): Likewise.
10045 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10046 (decode_M_packet): Likewise.
10047 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10048 * target.h (struct target_ops): Update read_memory, write_memory,
10050 (read_inferior_memory, write_inferior_memory): Update.
10051 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10052 to unsigned char *.
10053 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10054 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10055 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10056 linux-s390-low.c, linux-sh-low.c: Update for changes in
10057 read_inferior_memory and the_low_target->breakpoint.
10059 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10061 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10062 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10063 * configure.srv: Add powerpc64-*-linux*.
10064 * linux-ppc64-low.c: New file.
10066 2005-05-23 Orjan Friberg <orjanf@axis.com>
10068 * linux-cris-low.c: New file with support for CRIS.
10069 * linux-crisv32-low.c: Ditto for CRISv32.
10070 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10071 (clean): Add reg-cris.c and reg-crisv32.c.
10072 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10073 reg-crisv32.o, and reg-crisv32.c to make rules.
10074 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10075 recognized targets.
10077 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10079 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10080 of sizeof (PTRACE_XFER_TYPE).
10081 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10083 2005-05-12 Orjan Friberg <orjanf@axis.com>
10085 * target.h (struct target_ops): Add insert_watchpoint,
10086 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10087 pointers for hardware watchpoint support.
10088 * linux-low.h (struct linux_target_ops): Ditto.
10089 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10090 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10091 to linux_target_ops.
10092 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10094 * server.c (main): Recognize 'Z' and 'z' packets.
10096 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10098 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10099 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10100 (the_low_target): Add new members.
10102 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10104 * proc-service.c (ps_lgetregs): Search all_processes instead of
10107 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10109 * server.c (start_inferior): Change return type to int.
10110 (attach_inferior): Change sigptr to int *.
10111 (handle_v_cont, handle_v_requests): Change signal to int *.
10112 (main): Change signal to int.
10114 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10116 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10117 * configure.srv: Add m32r*-*-linux*.
10118 * linux-m32r-low.c: New file.
10120 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10122 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10124 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10126 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10127 Take unsigned long arguments for PIDs.
10128 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10129 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10130 (wait_for_sigstop, linux_resume_one_process)
10131 (regsets_fetch_inferior_registers, linux_send_signal)
10132 (linux_read_auxv): Likewise. Update the types of variables holding
10133 PIDs. Update format string specifiers.
10134 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10135 * remote-utils.c (prepare_resume_reply): Likewise.
10136 * server.c (cont_thread, general_thread, step_thread)
10137 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10139 (handle_query): Update format specifiers.
10140 (handle_v_cont, main): Use strtoul for thread IDs.
10141 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10142 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10143 (general_thread, step_thread, thread_from_wait)
10144 (old_thread_from_wait): Update.
10145 * target.h (struct thread_resume): Use unsigned long for THREAD.
10146 (struct target_ops): Use unsigned long for arguments to attach and
10149 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10151 * acinclude.m4: Include bfd/bfd.m4 directly.
10152 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10153 <agriffis@toolchain.org>.
10154 * aclocal.m4, configure: Regenerated.
10156 2005-01-07 Andrew Cagney <cagney@gnu.org>
10158 * configure.ac: Rename configure.in, require autoconf 2.59.
10159 * configure: Re-generate.
10161 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10163 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10164 LIBS when finished.
10165 * aclocal.m4: Regenerated.
10166 * configure: Regenerated.
10168 2004-11-21 Andreas Schwab <schwab@suse.de>
10170 * linux-m68k-low.c (m68k_num_gregs): Define.
10171 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10172 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10173 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10174 (m68k_breakpoint_at): New. Add to the_low_target.
10176 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10177 srv_linux_thread_db to yes.
10179 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10181 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10182 (ARCH_SET_FS): Likewise.
10183 (ARCH_GET_FS): Likewise.
10184 (ARCH_GET_GS): Likewise.
10186 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10188 * linux-i386-low.c (ps_get_thread_area): New.
10189 * linux-x86-64-low.c (ps_get_thread_area): New.
10190 * linux-low.c: Include <sys/syscall.h>.
10191 (linux_kill_one_process): Don't kill the first thread here.
10192 (linux_kill): Kill the first thread here.
10193 (kill_lwp): New function.
10194 (send_sigstop, linux_send_signal): Use it.
10195 * proc-service.c: Clean up #ifdefs.
10196 (fpregset_info): Delete.
10197 (ps_lgetregs): Update and enable implementation.
10198 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10200 * remote-utils.c (struct sym_cache, symbol_cache): New.
10201 (input_interrupt): Print a clearer message.
10202 (async_io_enabled): New variable.
10203 (enable_async_io, disable_async_io): Use it. Update comments.
10204 (look_up_one_symbol): Use the symbol cache.
10205 * thread-db.c (thread_db_look_up_symbols): New function.
10206 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10208 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10210 * configure.in: Test for -rdynamic.
10211 * configure: Regenerated.
10212 * Makefile (INTERNAL_LDFLAGS): New.
10213 (gdbserver, gdbreplay): Use it.
10215 2004-09-02 Andrew Cagney <cagney@gnu.org>
10217 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10219 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10221 * linux-low.c (linux_wait): Clear all_processes list also.
10223 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10225 * linux-low.c: Include <errno.h>. Remove extern declaration of
10228 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10230 * gdbreplay.c, server.h, utils.c: Update copyright years.
10232 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10234 * server.c (main): Print child status or termination signal from
10235 variable 'signal', not 'sig'.
10237 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10239 * linux-low.c (linux_read_memory): Change return type to
10240 int. Check for and return error from ptrace().
10241 * target.c (read_inferior_memory): Change return type to int. Pass
10242 back return status from the_target->read_memory().
10243 * target.h (struct target_ops): Adapt *read_memory() prototype.
10245 (read_inferior_memory): Adapt prototype.
10246 * server.c (main): Return an error packet if
10247 read_inferior_memory() returns an error.
10249 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10251 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10252 Unify with other clean targets.
10254 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10256 * server.c (handle_v_cont): Call set_desired_inferior.
10258 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10260 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10262 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10264 * linux-low.c (linux_wait): Unblock async I/O.
10265 (linux_resume): Block and enable async I/O.
10266 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10267 * server.h (block_async_io, unblock_async_io): Add prototypes.
10269 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10271 * remote-utils.c (remote_open): Print a status notice after
10272 opening a TCP port.
10273 * server.c (attach_inferior): Print a status notice after
10276 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10278 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10280 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10282 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10284 * server.c, target.h: Update copyright years.
10286 2004-02-25 Roland McGrath <roland@redhat.com>
10288 * target.h (struct target_ops): New member `read_auxv'.
10289 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10290 * linux-low.c (linux_read_auxv): New function.
10291 (linux_target_ops): Initialize `read_auxv' member to that.
10293 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10295 Committed by Jim Blandy <jimb@redhat.com>.
10297 * linux-s390-low.c (s390_num_regs): Update.
10298 (s390_regmap): Remove control registers. Use __s390x__ predefine
10299 instead of GPR_SIZE to distiguish s390 and s390x targets.
10301 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10303 * linux-low.c: Update copyright year.
10304 (check_removed_breakpoint): Clear pending_is_breakpoint.
10305 (linux_set_resume_request, linux_queue_one_thread)
10306 (resume_status_pending_p): New functions.
10307 (linux_continue_one_thread): Use process->resume.
10308 (linux_resume): Only resume threads if there are no pending events.
10309 * linux-low.h (struct process_info): Add resume request
10312 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10314 * regcache.c (new_register_cache): Clear the allocated register
10315 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10317 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10319 * linux-low.c (linux_resume): Take a struct thread_resume *
10321 (linux_wait): Update call.
10322 (resume_ptr): New static variable.
10323 (linux_continue_one_thread): Renamed from
10324 linux_continue_one_process. Use resume_ptr.
10325 (linux_resume): Use linux_continue_one_thread.
10326 * server.c (handle_v_cont, handle_v_requests): New functions.
10327 (myresume): New function.
10328 (main): Handle 'v' case.
10329 * target.h (struct thread_resume): New type.
10330 (struct target_ops): Change argument of "resume" to struct
10332 (myresume): Delete macro.
10334 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10336 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10337 (uninstall): Support DESTDIR.
10339 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10341 * configure.srv: Add xscale*linux copy of arm*linux entry.
10343 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10345 * linux-arm-low.c (arm_reinsert_addr): New function.
10346 (the_low_target): Add arm_reinsert_addr.
10348 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10350 * mem-break.c: Remove whitespace at end of file.
10352 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10354 * configure.in: Check whether we need to prototype strerror.
10355 * server.h: Optionally prototype strerror.
10356 * gdbreplay.c (perror_with_name): Use strerror.
10357 * linux-low.c (linux_attach_lwp): Use strerror.
10358 * utils.c (perror_with_name): Use strerror.
10359 * config.in, configure: Regenerated.
10361 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10363 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10364 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10366 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10368 * Makefile.in (SFILES): Update.
10369 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10370 low-sun3.c: Remove files.
10372 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10374 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10375 (linux_detach_one_process, linux_detach): New functions.
10376 (linux_target_ops): Add linux_detach.
10377 * server.c (main): Handle 'D' packet.
10378 * target.h (struct target_ops): Add "detach" member.
10379 (detach_inferior): Define.
10381 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10383 From Kelley Cook <kelleycook@wideopenwest.com>:
10384 * configure.srv: Accept i[34567]86 variants.
10386 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10388 * linux-low.c (linux_wait_for_event): Correct comment typos.
10389 (linux_resume_one_process): Call check_removed_breakpoint.
10390 (linux_send_signal): New function.
10391 (linux_target_ops): Add linux_send_signal.
10392 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10394 * target.h (struct target_ops): Add send_signal.
10396 2003-05-29 Jim Blandy <jimb@redhat.com>
10398 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10399 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10400 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10401 away part of the register's value.
10403 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10405 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10406 (linux_wait_for_event, linux_init_signals): Likewise.
10408 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10410 * configure.in: Check for stdlib.h.
10411 * configure: Regenerated.
10412 * config.in: Regenerated.
10414 2003-01-04 Andreas Schwab <schwab@suse.de>
10416 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10418 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10420 * Makefile.in: Remove obsolete code.
10422 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10424 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10425 defined(PT_FPR0_HI).
10427 2002-11-17 Stuart Hughes <seh@zee2.com>
10429 * linux-arm-low.c (arm_num_regs): Increase.
10430 (arm_regmap): Include status register.
10432 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10434 * linux-low.c (register_addr): Remove incorrect -1 check.
10436 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10438 * linux-low.c (linux_create_inferior): Call setpgid. Return
10440 (unstopped_p, linux_signal_pid): Remove.
10441 (linux_target_ops): Remove linux_signal_pid.
10442 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10443 global instead of target method.
10444 * target.h (struct target_ops): Remove signal_pid. Update comment
10445 for create_inferior.
10446 * server.c (signal_pid): New variable.
10447 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10448 gdbserver. Set the child to be the foreground process group.
10449 (attach_inferior): Set signal_pid.
10451 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10453 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10455 2002-08-20 Jim Blandy <jimb@redhat.com>
10457 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10460 2002-08-01 Andrew Cagney <cagney@redhat.com>
10462 * Makefile.in: Make chill references obsolete.
10464 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10466 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10467 * configure: Regenerate.
10468 * config.in: Regenerate.
10470 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10472 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10473 (perror_with_name, remote_close, remote_open, expect, play): Static.
10475 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10477 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10478 byte offsets instead of an array of indexes.
10479 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10481 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10483 * regcache.c: Add comment.
10485 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10487 * thread-db.c: New file.
10488 * proc-service.c: New file.
10489 * acinclude.m4: New file.
10490 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10491 proc-service.o, and thread-db.o.
10492 (linux-low.o): Add USE_THREAD_DB.
10493 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10494 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10495 * aclocal.m4: Regenerated.
10496 * config.in: Regenerated.
10497 * configure: Regenerated.
10498 * configure.in: Check for proc_service.h, sys/procfs.h,
10499 thread_db.h, and linux/elf.h headrs.
10500 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10501 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10502 Check for -lthread_db and thread support.
10503 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10504 PowerPC, and SuperH.
10505 * i387-fp.c: Constify arguments.
10506 * i387-fp.h: Likewise.
10507 * inferiors.c: (struct thread_info): Renamed from
10508 `struct inferior_info'. Remove PID member. Use generic inferior
10509 list header. All uses updated.
10510 (inferiors, signal_pid): Removed.
10511 (all_threads): New variable.
10512 (get_thread): Define.
10513 (add_inferior_to_list): New function.
10514 (for_each_inferior): New function.
10515 (change_inferior_id): New function.
10516 (add_inferior): Removed.
10517 (remove_inferior): New function.
10518 (add_thread): New function.
10519 (free_one_thread): New function.
10520 (remove_thread): New function.
10521 (clear_inferiors): Use for_each_inferior and free_one_thread.
10522 (find_inferior): New function.
10523 (find_inferior_id): New function.
10524 (inferior_target_data): Update argument type.
10525 (set_inferior_target_data): Likewise.
10526 (inferior_regcache_data): Likewise.
10527 (set_inferior_regcache_data): Likewise.
10528 * linux-low.c (linux_bp_reinsert): Remove.
10529 (all_processes, stopping_threads, using_thrads)
10530 (struct pending_signals, debug_threads, pid_of): New.
10531 (inferior_pid): Replace with macro.
10532 (struct inferior_linux_data): Remove.
10533 (get_stop_pc, add_process): New functions.
10534 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10535 Use add_process and add_thread.
10536 (linux_attach_lwp): New function, based on old linux_attach. Use
10537 add_process and add_thread. Set stop_expected for new threads.
10538 (linux_attach): New function.
10539 (linux_kill_one_process): New function.
10540 (linux_kill): Kill all LWPs.
10541 (linux_thread_alive): Use find_inferior_id.
10542 (check_removed_breakpoints, status_pending_p): New functions.
10543 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10544 Update. Use WNOHANG. Wait for cloned processes also. Update process
10545 struct for the found process.
10546 (linux_wait_for_event): New function.
10547 (linux_wait): Use it. Support LWPs.
10548 (send_sigstop, wait_for_sigstop, stop_all_processes)
10549 (linux_resume_one_process, linux_continue_one_process): New functions.
10550 (linux_resume): Support LWPs.
10551 (REGISTER_RAW_SIZE): Remove.
10552 (fetch_register): Use register_size instead. Call supply_register.
10553 (usr_store_inferior_registers): Likewise. Call collect_register.
10554 Fix recursive case.
10555 (regsets_fetch_inferior_registers): Improve error message.
10556 (regsets_store_inferior_registers): Add debugging.
10557 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10558 (unstopped_p, linux_signal_pid): New functions.
10559 (linux_target_ops): Add linux_signal_pid.
10560 (linux_init_signals): New function.
10561 (initialize_low): Call it. Initialize using_threads.
10562 * regcache.c (inferior_regcache_data): Add valid
10564 (get_regcache): Fetch registers lazily. Add fetch argument
10565 and update all callers.
10566 (regcache_invalidate_one, regcache_invalidate): New
10568 (new_register_cache): Renamed from create_register_cache.
10569 Return the new regcache.
10570 (free_register_cache): Change argument to a void *.
10571 (registers_to_string, registers_from_string): Call get_regcache
10572 with fetch flag set.
10573 (register_data): Make static. Pass fetch flag to get_regcache.
10574 (supply_register): Call get_regcache with fetch flag clear.
10575 (collect_register): Call get_regcache with fetch flag set.
10576 (collect_register_as_string): New function.
10577 * regcache.h: Update.
10578 * remote-utils.c (putpkt): Flush after debug output and use
10580 Handle input interrupts while waiting for an ACK.
10581 (input_interrupt): Use signal_pid method.
10582 (getpkt): Flush after debug output and use stderr.
10583 (outreg): Use collect_register_as_string.
10584 (new_thread_notify, dead_thread_notify): New functions.
10585 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10586 and general_thread.
10587 (look_up_one_symbol): Flush after debug output.
10588 * server.c (step_thread, server_waiting): New variables.
10589 (start_inferior): Don't use signal_pid. Update call to mywait.
10590 (attach_inferior): Update call to mywait.
10591 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10592 (main): Don't fetch/store registers explicitly. Use
10593 set_desired_inferior. Support proposed ``Hs'' packet. Update
10595 * server.h: Update.
10596 (struct inferior_list, struct_inferior_list_entry): New.
10597 * target.c (set_desired_inferior): New.
10598 (write_inferior_memory): Constify.
10599 (mywait): New function.
10600 * target.h: Update.
10601 (struct target_ops): New signal_pid method.
10602 (mywait): Removed macro, added prototype.
10604 * linux-low.h (regset_func): Removed.
10605 (regset_fill_func, regset_store_func): New.
10606 (enum regset_type): New.
10607 (struct regset_info): Add type field. Use new operation types.
10608 (struct linux_target_ops): stop_pc renamed to get_pc.
10609 Add decr_pc_after_break and breakpoint_at.
10610 (get_process, get_thread_proess, get_process_thread)
10611 (strut process_info, all_processes, linux_attach_lwp)
10612 (thread_db_init): New.
10614 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10615 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10616 (the_low_target): Add new members.
10617 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10618 (i386_store_fpxregset): Constify.
10619 (target_regsets): Add new kind identifier.
10620 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10621 (i386_set_pc): Add debugging.
10622 (i386_breakpoint_at): New function.
10623 (the_low_target): Add new members.
10624 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10625 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10626 (mips_breakpoint_at): New.
10627 (the_low_target): Add new members.
10628 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10629 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10630 (the_low_target): Add new members.
10631 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10632 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10633 (the_low_target): Add new members.
10634 * linux-x86-64-low.c (target_regsets): Add new kind
10637 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10639 From Martin Pool <mbp@samba.org>:
10640 * server.c (gdbserver_usage): New function.
10643 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10645 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10646 stop_at -> stop_pc.
10648 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10650 * Makefile.in: Remove obsolete code.
10652 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10654 * linux-low.c (regsets_fetch_inferior_registers),
10655 (regsets_store_inferior_registers): Removed cast to int from
10657 * regcache.h: Added declaration of struct inferior_info.
10659 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10661 * inferiors.c (struct inferior_info): Add regcache_data.
10662 (add_inferior): Call create_register_cache.
10663 (clear_inferiors): Call free_register_cache.
10664 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10665 * regcache.c (struct inferior_regcache_data): New.
10666 (registers): Remove.
10667 (get_regcache): New function.
10668 (create_register_cache, free_register_cache): New functions.
10669 (set_register_cache): Don't initialize the register cache here.
10670 (registers_to_string, registers_from_string, register_data): Call
10672 * regcache.h: Add prototypes.
10673 * server.h: Likewise.
10675 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10677 * mem-break.c: New file.
10678 * mem-break.h: New file.
10679 * Makefile.in: Add mem-break.o rule; update server.h
10681 * inferiors.c (struct inferior_info): Add target_data
10683 (clear_inferiors): Free target_data member if set.
10684 (inferior_target_data, set_inferior_target_data): New functions.
10685 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10686 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10687 * linux-low.c (linux_bp_reinsert): New variable.
10688 (struct inferior_linux_data): New.
10689 (linux_create_inferior): Use set_inferior_target_data.
10690 (linux_attach): Likewise. Call add_inferior.
10691 (linux_wait_for_one_inferior): New function.
10692 (linux_wait): Call it.
10693 (linux_write_memory): Add const.
10694 (initialize_low): Call set_breakpoint_data.
10695 * linux-low.h (struct linux_target_ops): Add breakpoint
10697 * server.c (attach_inferior): Remove extra add_inferior
10699 * server.h: Include mem-break.h. Update inferior.c
10701 * target.c (read_inferior_memory)
10702 (write_inferior_memory): New functions.
10703 * target.h (read_inferior_memory)
10704 (write_inferior_memory): Change macros to prototypes.
10705 (struct target_ops): Update comments. Add const to write_memory
10708 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10710 * linux-low.c (usr_store_inferior_registers): Support
10711 registers which are allowed to fail to store.
10712 * linux-low.h (linux_target_ops): Likewise.
10713 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10714 (ppc_cannot_store_register): FPSCR may not be storable.
10716 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10718 * server.h: Include <string.h> if HAVE_STRING_H.
10719 * ChangeLog: Correct paths in last ChangeLog entry.
10721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10723 * linux-low.h: Remove obsolete prototypes.
10724 (struct linux_target_ops): New.
10725 (extern the_low_target): New.
10726 * linux-low.c (num_regs, regmap): Remove declarations.
10727 (register_addr): Use the_low_target explicitly.
10728 (fetch_register): Likewise.
10729 (usr_fetch_inferior_registers): Likewise.
10730 (usr_store_inferior_registers): Likewise.
10731 * linux-arm-low.c (num_regs): Remove.
10732 (arm_num_regs): Define.
10733 (arm_regmap): Renamed from regmap, made static.
10734 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10736 (arm_cannot_store_register): Renamed from cannot_store_register,
10738 (the_low_target): New.
10739 * linux-i386-low.c (num_regs): Remove.
10740 (i386_num_regs): Define.
10741 (i386_regmap): Renamed from regmap, made static.
10742 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10744 (i386_cannot_store_register): Renamed from cannot_store_register,
10746 (the_low_target): New.
10747 * linux-ia64-low.c (num_regs): Remove.
10748 (ia64_num_regs): Define.
10749 (ia64_regmap): Renamed from regmap, made static.
10750 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10752 (ia64_cannot_store_register): Renamed from cannot_store_register,
10754 (the_low_target): New.
10755 * linux-m68k-low.c (num_regs): Remove.
10756 (m68k_num_regs): Define.
10757 (m68k_regmap): Renamed from regmap, made static.
10758 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10760 (m68k_cannot_store_register): Renamed from cannot_store_register,
10762 (the_low_target): New.
10763 * linux-mips-low.c (num_regs): Remove.
10764 (mips_num_regs): Define.
10765 (mips_regmap): Renamed from regmap, made static.
10766 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10768 (mips_cannot_store_register): Renamed from cannot_store_register,
10770 (the_low_target): New.
10771 * linux-ppc-low.c (num_regs): Remove.
10772 (ppc_num_regs): Define.
10773 (ppc_regmap): Renamed from regmap, made static.
10774 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10776 (ppc_cannot_store_register): Renamed from cannot_store_register,
10778 (the_low_target): New.
10779 * linux-s390-low.c (num_regs): Remove.
10780 (s390_num_regs): Define.
10781 (s390_regmap): Renamed from regmap, made static.
10782 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10784 (s390_cannot_store_register): Renamed from cannot_store_register,
10786 (the_low_target): New.
10787 * linux-sh-low.c (num_regs): Remove.
10788 (sh_num_regs): Define.
10789 (sh_regmap): Renamed from regmap, made static.
10790 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10792 (sh_cannot_store_register): Renamed from cannot_store_register,
10794 (the_low_target): New.
10795 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10796 (the_low_target): New.
10798 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10800 * Makefile.in: Add stamp-h target.
10801 * configure.in: Create stamp-h.
10802 * configure: Regenerated.
10804 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10806 * inferiors.c: New file.
10807 * target.c: New file.
10808 * target.h: New file.
10809 * Makefile.in: Add target.o and inferiors.o. Update
10811 * linux-low.c (inferior_pid): New static variable,
10812 moved from server.c.
10813 (linux_create_inferior): Renamed from create_inferior.
10814 Call add_inferior. Return 0 on success instead of a PID.
10815 (linux_attach): Renamed from myattach.
10816 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10817 (linux_thread_alive): Renamed from mythread_alive.
10818 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10820 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10821 (regsets_store_inferior_registers): Correct error message.
10822 Add missing ``return 0''.
10823 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10824 (linux_store_registers): Renamed from store_inferior_registers.
10825 (linux_read_memory): Renamed from read_inferior_memory.
10826 (linux_write_memory): Renamed from write_inferior_memory.
10827 (linux_target_ops): New structure.
10828 (initialize_low): Call set_target_ops ().
10829 * remote-utils.c (unhexify): New function.
10830 (hexify): New function.
10831 (input_interrupt): Send signals to ``signal_pid''.
10832 * server.c (inferior_pid): Remove.
10833 (start_inferior): Update create_inferior call.
10834 (attach_inferior): Call add_inferior.
10835 (handle_query): New function.
10836 (main): Call handle_query for `q' packets.
10837 * server.h: Include "target.h". Remove obsolete prototypes.
10838 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10840 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10842 * Makefile.in: Add WARN_CFLAGS. Update configury
10844 * configure.in: Check for <string.h>
10845 * configure: Regenerate.
10846 * config.in: Regenerate.
10847 * gdbreplay.c: Include needed system headers.
10848 (remote_open): Remove strchr prototype.
10849 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10850 * regcache.c (supply_register): Change buf argument to const void *.
10851 (supply_register_by_name): Likewise.
10852 (collect_register): Change buf argument to void *.
10853 (collect_register_by_name): Likewise.
10854 * regcache.h: Add missing prototypes.
10855 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10856 * server.c (handle_query): New function.
10857 (attached): New static variable, moved out of main.
10858 (main): Quiet longjmp clobber warnings.
10859 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10860 * utils.c (error): Remove NORETURN.