1 2015-03-24 Gary Benson <gbenson@redhat.com>
3 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4 (x86_linux_dr_set): Likewise.
5 (update_debug_registers_callback): Likewise.
6 (x86_linux_dr_set_addr): Likewise.
7 (x86_linux_dr_get_addr): Likewise.
8 (x86_linux_dr_set_control): Likewise.
9 (x86_linux_dr_get_control): Likewise.
10 (x86_linux_dr_get_status): Likewise.
11 (x86_linux_prepare_to_resume): Likewise.
13 2015-03-24 Gary Benson <gbenson@redhat.com>
15 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
16 Use perror_with_name. Pass string through gettext.
17 (x86_linux_dr_set): Likewise.
19 2015-03-24 Gary Benson <gbenson@redhat.com>
21 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
22 (x86_linux_dr_set_addr): ...this.
23 (x86_dr_low_get_addr): Rename to...
24 (x86_linux_dr_get_addr): ...this.
25 (x86_dr_low_set_control): Rename to...
26 (x86_linux_dr_set_control): ...this.
27 (x86_dr_low_get_control): Rename to...
28 (x86_linux_dr_get_control): ...this.
29 (x86_dr_low_get_status): Rename to...
30 (x86_linux_dr_get_status): ...this.
31 (x86_dr_low): Update with new function names.
33 2015-03-24 Gary Benson <gbenson@redhat.com>
35 * Makefile.in (x86-linux.o): New rule.
36 * configure.srv: Add x86-linux.o to relevant targets.
37 * linux-low.c (lwp_set_arch_private_info): New function.
38 (lwp_arch_private_info): Likewise.
39 * linux-x86-low.c: Include nat/x86-linux.h.
40 (arch_lwp_info): Removed structure.
41 (update_debug_registers_callback):
42 Use lwp_set_debug_registers_changed.
43 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
44 and lwp_set_debug_registers_changed.
45 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
47 2015-03-24 Gary Benson <gbenson@redhat.com>
49 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
50 * linux-arm-low.c (arm_new_thread): Likewise.
51 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
52 * linux-mips-low.c (mips_linux_new_thread): Likewise.
53 * linux-x86-low.c (x86_linux_new_thread): Likewise.
54 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
56 2015-03-24 Gary Benson <gbenson@redhat.com>
58 * linux-low.c (ptid_of_lwp): New function.
59 (lwp_is_stopped): Likewise.
60 (lwp_stop_reason): Likewise.
61 * linux-x86-low.c (update_debug_registers_callback):
63 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
66 2015-03-24 Gary Benson <gbenson@redhat.com>
68 * linux-low.h (linux_stop_lwp): Remove declaration.
70 2015-03-24 Gary Benson <gbenson@redhat.com>
72 * linux-low.h: Include nat/linux-nat.h.
73 * linux-low.c (iterate_over_lwps_args): New structure.
74 (iterate_over_lwps_filter): New function.
75 (iterate_over_lwps): Likewise.
76 * linux-x86-low.c (update_debug_registers_callback):
77 Update signature to what iterate_over_lwps expects.
78 Remove PID check that iterate_over_lwps now performs.
79 (x86_dr_low_set_addr): Use iterate_over_lwps.
80 (x86_dr_low_set_control): Likewise.
82 2015-03-24 Gary Benson <gbenson@redhat.com>
84 * linux-x86-low.c (x86_debug_reg_state): New function.
85 (x86_linux_prepare_to_resume): Use the above.
87 2015-03-24 Gary Benson <gbenson@redhat.com>
89 * linux-low.c (current_lwp_ptid): New function.
90 * linux-x86-low.c: Include nat/linux-nat.h.
91 (x86_dr_low_get_addr): Use current_lwp_ptid.
92 (x86_dr_low_get_control): Likewise.
93 (x86_dr_low_get_status): Likewise.
95 2015-03-20 Pedro Alves <palves@redhat.com>
97 * tracepoint.c (cmd_qtstatus): Make "str" const.
99 2015-03-20 Pedro Alves <palves@redhat.com>
101 * server.c (handle_general_set): Make "req_str" const.
103 2015-03-19 Pedro Alves <palves@redhat.com>
105 * linux-low.c (linux_resume_one_lwp): Rename to ...
106 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
107 instead call perror_with_name.
108 (check_ptrace_stopped_lwp_gone): New function.
109 (linux_resume_one_lwp): Reimplement as wrapper around
110 linux_resume_one_lwp_throw that swallows errors if the LWP is
113 2015-03-19 Pedro Alves <palves@redhat.com>
115 * linux-low.c (count_events_callback, select_event_lwp_callback):
116 No longer check whether the thread has resume_stop as last resume
119 2015-03-19 Pedro Alves <palves@redhat.com>
121 * linux-low.c (count_events_callback, select_event_lwp_callback):
122 Use the lwp's status_pending_p field, not the thread's.
124 2015-03-19 Pedro Alves <palves@redhat.com>
126 * linux-low.c (select_event_lwp_callback): Update comments to
127 no longer mention SIGTRAP.
129 2015-03-18 Gary Benson <gbenson@redhat.com>
131 * server.c (handle_query): Do not report vFile:fstat as supported.
133 2015-03-11 Gary Benson <gbenson@redhat.com>
135 * hostio.c (sys/types.h): New include.
136 (sys/stat.h): Likewise.
137 (common-remote-fileio.h): Likewise.
138 (handle_fstat): New function.
139 (handle_vFile): Handle vFile:fstat packets.
141 2015-03-11 Gary Benson <gbenson@redhat.com>
143 * configure.ac (AC_CHECK_MEMBERS): Add checks for
144 struct stat.st_blocks and struct stat.st_blksize.
145 * configure: Regenerate.
146 * config.in: Likewise.
147 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
148 (OBS): Add common-remote-fileio.o.
149 (common-remote-fileio.o): New rule.
151 2015-03-09 Pedro Alves <palves@redhat.com>
153 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
154 'struct sockaddr' pointer in 'accept' call.
156 2015-03-09 Pedro Alves <palves@redhat.com>
159 2015-03-07 Pedro Alves <palves@redhat.com>
160 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
161 or <winsock2.h> here. Instead include "gdb_socket.h".
162 (remote_open): Use union gdb_sockaddr_u.
163 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
164 or <winsock2.h> here. Instead include "gdb_socket.h".
165 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
166 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
168 (init_named_socket, gdb_agent_helper_thread): Use union
171 2015-03-07 Pedro Alves <palves@redhat.com>
173 * configure.ac (build_warnings): Move
174 -Wdeclaration-after-statement to the C-specific set.
175 * configure: Regenerate.
177 2015-03-07 Pedro Alves <palves@redhat.com>
179 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
180 or <winsock2.h> here. Instead include "gdb_socket.h".
181 (remote_open): Use union gdb_sockaddr_u.
182 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
183 or <winsock2.h> here. Instead include "gdb_socket.h".
184 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
185 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
187 (init_named_socket, gdb_agent_helper_thread): Use union
190 2015-03-07 Pedro Alves <palves@redhat.com>
192 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
195 2015-03-06 Yao Qi <yao.qi@linaro.org>
197 * linux-aarch64-low.c (aarch64_insert_point): Use
198 show_debug_regs as a boolean.
199 (aarch64_remove_point): Likewise.
201 2015-03-05 Pedro Alves <palves@redhat.com>
203 * lynx-low.c (lynx_target_ops): Install NULL hooks for
204 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
205 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
206 * nto-low.c (nto_target_ops): Likewise.
207 * spu-low.c (spu_target_ops): Likewise.
208 * win32-low.c (win32_target_ops): Likewise.
210 2015-03-04 Pedro Alves <palves@redhat.com>
212 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
213 Decide whether a breakpoint triggered based on the SIGTRAP's
215 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
216 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
217 (linux_low_filter_event): Check for breakpoints before checking
219 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
221 (linux_stopped_by_sw_breakpoint)
222 (linux_supports_stopped_by_sw_breakpoint)
223 (linux_stopped_by_hw_breakpoint)
224 (linux_supports_stopped_by_hw_breakpoint): New functions.
225 (linux_target_ops): Install new target methods.
227 2015-03-04 Pedro Alves <palves@redhat.com>
229 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
230 * server.c (swbreak_feature, hwbreak_feature): New globals.
231 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
232 (captured_main): Clear swbreak_feature and hwbreak_feature.
233 * server.h (swbreak_feature, hwbreak_feature): Declare.
234 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
235 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
236 supports_stopped_by_hw_breakpoint>: New fields.
237 (target_supports_stopped_by_sw_breakpoint)
238 (target_stopped_by_sw_breakpoint)
239 (target_supports_stopped_by_hw_breakpoint)
240 (target_stopped_by_hw_breakpoint): Declare.
242 2015-03-04 Pedro Alves <palves@redhat.com>
244 enum lwp_stop_reason -> enum target_stop_reason
245 * linux-low.c (check_stopped_by_breakpoint): Adjust.
246 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
247 (linux_wait_1, stuck_in_jump_pad_callback)
248 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
249 (linux_stopped_by_watchpoint):
250 * linux-low.h (enum lwp_stop_reason): Delete.
251 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
252 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
254 2015-03-04 Yao Qi <yao.qi@linaro.org>
256 * Makefile.in (SFILES): Add linux-aarch64-low.c.
258 2015-03-03 Gary Benson <gbenson@redhat.com>
260 * hostio.c (handle_vFile): Fix prefix lengths.
262 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
264 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
267 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
269 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
270 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
271 (clean): Add "rm -f" for above C files.
272 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
273 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
274 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
275 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
276 * linux-s390-low.c (HWCAP_S390_VX): New macro.
277 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
278 (init_registers_s390x_vx_linux64)
279 (init_registers_s390x_tevx_linux64)
280 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
281 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
283 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
284 (s390_store_vxrs_high): New functions.
285 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
287 (s390_arch_setup): Add logic for selecting one of the new target
288 descriptions. Activate the new vector regsets if applicable.
289 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
290 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
291 and init_registers_s390x_tevx_linux64.
293 2015-03-01 Pedro Alves <palves@redhat.com>
295 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
298 2015-02-27 Pedro Alves <palves@redhat.com>
300 * linux-x86-low.c (u_debugreg_offset): New function.
301 (x86_linux_dr_get, x86_linux_dr_set): Use it.
303 2015-02-27 Pedro Alves <palves@redhat.com>
305 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
306 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
307 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
308 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
309 (ps_lsetfpregs, ps_getpid)
310 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
311 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
312 (ps_lsetxregs, ps_plog): Declare.
314 2015-02-27 Pedro Alves <palves@redhat.com>
316 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
317 IP_AGENT_EXPORT_FUNC.
318 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
319 IP_AGENT_EXPORT_FUNC.
320 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
321 (IP_AGENT_EXPORT): Delete.
322 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
323 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
324 (gdb_trampoline_buffer_error, collecting, gdb_collect)
325 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
326 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
327 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
328 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
329 (traceframe_read_count, traceframe_write_count)
330 (traceframes_created, trace_state_variables, get_raw_reg)
331 (get_trace_state_variable_value, set_trace_state_variable_value)
332 (ust_loaded, helper_thread_id, cmd_buf): Use
333 IPA_SYM_EXPORTED_NAME.
334 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
335 (tracepoints) Use IP_AGENT_EXPORT_VAR.
336 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
337 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
338 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
339 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
340 EXTERN_C_PUSH/EXTERN_C_POP.
341 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
342 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
343 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
344 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
345 (traceframe_write_count, traceframe_read_count)
346 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
347 (about_to_request_buffer_space, get_trace_state_variable_value)
348 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
349 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
350 EXTERN_C_PUSH/EXTERN_C_POP.
351 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
352 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
353 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
354 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
355 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
356 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
357 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
358 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
360 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
361 (IP_AGENT_EXPORT_VAR_DECL): Define.
363 (gdb_agent_get_raw_reg): Declare.
365 2015-02-27 Tom Tromey <tromey@redhat.com>
366 Pedro Alves <palves@redhat.com>
368 Rename symbols whose names are reserved C++ keywords throughout.
370 2015-02-27 Pedro Alves <palves@redhat.com>
372 * Makefile.in (COMPILER): New, get it from autoconf.
373 (CXX): Get from autoconf instead.
374 (COMPILE.pre): Use COMPILER.
375 (CC-LD): Rename to ...
376 (CC_LD): ... this. Use COMPILER.
377 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
378 (CXX_FOR_TARGET): Default to g++ instead of gcc.
379 * acinclude.m4: Include build-with-cxx.m4.
380 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
381 Disable -Werror by default if building in C++ mode.
382 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
383 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
384 the C++ compiler. Save/restore CXXFLAGS too.
385 * configure: Regenerate.
387 2015-02-27 Pedro Alves <palves@redhat.com>
389 * acinclude.m4: Include libiberty.m4.
390 * configure.ac: Call libiberty_INIT.
391 * config.in, configure: Regenerate.
393 2015-02-26 Pedro Alves <palves@redhat.com>
395 * linux-low.c (linux_wait_1): When incrementing the PC past a
396 program breakpoint always use the_low_target.breakpoint_len as
397 increment, rather than the maximum between that and
398 the_low_target.decr_pc_after_break.
400 2015-02-23 Pedro Alves <palves@redhat.com>
402 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
403 thread was doing a step-over; always adjust the PC if
404 we stepped over a permanent breakpoint.
405 (linux_wait_1): If we stepped over breakpoint that was on top of a
406 permanent breakpoint, manually advance the PC past it.
408 2015-02-23 Pedro Alves <palves@redhat.com>
410 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
412 (x86_fill_gregset, x86_store_gregset): Use it when handling
415 2015-02-20 Pedro Alves <palves@redhat.com>
417 * thread-db.c: Include "nat/linux-procfs.h".
418 (thread_db_init): Skip listing new threads if the kernel supports
419 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
421 2015-02-20 Pedro Alves <palves@redhat.com>
423 * linux-low.c (status_pending_p_callback): Use ptid_match.
425 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
428 * linux-low.c (wstatus_maybe_breakpoint): Remove.
429 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
430 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
432 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
435 * tracepoint.c (cmd_qtinit): Add check for current_thread.
437 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
439 * linux-low.c (linux_low_btrace_conf): Print size.
440 * server.c (handle_btrace_conf_general_set): New.
441 (hanle_general_set): Call handle_btrace_conf_general_set.
442 (handle_query): Report Qbtrace-conf:bts:size as supported.
444 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
446 * linux-low.c (linux_low_enable_btrace): Update parameters.
447 (linux_low_btrace_conf): New.
448 (linux_target_ops)<to_btrace_conf>: Initialize.
449 * server.c (current_btrace_conf): New.
450 (handle_btrace_enable): Rename to ...
451 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
452 to target_enable_btrace. Update comment. Update users.
453 (handle_qxfer_btrace_conf): New.
454 (qxfer_packets): Add btrace-conf entry.
455 (handle_query): Report qXfer:btrace-conf:read as supported packet.
456 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
457 (target_ops)<read_btrace_conf>: New.
458 (target_enable_btrace): Update parameters.
459 (target_read_btrace_conf): New.
461 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
463 * server.c (handle_btrace_general_set): Remove call to
464 target_supports_btrace.
465 (supported_btrace_packets): New.
466 (handle_query): Call supported_btrace_packets.
467 * target.h: include btrace-common.h.
468 (btrace_target_info): Removed.
469 (supports_btrace, target_supports_btrace): Update parameters.
471 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
473 * Makefile.in (SFILES): Add common/btrace-common.c.
474 (OBS): Add common/btrace-common.o.
475 (btrace-common.o): Add build rules.
476 * linux-low: Include btrace-common.h.
477 (linux_low_read_btrace): Use struct btrace_data. Call
478 btrace_data_init and btrace_data_fini.
480 2015-02-06 Pedro Alves <palves@redhat.com>
482 * thread-db.c (find_new_threads_callback): Add debug output.
484 2015-02-04 Pedro Alves <palves@redhat.com>
486 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
487 (resume_stopped_resumed_lwps): New function.
488 (linux_wait_for_event_filtered): Use it.
490 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
492 * Makefile.in (SFILES): Add linux-personality.c.
493 (linux-personality.o): New rule.
494 * configure.srv (srv_linux_obj): Add linux-personality.o to the
495 list of objects to be built.
496 * linux-low.c: Include nat/linux-personality.h.
497 (linux_create_inferior): Remove code to disable address space
498 randomization (moved to ../nat/linux-personality.c). Create
499 cleanup to disable address space randomization.
501 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
503 * Makefile.in (posix-strerror.o): New rule.
504 (mingw-strerror.o): Likewise.
505 * configure: Regenerated.
506 * configure.ac: Source file ../common/common.host. Initialize new
507 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
509 2015-01-14 Yao Qi <yao@codesourcery.com>
511 * Makefile.in (SFILES): Add nat/ppc-linux.c.
512 (ppc-linux.o): New rule.
513 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
514 * configure.ac: AC_CHECK_FUNCS(getauxval).
515 * config.in: Re-generated.
516 * configure: Re-generated.
517 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
518 ppc64_64bit_inferior_p
520 2015-01-14 Yao Qi <yao@codesourcery.com>
522 * linux-ppc-low.c: Include "nat/ppc-linux.h".
523 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
524 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
525 (PT_ORIG_R3, PT_TRAP): Likewise.
526 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
527 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
528 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
530 2015-01-10 Joel Brobecker <brobecker@adacore.com>
532 * i387-fp.c (i387_cache_to_xsave): In look over
533 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
534 zmmh_low_space field by use of zmmh_high_space.
536 2015-01-09 Pedro Alves <palves@redhat.com>
538 * linux-low.c (step_over_bkpt): Move higher up in the file.
539 (handle_extended_wait): Don't store the stop_pc here.
540 (get_stop_pc): Adjust comments and rename to ...
541 (check_stopped_by_breakpoint): ... this. Record whether the LWP
542 stopped for a software breakpoint or hardware breakpoint.
543 (thread_still_has_status_pending_p): New function.
544 (status_pending_p_callback): Use
545 thread_still_has_status_pending_p. If the event is no longer
546 interesting, resume the LWP.
547 (handle_tracepoints): Add assert.
548 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
549 (wstatus_maybe_breakpoint): New function.
550 (cancel_breakpoint): Delete function.
551 (check_stopped_by_watchpoint): New function, factored out from
552 linux_low_filter_event.
553 (lp_status_maybe_breakpoint): Delete function.
554 (linux_low_filter_event): Remove filter_ptid argument.
555 Leave thread group exits pending here. Store the LWP's stop PC.
556 Always leave events pending.
557 (linux_wait_for_event_filtered): Pull all events out of the
558 kernel, and leave them all pending.
559 (count_events_callback, select_event_lwp_callback): Consider all
561 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
562 (select_event_lwp): Only give preference to the stepping LWP in
563 all-stop mode. Adjust comments.
564 (ignore_event): New function.
565 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
566 references to cancel_breakpoints. Adjust to renames. Also give
567 equal priority to all LWPs that have had events in non-stop mode.
568 If reporting a software breakpoint event, unadjust the LWP's PC.
569 (linux_wait): If linux_wait_1 returned an ignored event, retry.
570 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
572 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
573 (resume_status_pending_p): Use thread_still_has_status_pending_p.
574 (linux_stopped_by_watchpoint): Adjust.
575 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
576 * linux-low.h (enum lwp_stop_reason): New.
577 (struct lwp_info) <stop_pc>: Adjust comment.
578 <stopped_by_watchpoint>: Delete field.
579 <stop_reason>: New field.
580 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
581 * mem-break.c (software_breakpoint_inserted_here)
582 (hardware_breakpoint_inserted_here): New function.
583 * mem-break.h (software_breakpoint_inserted_here)
584 (hardware_breakpoint_inserted_here): Declare.
585 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
586 (cancel_breakpoints): Delete.
587 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
588 (upload_fast_traceframes): Remove references to
591 2015-01-09 Pedro Alves <palves@redhat.com>
593 * thread-db.c (find_new_threads_callback): Ignore thread if the
594 kernel thread ID is -1.
596 2015-01-09 Pedro Alves <palves@redhat.com>
598 * linux-low.c (linux_attach_fail_reason_string): Move to
599 nat/linux-ptrace.c, and rename.
600 (linux_attach_lwp): Update comment.
601 (attach_proc_task_lwp_callback): New function.
602 (linux_attach): Adjust to rename and use
603 linux_proc_attach_tgid_threads.
604 (linux_attach_fail_reason_string): Delete declaration.
606 2015-01-01 Joel Brobecker <brobecker@adacore.com>
608 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
609 * server.c (gdbserver_version): Likewise.
611 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
613 * remote-utils.c: Include ctype.h.
614 (input_interrupt): Explicitly handle the case when the char
615 received is the NUL byte. Improve the printing of non-ASCII
618 2014-12-16 Joel Brobecker <brobecker@adacore.com>
620 * linux-low.c (linux_low_filter_event): Update call to
621 linux_enable_event_reporting following the addition of
622 a new parameter to that function.
624 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
627 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
628 (AARCH64_FPCR_REGNO): Likewise.
629 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
630 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
631 (aarch64_store_fpregset): Likewise.
633 2014-12-15 Joel Brobecker <brobecker@adacore.com>
635 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
636 Remove FIXME comment about assumption about N.
638 2014-12-13 Joel Brobecker <brobecker@adacore.com>
640 * configure.ac: If large-file support is disabled in GDBserver,
641 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
642 * configure: Regenerate.
644 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
646 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
647 warning upon ENODATA from ptrace.
648 * linux-s390-low.c (s390_store_tdb): New.
649 (s390_regsets): Add regset for NT_S390_TDB.
651 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
653 * linux-low.c (regsets_store_inferior_registers): Skip regsets
654 without a fill_function.
655 * linux-s390-low.c (s390_fill_last_break): Remove.
656 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
657 (s390_arch_setup): Use regset's size instead of fill_function for
660 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
662 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
663 the regset's store function when ptrace returned an error.
664 * regcache.c (get_thread_regcache): Invalidate register cache
665 before fetching inferior's registers.
667 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
669 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
670 while-loop as for-loop.
671 (regsets_store_inferior_registers): Likewise.
673 2014-11-28 Yao Qi <yao@codesourcery.com>
675 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
676 * config.in, configure: Re-generate.
677 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
680 2014-11-21 Yao Qi <yao@codesourcery.com>
682 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
683 (AC_CHECK_HEADERS): Remove malloc.h.
684 * configure: Re-generated.
685 * config.in: Re-generated.
686 * server.h: Don't include alloca.h and malloc.h.
687 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
688 Don't include malloc.h.
690 2014-11-17 Joel Brobecker <brobecker@adacore.com>
692 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
693 corresponding ERRNO check in same block.
695 2014-11-12 Pedro Alves <palves@redhat.com>
697 * server.c (cont_thread): Update comment.
698 (start_inferior, attach_inferior): No longer clear cont_thread.
699 (handle_v_cont): No longer set cont_thread.
700 (captured_main): Clear cont_thread each time a GDB connects.
702 2014-11-12 Pedro Alves <palves@redhat.com>
704 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
705 thread, and don't resume all threads if the Hc thread has exited.
707 2014-11-12 Pedro Alves <palves@redhat.com>
709 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
710 the process group instead of to a specific LWP.
712 2014-10-15 Pedro Alves <palves@redhat.com>
715 * win32-arm-low.c (arm_set_thread_context): Remove current_event
717 (arm_set_thread_context): Delete.
718 (the_low_target): Adjust.
719 * win32-i386-low.c (debug_registers_changed)
720 (debug_registers_used): Delete.
721 (update_debug_registers_callback): New function.
722 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
723 needing to update their debug registers.
724 (win32_get_current_dr): New function.
725 (x86_dr_low_get_addr, x86_dr_low_get_control)
726 (x86_dr_low_get_status): Fetch the debug register from the thread
728 (i386_initial_stuff): Adjust.
729 (i386_get_thread_context): Remove current_event parameter. Don't
730 clear debug_registers_changed nor copy DR values to
732 (i386_set_thread_context): Delete.
733 (i386_prepare_to_resume): New function.
734 (i386_thread_added): Mark the thread as needing to update irs
736 (the_low_target): Remove i386_set_thread_context and install
737 i386_prepare_to_resume.
738 * win32-low.c (win32_get_thread_context): Adjust.
739 (win32_set_thread_context): Use SetThreadContext
741 (win32_prepare_to_resume): New function.
742 (win32_require_context): New function, factored out from ...
743 (thread_rec): ... this.
744 (continue_one_thread): Call win32_prepare_to_resume on each thread
745 we're about to continue.
746 (win32_resume): Call win32_prepare_to_resume on the event thread.
747 * win32-low.h (struct win32_thread_info)
748 <debug_registers_changed>: New field.
749 (struct win32_target_ops): Change prototype of set_thread_context,
750 delete set_thread_context and add prepare_to_resume.
751 (win32_require_context): New declaration.
753 2014-10-08 Gary Benson <gbenson@redhat.com>
755 * server.h: Do not include common-exceptions.h.
757 2014-10-08 Gary Benson <gbenson@redhat.com>
759 * server.h: Do not include cleanups.h.
761 2014-09-30 James Hogan <james.hogan@imgtec.com>
763 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
766 2014-09-23 Yao Qi <yao@codesourcery.com>
768 * linux-low.c (lp_status_maybe_breakpoint): New function.
769 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
770 (count_events_callback): Likewise.
771 (select_event_lwp_callback): Likewise.
772 (cancel_breakpoints_callback): Likewise.
774 2014-09-19 Don Breazeal <donb@codesourcery.com>
776 * linux-low.c (handle_extended_wait): Call
777 linux_ptrace_get_extended_event.
778 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
779 linux_is_extended_waitstatus.
781 2014-09-16 Joel Brobecker <brobecker@adacore.com>
783 * Makefile.in (CPPFLAGS): Define.
784 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
785 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
787 2014-09-16 Gary Benson <gbenson@redhat.com>
789 * inferiors.h (current_inferior): Renamed as...
790 (current_thread): New variable. All uses updated.
791 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
792 (maybe_move_out_of_jump_pad): Likewise.
793 (cancel_breakpoint): Likewise.
794 (linux_low_filter_event): Likewise.
795 (wait_for_sigstop): Likewise.
796 (linux_resume_one_lwp): Likewise.
797 (need_step_over_p): Likewise.
798 (start_step_over): Likewise.
799 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
800 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
801 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
802 and save_inferior as saved_thread.
803 * regcache.c (get_thread_regcache): Renamed saved_inferior as
805 (regcache_invalidate_thread): Likewise.
806 * remote-utils.c (prepare_resume_reply): Likewise.
807 * thread-db.c (thread_db_get_tls_address): Likewise.
808 (disable_thread_event_reporting): Likewise.
809 (remove_thread_event_breakpoints): Likewise.
810 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
812 * target.h (set_desired_inferior): Renamed as...
813 (set_desired_thread): New declaration. All uses updated.
814 * server.c (myresume): Updated comment to reference thread instead
816 (handle_serial_event): Likewise.
817 (handle_target_event): Likewise.
819 2014-09-12 Tom Tromey <tromey@redhat.com>
820 Gary Benson <gbenson@redhat.com>
822 * regcache.h: Include common-regcache.h.
823 (regcache_read_pc): Don't declare.
824 * regcache.c (get_thread_regcache_for_ptid): New function.
826 2014-09-11 Tom Tromey <tromey@redhat.com>
827 Gary Benson <gbenson@redhat.com>
829 * symbol.c: New file.
830 * Makefile.in (SFILES): Add symbol.c.
833 2014-09-11 Gary Benson <gbenson@redhat.com>
835 * target.c (target_stop_ptid, target_continue_ptid): New
838 2014-09-11 Tom Tromey <tromey@redhat.com>
839 Gary Benson <gbenson@redhat.com>
841 * target.h: Include target/target.h.
842 * target.c (target_read_memory, target_read_uint32)
843 (target_write_memory): New functions.
845 2014-09-11 Gary Benson <gbenson@redhat.com>
847 * server.h (debug_hw_points): Don't declare.
848 * server.c (debug_hw_points): Don't define. Replace all uses
849 with show_debug_regs.
850 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
851 all uses with show_debug_regs.
853 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
855 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
856 endianness into account.
857 (ppc_supply_ptrace_register): Likewise.
859 2014-09-03 James Hogan <james.hogan@imgtec.com>
861 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
862 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
864 2014-09-03 Gary Benson <gbenson@redhat.com>
866 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
867 ALL_DEBUG_ADDRESS_REGISTERS.
869 2014-09-02 Gary Benson <gbenson@redhat.com>
871 * i386-low.h: Renamed as...
872 * x86-low.h: New file. All type, function and variable name
873 prefixes changed from "i386_" to "x86_". All references updated.
874 * i386-low.c: Renamed as...
875 * x86-low.c: New file. All type, function and variable name
876 prefixes changed from "i386_" to "x86_". All references updated.
878 2014-09-02 Gary Benson <gbenson@redhat.com>
880 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
881 (x86_linux_new_thread): Likewise.
883 2014-08-29 Gary Benson <gbenson@redhat.com>
885 * server.h (setjmp.h): Do not include.
886 (toplevel): Do not declare.
887 (common-exceptions.h): Include.
888 (cleanups.h): Likewise.
889 * server.c (toplevel): Do not define.
890 (exit_code): New static global.
891 (detach_or_kill_for_exit_cleanup): New function.
892 (main): New function. Original main renamed to...
893 (captured_main): New function.
894 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
896 2014-08-29 Gary Benson <gbenson@redhat.com>
898 * Makefile.in (SFILES): Add common/common-exceptions.c.
899 (OBS): Add common-exceptions.o.
900 (common-exceptions.o): New rule.
901 * utils.c (prepare_to_throw_exception): New function.
903 2014-08-29 Gary Benson <gbenson@redhat.com>
905 * config.in: Regenerate.
906 * configure: Likewise.
908 2014-08-29 Gary Benson <gbenson@redhat.com>
910 * Makefile.in (SFILES): Add common/cleanups.c.
912 (cleanups.o): New rule.
914 2014-08-29 Gary Benson <gbenson@redhat.com>
916 * utils.c (internal_vwarning): New function.
918 2014-08-28 Gary Benson <gbenson@redhat.com>
920 * utils.h (fatal): Remove declaration.
921 * utils.c (fatal): Remove function.
923 2014-08-28 Gary Benson <gbenson@redhat.com>
925 * tracepoint.c (gdb_agent_init): Replace fatal with
927 (initialize_tracepoint): Likewise.
929 2014-08-28 Gary Benson <gbenson@redhat.com>
931 * remote-utils.c (remote_prepare): Replace fatal with error.
933 2014-08-28 Gary Benson <gbenson@redhat.com>
935 * linux-low.c (linux_async): Replace fatal with warning.
937 (linux_start_non_stop): Return -1 if linux_async failed.
939 2014-08-28 Gary Benson <gbenson@redhat.com>
941 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
943 (i386_dr_low_get_addr): Remove vague comment.
944 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
947 2014-08-28 Gary Benson <gbenson@redhat.com>
949 * inferiors.c (get_thread_process): Replace check with gdb_assert.
950 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
952 (linux_resume_one_lwp): Likewise.
953 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
955 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
957 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
958 (init_register_cache): Replace fatal with gdb_assert_not_reached.
959 (find_register_by_name): Replace fatal with internal_error.
960 (find_regno): Likewise.
961 * tdesc.c (init_target_desc): Replace check with gdb_assert.
962 * thread-db.c (thread_db_create_event): Likewise.
963 (thread_db_load_search): Likewise.
964 (try_thread_db_load_1): Likewise.
965 * tracepoint.c (get_jump_space_head): Replace fatal with
967 (claim_trampoline_space): Likewise.
968 (have_fast_tracepoint_trampoline_buffer): Likewise.
969 (cmd_qtstart): Likewise.
970 (stop_tracing): Likewise.
971 (fast_tracepoint_collecting): Likewise.
972 (target_malloc): Likewise.
973 (download_tracepoint): Likewise.
974 (download_trace_state_variables): Replace check with gdb_assert.
975 (upload_fast_traceframes): Replace fatal with internal_error.
977 2014-08-19 Tom Tromey <tromey@redhat.com>
978 Gary Benson <gbenson@redhat.com>
980 * Makefile.in (SFILES): Add common/common-debug.c.
981 (OBS): Add common-debug.o.
982 (common-debug.o): New rule.
983 * debug.h (debug_printf): Don't declare.
984 * debug.c (debug_printf): Renamed and rewritten as...
985 (debug_vprintf): New function.
987 2014-08-19 Gary Benson <gbenson@redhat.com>
989 * utils.h: Do not include print-utils.h.
991 2014-08-19 Tom Tromey <tromey@redhat.com>
992 Gary Benson <gbenson@redhat.com>
994 * server.h: Add static assertion.
995 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
997 2014-08-19 Tom Tromey <tromey@redhat.com>
998 Gary Benson <gbenson@redhat.com>
1000 * Makefile.in (SFILES): Add common/errors.c.
1001 (OBS): Add errors.o.
1002 (IPA_OBS): Add errors-ipa.o.
1003 (errors.o): New rule.
1004 (errors-ipa.o): Likewise.
1005 * utils.h (perror_with_name, error, warning): Don't declare.
1006 * utils.c (warning): Renamed and rewritten as...
1007 (vwarning): New function.
1008 (error): Renamed and rewritten as...
1009 (verror): New function.
1010 (internal_error): Renamed and rewritten as...
1011 (internal_verror): New function.
1013 2014-08-07 Gary Benson <gbenson@redhat.com>
1015 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1016 * configure: Regenerate.
1017 * config.in: Likewise.
1018 * server.h: Do not include errno.h.
1019 * event-loop.c: Likewise.
1020 * hostio-errno.c: Likewise.
1021 * linux-low.c: Likewise.
1022 * remote-utils.c: Likewise.
1023 * spu-low.c: Likewise.
1024 * utils.c: Likewise.
1025 * gdbreplay.c: Unconditionally include errno.h.
1027 2014-08-07 Gary Benson <gbenson@redhat.com>
1029 * server.h: Do not include string.h.
1030 * event-loop.c: Likewise.
1031 * linux-low.c: Likewise.
1032 * regcache.c: Likewise.
1033 * remote-utils.c: Likewise.
1034 * spu-low.c: Likewise.
1035 * utils.c: Likewise.
1037 2014-08-07 Gary Benson <gbenson@redhat.com>
1039 * server.h: Do not include gdb_assert.h.
1041 2014-08-07 Gary Benson <gbenson@redhat.com>
1043 * server.h: Do not include common-utils.h.
1045 2014-08-07 Gary Benson <gbenson@redhat.com>
1047 * server.h: Do not include ptid.h.
1048 * notif.h: Likewise.
1050 2014-08-07 Gary Benson <gbenson@redhat.com>
1052 * server.h: Do not include gdb_locale.h.
1054 2014-08-07 Gary Benson <gbenson@redhat.com>
1056 * server.h: Do not include gdb/signals.h.
1057 * win32-low.c: Likewise.
1059 2014-08-07 Gary Benson <gbenson@redhat.com>
1061 * server.h: Do not include pathmax.h.
1063 2014-08-07 Gary Benson <gbenson@redhat.com>
1065 * server.h: Do not include libiberty.h.
1066 * linux-bfin-low.c: Likewise.
1068 2014-08-07 Gary Benson <gbenson@redhat.com>
1070 * server.h: Do not include ansidecl.h.
1072 2014-08-07 Gary Benson <gbenson@redhat.com>
1074 * linux-x86-low.c: Do not include stddef.h.
1075 * lynx-ppc-low.c: Likewise.
1076 * tracepoint.c: Likewise.
1078 2014-08-07 Gary Benson <gbenson@redhat.com>
1080 * server.h: Do not include stdarg.h.
1081 * nto-low.c: Likewise.
1083 2014-08-07 Gary Benson <gbenson@redhat.com>
1085 * server.h: Do not include stdlib.h.
1086 * inferiors.c: Likewise.
1087 * linux-low.c: Likewise.
1088 * regcache.c: Likewise.
1089 * spu-low.c: Likewise.
1090 * tracepoint.c: Likewise.
1091 * utils.c: Likewise.
1093 2014-08-07 Gary Benson <gbenson@redhat.com>
1095 * server.h: Do not include stdio.h.
1096 * linux-low.c: Likewise.
1097 * remote-utils.c: Likewise.
1098 * spu-low.c: Likewise.
1099 * utils.c: Likewise.
1100 * wincecompat.c: Likewise.
1102 2014-08-06 Gary Benson <gbenson@redhat.com>
1104 * regcache.c (init_register_cache): Move conditionals inside if.
1106 2014-08-06 Gary Benson <gbenson@redhat.com>
1108 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1110 2014-07-31 Gary Benson <gbenson@redhat.com>
1112 * ax.h: Do not include server.h.
1113 * gdbthread.h: Likewise.
1114 * lynx-low.h: Likewise.
1115 * notif.h: Likewise.
1117 2014-07-30 Gary Benson <gbenson@redhat.com>
1119 * server.h: Include common-defs.h.
1120 Do not include config.h or build-gnulib-gdbserver/config.h.
1122 2014-07-30 Gary Benson <gbenson@redhat.com>
1124 * hostio-errno.c: Move server.h to top of includes list.
1125 * inferiors.c: Likewise.
1126 * linux-x86-low.c: Likewise.
1127 * notif.c: Include server.h.
1129 2014-07-24 Tom Tromey <tromey@redhat.com>
1130 Gary Benson <gbenson@redhat.com>
1132 * server.h (CORE_ADDR): Now unsigned.
1134 2014-07-16 Pedro Alves <palves@redhat.com>
1136 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1138 2014-07-15 Pedro Alves <palves@redhat.com>
1140 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1143 2014-07-11 Pedro Alves <palves@redhat.com>
1145 * linux-low.c (kill_wait_lwp): New function, based on
1146 kill_one_lwp_callback, but use my_waitpid directly.
1147 (kill_one_lwp_callback, linux_kill): Use it.
1149 2014-06-23 Pedro Alves <palves@redhat.com>
1151 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1152 before setting DR0..DR3.
1154 2014-06-20 Gary Benson <gbenson@redhat.com>
1156 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1157 * configure: Regenerated.
1158 * config.in: Likewise.
1160 2014-06-20 Gary Benson <gbenson@redhat.com>
1162 * Makefile.in (SFILES): Update locations for files moved
1164 (object file files): Reordered.
1166 2014-06-20 Gary Benson <gbenson@redhat.com>
1168 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1169 (i386_dr_low_set_addr): Likewise.
1170 (i386_dr_low_get_addr): Likewise.
1171 (i386_dr_low_can_set_control): Likewise.
1172 (i386_dr_low_set_control): Likewise.
1173 (i386_dr_low_get_control): Likewise.
1174 (i386_dr_low_get_status): Likewise.
1175 (i386_get_debug_register_length): Likewise.
1176 * linux-x86-low.c (i386_dr_low_set_addr):
1177 Changed signature. Made static.
1178 (i386_dr_low_get_addr): Likewise.
1179 (i386_dr_low_set_control): Likewise.
1180 (i386_dr_low_get_control): Likewise.
1181 (i386_dr_low_get_status): Likewise.
1182 (i386_dr_low): New global variable.
1183 * win32-i386-low.c (i386_dr_low_set_addr):
1184 Changed signature. Made static.
1185 (i386_dr_low_get_addr): Likewise.
1186 (i386_dr_low_set_control): Likewise.
1187 (i386_dr_low_get_control): Likewise.
1188 (i386_dr_low_get_status): Likewise.
1189 (i386_dr_low): New global variable.
1191 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1193 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1194 * Makefile.in (AR, AR_FLAGS): Define.
1195 * configure: Regenerate.
1197 2014-06-19 Gary Benson <gbenson@redhat.com>
1199 * Makefile.in (i386-dregs.o): New rule.
1200 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1201 * i386-low.c (target.h): Remove include.
1202 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1203 (DR_CONTROL_SHIFT): Likewise.
1204 (DR_CONTROL_SIZE): Likewise.
1205 (DR_RW_EXECUTE): Likewise.
1206 (DR_RW_WRITE): Likewise.
1207 (DR_RW_READ): Likewise.
1208 (DR_RW_IORW): Likewise.
1209 (DR_LEN_1): Likewise.
1210 (DR_LEN_2): Likewise.
1211 (DR_LEN_4): Likewise.
1212 (DR_LEN_8): Likewise.
1213 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1214 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1215 (DR_ENABLE_SIZE): Likewise.
1216 (DR_LOCAL_SLOWDOWN): Likewise.
1217 (DR_GLOBAL_SLOWDOWN): Likewise.
1218 (DR_CONTROL_RESERVED): Likewise.
1219 (I386_DR_CONTROL_MASK): Likewise.
1220 (I386_DR_VACANT): Likewise.
1221 (I386_DR_LOCAL_ENABLE): Likewise.
1222 (I386_DR_GLOBAL_ENABLE): Likewise.
1223 (I386_DR_DISABLE): Likewise.
1224 (I386_DR_SET_RW_LEN): Likewise.
1225 (I386_DR_GET_RW_LEN): Likewise.
1226 (I386_DR_WATCH_HIT): Likewise.
1227 (i386_wp_op_t): Likewise.
1228 (i386_show_dr): Likewise.
1229 (i386_length_and_rw_bits): Likewise.
1230 (i386_insert_aligned_watchpoint): Likewise.
1231 (i386_remove_aligned_watchpoint): Likewise.
1232 (i386_handle_nonaligned_watchpoint): Likewise.
1233 i386_update_inferior_debug_regs(): Likewise.
1234 (i386_dr_insert_watchpoint): Likewise.
1235 (i386_dr_remove_watchpoint): Likewise.
1236 (i386_dr_region_ok_for_watchpoint): Likewise.
1237 (i386_dr_stopped_data_address): Likewise.
1238 (i386_dr_stopped_by_watchpoint): Likewise.
1240 2014-06-19 Gary Benson <gbenson@redhat.com>
1242 * i386-low.c (i386_dr_show): Renamed to
1243 i386_show_dr and made static. All uses updated.
1244 (i386_dr_length_and_rw_bits): Renamed to
1245 i386_length_and_rw_bits and made static.
1247 (i386_dr_insert_aligned_watchpoint): Renamed to
1248 i386_insert_aligned_watchpoint and made static.
1250 (i386_dr_remove_aligned_watchpoint): Renamed to
1251 i386_remove_aligned_watchpoint and made static.
1253 (i386_dr_update_inferior_debug_regs): Renamed to
1254 i386_update_inferior_debug_regs and made static.
1257 2014-06-18 Gary Benson <gbenson@redhat.com>
1259 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1260 (i386_dr_low_can_set_control): Likewise.
1261 (i386_get_debug_register_length): Likewise.
1262 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1263 (i386_dr_low_can_set_control): Likewise.
1264 (i386_get_debug_register_length): Likewise.
1266 2014-06-17 Gary Benson <gbenson@redhat.com>
1268 * i386-low.h (i386-dregs.h): New include.
1269 (DR_FIRSTADDR): Now in i386-dregs.h.
1270 (DR_LASTADDR): Likewise.
1271 (DR_NADDR): Likewise.
1272 (DR_STATUS): Likewise.
1273 (DR_CONTROL): Likewise.
1274 (i386_debug_reg_state): Likewise.
1275 (i386_dr_insert_watchpoint): Likewise.
1276 (i386_dr_remove_watchpoint): Likewise.
1277 (i386_dr_region_ok_for_watchpoint): Likewise.
1278 (i386_dr_stopped_data_address): Likewise.
1279 (i386_dr_stopped_by_watchpoint): Likewise.
1280 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1282 2014-06-18 Gary Benson <gbenson@redhat.com>
1284 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1285 i386_dr_insert_watchpoint.
1286 (i386_low_remove_watchpoint): Renamed to
1287 i386_dr_remove_watchpoint.
1288 (i386_low_region_ok_for_watchpoint): Renamed to
1289 i386_dr_region_ok_for_watchpoint.
1290 (i386_low_stopped_data_address): Renamed to
1291 i386_dr_stopped_data_address.
1292 (i386_low_stopped_by_watchpoint): Renamed to
1293 i386_dr_stopped_by_watchpoint.
1294 * i386-low.c (i386_show_dr): Renamed to
1295 i386_dr_show and made nonstatic. All uses updated.
1296 (i386_length_and_rw_bits): Renamed to
1297 i386_dr_length_and_rw_bits and made nonstatic.
1299 (i386_insert_aligned_watchpoint): Renamed to
1300 i386_dr_insert_aligned_watchpoint and made nonstatic.
1302 (i386_remove_aligned_watchpoint): Renamed to
1303 i386_dr_remove_aligned_watchpoint and made nonstatic.
1305 (i386_update_inferior_debug_regs): Renamed to
1306 i386_dr_update_inferior_debug_regs and made nonstatic.
1308 (i386_low_insert_watchpoint): Renamed to
1309 i386_dr_insert_watchpoint. All uses updated.
1310 (i386_low_remove_watchpoint): Renamed to
1311 i386_dr_remove_watchpoint. All uses updated.
1312 (i386_low_region_ok_for_watchpoint): Renamed to
1313 i386_dr_region_ok_for_watchpoint. All uses updated.
1314 (i386_low_stopped_data_address): Renamed to
1315 i386_dr_stopped_data_address. All uses updated.
1316 (i386_low_stopped_by_watchpoint): Renamed to
1317 i386_dr_stopped_by_watchpoint. All uses updated.
1319 2014-06-18 Gary Benson <gbenson@redhat.com>
1321 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1322 (i386_dr_low_can_set_control): Likewise.
1323 (i386_insert_aligned_watchpoint): New check.
1325 2014-06-18 Gary Benson <gbenson@redhat.com>
1327 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1330 2014-06-18 Gary Benson <gbenson@redhat.com>
1332 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1333 instead of fatal and error.
1334 (i386_handle_nonaligned_watchpoint): Likewise.
1336 2014-06-18 Gary Benson <gbenson@redhat.com>
1338 * i386-low.c (i386_get_debug_register_length): New macro.
1339 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1340 (i386_show_dr): Use debug_printf instead of fprintf. Use
1341 phex to format values.
1343 2014-06-18 Gary Benson <gbenson@redhat.com>
1345 * i386-low.h: Comment changes.
1346 * i386-low.c: Likewise.
1348 2014-06-18 Gary Benson <gbenson@redhat.com>
1350 * i386-low.c: Whitespace changes.
1352 2014-06-12 Tom Tromey <tromey@redhat.com>
1354 * utils.c (freeargv): Remove.
1356 2014-06-12 Tom Tromey <tromey@redhat.com>
1358 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1359 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1360 (parse_debug_format_options): Likewise.
1361 (gdbserver_usage): Likewise.
1362 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1363 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1364 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1366 ($(LIBGNU)): Depend on libiberty.
1367 (all-lib): Recurse into all subdirs.
1368 (install-only): Invoke "install" target in subdirs.
1369 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1371 * configure: Rebuild.
1372 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1373 for vasprintf, vsnprintf, or gettimeofday.
1374 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1377 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1379 * development.sh: Delete.
1380 * Makefile.in (config.status): Adjust dependency on development.sh.
1381 * configure.ac: Adjust development.sh source call.
1382 * configure: Regenerate.
1384 2014-06-02 Pedro Alves <palves@redhat.com>
1386 * ax.c (gdb_free_agent_expr): New function.
1387 * ax.h (gdb_free_agent_expr): New declaration.
1388 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1390 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1392 (clear_breakpoint_conditions_and_commands): New function.
1393 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1394 (clear_breakpoint_conditions_and_commands): New declaration.
1396 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1398 * linux-aarch64-low.c (asm/ptrace.h): Include.
1400 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1402 Fix TLS access for -static -pthread.
1403 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1404 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1405 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1407 2014-05-20 Pedro Alves <palves@redhat.com>
1409 * linux-aarch64-low.c (aarch64_insert_point)
1410 (aarch64_remove_point): No longer check whether the type is
1411 supported here. Adjust to new interface.
1412 (the_low_target): Install aarch64_supports_z_point_type as
1413 supports_z_point_type method.
1414 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1415 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1416 instead of a Z packet char. Adjust.
1417 (arm_supports_z_point_type): New function.
1418 (arm_insert_point, arm_remove_point): Adjust to new interface.
1419 (the_low_target): Install arm_supports_z_point_type.
1420 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1421 (cris_insert_point, cris_remove_point): Adjust to new interface.
1422 Don't check whether the type is supported here.
1423 (the_low_target): Install cris_supports_z_point_type.
1424 * linux-low.c (linux_supports_z_point_type): New function.
1425 (linux_insert_point, linux_remove_point): Adjust to new interface.
1426 * linux-low.h (struct linux_target_ops) <insert_point,
1427 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1428 raw_breakpoint pointer parameter.
1429 <supports_z_point_type>: New method.
1430 * linux-mips-low.c (mips_supports_z_point_type): New function.
1431 (mips_insert_point, mips_remove_point): Adjust to new interface.
1432 Use mips_supports_z_point_type.
1433 (the_low_target): Install mips_supports_z_point_type.
1434 * linux-ppc-low.c (the_low_target): Install NULL as
1435 supports_z_point_type method.
1436 * linux-s390-low.c (the_low_target): Install NULL as
1437 supports_z_point_type method.
1438 * linux-sparc-low.c (the_low_target): Install NULL as
1439 supports_z_point_type method.
1440 * linux-x86-low.c (x86_supports_z_point_type): New function.
1441 (x86_insert_point): Adjust to new insert_point interface. Use
1442 insert_memory_breakpoint. Adjust to new
1443 i386_low_insert_watchpoint interface.
1444 (x86_remove_point): Adjust to remove_point interface. Use
1445 remove_memory_breakpoint. Adjust to new
1446 i386_low_remove_watchpoint interface.
1447 (the_low_target): Install x86_supports_z_point_type.
1448 * lynx-low.c (lynx_target_ops): Install NULL as
1449 supports_z_point_type callback.
1450 * nto-low.c (nto_supports_z_point_type): New.
1451 (nto_insert_point, nto_remove_point): Adjust to new interface.
1452 (nto_target_ops): Install nto_supports_z_point_type.
1453 * mem-break.c: Adjust intro comment.
1454 (struct raw_breakpoint) <raw_type, size>: New fields.
1455 <inserted>: Update comment.
1456 <shlib_disabled>: Delete field.
1457 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1458 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1459 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1460 (raw_bkpt_type_to_target_hw_bp_type): New function.
1461 (find_enabled_raw_code_breakpoint_at): New function.
1462 (find_raw_breakpoint_at): New type and size parameters. Use them.
1463 (insert_memory_breakpoint): New function, based off
1464 set_raw_breakpoint_at.
1465 (remove_memory_breakpoint): New function.
1466 (set_raw_breakpoint_at): Reimplement.
1467 (set_breakpoint): New, based on set_breakpoint_at.
1468 (set_breakpoint_at): Reimplement.
1469 (delete_raw_breakpoint): Go through the_target->remove_point
1470 instead of assuming memory breakpoints.
1471 (find_gdb_breakpoint_at): Delete.
1472 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1473 (find_gdb_breakpoint): New function.
1474 (set_gdb_breakpoint_at): Delete.
1475 (z_type_supported): New function.
1476 (set_gdb_breakpoint_1): New function, loosely based off
1477 set_gdb_breakpoint_at.
1478 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1479 (delete_gdb_breakpoint_at): Delete.
1480 (delete_gdb_breakpoint_1): New function, loosely based off
1481 delete_gdb_breakpoint_at.
1482 (delete_gdb_breakpoint): New function.
1483 (clear_gdb_breakpoint_conditions): Rename to ...
1484 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1486 (add_condition_to_breakpoint): Make static.
1487 (add_breakpoint_condition): Take a struct breakpoint pointer
1488 instead of an address. Adjust.
1489 (gdb_condition_true_at_breakpoint): Rename to ...
1490 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1492 (gdb_condition_true_at_breakpoint): Reimplement.
1493 (add_breakpoint_commands): Take a struct breakpoint pointer
1494 instead of an address. Adjust.
1495 (gdb_no_commands_at_breakpoint): Rename to ...
1496 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1497 parameter. Return true if no breakpoint was found. Change debug
1499 (gdb_no_commands_at_breakpoint): Reimplement.
1500 (run_breakpoint_commands): Rename to ...
1501 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1502 and change return type to boolean.
1503 (run_breakpoint_commands): New function.
1504 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1505 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1506 breakpoint. Go through the_target->remove_point instead of
1507 assuming memory breakpoint.
1508 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1509 software and hardware breakpoints.
1510 (reinsert_raw_breakpoint): Go through the_target->insert_point
1511 instead of assuming memory breakpoint.
1512 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1513 software and hardware breakpoints.
1514 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1515 Check both software and hardware breakpoints.
1516 (validate_inserted_breakpoint): Assert the breakpoint is a
1517 software breakpoint. Set the inserted flag to -1 instead of
1518 setting shlib_disabled.
1519 (delete_disabled_breakpoints): Adjust.
1520 (validate_breakpoints): Only validate software breakpoints.
1521 Adjust to inserted flag change.
1522 (check_mem_read, check_mem_write): Skip breakpoint types other
1523 than software breakpoints. Adjust to inserted flag change.
1524 * mem-break.h (enum raw_bkpt_type): New enum.
1525 (raw_breakpoint, struct process_info): Forward declare.
1526 (Z_packet_to_target_hw_bp_type): Delete declaration.
1527 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1528 (set_gdb_breakpoint, delete_gdb_breakpoint)
1529 (clear_breakpoint_conditions): New declarations.
1530 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1531 (breakpoint_inserted_here): Update comment.
1532 (add_breakpoint_condition, add_breakpoint_commands): Replace
1533 address parameter with a breakpoint pointer parameter.
1534 (gdb_breakpoint_here): Update comment.
1535 (delete_gdb_breakpoint_at): Delete.
1536 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1537 * server.c (process_point_options): Take a struct breakpoint
1538 pointer instead of an address. Adjust.
1539 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1540 delete_gdb_breakpoint.
1541 * spu-low.c (spu_target_ops): Install NULL as
1542 supports_z_point_type method.
1543 * target.h: Include mem-break.h.
1544 (struct target_ops) <prepare_to_access_memory>: Update comment.
1545 <supports_z_point_type>: New field.
1546 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1547 instead of a char. Also take a raw breakpoint pointer.
1548 * win32-arm-low.c (the_low_target): Install NULL as
1549 supports_z_point_type.
1550 * win32-i386-low.c (i386_supports_z_point_type): New function.
1551 (i386_insert_point, i386_remove_point): Adjust to new interface.
1552 (the_low_target): Install i386_supports_z_point_type.
1553 * win32-low.c (win32_supports_z_point_type): New function.
1554 (win32_insert_point, win32_remove_point): Adjust to new interface.
1555 (win32_target_ops): Install win32_supports_z_point_type.
1556 * win32-low.h (struct win32_target_ops):
1557 <supports_z_point_type>: New method.
1558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1559 instead of a char. Also take a raw breakpoint pointer.
1561 2014-05-20 Pedro Alves <palves@redhat.com>
1563 * mem-break.h: Include break-common.h.
1564 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1565 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1566 (Z_packet_to_target_hw_bp_type): New declaration.
1567 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1568 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1569 (Z_PACKET_ACCESS_WP): Delete macros.
1570 (Z_packet_to_hw_type): Delete function.
1571 * i386-low.h: Don't include break-common.h here.
1572 (Z_packet_to_hw_type): Delete declaration.
1573 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1574 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1575 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1576 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1577 * linux-aarch64-low.c: Don't include break-common.h here.
1578 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1579 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1580 (Z_packet_to_target_hw_bp_type): Delete function.
1581 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1583 (mips_insert_point, mips_remove_point): Use
1584 Z_packet_to_target_hw_bp_type.
1586 2014-05-20 Pedro Alves <palves@redhat.com>
1588 * linux-aarch64-low.c: Include break-common.h.
1589 (enum target_point_type): Delete.
1590 (Z_packet_to_point_type): Rename to ...
1591 (Z_packet_to_target_hw_bp_type): ... this, and return a
1592 target_hw_bp_type instead.
1593 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1594 instead of an enum target_point_type.
1595 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1597 (aarch64_dr_state_insert_one_point)
1598 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1599 (aarch64_handle_aligned_watchpoint)
1600 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1601 Take an enum target_hw_bp_type instead of an enum
1603 (aarch64_supports_z_point_type): New function.
1604 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1605 use Z_packet_to_target_hw_bp_type.
1607 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1609 * configure.ac: Only use -Werror by default when DEVELOPMENT
1611 * configure: Regenerate.
1613 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1615 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1616 * linux-x86-low.c (X86_64_USER_REGS): New.
1617 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1619 2014-04-28 Yao Qi <yao@codesourcery.com>
1621 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1624 2014-04-25 Pedro Alves <palves@redhat.com>
1627 * linux-low.c (linux_attach_fail_reason_string): New function.
1628 (linux_attach_lwp): Delete.
1629 (linux_attach_lwp_1): Rename to ...
1630 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1631 argument. Remove "initial" parameter. Return int instead of
1632 void. Don't error or warn here.
1633 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1634 failure to attach to the tgid. Call warning when failing to
1636 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1637 argument. Remove "initial" parameter. Return int instead of
1638 void. Don't error or warn here.
1639 (linux_attach_fail_reason_string): New declaration.
1640 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1641 interface change. Use linux_attach_fail_reason_string.
1643 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1644 Walfred Tedeschi <walfred.tedeschi@intel.com>
1646 * Makefile.in: Added rules to handle new files
1647 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1648 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1649 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1650 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1651 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1652 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1654 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1655 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1656 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1657 i386/x32-avx512.xml.
1658 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1659 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1660 i386/x32-avx512-linux.xml.
1661 * i387-fp.c (num_avx512_k_registers): New constant for number
1663 (num_avx512_zmmh_low_registers): New constant for number of
1664 lower ZMM registers (0-15).
1665 (num_avx512_zmmh_high_registers): New constant for number of
1666 higher ZMM registers (16-31).
1667 (num_avx512_ymmh_registers): New contant for number of higher
1668 YMM registers (ymm16-31 added by avx521 on x86_64).
1669 (num_avx512_xmm_registers): New constant for number of higher
1670 XMM registers (xmm16-31 added by AVX512 on x86_64).
1671 (struct i387_xsave): Add space for AVX512 registers.
1672 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1673 Add code to handle AVX512 registers.
1674 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1675 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1676 prototypei from generated file.
1677 (tdesc_amd64_avx512_linux): Likewise.
1678 (init_registers_x32_avx512_linux): Likewise.
1679 (tdesc_x32_avx512_linux): Likewise.
1680 (init_registers_i386_avx512_linux): Likewise.
1681 (tdesc_i386_avx512_linux): Likewise.
1682 (x86_64_regmap): Add AVX512 registers.
1683 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1685 (initialize_low_arch): Add code to initialize AVX512 registers.
1687 2014-04-23 Pedro Alves <palves@redhat.com>
1689 * mem-break.c (find_gdb_breakpoint_at): Make static.
1690 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1692 2014-04-23 Pedro Alves <palves@redhat.com>
1694 * i386-low.c: Don't include break-common.h here.
1695 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1696 prototype to take target_hw_bp_type as argument instead of a Z
1698 * i386-low.h: Include break-common.h here.
1699 (Z_packet_to_hw_type): Declare.
1700 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1702 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1703 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1704 (x86_remove_point): Convert the packet number to a
1705 target_hw_bp_type before calling i386_low_remove_watchpoint.
1706 * win32-i386-low.c (i386_insert_point): Convert the packet number
1707 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1708 (i386_remove_point): Convert the packet number to a
1709 target_hw_bp_type before calling i386_low_remove_watchpoint.
1711 2014-04-23 Pedro Alves <palves@redhat.com>
1713 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1715 2014-04-10 Pedro Alves <palves@redhat.com>
1717 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1718 Check if the condition or command is NULL before checking if the
1719 breakpoint is known. On success, return true.
1720 * mem-break.h (add_breakpoint_condition): Document return.
1721 (add_breakpoint_commands): Add describing comment.
1722 * server.c (skip_to_semicolon): New function.
1723 (process_point_options): Use it.
1725 2014-04-09 Pedro Alves <palves@redhat.com>
1727 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1730 2014-02-27 Pedro Alves <palves@redhat.com>
1733 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1735 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1737 (last_thread_of_process_p): Take a PID argument instead of a
1739 (linux_wait_for_lwp): Delete.
1740 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1742 (linux_low_filter_event): New function, party factored out from
1743 linux_wait_for_event.
1744 (linux_wait_for_event): Rename to ...
1745 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1746 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1747 sigsuspend. Check for zombie leaders.
1748 (linux_wait_for_event): Reimplement as wrapper around
1749 linux_wait_for_event_filtered.
1750 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1751 a normal or signal exit is seen, it's the whole process exiting.
1752 (wait_for_sigstop): No longer a for_each_inferior callback.
1753 Rewrite on top of linux_wait_for_event_filtered.
1754 (stop_all_lwps): Call wait_for_sigstop directly.
1755 * server.c (resume, handle_target_event): Handle
1756 TARGET_WAITKIND_NO_RESUMED.
1758 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1760 * win32-low.c (psapi_get_dll_name,
1761 * win32_CreateToolhelp32Snapshot): Delete.
1762 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1763 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1765 (handle_load_dll): Add function description.
1766 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1768 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1770 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1772 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1773 base address when calling win32_add_one_solib.
1774 (handle_load_dll): Delete local variable load_addr.
1775 Remove 0x1000 offset applied to DLL base address when calling
1776 win32_add_one_solib.
1777 (handle_unload_dll): Add comment.
1779 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1781 * win32-low.c (win32_add_all_dlls): Renames
1782 win32_ensure_ntdll_loaded. Rewrite function documentation.
1783 Adjust implementation to always load all DLLs.
1784 Add 0x1000 offset to DLL base address when calling
1785 win32_add_one_solib.
1786 (child_initialization_done): New static global.
1787 (do_initial_child_stuff): Set child_initialization_done to
1788 zero during child initialization, and 1 after. Replace call
1789 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1791 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1792 (handle_unload_dll): Add function documentation.
1793 (get_child_debug_event): Ignore load and unload DLL events
1794 during child initialization.
1796 2014-02-20 Doug Evans <dje@google.com>
1798 Remove global all_lwps.
1799 * inferiors.h (ptid_of): Move here from linux-low.h.
1800 (pid_of, lwpid_of): Ditto.
1801 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1802 parameter is a struct thread_info * now.
1803 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1804 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1805 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1807 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1808 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1809 * linux-arm-low.c (update_registers_callback): Update, "entry"
1810 parameter is a struct thread_info * now.
1811 Fetch lwpid from current_inferior directly.
1812 (arm_insert_point): Pass &all_threads to find_inferior instead of
1814 (arm_remove_point): Ditto.
1815 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1816 (arm_prepare_to_resume): Fetch pid from thread.
1817 (arm_read_description): Fetch lwpid from current_inferior directly.
1818 * linux-low.c (all_lwps): Delete.
1819 (delete_lwp): Delete call to remove_inferior.
1820 (handle_extended_wait): Fetch lwpid from thread.
1821 (add_lwp): Don't set lwp->entry.id. Remove call to
1822 add_inferior_to_list.
1823 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1824 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1825 (kill_one_lwp_callback): Ditto.
1826 (linux_kill): Don't dereference NULL pointer.
1827 Fetch ptid,lwpid from thread.
1828 (get_detach_signal): Fetch ptid from thread.
1829 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1830 Simplify call to regcache_invalidate_thread.
1831 (delete_lwp_callback): Update, "entry" parameter is a
1832 struct thread_info * now. Fetch pid from thread.
1833 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1834 (status_pending_p_callback): Update, "entry" parameter is a
1835 struct thread_info * now. Fetch ptid from thread.
1836 (find_lwp_pid): Update, "entry" parameter is a
1837 struct thread_info * now.
1838 (linux_wait_for_lwp): Fetch pid from thread.
1839 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1840 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1841 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1842 (dequeue_one_deferred_signal): Ditto.
1843 (cancel_breakpoint): Fetch ptid from current_inferior.
1844 (linux_wait_for_event): Pass &all_threads to find_inferior,
1845 not &all_lwps. Fetch ptid, lwpid from thread.
1846 (count_events_callback): Update, "entry" parameter is a
1847 struct thread_info * now.
1848 (select_singlestep_lwp_callback): Ditto.
1849 (select_event_lwp_callback): Ditto.
1850 (cancel_breakpoints_callback): Ditto.
1851 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1853 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1854 (unsuspend_one_lwp): Update, "entry" parameter is a
1855 struct thread_info * now.
1856 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1858 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1859 Fetch lwpid from thread, not lwp.
1860 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1861 Pass &all_threads to find_inferior, not &all_lwps.
1862 (send_sigstop): Fetch lwpid from thread, not lwp.
1863 (send_sigstop_callback): Update, "entry" parameter is a
1864 struct thread_info * now.
1865 (suspend_and_send_sigstop_callback): Ditto.
1866 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1867 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1868 struct thread_info * now.
1869 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1871 (lwp_running): Update, "entry" parameter is a
1872 struct thread_info * now.
1873 (stop_all_lwps): Fetch ptid from thread.
1874 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1875 (linux_resume_one_lwp): Fetch lwpid from thread.
1876 (linux_set_resume_request): Update, "entry" parameter is a
1877 struct thread_info * now. Fetch pid, lwpid from thread.
1878 (resume_status_pending_p): Update, "entry" parameter is a
1879 struct thread_info * now.
1880 (need_step_over_p): Ditto. Fetch lwpid from thread.
1881 (start_step_over): Fetch lwpid from thread.
1882 (linux_resume_one_thread): Update, "entry" parameter is a
1883 struct thread_info * now. Fetch lwpid from thread.
1884 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1885 (proceed_one_lwp): Update, "entry" parameter is a
1886 struct thread_info * now. Fetch lwpid from thread.
1887 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1888 struct thread_info * now.
1889 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1890 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1891 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1893 (regsets_store_inferior_registers): Ditto.
1894 (fetch_register, store_register): Ditto.
1895 (linux_read_memory, linux_write_memory): Ditto.
1896 (linux_request_interrupt): Ditto.
1897 (linux_read_auxv): Ditto.
1898 (linux_xfer_siginfo): Ditto.
1899 (linux_qxfer_spu): Ditto.
1900 (linux_qxfer_libraries_svr4): Ditto.
1901 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1902 moved to inferiors.h.
1904 (get_thread_lwp): Update.
1905 (struct lwp_info): Delete member "entry". Simplify comment for
1908 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1909 current_inferior directly.
1910 (update_watch_registers_callback): Update, "entry" parameter is a
1911 struct thread_info * now. Fetch pid from thread.
1912 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1913 (mips_insert_point): Fetch lwpid from current_inferior.
1914 Pass &all_threads to find_inferior, not &all_lwps.
1915 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1916 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1918 (mips_stopped_data_address): Ditto.
1919 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1921 * linux-tile-low.c (tile_arch_setup): Ditto.
1922 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1923 (update_debug_registers_callback): Update, "entry" parameter is a
1924 struct thread_info * now. Fetch pid from thread.
1925 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1926 Pass &all_threads to find_inferior, not &all_lwps.
1927 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1928 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1929 Pass &all_threads to find_inferior, not &all_lwps.
1930 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1931 (i386_dr_low_get_status): Ditto.
1932 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1933 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1934 (x86_linux_read_description): Ditto.
1935 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1937 2014-02-20 Doug Evans <dje@google.com>
1939 * inferiors.c (get_first_inferior): Fix buglet.
1941 2014-02-19 Doug Evans <dje@google.com>
1943 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1944 * inferiors.c (add_thread): Change result type to struct thread_info *.
1945 All callers updated.
1946 (add_lwp): Call add_thread here instead of in callers.
1947 All callers updated.
1948 * linux-low.h (get_lwp_thread): Rewrite.
1949 (struct lwp_info): New member "thread".
1951 2014-02-19 Doug Evans <dje@google.com>
1953 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1954 All callers updated.
1956 2014-02-19 Doug Evans <dje@google.com>
1958 * inferiors.c (add_thread): Fix whitespace.
1960 2014-02-19 Doug Evans <dje@google.com>
1962 * dll.c (clear_dlls): Replace accessing list implemention details
1964 * gdbthread.h (get_first_thread): Declare.
1965 * inferiors.c (for_each_inferior_with_data): New function.
1966 (get_first_thread): New function.
1967 (find_thread_ptid): Simplify.
1968 (get_first_inferior): New function.
1969 (clear_list): Delete.
1970 (one_inferior_p): New function.
1971 (clear_inferior_list): New function.
1972 (clear_inferiors): Update.
1973 * inferiors.h (for_each_inferior_with_data): Declare.
1974 (clear_inferior_list): Declare.
1975 (one_inferior_p): Declare.
1976 (get_first_inferior): Declare.
1977 * linux-low.c (linux_wait_for_event): Replace accessing list
1978 implemention details with API function.
1979 * server.c (target_running): Ditto.
1980 (accumulate_file_name_length): New function.
1981 (emit_dll_description): New function.
1982 (handle_qxfer_libraries): Replace accessing list implemention
1983 details with API function.
1984 (handle_qxfer_threads_worker): New function.
1985 (handle_qxfer_threads_proper): Replace accessing list implemention
1986 details with API function.
1987 (handle_query): Ditto.
1988 (visit_actioned_threads_callback_ftype): New typedef.
1989 (visit_actioned_threads_data): New struct.
1990 (visit_actioned_threads): Rewrite to be find_inferior callback.
1991 (resume): Call find_inferior.
1992 (handle_status): Replace accessing list implemention
1993 details with API function.
1994 (process_serial_event): Replace accessing list implemention details
1996 * target.c (set_desired_inferior): Replace accessing list implemention
1997 details with API function.
1998 * tracepoint.c (same_process_p): New function.
1999 (gdb_agent_about_to_close): Replace accessing list implemention
2000 details with API function.
2001 * win32-low.c (child_delete_thread): Replace accessing list
2002 implemention details with API function.
2003 (match_dll_by_basename): New function.
2004 (dll_is_loaded_by_basename): New function.
2005 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2006 details call to dll_is_loaded_by_basename.
2008 2014-02-19 Doug Evans <dje@google.com>
2010 * dll.h (struct dll_info): Add comment.
2011 * gdbthread.h (struct thread_info): Add comment.
2012 (current_ptid): Simplify.
2013 * inferiors.c (add_process): Update.
2014 (remove_process): Update.
2015 * inferiors.h (struct process_info): Rename member "head" to "entry".
2016 * linux-low.c (delete_lwp): Update.
2018 (last_thread_of_process_p): Update.
2019 (kill_one_lwp_callback, linux_kill): Update.
2020 (status_pending_p_callback): Update.
2021 (wait_for_sigstop): Update. Simplify read of ptid.
2022 (start_step_over): Update.
2023 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2024 (get_lwp_thread): Update.
2025 (struct lwp_info): Rename member "head" to "entry".
2026 * regcache.h (inferior_list_entry): Delete.
2027 * server.c (kill_inferior_callback): Update.
2028 (detach_or_kill_inferior_callback): Update.
2029 (print_started_pid): Update.
2030 (print_attached_pid): Update.
2031 (process_serial_event): Simplify read of ptid.
2032 * thread-db.c (thread_db_create_event): Update.
2033 (thread_db_get_tls_address): Update.
2034 * win32-low.c (current_inferior_ptid): Simplify.
2036 2014-02-19 Tom Tromey <tromey@redhat.com>
2038 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2040 (target_supports_btrace): Update.
2042 2014-02-14 Yao Qi <yao@codesourcery.com>
2044 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2045 (rsp-low-ipa.o): New target.
2047 2014-02-12 Tom Tromey <tromey@redhat.com>
2049 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2050 convert_ascii_to_int.
2051 * regcache.c (registers_to_string): Likewise.
2052 * remote-utils.c (decode_M_packet): Likewise.
2053 * server.c (process_serial_event): Likewise.
2055 2014-02-12 Tom Tromey <tromey@redhat.com>
2057 * server.c (handle_query, handle_v_run): Use hex2bin, not
2059 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2061 2014-02-12 Tom Tromey <tromey@redhat.com>
2063 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2064 convert_int_to_ascii.
2065 * regcache.c (registers_to_string, collect_register_as_string):
2067 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2069 * server.c (process_serial_event): Likewise.
2070 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2071 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2073 2014-02-12 Tom Tromey <tromey@redhat.com>
2075 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2076 bin2hex, not hexify.
2077 * tracepoint.c (cmd_qtstatus): Likewise.
2079 2014-02-12 Tom Tromey <tromey@redhat.com>
2081 * remote-utils.c (monitor_output): Pass explicit length to
2084 2014-02-12 Tom Tromey <tromey@redhat.com>
2086 * tracepoint.c: Include rsp-low.h.
2087 * server.c: Include rsp-low.h.
2088 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2089 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2091 * remote-utils.c: Include rsp-low.h.
2092 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2093 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2094 (convert_int_to_ascii, convert_ascii_to_int): Move to
2096 * regcache.c: Include rsp-low.h.
2097 * ax.c: Include rsp-low.h.
2098 * Makefile.in (SFILES): Add common/rsp-low.c.
2099 (OBS): Add rsp-low.o.
2100 (rsp-low.o): New target.
2102 2014-02-12 Tom Tromey <tromey@redhat.com>
2104 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2105 Include print-utils.h.
2106 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2107 (plongest, thirty_two, phex_nz): Remove.
2108 * Makefile.in (SFILES): Add common/print-utils.c.
2109 (OBS): Add print-utils.o.
2110 (print-utils-ipa.o): New target.
2111 (print-utils.o): New target.
2112 (IPA_OBJS): Add print-utils-ipa.o.
2114 2014-02-06 Tom Tromey <tromey@redhat.com>
2116 * Makefile.in (SFILES): Fix indentation.
2118 2014-02-05 Doug Evans <dje@google.com>
2120 * linux-low.c (linux_wait_for_event): Improve comment.
2121 (linux_wait_1): Keep current_inferior in sync with event_child.
2123 2014-01-22 Doug Evans <dje@google.com>
2125 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2127 2014-01-22 Doug Evans <dje@google.com>
2129 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2130 * configure: Regenerate.
2131 * config.in: Regenerate.
2132 * Makefile.in (SFILES): Add debug.c.
2134 * debug.c: New file.
2135 * debug.h: New file.
2136 * linux-aarch64-low.c (*): Update all debugging printfs to use
2137 debug_printf instead of fprintf.
2138 * linux-arm-low.c (*): Ditto.
2139 * linux-cris-low.c (*): Ditto.
2140 * linux-crisv32-low.c (*): Ditto.
2141 * linux-m32r-low.c (*): Ditto.
2142 * linux-sparc-low.c (*): Ditto.
2143 * linux-x86.c (*): Ditto.
2144 * linux-low.c (*): Ditto.
2145 (linux_wait_1): Add calls to debug_enter, debug_exit.
2146 (linux_wait): Remove redundant debugging printf.
2147 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2148 (linux_resume, unstop_all_lwps): Ditto.
2149 * mem-break.c (*): Update all debugging printfs to use
2150 debug_printf instead of fprintf.
2151 * remote-utils.c (*): Ditto.
2152 * thread-db.c (*): Ditto.
2153 * server.c #include <ctype.h>, "gdb_vecs.h".
2154 (debug_threads): Moved to debug.c.
2155 (*): Update all debugging printfs to use debug_printf instead of
2157 (start_inferior): Replace call to fflush with call to debug_flush.
2158 (monitor_show_help): Mention set debug-format.
2159 (parse_debug_format_options): New function.
2160 (handle_monitor_command): Handle "monitor set debug-format".
2161 (gdbserver_usage): Mention --debug-format.
2162 (main): Parse --debug-format.
2163 * server.h (debug_threads): Declaration moved to debug.h.
2165 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2166 trace_debug_1 that uses debug_printf.
2167 (tracepoint_look_up_symbols): Update all debugging printfs to use
2168 debug_printf instead of fprintf.
2170 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2172 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2175 2014-01-17 Pedro Alves <palves@redhat.com>
2178 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2179 defined after including gdb_proc_service.h.
2181 2014-01-16 Doug Evans <dje@google.com>
2183 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2184 (match_dll): Use it.
2186 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2188 * target.h (target_ops) <read_btrace>: Change parameters and
2189 return type to allow error reporting.
2190 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2191 trace reading errors on.
2192 * linux-low.c (linux_low_read_btrace): Pass trace reading
2194 (linux_low_disable_btrace): New.
2196 2014-01-15 Doug Evans <dje@google.com>
2198 * inferiors.c (thread_id_to_gdb_id): Delete.
2199 * inferiors.h (thread_id_to_gdb_id): Delete.
2201 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2203 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2204 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2207 2014-01-08 Pedro Alves <palves@redhat.com>
2209 * server.c (handle_status): Don't discard previous queued stop
2210 replies or thread's pending status here.
2211 (main) <disconnection>: Do it here instead.
2213 2014-01-08 Pedro Alves <palves@redhat.com>
2215 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2216 * server.c (visit_actioned_threads, handle_pending_status): New
2218 (handle_v_cont): Factor out parts to ...
2219 (resume): ... this new function. If in all-stop, and a thread
2220 being resumed has a pending status, report it without actually
2222 (myresume): Adjust to use the new 'resume' function.
2223 (clear_pending_status_callback, set_pending_status_callback)
2224 (find_status_pending_thread_callback): New functions.
2225 (handle_status): Handle the case of multiple threads having
2226 interesting statuses to report. Report threads' real last signal
2227 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2228 with an interesting thread to report the status for, instead of
2229 always reporting the status of the first thread.
2231 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2233 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2234 * gdbreplay.c (gdbreplay_version): Likewise.
2236 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2238 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2239 iov.iov_len with the real length in use.
2241 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2243 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2244 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2245 for all targets that use win32-low.c.
2246 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2247 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2249 2013-12-13 Pedro Alves <palves@redhat.com>
2251 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2252 if equal to TARGET_WAITKIND_LOADED.
2253 * win32-low.c (cached_status): New static global.
2254 (win32_wait): Add declaration.
2255 (do_initial_child_stuff): Flush all initial pending debug events
2256 up to the initial breakpoint.
2257 (win32_wait): If CACHED_STATUS was set, return that instead
2258 of doing a real wait. Remove the code resuming the execution
2259 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2260 during the initial phase. Also remove the code changing
2261 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2262 TARGET_WAITKIND_STOPPED.
2264 2013-12-11 Yao Qi <yao@codesourcery.com>
2266 * notif.c (handle_notif_ack): Return 0 if no notification
2269 2013-11-20 Doug Evans <dje@google.com>
2271 * linux-low.c (linux_set_resume_request): Fix comment.
2273 2013-11-20 Doug Evans <dje@google.com>
2275 * linux-low.c (resume_status_pending_p): Tweak comment.
2277 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2279 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2280 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2281 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2282 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2283 (srv_amd64_regobj): Add amd64-mpx.o.
2284 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2285 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2286 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2287 * i387-fp.c (num_pl_bnd_register) Added constant.
2288 (num_pl_bnd_cfg_registers) Added constant.
2289 (struct i387_xsave) Added reserved area and MPX fields.
2290 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2291 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2293 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2294 (init_registers_amd64_mpx_linux): Declare new function.
2295 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2296 (x86_64_regmap): Add MPX registers.
2297 (x86_linux_read_description): Add MPX case.
2298 (initialize_low_arch): Initialize MPX targets.
2300 2013-11-18 Tom Tromey <tromey@redhat.com>
2302 * configure: Rebuild.
2303 * configure.ac: Don't check for stdlib.h.
2304 * gdbreplay.c: Unconditionally include stdlib.h.
2306 2013-11-18 Tom Tromey <tromey@redhat.com>
2308 * config.in: Rebuild.
2309 * configure: Rebuild.
2310 * configure.ac: Don't use AC_HEADER_DIRENT.
2312 2013-11-18 Tom Tromey <tromey@redhat.com>
2314 * server.h: Don't check HAVE_STRING_H.
2315 * gdbreplay.c: Don't check HAVE_STRING_H.
2316 * configure: Rebuild.
2318 2013-11-18 Tom Tromey <tromey@redhat.com>
2320 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2323 2013-11-08 Tom Tromey <tromey@redhat.com>
2325 * configure, config.in: Rebuild.
2326 * configure.ac: Remove unused configury.
2328 2013-11-08 Tom Tromey <tromey@redhat.com>
2330 * acinclude.m4: Include common.m4, codeset.m4.
2331 * configure, config.in: Rebuild.
2332 * configure.ac: Use GDB_AC_COMMON.
2334 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2336 * linux-s390-low.c (HWCAP_S390_TE): New define.
2337 (s390_arch_setup): Consider the TE field in the HWCAP for
2338 determining 'have_regset_tdb'.
2340 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2343 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2346 2013-10-02 Pedro Alves <palves@redhat.com>
2348 * server.c (process_serial_event): Don't output "GDBserver
2349 exiting" if GDB is connected through stdio.
2350 * target.c (mywait): Likewise, be silent if GDB is connected
2353 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2355 * lynx-low.c (lynx_add_threads_after_attach): New function.
2356 (lynx_attach): Remove call to add_thread. Add call to
2357 lynx_add_threads_after_attach instead.
2359 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2361 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2362 * config.in, configure: Regenerated.
2364 2013-09-18 Yao Qi <yao@codesourcery.com>
2367 * server.c (start_inferior): Clear 'resume_info'.
2369 2013-09-16 Jiong Wang <jiwang@tilera.com>
2371 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2374 2013-09-16 Jiong Wang <jiwang@tilera.com>
2376 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2377 linux-tile-low.o to srv_tgtobj.
2379 2013-09-16 Will Newton <will.newton@linaro.org>
2381 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2384 2013-09-06 Pedro Alves <palves@redhat.com>
2386 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2387 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2388 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2389 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2390 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2391 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2393 2013-09-06 Pedro Alves <palves@redhat.com>
2395 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2396 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2398 2013-09-06 Pedro Alves <palves@redhat.com>
2400 * linux-amd64-ipa.c: Include tracepoint.h.
2401 * linux-i386-ipa.c: Include tracepoint.h.
2403 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2405 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2406 (ps_get_thread_area): New function.
2408 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2410 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2411 (initialize_low_arch): Call init_registers_crisv32 rather than
2412 init_register_crisv32.
2414 2013-09-05 Pedro Alves <palves@redhat.com>
2416 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2418 * hostio.h: ... this new file.
2419 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2420 win32-low.c: Include hostio.h.
2422 2013-09-05 Pedro Alves <palves@redhat.com>
2424 * server.h (gdb_client_data, handler_func, callback_handler_func)
2425 (delete_file_handler, add_file_handler, append_callback_event)
2426 (delete_callback_event, start_event_loop, initialize_event_loop):
2427 Move to event-loop.h and include it.
2428 * event-loop.h: New file.
2430 2013-09-05 Pedro Alves <palves@redhat.com>
2432 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2433 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2434 (loaded_dll, unloaded_dll): Move to ...
2435 * dll.h: ... this new file.
2436 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2438 2013-09-05 Pedro Alves <palves@redhat.com>
2440 * server.h (current_process, get_thread_process, all_processes)
2441 (add_inferior_to_list, for_each_inferior, current_inferior)
2442 (remove_inferior, add_process, remove_process, find_process_pid)
2443 (have_started_inferiors_p, have_attached_inferiors_p)
2444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2445 (clear_inferiors, find_inferior, find_inferior_id)
2446 (inferior_target_data, set_inferior_target_data)
2447 (inferior_regcache_data, set_inferior_regcache_data): Move to
2448 inferiors.h, and include it.
2449 * inferiors.h: New file.
2451 2013-09-05 Pedro Alves <palves@redhat.com>
2453 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2457 2013-09-05 Pedro Alves <palves@redhat.com>
2459 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2461 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2462 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2463 (handle_tracepoint_general_set, handle_tracepoint_query)
2464 (tracepoint_finished_step, tracepoint_was_hit)
2465 (release_while_stepping_state_list, current_traceframe)
2466 (in_readonly_region, traceframe_read_mem)
2467 (fetch_traceframe_registers, traceframe_read_sdata)
2468 (traceframe_read_info, struct fast_tpoint_collect_status)
2469 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2470 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2471 (supply_fast_tracepoint_registers)
2472 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2473 (ipa_tdesc, claim_trampoline_space)
2474 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2475 (agent_mem_read, agent_get_trace_state_variable_value)
2476 (agent_set_trace_state_variable_value, agent_tsv_read)
2477 (agent_mem_read_string, get_raw_reg_func_addr)
2478 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2479 * tracepoint.h: ... this new file.
2481 2013-09-05 Pedro Alves <palves@redhat.com>
2483 * server.h (perror_with_name, error, fatal, warning, paddress)
2484 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2486 * utils.h: New file.
2488 2013-09-05 Pedro Alves <palves@redhat.com>
2490 * server.h (remote_debug, noack_mode, transport_is_reliable)
2491 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2492 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2493 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2494 (write_enn, initialize_async_io, enable_async_io)
2495 (disable_async_io, check_remote_input_interrupt_request)
2496 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2497 (dead_thread_notify, prepare_resume_reply)
2498 (decode_address_to_semicolon, decode_address, decode_m_packet)
2499 (decode_M_packet, decode_X_packet, decode_xfer_write)
2500 (decode_search_memory_packet, unhexify, hexify)
2501 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2502 (look_up_one_symbol, relocate_instruction)
2503 (monitor_output): Move to remote-utils.h, and include it.
2504 * remote-utils.h: New file.
2506 2013-09-05 Pedro Alves <palves@redhat.com>
2508 * server.h (_): Delete.
2510 2013-09-02 Pedro Alves <palves@redhat.com>
2512 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2513 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2515 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2517 2013-09-02 Pierre Muller <muller@sourceware.org>
2519 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2520 or WriteProcessMemory complete successfully and handle
2521 ERROR_PARTIAL_COPY error.
2523 2013-09-02 Pedro Alves <palves@redhat.com>
2525 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2526 error instead of EIO.
2528 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2531 * linux-low.c: Include filestuff.h.
2532 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2533 * lynx-low.c: Include filestuff.h.
2534 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2535 * server.c: Include filestuff.h.
2536 (main): Call notice_open_fds.
2537 * spu-low.c: Include filestuff.h.
2538 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2540 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2542 * Makefile.in: Explain why ../target and ../nat are not
2543 listed as include file search paths.
2544 (linux-waitpid.o): New object file rule.
2545 * configure.srv (srv_native_linux_obj): New variable.
2546 Replace all occurrences of linux native object files with
2547 $srv_native_linux_obj.
2548 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2549 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2550 (linux_enable_event_reporting): Remove declaration.
2551 (my_waitpid): Moved to common/linux-waitpid.c.
2552 (linux_wait_for_event): Pass ptid when calling
2553 linux_enable_event_reporting.
2554 (linux_supports_tracefork_flag): Remove.
2555 (linux_enable_event_reporting): Likewise.
2556 (linux_tracefork_grandchild): Remove.
2557 (STACK_SIZE): Moved to common/linux-ptrace.c.
2558 (linux_tracefork_child): Remove.
2559 (linux_test_for_tracefork): Remove.
2560 (linux_look_up_symbols): Call linux_supports_traceclone.
2561 (initialize_low): Remove call to linux_test_for_tracefork.
2562 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2563 common/linux-ptrace.h.
2564 (PTRACE_TYPE_ARG4): Likewise.
2565 Include linux-ptrace.h.
2567 2013-08-21 Pedro Alves <palves@redhat.com>
2569 * config.in: Renegerate.
2571 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2573 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2574 (SFILES): Remove $(srcdir)/common/target-common.c and
2575 add $(srcdir)/target/waitstatus.c.
2576 (OBS): Remove target-common.o and add waitstatus.o.
2577 (server_h): Remove $(srcdir)/../common/target-common.h and
2578 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2579 and $(srcdir)/../target/waitstatus.h.
2580 (target-common.o): Remove.
2581 (waitstatus.o): New target object file.
2582 * target.h: Do not include target-common.h and
2583 include target/resume.h, target/wait.h and
2584 target/waitstatus.h.
2586 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2588 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2589 to PTRACE_TYPE_ARG3.
2590 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2591 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2593 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2594 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2596 2013-07-27 Jie Zhang <jie@codesourcery.com>
2597 Daniel Jacobowitz <dan@codesourcery.com>
2598 Yao Qi <yao@codesourcery.com>
2600 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2601 (mips-linux-watch.o): New rule.
2602 (mips_linux_watch_h): New variable.
2603 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2605 * linux-mips-low.c: Include mips-linux-watch.h.
2606 (struct arch_process_info, struct arch_lwp_info): New.
2607 (update_watch_registers_callback): New function.
2608 (mips_linux_new_process, mips_linux_new_thread) New functions.
2609 (mips_linux_prepare_to_resume, mips_insert_point): New
2611 (mips_remove_point, mips_stopped_by_watchpoint): New
2613 (rsp_bp_type_to_target_hw_bp_type): New function.
2614 (mips_stopped_data_address): New function.
2615 (the_low_target): Add watchpoint support functions.
2617 2013-07-27 Yao Qi <yao@codesourcery.com>
2619 * i386-low.c: Include break-common.h.
2620 (enum target_hw_bp_type): Remove.
2622 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2624 * Makefile.in (SFILES): /common/target-common.c.
2625 (OBS): Add target-common.o.
2626 (server_h): Add $(srcdir)/../common/target-common.h.
2627 (target-common.o): New target.
2628 * server.c (queue_stop_reply_callback): Free
2629 status string after use.
2630 * target.c (target_waitstatus_to_string): Remove.
2631 * target.h: Include target-common.h.
2632 (resume_kind): Likewise.
2633 (target_waitkind): Likewise.
2634 (target_waitstatus): Likewise.
2635 (TARGET_WNOHANG): Likewise.
2637 2013-07-04 Yao Qi <yao@codesourcery.com>
2639 * Makefile.in (host_alias): Use @host_noncanonical@.
2640 (target_alias): Use @target_noncanonical@.
2641 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2642 ACX_NONCANONICAL_HOST.
2643 * configure: Regenerated.
2646 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2648 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2649 * configure: Rebuild.
2650 * Makefile.in (version_host, version_target): Get from configure.
2651 (version.c): Use $(version_host) and $(version_target).
2653 2013-07-03 Pedro Alves <palves@redhat.com>
2655 * Makefile.in (config.status): Depend on development.sh.
2656 * acinclude.m4: Include libmcheck.m4.
2657 * configure: Regenerate.
2659 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2661 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2662 attribute inside the parentheses.
2663 (winapi_DebugSetProcessKillOnExit): Ditto.
2664 (winapi_DebugBreakProcess): Ditto.
2665 (winapi_GenerateConsoleCtrlEvent): Ditto.
2667 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2669 * notif.h (notif_event): Add a dummy member to avoid compiler
2672 2013-07-01 Pedro Alves <palves@redhat.com>
2674 * hostio.c (HOSTIO_PATH_MAX): Define.
2675 (require_filename, handle_open, handle_unlink, handle_readlink):
2678 2013-07-01 Pedro Alves <palves@redhat.com>
2680 * server.h: Include "pathmax.h".
2681 * linux-low.c: Don't include sys/param.h.
2682 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2684 * win32-low.c: Don't include sys/param.h.
2685 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2687 2013-07-01 Pedro Alves <palves@redhat.com>
2689 * event-loop.c: Don't check HAVE_UNISTD_H before including
2691 * gdbreplay.c: Likewise.
2692 * remote-utils.c: Likewise.
2693 * server.c: Likewise.
2694 * configure.ac: Don't check for unistd.h.
2695 * configure: Regenerate.
2697 2013-06-28 Tom Tromey <tromey@redhat.com>
2699 * Makefile.in (version.c): Use version.in, not
2702 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2704 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2705 * configure: Rebuild.
2706 * Makefile.in (version_host, version_target): Get from configure.
2707 (version.c): Use $(version_host) and $(version_target).
2709 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2711 Fix trace-status to output user name without trailing colon.
2712 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2714 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2716 Fix trace-status to output proper start-time and stop-time.
2717 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2718 output start time and stop time in hex as gdb expects.
2720 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2722 * tracepoint.c (build_traceframe_info_xml): Output trace state
2723 variables present in the trace buffer.
2725 2013-06-24 Tom Tromey <tromey@redhat.com>
2727 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2729 (version.o): Remove.
2730 * gdbreplay.c: Include version.h.
2731 (version, host_name): Don't declare.
2732 * server.h: Include version.h.
2733 (version, host_name): Don't declare.
2735 2013-06-12 Pedro Alves <palves@redhat.com>
2737 * linux-x86-low.c (linux_is_elf64): Delete global.
2738 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2739 with local linux_pid_exe_is_elf_64_file use.
2741 2013-06-11 Pedro Alves <palves@redhat.com>
2743 * linux-low.c (regset_disabled, disable_regset): New functions.
2744 (regsets_fetch_inferior_registers)
2745 (regsets_store_inferior_registers): Use them.
2746 (initialize_regsets_info); Don't allocate the disabled_regsets
2748 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2751 2013-06-11 Pedro Alves <palves@redhat.com>
2753 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2756 2013-06-11 Pedro Alves <palves@redhat.com>
2758 * linux-x86-low.c (initialize_low_arch): Call
2759 init_registers_x32_avx_linux.
2761 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2763 Fix compatibility with Android Bionic.
2764 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2767 2013-06-07 Pedro Alves <palves@redhat.com>
2770 * Makefile.in (OBS): Add tdesc.o.
2771 (IPA_OBJS): Add tdesc-ipa.o.
2772 (tdesc-ipa.o): New rule.
2773 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2775 * linux-low.c (new_inferior): Delete.
2776 (disabled_regsets, num_regsets): Delete.
2777 (linux_add_process): Adjust to set the new per-process
2779 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2780 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2781 was a stop. When calling arch_setup, switch the current inferior
2782 to the thread that got an event.
2783 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2784 (regsets_fetch_inferior_registers)
2785 (regsets_store_inferior_registers): New regsets_info parameter.
2787 (linux_register_in_regsets): New regs_info parameter. Adjust to
2789 (register_addr, fetch_register, store_register): New usrregs_info
2790 parameter. Adjust to use it.
2791 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2792 parameter regs_info. Adjust to use it.
2793 (linux_fetch_registers): Get the current inferior's regs_info, and
2795 (linux_store_registers): Ditto.
2796 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2797 (initialize_low): Don't initialize the target_regsets here. Call
2798 initialize_low_arch.
2799 * linux-low.h (target_regsets): Delete declaration.
2800 (struct regsets_info): New.
2801 (struct usrregs_info): New.
2802 (struct regs_info): New.
2803 (struct process_info_private) <new_inferior>: New field.
2804 (struct linux_target_ops): Delete the num_regs, regmap, and
2805 regset_bitmap fields. New field regs_info.
2806 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2807 * i387-fp.c (num_xmm_registers): Delete.
2808 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2809 calls to new interface.
2810 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2811 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2812 Infer the number of xmm registers from the regcache's target
2814 * i387-fp.h (num_xmm_registers): Delete.
2815 * inferiors.c (add_thread): Don't install the thread's regcache
2817 * proc-service.c (gregset_info): Fetch the current inferior's
2818 regs_info. Adjust to use it.
2819 * regcache.c: Include tdesc.h.
2820 (register_bytes, reg_defs, num_registers)
2821 (gdbserver_expedite_regs): Delete.
2822 (get_thread_regcache): If the thread doesn't have a regcache yet,
2823 create one, instead of aborting gdbserver.
2824 (regcache_invalidate_one): Rename to ...
2825 (regcache_invalidate_thread): ... this.
2826 (regcache_invalidate_one): New.
2827 (regcache_invalidate): Only invalidate registers of the current
2829 (init_register_cache): Add target_desc parameter, and use it.
2830 (new_register_cache): Ditto. Assert the target description has a
2831 non zero registers_size.
2832 (regcache_cpy): Add assertions. Adjust.
2833 (realloc_register_cache, set_register_cache): Delete.
2834 (registers_to_string, registers_from_string): Adjust.
2835 (find_register_by_name, find_regno, find_register_by_number)
2836 (register_cache_size): Add target_desc parameter, and use it.
2837 (free_register_cache_thread, free_register_cache_thread_one)
2838 (regcache_release, register_cache_size): New.
2839 (register_size): Add target_desc parameter, and use it.
2840 (register_data, supply_register, supply_register_zeroed)
2841 (supply_regblock, supply_register_by_name, collect_register)
2842 (collect_register_as_string, collect_register_by_name): Adjust.
2843 * regcache.h (struct target_desc): Forward declare.
2844 (struct regcache) <tdesc>: New field.
2845 (init_register_cache, new_register_cache): Add target_desc
2847 (regcache_invalidate_thread): Declare.
2848 (regcache_invalidate_one): Delete declaration.
2849 (regcache_release): Declare.
2850 (find_register_by_number, register_cache_size, register_size)
2851 (find_regno): Add target_desc parameter.
2852 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2854 * remote-utils.c: Include tdesc.h.
2855 (outreg, prepare_resume_reply): Adjust.
2856 * server.c: Include tdesc.h.
2857 (gdbserver_xmltarget): Delete declaration.
2858 (get_features_xml, process_serial_event): Adjust.
2859 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2861 (struct process_info) <tdesc>: New field.
2862 (ipa_tdesc): Declare.
2863 * tdesc.c: New file.
2864 * tdesc.h: New file.
2865 * tracepoint.c: Include tdesc.h.
2866 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2867 (get_context_regcache): Adjust to pass ipa_tdesc down.
2868 (do_action_at_tracepoint): Adjust to get the register cache size
2869 from the context regcache's description.
2870 (traceframe_walk_blocks): Adjust to get the register cache size
2871 from the current trace frame's description.
2872 (traceframe_get_pc): Adjust to get current trace frame's
2873 description and pass it down.
2874 (gdb_collect): Adjust to get the register cache size from the
2876 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2877 (gdbserver_xmltarget): Delete.
2878 (initialize_low_tracepoint): Set the ipa's target description.
2879 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2880 (initialize_low_tracepoint): Set the ipa's target description.
2881 * linux-x86-low.c: Include tdesc.h.
2882 [__x86_64__] (is_64bit_tdesc): New.
2883 (ps_get_thread_area, x86_get_thread_area): Use it.
2884 (i386_cannot_store_register): Rename to ...
2885 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2886 (i386_cannot_fetch_register): Rename to ...
2887 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2888 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2890 (target_regsets): Rename to ...
2891 (x86_regsets): ... this.
2892 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2894 (x86_siginfo_fixup): Use is_64bit_tdesc.
2895 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2896 (tdesc_x32_avx_linux, tdesc_x32_linux)
2897 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2899 (x86_linux_update_xmltarget): Delete.
2900 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2901 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2902 (AMD64_LINUX_USER64_CS): New.
2903 (x86_linux_read_description): New, based on
2904 x86_linux_update_xmltarget.
2905 (same_process_callback): New.
2906 (x86_arch_setup_process_callback): New.
2907 (x86_linux_update_xmltarget): New.
2908 (x86_regsets_info): New.
2909 (amd64_linux_regs_info): New.
2910 (i386_linux_usrregs_info): New.
2911 (i386_linux_regs_info): New.
2912 (x86_linux_regs_info): New.
2913 (x86_arch_setup): Reimplement.
2914 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2915 (x86_emit_ops): Ditto.
2916 (the_low_target): Adjust. Install x86_linux_regs_info,
2917 x86_cannot_fetch_register, and x86_cannot_store_register.
2918 (initialize_low_arch): New.
2919 * linux-ia64-low.c (tdesc_ia64): Declare.
2920 (ia64_fetch_register): Adjust.
2921 (ia64_usrregs_info, regs_info): New globals.
2922 (ia64_regs_info): New function.
2923 (the_low_target): Adjust.
2924 (initialize_low_arch): New function.
2925 * linux-sparc-low.c (tdesc_sparc64): Declare.
2926 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2928 (sparc_arch_setup): New function.
2929 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2930 (the_low_target): Adjust.
2931 (initialize_low_arch): New function.
2932 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2933 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2934 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2935 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2936 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2937 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2938 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2939 (tdesc_powerpc_isa205_vsx64l): Declare.
2940 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2941 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2942 (ppc_set_pc, ppc_get_hwcap): Adjust.
2943 (ppc_usrregs_info): Forward declare.
2944 (!__powerpc64__) ppc_regmap_adjusted: New global.
2945 (ppc_arch_setup): Adjust to the current process'es target
2947 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2948 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2949 (ppc_store_evrregset): Adjust.
2950 (target_regsets): Rename to ...
2951 (ppc_regsets): ... this, and make static.
2952 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2953 (ppc_regs_info): New function.
2954 (the_low_target): Adjust.
2955 (initialize_low_arch): New function.
2956 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2957 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2958 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2959 (tdesc_s390x_linux64v2): Declare.
2960 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2961 (s390_fill_gregset, s390_store_last_break): Adjust.
2962 (target_regsets): Rename to ...
2963 (s390_regsets): ... this, and make static.
2964 (s390_get_pc, s390_set_pc): Adjust.
2965 (s390_get_hwcap): New target_desc parameter, and use it.
2966 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2967 (s390_arch_setup): Adjust to set the current process'es target
2968 description. Don't adjust the regmap.
2969 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2970 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2971 (regs_info_3264): New globals.
2972 (s390_regs_info): New function.
2973 (the_low_target): Adjust.
2974 (initialize_low_arch): New function.
2975 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2976 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2977 [__mips64] (init_registers_mips_linux)
2978 (init_registers_mips_dsp_linux): Delete defines.
2979 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2980 (have_dsp): New global.
2981 (mips_read_description): New, based on mips_arch_setup.
2982 (mips_arch_setup): Reimplement.
2983 (get_usrregs_info): New function.
2984 (mips_cannot_fetch_register, mips_cannot_store_register)
2985 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2986 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2987 (target_regsets): Rename to ...
2988 (mips_regsets): ... this, and make static.
2989 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2990 (dsp_regs_info, regs_info): New globals.
2991 (mips_regs_info): New function.
2992 (the_low_target): Adjust.
2993 (initialize_low_arch): New function.
2994 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2995 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2997 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2998 (arm_read_description): New, with bits factored from
3000 (arm_arch_setup): Reimplement.
3001 (target_regsets): Rename to ...
3002 (arm_regsets): ... this, and make static.
3003 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3004 (arm_regs_info): New function.
3005 (the_low_target): Adjust.
3006 (initialize_low_arch): New function.
3007 * linux-m68k-low.c (tdesc_m68k): Declare.
3008 (target_regsets): Rename to ...
3009 (m68k_regsets): ... this, and make static.
3010 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3011 (m68k_regs_info): New function.
3012 (m68k_arch_setup): New function.
3013 (the_low_target): Adjust.
3014 (initialize_low_arch): New function.
3015 * linux-sh-low.c (tdesc_sharch): Declare.
3016 (target_regsets): Rename to ...
3017 (sh_regsets): ... this, and make static.
3018 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3019 (sh_regs_info, sh_arch_setup): New functions.
3020 (the_low_target): Adjust.
3021 (initialize_low_arch): New function.
3022 * linux-bfin-low.c (tdesc_bfin): Declare.
3023 (bfin_arch_setup): New function.
3024 (bfin_usrregs_info, regs_info): New globals.
3025 (bfin_regs_info): New function.
3026 (the_low_target): Adjust.
3027 (initialize_low_arch): New function.
3028 * linux-cris-low.c (tdesc_cris): Declare.
3029 (cris_arch_setup): New function.
3030 (cris_usrregs_info, regs_info): New globals.
3031 (cris_regs_info): New function.
3032 (the_low_target): Adjust.
3033 (initialize_low_arch): New function.
3034 * linux-cris-low.c (tdesc_crisv32): Declare.
3035 (cris_arch_setup): New function.
3036 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3037 (cris_regs_info): New function.
3038 (the_low_target): Adjust.
3039 (initialize_low_arch): New function.
3040 * linux-m32r-low.c (tdesc_m32r): Declare.
3041 (m32r_arch_setup): New function.
3042 (m32r_usrregs_info, regs_info): New globals.
3043 (m32r_regs_info): Adjust.
3044 (initialize_low_arch): New function.
3045 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3046 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3047 (tic6x_usrregs_info): Forward declare.
3048 (tic6x_read_description): New function, based on ...
3049 (tic6x_arch_setup): ... this. Reimplement.
3050 (target_regsets): Rename to ...
3051 (tic6x_regsets): ... this, and make static.
3052 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3053 (tic6x_regs_info): New function.
3054 (the_low_target): Adjust.
3055 (initialize_low_arch): New function.
3056 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3057 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3058 (target_regsets): Rename to ...
3059 (xtensa_regsets): ... this, and make static.
3060 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3062 (xtensa_arch_setup, xtensa_regs_info): New functions.
3063 (the_low_target): Adjust.
3064 (initialize_low_arch): New function.
3065 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3066 (nios2_arch_setup): Set the current process'es tdesc.
3067 (target_regsets): Rename to ...
3068 (nios2_regsets): ... this.
3069 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3070 (nios2_regs_info): New function.
3071 (the_low_target): Adjust.
3072 (initialize_low_arch): New function.
3073 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3074 (aarch64_arch_setup): Set the current process'es tdesc.
3075 (target_regsets): Rename to ...
3076 (aarch64_regsets): ... this.
3077 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3078 (aarch64_regs_info): New function.
3079 (the_low_target): Adjust.
3080 (initialize_low_arch): New function.
3081 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3083 (target_regsets): Rename to ...
3084 (tile_regsets): ... this.
3085 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3086 (tile_regs_info): New function.
3087 (tile_arch_setup): Set the current process'es tdesc.
3088 (the_low_target): Adjust.
3089 (initialize_low_arch): New function.
3090 * spu-low.c (tdesc_spu): Declare.
3091 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3092 * win32-arm-low.c (tdesc_arm): Declare.
3093 (arm_arch_setup): New function.
3094 (the_low_target): Install arm_arch_setup instead of
3096 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3097 (init_windows_x86): Rename to ...
3098 (i386_arch_setup): ... this. Set `win32_tdesc'.
3099 (the_low_target): Adjust.
3100 * win32-low.c (win32_tdesc): New global.
3101 (child_add_thread): Don't create the thread cache here.
3102 (do_initial_child_stuff): Set the new process'es tdesc.
3103 * win32-low.h (struct target_desc): Forward declare.
3104 (win32_tdesc): Declare.
3105 * lynx-i386-low.c (tdesc_i386): Declare global.
3106 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3107 * lynx-low.c (lynx_tdesc): New global.
3108 (lynx_add_process): Set the new process'es tdesc.
3109 * lynx-low.h (struct target_desc): Forward declare.
3110 (lynx_tdesc): Declare global.
3111 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3112 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3113 * nto-low.c (nto_tdesc): New global.
3114 (do_attach): Set the new process'es tdesc.
3115 * nto-low.h (struct target_desc): Forward declare.
3116 (nto_tdesc): Declare.
3117 * nto-x86-low.c (tdesc_i386): Declare.
3118 (nto_x86_arch_setup): Set `nto_tdesc'.
3120 2013-06-04 Gary Benson <gbenson@redhat.com>
3122 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3123 to qSupported response when appropriate.
3124 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3125 with nonzero-length annex.
3126 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3127 arguments supplied in annex.
3129 2013-05-31 Doug Evans <dje@google.com>
3132 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3133 64 bits in 64-cross-32 environment.
3135 2013-05-28 Pedro Alves <palves@redhat.com>
3137 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3138 (aarch64-without-fpu.c): Delete rule.
3139 * configure.srv (aarch64*-*-linux*): Remove references to
3140 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3141 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3144 2013-05-24 Pedro Alves <palves@redhat.com>
3146 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3147 instead of strchr/decode_address. Error if the range isn't split
3148 with a ','. Don't assume there's be a ':' in the action.
3150 2013-05-23 Yao Qi <yao@codesourcery.com>
3151 Pedro Alves <palves@redhat.com>
3153 * linux-low.c (lwp_in_step_range): New function.
3154 (linux_wait_1): If the thread was range stepping and stopped
3155 outside the stepping range, report the stop to GDB. Otherwise,
3156 continue stepping. Add range stepping debug output.
3157 (linux_set_resume_request): Copy the step range from the resume
3159 (linux_supports_range_stepping): New.
3160 (linux_target_ops) <supports_range_stepping>: Set to
3161 linux_supports_range_stepping.
3162 * linux-low.h (struct linux_target_ops)
3163 <supports_range_stepping>: New field.
3164 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3165 * linux-x86-low.c (x86_supports_range_stepping): New.
3166 (the_low_target) <supports_range_stepping>: Set to
3167 x86_supports_range_stepping.
3168 * server.c (handle_v_cont): Handle 'r' action.
3169 (handle_v_requests): Append ";r" if the target supports range
3171 * target.h (struct thread_resume) <step_range_start,
3172 step_range_end>: New fields.
3173 (struct target_ops) <supports_range_stepping>:
3175 (target_supports_range_stepping): New macro.
3177 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3179 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3180 confusion in comment.
3182 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3184 * lynx-low.c (struct process_info_private): New type.
3185 (lynx_add_process): New function.
3186 (lynx_create_inferior, lynx_attach): Replace calls to
3187 add_process by calls to lynx_add_process.
3188 (lynx_resume): If PTID is null, then try using
3189 current_process()->private->last_wait_event_ptid.
3191 (lynx_clear_inferiors): Delete. The contents of that function
3192 has been inlined in lynx_mourn;
3193 (lynx_wait_1): Save the ptid in the process's private data.
3194 (lynx_mourn): Free the process' private data. Replace call
3195 to lynx_clear_inferiors by call to clear_inferiors.
3197 2013-05-17 Yao Qi <yao@codesourcery.com>
3199 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3202 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3204 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3205 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3206 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3207 PT_TEXT_END_ADDR guards. Update comments.
3208 (linux_target_op) <read_offsets>: Conditionally define to
3209 linux_read_offsets if the target is UCLIBC and if it defines
3210 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3212 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3213 Andrew Jenner <andrew@codesourcery.com>
3215 * Makefile.in (SFILES): Add linux-nios2-low.c.
3216 (clean): Add action to delete nios2-linux.c.
3217 (nios2-linux.c): New rule.
3218 * configure.srv: Add nios2*-*-linux*.
3219 * linux-nios2-low.c: New.
3221 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3223 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3225 2013-04-25 Hui Zhu <hui@codesourcery.com>
3228 * ax.c (ax_printf): Add fflush.
3230 2013-04-22 Tom Tromey <tromey@redhat.com>
3232 * Makefile.in (SFILES): Add filestuff.c.
3233 (OBS): Add filestuff.o.
3234 (filestuff.o): New target.
3235 * config.in, configure: Rebuild.
3236 * configure.ac: Check for fdwalk, pipe2.
3238 2013-04-17 Pedro Alves <palves@redhat.com>
3240 * configure.ac (USE_THREAD_DB): Delete variable.
3241 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3242 Don't AC_SUBST USE_THREAD_DB.
3243 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3244 * config.in, configure: Regenerate.
3246 2013-04-16 Pedro Alves <palves@redhat.com>
3248 * linux-low.h (struct lwp_info) <thread_known>: Move under
3249 the USE_THREAD_DB #ifdef.
3251 2013-04-16 Pedro Alves <palves@redhat.com>
3253 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3254 (linux-low.o): Delete rule.
3255 * linux-low.h: Always include "gdb_thread_db.h" instead of
3256 conditionally including thread_db.h.
3257 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3260 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3262 * Makefile.in (install-only): Fix make install regression.
3264 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3266 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3267 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3269 * gdbserver.1: Remove.
3271 2013-03-22 Pedro Alves <palves@redhat.com>
3273 * linux-low.c (handle_extended_wait): Don't call
3274 linux_enable_event_reporting.
3276 2013-03-15 Tony Theodore <tonyt@logyst.com>
3279 * Makefile.in (SHELL): Use @SHELL@.
3281 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3283 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3286 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3288 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3289 Remove extraneous NULL element.
3291 2013-03-13 Yao Qi <yao@codesourcery.com>
3293 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3294 'V' block in trace frame.
3296 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3298 * target.h (struct target_ops): Add btrace ops.
3299 (target_supports_btrace): New macro.
3300 (target_enable_btrace): New macro.
3301 (target_disable_btrace): New macro.
3302 (target_read_btrace): New macro.
3303 * gdbthread.h (struct thread_info): Add btrace field.
3304 * server.c: Include btrace-common.h.
3305 (handle_btrace_general_set): New function.
3306 (handle_btrace_enable): New function.
3307 (handle_btrace_disable): New function.
3308 (handle_general_set): Call handle_btrace_general_set.
3309 (handle_qxfer_btrace): New function.
3310 (struct qxfer qxfer_packets[]): Add btrace entry.
3311 * inferiors.c (remove_thread): Disable btrace.
3312 * linux-low: Include linux-btrace.h.
3313 (linux_low_enable_btrace): New function.
3314 (linux_low_read_btrace): New function.
3315 (linux_target_ops): Add btrace ops.
3316 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3317 Add srv_linux_btrace=yes.
3318 (x86_64-*-linux*): Add linux-btrace.o.
3319 Add srv_linux_btrace=yes.
3320 * configure.ac: Define HAVE_LINUX_BTRACE.
3321 * config.in: Regenerated.
3322 * configure: Regenerated.
3324 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3326 * server.c (handle_qxfer): Preserve error message if -3 is
3328 (qxfer): Document the -3 return value.
3330 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3332 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3333 (linux_btrace_h): New variable.
3334 (linux-btrace.o): New rule.
3336 2013-03-08 Stan Shebs <stan@codesourcery.com>
3337 Hafiz Abid Qadeer <abidh@codesourcery.com>
3339 * tracepoint.c (trace_buffer_size): New global.
3340 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3341 (init_trace_buffer): Change to one-argument function. Allocate
3342 trace buffer memory.
3343 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3344 handle QTBuffer:size packet.
3345 (cmd_bigqtbuffer_size): New function.
3346 (initialize_tracepoint): Call init_trace_buffer with
3347 DEFAULT_TRACE_BUFFER_SIZE.
3348 * server.c (handle_query): Add QTBuffer:size in the
3351 2013-03-07 Yao Qi <yao@codesourcery.com>
3353 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3354 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3356 (cmd_qtsp): Adjust condition. Do post increment.
3357 Set cur_action and cur_step_action back to 0.
3359 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3362 * linux-low.c (linux_write_memory): Return early success if LEN is
3365 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3367 * configure.srv: Add x86_64-*-cygwin* as target.
3369 2013-02-28 Tom Tromey <tromey@redhat.com>
3371 * configure.ac: Invoke AC_SYS_LARGEFILE.
3372 * configure, config.in: Rebuild.
3374 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3376 * win32-low.c: Throughout, fix format strings and casts of
3377 printf-like functions to avoid type related warnings on all
3379 (get_child_debug_event): Print dwDebugEventCode as hex since
3380 that's how it's usually documented.
3382 2013-02-28 Yao Qi <yao@codesourcery.com>
3384 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3387 2013-02-27 Jiong Wang <jiwang@tilera.com>
3389 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3390 (reg-tilegx32.c): New rule.
3391 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3392 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3393 different register info initializer according to elf class.
3394 (init_registers_tilgx32): New function. The tilegx32 register info
3396 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3397 (tile_store_gregset): Likewise.
3399 2013-02-27 Yao Qi <yao@codesourcery.com>
3401 * server.c (process_point_options): Print debug message when
3402 debug_threads is true.
3404 2013-02-26 Yao Qi <yao@codesourcery.com>
3406 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3408 2013-02-19 Pedro Alves <palves@redhat.com>
3409 Kai Tietz <ktietz@redhat.com>
3413 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3414 instead of strtoul to extract address from packet.
3415 (process_serial_event) <'z'>: Likewise.
3417 2013-02-18 Yao Qi <yao@codesourcery.com>
3419 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3421 2013-02-14 Pedro Alves <palves@redhat.com>
3425 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3426 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3428 2013-02-14 Pedro Alves <palves@redhat.com>
3430 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3432 2013-02-14 Pedro Alves <palves@redhat.com>
3434 * tracepoint.c (save_string): Delete.
3435 (add_tracepoint_action): Use savestring instead of save_string.
3437 2013-02-12 Pedro Alves <palves@redhat.com>
3439 * linux-xtensa-low.c: Ditto.
3440 * xtensa-xtregs.c: Ditto.
3442 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3444 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3447 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3449 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3450 aarch64_num_wp_regs and aarch64_num_bp_regs to
3451 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3453 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3455 * linux-aarch64-low.c (ps_get_thread_area): Replace
3456 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3458 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3459 Marcus Shawcroft <marcus.shawcroft@arm.com>
3460 Nigel Stephens <nigel.stephens@arm.com>
3461 Yufeng Zhang <yufeng.zhang@arm.com>
3463 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3464 (aarch64.c, aarch64-without-fpu.c): New targets.
3465 * configure.srv (aarch64*-*-linux*): New.
3466 * linux-aarch64-low.c: New file.
3468 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3470 * linux-low.c (handle_extended_wait, linux_create_inferior)
3471 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3472 (dequeue_one_deferred_signal, linux_resume_one_thread)
3473 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3474 (linux_tracefork_grandchild, linux_test_for_tracefork)
3475 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3476 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3477 where the argument is 0.
3479 2013-01-25 Yao Qi <yao@codesourcery.com>
3481 * event-loop.c: Include "queue.h".
3482 (gdb_event_p): New typedef.
3483 (struct gdb_event) <next_event>: Remove.
3484 (event_queue): Change to QUEUE(gdb_event_p).
3485 (async_queue_event): Remove.
3486 (gdb_event_xfree): New.
3487 (initialize_event_loop): New.
3488 (process_event): Use API from QUEUE.
3489 (wait_for_event): Likewise.
3490 * server.c (main): Call initialize_event_loop.
3491 * server.h (initialize_event_loop): Declare.
3493 2013-01-18 Yao Qi <yao@codesourcery.com>
3495 * ax.h (struct eval_agent_expr_context): New.
3496 (gdb_eval_agent_expr): Update declaration.
3497 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3498 TFRAME. Add new argument CTX.
3499 * server.h (struct eval_agent_expr_context): Declare.
3500 (agent_mem_read, agent_tsv_read): Update declaration.
3501 (agent_mem_read_string): Likewise.
3502 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3503 (add_traceframe_block): Add new argument TPOINT.
3504 Increase TPOINT->traceframe_usage.
3505 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3506 eval_tracepoint_agent_expr.
3507 (condition_true_at_tracepoint): Likewise.
3508 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3509 (agent_mem_read_string, agent_tsv_read): Likewise.
3511 2013-01-16 Yao Qi <yao@codesourcery.com>
3513 * linux-low.c (linux_resume_one_lwp): Don't check
3514 'lwp->bp_reinsert != 0'.
3516 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3517 Pedro Alves <palves@redhat.com>
3519 * lynx-low.c (ptrace_request_to_str): Define a temporary
3520 macro and use it to simplify this function's implementation.
3522 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3524 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3527 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3529 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3533 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3535 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3537 * lynx-low.c (lynx_resume): Use the resume_info parameter
3538 to determine the ptid for the lynx_ptrace call, unless
3539 it is equal to minus_one_ptid, in which case we use the
3540 ptid of the current_inferior.
3541 (lynx_wait_1): After having received a thread create/exit
3542 event, resume the inferior's execution using the signaling
3543 thread's ptid, rather than the old ptid.
3545 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3547 * lynx-low.c (lynx_resume): Delete variable ret.
3549 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3551 * gdbreplay.c (gdbreplay_version): Update copyright year.
3552 * server.c (gdbserver_version): Likewise.
3554 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3556 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3559 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3561 * lynx-low.c (ptrace_request_to_str): Add handling for
3564 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3566 * lynx-low.c (lynx_attach): Delete variable new_process.
3568 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3570 * lynx-low.c (lynx_create_inferior): Delete variable
3573 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3575 * lynx-low.c (ptrace_request_to_str): Do not handle
3576 PTRACE_GETTHREADLIST if this macro does not exist.
3578 2012-12-15 Yao Qi <yao@codesourcery.com>
3580 * Makefile.in (OBS): Add notif.o.
3581 * notif.c, notif.h: New.
3582 * server.c: Include "notif.h".
3583 (struct vstop_notif) <next>: Remove.
3585 (queue_stop_reply): Update.
3586 (push_event, send_next_stop_reply): Remove.
3587 (discard_queued_stop_replies): Update.
3588 (notif_stop): New variable.
3589 (handle_v_stopped): Remove.
3590 (handle_v_requests): Don't call handle_v_stopped. Call
3591 handle_ack_notif instead.
3592 (queue_stop_reply_callback): Call notif_event_enque instead
3593 of queue_stop_reply.
3594 (handle_status): Don't call send_next_stop_reply, call
3595 notif_write_event instead.
3596 (kill_inferior_callback): Likewise.
3597 (detach_or_kill_inferior_callback): Likewise.
3598 (main): Call initialize_notif.
3599 (process_serial_event): Call QUEUE_is_empty.
3600 (handle_target_event): Call notif_push instead of push event.
3601 * server.h (push_event): Remove declaration.
3603 2012-12-10 Tom Tromey <tromey@redhat.com>
3605 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3606 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3609 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3610 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3611 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3612 (amd64-linux-ipa.o, ax.o): Rewrite.
3613 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3614 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3615 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3616 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3617 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3618 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3619 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3620 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3621 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3622 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3623 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3624 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3625 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3626 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3627 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3628 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3629 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3630 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3631 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3632 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3633 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3634 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3635 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3636 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3637 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3638 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3639 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3640 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3641 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3642 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3643 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3644 (reg-tilegx.o): Remove.
3645 (all_object_files): New macro.
3646 Include .deps files.
3647 * aclocal.m4, configure: Rebuild.
3648 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3649 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3650 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3652 2012-12-05 Tom Tromey <tromey@redhat.com>
3655 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3657 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3659 * configure.ac: Check for linux/perf_event.h.
3660 * config.in: Regenerated.
3661 * configure: Regenerated.
3663 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3665 * hostio.c (handle_readlink): Decrease buffer size
3666 parameter passed to readlink by one byte.
3668 2012-11-26 Yao Qi <yao@codesourcery.com>
3670 * configure.ac (build_warnings): Append '-Wempty-body'.
3671 * configure: Regenerated.
3672 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3675 2012-11-15 Pierre Muller <muller@sourceware.org>
3677 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3678 * config.in: Regenerate.
3679 * configure: Regenerate.
3680 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3681 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3682 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3683 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3685 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3686 instead of <sys/wait.h> header.
3687 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3689 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3691 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3692 (various make rules): Remove -DGDBSERVER
3694 2012-11-09 Yao Qi <yao@codesourcery.com>
3696 * spu-low.c (current_ptid): Move it to ..
3697 * gdbthread.h: ... here. New.
3698 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3699 * server.c (myresume, process_serial_event): Likewise.
3700 * thread-db.c (thread_db_find_new_threads): Likewise.
3701 * tracepoint.c (run_inferior_command): Likewise.
3703 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3705 * server.c (handle_search_memory_1): Include access length in
3708 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3710 * linux-crisv32-low.c: Fix compile errors.
3712 2012-09-04 Yao Qi <yao@codesourcery.com>
3714 * tracepoint.c (cmd_qtsv): Adjust debug message.
3715 Don't check CUR_TPOINT.
3717 2012-08-28 Yao Qi <yao@codesourcery.com>
3719 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3720 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3721 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3722 Remove declarations of xmalloc, xreallloc, xstrdup and
3724 * Makefile.in (libiberty_h): New.
3725 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3726 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3728 2012-08-23 Yao Qi <yao@codesourcery.com>
3730 * server.h: Remove declaration of 'xsnprintf'.
3732 2012-08-22 Keith Seitz <keiths@redhat.com>
3734 * server.h: Include build-gnulib-gbserver/config.h.
3735 * gdbreplay.c: Likewise.
3737 2012-08-08 Doug Evans <dje@google.com>
3739 * Makefile.in (SFILES): Add gdb_vecs.c.
3740 (OBS): Add gdb_vecs.o.
3741 (gdb_vecs_h, host_defs_h): New variables.
3742 (thread-db.o): Add $(gdb_vecs_h) dependency.
3743 (gdb_vecs.o): New rule.
3744 * thread-db.c: #include "gdb_vecs.h".
3745 (thread_db_load_search): Use a vector to iterate over path elements.
3746 Handle text appearing after "$pdir".
3748 * configure.ac: Add check for strstr.
3749 * config.in: Regenerate.
3750 * configure: Regenerate.
3752 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3754 * hostio.c (handle_pread): If pread fails, fall back to attempting
3756 (handle_pwrite): Likewise for pwrite.
3758 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3760 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3761 between unsupported TYPE and unimplementable ADDR/LEN combination.
3762 (arm_insert_point): Act on new return value.
3764 2012-07-31 Pedro Alves <palves@redhat.com>
3766 * server.c (process_point_options): Only skip tokens if we find
3767 one that is unrecognized. Don't treat 'X' specially while
3768 skipping unrecognized tokens.
3770 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3772 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3773 to 4-byte-align HW breakpoint addresses for Thumb.
3775 2012-07-27 Yao Qi <yao@codesourcery.com>
3779 * server.h: Declare gdb_agent_about_to_close.
3780 * target.c (kill_inferior): Include "agent.h".
3781 New. Send command 'kill'.
3782 * target.h (kill_inferior): Removed macro.
3783 * tracepoint.c (gdb_agent_about_to_close): New.
3784 (gdb_agent_helper_thread): Handle command 'close'.
3785 Wait endlessly until the inferior stops.
3786 Install gdb_agent_remove_socket to atexit hook.
3787 (agent_socket_name): New static variable.
3788 (gdb_agent_socket_init): Replace local variable 'name' with
3789 'agent_socket_name'.
3790 (gdb_agent_remove_socket): New.
3792 2012-07-27 Yao Qi <yao@codesourcery.com>
3794 * server.c (process_point_options): Stop at 'X' when parsing.
3796 2012-07-19 Michael Eager <eager@eagercon.com>
3798 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3800 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3801 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3802 hardware breakpoint.
3804 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3806 * gdbserver/linux-low.c (initialize_low): Call
3807 linux_ptrace_init_warnings.
3809 2012-07-02 Doug Evans <dje@google.com>
3811 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3814 2012-07-02 Stan Shebs <stan@codesourcery.com>
3816 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3817 (ax.o): Add it to build rule.
3819 (OBS): Add format.o.
3820 (IPA_OBS): Add format.o.
3821 * server.c (handle_query): Claim support for breakpoint commands.
3822 (process_point_options): Add command case.
3823 (process_serial_event): Leave running if there are printfs in
3825 * mem-break.h (any_persistent_commands): Declare.
3826 (add_breakpoint_commands): Declare.
3827 (gdb_no_commands_at_breakpoint): Declare.
3828 (run_breakpoint_commands): Declare.
3829 * mem-break.c (struct point_command_list): New struct.
3830 (struct breakpoint): New field command_list.
3831 (any_persistent_commands): New function.
3832 (add_commands_to_breakpoint): New function.
3833 (add_breakpoint_commands): New function.
3834 (gdb_no_commands_at_breakpoint): New function.
3835 (run_breakpoint_commands): New function.
3836 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3838 * ax.c: Include format.h.
3839 (ax_printf): New function.
3840 (gdb_eval_agent_expr): Add printf opcode.
3842 2012-06-13 Yao Qi <yao@codesourcery.com>
3844 * server.c (start_inferior): Remove duplicated writes to fields
3845 'last_resume_kind' and 'last_status' of 'current_inferior'.
3847 2012-06-12 Yao Qi <yao@codesourcery.com>
3848 Pedro Alves <palves@redhat.com>
3850 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3852 * server.c (handle_v_cont): Extend comment.
3854 2012-06-11 Yao Qi <yao@codesourcery.com>
3856 * linux-low.c (linux_attach): Add 'static'.
3858 2012-06-06 Yao Qi <yao@codesourcery.com>
3860 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3862 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3864 Fix gcc -flto compilation warning.
3865 * server.c (main): Make variable multi_mode and attach volatile.
3867 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3869 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3870 if the platform doesn't know about it.
3872 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3874 * Makefile.in (SFILES): Add linux-tile-low.c.
3875 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3876 * configure.srv: Handle tilegx-*-linux*.
3877 * linux-tile-low.c: New file.
3879 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3881 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3883 2012-05-24 Pedro Alves <palves@redhat.com>
3887 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3889 2012-05-24 Pedro Alves <palves@redhat.com>
3893 Replace target_signal with gdb_signal throughout.
3895 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3897 * linux-low.c (linux_store_registers): Avoid the copying sequence
3898 when no data has been retrieved by ptrace.
3900 2012-05-22 Will Deacon <will.deacon@arm.com>
3902 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3903 Include asm/ptrace.h.
3904 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3907 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3909 * linux-low.c (linux_store_registers): Don't re-retrieve data
3910 with ptrace that has already been obtained from /proc. Always
3911 copy any data retrieved with ptrace to the buffer supplied.
3913 2012-05-11 Yao Qi <yao@codesourcery.com>
3914 Pedro Alves <palves@redhat.com>
3916 * linux-low.c (enum stopping_threads_kind): New.
3917 (stopping_threads): Change type to `enum stopping_threads_kind'.
3918 (handle_extended_wait): If stopping and suspending threads, leave
3919 the new_lwp suspended too.
3920 (linux_wait_for_event): Adjust.
3921 (stop_all_lwps): Set `stopping_threads' to
3922 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3923 whether we're suspending threads or just stopping them. Assert no
3926 2012-04-29 Yao Qi <yao@codesourcery.com>
3928 * server.h: Move some code to ...
3929 * gdbthread.h: ... here. New.
3930 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3931 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3932 (nto-low.o, win32-low.o): Likewise.
3933 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3934 * regcache.c, remote-utils.c, server.c: Likewise.
3935 * target.c, tracepoint.c, win32-low.c: Likewise.
3937 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3939 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3940 (PTRACE_ARG4_TYPE): Likewise.
3941 (PTRACE_XFER_TYPE): Likewise.
3942 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3943 ptrace to PTRACE_ARG3_TYPE.
3944 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3945 (PTRACE_ARG4_TYPE): Likewise.
3946 (PTRACE_XFER_TYPE): Likewise.
3947 (linux_detach_one_lwp): Cast fourth argument of
3948 ptrace to long then PTRACE_ARG4_TYPE.
3949 (regsets_fetch_inferior_registers): Cast third argument of
3950 ptrace to long then PTRACE_ARG3_TYPE.
3951 (regsets_store_inferior_registers): Likewise.
3953 2012-04-20 Pedro Alves <palves@redhat.com>
3955 * configure: Regenerate.
3957 2012-04-19 Pedro Alves <palves@redhat.com>
3959 * Makefile.in (GNULIB_BUILDDIR): New.
3960 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3961 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3962 (all, install-only, uninstall, clean-info, all-lib, clean): No
3963 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3964 (maintainer-clean realclean distclean): Use subdir_do.
3966 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3967 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3968 * acinclude.m4: Include acx_configure_dir.m4.
3969 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3970 calls. Call AC_PROG_RANLIB. Configure gnulib using
3973 (GNULIB_STDINT_H): Adjust.
3974 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3975 * gdbreplay.c: Include build-gnulib/config.h.
3976 * server.h: Likewise.
3977 * aclocal.m4: Regenerate.
3978 * config.in: Regenerate.
3979 * configure: Regenerate.
3981 2012-04-19 Pedro Alves <palves@redhat.com>
3983 * Makefile.in (LIBGNU, INCGNU): Adjust.
3984 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3985 (all, install-only, uninstall, clean-info, all-lib, clean)
3986 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3987 * configure.ac: Adjust AC_OUTPUT output.
3988 * aclocal.m4: Regenerate.
3989 * configure: Regenerate.
3991 2012-04-19 Pedro Alves <palves@redhat.com>
3993 * Makefile.in (generated_files): New.
3994 (server_h): Remove the explicit dependency on config.h, and depend
3995 on $generated_files.
3997 2012-04-19 Pedro Alves <palves@redhat.com>
3999 * Makefile.in (INCGNU): Add -Ignulib.
4001 2012-04-19 Pedro Alves <palves@redhat.com>
4003 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4004 (INCGNU): ... this, and spell out -I here.
4005 (GNULIB_LIB): Rename to ...
4007 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4009 2012-04-19 Pedro Alves <palves@redhat.com>
4011 * config.in: Regenerate.
4013 2012-04-19 Pedro Alves <palves@redhat.com>
4015 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4016 * server.h (memmem): Remove declaration.
4017 * config.in: Regenerate.
4018 * configure: Regenerate.
4020 2012-04-19 Yao Qi <yao@codesourcery.com>
4022 * Makefile.in (SFILES): Add common/vec.c.
4026 2012-04-19 Yao Qi <yao@codesourcery.com>
4028 * remote-utils.c (prepare_resume_reply): Replace with macro
4029 target_core_of_thread.
4030 * server.c (handle_qxfer_threads_proper): Likewise.
4031 * target.h (traget_core_of_thread): New macro.
4033 2012-04-18 Pedro Alves <palves@redhat.com>
4035 * aclocal.m4: Regenerate.
4036 * configure: Regenerate.
4038 2012-04-16 Yao Qi <yao@codesourcery.com>
4040 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4041 duplicated on address.
4043 2012-04-16 Yao Qi <yao@codesourcery.com>
4045 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4046 (struct tracepoint_action_ops) <send>: New field.
4047 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4048 (agent_expr_send, x_tracepoint_action_send): New.
4049 (l_tracepoint_action_send): New.
4050 (cmd_qtdp): Download and install tracepoint
4051 according to `use_agent'.
4052 (run_inferior_command): Add one more parameter `len'.
4054 (tracepoint_send_agent): New.
4055 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4057 2012-04-16 Yao Qi <yao@codesourcery.com>
4059 * tracepoint.c (download_tracepoints): Moved to ...
4060 (cmd_qtstart): ... here.
4062 2012-04-14 Yao Qi <yao@codesourcery.com>
4064 * tracepoint.c: Include inttypes.h.
4065 (struct collect_memory_action): Use sized types.
4066 (struct tracepoint): Likewise.
4067 (cmd_qtdp, stop_tracing): Update print specifiers.
4068 (cmd_qtp, response_tracepoint): Likewise.
4069 (collect_data_at_tracepoint): Likewise.
4070 (collect_data_at_step): Likewise.
4072 2012-04-14 Yao Qi <yao@codesourcery.com>
4074 Import gnulib module inttypes.
4075 * aclocal.m4, config.in, configure: Regenerated.
4077 2012-04-14 Yao Qi <yao@codesourcery.com>
4079 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4080 Makefile and config.status at last.
4082 2012-04-13 Yao Qi <yao@codesourcery.com>
4084 * tracepoint.c: Include stdint.h unconditionally.
4086 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4088 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4089 on BFD_HAVE_SYS_PROCFS_TYPE.
4090 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4091 * configure: Regenerate.
4092 * config.in: Likewise.
4094 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4096 * Makefile.in (clean): Also remove x32.c x32-linux.c
4097 x32-avx.c x32-avx-linux.c.
4098 (x32.o): New target.
4100 (x32-linux.o): Likewise.
4101 (x32-linux.c): Likewise.
4102 (x32-avx.o): Likewise.
4103 (x32-avx.c): Likewise.
4104 (x32-avx-linux.o): Likewise.
4105 (x32-avx-linux.c): Likewise.
4107 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4108 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4109 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4110 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4111 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4112 i386/x32-avx-linux.xml.
4114 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4115 (init_registers_x32_avx_linux): Likwise.
4116 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4117 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4119 2012-04-13 Pedro Alves <palves@redhat.com>
4121 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4122 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4123 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4124 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4127 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4129 * linux-x86-low.c (compat_x32_clock_t): New.
4130 (compat_x32_siginfo_t): Likewise.
4131 (compat_x32_siginfo_from_siginfo): Likewise.
4132 (siginfo_from_compat_x32_siginfo): Likewise.
4133 (linux_is_elf64): Likewise.
4134 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4135 and siginfo_from_compat_x32_siginfo for x32.
4136 (x86_arch_setup): Set linux_is_elf64.
4138 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4141 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4143 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4144 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4145 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4146 compatible with process.
4148 2012-04-12 Yao Qi <yao@codesourcery.com>
4150 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4151 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4152 (install-only, install-info, clean): Handle sub dir gnulib.
4153 (all-lib, am--refresh): New targets.
4154 (memmem.o): Remove target.
4155 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4156 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4157 (AC_REPLACE_FUNCS): Remove memmem.
4158 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4159 (AC_OUTPUT): Generate Makefile in gnulib/.
4160 * aclocal.m4, config.in, configure: Regenerated.
4162 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4164 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4166 2012-04-05 Pedro Alves <palves@redhat.com>
4168 -Werror=strict-aliasing
4170 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4173 2012-04-04 Pedro Alves <palves@redhat.com>
4175 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4176 (sparc_store_gregset_from_stack, sparc_store_gregset)
4177 (sparc_breakpoint_at): Fix formatting.
4179 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4181 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4183 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4184 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4185 * config.in: Regenerate.
4186 * configure: Likewise.
4188 2012-03-29 Pedro Alves <palves@redhat.com>
4190 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4191 Correct ptrace arguments.
4193 2012-03-28 Pedro Alves <palves@redhat.com>
4195 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4196 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4197 (IA64_FR1_REGNUM): New defines.
4198 (ia64_fetch_register): New.
4199 (the_low_target): Install it.
4200 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4202 * linux-low.c (linux_fetch_registers): Try the
4203 the_low_target.fetch_register hook first.
4205 * linux-arm-low.c (the_low_target): Adjust.
4206 * linux-bfin-low.c (the_low_target): Adjust.
4207 * linux-cris-low.c (the_low_target): Adjust.
4208 * linux-crisv32-low.c (the_low_target): Adjust.
4209 * linux-m32r-low.c (the_low_target): Adjust.
4210 * linux-m68k-low.c (the_low_target): Adjust.
4211 * linux-mips-low.c (the_low_target): Adjust.
4212 * linux-ppc-low.c (the_low_target): Adjust.
4213 * linux-s390-low.c (the_low_target): Adjust.
4214 * linux-sh-low.c (the_low_target): Adjust.
4215 * linux-sparc-low.c (the_low_target): Adjust.
4216 * linux-tic6x-low.c (the_low_target): Adjust.
4217 * linux-x86-low.c (the_low_target): Adjust.
4218 * linux-xtensa-low.c (the_low_target): Adjust.
4220 2012-03-26 Pedro Alves <palves@redhat.com>
4222 * server.c (handle_qxfer_libraries): Don't bail early if
4223 the_target->qxfer_libraries_svr4 is not NULL.
4225 2012-03-26 Pedro Alves <palves@redhat.com>
4227 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4229 2012-03-23 Pedro Alves <palves@redhat.com>
4231 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4232 "library-list-svr4" element's start tag when the the DSO list is
4235 2012-03-23 Pedro Alves <palves@redhat.com>
4237 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4238 a variable whose type size is the same as the inferior's pointer
4241 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4243 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4245 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4246 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4247 * linux-low.h: Include <signal.h>.
4248 (struct siginfo): Remove forward declaration.
4249 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4252 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4254 * .gitignore: Ignore more files.
4256 2012-03-19 Pedro Alves <palves@redhat.com>
4257 Jan Kratochvil <jan.kratochvil@redhat.com>
4259 * server.c (cont_thread, general_thread): Add describing comments.
4260 (start_inferior): Clear `cont_thread'.
4261 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4264 2012-03-15 Yao Qi <yao@codesourcery.com>
4266 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4268 (cmd_qtdp): ... here.
4270 2012-03-15 Yao Qi <yao@codesourcery.com>
4272 * tracepoint.c (struct tracepoint_action_ops): New.
4273 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4274 (m_tracepoint_action_download): New.
4275 (r_tracepoint_action_download): New.
4276 (x_tracepoint_action_download): New.
4277 (l_tracepoint_action_download): New.
4278 (add_tracepoint_action): Install `action->ops' according type.
4279 (download_tracepoint_1): Move code `download' function pointer
4280 of various tracepoint_action_ops.
4282 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4284 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4285 linux_ptrace_attach_warnings.
4287 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4289 * Makefile.in (linux-ptrace.o): New.
4290 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4291 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4292 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4293 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4294 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4296 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4298 2012-03-08 Yao Qi <yao@codesourcery.com>
4299 Pedro Alves <palves@redhat.com>
4301 Fix PR server/13392.
4302 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4304 * tracepoint.c (remove_tracepoint): New.
4305 (cmd_qtdp): Call remove_tracepoint when failed to install.
4307 2012-03-07 Pedro Alves <palves@redhat.com>
4309 * linux-low.c (get_detach_signal): New.
4310 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4311 Pass on pending signals to PTRACE_DETACH. Check the result of the
4313 * server.c (program_signals, program_signals_p): New.
4314 (handle_general_set): Handle QProgramSignals.
4315 * server.h (program_signals, program_signals_p): Declare.
4317 2012-03-05 Pedro Alves <palves@redhat.com>
4318 Jan Kratochvil <jan.kratochvil@redhat.com>
4320 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4323 2012-03-03 Yao Qi <yao@codesourcery.com>
4325 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4326 agent_look_up_symbols.
4328 2012-03-03 Yao Qi <yao@codesourcery.com>
4330 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4331 (linux-x86-low.o): Likewise.
4332 * server.h: Remove in_process_agent_loaded.
4333 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4337 2012-03-03 Yao Qi <yao@codesourcery.com>
4339 * tracepoint.c (gdb_agent_capability): New global.
4340 (in_process_agent_loaded_ust): Renamed to
4341 `in_process_agent_supports_ust'.
4343 (in_process_agent_supports_ust): Call agent_capability_check.
4344 (clear_installed_tracepoints): Assert that agent supports
4347 2012-03-03 Yao Qi <yao@codesourcery.com>
4349 * linux-low.c (linux_supports_agent): New.
4350 (linux_target_ops): Initialize field `supports_agent' with
4351 linux_supports_agent.
4352 * target.h (struct target_ops) <supports_agent>: New.
4353 (target_supports_agent): New macro.
4354 * server.c (handle_general_set): Handle packet 'QAgent'.
4355 (handle_query): Send `QAgent+'.
4356 * Makefile.in (server.o): Depends on agent.h.
4358 2012-03-03 Yao Qi <yao@codesourcery.com>
4360 * Makefile.in (OBS): Add agent.o.
4361 Add new rule for agent.o.
4362 Track dependence of tracepoint.c on agent.h.
4363 * tracepoint.c (run_inferior_command_1):
4364 (run_inferior_command): Call agent_run_command.
4365 (gdb_ust_connect_sync_socket): Deleted. Move it to
4367 (resume_thread, stop_thread): Likewise.
4368 (gdb_ust_socket_init): Renamed to ...
4369 (gdb_agent_socket_init): ... New.
4370 (gdb_ust_thread): Renamed to ...
4371 (gdb_agent_helper_thread): ... New.
4372 (gdb_ust_init): Move some code to ...
4373 (gdb_agent_init): ... here. New.
4374 [HAVE_UST]: Call gdb_ust_init.
4375 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4376 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4377 * config.in, configure: Regenerated.
4379 2012-03-02 Pedro Alves <palves@redhat.com>
4381 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4382 * linux-low.c (struct simple_pid_list): New.
4383 (stopped_pids): New a struct simple_pid_list pointer.
4384 (add_to_pid_list, pull_pid_from_list): New.
4385 (handle_extended_wait): Don't assume the first signal new children
4386 report is SIGSTOP. Adjust call to pull_pid_from_list.
4387 (linux_wait_for_lwp): Adjust.
4389 2012-03-02 Yao Qi <yao@codesourcery.com>
4391 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4394 2012-03-02 Yao Qi <yao@codesourcery.com>
4396 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4397 `stop_pc' and `tpoint'. Update caller.
4399 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4401 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4402 * linux-low.c (use_linux_regsets): New macro.
4403 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4404 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4405 (linux_register_in_regsets): New function.
4406 (usr_fetch_inferior_registers): Skip registers covered by
4408 (usr_store_inferior_registers): Likewise.
4409 (usr_fetch_inferior_registers): New macro.
4410 (usr_store_inferior_registers): Likewise.
4411 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4412 (linux_store_registers): Likewise.
4413 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4415 (init_registers_mips64_dsp_linux): Likewise.
4416 (init_registers_mips_linux): New macro.
4417 (init_registers_mips_dsp_linux): Likewise.
4418 (mips_dsp_num_regs): Likewise.
4419 (DSP_BASE, DSP_CONTROL): New fallback macros.
4420 (mips_base_regs): New macro.
4421 (mips_regmap): Use it. Fix the size.
4422 (mips_dsp_regmap): New variable.
4423 (mips_dsp_regset_bitmap): Likewise.
4424 (mips_arch_setup): New function.
4425 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4427 (mips_cannot_store_register): Likewise.
4428 (the_low_target): Update .arch_setup, .num_regs and .regmap
4429 initializers. Add .regset_bitmap initializer.
4430 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4432 * linux-bfin-low.c (the_low_target): Likewise.
4433 * linux-cris-low.c (the_low_target): Likewise.
4434 * linux-crisv32-low.c (the_low_target): Likewise.
4435 * linux-ia64-low.c (the_low_target): Likewise.
4436 * linux-m32r-low.c (the_low_target): Likewise.
4437 * linux-m68k-low.c (the_low_target): Likewise.
4438 * linux-ppc-low.c (the_low_target): Likewise.
4439 * linux-s390-low.c (the_low_target): Likewise.
4440 * linux-sh-low.c (the_low_target): Likewise.
4441 * linux-sparc-low.c (the_low_target): Likewise.
4442 * linux-tic6x-low.c (the_low_target): Likewise.
4443 * linux-x86-low.c (the_low_target): Likewise.
4444 * linux-xtensa-low.c (the_low_target): Likewise.
4445 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4446 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4447 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4449 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4450 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4452 2012-02-29 Yao Qi <yao@codesourcery.com>
4453 Pedro Alves <palves@redhat.com>
4455 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4456 `step_over_finished' is true.
4458 2012-02-27 Pedro Alves <palves@redhat.com>
4460 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4461 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4463 2012-02-27 Pedro Alves <palves@redhat.com>
4466 * linux-low.c (pid_is_stopped): New.
4467 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4469 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4471 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4474 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4476 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4478 2012-02-24 Luis Machado <lgustavo@codesourcery>
4480 * server.c (handle_query): Advertise support for target-side
4481 breakpoint condition evaluation.
4482 (process_point_options): New function.
4483 (process_serial_event): When inserting a breakpoint, check for
4484 a target-side condition that should be evaluated.
4486 * mem-break.c: Include regcache.h and ax.h.
4487 (point_cond_list_t): New data structure.
4488 (breakpoint) <cond_list>: New field.
4489 (find_gdb_breakpoint_at): Make non-static.
4490 (delete_gdb_breakpoint_at): Clear any target-side
4492 (clear_gdb_breakpoint_conditions): New function.
4493 (add_condition_to_breakpoint): Likewise.
4494 (add_breakpoint_condition): Likewise.
4495 (gdb_condition_true_at_breakpoint): Likewise.
4496 (gdb_breakpoint_here): Return result directly instead
4497 of going through a local variable.
4499 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4500 (clear_gdb_breakpoint_conditions): Likewise.
4501 (add_breakpoint_condition): Likewise.
4502 (gdb_condition_true_at_breakpoint): Likewise.
4504 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4505 (need_step_over_p): Take target-side breakpoint condition into
4508 2012-02-24 Luis Machado <lgustavo@codesourcery>
4510 * server.h: Include tracepoint.h.
4511 (agent_mem_read, agent_get_trace_state_variable_value,
4512 agent_set_trace_state_variable_value,
4513 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4514 get_set_tsv_func_addr): New prototypes.
4516 * ax.h: New include file.
4517 * ax.c: New source file.
4519 * tracepoint.c: Include ax.h.
4520 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4521 agent_expr, eval_result_type): Move to ax.h.
4522 (parse_agent_expr): Rename to ...
4523 (gdb_parse_agent_expr): ... this, make it non-static and move
4525 (unparse_agent_expr) Rename to ...
4526 (gdb_unparse_agent_expr): ... this, make it non-static and move
4528 (eval_agent_expr): Rename to ...
4529 (eval_tracepoint_agent_expr): ... this.
4530 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4531 forward declarations.
4532 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4533 (agent_get_trace_state_variable_value): New function.
4534 (agent_set_trace_state_variable_value): New function.
4535 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4536 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4537 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4538 (condition_true_at_tracepoint): Likewise.
4539 (parse_agent_expr): Rename to ...
4540 (gdb_parse_agent_expr): ... this and move to ax.c.
4541 (unparse_agent_expr): Rename to ...
4542 (gdb_unparse_agent_expr): ... this and move to ax.c.
4543 (gdb_agent_op_name): Move to ax.c.
4544 (eval_agent_expr): Rename to ...
4545 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4547 (eval_tracepoint_agent_expr): New function.
4548 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4550 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4552 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4553 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4554 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4555 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4556 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4557 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4558 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4559 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4560 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4561 (compile_bytecodes): Remove forward declaration.
4562 (is_goto_target): Move to ax.c.
4563 (compile_bytecodes): Move to ax.c and call
4564 agent_get_trace_state_variable_value (...) and
4565 agent_set_trace_state_variable_value (...).
4567 * Makefile.in: Update ax.c and IPA dependencies.
4569 2012-02-24 Pedro Alves <palves@redhat.com>
4571 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4572 (cmd_bigqtbuffer_circular): ... this. Only handle
4573 'QTBuffer:circular:'.
4574 (handle_tracepoint_general_set): Adjust.
4576 2012-02-16 Yao Qi <yao@codesourcery.com>
4578 * inferiors.c: Move code to ...
4579 * dll.c: .... here. New.
4580 * server.h: Declare clear_dlls.
4581 * Makefile.in (SFILES): Add dll.c.
4585 2012-02-11 Yao Qi <yao@codesourcery.com>
4587 * server.c: (handle_monitor_command): Add a new parameter
4589 (handle_query): Update caller.
4591 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4593 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4594 * configure, config.in: Regenerate.
4595 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4598 2012-02-02 Pedro Alves <palves@redhat.com>
4600 Try SIGKILL first, then PTRACE_KILL.
4601 * linux-low.c (linux_kill_one_lwp): New.
4602 (linux_kill_one_lwp): Rename to ...
4603 (kill_one_lwp_callback): ... this. Use the new
4606 2012-02-02 Pedro Alves <palves@redhat.com>
4608 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4611 2012-01-27 Pedro Alves <palves@redhat.com>
4613 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4614 (elf_64_file_p): Make static.
4615 (linux_pid_exe_is_elf_64_file): New.
4616 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4617 Delete declarations.
4618 (linux_pid_exe_is_elf_64_file): Declare.
4619 * linux-x86-low.c (x86_arch_setup): Use
4620 linux_pid_exe_is_elf_64_file.
4622 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4624 * linux-low.c (linux_wait_for_event_1): Rename to ...
4625 (linux_wait_for_event): ... here and merge it with former
4626 linux_wait_for_event - new variable wait_ptid, use it.
4627 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4629 2012-01-23 Pedro Alves <palves@redhat.com>
4631 * server.c (main): Avoid yet another case of infinite loop while
4632 detaching/killing after a longjmp.
4634 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4637 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4639 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4641 * hostio.c (handle_readlink): New function.
4642 (handle_vFile): Call it to handle "vFile:readlink" packets.
4644 2012-01-20 Pedro Alves <palves@redhat.com>
4645 Ulrich Weigand <ulrich.weigand@linaro.org>
4647 * server.c (handle_v_requests): Only support vAttach and vRun to
4648 start multiple processes when in extended protocol mode.
4650 2012-01-17 Pedro Alves <palves@redhat.com>
4652 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4653 memalign plus mprotect to allocate the scratch buffer.
4655 2012-01-13 Pedro Alves <palves@redhat.com>
4657 * server.c (attach_inferior): Clear `cont_thread'.
4659 2012-01-13 Pedro Alves <palves@redhat.com>
4661 * server.c (main): Avoid infinite loop while detaching/killing
4664 2012-01-09 Doug Evans <dje@google.com>
4666 * server.c (start_inferior): Set last_ptid in --wrapper case.
4668 2012-01-06 Yao Qi <yao@codesourcery.com>
4670 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4672 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4674 2012-01-04 Yao Qi <yao@codesourcery.com>
4676 * tracepoint.c (cmd_qtdp): Print debug message
4677 for static tracepoint.
4679 2012-01-04 Yao Qi <yao@codesourcery.com>
4681 * tracepoint.c (trace_vdebug): Differentiate debug message
4682 between gdbserver and IPA.
4684 2012-01-03 Yao Qi <yao@codesourcery.com>
4686 * tracepoint.c (tracepoint_was_hit): Don't collect for
4689 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4691 * terminal.h: Reformat copyright header.
4693 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4695 * server.c (gdbserver_version): Update copyright year.
4696 * gdbreplay.c (gdbreplay_version): Likewise.
4698 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4700 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4703 2011-12-18 Hui Zhu <teawater@gmail.com>
4704 * linux-low.c (linux_create_inferior): Save return value to ret.
4706 2011-12-18 Hui Zhu <teawater@gmail.com>
4708 * linux-low.c (linux_create_inferior): Save return value to ret.
4710 2011-12-16 Doug Evans <dje@google.com>
4712 * linux-low.c (linux_create_inferior): If stdio connection,
4713 redirect stdin from /dev/null, stdout to stderr.
4714 * remote-utils.c (remote_is_stdio): New static global.
4715 (remote_connection_is_stdio): New function.
4716 (remote_prepare): Handle stdio connection.
4717 (remote_open): Ditto.
4718 (remote_close): Don't close stdin for stdio connections.
4719 (read_prim,write_prim): New functions. Replace all calls to
4720 read/write to these.
4721 * server.c (main): Watch for "-" argument. Move call to
4722 remote_prepare before start_inferior.
4723 * server.h (STDIO_CONNECTION_NAME): New macro.
4724 (remote_connection_is_stdio): Declare.
4726 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4727 in debugging output.
4729 2011-12-15 Yao Qi <yao@codesourcery.com>
4731 * tracepoint.c: Include sys/syscall.h.
4732 (gdb_ust_thread): Remove preprocessor conditional.
4734 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4736 * linux-low.c (linux_detach_one_lwp): Call
4737 the_low_target.prepare_to_resume before detaching.
4739 2011-12-14 Yao Qi <yao@codesourcery.com>
4741 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4744 2011-12-14 Yao Qi <yao@codesourcery.com>
4746 * i386-low.c (i386_low_stopped_data_address): Initialize local
4749 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4753 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4754 DR_CONTROL unless necessary. Extend comments.
4755 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4756 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4758 2011-12-13 Yao Qi <yao@codesourcery.com>
4760 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4762 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4764 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4766 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4767 Print new debug message for such case.
4769 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4771 Fix overlapping memcpy.
4772 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4773 the read_inferior_memory transfer.
4774 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4775 write_inferior_memory transfer.
4776 (set_fast_tracepoint_jump): New variable buf. Use it for the
4777 read_inferior_memory and write_inferior_memory transfers.
4778 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4779 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4780 Use it for the write_inferior_memory transfer.
4781 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4784 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4786 * linux-low.c (fetch_register, store_register): Make code
4787 consistent, fix formatting.
4789 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4791 * linux-low.c (usr_store_inferior_registers): Factor out code
4792 to handle individual registers into...
4793 (store_register): ... this new function.
4795 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4797 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4798 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4799 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4800 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4801 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4802 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4803 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4804 (srv_xmlfiles): Add new XML files.
4806 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4808 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4809 (init_registers_s390_linux32v1): Add prototype.
4810 (init_registers_s390_linux32v2): Likewise.
4811 (init_registers_s390_linux64v1): Likewise.
4812 (init_registers_s390_linux64v2): Likewise.
4813 (init_registers_s390x_linux64v1): Likewise.
4814 (init_registers_s390x_linux64v2): Likewise.
4815 (s390_num_regs): Increment to 52.
4816 (s390_regmap): Add orig_r2 register.
4817 (s390_num_regs_3264): Increment to 68.
4818 (s390_regmap_3264): Add orig_r2 register.
4819 (s390_collect_ptrace_register): Handle orig_r2 register.
4820 (s390_supply_ptrace_register): Likewise.
4821 (s390_fill_last_break): New function.
4822 (s390_store_last_break): Likewise.
4823 (s390_fill_system_call): New function.
4824 (s390_store_system_call): Likewise.
4825 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4827 (s390_check_regset): New function.
4828 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4829 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4830 Update target_regsets for available register sets.
4832 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4833 Jan Kratochvil <jan.kratochvil@redhat.com>
4835 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4836 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4838 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4839 * linux-low.h (struct process_info_private): New member r_debug.
4840 * server.c (handle_qxfer_libraries): Call
4841 the_target->qxfer_libraries_svr4.
4842 (handle_qxfer_libraries_svr4): New function.
4843 (qxfer_packets): New entry "libraries-svr4".
4844 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4845 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4846 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4847 PACKET_qXfer_libraries_svr4.
4849 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4851 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4852 PSW address/mask between 8-byte and 16-byte formats.
4853 (s390_supply_ptrace_register): Likewise.
4854 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4855 basic addressing mode bit.
4857 2011-11-24 Stan Shebs <stan@codesourcery.com>
4859 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4861 2011-11-17 Stan Shebs <stan@codesourcery.com>
4863 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4864 (tracing_start_time): New global.
4865 (tracing_stop_time): New global.
4866 (tracing_user_name): New global.
4867 (tracing_notes): New global.
4868 (tracing_stop_note): New global.
4869 (cmd_qtstart): Set traceframe_usage, start_time.
4870 (stop_tracing): Set stop_time.
4871 (cmd_qtstatus): Report additional status.
4872 (cmd_qtp): New function.
4873 (handle_tracepoint_query): Call it.
4874 (cmd_qtnotes): New function.
4875 (handle_tracepoint_general_set): Call it.
4876 (get_timestamp): Rename from tsv_get_timestamp.
4878 2011-11-14 Stan Shebs <stan@codesourcery.com>
4879 Kwok Cheung Yeung <kcy@codesourcery.com>
4881 * linux-x86-low.c (small_jump_insn): New.
4882 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4883 trampoline and error message, build a trampoline and issue a small
4884 jump instruction to it.
4885 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4886 trampoline and error message.
4887 (x86_get_min_fast_tracepoint_insn_len): New.
4888 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4889 * linux-low.h (struct linux_target_ops): Add arguments to
4890 install_fast_tracepoint_jump_pad operation, add new operation.
4891 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4893 (linux_get_min_fast_tracepoint_insn_len): New function.
4894 (linux_target_op): Add new operation.
4895 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4896 (gdb_trampoline_buffer_end): Ditto.
4897 (gdb_trampoline_buffer_error): Ditto.
4898 (struct ipa_sym_addresses): Add fields for new IPA variables.
4899 (symbol_list): Add entries for new IPA variables.
4900 (struct tracepoint): Add fields to hold the address range of the
4901 trampoline used by the tracepoint.
4902 (trampoline_buffer_head): New static variable.
4903 (trampoline_buffer_tail): Ditto.
4904 (claim_trampoline_space): New function.
4905 (have_fast_tracepoint_trampoline_buffer): New function.
4906 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4908 (install_fast_tracepoint): Ditto, also add error buffer argument.
4909 (cmd_qtminftpilen): New function.
4910 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4911 (fast_tracepoint_from_trampoline_address): New function.
4912 (fast_tracepoint_collecting): Handle trampoline as part of jump
4914 (set_trampoline_buffer_space): New function.
4915 (initialize_tracepoint): Initialize new IPA variables.
4916 * target.h (struct target_ops): Add arguments to
4917 install_fast_tracepoint_jump_pad operation, add new
4918 get_min_fast_tracepoint_insn_len operation.
4919 (target_get_min_fast_tracepoint_insn_len): New.
4920 (install_fast_tracepoint_jump_pad): Add arguments.
4921 * server.h (IPA_BUFSIZ): Define.
4922 * linux-i386-ipa.c: Include extra header files.
4923 (initialize_fast_tracepoint_trampoline_buffer): New function.
4924 (initialize_low_tracepoint): Call it.
4925 * server.h (set_trampoline_buffer_space): Declare.
4926 (claim_trampoline_space): Ditto.
4927 (have_fast_tracepoint_trampoline_buffer): Ditto.
4929 2011-11-14 Yao Qi <yao@codesourcery.com>
4931 * server.c (handle_query): Handle InstallInTrace for qSupported.
4932 * tracepoint.c (add_tracepoint): Sort list.
4933 (install_tracepoint, download_tracepoint): New.
4934 (cmd_qtdp): Call them to install and download tracepoints.
4935 (sort_tracepoints): Removed.
4936 (cmd_qtstart): Update.
4938 2011-11-14 Yao Qi <yao@codesourcery.com>
4940 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4941 * mem-break.h: Declare.
4942 * tracepoint.c (cmd_qtstart): Move some code to ...
4943 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4945 (download_tracepoints): Move some code to ...
4946 (download_tracepoint_1): ... here. New.
4948 2011-11-08 Yao Qi <yao@codesourcery.com>
4950 * remote-utils.c (relocate_instruction): A comment fix.
4952 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4954 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4955 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4956 dr_status_mirror and dr_control_mirror from debug_reg_state.
4957 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4958 (i386_initial_stuff): Remove use of deleted globals.
4959 (i386_get_thread_context, i386_set_thread_context,
4960 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4961 from debug_reg_state.
4963 2011-11-05 Yao Qi <yao@codesourcery.com>
4965 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4966 address as TPOINT's.
4968 2011-11-02 Stan Shebs <stan@codesourcery.com>
4970 * tracepoint.c (agent_mem_read_string): New function.
4971 (eval_agent_expr): Call it for tracenz.
4972 * server.c (handle_query): Report support for tracenz.
4974 2011-11-02 Yao Qi <yao@codesourcery.com>
4976 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4978 2011-11-02 Yao Qi <yao@codesourcery.com>
4980 * target.h: Fix a typo in comment.
4982 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4984 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4985 clobber the breakpoints' shadows with fast tracepoint jumps.
4986 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4987 * target.c (write_inferior_memory): Also pass MYADDR down to
4990 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4992 * configure.ac: Check support for personality routine.
4993 * configure: Regenerate.
4994 * config.in: Likewise.
4995 * linux-low.c: Include <sys/personality.h>.
4996 Define ADDR_NO_RANDOMIZE if necessary.
4997 (linux_create_inferior): Disable address space randomization when
4998 forking inferior, if requested.
4999 (linux_supports_disable_randomization): New function.
5000 (linux_target_ops): Install it.
5001 * server.h (disable_randomization): Declare.
5002 * server.c (disable_randomization): New global variable.
5003 (handle_general_set): Handle QDisableRandomization.
5004 (handle_query): Likewise for qSupported.
5005 (main): Support --disable-randomization and --no-disable-randomization
5006 command line arguments.
5007 * target.h (struct target_ops): Add supports_disable_randomization.
5008 (target_supports_disable_randomization): New macro.
5010 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5012 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5014 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5015 [!PT_GETDSBT] (target_loadmap): New definition.
5016 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5017 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5018 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5019 and PT_GETDSBT to LINUX_LOADMAP.
5020 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5021 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5023 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5025 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5026 (arm_linux_hwbp_cap): New static variable.
5027 (arm_linux_get_hwbp_cap): Replace by ...
5028 (arm_linux_init_hwbp_cap): ... this new function.
5029 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5030 (arm_linux_get_hw_watchpoint_count): Likewise.
5031 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5032 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5033 (arm_prepare_to_resume): Use perror_with_name instead of error.
5035 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5037 * linux-arm-low.c: Include <signal.h>.
5038 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5039 (struct arm_linux_hwbp_cap): New data type.
5040 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5041 (struct arm_linux_hw_breakpoint): New data type.
5042 (MAX_BPTS, MAX_WPTS): Define.
5043 (struct arch_process_info, struct arch_lwp_info): New data types.
5044 (arm_linux_get_hwbp_cap): New function.
5045 (arm_linux_get_hw_breakpoint_count): Likewise.
5046 (arm_linux_get_hw_watchpoint_count): Likewise.
5047 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5048 (arm_hwbp_control_initialize): Likewise.
5049 (arm_hwbp_control_is_enabled): Likewise.
5050 (arm_hwbp_control_is_initialized): Likewise.
5051 (arm_hwbp_control_disable): Likewise.
5052 (arm_linux_hw_breakpoint_equal): Likewise.
5053 (arm_linux_hw_point_initialize): Likewise.
5054 (struct update_registers_data): New data structure.
5055 (update_registers_callback: New function.
5056 (arm_insert_point): Likewise.
5057 (arm_remove_point): Likewise.
5058 (arm_stopped_by_watchpoint): Likewise.
5059 (arm_stopped_data_address): Likewise.
5060 (arm_new_process): Likewise.
5061 (arm_new_thread): Likewise.
5062 (arm_prepare_to_resume): Likewise.
5063 (the_low_target): Register arm_insert_point, arm_remove_point,
5064 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5065 arm_new_thread, and arm_prepare_to_resume.
5067 2011-09-15 Stan Shebs <stan@codesourcery.com>
5069 * server.h (struct emit_ops): Add compare-goto fields.
5070 * tracepoint.c (gdb_agent_op_sizes): New table.
5071 (emit_eq_goto): New function.
5072 (emit_ne_goto): New function.
5073 (emit_lt_goto): New function.
5074 (emit_le_goto): New function.
5075 (emit_gt_goto): New function.
5076 (emit_ge_goto): New function.
5077 (is_goto_target): New function.
5078 (compile_bytecodes): Recognize special cases of compare-goto
5079 combinations and call specialized emitters for them.
5080 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5081 (amd64_emit_ne_goto): New function.
5082 (amd64_emit_lt_goto): New function.
5083 (amd64_emit_le_goto): New function.
5084 (amd64_emit_gt_goto): New function.
5085 (amd64_emit_ge_goto): New function.
5086 (amd64_emit_ops): Add the new functions.
5087 (i386_emit_eq_goto): New function.
5088 (i386_emit_ne_goto): New function.
5089 (i386_emit_lt_goto): New function.
5090 (i386_emit_le_goto): New function.
5091 (i386_emit_gt_goto): New function.
5092 (i386_emit_ge_goto): New function.
5093 (i386_emit_ops): Add the new functions.
5095 2011-09-08 Stan Shebs <stan@codesourcery.com>
5097 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5098 (i386_emit_epilogue): Restore %ebx.
5100 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5102 * server.c (step_thread): Remove definition.
5103 (process_serial_event): Don't handle Hs.
5104 * server.h (step_thread): Remove declaration.
5105 * target.c (set_desired_inferior): Remove use of step_thread.
5107 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5109 * linux-low.c: Include linux-procfs.h.
5110 (linux_attach_lwp_1): Update comments.
5111 (linux_attach): Scan for existing threads when attaching to a
5112 process that is the tgid.
5113 * Makefile.in: Update dependencies.
5115 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5117 * configure.srv: Add linux-procfs.o dependencies.
5119 2011-08-14 Yao Qi <yao@codesourcery.com>
5121 * target.h (struct target_ops): Fix indent.
5122 * win32-low.c (win32_target_ops): Fix comment.
5124 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5125 Yao Qi <yao@codesourcery.com>
5127 * Makefile.in (clean): Remove tic6x-*.c files.
5128 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5129 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5130 (tic6x-c64xp-linux.c): Likewise.
5131 * configure.srv: Add support for tic6x-*-uclinux.
5132 * linux-tic6x-low.c: New.
5133 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5135 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5136 Yao Qi <yao@codesourcery.com>
5138 * target.h (struct target_ops): Add read_loadmap.
5139 * linux-low.c (struct target_loadseg): New type.
5140 (struct target_loadmap): New type.
5141 (linux_read_loadmap): New function.
5142 (linux_target_ops): Add linux_read_loadmap.
5143 * server.c (handle_query): Support qXfer:fdpic:read packet.
5144 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5147 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5149 * win32-low.c: Include <stdint.h>.
5151 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5153 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5154 to the inferior here.
5155 (i386_remove_aligned_watchpoint): Ditto.
5156 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5157 fit part of the watchpoint in the debug registers.
5158 (i386_update_inferior_debug_regs): New.
5159 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5160 registers, and only update the inferior on success.
5161 (i386_low_remove_watchpoint): Ditto.
5163 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5165 * linux-low.c (compare_ints, unique, list_threads, show_process,
5166 linux_core_of_thread): Delete.
5167 (linux_target_ops): Change linux_core_of_thread to
5168 linux_common_core_of_thread.
5169 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5170 * utils.c (malloc_failure): Change type of argument.
5171 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5172 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5173 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5174 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5175 (IPA_OBJS): Add common-utils-ipa.o.
5176 (ptid_h, linux_osdata_h): New macros.
5177 (server_h): Add common/common-utils.h, common/xml-utils.h,
5178 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5180 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5181 ptid.o, buffer.o): New rules.
5182 (linux-low.o): Add common/linux-osdata.h as a dependency.
5183 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5184 * configure.ac: Add AC_HEADER_DIRENT check.
5185 * config.in: Regenerate.
5186 * configure: Regenerate.
5187 * remote-utils.c (xml_escape_text): Delete.
5188 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5189 buffer_xml_printf): Move to common/buffer.c.
5190 * server.c (main): Remove call to initialize_inferiors.
5191 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5192 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5193 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5194 internal_error, gdb_assert, gdb_assert_fail): Delete.
5195 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5196 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5198 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5199 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5200 initialize_inferiors): Delete.
5202 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5204 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5207 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5209 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5211 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5213 2011-05-26 Yao Qi <yao@codesourcery.com>
5215 * Makefile.in (thread-db.o): Track dependence to
5216 common/gdb_thread_db.h.
5217 * thread-db.c: include gdb_thread_db.h from right place.
5219 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5221 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5222 __FILE__ and __LINE__ to internal_error.
5224 2011-05-13 Doug Evans <dje@google.com>
5226 * thread-db.c (try_thread_db_load_from_sdir): New function.
5227 (try_thread_db_load_from_dir): New function.
5228 (thread_db_load_search): Handle $sdir, ignore $pdir.
5229 Remove trying of system directories if search of
5230 libthread-db-search-path fails, that is now done via $sdir.
5232 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5234 * server.c (handle_query): Add EnableDisableTracepoints to the list
5235 of supported features.
5236 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5238 (cmd_qtenable_disable): New.
5239 (cmd_qtstart): Install tracepoints even if disabled.
5240 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5241 receiving a QTEnable or QTDisable packet.
5242 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5243 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5245 (gdb_probe): Skip data collection if static tracepoint is disabled.
5247 2011-05-10 Doug Evans <dje@google.com>
5249 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5251 2011-05-04 Doug Evans <dje@google.com>
5253 * linux-low.c (linux_join): Skip process lookup.
5254 * spu-low.c (spu_join): Ditto.
5255 * server.c (join_inferiors_callback): Delete.
5256 (process_serial_event): For 'D' packet (detach) call join_inferior
5259 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5261 * README: Don't mention xscale*-*-linux*.
5262 * configure.srv (xscale*-*-linux*): Don't handle target.
5264 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5266 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5268 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5269 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5270 (i386_emit_void_call_2): Likewise.
5272 2011-04-26 Yao Qi <yao@codesourcery.com>
5274 * linux-low.c: Move common macros to linux-ptrace.h.
5275 Include linux-ptrace.h.
5276 * Makefile.in (linux_ptrace_h): New.
5277 (linux-low.o): Depends on linux-ptrace.h.
5279 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5281 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5282 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5283 (remote_prepare): New function with most of the TCP code from ...
5284 (remote_open): ... here. Detect PORT here unconditionally. Move also
5285 setting transport_is_reliable.
5286 * server.c (run_once): New variable.
5287 (gdbserver_usage): Document it.
5288 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5289 the first run if RUN_ONCE.
5290 * server.h (run_once, remote_prepare): New declarations.
5292 2011-04-19 Tom Tromey <tromey@redhat.com>
5294 * win32-low.c (handle_load_dll): Remove duplicate "the".
5296 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5298 Remove support for old Cygwin 1.5 versions.
5299 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5300 function to avoid warning.
5301 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5304 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5306 * gdbserver/server.h (Macro _): Define it if not available.
5308 2011-03-14 Michael Snyder <msnyder@vmware.com>
5310 * hostio.c (handle_close): Remove unnecessary null test.
5312 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5314 * Makefile.in (maintainer-clean realclean distclean): Remove
5315 "make ... subdir_do" command.
5317 2011-03-10 Michael Snyder <msnyder@vmware.com>
5319 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5321 * server.c (handle_v_run): Free alloced buffer on early return.
5323 2011-03-09 Yao Qi <yao@codesourcery.com>
5326 2011-03-04 Yao Qi <yao@codesourcery.com>
5328 * Makefile.in: Remove GNU make feature --directory.
5330 2011-03-05 Yao Qi <yao@codesourcery.com>
5332 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5333 (subdir_do): New make target. Copied from gdb/Makefile.
5334 (maintainer-clean, realclean, distclean, clean): Call corresponding
5335 make targets in common/Makefile.
5337 2011-02-11 Yao Qi <yao@codesourcery.com>
5339 * configure.ac: Call AC_PROG_RANLIB.
5340 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5341 * configure: Regenerate.
5343 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5345 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5347 2011-03-06 Yao Qi <yao@codesourcery.com>
5349 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5351 2011-03-05 Yao Qi <yao@codesourcery.com>
5353 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5354 (subdir_do): New make target. Copied from gdb/Makefile.
5355 (maintainer-clean, realclean, distclean, clean): Call corresponding
5356 make targets in common/Makefile.
5358 2011-03-04 Yao Qi <yao@codesourcery.com>
5360 * Makefile.in: Remove GNU make feature --directory.
5362 2011-03-04 Michael Snyder <msnyder@vmware.com>
5364 * server.c (queue_stop_reply): Call xmalloc not malloc.
5366 2011-03-02 Michael Snyder <msnyder@vmware.com>
5368 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5370 2011-02-28 Michael Snyder <msnyder@vmware.com>
5372 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5373 (cmd_qtframe): Ditto.
5374 (cmd_qtbuffer): Ditto.
5375 (cmd_bigqtbuffer): Ditto.
5377 * utils.c (decimal2str): Initialize 'width' to nine, then
5380 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5382 * hostio.c (require_data): Free *data, not data.
5384 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5386 * hostio.c (require_data): Use free, not xfree.
5388 2011-02-27 Michael Snyder <msnyder@vmware.com>
5390 * server.c (handle_query): Discard unused value.
5392 * hostio.c (require_data): Free malloc memory before returning
5395 2011-02-26 Michael Snyder <msnyder@vmware.com>
5397 * linux-low.c (list_threads): Call closedir for dirent.
5399 2011-02-27 Michael Snyder <msnyder@vmware.com>
5401 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5402 a case statement falls through.
5404 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5406 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5409 2011-02-26 Michael Snyder <msnyder@vmware.com>
5411 * utils.c (decimal2str): Eliminate dead code and dead param.
5412 (pulongest): Drop dead param from call to decimal2str.
5415 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5417 Revert the following patch (not approved yet):
5418 2011-02-21 Hui Zhu <teawater@gmail.com>
5419 * tracepoint.c (tp_printf): New function.
5420 (eval_agent_expr): Handle gdb_agent_op_printf.
5422 2011-02-21 Hui Zhu <teawater@gmail.com>
5424 * tracepoint.c (tp_printf): New function.
5425 (eval_agent_expr): Handle gdb_agent_op_printf.
5427 2011-02-18 Tom Tromey <tromey@redhat.com>
5429 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5430 (tracepoint.o): Likewise.
5431 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5432 (gdb_agent_op_names): Likewise.
5434 2011-02-18 Tom Tromey <tromey@redhat.com>
5436 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5437 gdb_agent_op_rot>: New constants.
5438 (gdb_agent_op_names): Add pick and roll.
5439 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5442 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5444 * aclocal.m4: Regenerated with aclocal-1.11.1.
5446 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5448 * server.c (handle_qxfer_traceframe_info): New.
5449 (qxfer_packets): Register "traceframe-info".
5450 (handle_query): Report support for qXfer:traceframe-info:read+.
5451 * tracepoint.c (match_blocktype): New.
5452 (traceframe_find_block_type): Rename to ...
5453 (traceframe_walk_blocks): ... this. Add callback filter argument,
5455 (traceframe_find_block_type): New, reimplemented on top of
5456 traceframe_walk_blocks.
5457 (build_traceframe_info_xml): New.
5458 (traceframe_read_info): New.
5459 * server.h (traceframe_read_info): Declare.
5461 2011-02-11 Yao Qi <yao@codesourcery.com>
5463 * configure.ac: Call AC_PROG_RANLIB.
5464 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5465 * configure: Regenerate.
5467 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5469 * server.c (gdb_read_memory): Change return semantics to allow
5471 (handle_search_memory_1): Adjust.
5472 (process_serial_event) <'m' packet>: Handle partial transfers.
5473 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5475 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5477 * regcache.c (init_register_cache): Initialize
5478 regcache->register_status.
5479 (free_register_cache): Release regcache->register_status.
5480 (regcache_cpy): Copy register_status.
5481 (registers_to_string): Print 'x's for unavailable registers.
5482 (supply_register): Mark the register's status valid or
5483 unavailable, depending on whether a buffer was passed in or not.
5484 (supply_register_zeroed): New.
5485 (supply_regblock): Mark the registers' status valid or
5486 unavailable, depending on whether a buffer was passed in or not.
5487 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5488 (struct regcache): New `register_status' field.
5489 (supply_register_zeroed): Declare.
5490 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5491 supply_register_zeroed, rather than passing a NULL buffer to
5493 * tracepoint.c (fetch_traceframe_registers): Update comment.
5495 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5497 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5500 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5502 * server.h (decode_xfer_write): Change prototype.
5503 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5504 and don't extract the annex here.
5505 * server.c (decode_xfer_read): Remove `annex' parameter,
5506 and don't extract the annex here.
5508 (struct qxfer): New.
5509 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5510 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5511 (handle_qxfer_statictrace): New functions, abstracted out from
5512 handle_query, and made to use the struct qxfer interface.
5513 (handle_threads_qxfer_proper): Rename to ...
5514 (handle_qxfer_threads_proper): ... this.
5515 (handle_threads_qxfer): Rename to ...
5516 (handle_qxfer_threads): ... this. Adjust.
5517 (qxfer_packets): New array.
5518 (handle_qxfer): New function.
5519 (handle_query): Use handle_qxfer.
5521 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5523 * gdbreplay.c: Shorten lines of >= 80 columns.
5524 * linux-low.c: Ditto.
5525 * linux-ppc-low.c: Ditto.
5526 * linux-s390-low.c: Ditto.
5527 * linux-sparc-low.c: Ditto.
5528 * linux-x86-low.c: Ditto.
5529 * linux-xtensa-low.c: Ditto.
5530 * mem-break.c: Ditto.
5532 * regcache.h: Ditto.
5533 * remote-utils.c: Ditto.
5536 * thread-db.c: Ditto.
5537 * tracepoint.c: Ditto.
5539 * win32-low.h: Ditto.
5541 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5543 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5546 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5548 * server.c (gdbserver_version): Update copyright year in version
5550 * gdbreplay.c (gdbreplay_version): Ditto.
5552 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5554 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5555 * linux-bfin-low.c: New file.
5556 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5557 PT_DATA_ADDR for BFIN targets.
5558 * Makefile.in (SFILES): Add linux-bfin-low.c.
5559 (clean): Remove reg-bfin.c.
5560 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5561 * README: Mention supported Blackfin targets.
5563 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5565 * .gitignore: New file.
5567 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5569 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5571 2010-10-22 Jie Zhang <jie@codesourcery.com>
5573 * Makefile.in: Add FLAGS_TO_PASS variable.
5574 (install): Remove dependency of install-only and recursively
5575 invoke make for install-only.
5577 2010-10-04 Doug Evans <dje@google.com>
5579 * Makefile.in (uninstall): Use $(DESTDIR).
5581 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5585 * linux-x86-low.c (compat_siginfo_from_siginfo)
5586 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5587 si_code is < 0. Check for si_code == SI_TIMER before checking for
5590 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5592 * lynx-i386-low.c: New file.
5593 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5595 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5597 * lynx-low.c (ptrace_request_to_str): Remove handling for
5598 request values that have been removed in LynxOS 5.x.
5600 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5602 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5605 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5607 * configure.ac: Add --enable-inprocess-agent option.
5608 * configure: Rebuilt.
5610 2010-09-06 Yao Qi <yao@codesourcery.com>
5612 * linux-low.c (linux_kill): Remove unused variable.
5613 (linux_stabilize_threads): Likewise.
5614 * server.c (start_inferior): Likewise.
5615 (queue_stop_reply_callback): Likewise.
5616 * tracepoint.c (do_action_at_tracepoint): Likewise.
5618 2010-09-06 Yao Qi <yao@codesourcery.com>
5620 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5623 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5625 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5627 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5629 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5632 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5634 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5635 gdbserver/lynx-ppc-low.c: New files.
5636 * Makefile.in (lynx_low_h): New variable.
5637 (lynx-low.o, lynx-ppc-low.o): New rules.
5638 * configure.ac: On LynxOS, link with -lnetinet.
5639 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5640 * configure: regenerate.
5642 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5644 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5645 * configure.ac: Add check for vasprintf and vsnprintf.
5646 * configure, config.in: Regenerate.
5647 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5649 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5651 * gdbreplay.c: Move include of alloca.h up, next to include of
5653 * server.h: Add include of malloc.h.
5654 * mem-break.c: Remove include of malloc.h.
5655 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5657 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5659 * Makefile.in (memmem.o): Build with -Wno-error.
5661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5663 * utils.c (xsnprintf): Make non-static.
5664 * server.h: Add xsnprintf declaration.
5665 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5666 replace calls to snprintf by calls to xsnprintf throughout.
5668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5670 * configure.ac: Add configure check for alloca.
5671 * configure, config.in: Regenerate.
5672 * server.h: Include alloca.h if it exists.
5673 * gdbreplay.c: Include alloca.h if it exists.
5675 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5677 * linux-low.c (__SIGRTMIN): Define if not already defined.
5678 (linux_create_inferior): Check for __ANDROID__ rather than
5680 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5681 are already deferred.
5682 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5683 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5684 stopped and already has a pending signal to report.
5685 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5686 a pending signal to report or is moving out of a jump pad.
5687 (linux_init_signals): Check for __ANDROID__ rather than
5690 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5692 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5693 debug_threads check. Avoid a linear search when not doing debug
5696 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5698 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5699 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5700 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5701 (process_event): Change local fd's type to gdb_fildes_t.
5702 (create_file_handler): Adjust prototype.
5703 (delete_file_handler): Adjust prototype.
5704 (handle_file_event): Adjust prototype. Use pfildes.
5705 (create_file_event): Adjsut prototype.
5706 * remote-utils.c (remote_desc, listen_desc): Change type to
5708 * server.h: New gdb_fildes_t typedef.
5709 [USE_WIN32API]: Include winsock2.h.
5710 (delete_file_handler, add_file_handler): Adjust prototypes.
5712 * utils.c (pfildes): New.
5714 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5716 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5717 * configure: Regenerate.
5719 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5721 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5722 (linux_done_accessing_memory): ... this.
5723 (linux_target_ops): Adjust.
5724 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5725 * nto-low.c (nto_target_ops): Adjust comment.
5726 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5727 * spu-low.c (spu_target_ops): Adjust comment.
5728 * target.h (target_ops): Rename unprepare_to_access_memory field
5729 to done_accessing_memory.
5730 (unprepare_to_access_memory): Rename to ...
5731 (done_accessing_memory): ... this.
5733 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5735 * linux-low.c (linux_prepare_to_access_memory): New.
5736 (linux_unprepare_to_access_memory): New.
5737 (linux_target_ops): Install them.
5738 * server.c (read_memory): Rename to ...
5739 (gdb_read_memory): ... this. Use
5740 prepare_to_access_memory/prepare_to_access_memory.
5741 (write_memory): Rename to ...
5742 (gdb_write_memory): ... this. Use
5743 prepare_to_access_memory/prepare_to_access_memory.
5744 (handle_search_memory_1): Adjust.
5745 (process_serial_event): Adjust.
5746 * target.h (struct target_ops): New fields
5747 prepare_to_access_memory and unprepare_to_access_memory.
5748 (prepare_to_access_memory, unprepare_to_access_memory): New.
5749 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5750 prepare_to_access_memory/prepare_to_access_memory.
5751 * nto-low.c (nto_target_ops): Adjust.
5752 * spu-low.c (spu_target_ops): Adjust.
5753 * win32-low.c (win32_target_ops): Adjust.
5755 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5757 * Makefile.in (WARN_CFLAGS): Get it from configure.
5758 (WERROR_CFLAGS): New.
5759 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5760 * configure.ac: Introduce --enable-werror, which adds -Werror to
5761 the compiler command line. Enabled by default. Disable with
5762 --disable-werror. Add -Wdeclaration-after-statement
5763 Wpointer-arith and -Wformat-nonliteral to warning flags.
5764 * configure: Regenerate.
5766 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5768 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5770 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5772 * gdbreplay.c (remote_error): New.
5774 (expect): Use gdbchar. Check for error reading from GDB.
5775 Clarify sync error output.
5776 (play): Check for errors writing to GDB.
5777 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5778 * remote-utils.c (getpkt): Check for errors writing to the remote
5781 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5783 * linux-low.c (linux_wait_1): Move non-debugging code out of
5784 `debug_threads' control.
5786 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5788 * linux-low.c (linux_wait_1): Don't set last_status here.
5789 * server.c (push_event, queue_stop_reply_callback): Assert we're
5790 not pushing a TARGET_WAITKIND_IGNORE event.
5791 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5792 (myresume, handle_target_event): Set the thread's last_resume_kind
5793 and last_status from the target returned status.
5795 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5799 * linux-x86-low.c (update_debug_registers_callback): New.
5800 (i386_dr_low_set_addr): Use it.
5801 (i386_dr_low_get_addr): New.
5802 (i386_dr_low_set_control): Use update_debug_registers_callback.
5803 (i386_dr_low_get_control): New.
5804 (i386_dr_low_get_status): Adjust.
5805 * linux-low.c (linux_stop_lwp): New.
5806 * linux-low.h (linux_stop_lwp): Declare.
5808 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5809 argument instead of a i386_debug_reg_state.
5810 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5811 a i386_debug_reg_state.
5812 (i386_insert_aligned_watchpoint): Adjust.
5813 (i386_remove_aligned_watchpoint): Adjust.
5814 (i386_low_stopped_data_address): Read the debug registers from the
5815 inferior instead of from the mirrors.
5816 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5817 (i386_dr_low_get_addr): Declare.
5818 (i386_dr_low_get_control): Declare.
5819 (i386_dr_low_get_status): Change prototype.
5821 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5822 (i386_dr_low_get_addr): New.
5823 (i386_dr_low_get_control): New.
5824 (i386_dr_low_get_status): Adjust prototype. Return
5826 (i386_initial_stuff): Clear dr_status_mirror and
5828 (i386_get_thread_context): Adjust.
5829 (i386_set_thread_context): Adjust.
5830 (i386_thread_added): Adjust.
5832 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5834 * linux-low.h (linux_thread_area): Delete declaration.
5836 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5838 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5839 after its termination.
5841 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5843 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5844 (gdb_wants_all_stopped): Delete.
5845 (linux_wait_1): Don't call them.
5846 * server.c (handle_v_cont): Tag all threads as want-stopped.
5847 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5848 stopped as "client-wants-stopped".
5850 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5852 * Makefile.in (signals_h): New.
5853 (server_h): Depend on it.
5854 (server.o): Don't depend on $(signals_def).
5855 (signals.o): Depend on $(signals_def).
5857 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5859 * Makefile.in (signals_def): New.
5860 (server_h): Append include/gdb/signals.h and signals_def.
5861 (server.o): Append signals_def.
5863 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5865 * server.c (handle_target_event): Use target_signal_to_host for
5866 resume_info.sig initialization.
5867 * target.h (struct thread_resume) <sig>: New comment.
5869 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5871 * server.c (handle_query): strcpy() the returned string from paddress()
5872 instead of sprintf().
5873 * utils.c (paddress): Return phex_nz().
5875 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5877 * server.c (handle_v_cont): Call mourn_inferior if process
5879 (myresume): Likewise.
5881 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5883 Static tracepoints, and integration with UST.
5885 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5886 * mem-break.c (uninsert_all_breakpoints)
5887 (reinsert_all_breakpoints): New.
5888 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5889 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5890 (gdb_agent_ust_loaded, helper_thread_id)
5891 (gdb_agent_helper_thread_id): New macros.
5892 (struct ipa_sym_addresses): Add addr_ust_loaded,
5893 addr_helper_thread_id, addr_cmd_buf.
5894 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5895 (in_process_agent_loaded_ust): New.
5896 (write_e_ust_not_loaded): New.
5897 (maybe_write_ipa_ust_not_loaded): New.
5898 (struct collect_static_trace_data_action): New.
5899 (enum tracepoint_type) <static_tracepoint>: New.
5900 (struct tracepoint) <handle>: Mention static tracepoints.
5901 (struct static_tracepoint_ctx): New.
5902 (CMD_BUF_SIZE): New.
5903 (add_tracepoint_action): Handle static tracepoint actions.
5904 (unprobe_marker_at): New.
5905 (clear_installed_tracepoints): Handle static tracepoints.
5906 (cmd_qtdp): Handle static tracepoints.
5907 (probe_marker_at): New.
5908 (cmd_qtstart): Handle static tracepoints.
5909 (response_tracepoint): Handle static tracepoints.
5910 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5911 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5912 (get_context_regcache): Handle static tracepoints.
5913 (do_action_at_tracepoint): Handle static tracepoint actions.
5914 (traceframe_find_block_type): Handle static trace data blocks.
5915 (traceframe_read_sdata): New.
5916 (download_tracepoints): Download static tracepoint actions.
5917 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5918 (GDB_PROBE_NAME): New.
5923 (ust_marker_to_static_tracepoint): New.
5925 (collect_ust_data_at_tracepoint): New.
5926 (gdb_ust_probe): New.
5927 (UNIX_PATH_MAX, SOCK_DIR): New.
5928 (gdb_ust_connect_sync_socket): New.
5929 (resume_thread, stop_thread): New.
5930 (run_inferior_command): New.
5931 (init_named_socket): New.
5932 (gdb_ust_socket_init): New.
5933 (cstr_to_hexstr): New.
5935 (first_marker, next_marker): New.
5936 (response_ust_marker): New.
5937 (cmd_qtfstm, cmd_qtsstm): New.
5938 (unprobe_marker_at, probe_marker_at): New.
5939 (cmd_qtstmat, gdb_ust_thread): New.
5940 (gdb_ust_init): New.
5941 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5942 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5944 (x86_64_st_collect_regmap): New.
5945 (X86_64_NUM_ST_COLLECT_GREGS): New.
5946 (AMD64_RIP_REGNUM): New.
5947 (supply_static_tracepoint_registers): New.
5948 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5950 (i386_st_collect_regmap): New.
5951 (i386_NUM_ST_COLLECT_GREGS): New.
5952 (supply_static_tracepoint_registers): New.
5953 * server.c (handle_query): Handle qXfer:statictrace:read.
5954 <qSupported>: Report support for StaticTracepoints, and
5955 qXfer:statictrace:read features.
5956 * server.h (traceframe_read_sdata)
5957 (supply_static_tracepoint_registers): Declare.
5958 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5959 (unpack_varlen_hex): Include in IPA build.
5960 * Makefile.in (ustlibs, ustinc): New.
5961 (IPA_OBJS): Add remote-utils-ipa.o.
5962 ($(IPA_LIB)): Link -ldl and -lpthread.
5964 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5965 * config.in, configure: Regenerate.
5967 2010-06-20 Ian Lance Taylor <iant@google.com>
5968 Pedro Alves <pedro@codesourcery.com>
5970 * linux-x86-low.c (always_true): Delete.
5971 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5972 trying to fool the compiler with always_true.
5974 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5976 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5977 conditions in gdbserver.
5979 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5981 * spu-low.c (spu_read_memory): Wrap around local store limit.
5982 (spu_write_memory): Likewise.
5984 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5986 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5987 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5989 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5991 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5992 uses with LONGEST uses.
5994 2010-06-14 Stan Shebs <stan@codesourcery.com>
5995 Pedro Alves <pedro@codesourcery.com>
5999 * linux-x86-low.c: Include limits.h.
6004 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6005 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6006 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6007 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6008 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6009 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6010 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6011 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6012 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6013 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6014 (amd64_emit_void_call_2): New.
6015 (amd64_emit_ops): New.
6016 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6017 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6018 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6019 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6020 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6021 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6022 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6023 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6024 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6025 (i386_emit_stack_adjust, i386_emit_int_call_1)
6026 (i386_emit_void_call_2): New.
6027 (i386_emit_ops): New.
6028 (x86_emit_ops): New.
6029 (the_low_target): Install x86_emit_ops.
6030 * server.h (struct emit_ops): New.
6031 (get_raw_reg_func_addr): Declare.
6032 (current_insn_ptr, emit_error): Declare.
6033 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6034 (set_trace_state_variable_value): New defines.
6035 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6036 addr_get_trace_state_variable_value and
6037 addr_set_trace_state_variable_value.
6038 (symbol_list): New fields for get_raw_reg,
6039 get_trace_state_variable_value and set_trace_state_variable_value.
6040 (condfn): New typedef.
6041 (struct tracepoint): New field `compiled_cond'.
6042 (do_action_at_tracepoint): Clear compiled_cond.
6043 (get_trace_state_variable_value, set_trace_state_variable_value):
6045 (condition_true_at_tracepoint): If there's a compiled condition,
6047 (current_insn_ptr, emit_error): New globals.
6048 (struct bytecode_address): New.
6049 (get_raw_reg_func_addr): New.
6050 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6051 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6052 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6053 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6054 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6055 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6056 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6057 (compile_tracepoint_condition, compile_bytecodes): New.
6058 * target.h (emit_ops): Forward declare.
6059 (struct target_ops): New field emit_ops.
6060 (target_emit_ops): New.
6061 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6062 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6063 * linux-low.c (linux_emit_ops): New.
6064 (linux_target_ops): Install it.
6065 * linux-low.h (struct linux_target_ops): New field emit_ops.
6067 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6069 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6070 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6072 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6073 Stan Shebs <stan@codesourcery.com>
6075 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6076 (all): Depend on $(extra_libraries).
6077 (install-only): Install the IPA.
6078 (IPA_OBJS, IPA_LIB): New.
6079 (clean): Remove the IPA lib.
6080 (IPAGENT_CFLAGS): New.
6081 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6082 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6083 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6084 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6085 * configure.ac: Check for atomic builtins support in the compiler.
6086 (IPA_DEPFILES, extra_libraries): Define.
6087 * configure.srv (ipa_obj): Add description.
6088 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6089 (i[34567]86-*-linux*): Set ipa_obj.
6090 (x86_64-*-linux*): Set ipa_obj.
6091 * linux-low.c (stabilizing_threads): New.
6092 (supports_fast_tracepoints): New.
6093 (linux_detach): Stabilize threads before detaching.
6094 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6095 the lwp is either not stabilizing, or is moving out of a jump pad.
6096 (linux_fast_tracepoint_collecting): New.
6097 (maybe_move_out_of_jump_pad): New.
6098 (enqueue_one_deferred_signal): New.
6099 (dequeue_one_deferred_signal): New.
6100 (linux_wait_for_event_1): If moving out of a jump pad, defer
6101 pending signals to later.
6102 (linux_stabilize_threads): New.
6103 (linux_wait_1): Check if threads need moving out of jump pads, and
6105 (stuck_in_jump_pad_callback): New.
6106 (move_out_of_jump_pad_callback): New.
6108 (linux_resume_one_lwp): Handle moving out of jump pads.
6109 (linux_set_resume_request): Dequeue deferred signals.
6110 (need_step_over_p): Also step over fast tracepoint jumps.
6111 (start_step_over): Also uninsert fast tracepoint jumps.
6112 (finish_step_over): Also reinsert fast tracepoint jumps.
6113 (linux_install_fast_tracepoint_jump): New.
6114 (linux_target_ops): Install linux_stabilize_threads and
6115 linux_install_fast_tracepoint_jump_pad.
6116 * linux-low.h (linux_target_ops) <get_thread_area,
6117 install_fast_tracepoint_jump_pad>: New fields.
6118 (struct lwp_info) <collecting_fast_tracepoint,
6119 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6120 (linux_get_thread_area): Declare.
6121 * linux-x86-low.c (jump_insn): New.
6122 (x86_get_thread_area): New.
6123 (append_insns): New.
6125 (amd64_install_fast_tracepoint_jump_pad): New.
6126 (i386_install_fast_tracepoint_jump_pad): New.
6127 (x86_install_fast_tracepoint_jump_pad): New.
6128 (the_low_target): Install x86_get_thread_area and
6129 x86_install_fast_tracepoint_jump_pad.
6130 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6131 (struct fast_tracepoint_jump): New.
6132 (fast_tracepoint_jump_insn): New.
6133 (fast_tracepoint_jump_shadow): New.
6134 (find_fast_tracepoint_jump_at): New.
6135 (fast_tracepoint_jump_here): New.
6136 (delete_fast_tracepoint_jump): New.
6137 (set_fast_tracepoint_jump): New.
6138 (uninsert_fast_tracepoint_jumps_at): New.
6139 (reinsert_fast_tracepoint_jumps_at): New.
6140 (set_breakpoint_at): Use write_inferior_memory.
6141 (uninsert_raw_breakpoint): Use write_inferior_memory.
6142 (check_mem_read): Mask out fast tracepoint jumps.
6143 (check_mem_write): Mask out fast tracepoint jumps.
6144 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6145 (set_fast_tracepoint_jump): Declare.
6146 (delete_fast_tracepoint_jump)
6147 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6148 (reinsert_fast_tracepoint_jumps_at): Declare.
6149 * regcache.c: Don't compile many functions when building the
6150 in-process agent library.
6151 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6152 the register buffer in the heap.
6153 (free_register_cache): If the register buffer isn't owned by the
6154 regcache, don't free it.
6155 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6156 pre-existing register caches.
6157 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6159 (convert_ascii_to_int): : Constify `from' parameter type.
6160 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6161 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6162 the needed buffer in-place.
6163 (relocate_instruction): New.
6164 * server.c (handle_query) <qSymbols>: If the target supports
6165 tracepoints, give it a chance of looking up symbols. Report
6166 support for fast tracepoints.
6167 (handle_status): Stabilize threads.
6168 (process_serial_event): Adjust.
6169 * server.h (struct fast_tracepoint_jump): Forward declare.
6170 (struct process_info) <fast_tracepoint_jumps>: New field.
6171 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6172 (decode_X_packet, decode_M_packet): Adjust.
6173 (relocate_instruction): Declare.
6174 (in_process_agent_loaded): Declare.
6175 (tracepoint_look_up_symbols): Declare.
6176 (struct fast_tpoint_collect_status): Declare.
6177 (fast_tracepoint_collecting): Declare.
6178 (force_unlock_trace_buffer): Declare.
6179 (handle_tracepoint_bkpts): Declare.
6180 (initialize_low_tracepoint)
6181 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6182 * target.h (struct target_ops) <stabilize_threads,
6183 install_fast_tracepoint_jump_pad>: New fields.
6184 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6185 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6186 [HAVE_STDINT_H]: Include stdint.h.
6187 (trace_debug_1): Rename to ...
6188 (trace_vdebug): ... this.
6189 (trace_debug): Rename to ...
6190 (trace_debug_1): ... this. Add `level' parameter.
6192 (ATTR_USED, ATTR_NOINLINE): New.
6193 (IP_AGENT_EXPORT): New.
6194 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6195 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6196 (about_to_request_buffer_space, trace_buffer_is_full)
6197 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6198 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6199 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6200 (traceframe_write_count, traceframes_created)
6201 (trace_state_variables)
6202 New renaming defines.
6203 (struct ipa_sym_addresses): New.
6204 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6206 (ipa_sym_addrs): New.
6207 (all_tracepoint_symbols_looked_up): New.
6208 (in_process_agent_loaded): New.
6209 (write_e_ipa_not_loaded): New.
6210 (maybe_write_ipa_not_loaded): New.
6211 (tracepoint_look_up_symbols): New.
6212 (debug_threads) [IN_PROCESS_AGENT]: New.
6213 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6214 (UNKNOWN_SIDE_EFFECTS): New.
6215 (stop_tracing): New.
6216 (flush_trace_buffer): New.
6217 (stop_tracing_bkpt): New.
6218 (flush_trace_buffer_bkpt): New.
6219 (read_inferior_integer): New.
6220 (read_inferior_uinteger): New.
6221 (read_inferior_data_pointer): New.
6222 (write_inferior_data_pointer): New.
6223 (write_inferior_integer): New.
6224 (write_inferior_uinteger): New.
6225 (struct collect_static_trace_data_action): Delete.
6226 (enum tracepoint_type): New.
6227 (struct tracepoint) <type>: New field `type'.
6228 <actions_str, step_actions, step_actions_str>: Only include in
6230 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6231 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6232 (tracepoints): Use IP_AGENT_EXPORT.
6233 (last_tracepoint): Don't include in the IPA.
6234 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6235 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6236 (alloced_trace_state_variables): New.
6237 (trace_state_variables): Use IP_AGENT_EXPORT.
6238 (traceframe_t): Delete unused variable.
6239 (circular_trace_buffer): Don't include in the IPA.
6240 (trace_buffer_start): Delete.
6241 (struct trace_buffer_control): New.
6242 (trace_buffer_free): Delete.
6243 (struct ipa_trace_buffer_control): New.
6244 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6245 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6247 (trace_buffer_ctrl): New.
6248 (TRACE_BUFFER_CTRL_CURR): New.
6249 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6250 Reimplement as macros.
6251 (trace_buffer_wrap): Delete.
6252 (traceframe_write_count, traceframe_read_count)
6253 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6254 (struct tracepoint_hit_ctx) <type>: New field.
6255 (struct fast_tracepoint_ctx): New.
6256 (memory_barrier): New.
6258 (record_tracepoint_error): Update atomically in the IPA.
6259 (clear_inferior_trace_buffer): New.
6260 (about_to_request_buffer_space): New.
6261 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6262 updating the same buffer.
6263 (add_tracepoint): Default the tracepoint's type to trap
6264 tracepoint, and orig_size to -1.
6265 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6267 (create_trace_state_variable): New parameter `gdb'. Handle it.
6268 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6269 (cmd_qtdp): Handle fast tracepoints.
6271 (max_jump_pad_size): New.
6272 (gdb_jump_pad_head): New.
6273 (get_jump_space_head): New.
6274 (claim_jump_space): New.
6275 (sort_tracepoints): New.
6276 (MAX_JUMP_SIZE): New.
6277 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6279 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6280 support. Upload fast traceframes, and delete internal IPA
6282 (stop_tracing_handler): New.
6283 (flush_trace_buffer_handler): New.
6284 (cmd_qtstop): Upload fast tracepoints.
6285 (response_tracepoint): Handle fast tracepoints.
6286 (tracepoint_finished_step): Upload fast traceframes. Set the
6287 tracepoint hit context's tracepoint type.
6288 (handle_tracepoint_bkpts): New.
6289 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6290 type. Add comment about fast tracepoints.
6291 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6292 non-existing action_str field.
6293 (get_context_regcache): Handle fast tracepoints.
6294 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6296 (fast_tracepoint_from_jump_pad_address): New.
6297 (fast_tracepoint_from_ipa_tpoint_address): New.
6298 (collecting_t): New.
6299 (force_unlock_trace_buffer): New.
6300 (fast_tracepoint_collecting): New.
6303 (write_inferior_data_ptr): New.
6304 (target_tp_heap): New.
6305 (target_malloc): New.
6306 (download_agent_expr): New.
6308 (download_tracepoints): New.
6309 (download_trace_state_variables): New.
6310 (upload_fast_traceframes): New.
6311 (IPA_FIRST_TRACEFRAME): New.
6312 (IPA_NEXT_TRACEFRAME_1): New.
6313 (IPA_NEXT_TRACEFRAME): New.
6314 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6315 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6316 (gdb_jump_pad_buffer_end): New.
6317 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6318 (initialize_tracepoint): Adjust.
6319 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6320 buffer. Initialize the low module.
6321 * utils.c (PREFIX, TOOLNAME): New.
6322 (malloc_failure): Use PREFIX.
6323 (error): In the IPA, an error causes an exit.
6324 (fatal, warning): Use PREFIX.
6325 (internal_error): Use TOOLNAME.
6326 (NUMCELLS): Increase to 10.
6327 * configure, config.in: Regenerate.
6329 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6331 * server.c (handle_query) <qSupported>: Do two passes over the
6332 qSupported string to avoid nesting strtok.
6334 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6336 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6338 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6340 * configure: Regenerate.
6341 * proc-service.list: New.
6343 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6345 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6348 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6350 * gdbreplay.c (remote_open): Check error return from socket() call by
6351 its equality to -1 not by it being negative.
6352 * remote-utils.c (remote_open): Likewise.
6354 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6356 * config.h: Regenerate.
6358 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6360 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6361 doesn't provide PTRACE_GET_THREAD_AREA.
6363 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6365 * linux-m68k-low.c: Include <asm/ptrace.h>
6366 (ps_get_thread_area): Implement.
6368 2010-05-03 Doug Evans <dje@google.com>
6370 * event-loop.c (struct callback_event): New struct.
6371 (callback_list): New global.
6372 (append_callback_event, delete_callback_event): New functions.
6373 (process_callback): New function.
6374 (start_event_loop): Call it.
6375 * remote-utils.c (NOT_SCHEDULED): Define.
6376 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6377 moved out of readchar.
6378 (readchar): Rewrite. Call reschedule before returning.
6379 (reset_readchar): New function.
6380 (remote_close): Call it.
6381 (process_remaining, reschedule): New functions.
6382 * server.h (callback_handler_func): New typedef.
6383 (append_callback_event, delete_callback_event): Declare.
6385 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6387 * proc-service.c (ps_pglobal_lookup): Use
6388 thread_db_look_up_one_symbol.
6389 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6390 parameter. Use it instead of all_symbols_looked_up.
6391 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6393 (all_symbols_looked_up): Don't declare.
6394 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6395 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6397 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6398 Set all_symbols_looked_up here.
6399 (thread_db_look_up_one_symbol): New.
6400 (thread_db_get_tls_address): Adjust.
6401 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6402 thread_db object on the heap, and tentatively set it in the
6404 (thread_db_init): Don't set all_symbols_looked_up here.
6405 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6407 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6409 * linux-low.c (linux_kill, linux_detach): Adjust.
6410 (status_pending_p_callback): Remove redundant statement. Check
6411 for !TARGET_WAITIKIND_IGNORE, instead of
6412 TARGET_WAITKIND_STOPPED.
6413 (handle_tracepoints): Make sure LWP is locked. Adjust.
6414 (linux_wait_for_event_1): Adjust.
6415 (linux_cancel_breakpoints): New.
6416 (unsuspend_one_lwp): New.
6417 (unsuspend_all_lwps): New.
6418 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6419 (send_sigstop_callback): Change return type to int, add new
6420 `except' parameter and handle it.
6421 (suspend_and_send_sigstop_callback): New.
6422 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6423 pass them down. If SUSPEND, also increment the lwp's suspend
6425 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6426 (need_step_over_p): Don't consider suspended LWPs.
6427 (start_step_over): Adjust.
6428 (proceed_one_lwp): Change return type to int, add new `except'
6429 parameter and handle it.
6430 (unsuspend_and_proceed_one_lwp): New.
6431 (proceed_all_lwps): Use find_inferior instead of
6433 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6434 also decrement the suspend count of LWPs. Pass `except' down,
6435 instead of hacking its suspend count.
6436 (linux_pause_all): Add `freeze' parameter. Adjust.
6437 (linux_unpause_all): New.
6438 (linux_target_ops): Install linux_unpause_all.
6439 * server.c (handle_status): Adjust.
6440 * target.h (struct target_ops): New fields `unpause_all' and
6441 `cancel_breakpoints'. Add new parameter to `pause_all'.
6442 (pause_all): Add new `freeze' parameter.
6444 (cancel_breakpoints): New.
6445 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6447 (cmd_qtstart): Pause threads.
6448 (stop_tracing): Pause threads, and cancel breakpoints.
6449 * win32-low.c (win32_target_ops): Adjust.
6451 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6453 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6454 the inferior right away from here...
6455 (linux_wait_1): ... to here, and adjust to check the thread's
6456 last_resume_kind instead of the lwp's step or stop_expected flags.
6458 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6460 * README: Use consistent `GDB' and `GDBserver' spellings.
6462 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6464 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6465 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6466 (linux_detach_one_lwp): Assume the lwp is stopped.
6467 (any_thread_of): Delete.
6468 (linux_detach): Stop all lwps here. Don't blindly delete all
6470 (delete_lwp_callback): New.
6471 (linux_mourn): Delete all lwps of the process that is gone.
6472 (linux_wait_1): Don't delete the last lwp of the process here.
6473 * mem-break.h (mark_breakpoints_out): Declare.
6474 * mem-break.c (mark_breakpoints_out): New.
6475 (free_all_breakpoints): Use it.
6476 * server.c (handle_target_event): If the process is gone, mark
6478 * thread-db.c (struct thread_db) <create_bp>: New field.
6479 (thread_db_enable_reporting): Fix prototype. Store a thread event
6480 breakpoint reference in the thread_db struct.
6481 (thread_db_load_search): Clear the thread_db object.
6482 (try_thread_db_load_1): Ditto.
6483 (switch_to_process): New.
6484 (disable_thread_event_reporting): Use it.
6485 (remove_thread_event_breakpoints): New.
6486 (thread_db_detach, thread_db_mourn): Use it.
6488 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6490 * linux-low.c (linux_enable_event_reporting): New.
6491 (linux_wait_for_event_1, handle_extended_wait): Use it.
6493 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6495 * linux-low.c (linux_kill_one_lwp, linux_kill)
6496 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6497 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6498 SIGSTOP even if the LWP is stopped.
6499 (send_sigstop_callback): New.
6500 (stop_all_lwps): Use send_sigstop_callback instead.
6501 (linux_resume_one_thread): Adjust.
6502 (proceed_one_lwp): Still proceed an LWP that the client has
6503 requested to stop, if we haven't reported it as stopped yet. Make
6504 sure that LWPs the client want stopped, have a pending SIGSTOP.
6506 2010-04-26 Doug Evans <dje@google.com>
6508 * server.c (handle_general_set): Make static.
6510 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6511 Print received char after testing for error/eof instead of before.
6512 (input_interrupt): Tweak comment.
6514 2010-04-23 Doug Evans <dje@google.com>
6516 * server.c (start_inferior): Print inferior argv if --debug.
6518 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6520 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6521 * nto-x86-low.c: Include server.h
6523 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6525 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6526 be consistent with other sources of this directory.
6527 (init_registers_amd64): Correct name of source file of this function
6530 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6532 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6535 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6537 * win32-i386-low.c: Add 64-bit support.
6538 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6539 (init_registers_amd64): Declare.
6540 (mappings): Add 64-bit version of array.
6541 (init_windows_x86): New function.
6542 (the_low_target): Change init_arch field to init_windows_x86.
6544 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6546 * win32-low.c: Adapt to support also 64-bit architecture.
6547 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6548 (get_image_name): Use SIZE_T type for local variable `done'.
6549 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6550 (toolhelp_get_dll_name): Idem.
6551 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6552 Use uintptr_t typecast to avoid warning.
6553 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6554 (handle_exception): Use phex_nz to avoid warning.
6555 (win32_wait): Remove unused local variable `process'.
6557 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6559 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6562 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6564 * configure.ac: Use `ws2_32' library for srv_mingw.
6565 * configure: Regenerate.
6566 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6567 * remote-utils.c: Likewise.
6569 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6571 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6572 if __x86_64__ is defined.
6574 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6576 * configure: Regenerate.
6578 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6580 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6581 * target.h (target_ops): New get_tib_address field.
6582 * win32-low.h (win32_thread_info): Add thread_local_base field.
6583 * win32-low.c (child_add_thread): Add tlb argument.
6584 Set thread_local_base field to TLB.
6585 (get_child_debug_event): Adapt to child_add_thread change.
6586 (win32_get_tib_address): New function.
6587 (win32_target_ops): Set get_tib_address field to
6588 win32_get_tib_address.
6589 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6591 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6593 * linux-low.c (linux_mourn): Also remove the process.
6594 * server.c (handle_target_event): Don't remove the process here.
6595 * nto-low.c (nto_mourn): New.
6596 (nto_target_ops): Install it.
6597 * spu-low.c (spu_mourn): New.
6598 (spu_target_ops): Install it.
6599 * win32-low.c (win32_mourn): New.
6600 (win32_target_ops): Install it.
6602 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6604 * server.h (buffer_xml_printf): Remove redundant `;'.
6606 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6608 * regcache.c (set_register_cache): Invalidate regcaches before
6609 changing the register cache layout.
6610 (regcache_invalidate_one): Allow a NULL regcache.
6611 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6612 regcaches before changing the register cache layout or the target
6615 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6617 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6618 variable warning on Linux/x86-64.
6620 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6622 GDBserver disconnected tracing support.
6624 * linux-low.c (linux_remove_process): Delete.
6625 (add_lwp): Don't set last_resume_kind here.
6626 (linux_kill): Use `mourn'.
6627 (linux_detach): Use `thread_db_detach', and `mourn'.
6629 (linux_attach_lwp_1): Adjust comment.
6630 (linux_attach): last_resume_kind moved the thread_info; adjust.
6631 (status_pending_p_callback): Adjust.
6632 (linux_wait_for_event_1): Adjust.
6633 (count_events_callback, select_singlestep_lwp_callback)
6634 (select_event_lwp_callback, cancel_breakpoints_callback)
6635 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6636 (proceed_one_lwp): Adjust.
6637 (linux_async): Add debug output.
6638 (linux_thread_stopped): New.
6639 (linux_pause_all): New.
6640 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6642 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6643 (thread_db_free): Delete declaration.
6644 (thread_db_detach, thread_db_mourn): Declare.
6645 * thread-db.c (thread_db_init): Use thread_db_mourn.
6646 (thread_db_free): Delete, split in two.
6647 (disable_thread_event_reporting): New.
6648 (thread_db_detach): New.
6649 (thread_db_mourn): New.
6651 * server.h (struct thread_info) <last_resume_kind>: New field.
6652 <attached>: Add comment.
6653 <gdb_detached>: New field.
6654 (handler_func): Change return type to int.
6655 (handle_serial_event, handle_target_event): Ditto.
6656 (gdb_connected): Declare.
6658 (disconnected_tracing): Declare.
6659 (stop_tracing): Declare.
6661 * server.c (handle_query) <qSupported>: Report support for
6662 disconnected tracing.
6663 (queue_stop_reply_callback): Account for running threads.
6664 (gdb_wants_thread_stopped): New.
6665 (gdb_wants_all_threads_stopped): New.
6666 (gdb_reattached_process): New.
6667 (handle_status): Clear the `gdb_detached' flag of all processes.
6668 In all-stop, stop all threads.
6669 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6670 (process_serial_event): If the remote connection breaks, or if an
6671 exit was forced with "monitor exit", force an event loop exit.
6672 Handle disconnected tracing on detach.
6673 (handle_serial_event): Adjust.
6674 (handle_target_event): If GDB isn't connected, forward events back
6675 to the inferior, unless the last process exited, in which case,
6676 exit gdbserver. Adjust interface.
6678 * remote-utils.c (remote_open): Don't block in accept. Instead
6679 register an event loop source on the listen socket file
6680 descriptor. Refactor bits into ...
6681 (listen_desc): ... this new global.
6682 (gdb_connected): ... this new function.
6683 (enable_async_notification): ... this new function.
6684 (handle_accept_event): ... this new function.
6685 (remote_close): Clear remote_desc.
6687 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6689 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6691 (mourn_inferior): Define.
6692 (target_process_qsupported): Avoid the dangling else problem.
6693 (thread_stopped): Define.
6694 (pause_all): Define.
6695 (target_waitstatus_to_string): Declare.
6696 * target.c (target_waitstatus_to_string): New.
6698 * tracepoint.c (tracing): Make extern.
6699 (disconnected_tracing): New.
6700 (stop_tracing): Make extern. Handle tracing stops due to GDB
6702 (cmd_qtdisconnected): New.
6703 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6704 (handle_tracepoint_general_set): Handle QTDisconnected.
6706 * event-loop.c (event_handler_func): Change return type to int.
6707 (process_event): Bail out if the event handler wants the event
6709 (handle_file_event): Ditto.
6710 (start_event_loop): Bail out if the event handler wants the event
6713 * nto-low.c (nto_target_ops): Adjust.
6714 * spu-low.c (spu_wait): Don't remove the process here.
6715 (spu_target_ops): Adjust.
6716 * win32-low.c (win32_wait): Don't remove the process here.
6717 (win32_target_ops): Adjust.
6719 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6721 * regcache.c (realloc_register_cache): Invalidate inferior's
6722 regcache before recreating it.
6724 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6726 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6728 2010-04-09 Stan Shebs <stan@codesourcery.com>
6729 Pedro Alves <pedro@codesourcery.com>
6731 * server.h (LONGEST): New.
6732 (struct thread_info) <while_stepping>: New field.
6733 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6735 (initialize_tracepoint, handle_tracepoint_general_set)
6736 (handle_tracepoint_query, tracepoint_finished_step)
6737 (tracepoint_was_hit, release_while_stepping_state_list):
6738 (current_traceframe): Declare.
6739 * server.c (handle_general_set): Handle tracepoint packets.
6741 (write_memory): New.
6742 (handle_search_memory_1): Use read_memory.
6743 (handle_query): Report support for conditional tracepoints, trace
6744 state variables, and tracepoint sources. Handle tracepoint
6746 (main): Initialize the tracepoints module.
6747 (process_serial_event): Handle traceframe reads/writes.
6749 * linux-low.c (handle_tracepoints): New.
6750 (linux_wait_1): Call it.
6751 (linux_resume_one_lwp): Handle while-stepping.
6752 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6753 (linux_target_ops): Install them.
6754 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6756 * linux-x86-low.c (x86_supports_tracepoints): New.
6757 (the_low_target). Install it.
6759 * mem-break.h (delete_breakpoint): Declare.
6760 * mem-break.c (delete_breakpoint): Make external.
6762 * target.h (struct target_ops): Add `supports_tracepoints',
6763 `read_pc', and `write_pc' fields.
6764 (target_supports_tracepoints): Define.
6765 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6768 * regcache.h (struct regcache) <registers_owned>: New field.
6769 (init_register_cache, regcache_cpy): Declare.
6770 (regcache_read_pc, regcache_write_pc): Declare.
6771 (register_cache_size): Declare.
6772 (supply_regblock): Declare.
6773 * regcache.c (init_register_cache): New.
6774 (new_register_cache): Use it.
6775 (regcache_cpy): New.
6776 (register_cache_size): New.
6777 (supply_regblock): New.
6778 (regcache_read_pc, regcache_write_pc): New.
6780 * tracepoint.c: New.
6782 * Makefile.in (OBS): Add tracepoint.o.
6783 (tracepoint.o): New rule.
6785 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6787 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6789 (i386-mmx.c): Likewise.
6790 (i386-mmx-linux.o): Likewise.
6791 (i386-mmx-linux.c): Likewise.
6793 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6794 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6795 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6796 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6798 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6799 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6800 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6802 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6804 * Makefile.in (clean): Updated.
6806 (i386-avx.c): Likewise.
6807 (i386-avx-linux.o): Likewise.
6808 (i386-avx-linux.c): Likewise.
6809 (amd64-avx.o): Likewise.
6810 (amd64-avx.c): Likewise.
6811 (amd64-avx-linux.o): Likewise.
6812 (amd64-avx-linux.c): Likewise.
6814 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6815 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6816 (srv_amd64_regobj): Add amd64-avx.o.
6817 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6818 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6819 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6820 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6821 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6822 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6823 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6825 * i387-fp.c: Include "i386-xstate.h".
6827 (i387_cache_to_xsave): Likewise.
6828 (i387_xsave_to_cache): Likewise.
6829 (x86_xcr0): Likewise.
6831 * i387-fp.h (i387_cache_to_xsave): Likewise.
6832 (i387_xsave_to_cache): Likewise.
6833 (x86_xcr0): Likewise.
6835 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6836 * linux-crisv32-low.c (target_regsets): Likewise.
6837 * linux-m68k-low.c (target_regsets): Likewise.
6838 * linux-mips-low.c (target_regsets): Likewise.
6839 * linux-ppc-low.c (target_regsets): Likewise.
6840 * linux-s390-low.c (target_regsets): Likewise.
6841 * linux-sh-low.c (target_regsets): Likewise.
6842 * linux-sparc-low.c (target_regsets): Likewise.
6843 * linux-xtensa-low.c (target_regsets): Likewise.
6845 * linux-low.c: Include <sys/uio.h>.
6846 (regsets_fetch_inferior_registers): Support nt_type.
6847 (regsets_store_inferior_registers): Likewise.
6848 (linux_process_qsupported): New.
6849 (linux_target_ops): Add linux_process_qsupported.
6851 * linux-low.h (regset_info): Add nt_type.
6852 (linux_target_ops): Add process_qsupported.
6854 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6856 (init_registers_i386_avx_linux): New.
6857 (init_registers_amd64_avx_linux): Likewise.
6858 (xmltarget_i386_linux_no_xml): Likewise.
6859 (xmltarget_amd64_linux_no_xml): Likewise.
6860 (PTRACE_GETREGSET): Likewise.
6861 (PTRACE_SETREGSET): Likewise.
6862 (x86_fill_xstateregset): Likewise.
6863 (x86_store_xstateregset): Likewise.
6864 (use_xml): Likewise.
6865 (x86_linux_update_xmltarget): Likewise.
6866 (x86_linux_process_qsupported): Likewise.
6867 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6868 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6869 init_registers_i386_linux here. Call
6870 x86_linux_update_xmltarget.
6871 (the_low_target): Add x86_linux_process_qsupported.
6873 * server.c (handle_query): Call target_process_qsupported.
6875 * target.h (target_ops): Add process_qsupported.
6876 (target_process_qsupported): New.
6878 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6880 * inferiors.c (add_thread): Set last_status kind to
6881 TARGET_WAITKIND_IGNORE.
6882 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6883 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6884 (linux_wait_1): Move `thread' local definition to block that uses
6885 it. Don't NULL initialize `event_child'.
6886 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6887 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6888 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6890 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6892 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6893 an extended waitstatus, or by a watchpoint.
6894 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6895 thread was stepping or has been stopped by a watchpoint.
6897 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6899 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6900 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6901 of another, then delete the previous, and validate all
6903 (validate_inserted_breakpoint): New.
6904 (delete_disabled_breakpoints): New.
6905 (validate_breakpoints): New.
6906 (check_mem_read): Validate breakpoints before trusting their
6907 shadow. Delete disabled breakpoints.
6908 (check_mem_write): Validate breakpoints before trusting they
6909 should be inserted. Delete disabled breakpoints.
6910 * mem-break.h (validate_breakpoints):
6911 * server.c (handle_query): Validate breakpoints when we see a
6914 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6916 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6917 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6918 if we could tell there's a GDB breakpoint at stop_pc.
6919 (need_step_over_p): Don't do a step over if we find a GDB
6920 breakpoint at the resume PC.
6922 * mem-break.c (struct raw_breakpoint): New.
6923 (enum bkpt_type): New type `gdb_breakpoint'.
6924 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6925 fields. New field `raw'.
6926 (find_raw_breakpoint_at): New.
6927 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6929 (set_breakpoint_at): Adjust.
6930 (delete_raw_breakpoint): New.
6931 (release_breakpoint): New.
6932 (delete_breakpoint): Rename to...
6933 (delete_breakpoint_1): ... this. Add proc parameter. Use
6934 release_breakpoint. Return ENOENT.
6935 (delete_breakpoint): Reimplement.
6936 (find_breakpoint_at): Delete.
6937 (find_gdb_breakpoint_at): New.
6938 (delete_breakpoint_at): Delete.
6939 (set_gdb_breakpoint_at): New.
6940 (delete_gdb_breakpoint_at): New.
6941 (gdb_breakpoint_here): New.
6942 (set_reinsert_breakpoint): Use release_breakpoint.
6943 (uninsert_breakpoint): Rename to ...
6944 (uninsert_raw_breakpoint): ... this.
6945 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6946 (reinsert_raw_breakpoint): Change parameter type to
6948 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6950 (check_breakpoints): Adjust. Use release_breakpoint.
6951 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6952 (breakpoint_inserted_here): Ditto.
6953 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6954 Don't trust the breakpoint's shadow if it is not inserted.
6955 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6956 (delete_all_breakpoints): Adjust.
6957 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6958 use delete_breakpoint_1.
6960 * mem-break.h (breakpoints_supported): Delete declaration.
6961 (set_gdb_breakpoint_at): Declare.
6962 (gdb_breakpoint_here): Declare.
6963 (delete_breakpoint_at): Delete.
6964 (delete_gdb_breakpoint_at): Declare.
6966 * server.h (struct raw_breakpoint): Forward declare.
6967 (struct process_info): New field `raw_breakpoints'.
6969 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6972 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6974 * linux-low.c (status_pending_p_callback): Fix comment.
6975 (linux_wait_for_event_1): Move most of the internal breakpoint
6976 handling from here...
6977 (linux_wait_1): ... to here.
6978 (count_events_callback): New.
6979 (select_singlestep_lwp_callback): New.
6980 (select_event_lwp_callback): New.
6981 (cancel_breakpoints_callback): New.
6982 (select_event_lwp): New.
6983 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6984 priority to all LWPs that have had events that should be reported
6985 to the client. Cancel breakpoints when about to reporting the
6986 event to the client, not while stopping lwps. No longer cancel
6987 finished single-steps here.
6988 (cancel_finished_single_step): Delete.
6989 (cancel_finished_single_steps): Delete.
6991 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6993 * mem-break.c (enum bkpt_type): New.
6994 (struct breakpoint): New field `type'.
6995 (set_breakpoint_at): Change return type to struct breakpoint
6996 pointer. Set type to `other_breakpoint' by default.
6997 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6998 in the breakpoint list.
6999 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7000 (reinsert_breakpoint): Rename to ...
7001 (reinsert_raw_breakpoint): ... this.
7002 (reinsert_breakpoints_at): Adjust.
7003 * mem-break.h (struct breakpoint): Declare.
7004 (set_breakpoint_at): Change return type to struct breakpoint
7007 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7009 * server.c (handle_query): Assign, not compare.
7011 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7013 Teach linux gdbserver to step-over-breakpoints.
7015 * linux-low.c (can_hardware_single_step): New.
7016 (supports_breakpoints): New.
7017 (handle_extended_wait): If stopping threads, read the stop pc of
7020 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7021 low target doesn't support retrieving the PC.
7022 (add_lwp): Set last_resume_kind to resume_continue.
7023 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7024 (linux_attach): Don't clear stop_expected. Set the lwp's
7025 last_resume_kind to resume_stop.
7026 (linux_detach_one_lwp): Don't check for removed breakpoints.
7027 (check_removed_breakpoint): Delete.
7028 (status_pending_p): Rename to ...
7029 (status_pending_p_callback): ... this. Don't check for removed
7030 breakpoints. Don't consider threads that are stopped from GDB's
7032 (linux_wait_for_lwp): Always read the stop_pc here.
7033 (cancel_breakpoint): New.
7034 (step_over_bkpt): New global.
7035 (linux_wait_for_event_1): Implement stepping over breakpoints.
7036 (gdb_wants_lwp_stopped): New.
7037 (gdb_wants_all_stopped): New.
7038 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7039 single-step traps here. Store the thread's last reported target
7041 (send_sigstop): Don't clear stop_expected. Always set it,
7043 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7044 (cancel_finished_single_step): New.
7045 (cancel_finished_single_steps): New.
7046 (wait_for_sigstop): Don't cancel finished single-step traps here.
7047 (linux_resume_one_lwp): Don't check for removed breakpoints.
7048 Don't set `step' on non-hardware step archs.
7049 (linux_set_resume_request): Ignore resume_stop requests if already
7050 stopping or stopped. Set the lwp's last_resume_kind.
7051 (resume_status_pending_p): Don't check for removed breakpoints.
7052 (need_step_over_p): New.
7053 (start_step_over): New.
7054 (finish_step_over): New.
7055 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7056 requests. Clear the thread's last reported target waitstatus.
7057 Don't use the `suspended' flag. Don't consider pending breakpoints.
7058 (linux_resume): Start a step-over if necessary.
7059 (proceed_one_lwp): New.
7060 (proceed_all_lwps): New.
7061 (unstop_all_lwps): New.
7062 * linux-low.h (struct lwp_info): Rewrite comment for the
7063 `suspended' flag. Add the `stop_pc' field. Delete the
7064 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7065 Add `'last_resume_kind' and `need_step_over' fields.
7066 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7067 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7068 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7069 (set_raw_breakpoint_at): New.
7070 (set_breakpoint_at): Rewrite to use it.
7071 (reinsert_breakpoint_handler): Delete.
7072 (set_reinsert_breakpoint): New.
7073 (reinsert_breakpoint_by_bp): Delete.
7074 (delete_reinsert_breakpoints): New.
7075 (uninsert_breakpoint): Rewrite.
7076 (uninsert_breakpoints_at): New.
7077 (reinsert_breakpoint): Rewrite.
7078 (reinsert_breakpoints_at): New.
7079 (check_breakpoints): Rewrite.
7080 (breakpoint_here): New.
7081 (breakpoint_inserted_here): New.
7082 (check_mem_read): Adjust.
7083 * mem-break.h (breakpoints_supported, breakpoint_here)
7084 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7085 (reinsert_breakpoint_by_bp): Delete declaration.
7086 (delete_reinsert_breakpoints): Declare.
7087 (reinsert_breakpoint): Delete declaration.
7088 (reinsert_breakpoints_at): Declare.
7089 (uninsert_breakpoint): Delete declaration.
7090 (uninsert_breakpoints_at): Declare.
7091 (check_breakpoints): Adjust prototype.
7092 * server.h: Adjust include order.
7093 (struct thread_info): Declare here. Add a `last_status' field.
7095 2010-03-23 Michael Snyder <msnyder@vmware.com>
7097 * server.c (crc32): New function.
7098 (handle_query): Add handling for 'qCRC:' request.
7100 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7102 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7103 lwp had been stopped by a watchpoint.
7105 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7107 * server.h (internal_error): Declare.
7108 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7109 * utils.c (internal_error): New function.
7111 2010-03-15 Andreas Schwab <schwab@redhat.com>
7113 * configure.srv: Fix typo setting srv_regobj.
7115 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7117 * linux-low.c (fetch_register): Avoid passing a non string literal
7119 (usr_store_inferior_registers): Ditto.
7121 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7123 * linux-low.c (linux_write_memory): Bail out early if peeking
7126 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7128 * linux-low.h (struct lwp_info): New fields
7129 `stopped_by_watchpoint' and `stopped_data_address'.
7130 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7131 here, and cache them in the lwp object.
7132 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7134 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7136 (linux_stopped_by_watchpoint): Rewrite.
7137 (linux_stopped_data_address): Rewrite.
7139 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7141 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7142 switching the current inferior, not before.
7144 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7146 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7147 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7148 i386-linux.c and amd64-linux.c.
7149 (reg-i386.o): Removed.
7150 (reg-i386.c): Likewise.
7151 (reg-i386-linux.o): Likewise.
7152 (reg-i386-linux.c): Likewise.
7153 (reg-x86-64.o): Likewise.
7154 (reg-x86-64.c): Likewise.
7155 (reg-x86-64-linux.o): Likewise.
7156 (reg-x86-64-linux.c): Likewise.
7159 (i386-linux.o): Likewise.
7160 (i386-linux.c): Likewise.
7161 (amd64.o): Likewise.
7162 (amd64.c): Likewise.
7163 (amd64-linux.o): Likewise.
7164 (amd64-linux.c): Likewise.
7166 * configure.srv (srv_i386_regobj): New.
7167 (srv_i386_linux_regobj): Likewise.
7168 (srv_amd64_regobj): Likewise.
7169 (srv_amd64_linux_regobj): Likewise.
7170 (srv_i386_32bit_xmlfiles): Likewise.
7171 (srv_i386_64bit_xmlfiles): Likewise.
7172 (srv_i386_xmlfiles): Likewise.
7173 (srv_amd64_xmlfiles): Likewise.
7174 (srv_i386_linux_xmlfiles): Likewise.
7175 (srv_amd64_linux_xmlfiles): Likewise.
7176 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7177 srv_xmlfiles to $srv_i386_xmlfiles.
7178 (i[34567]86-*-mingw32ce*): Likewise.
7179 (i[34567]86-*-mingw*): Likewise.
7180 (i[34567]86-*-nto*): Likewise.
7181 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7182 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7183 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7184 (x86_64-*-linux*): Likewise.
7186 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7187 (init_registers_amd64_linux): New.
7188 (x86_arch_setup): Replace init_registers_x86_64_linux with
7189 init_registers_amd64_linux.
7191 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7193 * configure.ac: Check for libdl. If it is not available link against
7194 static libthread_db.
7195 * configure: Regenerate.
7197 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7201 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7202 handing a read watchpoint.
7203 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7205 2010-02-12 Doug Evans <dje@google.com>
7207 * linux-low.c (linux_supports_tracefork_flag): Document.
7208 (linux_look_up_symbols): Add comment.
7210 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7212 * regcache.c (supply_register): Clear regcache if buf is NULL.
7214 2010-02-02 Nicolas Roche <roche@sourceware.org>
7215 Joel Brobecker <brobecker@adacore.com>
7217 * inferiors.c (find_inferior): Add function documentation.
7218 (unloaded_dll): Handle the case where the unloaded dll has not
7219 been previously registered in the dll list.
7221 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7223 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7224 (thumb2_breakpoint): New.
7225 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7227 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7229 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7230 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7233 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7235 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7237 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7239 * linux-s390-low.c (s390_collect_ptrace_register)
7240 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7242 2010-01-21 Doug Evans <dje@google.com>
7244 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7245 (PTRACE_ARG4_TYPE): New macro.
7246 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7247 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7248 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7249 (usr_store_inferior_registers): Ditto.
7250 (linux_read_memory, linux_write_memory): Ditto.
7251 (linux_test_for_tracefork): Ditto.
7253 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7254 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7256 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7258 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7261 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7263 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7264 prototype to take a regcache. Adjust.
7266 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7268 * regcache.h (struct thread_info): Forward declare.
7269 (struct regcache): New.
7270 (new_register_cache): Adjust prototype.
7271 (get_thread_regcache): Declare.
7272 (free_register_cache): Adjust prototype.
7273 (registers_to_string, registers_from_string): Ditto.
7274 (supply_register, supply_register_by_name, collect_register)
7275 (collect_register_as_string, collect_register_by_name): Ditto.
7276 * regcache.c (struct inferior_regcache_data): Delete.
7277 (get_regcache): Rename to ...
7278 (get_thread_regcache): ... this. Adjust. Switch inferior before
7280 (regcache_invalidate_one): Adjust.
7281 (regcache_invalidate): Fix prototype.
7282 (new_register_cache): Return the new register cache.
7283 (free_register_cache): Change prototype.
7284 (realloc_register_cache): Adjust.
7285 (registers_to_string): Change prototype to take a regcache. Adjust.
7286 (registers_from_string): Ditto.
7287 (register_data): Ditto.
7288 (supply_register): Ditto.
7289 (supply_register_by_name): Ditto.
7290 (collect_register): Ditto.
7291 (collect_register_as_string): Ditto.
7292 (collect_register_by_name): Ditto.
7293 * server.c (process_serial_event): Adjust.
7294 * linux-low.h (regset_fill_func, regset_store_func): Change
7296 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7298 * linux-low.c (get_stop_pc): Adjust.
7299 (check_removed_breakpoint): Adjust.
7300 (linux_wait_for_event): Adjust.
7301 (linux_resume_one_lwp): Adjust.
7302 (fetch_register): Add regcache parameter. Adjust.
7303 (usr_store_inferior_registers): Ditto.
7304 (regsets_fetch_inferior_registers): Ditto.
7305 (regsets_store_inferior_registers): Ditto.
7306 (linux_fetch_registers, linux_store_registers): Ditto.
7307 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7309 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7311 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7312 prototype to take a regcache.
7313 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7314 * remote-utils.c (convert_ascii_to_int, outreg)
7315 (prepare_resume_reply): Change prototype to take a regcache.
7317 * target.h (struct target_ops) <fetch_registers, store_registers>:
7318 Change prototype to take a regcache.
7319 (fetch_inferior_registers, store_inferior_registers): Change
7320 prototype to take a regcache. Adjust.
7321 * proc-service.c (ps_lgetregs): Adjust.
7322 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7323 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7324 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7325 take a regcache. Adjust.
7326 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7327 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7328 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7329 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7330 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7331 (cris_cannot_fetch_register):
7332 (cris_breakpoint_at): Change prototype to take a regcache.
7334 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7335 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7336 to take a regcache. Adjust.
7337 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7339 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7340 take a regcache. Adjust.
7341 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7342 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7343 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7344 * linux-mips-low.c (mips_get_pc):
7345 (mips_set_pc): Change prototype to take a regcache. Adjust.
7346 (mips_reinsert_addr): Adjust.
7347 (mips_collect_register): Change prototype to take a regcache.
7349 (mips_supply_register):
7350 (mips_collect_register_32bit, mips_supply_register_32bit)
7351 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7352 (mips_store_fpregset): Ditto.
7353 * linux-ppc-low.c (ppc_supply_ptrace_register)
7354 (ppc_supply_ptrace_register): Ditto.
7355 (parse_spufs_run): Adjust.
7356 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7357 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7358 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7359 take a regcache. Adjust.
7360 * linux-s390-low.c (s390_collect_ptrace_register)
7361 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7362 (s390_set_pc): Change prototype to take a regcache. Adjust.
7363 (s390_arch_setup): Adjust.
7364 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7365 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7366 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7367 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7368 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7370 (sparc_breakpoint_at): Adjust.
7371 * linux-xtensa-low.c (xtensa_fill_gregset):
7372 (xtensa_store_gregset):
7373 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7374 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7375 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7376 prototype to take a regcache. Adjust.
7377 * win32-arm-low.c (arm_fetch_inferior_register)
7378 (arm_store_inferior_register): Change prototype to take a
7380 * win32-i386-low.c (i386_fetch_inferior_register)
7381 (i386_store_inferior_register): Change prototype to take a
7383 * win32-low.c (child_fetch_inferior_registers)
7384 (child_store_inferior_registers): Change prototype to take a
7386 (win32_wait): Adjust.
7387 (win32_fetch_inferior_registers): Change prototype to take a
7389 (win32_store_inferior_registers): Adjust.
7390 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7391 store_inferior_register>: Change prototype to take a regcache.
7393 2010-01-20 Doug Evans <dje@google.com>
7395 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7397 (linux_wait_for_event1, linux_init_signals): Ditto.
7398 (W_STOPCODE): Provide definition if missing.
7400 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7402 * linux-low.c (linux_core_of_thread): New.
7403 (compare_ints, show_process, list_threads): New.
7404 (linux_qxfer_osdata): Report threads and cores.
7405 (linux_target_op): Register linux_core_of_thread.
7406 * remote-utils.c (prepare_resume_reply): Report the core.
7407 (buffer_xml_printf): Support %d specifier.
7408 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7410 (handle_query): Handle qXfer:threads. Announce availability
7412 * target.h (struct target_ops): New field core_of_thread.
7414 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7416 * Makefile.in (clean): Remove new generated files.
7417 (reg-s390.o, reg-s390.c): Remove rules.
7418 (reg-s390x.o, reg-s390x.c): Likewise.
7419 (s390-linux32.o, s390-linux32.c): Add rules.
7420 (s390-linux64.o, s390-linux64.c): Likewise.
7421 (s390x-linux64.o, s390x-linux64.c): Likewise.
7422 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7423 * linux-s390-low.c: Include <elf.h>.
7424 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7425 (init_registers_s390): Remove prototype.
7426 (init_registers_s390x): Likewise.
7427 (init_registers_s390_linux32): Add prototype.
7428 (init_registers_s390_linux64): Likewise.
7429 (init_registers_s390x_linux64): Likewise.
7430 (s390_num_regs_3264): New define.
7431 (s390_regmap_3264): New global variable.
7432 (s390_cannot_fetch_register): Remove obsolete check.
7433 (s390_cannot_store_register): Likewise.
7434 (s390_collect_ptrace_register): Handle upper/lower register halves.
7435 (s390_supply_ptrace_register): Likewise.
7436 (s390_fill_gregset): Update to register number changes.
7437 (s390_get_hwcap): New routine.
7438 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7439 Install appropriate regmap and register set.
7441 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7443 * server.c (gdbserver_version): Update copyright year to 2010.
7444 * gdbreplay.c (gdbreplay_version): Likewise.
7446 2009-12-28 Doug Evans <dje@google.com>
7448 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7449 elf/external.h. Include <elf.h> instead but only if necessary.
7451 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7453 * linux-low.c (linux_remove_process): Remove `detaching'
7454 parameter. Don't release/detach from thread_db here.
7455 (linux_kill): Release/detach from thread_db here, ...
7456 (linux_detach): ... and here, before actually detaching.
7457 (linux_wait_1): ... and here, when a process exits.
7458 * thread-db.c (any_thread_of): New.
7459 (thread_db_free): Switch the current inferior to a thread of the
7462 2009-12-21 Doug Evans <dje@google.com>
7464 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7466 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7467 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7468 warning ifndef __NR_tkill. Move setting of errno there too.
7469 Delete unnecessary resetting of errno after syscall.
7470 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7472 * configure.ac: Check for dladdr.
7473 * config.in: Regenerate.
7474 * configure: Regenerate.
7475 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7476 (try_thread_db_load): Update.
7478 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7480 2009-12-18 Doug Evans <dje@google.com>
7482 * event-loop.c: Include unistd.h if it exists.
7484 * linux-low.c (my_waitpid): Move definition away from being in
7485 between linux_tracefork_child/linux_test_for_tracefork.
7487 * gdb_proc_service.h (psaddr_t): Fix type.
7488 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7489 signature to match glibc.
7491 2009-12-16 Doug Evans <dje@google.com>
7493 * linux-low.c (linux_read_memory): Fix argument to read.
7495 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7497 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7498 events, don't leave current_inferior pointing at null.
7500 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7502 * win32-low.c (LOG): Delete.
7503 (OUTMSG): Output to stderr.
7504 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7505 on compile time LOG macro.
7506 (win32_wait): Fix debug output.
7508 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7510 * win32-low.c (win32_add_one_solib): If the dll name is
7511 "ntdll.dll", prepend the system directory to the dll path.
7513 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7515 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7517 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7518 Vladimir Prus <vladimir@codesourcery.com>
7520 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7521 * configure.ac: Check for __mcoldfire__ and set
7522 gdb_cv_m68k_is_coldfire.
7523 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7524 reg-cf.o and reg-m68k.o.
7525 * configure: Regenerated.
7527 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7529 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7530 Pass it to thread_db_free.
7531 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7532 proper `detaching' argument to linux_remove_process.
7533 * linux-low.h (thread_db_free): Add `detaching' parameter.
7534 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7536 (thread_db_free): Add `detaching' parameter. Only
7537 call td_ta_clear_event if detaching from process.
7539 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7541 * thread-db.c (thread_db_free): Fix typo.
7543 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7546 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7548 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7550 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7551 with an i686 compiler.
7552 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7554 * configure: Rebuilt.
7556 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7560 * server.c (handle_search_memory_1): Correct read_addr initialization
7561 in loop for searching subsequent chunks.
7563 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7565 * configure.ac: New --with-libthread-db option.
7566 * thread-db.c: Allow direct dependence on libthread_db.
7567 (thread_db_free): Adjust.
7568 * config.in: Regenerate.
7569 * configure: Likewise.
7571 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7574 * thread-db.c (attach_thread): New function.
7575 (maybe_attach_thread): Return success/failure.
7576 (find_new_threads_callback): Adjust.
7577 (thread_db_find_new_threads): Loop until no new threads.
7579 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7581 * proc-service.c (ps_lgetregs): Formatting.
7583 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7585 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7586 * configure.ac: Adjust.
7587 * linux-low.h (struct process_info_private): Move members to struct
7589 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7590 * linux-low.c (linux_remove_process): Adjust.
7591 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7592 * server.c (handle_query): Move code ...
7593 (handle_monitor_command): ... here. New function.
7594 * target.h (struct target_ops): New member.
7595 * thread-db.c (struct thread_db): New.
7596 (libthread_db_search_path): New variable.
7597 (thread_db_create_event, thread_db_enable_reporting)
7598 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7599 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7600 (try_thread_db_load_1, dladdr_to_soname): New functions.
7601 (try_thread_db_load, thread_db_load_search): New functions.
7602 (thread_db_init): Search for libthread_db.
7603 (thread_db_free): New function.
7604 (thread_db_handle_monitor_command): Likewise.
7605 * config.in: Regenerate.
7606 * configure: Regenerate.
7608 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7610 * spu-low.c (spu_kill): Wait for inferior to terminate.
7611 Call clear_inferiors.
7612 (spu_detach): Call clear_inferiors.
7614 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7616 * aclocal.m4: Regenerate.
7617 * config.in: Likewise.
7618 * configure: Likewise.
7620 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7622 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7623 (parse_spufs_run): New function.
7624 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7625 (ppc_breakpoint_at): Handle SPU breakpoints.
7627 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7629 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7630 (SPUFS_MAGIC): Define.
7631 (spu_enumerate_spu_ids): New function.
7632 (linux_qxfer_spu): New function.
7633 (linux_target_ops): Install linux_qxfer_spu.
7635 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7637 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7638 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7639 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7640 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7641 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7642 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7643 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7644 (init_registers_powerpc_cell32l): Add prototype.
7645 (init_registers_powerpc_cell64l): Likewise.
7646 (ppc_arch_setup): Detect Cell/B.E. architecture.
7648 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7650 * Makefile.in (datarootdir): New variable.
7652 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7654 * linux-low.c (linux_write_memory): Update debugging output.
7655 * Makefile.in (clean): Add new descriptions.
7656 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7657 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7658 * configure.srv: Add new files for arm*-*-linux*.
7659 * linux-arm-low.c: Add new declarations.
7660 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7661 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7662 (HWCAP_VFPv3D16): New.
7663 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7664 instead of __IWMMXT__.
7665 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7666 (arm_arch_setup): New.
7667 (target_regsets): Remove #ifdef. Add VFP regset.
7668 (the_low_target): Use arm_arch_setup.
7670 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7672 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7673 the main thread again.
7675 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7677 Adding Neutrino gdbserver.
7678 * configure: Regenerated.
7679 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7680 * configure.srv (i[34567]86-*-nto*): New target.
7681 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7682 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7683 (nto_comctrl) [__QNX__]: New function.
7684 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7686 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7688 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7691 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7692 Pedro Alves <pedro@codesourcery.com>
7694 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7695 don't support CONTEXT_EXTENDED_REGISTERS.
7696 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7697 (the_low_target): Install them.
7698 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7699 failing with ERROR_PIPE_NOT_CONNECTED.
7701 2009-06-30 Doug Evans <dje@google.com>
7702 Pierre Muller <muller@ics.u-strasbg.fr>
7704 Add h/w watchpoint support to x86-linux, win32-i386.
7705 * Makefile.in (SFILES): Add i386-low.c
7706 (i386_low_h): Define.
7707 (i386-low.o): Add dependencies.
7708 (linux-x86-low.o): Add i386-low.h dependency.
7709 (win32-i386-low.o): Ditto.
7710 * i386-low.c: New file.
7711 * i386-low.h: New file.
7712 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7713 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7714 * linux-low.c (linux_add_process): Initialize arch_private.
7715 (linux_remove_process): Free arch_private.
7716 (add_lwp): Initialize arch_private.
7717 (delete_lwp): Free arch_private.
7718 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7720 * linux-low.h (process_info_private): New member arch_private.
7721 (lwp_info): New member arch_private.
7722 (linux_target_ops): New members new_process, new_thread,
7724 (ptid_of): New macro.
7725 * linux-x86-low.c: Include stddef.h, i386-low.h.
7726 (arch_process_info): New struct.
7727 (arch_lwp_info): New struct.
7728 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7729 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7730 (i386_dr_low_get_status): New function.
7731 (x86_insert_point, x86_remove_point): New functions.
7732 (x86_stopped_by_watchpoint): New function.
7733 (x86_stopped_data_address): New function.
7734 (x86_linux_new_process, x86_linux_new_thread): New functions.
7735 (x86_linux_prepare_to_resume): New function.
7736 (the_low_target): Add entries for insert_point, remove_point,
7737 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7739 * server.c (debug_hw_points): New global.
7740 (monitor_show_help): Document set debug-hw-points.
7741 (handle_query): Process "set debug-hw-points".
7742 * server.h (debug_hw_points): Declare.
7743 (paddress): Declare.
7744 * utils.c (NUMCELLS, CELLSIZE): New macros.
7745 (get_sell, xsnprintf, paddress): New functions.
7746 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7747 remove_point, stopped_by_watchpoint, stopped_data_address.
7748 * win32-i386-low.c: Include i386-low.h.
7749 (debug_reg_state): Replaces dr.
7750 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7751 (i386_dr_low_get_status): New function.
7752 (i386_insert_point, i386_remove_point): New functions.
7753 (i386_stopped_by_watchpoint): New function.
7754 (i386_stopped_data_address): New function.
7755 (i386_initial_stuff): Update.
7756 (get_thread_context,set_thread_context,i386_thread_added): Update.
7757 (the_low_target): Add entries for insert_point,
7758 remove_point, stopped_by_watchpoint, stopped_data_address.
7759 * win32-low.c (win32_insert_watchpoint): New function.
7760 (win32_remove_watchpoint): New function.
7761 (win32_stopped_by_watchpoint): New function.
7762 (win32_stopped_data_address): New function.
7763 (win32_target_ops): Add entries for insert_watchpoint,
7764 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7765 * win32-low.h (win32_target_ops): New members insert_point,
7766 remove_point, stopped_by_watchpoint, stopped_data_address.
7768 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7770 * server.c (process_serial_event): Re-return unsupported, not
7771 error, if the type isn't recognized. Re-allow supporting only
7772 insert or remove packets. Also call require_running for
7773 breakpoints. Add missing break statement to default case. Tidy.
7774 * target.h (struct target_ops): Rename insert_watchpoint to
7775 insert_point, and remove_watchpoint to remove_point.
7777 * linux-low.h (struct linux_target_ops): Likewise.
7778 * linux-low.c (linux_insert_watchpoint): Rename to ...
7779 (linux_insert_point): ... this. Adjust.
7780 (linux_remove_watchpoint): Rename to ...
7781 (linux_remove_point): ... this. Adjust.
7782 (linux_target_ops): Adjust.
7783 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7784 (cris_insert_point): ... this.
7785 (cris_remove_watchpoint): Rename to ...
7786 (cris_remove_point): ... this.
7787 (the_low_target): Adjust.
7789 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7791 * server.c (handle_v_kill): Pass signal_pid to
7792 kill_inferior if multi_process is zero.
7794 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7796 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7797 * target.h (target_ops): Comment for *_watchpoint to make it clear
7798 the functions can get types '0' and '1'.
7800 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7802 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7803 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7804 * regcache.c (get_regcache): Likewise.
7805 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7806 * win32-low.c (child_fetch_inferior_registers): Remove check for
7809 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7810 Pedro Alves <pedro@codesourcery.com>
7812 * target.h (struct target_ops) <supports_multi_process>: New
7814 (target_supports_multi_process): New.
7815 * server.c (handle_query): Even if GDB reports support, only
7816 enable multi-process if the target also supports it. Report
7817 multi-process support only if the target backend supports it.
7818 * linux-low.c (linux_supports_multi_process): New function.
7819 (linux_target_ops): Install it as target_supports_multi_process
7822 2009-05-24 Doug Evans <dje@google.com>
7824 Global renaming of find_thread_pid to find_thread_ptid.
7825 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7826 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7827 All callers updated.
7829 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7830 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7833 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7834 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7835 (linux_resume_one_lwp): Ditto.
7837 2009-05-23 Doug Evans <dje@google.com>
7839 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7840 from struct inferior_list_entry * to struct lwp_info *.
7841 All callers updated.
7843 2009-05-13 Doug Evans <dje@google.com>
7845 * linux-x86-low.c: Don't include assert.h.
7846 (x86_siginfo_fixup): Use fatal, not assert.
7847 (x86_arch_setup): Fix comment.
7849 2009-05-12 Doug Evans <dje@google.com>
7851 Biarch support for i386/amd64 gdbserver.
7852 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7853 Add linux-x86-low.c.
7854 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7855 (linux-x86-low.o): Add.
7856 * linux-x86-64-low.c: Delete.
7857 * linux-i386-low.c: Delete.
7858 * linux-x86-low.c: New file.
7859 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7861 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7863 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7864 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7865 (linux_child_pid_to_exec_file): New function.
7866 (elf_64_header_p, elf_64_file_p): New functions.
7867 (siginfo_fixup): New function.
7868 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7869 give target a chance to convert layout.
7870 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7871 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7873 2009-05-07 Doug Evans <dje@google.com>
7875 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7876 (regsets_store_inferior_registers): Ditto.
7878 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7882 * linux-low.c (must_set_ptrace_flags): Delete.
7883 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7885 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7886 `lwp->must_set_ptrace_flags' instead.
7887 (linux_wait_for_event_1): Set ptrace options here.
7888 (linux_wait_1): ... not here.
7890 2009-04-30 Doug Evans <dje@google.com>
7892 * inferiors.c (started_inferior_callback): New function.
7893 (attached_inferior_callback): New function.
7894 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7895 * server.c (print_started_pid, print_attached_pid): New functions.
7896 (detach_or_kill_for_exit): New function.
7897 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7898 * server.h (have_started_inferiors_p): Declare.
7899 (have_attached_inferiors_p): Declare.
7901 * inferiors.c (remove_process): Fix memory leak, free process.
7902 * linux-low.c (linux_remove_process): New function.
7903 (linux_kill): Call it instead of remove_process.
7904 (linux_detach, linux_wait_1): Ditto.
7906 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7908 * configure.srv: Add x86 Windows CE target.
7910 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7912 * inferiors.c (get_thread_process): Make global.
7913 * server.h (get_thread_process): Add prototype.
7914 * thread-db.c (find_one_thread): Use get_thread_process
7915 instead of current_process.
7916 (thread_db_get_tls_address): Do not crash if called when
7917 thread layer is not yet initialized.
7919 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7921 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7922 * spu-low.c (current_tid): Rename to ...
7923 (current_ptid): ... this.
7924 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7925 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7926 ptid_get_lwp (current_ptid) instead of current_tid.
7927 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7928 instead of current_tid. Use find_process_pid to verify pid
7929 argument is valid. Pass proper argument to remove_process.
7930 (spu_thread_alive): Compare current_ptid instead of current_tid.
7931 (spu_resume): Likewise.
7933 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7935 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7938 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7940 Implement the multiprocess extensions, and add linux multiprocess
7943 * server.h (ULONGEST): Declare.
7944 (struct ptid, ptid_t): New.
7945 (minus_one_ptid, null_ptid): Declare.
7946 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7947 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7948 (struct inferior_list_entry): Change `id' type from unsigned from
7950 (struct sym_cache, struct breakpoint, struct
7951 process_info_private): Forward declare.
7952 (struct process_info): Declare.
7953 (current_process): Declare.
7954 (all_processes): Declare.
7955 (initialize_inferiors): Declare.
7956 (add_thread): Adjust to use ptid_t.
7957 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7958 (add_process, remove_process, find_thread_pid): Declare.
7959 (find_inferior_id): Adjust to use ptid_t.
7960 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7961 (multi_process): Declare.
7962 (push_event): Adjust to use ptid_t.
7963 (read_ptid, write_ptid): Declare.
7964 (prepare_resume_reply): Adjust to use ptid_t.
7965 (clear_symbol_cache): Declare.
7966 * inferiors.c (all_processes): New.
7967 (null_ptid, minus_one_ptid): New.
7968 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7969 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7970 (add_thread): Change unsigned long to ptid. Remove gdb_id
7972 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7973 (gdb_id_to_thread): Rename to ...
7974 (find_thread_pid): ... this. Change unsigned long to ptid.
7975 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7976 (loaded_dll, pull_pid_from_list): Adjust.
7977 (add_process, remove_process, find_process_pid)
7978 (get_thread_process, current_process, initialize_inferiors): New.
7979 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7980 (struct target_waitstatus) <related_pid>: Ditto.
7981 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7983 (struct target_ops) <join>: Add `pid' argument.
7984 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7985 (struct target_ops) <wait>: Add `ptid' field. Change return type
7987 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7988 (mywait): Add `ptid' argument. Change return type to ptid_t.
7989 (target_pid_to_str): Declare.
7990 * target.c (set_desired_inferior): Adjust to use ptids.
7991 (mywait): Add new `ptid' argument. Adjust.
7992 (target_pid_to_str): New.
7993 * mem-break.h (free_all_breakpoints): Declare.
7994 * mem-break.c (breakpoints): Delelete.
7995 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7996 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7997 to use per-process breakpoint list.
7998 (free_all_breakpoints): New.
7999 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8000 (symbol_cache, all_symbols_looked_up): Delete.
8002 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8004 (prepare_resume_reply): Change ptid argument's type from unsigned
8005 long to ptid_t. Adjust. Implement W;process and X;process.
8006 (free_sym_cache, clear_symbol_cache): New.
8007 (look_up_one_symbol): Adjust to per-process symbol cache. *
8008 * server.c (cont_thread, general_thread, step_thread): Change type
8011 (multi_process): New.
8012 (last_ptid): Change type to ptid_t.
8013 (struct vstop_notif) <ptid>: Change type to ptid_t.
8014 (queue_stop_reply, push_event): Change `ptid' argument's type to
8016 (discard_queued_stop_replies): Add `pid' argument.
8017 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8018 changes. Don't reference the `attached' global.
8019 (attach_inferior): Adjust to mywait interface changes.
8020 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8021 features. Handle and report "multiprocess+". Handle
8023 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8025 (handle_v_kill): New.
8026 (handle_v_stopped): Adjust to use target_pid_to_str.
8027 (handle_v_requests): Allow multiple attaches and runs when
8028 multiprocess extensions are in effect. Handle "vKill".
8029 (myresume): Adjust to use ptids.
8030 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8031 (handle_status): Adjust to discard_queued_stop_replies interface
8033 (first_thread_of, kill_inferior_callback)
8034 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8035 (main): Call initialize_inferiors. Adjust to use ptids, killing
8036 and detaching from all inferiors. Handle multiprocess packet
8038 * linux-low.h: Include gdb_proc_service.h.
8039 (struct process_info_private): New.
8040 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8041 <lwpid_of>: Use ptid_get_lwp.
8042 (get_lwp_thread): Adjust.
8043 (struct lwp_info): Add `dead' member.
8044 (find_lwp_pid): Declare.
8045 * linux-low.c (thread_db_active): Delete.
8046 (new_inferior): Adjust comment.
8047 (inferior_pid): Delete.
8048 (linux_add_process): New.
8049 (handle_extended_wait): Adjust.
8050 (add_lwp): Change unsigned long to ptid.
8051 (linux_create_inferior): Add process to processes table. Adjust
8052 to use ptids. Don't set new_inferior here.
8053 (linux_attach_lwp): Rename to ...
8054 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8055 it. Adjust to use ptids.
8056 (linux_attach_lwp): New.
8057 (linux_attach): Add process to processes table. Don't set
8059 (struct counter): New.
8060 (second_thread_of_pid_p, last_thread_of_process_p): New.
8061 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8063 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8064 processes. Remove process from process table.
8065 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8066 to multiple processes.
8067 (any_thread_of): New.
8068 (linux_detach): Add `pid' argument, and handle it. Remove process
8069 from processes table.
8070 (linux_join): Add `pid' argument. Handle it.
8071 (linux_thread_alive): Change unsighed long argument to ptid_t.
8072 Consider dead lwps as not being alive.
8073 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8074 threads we're not interested in.
8075 (same_lwp, find_lwp_pid): New.
8076 (linux_wait_for_lwp): Change `pid' argument's type from int to
8078 (linux_wait_for_event): Rename to ...
8079 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8080 from int to ptid_t. Adjust.
8081 (linux_wait_for_event): New.
8082 (linux_wait_1): Add `ptid' argument. Change return type to
8083 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8084 that exit from the process table.
8085 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8087 (mark_lwp_dead): New.
8088 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8089 stopping all threads, mark its main lwp as dead.
8090 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8092 (fetch_register, usr_store_inferior_registers)
8093 (regsets_fetch_inferior_registers)
8094 (regsets_store_inferior_registers, linux_read_memory)
8095 (linux_write_memory): Inline `inferior_pid'.
8096 (linux_look_up_symbols): Adjust to use per-process
8098 (linux_request_interrupt): Adjust to use ptids.
8099 (linux_read_auxv): Inline `inferior_pid'.
8100 (initialize_low): Don't reference thread_db_active.
8101 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8102 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8103 (ps_getpid): Return the pid of the current inferior.
8104 * thread-db.c (proc_handle, thread_agent): Delete.
8105 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8107 (find_one_thread): Change argument type to ptid_t. Adjust to
8109 (maybe_attach_thread): Adjust to per-process data and ptids.
8110 (thread_db_find_new_threads): Ditto.
8111 (thread_db_init): Ditto.
8112 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8113 processes table. Adjust to use ptids.
8114 (spu_kill, spu_detach): Adjust interface. Remove process from
8116 (spu_join, spu_thread_alive): Adjust interface.
8117 (spu_wait): Adjust interface. Remove process from processes
8118 table. Adjust to use ptids.
8119 * win32-low.c (current_inferior_tid): Delete.
8120 (current_inferior_ptid): New.
8121 (debug_event_ptid): New.
8122 (thread_rec): Take a ptid. Adjust.
8123 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8124 (child_delete_thread): Ditto.
8125 (do_initial_child_stuff): Add `attached' argument. Add process to
8127 (child_fetch_inferior_registers, child_store_inferior_registers):
8129 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8130 (win32_attach): Pass 1 to do_initial_child_stuff.
8131 (win32_kill): Adjust interface. Remove process from processes
8133 (win32_detach): Ditto.
8134 (win32_join): Adjust interface.
8135 (win32_thread_alive): Take a ptid.
8136 (win32_resume): Adjust to use ptids.
8137 (get_child_debug_event): Ditto.
8138 (win32_wait): Adjust interface. Remove exiting process from
8141 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8143 Non-stop mode support.
8145 * server.h (non_stop): Declare.
8146 (gdb_client_data, handler_func): Declare.
8147 (delete_file_handler, add_file_handler, start_event_loop):
8149 (handle_serial_event, handle_target_event, push_event)
8150 (putpkt_notif): Declare.
8151 * target.h (enum resume_kind): New.
8152 (struct thread_resume): Replace `step' field by `kind' field.
8153 (TARGET_WNOHANG): Define.
8154 (struct target_ops) <wait>: Add `options' argument.
8155 <supports_non_stop, async, start_non_stop>: New fields.
8156 (target_supports_non_stop, target_async): New.
8157 (start_non_stop): Declare.
8158 (mywait): Add `options' argument.
8159 * target.c (mywait): Add `options' argument. Print child exit
8161 (start_non_stop): New.
8162 * server.c (non_stop, own_buf, mem_buf): New globals.
8163 (struct vstop_notif): New.
8164 (notif_queue): New global.
8165 (queue_stop_reply, push_event, discard_queued_stop_replies)
8166 (send_next_stop_reply): New.
8167 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8169 (attach_inferior): In non-stop mode, don't wait for the target
8171 (handle_general_set): Handle QNonStop.
8172 (handle_query): When handling qC, return the current general
8173 thread, instead of the first thread of the list.
8174 (handle_query): If the backend supports non-stop mode, include
8175 QNonStop+ in the qSupported query response.
8176 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8178 (handle_v_attach, handle_v_run): Handle non-stop mode.
8179 (handle_v_stopped): New.
8180 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8181 (myresume): Adjust to use resume_kind. Handle non-stop.
8182 (queue_stop_reply_callback): New.
8183 (handle_status): Handle non-stop mode.
8184 (main): Clear non_stop flag on reconnection. Use the event-loop.
8185 Refactor serial protocol handling from here ...
8186 (process_serial_event): ... to this new function. When GDB
8187 selects any thread, select one here. In non-stop mode, wait until
8188 GDB acks all pending events before exiting.
8189 (handle_serial_event, handle_target_event): New.
8190 * remote-utils.c (remote_open): Install remote_desc in the event
8192 (remote_close): Remove remote_desc from the event loop.
8193 (putpkt_binary): Rename to...
8194 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8195 (putpkt_binary): New as wrapper around putpkt_binary_1.
8196 (putpkt_notif): New.
8197 (prepare_resume_reply): In non-stop mode, don't change the
8199 * event-loop.c: New.
8200 * Makefile.in (OBJ): Add event-loop.o.
8201 (event-loop.o): New rule.
8203 * linux-low.h (pid_of): Moved here.
8205 (get_lwp_thread): Use lwpid_of.
8206 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8207 * linux-low.c (pid_of): Delete.
8208 (inferior_pid): Use lwpid_of.
8209 (linux_event_pipe): New.
8210 (target_is_async_p): New.
8212 (handle_extended_wait): Use lwpid_of.
8213 (add_lwp): Don't set lwpid field.
8214 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8215 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8216 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8217 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8218 first. Adjust to linux_wait_for_event interface changes. Use
8220 (linux_detach): Don't delete the main lwp here.
8221 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8222 (status_pending_p): Don't consider explicitly suspended lwps.
8223 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8224 pointer. Add OPTIONS argument. Change return type to int. Use
8225 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8226 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8227 pointer. Add status pointer argument. Return a pid instead of a
8228 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8229 changes. In non-stop mode, don't switch to a random thread.
8230 (linux_wait): Rename to...
8231 (linux_wait_1): ... this. Add target_options argument, and handle
8232 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8233 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8234 clean exit and signal exit code. Don't stop all threads in
8235 non-stop mode. In all-stop mode, only stop all threads when
8236 reporting a stop to GDB. Handle explicit thread stop requests.
8237 (async_file_flush, async_file_mark): New.
8239 (send_sigstop): Use lwpid_of.
8240 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8241 interface changes. In non-stop mode, don't switch to a random
8243 (linux_resume_one_lwp): Use lwpid_of.
8244 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8245 (linux_resume_one_thread): ... this. Handle resume_stop. In
8246 non-stop mode, don't look for pending flag in all threads.
8247 (resume_status_pending_p): Don't consider explicitly suspended
8249 (my_waitpid): Reimplement. Emulate __WALL.
8250 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8252 (sigchld_handler, linux_supports_non_stop, linux_async)
8253 (linux_start_non_stop): New.
8254 (linux_target_ops): Register linux_supports_non_stop, linux_async
8255 and linux_start_non_stop.
8256 (initialize_low): Install SIGCHLD handler.
8257 * thread-db.c (thread_db_create_event, find_one_thread)
8258 (thread_db_get_tls_address): Use lwpid_of.
8259 * win32-low.c (win32_detach): Adjust to use resume_kind.
8260 (win32_wait): Add `options' argument.
8261 * spu-low.c (spu_resume): Adjust to use resume_kind.
8262 (spu_wait): Add `options' argument.
8264 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8266 Decouple target code from remote protocol.
8268 * target.h (enum target_waitkind): New.
8269 (struct target_waitstatus): New.
8270 (struct target_ops) <wait>: Return an unsigned long. Take a
8271 target_waitstatus pointer instead of a char pointer.
8273 * target.c (mywait): Change prototype to return an unsigned long.
8274 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8275 * server.h (thread_from_wait, old_thread_from_wait): Delete
8277 (prepare_resume_reply): Change prototype to take a
8279 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8280 (last_status, last_ptid): New.
8281 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8282 pid instead of a signal.
8283 (attach_inferior): Remove "status" and "signal" parameters.
8285 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8287 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8288 (handle_v_requests, myresume): Remove "status" and "signal"
8290 (handle_status): New.
8291 (main): Delete local `status'. Adjust.
8292 * remote-utils.c: Include target.h.
8293 (prepare_resume_reply): Change prototype to take a
8294 target_waitstatus. Adjust.
8296 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8298 * spu-low.c (spu_wait): Adjust.
8299 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8301 (win32_wait): Adjust.
8303 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8305 * target.h (struct thread_resume): Delete leave_stopped member.
8306 (struct target_ops): Add a `n' argument to the `resume' callback.
8307 * server.c (start_inferior): Adjust.
8308 (handle_v_cont, myresume): Adjust.
8309 * linux-low.c (check_removed_breakpoint): Adjust to resume
8310 interface change, and to removed leave_stopped field.
8311 (resume_ptr): Delete.
8312 (struct thread_resume_array): New.
8313 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8314 resume interface change.
8315 (linux_continue_one_thread, linux_queue_one_thread)
8316 (resume_status_pending_p): Check if the resume field is NULL
8317 instead of checking the leave_stopped member.
8318 (linux_resume): Adjust to the target resume interface change.
8319 * spu-low.c (spu_resume): Adjust to the target resume interface
8321 * win32-low.c (win32_detach, win32_resume): Ditto.
8323 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8325 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8327 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8329 (linux_continue_one_thread): Only preserve the stepping flag if
8330 there's a pending breakpoint.
8332 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8334 * server.c (main): After the inferior having exited, call
8335 remote_close before exiting gdbserver.
8337 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8339 Fix size of FPSCR in Power 7 processors.
8340 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8341 (PPC_FEATURE_HAS_DFP): New #define.
8342 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8345 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8347 * server.c (handle_query) Whitespace and formatting.
8349 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8351 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8352 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8353 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8354 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8355 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8356 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8357 Makefile.in, configure.ac: Fix whitespace throughout.
8358 * configure: Regenerate.
8360 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8362 * inferiors.c (find_inferior): Make it safe for the callback
8363 function to delete the currently iterated inferior.
8365 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8367 * Makefile.in (linuw_low_h): Move higher.
8368 (thread-db.o): Depend on $(linux_low_h).
8370 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8372 Rename "process" to "lwp" throughout.
8374 * linux-low.c (all_processes): Rename to...
8375 (all_lwps): ... this.
8376 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8377 (add_process): Rename to ...
8378 (add_lwp): ... this. Adjust.
8379 (linux_create_inferior): Adjust.
8380 (linux_attach_lwp): Adjust.
8381 (linux_attach): Adjust.
8382 (linux_kill_one_process): Rename to ...
8383 (linux_kill_one_lwp): ... this. Adjust.
8384 (linux_kill): Adjust.
8385 (linux_detach_one_process): Rename to ...
8386 (linux_detach_one_lwp): ... this. Adjust.
8387 (linux_detach): Adjust.
8388 (check_removed_breakpoint): Adjust.
8389 (status_pending_p): Adjust.
8390 (linux_wait_for_process): Rename to ...
8391 (linux_wait_for_lwp): ... this. Adjust.
8392 (linux_wait_for_event): Adjust.
8393 (send_sigstop): Adjust.
8394 (wait_for_sigstop): Adjust.
8395 (stop_all_processes): Rename to ...
8396 (stop_all_lwps): ... this.
8397 (linux_resume_one_process): Rename to ...
8398 (linux_resume_one_lwp): ... this. Adjust.
8399 (linux_set_resume_request, linux_continue_one_thread)
8400 (linux_queue_one_thread, resume_status_pending_p)
8401 (usr_store_inferior_registers, regsets_store_inferior_registers)
8402 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8404 * linux-low.h (get_process): Rename to ...
8405 (get_lwp): ... this. Adjust.
8406 (get_thread_process): Rename to ...
8407 (get_thread_lwp): ... this. Adjust.
8408 (get_process_thread): Rename to ...
8409 (get_lwp_thread): ... this. Adjust.
8410 (struct process_info): Rename to ...
8411 (struct lwp_info): ... this.
8412 (all_processes): Rename to ...
8413 (all_lwps): ... this.
8414 * proc-service.c (ps_lgetregs): Adjust.
8415 * thread-db.c (thread_db_create_event, find_one_thread)
8416 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8418 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8420 * server.c (handle_query): Handle "qAttached".
8422 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8424 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8425 GPLv3, update license URL.
8427 2009-03-01 Doug Evans <dje@google.com>
8429 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8430 (server_h): Add gdb_signals.h.
8431 (signals.o): Update.
8432 * server.h (target_signal_from_host,target_signal_to_host_p)
8433 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8435 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8437 * remote-utils.c (getpkt): Also generate remote-debug
8438 information if noack_mode is set.
8440 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8442 * server.c (handle_query): Report qXfer:siginfo:read and
8443 qXfer:siginfo:write as supported and handle them.
8444 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8445 * linux-low.c (linux_xfer_siginfo): New.
8446 (linux_target_ops): Set it.
8448 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8450 * server.c (gdbserver_usage): Mention --remote-debug.
8451 (main): Accept '--remote-debug' switch.
8453 2009-01-18 Doug Evans <dje@google.com>
8455 * regcache.c (new_register_cache): No need to check result of xcalloc.
8456 * server.c (handle_search_memory): Back out calls to xmalloc,
8457 result is checked and error is returned to user upon failure.
8458 (handle_query): Ditto. Add more checks for result of malloc.
8459 (handle_v_cont): Check result of malloc, report error back to
8461 (handle_v_run): Ditto. Call freeargv.
8462 * server.h (freeargv): Declare.
8463 * utils.c (freeargv): New fn.
8465 2009-01-15 Doug Evans <dje@google.com>
8467 * gdbreplay.c (perror_with_name): Make arg const char *.
8468 * server.h (target_signal_to_name): Make return type const char *.
8469 * thread-db.c (thread_db_err_str): Make return type const char *.
8470 * utils.c (perror_with_name): Make arg const char *.
8472 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8474 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8475 when handling a EXIT_PROCESS_DEBUG_EVENT.
8477 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8479 * gdbreplay.c (gdbreplay_version): Update copyright year.
8480 * server.c (gdbserver_version): Likewise.
8482 2009-01-05 Doug Evans <dje@google.com>
8484 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8485 (handle_extended_wait): Improve comment.
8487 2008-12-13 Doug Evans <dje@google.com>
8489 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8490 * server.h (ATTR_MALLOC): New macro.
8491 (xmalloc,xcalloc,xstrdup): Declare.
8492 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8493 * inferiors.c: Ditto.
8494 * linux-low.c: Ditto.
8495 * mem-break.c: Ditto.
8496 * regcache.c: Ditto.
8497 * remote-utils.c: Ditto.
8500 * win32-low.c: Ditto.
8502 2008-12-12 Doug Evans <dje@google.com>
8504 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8505 in debugging printf.
8507 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8509 2008-12-09 Doug Evans <dje@google.com>
8511 * linux-low.h (struct process_info): Delete member tid, unused.
8512 * thread-db.c (find_one_thread): Update.
8513 (maybe_attach_thread): Update.
8515 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8517 * target.h (struct target_ops): Add qxfer_osdata member.
8518 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8520 (linux_qxfer_osdata): New functions.
8521 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8523 * server.c (handle_query): Handle "qXfer:osdata:read:".
8524 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8525 (buffer_xml_printf): New functions.
8526 * server.h (struct buffer): New.
8527 (buffer_grow_str, buffer_grow_str0): New macros.
8528 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8529 (buffer_xml_printf): Declare.
8531 2008-11-24 Doug Evans <dje@google.com>
8533 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8535 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8537 * server.c (handle_v_run): Always use the supplied argument list.
8539 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8541 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8542 (xtensa_regmap_table): Add entry for scompare1.
8544 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8546 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8547 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8548 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8549 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8550 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8551 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8552 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8553 XML target descriptions.
8554 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8555 when inferior is running on an ISA 2.05 or later processor. Add
8556 special case to return offset for full 64-bit slot of FPSCR when
8559 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8561 * Makefile.in (SFILES, clean): Added sparc64 files.
8562 (reg-sparc64.o, reg-sparc64.c): New.
8563 * configure.srv (sparc*-*-linux*): New configuration.
8564 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8565 syscall arguments for SPARC.
8566 (regsets_store_inferior_registers): Likewise.
8567 * linux-sparc-low.c: New file.
8569 2008-10-21 Doug Evans <dje@google.com>
8571 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8572 (READLINE_DIR,READLINE_DEP): Delete.
8573 (INTERNAL_CFLAGS): Update.
8574 (LINTFLAGS): Update.
8576 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8578 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8579 whole argv from the last run, not just argv[0].
8581 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8583 * regcache.c (new_register_cache): Return NULL if the register
8584 cache size isn't known yet.
8585 (free_register_cache): Avoid dereferencing a NULL regcache.
8587 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8589 * configure.srv: Merge MIPS and MIPS64.
8591 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8593 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8595 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8597 * Makefile.in: Add required vsx dependencies.
8599 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8600 Declare init_registers_powerpc_vsx32l.
8601 Declare init_registers_powerpc_vsx64l.
8602 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8603 (ppc_arch_setup): Check for VSX in hwcap.
8604 (ppc_fill_vsxregset): New function.
8605 (ppc_store_vsxregset): New function.
8606 Add new VSX entry in regset_info target_regsets.
8608 * configure.srv: Add new VSX dependencies.
8610 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8612 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8613 (remote_open): Set or clear transport_is_reliable.
8614 (putpkt_binary): Don't expect acks in noack mode.
8615 (getpkt): Don't send ack/nac in noack mode.
8616 * server.c (handle_general_set): Handle QStartNoAckMode.
8617 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8619 (main): Reset noack_mode on every connection.
8620 * server.h (noack_mode): Declare.
8622 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8624 * Makefile.in (GDBREPLAY_OBS): New variable.
8625 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8627 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8628 Daniel Jacobowitz <dan@codesourcery.com>
8630 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8631 (usr_store_inferior_registers): Likewise.
8632 (regsets_store_inferior_registers): Likewise.
8634 2008-07-31 Rolf Jansen <rj@surtec.com>
8635 Pedro Alves <pedro@codesourcery.com>
8637 * configure.ac: Check for memmem declaration.
8638 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8639 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8640 (disable_packet_qfThreadInfo): Unconditionally compile.
8641 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8642 * configure, config.in: Regenerate.
8644 2008-07-28 Doug Kwan <dougkwan@google.com>
8646 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8647 (linux_write_memory): Remove declaration of errno.
8649 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8651 * linux-low.c (handle_extended_wait): Do not use "status"
8652 variable uninitialized.
8654 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8656 * server.c (handle_v_attach): Inhibit reporting dll changes.
8658 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8660 * remote-utils.c (prepare_resume_reply): If requested, don't
8661 output "thread:TID" in the T stop reply.
8663 * server.c (disable_packet_vCont, disable_packet_Tthread)
8664 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8665 (handle_query): If requested, disable support for qC, qfThreadInfo
8667 (handle_v_requests): If requested, disable support for vCont.
8668 (gdbserver_show_disableable): New.
8669 (main): Handle --disable-packet and --disable-packet=LIST.
8671 * server.h (disable_packet_vCont, disable_packet_Tthread)
8672 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8674 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8676 * server.c (gdbserver_usage): Mention --version.
8678 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8680 * Makefile.in (gdbreplay.o): New rule.
8682 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8684 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8685 message, not gdbserver.
8687 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8688 Nathan Sidwell <nathan@codesourcery.com>
8689 Joseph Myers <joseph@codesourcery.com>
8691 * acinclude.m4: Include ../../config/acx.m4.
8692 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8693 * configure, config.in: Regenerate.
8694 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8695 * server.c (gdbserver_version): Print PKGVERSION.
8696 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8697 (main): Adjust gdbserver_usage calls.
8698 * gdbreplay.c (version, host_name): Add declarations.
8699 (gdbreplay_version, gdbreplay_usage): New.
8700 (main): Accept --version and --help options.
8702 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8704 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8705 (arm_breakpoint_at): Handle Thumb.
8706 (the_low_target): Add comment.
8708 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8710 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8712 2008-05-09 Doug Evans <dje@google.com>
8714 * server.h (decode_search_memory_packet): Declare.
8715 * remote-utils.c (decode_search_memory_packet): New fn.
8716 * server.c (handle_search_memory_1): New fn.
8717 (handle_search_memory): New fn.
8718 (handle_query): Process qSearch:memory packets.
8720 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8722 * regcache.c (registers_length): Remove.
8723 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8724 full register packet.
8725 * regcache.h (registers_length): Remove prototype.
8726 * server.h (PBUFSIZ): Define to 16384.
8728 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8730 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8731 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8732 powerpc-64l.o, and powerpc-altivec64l.o.
8733 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8734 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8735 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8736 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8737 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8740 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8741 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8742 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8743 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8744 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8745 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8746 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8747 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8748 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8749 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8752 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8753 (init_registers_powerpc_32l): ... this new prototype.
8754 (init_registers_powerpc_32): Remove, replace by ...
8755 (init_registers_powerpc_altivec32l): ... this new prototype.
8756 (init_registers_powerpc_e500): Remove, replace by ...
8757 (init_registers_powerpc_e500l): ... this new prototype.
8758 (init_registers_ppc64): Remove, replace by ...
8759 (init_registers_powerpc_64l): ... this new prototype.
8760 (init_registers_powerpc_64): Remove, replace by ...
8761 (init_registers_powerpc_altivec64l): ... this new prototype.
8762 (ppc_num_regs): Set to 73.
8763 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8764 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8765 (ppc_cannot_store_register): Handle orig_r3 and trap.
8766 (ppc_arch_setup): Update init_registers_... calls.
8767 (ppc_fill_gregset): Handle orig_r3 and trap.
8769 * inferiors.c (clear_inferiors): Reset current_inferior.
8771 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8773 * acinclude.m4: Add override.m4.
8774 * configure: Regenerate.
8776 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8778 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8779 initial call to init_register_ppc64.
8781 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8783 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8784 single powerpc*-*-linux* case.
8785 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8787 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8789 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8790 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8792 * linux-ppc-low.c: Include <elf.h>.
8793 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8794 (ppc_hwcap): New global variable.
8795 (ppc_regmap): Remove __SPE__ #ifdef sections.
8796 (ppc_regmap_e500): New global variable.
8797 (ppc_cannot_store_register): Update __SPE__ special case.
8798 (ppc_get_hwcap): New function.
8799 (ppc_arch_setup): Use it to determine whether inferior supports
8800 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8801 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8802 Do not access registers if target does not support AltiVec.
8803 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8804 Do not access registers if target does not support SPE.
8805 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8807 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8809 * linux-low.c (disabled_regsets, num_regsets): New.
8810 (use_regsets_p): Delete.
8811 (linux_wait_for_process): Clear disabled_regsets.
8812 (regsets_fetch_inferior_registers): Check and set it.
8813 (regsets_store_inferior_registers): Likewise.
8814 (linux_fetch_registers, linux_store_registers): Do not use
8816 (initialize_low): Allocate disabled_regsets.
8818 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8820 * Makefile.in (LIBOBJS): New.
8822 (memmem.o): New rule.
8823 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8824 * configure: Regenerated.
8826 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8828 * server.c (handle_query): Never return "unsupported" for
8829 qXfer:features:read queries.
8831 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8833 * server.c (get_features_xml): Fix inverted condition.
8834 (handle_query): Always support qXfer:feature:read.
8836 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8838 * server.c (wrapper_argv): New.
8839 (start_inferior): Handle wrapper_argv. If set, expect an extra
8841 (gdbserver_usage): Document --wrapper.
8842 (main): Parse --wrapper.
8844 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8846 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8847 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8848 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8849 (ppc_set_pc): Likewise.
8850 (ppc_arch_setup): New function.
8851 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8852 of collect_register.
8853 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8855 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8857 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8858 instead of linux-ppc64-low.o.
8859 * linux-ppc64-low.c: Remove file.
8860 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8861 (linux-ppc64-low.o): Remove rule.
8863 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8864 (init_registers_powerpc_64): Likewise.
8865 (ppc_regmap): Conditionally define depending on __powerpc64__.
8866 (ppc_cannot_store_register): Do not special-case "fpscr" when
8867 compiled on __powerpc64__.
8868 (ppc_collect_ptrace_register): New function.
8869 (ppc_supply_ptrace_register): New function.
8870 (ppc_breakpoint): Change type to "unsigned int".
8871 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8872 (the_low_target): Conditionally provide initializers for the
8873 arch_setup member depending on __powerpc64__. Install
8874 collect_ptrace_register and supply_ptrace_register members.
8876 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8878 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8879 * server.c (gdbserver_xmltarget): Define.
8880 (get_features_xml): Use it to replace "target.xml" and arch_string.
8882 * configure.srv: Remove srv_xmltarget. Add XML files that were
8883 mentioned there to srv_xmlfiles instead. Remove conditional tests
8884 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8885 srv_xmlfiles and srv_regobj to include all possible choices.
8886 * configure.ac (srv_xmltarget): Remove.
8887 (srv_xmlfiles): Do not add "target.xml".
8888 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8889 checks for supplementary target information.
8890 * configure: Regenerate.
8891 * Makefile.in (XML_TARGET): Remove.
8892 (target.xml): Remove rule.
8893 (clean): Do not clean up target.xml.
8894 (.PRECIOUS): Do not mention target.xml.
8896 * target.h (struct target_ops): Remove arch_string member.
8897 * linux-low.c (linux_arch_string): Remove.
8898 (linux_target_ops): Remove arch_string initializer.
8899 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8900 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8901 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8902 * spu-low.c (spu_arch_string): Remove.
8903 (spu_target_ops): Remove arch_string initializer.
8904 * win32-low.c (win32_arch_string): Remove.
8905 (win32_target_ops): Remove arch_string initializer.
8906 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8907 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8908 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8910 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8912 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8913 by collect_ptrace_register and supply_ptrace_register hooks.
8914 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8915 instead of checking for the_low_target.left_pad_xfer.
8916 (usr_store_inferior_registers): Use collect_ptrace_register callback
8917 instead of checking for the_low_target.left_pad_xfer.
8919 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8920 (s390_supply_ptrace_register): Likewise.
8921 (s390_fill_gregset): Call s390_collect_ptrace_register.
8922 (the_low_target): Update.
8924 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8925 (ppc_supply_ptrace_register): Likewise.
8926 (the_low_target): Update.
8928 * linux-i386-low.c (the_low_target): Update.
8929 * linux-x86-64-low.c (the_low_target): Update.
8931 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8933 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8934 reg-s390.o and reg-s390x.o.
8936 * linux-low.c (new_inferior): New global variable.
8937 (linux_create_inferior, linux_attach): Set it.
8938 (linux_wait_for_process): Call the_low_target.arch_setup after the
8939 target has stopped for the first time.
8940 (initialize_low): Do not call the_low_target.arch_setup.
8942 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8943 (s390_set_pc): Likewise.
8944 (s390_arch_setup): New function.
8945 (the_low_target): Use s390_arch_setup as arch_setup routine.
8947 * regcache.c (realloc_register_cache): New function.
8948 (set_register_cache): Call it for each existing regcache.
8950 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8952 * server.h (init_registers): Remove prototype.
8954 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8955 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8956 instead of init_registers ().
8957 * linux-arm-low.c (init_registers_arm): Add prototype.
8958 (init_registers_arm_with_iwmmxt): Likewise.
8959 (the_low_target): Add initializer for arch_setup field.
8960 * linux-cris-low.c (init_registers_cris): Add prototype.
8961 (the_low_target): Add initializer for arch_setup field.
8962 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8963 (the_low_target): Add initializer for arch_setup field.
8964 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8965 (the_low_target): Add initializer for arch_setup field.
8966 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8967 (the_low_target): Add initializer for arch_setup field.
8968 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8969 (the_low_target): Add initializer for arch_setup field.
8970 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8971 (the_low_target): Add initializer for arch_setup field.
8972 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8973 (init_registers_mips64_linux): Likewise.
8974 (the_low_target): Add initializer for arch_setup field.
8975 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8976 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8977 (the_low_target): Add initializer for arch_setup field.
8978 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8979 (init_registers_powerpc_64): Likewise.
8980 (the_low_target): Add initializer for arch_setup field.
8981 * linux-s390-low.c (init_registers_s390): Add prototype.
8982 (init_registers_s390x): Likewise.
8983 (the_low_target): Add initializer for arch_setup field.
8984 * linux-sh-low.c (init_registers_sh): Add prototype.
8985 (the_low_target): Add initializer for arch_setup field.
8986 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8987 (the_low_target): Add initializer for arch_setup field.
8988 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8989 (the_low_target): Add initializer for arch_setup field.
8991 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8992 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8993 instead of init_registers ().
8994 * win32-arm-low.c (init_registers_arm): Add prototype.
8995 (the_low_target): Add initializer for arch_setup field.
8996 * win32-i386-low.c (init_registers_i386): Add prototype.
8997 (the_low_target): Add initializer for arch_setup field.
8999 * spu-low.c (init_registers_spu): Add prototype.
9000 (initialize_low): Call initialie_registers_spu () instead of
9001 initialize_registers ().
9003 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9005 * server.c (handle_v_requests): When handling the vRun and vAttach
9006 packets, if already debugging a process, don't kill it. Return an
9009 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9011 * server.c (handle_query): Correct length check.
9013 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9015 * win32-low.c (do_initial_child_stuff): Add process handle
9016 parameter. Set current_process_handle and current_process_id from the
9017 parameters. Clear globals.
9018 (win32_create_inferior): Don't set current_process_handle and
9019 current_process_id here. Instead pass them on the call to
9020 do_initial_child_stuff.
9021 (win32_attach): Likewise.
9022 (win32_clear_inferiors): New.
9023 (win32_kill): Don't close the current process handle or the
9024 current thread handle here. Instead call win32_clear_inferiors.
9025 (win32_detach): Don't open a new handle to the process. Call
9026 win32_clear_inferiors.
9027 (win32_join): Don't rely on current_process_handle; open a new
9028 handle using the process id.
9029 (win32_wait): Call win32_clear_inferiors when the inferior process
9032 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9034 * server.c (monitor_show_help): Add "exit".
9036 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9038 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9039 (clean): Add reg-xtensa.c.
9040 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9041 * configure.srv (xtensa*-*-linux*) New target.
9042 * linux-xtensa-low.c: New.
9043 * xtensa-xtregs.c: New.
9045 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9047 * hostio.c: Don't include errno.h.
9048 (errno_to_fileio_errno): Move to hostio-errno.
9049 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9050 error number outputting to the target->hostio_last_error callback.
9051 (hostio_packet_error): Use FILEIO_EINVAL directly.
9052 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9053 calls to hostio_error.
9054 * hostio-errno.c: New.
9055 * server.h (hostio_last_error_from_errno): Declare.
9056 * target.h (target_ops): Add hostio_last_error member.
9057 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9058 as hostio_last_error handler.
9059 * spu-low.c (spu_target_ops): Likewise.
9060 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9061 (wince_hostio_last_error): New functions.
9062 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9063 as hostio_last_error handler.
9064 (win32_target_ops) [!_WIN32_WCE]: Register
9065 hostio_last_error_from_errno as hostio_last_error handler.
9066 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9067 (hostio-errno.o): New rule.
9068 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9069 * configure.srv (srv_hostio_err_objs): New variable. Default to
9071 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9072 * configure: Regenerate.
9074 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9076 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9077 (linux_kill, linux_detach): Clean up the process list.
9078 * remote-utils.c (remote_open): Improve port number parsing.
9079 (putpkt_binary, input_interrupt): Only send interrupts if the target
9081 * server.c (extended_protocol): Make static.
9082 (attached): Define earlier.
9083 (exit_requested, response_needed, program_argv): New variables.
9084 (target_running): New.
9085 (start_inferior): Clear attached here.
9086 (attach_inferior): Set attached here.
9087 (require_running): Define.
9088 (handle_query): Use require_running and target_running. Implement
9090 (handle_v_attach, handle_v_run): New.
9091 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9092 (gdbserver_usage): Update.
9093 (main): Redo argument parsing. Handle --debug and --multi. Handle
9094 --attach along with other options or after the port. Save
9095 program_argv. Support no initial program. Resynchronize
9096 communication with GDB after an error. Handle "monitor exit".
9097 Use require_running and target_running. Always allow the extended
9098 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9099 restart in extended mode.
9100 * README: Refer to the GDB manual. Update --attach usage.
9102 2007-12-20 Andreas Schwab <schwab@suse.de>
9104 * linux-low.c (STACK_SIZE): Define.
9105 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9106 (linux_test_for_tracefork): Likewise.
9108 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9110 * linux-low.c (linux_wait_for_event): Update messages. Do not
9111 reinsert auto-delete breakpoints.
9112 * mem-break.c (struct breakpoint): Change return type of handler to
9114 (set_breakpoint_at): Update handler type.
9115 (reinsert_breakpoint_handler): Return 1 instead of calling
9117 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9119 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9120 * mem-break.h (set_breakpoint_at): Update handler type.
9121 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9122 * win32-low.c (auto_delete_breakpoint): New.
9123 (get_child_debug_event): Use it.
9125 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9127 * configure.ac: Check for pread and pwrite.
9128 * hostio.c (handle_pread): Fall back to lseek and read.
9129 (handle_pwrite): Fall back to lseek and write.
9130 * config.in, configure: Regenerated.
9132 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9134 * server.c (myresume): Add own_buf argument.
9135 (main): Update calls.
9137 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9139 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9140 * remote-utils.c (remote_open): Do not call disable_async_io.
9141 (block_async_io): Delete.
9142 (unblock_async_io): Make static.
9143 (initialize_async_io): New.
9144 * server.c (handle_v_cont): Handle async I/O here.
9145 (myresume): Likewise. Move other common resume tasks here...
9146 (main): ... from here. Call initialize_async_io. Disable async
9147 I/O before the main loop.
9148 * server.h (initialize_async_io): Declare.
9149 (block_async_io, unblock_async_io): Delete prototypes.
9150 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9152 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9154 * remote-utils.c (readchar): Allow binary data in received messages.
9156 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9158 * win32-low.c (attaching): New global.
9159 (win32_create_inferior): Clear the `attaching' global.
9160 (win32_attach): Set the `attaching' global.
9161 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9162 attaching. Only set a breakpoint at the entry point if not
9165 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9167 * server.c (main): Don't report dll events on the initial
9168 connection on attaches.
9170 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9172 * server.c (main): Relax numerical bases supported for the pid of
9173 the --attach command line argument.
9175 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9177 * win32-low.c (win32_attach): Call OpenProcess before
9178 DebugActiveProcess, not after. Add last error output to error
9181 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9183 * win32-low.c (win32_get_thread_context)
9184 (win32_set_thread_context): New functions.
9185 (thread_rec): Use win32_get_thread_context.
9186 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9187 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9190 2007-12-03 Leo Zayas
9191 Pedro Alves <pedro_alves@portugalmail.pt>
9193 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9195 (child_add_thread): Minor cleanup.
9196 (child_continue): Resume artificially suspended threads before
9197 calling ContinueDebugEvent.
9198 (suspend_one_thread): New.
9199 (fake_breakpoint_event): New.
9200 (get_child_debug_event): Change return type to int. Check here if
9201 gdb sent an interrupt request. If a soft interrupt was requested,
9202 fake a breakpoint event. Return 0 if there is no event to handle,
9204 (win32_wait): Don't check here if gdb sent an interrupt request.
9205 Ensure there is a valid event to handle.
9206 (win32_request_interrupt): Add soft interruption method as last
9209 2007-12-03 Leo Zayas
9210 Pedro Alves <pedro_alves@portugalmail.pt>
9212 * win32-low.h (win32_thread_info): Add descriptions to the
9213 structure members. Replace `suspend_count' counter by a
9215 * win32-low.c (thread_rec): Update condition of when to get the
9216 context from the inferior. Rely on ContextFlags being set if it
9217 has already been retrieved. Only suspend the inferior thread if
9218 we haven't already. Warn if that fails.
9219 (continue_one_thread): s/suspend_count/suspended/. Only call
9220 ResumeThread once. Warn if that fails.
9222 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9224 * win32-low.c (win32_wait): Don't read from the inferior when it
9227 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9229 * Makefile.in (win32_low_h): New variable.
9230 (win32-low.o): Add dependency on $(win32_low_h).
9231 (win32-arm-low.o, win32-i386-low.o): New rules.
9233 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9235 * hostio.c: Correct copyright year.
9237 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9239 * Makefile.in (OBS): Add hostio.o.
9240 (hostio.o): New rule.
9241 * server.h (handle_vFile): Declare.
9242 * hostio.c: New file.
9243 * server.c (handle_v_requests): Take packet_len and new_packet_len
9244 for binary packets. Call handle_vFile.
9245 (main): Update call to handle_v_requests.
9247 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9249 * linux-low.c: Include <sched.h>.
9251 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9253 * linux-low.c (linux_tracefork_grandchild): New.
9254 (linux_tracefork_child): Use clone.
9255 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9257 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9259 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9261 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9263 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9265 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9267 * inferiors.c (change_inferior_id): Delete.
9268 (add_pid_to_list, pull_pid_from_list): New.
9269 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9270 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9271 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9272 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9273 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9274 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9275 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9276 (using_threads): Always set to 1.
9277 (handle_extended_wait): New.
9278 (add_process): Do not set TID.
9279 (linux_create_inferior): Set must_set_ptrace_flags.
9280 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9281 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9282 (linux_thread_alive): Rename TID argument to LWPID.
9283 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9284 (linux_wait_for_event): Do not use TID or check using_threads. Update
9285 call to dead_thread_notify. Call handle_extended_wait.
9286 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9287 (send_sigstop): Delete sigstop_sent.
9288 (wait_for_sigstop): Avoid TID.
9289 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9290 (linux_test_for_tracefork): New.
9291 (linux_lookup_signals): Use thread_db_active and
9292 linux_supports_tracefork_flag.
9293 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9294 * linux-low.h (get_process_thread): Avoid TID.
9295 (struct process_ifo): Move thread_known and tid to the end. Remove
9297 (linux_attach_lwp, thread_db_init): Update prototypes.
9298 * server.h (change_inferior_id): Delete prototype.
9299 (add_pid_to_list, pull_pid_from_list): New prototypes.
9300 * thread-db.c (thread_db_use_events): New.
9301 (find_first_thread): Rename to...
9302 (find_one_thread): ...this. Update callers and messages. Do not
9303 call fatal. Check thread_db_use_events. Do not call
9304 change_inferior_id or new_thread_notify.
9305 (maybe_attach_thread): Update. Do not call new_thread_notify.
9306 (thread_db_init): Set thread_db_use_events. Check use_events.
9307 * utils.c (fatal, warning): Correct message prefix.
9309 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9311 * Makefile.in (clean): Remove new files.
9312 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9313 (powerpc-64.o, powerpc-64.c): New rules.
9314 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9315 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9317 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9319 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9320 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9321 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9322 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9323 (target_regsets): Add AltiVec and SPE register sets.
9324 * configure.ac: Check for AltiVec and SPE.
9325 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9326 (ppc_fill_vrregset, ppc_store_vrregset): New.
9327 (target_regsets): Add AltiVec register set.
9328 * configure: Regenerated.
9330 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9332 * linux-low.c (O_LARGEFILE): Define.
9333 (linux_read_memory): Use /proc/PID/mem.
9334 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9335 * configure, config.in: Regenerated.
9337 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9339 * linux-low.c (linux_wait_for_event): Do not pass signals while
9342 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9344 * win32-low.c (create_process): New.
9345 (win32_create_inferior): Use create_process instead of
9346 CreateProcess. If create_process failed retry appending an ".exe"
9347 suffix. Store the GetLastError result immediatelly after
9348 create_process calls and use it on the call to error.
9350 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9352 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9354 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9356 * configure.ac: Switch license to GPLv3.
9358 2007-08-01 Michael Snyder <msnyder@access-company.com>
9360 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9362 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9364 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9366 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9367 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9368 CloseToolhelp32Snapshot.
9369 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9370 CloseToolhelp32Snapshot.
9372 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9374 * server.c (main): Check for inferior exit before main loop.
9376 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9378 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9379 instead of on tmp_desc.
9381 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9382 Daniel Jacobowitz <dan@codesourcery.com>
9384 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9385 (add_thread): Minor cleanups.
9386 (clear_inferiors): Move lower in the file. Clear the DLL
9388 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9389 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9390 (xml_escape_text): New.
9391 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9393 (handle_v_cont): Report errors.
9394 (gdbserver_version): Update.
9395 (main): Correct size of own_buf. Do not report initial DLL events.
9396 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9397 (unloaded_dll, xml_escape_text): New.
9398 * win32-low.c (enum target_waitkind): Update comments.
9399 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9400 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9401 (win32_EnumProcessModules, win32_GetModuleInformation)
9402 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9403 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9404 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9405 (win32_Module32First, win32_Module32Next, load_toolhelp)
9406 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9407 (get_child_debug_event): Handle DLL events.
9408 (win32_wait): Likewise.
9410 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9412 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9413 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9415 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9417 * win32-low.c (handle_output_debug_string): Ignore event if not
9420 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9422 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9424 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9426 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9428 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9430 * inferiors.c (change_inferior_id): Add comment.
9431 * linux-low.c (check_removed_breakpoint): Add an early
9432 prototype. Improve debug output.
9433 (linux_attach): Doc update.
9434 (linux_detach_one_process, linux_detach): Clean up before releasing
9436 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9437 * linux-low.h (struct process_info): Doc improvement.
9438 * mem-break.c (delete_all_breakpoints): New.
9439 * mem-break.h (delete_all_breakpoints): New prototype.
9440 * thread-db.c (find_first_thread): New.
9441 (thread_db_create_event): Call it instead of
9442 thread_db_find_new_threads. Clean up unused variables.
9443 (maybe_attach_thread): Remove first thread handling.
9444 (thread_db_find_new_threads): Use find_first_thread.
9445 (thread_db_get_tls_address): Likewise.
9447 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9449 * thread-db.c (thread_db_find_new_threads): Add prototype.
9450 (thread_db_create_event): Check for the main thread before adding
9452 (maybe_attach_thread): Only enable event reporting if TID == 0.
9453 (thread_db_get_tls_address): Check for new threads.
9455 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9457 * linux-low.c (linux_create_inferior): Try execv before execvp.
9458 * spu-low.c (spu_create_inferior): Likewise.
9460 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9462 * linux-low.c (linux_create_inferior): Change execv to execvp.
9463 * spu-low.c (spu_create_inferior): Likewies.
9465 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9467 * Makefile.in (clean): Clean new files instead of deleted ones.
9468 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9469 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9471 * configure.srv: Specify XML files and new regformats for MIPS and
9473 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9474 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9475 an entry for the restart register.
9476 (mips_cannot_fetch_register, mips_cannot_store_register)
9477 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9478 register names to match the XML descriptions.
9479 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9480 restart register instead of $0.
9482 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9483 Markus Deuling <deuling@de.ibm.com>
9485 * remote-utils.c (decode_xfer_write): New function.
9486 * server.h (decode_xfer_write): Add prototype.
9487 * server.c (handle_query): Add PACKET_LEN argument. Support
9488 qXfer:spu:read and qXfer:spu:write packets.
9489 (main): Pass packet_len to handle_query.
9490 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9491 * target.h (target_ops): Add qxfer_spu.
9493 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9495 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9496 accessing non-seekable spufs files.
9498 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9500 * server.c (handle_query): Add reply for qC packet.
9502 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9503 Leo Zayas <lerele@champenstudios@com>
9505 * server.h (check_remote_input_interrupt_request): New function.
9506 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9507 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9508 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9509 (check_remote_input_interrupt_request): New function.
9510 * server.h (check_remote_input_interrupt_request): Declare.
9511 * win32-low.c (winapi_DebugBreakProcess,
9512 winapi_GenerateConsoleCtrlEvent): New typedefs.
9513 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9515 (win32_wait): Check for remote interrupt request
9516 with check_remote_input_interrupt_request.
9517 (win32_request_interrupt): New function.
9518 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9520 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9522 * win32-low.c (debug_registers_changed,
9523 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9524 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9525 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9526 (thread_rec): Get context using the low target.
9527 (child_add_thread): Call thread_added on the low target,
9528 which does the same thing.
9530 (do_initial_child_stuff): Remove debug registers references.
9531 Set context using the low target. Resume threads after
9532 setting the contexts.
9533 (child_continue): Remove dead variable. Remove debug
9534 registers references.
9535 (child_fetch_inferior_registers): Go through the low target.
9536 (do_child_store_inferior_registers): Remove.
9537 (child_store_inferior_registers): Go through the low target.
9538 (win32_resume): Remove debug registers references.
9539 Set context using the low target.
9540 (handle_exception): Change return type to void. Don't record
9541 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9542 first chance exception.
9543 (get_child_debug_event): Change return type to void. Remove
9544 goto loop. Always return after waiting for debug event.
9545 (win32_wait): Convert to switch statement. Handle spurious
9548 * win32-i386-low.c (debug_registers_changed,
9549 debug_registers_used): New.
9550 (initial_stuff): Rename to ...
9551 (i386_initial_stuff): ... this. Clear debug registers
9553 (store_debug_registers): Delete.
9554 (i386_get_thread_context): New.
9555 (load_debug_registers): Delete.
9556 (i386_set_thread_context): New.
9557 (i386_thread_added): New.
9558 (single_step): Rename to ...
9559 (i386_single_step): ... this.
9560 (do_fetch_inferior_registers): Rename to ...
9561 (i386_fetch_inferior_register): ... this.
9562 (i386_store_inferior_register): New.
9563 (the_low_target): Adapt to new interface.
9565 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9566 (arm_get_thread_context): New.
9567 (arm_set_thread_context): New.
9569 (do_fetch_inferior_registers): Rename to ...
9570 (arm_fetch_inferior_register): ... this.
9571 (arm_store_inferior_register): New.
9572 (arm_wince_breakpoint): Reimplement as unsigned long.
9573 (arm_wince_breakpoint_len): Define.
9574 (the_low_target): Adapt to new interface.
9576 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9577 load_debug_registers. Add get_thread_context, set_thread_context,
9578 thread_added and store_inferior_register. Rename
9579 fetch_inferior_registers to fetch_inferior_register.
9580 (regptr): Remove declaration.
9582 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9584 * linux-low.c (linux_detach): Change return type to int. Return 0.
9585 * spu-low.c (spu_detach): Likewise.
9587 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9589 * target.h (target_ops): Change return type of detach to int.
9591 (join_inferior): New.
9592 * server.c (main): Don't skip detach support on mingw32.
9593 If the inferior doesn't support detaching return error.
9594 Call join_inferior instead of using waitpid.
9595 * linux-low.c (linux_join): New.
9596 (linux_target_op): Add linux_join.
9597 * spu-low.c (spu_join): New.
9598 (spu_target_ops): Add spu_join.
9599 * win32-low.c (win32_detach): Adapt to new interface.
9600 Reopen current_process_handle before detaching. Issue a child
9601 resume before detaching.
9603 (win32_target_op): Add win32_join.
9605 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9607 * win32-low.c (win32-attach): Fix return value.
9608 * target.h (target_ops): Describe ATTACH return values.
9610 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9612 * win32-low.c (GETPROCADDRESS): Define.
9613 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9614 (winapi_DebugSetProcessKillOnExit): Likewise.
9615 (win32_create_inferior): Force usage of ansi CreateProcessA.
9616 (win32_attach): Use GETPROCADDRESS.
9617 (win32_detach): Likewise.
9619 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9621 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9623 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9625 * win32-low.c: Commit leftover changes from 2007-03-29.
9627 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9629 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9630 fields short instead of int. Add explicit padding.
9631 (i387_cache_to_fsave): Remove unnecessary casts.
9632 (i387_fsave_to_cache): Doc fix.
9633 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9635 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9637 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9638 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9640 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9642 * configure.srv (arm*-*-mingw32ce*): Move near the other
9645 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9647 * configure.ac: Add errno checking.
9648 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9649 sys/file.h and malloc.h.
9650 (AC_CHECK_DECLS): Add perror.
9651 (srv_mingwce): Handle.
9652 * configure.srv (i[34567]86-*-cygwin*): Add
9653 win32-i386-low.o to srv_tgtobj.
9654 (i[34567]86-*-mingw*): Likewise.
9655 (arm*-*-mingw32ce*): Add case.
9656 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9657 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9658 [__MINGW32CE__] (strerror): New function.
9659 [__MINGW32CE__] (errno): Define to GetLastError.
9660 [__MINGW32CE__] (COUNTOF): New macro.
9661 (remote_open): Remove extra close call.
9662 * mem-break.c (delete_breakpoint_at): New function.
9663 * mem-break.h (delete_breakpoint_at): Declare.
9664 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9665 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9666 [USE_WIN32API] (read, write): Add char* casts.
9667 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9668 * server.h: Include wincecompat.h on Windows CE.
9669 [HAVE_ERRNO_H]: Check.
9670 (perror): Declare if not declared.
9671 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9672 (perror_with_name): Remove errno declaration.
9673 * wincecompat.h: New.
9674 * wincecompat.c: New.
9676 * win32-arm-low.c: New.
9677 * win32-i386-low.c: New.
9678 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9679 (OUTMSG2): Make it safe.
9681 (COUNTOF): New macro.
9682 (NUM_REGS): Get it from the low target.
9683 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9684 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9685 (thread_rec): Let low target handle debug registers.
9686 (child_add_thread): Likewise.
9687 (child_init_thread_list): Likewise.
9688 (continue_one_thread): Likewise.
9690 (do_child_fetch_inferior_registers): Move to ...
9691 * win32-i386-low.c: ... here, and rename to ...
9692 (do_fetch_inferior_registers): ... this.
9693 * win32-low.c (child_fetch_inferior_registers):
9694 Go through the low target.
9695 (do_child_store_inferior_registers): Use regptr.
9696 (strwinerror): New function.
9697 (win32_create_inferior): Handle Windows CE.
9698 Use strwinerror instead of strerror on Windows error
9699 codes. Add program to the error output.
9700 Don't close the main thread handle on Windows CE.
9701 (win32_attach): Use coredll.dll on Windows CE.
9702 (win32_kill): Close current process and current
9704 (win32_detach): Use coredll.dll on Windows CE.
9705 (win32_resume): Let low target handle debug registers, and
9707 (handle_exception): Add/Remove initial breakpoint. Avoid
9708 non-existant WSTOPSIG on Windows CE.
9709 (win32_read_inferior_memory): Cast to remove warning.
9710 (win32_arch_string): Go through the low target.
9711 (initialize_low): Call set_breakpoint_data with the low
9712 target's breakpoint.
9713 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9714 FOP_REGNUM, mappings): Move to ...
9715 * win32-i386-low.c: ... here.
9716 * win32-low.c (win32_thread_info): Move to ...
9717 * win32-low.h: ... here.
9718 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9719 win32-arm-low.c and wincecompat.c.
9720 (all:): Add $EXEEXT.
9721 (install-only:): Likewise.
9722 (gdbserver:): Likewise.
9723 (gdbreplay:): Likewise.
9724 * config.in: Regenerate.
9725 * configure: Regenerate.
9727 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9729 * win32-low.c: Rename typedef thread_info to
9730 win32_thread_info throughout.
9732 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9734 * win32-i386-low.c: Rename to ...
9735 * win32-low.c: ... this.
9736 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9737 * Makefile.in: Likewise.
9739 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9741 * remote-utils.c (monitor_output): Constify msg parameter.
9742 * server.h (monitor_output): Likewise.
9743 * win32-i386-low.c (handle_output_debug_string): New.
9744 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9745 handle_output_debug_string.
9746 (get_child_debug_event): Likewise.
9748 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9750 * server.c (main): Correct strtoul check.
9752 2007-03-27 Jon Ringle <jon@ringle.org>
9754 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9756 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9758 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9760 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9762 * terminal.h: Check HAVE_SGTTY_H.
9764 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9766 * remote-utils.c (remote_open): Print out the assigned port number.
9768 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9770 * remote-utils.c (monitor_output): New function.
9771 * server.c (debug_threads): Define here.
9772 (monitor_show_help): New function.
9773 (handle_query): Handle qRcmd.
9774 (main): Do not handle 'd' packet.
9775 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9776 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9779 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9781 * Makefile.in (EXEEXT): New.
9782 (clean): Use $(EXEEXT).
9784 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9786 * target.h (target_ops): Rename send_signal to request_interrupt,
9787 and remove enum target_signal parameter.
9788 * linux-low.c (linux_request_interrupt): Rename from
9789 linux_send_signal, and always send SIGINT.
9790 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9791 and always send SIGINT.
9792 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9794 (input_interrupt): Likewise.
9796 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9798 * server.c (get_features_xml): Check if target implemented
9800 * win32-i386-low.c (win32_arch_string): New.
9801 (win32_target_ops): Add win32_arch_string as arch_string member.
9803 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9805 * spu-low.c (spu_arch_string): New.
9806 (spu_target_ops): Add spu_arch_string.
9808 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9810 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9811 * configure.ac: Do not check for terminal.h.
9812 * configure, config.in: Regenerated.
9814 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9816 * Makefile.in (OBS): Add $(XML_BUILTIN).
9817 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9819 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9820 (arm-with-iwmmxt.c): New.
9821 * config.in, configure: Regenerate.
9822 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9823 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9824 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9825 (arm*-*-linux*): Add iWMMXt and regset support.
9826 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9827 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9828 (arm_store_wmmxregset, target_regsets): New.
9829 * server.c (get_features_xml): Take annex argument. Check builtin
9831 (handle_query): Handle multiple annexes.
9833 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9835 * remote-utils.c [USE_WIN32API] (read, write): Define.
9836 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9839 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9841 * linux-i386-low.c (the_low_target): Set arch_string.
9842 * linux-x86-64-low.c (the_low_target): Likewise.
9843 * linux-low.c (linux_arch_string): New.
9844 (linux_target_ops): Add it.
9845 * linux-low.h (struct linux_target_ops): Add arch_string.
9846 * server.c (write_qxfer_response): Use const void * for DATA.
9847 (get_features_xml): New.
9848 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9849 * target.h (struct target_ops): Add arch_string method.
9851 2007-01-03 Denis Pilat <denis.pilat@st.com>
9852 Daniel Jacobowitz <dan@codesourcery.com>
9854 * linux-low.c (linux_kill): Handle being called with no threads.
9855 * win32-i386-low.c (win32_kill): Likewise.
9856 (get_child_debug_event): Clear current_process_handle.
9858 2006-12-30 Denis PILAT <denis.pilat@st.com>
9859 Daniel Jacobowitz <dan@codesourcery.com>
9861 * remote-utils.c (remote_open): Check the type of specified
9862 serial port devices before opening them.
9863 * server.c (main): Kill the inferior if an error occurs during
9864 the first remote_open.
9866 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9868 * README: Update supported targets.
9870 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9872 * Makefile.in (clean): Remove reg-mips64.c.
9873 (reg-mips64.c, reg-mips64.o): New rules.
9874 * configure.srv: Handle mips64. Include regset support for mips.
9875 * linux-mips-low.c (union mips_register): New.
9876 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9877 (mips_breakpoint, mips_breakpoint_at): Use int.
9878 (mips_collect_register, mips_supply_register)
9879 (mips_collect_register_32bit, mips_supply_register_32bit)
9880 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9881 (mips_store_fpregset, target_regsets): New.
9882 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9884 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9886 * configure.srv: Add target "spu*-*-*".
9887 * Makefile.in (clean): Remove reg-spu.c.
9888 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9889 * spu-low.c: New file.
9891 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9893 * configure.ac: Correct td_thr_tls_get_addr test.
9894 * configure: Regenerated.
9896 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9898 * linux-low.c (linux_wait_for_event): Reformat. Use the
9900 * remote-utils.c (decode_address_to_semicolon): New.
9901 * server.c (pass_signals, handle_general_set): New.
9902 (handle_query): Mention QPassSignals for qSupported.
9903 (main): Call handle_general_set.
9904 * server.h (pass_signals, decode_address_to_semicolon): New.
9906 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9908 * server.c (handle_query): Correct error handling for read_auxv.
9910 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9912 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9913 and srv_linux_thread_db to yes.
9914 * linux-s390-low.c (s390_fill_gregset): New function.
9915 (target_regsets): Define data structure.
9917 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9919 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9920 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9921 * config.in, configure: Regenerated.
9922 * inferiors.c (gdb_id_to_thread): New function.
9923 (gdb_id_to_thread_id): Use it.
9924 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9925 * linux-low.h (struct process_info): Add th member.
9926 (thread_db_get_tls_address): New prototype.
9927 * remote-utils.c (decode_address): Make non-static.
9928 * server.c (handle_query): Handle qGetTLSAddr.
9929 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9930 * target.h (struct target_ops): Add get_tls_address.
9931 * thread-db.c (maybe_attach_thread): Save the thread handle.
9932 (thread_db_get_tls_address): New.
9934 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9936 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9937 (linux_resume_one_process): Take a siginfo_t *. Update all
9938 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9939 (struct pending_signals): Add a siginfo_t.
9940 (linux_wait_for_process): Always set last_status.
9941 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9942 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9943 * linux-low.h (struct process_info): Add last_status.
9945 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9947 * remote-utils.c (try_rle): New function.
9948 (putpkt_binary): Use it.
9950 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9952 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9953 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9954 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9955 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9956 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9959 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9961 * server.c (terminal_fd): New variable.
9962 (old_foreground_pgrp): Likewise.
9963 (restore_old_foreground_pgrp): New function.
9964 (start_inferior): Record the terminal file descriptor in terminal_fd
9965 and its original foreground group in old_foreground_pgrp. Register
9966 restore_old_foreground_pgrp with atexit().
9968 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9970 * server.c (handle_query): Correct qPart to qXfer.
9972 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9974 * configure.ac: Check for more headers which are missing on
9975 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9976 * configure.srv: Add Cygwin and mingw32.
9977 * remote-utils.c: Don't include headers unconditionally which
9978 are missing on mingw32. Include <winsock.h> for mingw32.
9979 (remote_open): Adjust for mingw32 support. Flush
9980 standard error after writing to it.
9981 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9982 (unblock_async_io, enable_async_io, disable_async_io)
9983 (readchar, getpkt): Update for Winsock support.
9984 (prepare_resume_reply): Expect a protocol signal number.
9985 * server.c: Disable <sys/wait.h> on mingw32.
9986 (start_inferior): Adjust for mingw32 support. Flush
9987 standard error after writing to it.
9988 (attach_inferior): Likewise. Use protocol signal
9990 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9992 * win32-i386-low.c: New file.
9993 * Makefile.in (XM_CLIBS): Set.
9994 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9995 (win32-i386-low.o): New dependency rule.
9996 * linux-low.c (linux_wait): Use target signal numbers.
9997 * target.h (struct target_ops): Doc fix.
9998 * server.h (target_signal_to_name): New prototype.
9999 * gdbreplay.c: Don't include headers unconditionally which
10000 are missing on mingw32. Include <winsock.h> for mingw32.
10001 (remote_close, remote_open): Adjust for Winsock support.
10002 * configure, config.in: Regenerated.
10004 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10006 * server.c (decode_xfer_read, write_qxfer_response): New.
10007 (handle_query): Take a packet length argument. Handle
10008 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10009 the qSupported response.
10010 (main): Update call to handle_query.
10012 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10014 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10015 (putpkt_binary): Renamed from putpkt and adjusted for binary
10017 (putpkt): New wrapper for putpkt_binary.
10018 (readchar): Don't mask off the high bit.
10019 (decode_X_packet): New function.
10020 * server.c (main): Call putpkt_binary if a handler sets the packet
10021 length. Save the length of the incoming packet. Handle 'X'.
10022 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10024 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10026 * server.c (handle_query): Handle qSupported.
10028 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10030 * remote-utils.c (all_symbols_looked_up): New variable.
10031 (look_up_one_symbol): Check it.
10032 * server.h (look_up_one_symbol): New declaration.
10033 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10035 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10037 * Makefile.in (linux-arm-low.o): Update dependencies.
10038 * linux-arm-low.c: Include "gdb_proc_service.h".
10039 (PTRACE_GET_THREAD_AREA): Define.
10040 (ps_get_thread_area): New function.
10042 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10044 * configure.srv (m68k*-*-uclinux*): New target.
10045 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10046 (linux_resume_one_process): Remove extraneous cast.
10047 (linux_read_offsets): New.
10048 (linux_target_op): Add linux_read_offsets on mmuless systems.
10049 * server.c (handle_query): Add qOffsets logic.
10050 * target.h (struct target_ops): Add read_offsets.
10052 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10054 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10055 (PTRACE_GET_THREAD_AREA): Define.
10056 (ps_get_thread_area): New function.
10057 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10058 (linux-x86-64-low.o): Update.
10060 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10062 * configure.ac: Remove checks for prfpregset_t.
10063 * gdb_proc_service.h: New file.
10064 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10065 new "gdb_proc_service.h".
10066 * proc-service.c: Likewise.
10067 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10068 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10069 * Makefile.in (gdb_proc_service_h): Updated.
10070 * configure, config.in: Regenerated.
10072 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10074 * remote-utils.c (prepare_resume_reply): Move declaration
10075 of gdb_id_from_wait to the top of the block.
10077 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10079 * linux-low.c (regsets_store_inferior_registers): Read the regset
10080 from the target before filling it.
10082 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10084 * server.c (attach_inferior): Return SIGTRAP for a successful
10087 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10089 * Makefile.in (OBS): Add version.o.
10090 (STAGESTUFF): Delete.
10091 (version.o): Add dependencies.
10092 (version.c): Replace rule.
10093 (clean): Remove version.c.
10094 * server.c (gdbserver_version): New.
10095 (gdbserver_usage): Use printf.
10096 (main): Handle --version and --help.
10097 * server.h (version, host_name): Add declarations.
10099 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10111 * linux-x86-64-low.c:
10113 * linux-s390-low.c:
10114 * linux-ppc64-low.c:
10116 * linux-mips-low.c:
10117 * linux-m68k-low.c:
10118 * linux-m32r-low.c:
10121 * linux-ia64-low.c:
10122 * linux-i386-low.c:
10123 * linux-crisv32-low.c:
10135 * gdbserver.1: Add (C) after Copyright. Update the FSF
10138 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10140 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10141 (arm_breakpoint_at): Recognize both breakpoints.
10142 (the_low_target): Use the correct breakpoint instruction.
10144 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10146 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10147 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10148 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10149 (the_low_target): Update.
10151 2005-10-25 Andreas Schwab <schwab@suse.de>
10153 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10155 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10156 (ia64_num_regs): Reduce to 462.
10158 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10160 * acinclude.m4: Correct quoting.
10161 * aclocal.m4: Regenerated.
10163 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10164 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10165 (thread_db_init): Call thread_db_err_str.
10166 * configure.ac: Check for TD_VERSION.
10167 * config.in, configure: Regenerated.
10169 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10171 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10173 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10175 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10176 is not available. Define HAVE_PTRACE_GETREGS if it is.
10177 * config.in, configure: Regenerated.
10178 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10179 * linux-i386-low.c, linux-m68k-low.c: Update to use
10180 HAVE_PTRACE_GETREGS.
10181 * linux-low.c (regsets_fetch_inferior_registers)
10182 (regsets_store_inferior_registers): Only return 0 if we processed
10184 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10185 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10187 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10189 * inferiors.c (struct thread_info): Add gdb_id.
10190 (add_thread): Add gdb_id argument.
10191 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10192 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10193 calls to add_thread.
10194 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10195 * server.c (handle_query): Use thread_to_gdb_id.
10196 (handle_v_cont, main): Use gdb_id_to_thread_id.
10197 * server.h (add_thread): Update prototype.
10198 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10201 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10203 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10204 left-padded registers.
10205 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10206 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10208 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10210 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10211 * configure: Regenerate.
10212 * config.in: Regenerate.
10213 * server.h (NEED_DECLARATION_STRERROR):
10214 Replace with !HAVE_DECL_STRERROR.
10216 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10218 * linux-low.c (linux_wait, linux_send_signal): Don't test
10219 an unsigned long variable for > 0 if it could be MAX_ULONG.
10220 * server.c (myresume): Likewise.
10221 * target.c (set_desired_inferior): Likewise.
10223 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10225 * configure.ac: Simplify and improve check for socklen_t.
10226 * configure, config.in: Regenerate.
10228 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10230 * acconfig.h: Remove.
10231 * configure.ac: Add a test for socklen_t. Use three-argument
10232 AC_DEFINE throughout.
10233 * config.in: Regenerated using autoheader 2.59.
10234 * configure: Regenerated.
10236 * gdbreplay.c (socklen_t): Provide a default.
10237 (remote_open): Use socklen_t.
10238 * remote-utils.c (socklen_t): Provide a default.
10239 (remote_open): Use socklen_t.
10240 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10243 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10245 * linux-low.c (linux_read_memory, linux_write_memory)
10246 (linux_read_auxv): Likewise.
10247 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10248 (check_mem_write): Likewise.
10249 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10251 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10252 (registers_from_string, register_data): Likewise.
10253 * server.c (handle_query, main): Likewise.
10254 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10255 (decode_M_packet): Likewise.
10256 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10257 * target.h (struct target_ops): Update read_memory, write_memory,
10259 (read_inferior_memory, write_inferior_memory): Update.
10260 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10261 to unsigned char *.
10262 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10263 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10264 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10265 linux-s390-low.c, linux-sh-low.c: Update for changes in
10266 read_inferior_memory and the_low_target->breakpoint.
10268 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10270 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10271 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10272 * configure.srv: Add powerpc64-*-linux*.
10273 * linux-ppc64-low.c: New file.
10275 2005-05-23 Orjan Friberg <orjanf@axis.com>
10277 * linux-cris-low.c: New file with support for CRIS.
10278 * linux-crisv32-low.c: Ditto for CRISv32.
10279 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10280 (clean): Add reg-cris.c and reg-crisv32.c.
10281 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10282 reg-crisv32.o, and reg-crisv32.c to make rules.
10283 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10284 recognized targets.
10286 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10288 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10289 of sizeof (PTRACE_XFER_TYPE).
10290 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10292 2005-05-12 Orjan Friberg <orjanf@axis.com>
10294 * target.h (struct target_ops): Add insert_watchpoint,
10295 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10296 pointers for hardware watchpoint support.
10297 * linux-low.h (struct linux_target_ops): Ditto.
10298 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10299 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10300 to linux_target_ops.
10301 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10303 * server.c (main): Recognize 'Z' and 'z' packets.
10305 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10307 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10308 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10309 (the_low_target): Add new members.
10311 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10313 * proc-service.c (ps_lgetregs): Search all_processes instead of
10316 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10318 * server.c (start_inferior): Change return type to int.
10319 (attach_inferior): Change sigptr to int *.
10320 (handle_v_cont, handle_v_requests): Change signal to int *.
10321 (main): Change signal to int.
10323 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10325 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10326 * configure.srv: Add m32r*-*-linux*.
10327 * linux-m32r-low.c: New file.
10329 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10331 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10333 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10335 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10336 Take unsigned long arguments for PIDs.
10337 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10338 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10339 (wait_for_sigstop, linux_resume_one_process)
10340 (regsets_fetch_inferior_registers, linux_send_signal)
10341 (linux_read_auxv): Likewise. Update the types of variables holding
10342 PIDs. Update format string specifiers.
10343 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10344 * remote-utils.c (prepare_resume_reply): Likewise.
10345 * server.c (cont_thread, general_thread, step_thread)
10346 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10348 (handle_query): Update format specifiers.
10349 (handle_v_cont, main): Use strtoul for thread IDs.
10350 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10351 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10352 (general_thread, step_thread, thread_from_wait)
10353 (old_thread_from_wait): Update.
10354 * target.h (struct thread_resume): Use unsigned long for THREAD.
10355 (struct target_ops): Use unsigned long for arguments to attach and
10358 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10360 * acinclude.m4: Include bfd/bfd.m4 directly.
10361 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10362 <agriffis@toolchain.org>.
10363 * aclocal.m4, configure: Regenerated.
10365 2005-01-07 Andrew Cagney <cagney@gnu.org>
10367 * configure.ac: Rename configure.in, require autoconf 2.59.
10368 * configure: Re-generate.
10370 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10372 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10373 LIBS when finished.
10374 * aclocal.m4: Regenerated.
10375 * configure: Regenerated.
10377 2004-11-21 Andreas Schwab <schwab@suse.de>
10379 * linux-m68k-low.c (m68k_num_gregs): Define.
10380 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10381 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10382 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10383 (m68k_breakpoint_at): New. Add to the_low_target.
10385 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10386 srv_linux_thread_db to yes.
10388 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10390 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10391 (ARCH_SET_FS): Likewise.
10392 (ARCH_GET_FS): Likewise.
10393 (ARCH_GET_GS): Likewise.
10395 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10397 * linux-i386-low.c (ps_get_thread_area): New.
10398 * linux-x86-64-low.c (ps_get_thread_area): New.
10399 * linux-low.c: Include <sys/syscall.h>.
10400 (linux_kill_one_process): Don't kill the first thread here.
10401 (linux_kill): Kill the first thread here.
10402 (kill_lwp): New function.
10403 (send_sigstop, linux_send_signal): Use it.
10404 * proc-service.c: Clean up #ifdefs.
10405 (fpregset_info): Delete.
10406 (ps_lgetregs): Update and enable implementation.
10407 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10409 * remote-utils.c (struct sym_cache, symbol_cache): New.
10410 (input_interrupt): Print a clearer message.
10411 (async_io_enabled): New variable.
10412 (enable_async_io, disable_async_io): Use it. Update comments.
10413 (look_up_one_symbol): Use the symbol cache.
10414 * thread-db.c (thread_db_look_up_symbols): New function.
10415 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10417 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10419 * configure.in: Test for -rdynamic.
10420 * configure: Regenerated.
10421 * Makefile (INTERNAL_LDFLAGS): New.
10422 (gdbserver, gdbreplay): Use it.
10424 2004-09-02 Andrew Cagney <cagney@gnu.org>
10426 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10428 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10430 * linux-low.c (linux_wait): Clear all_processes list also.
10432 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10434 * linux-low.c: Include <errno.h>. Remove extern declaration of
10437 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10439 * gdbreplay.c, server.h, utils.c: Update copyright years.
10441 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10443 * server.c (main): Print child status or termination signal from
10444 variable 'signal', not 'sig'.
10446 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10448 * linux-low.c (linux_read_memory): Change return type to
10449 int. Check for and return error from ptrace().
10450 * target.c (read_inferior_memory): Change return type to int. Pass
10451 back return status from the_target->read_memory().
10452 * target.h (struct target_ops): Adapt *read_memory() prototype.
10454 (read_inferior_memory): Adapt prototype.
10455 * server.c (main): Return an error packet if
10456 read_inferior_memory() returns an error.
10458 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10460 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10461 Unify with other clean targets.
10463 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10465 * server.c (handle_v_cont): Call set_desired_inferior.
10467 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10469 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10471 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10473 * linux-low.c (linux_wait): Unblock async I/O.
10474 (linux_resume): Block and enable async I/O.
10475 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10476 * server.h (block_async_io, unblock_async_io): Add prototypes.
10478 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10480 * remote-utils.c (remote_open): Print a status notice after
10481 opening a TCP port.
10482 * server.c (attach_inferior): Print a status notice after
10485 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10487 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10489 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10491 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10493 * server.c, target.h: Update copyright years.
10495 2004-02-25 Roland McGrath <roland@redhat.com>
10497 * target.h (struct target_ops): New member `read_auxv'.
10498 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10499 * linux-low.c (linux_read_auxv): New function.
10500 (linux_target_ops): Initialize `read_auxv' member to that.
10502 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10504 Committed by Jim Blandy <jimb@redhat.com>.
10506 * linux-s390-low.c (s390_num_regs): Update.
10507 (s390_regmap): Remove control registers. Use __s390x__ predefine
10508 instead of GPR_SIZE to distiguish s390 and s390x targets.
10510 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10512 * linux-low.c: Update copyright year.
10513 (check_removed_breakpoint): Clear pending_is_breakpoint.
10514 (linux_set_resume_request, linux_queue_one_thread)
10515 (resume_status_pending_p): New functions.
10516 (linux_continue_one_thread): Use process->resume.
10517 (linux_resume): Only resume threads if there are no pending events.
10518 * linux-low.h (struct process_info): Add resume request
10521 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10523 * regcache.c (new_register_cache): Clear the allocated register
10524 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10526 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10528 * linux-low.c (linux_resume): Take a struct thread_resume *
10530 (linux_wait): Update call.
10531 (resume_ptr): New static variable.
10532 (linux_continue_one_thread): Renamed from
10533 linux_continue_one_process. Use resume_ptr.
10534 (linux_resume): Use linux_continue_one_thread.
10535 * server.c (handle_v_cont, handle_v_requests): New functions.
10536 (myresume): New function.
10537 (main): Handle 'v' case.
10538 * target.h (struct thread_resume): New type.
10539 (struct target_ops): Change argument of "resume" to struct
10541 (myresume): Delete macro.
10543 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10545 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10546 (uninstall): Support DESTDIR.
10548 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10550 * configure.srv: Add xscale*linux copy of arm*linux entry.
10552 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10554 * linux-arm-low.c (arm_reinsert_addr): New function.
10555 (the_low_target): Add arm_reinsert_addr.
10557 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10559 * mem-break.c: Remove whitespace at end of file.
10561 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10563 * configure.in: Check whether we need to prototype strerror.
10564 * server.h: Optionally prototype strerror.
10565 * gdbreplay.c (perror_with_name): Use strerror.
10566 * linux-low.c (linux_attach_lwp): Use strerror.
10567 * utils.c (perror_with_name): Use strerror.
10568 * config.in, configure: Regenerated.
10570 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10572 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10573 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10575 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10577 * Makefile.in (SFILES): Update.
10578 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10579 low-sun3.c: Remove files.
10581 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10583 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10584 (linux_detach_one_process, linux_detach): New functions.
10585 (linux_target_ops): Add linux_detach.
10586 * server.c (main): Handle 'D' packet.
10587 * target.h (struct target_ops): Add "detach" member.
10588 (detach_inferior): Define.
10590 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10592 From Kelley Cook <kelleycook@wideopenwest.com>:
10593 * configure.srv: Accept i[34567]86 variants.
10595 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10597 * linux-low.c (linux_wait_for_event): Correct comment typos.
10598 (linux_resume_one_process): Call check_removed_breakpoint.
10599 (linux_send_signal): New function.
10600 (linux_target_ops): Add linux_send_signal.
10601 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10603 * target.h (struct target_ops): Add send_signal.
10605 2003-05-29 Jim Blandy <jimb@redhat.com>
10607 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10608 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10609 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10610 away part of the register's value.
10612 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10614 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10615 (linux_wait_for_event, linux_init_signals): Likewise.
10617 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10619 * configure.in: Check for stdlib.h.
10620 * configure: Regenerated.
10621 * config.in: Regenerated.
10623 2003-01-04 Andreas Schwab <schwab@suse.de>
10625 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10627 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10629 * Makefile.in: Remove obsolete code.
10631 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10633 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10634 defined(PT_FPR0_HI).
10636 2002-11-17 Stuart Hughes <seh@zee2.com>
10638 * linux-arm-low.c (arm_num_regs): Increase.
10639 (arm_regmap): Include status register.
10641 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10643 * linux-low.c (register_addr): Remove incorrect -1 check.
10645 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10647 * linux-low.c (linux_create_inferior): Call setpgid. Return
10649 (unstopped_p, linux_signal_pid): Remove.
10650 (linux_target_ops): Remove linux_signal_pid.
10651 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10652 global instead of target method.
10653 * target.h (struct target_ops): Remove signal_pid. Update comment
10654 for create_inferior.
10655 * server.c (signal_pid): New variable.
10656 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10657 gdbserver. Set the child to be the foreground process group.
10658 (attach_inferior): Set signal_pid.
10660 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10662 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10664 2002-08-20 Jim Blandy <jimb@redhat.com>
10666 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10669 2002-08-01 Andrew Cagney <cagney@redhat.com>
10671 * Makefile.in: Make chill references obsolete.
10673 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10675 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10676 * configure: Regenerate.
10677 * config.in: Regenerate.
10679 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10681 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10682 (perror_with_name, remote_close, remote_open, expect, play): Static.
10684 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10686 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10687 byte offsets instead of an array of indexes.
10688 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10690 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10692 * regcache.c: Add comment.
10694 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10696 * thread-db.c: New file.
10697 * proc-service.c: New file.
10698 * acinclude.m4: New file.
10699 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10700 proc-service.o, and thread-db.o.
10701 (linux-low.o): Add USE_THREAD_DB.
10702 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10703 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10704 * aclocal.m4: Regenerated.
10705 * config.in: Regenerated.
10706 * configure: Regenerated.
10707 * configure.in: Check for proc_service.h, sys/procfs.h,
10708 thread_db.h, and linux/elf.h headrs.
10709 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10710 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10711 Check for -lthread_db and thread support.
10712 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10713 PowerPC, and SuperH.
10714 * i387-fp.c: Constify arguments.
10715 * i387-fp.h: Likewise.
10716 * inferiors.c: (struct thread_info): Renamed from
10717 `struct inferior_info'. Remove PID member. Use generic inferior
10718 list header. All uses updated.
10719 (inferiors, signal_pid): Removed.
10720 (all_threads): New variable.
10721 (get_thread): Define.
10722 (add_inferior_to_list): New function.
10723 (for_each_inferior): New function.
10724 (change_inferior_id): New function.
10725 (add_inferior): Removed.
10726 (remove_inferior): New function.
10727 (add_thread): New function.
10728 (free_one_thread): New function.
10729 (remove_thread): New function.
10730 (clear_inferiors): Use for_each_inferior and free_one_thread.
10731 (find_inferior): New function.
10732 (find_inferior_id): New function.
10733 (inferior_target_data): Update argument type.
10734 (set_inferior_target_data): Likewise.
10735 (inferior_regcache_data): Likewise.
10736 (set_inferior_regcache_data): Likewise.
10737 * linux-low.c (linux_bp_reinsert): Remove.
10738 (all_processes, stopping_threads, using_thrads)
10739 (struct pending_signals, debug_threads, pid_of): New.
10740 (inferior_pid): Replace with macro.
10741 (struct inferior_linux_data): Remove.
10742 (get_stop_pc, add_process): New functions.
10743 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10744 Use add_process and add_thread.
10745 (linux_attach_lwp): New function, based on old linux_attach. Use
10746 add_process and add_thread. Set stop_expected for new threads.
10747 (linux_attach): New function.
10748 (linux_kill_one_process): New function.
10749 (linux_kill): Kill all LWPs.
10750 (linux_thread_alive): Use find_inferior_id.
10751 (check_removed_breakpoints, status_pending_p): New functions.
10752 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10753 Update. Use WNOHANG. Wait for cloned processes also. Update process
10754 struct for the found process.
10755 (linux_wait_for_event): New function.
10756 (linux_wait): Use it. Support LWPs.
10757 (send_sigstop, wait_for_sigstop, stop_all_processes)
10758 (linux_resume_one_process, linux_continue_one_process): New functions.
10759 (linux_resume): Support LWPs.
10760 (REGISTER_RAW_SIZE): Remove.
10761 (fetch_register): Use register_size instead. Call supply_register.
10762 (usr_store_inferior_registers): Likewise. Call collect_register.
10763 Fix recursive case.
10764 (regsets_fetch_inferior_registers): Improve error message.
10765 (regsets_store_inferior_registers): Add debugging.
10766 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10767 (unstopped_p, linux_signal_pid): New functions.
10768 (linux_target_ops): Add linux_signal_pid.
10769 (linux_init_signals): New function.
10770 (initialize_low): Call it. Initialize using_threads.
10771 * regcache.c (inferior_regcache_data): Add valid
10773 (get_regcache): Fetch registers lazily. Add fetch argument
10774 and update all callers.
10775 (regcache_invalidate_one, regcache_invalidate): New
10777 (new_register_cache): Renamed from create_register_cache.
10778 Return the new regcache.
10779 (free_register_cache): Change argument to a void *.
10780 (registers_to_string, registers_from_string): Call get_regcache
10781 with fetch flag set.
10782 (register_data): Make static. Pass fetch flag to get_regcache.
10783 (supply_register): Call get_regcache with fetch flag clear.
10784 (collect_register): Call get_regcache with fetch flag set.
10785 (collect_register_as_string): New function.
10786 * regcache.h: Update.
10787 * remote-utils.c (putpkt): Flush after debug output and use
10789 Handle input interrupts while waiting for an ACK.
10790 (input_interrupt): Use signal_pid method.
10791 (getpkt): Flush after debug output and use stderr.
10792 (outreg): Use collect_register_as_string.
10793 (new_thread_notify, dead_thread_notify): New functions.
10794 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10795 and general_thread.
10796 (look_up_one_symbol): Flush after debug output.
10797 * server.c (step_thread, server_waiting): New variables.
10798 (start_inferior): Don't use signal_pid. Update call to mywait.
10799 (attach_inferior): Update call to mywait.
10800 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10801 (main): Don't fetch/store registers explicitly. Use
10802 set_desired_inferior. Support proposed ``Hs'' packet. Update
10804 * server.h: Update.
10805 (struct inferior_list, struct_inferior_list_entry): New.
10806 * target.c (set_desired_inferior): New.
10807 (write_inferior_memory): Constify.
10808 (mywait): New function.
10809 * target.h: Update.
10810 (struct target_ops): New signal_pid method.
10811 (mywait): Removed macro, added prototype.
10813 * linux-low.h (regset_func): Removed.
10814 (regset_fill_func, regset_store_func): New.
10815 (enum regset_type): New.
10816 (struct regset_info): Add type field. Use new operation types.
10817 (struct linux_target_ops): stop_pc renamed to get_pc.
10818 Add decr_pc_after_break and breakpoint_at.
10819 (get_process, get_thread_proess, get_process_thread)
10820 (strut process_info, all_processes, linux_attach_lwp)
10821 (thread_db_init): New.
10823 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10824 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10825 (the_low_target): Add new members.
10826 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10827 (i386_store_fpxregset): Constify.
10828 (target_regsets): Add new kind identifier.
10829 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10830 (i386_set_pc): Add debugging.
10831 (i386_breakpoint_at): New function.
10832 (the_low_target): Add new members.
10833 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10834 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10835 (mips_breakpoint_at): New.
10836 (the_low_target): Add new members.
10837 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10838 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10839 (the_low_target): Add new members.
10840 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10841 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10842 (the_low_target): Add new members.
10843 * linux-x86-64-low.c (target_regsets): Add new kind
10846 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10848 From Martin Pool <mbp@samba.org>:
10849 * server.c (gdbserver_usage): New function.
10852 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10854 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10855 stop_at -> stop_pc.
10857 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10859 * Makefile.in: Remove obsolete code.
10861 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10863 * linux-low.c (regsets_fetch_inferior_registers),
10864 (regsets_store_inferior_registers): Removed cast to int from
10866 * regcache.h: Added declaration of struct inferior_info.
10868 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10870 * inferiors.c (struct inferior_info): Add regcache_data.
10871 (add_inferior): Call create_register_cache.
10872 (clear_inferiors): Call free_register_cache.
10873 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10874 * regcache.c (struct inferior_regcache_data): New.
10875 (registers): Remove.
10876 (get_regcache): New function.
10877 (create_register_cache, free_register_cache): New functions.
10878 (set_register_cache): Don't initialize the register cache here.
10879 (registers_to_string, registers_from_string, register_data): Call
10881 * regcache.h: Add prototypes.
10882 * server.h: Likewise.
10884 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10886 * mem-break.c: New file.
10887 * mem-break.h: New file.
10888 * Makefile.in: Add mem-break.o rule; update server.h
10890 * inferiors.c (struct inferior_info): Add target_data
10892 (clear_inferiors): Free target_data member if set.
10893 (inferior_target_data, set_inferior_target_data): New functions.
10894 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10895 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10896 * linux-low.c (linux_bp_reinsert): New variable.
10897 (struct inferior_linux_data): New.
10898 (linux_create_inferior): Use set_inferior_target_data.
10899 (linux_attach): Likewise. Call add_inferior.
10900 (linux_wait_for_one_inferior): New function.
10901 (linux_wait): Call it.
10902 (linux_write_memory): Add const.
10903 (initialize_low): Call set_breakpoint_data.
10904 * linux-low.h (struct linux_target_ops): Add breakpoint
10906 * server.c (attach_inferior): Remove extra add_inferior
10908 * server.h: Include mem-break.h. Update inferior.c
10910 * target.c (read_inferior_memory)
10911 (write_inferior_memory): New functions.
10912 * target.h (read_inferior_memory)
10913 (write_inferior_memory): Change macros to prototypes.
10914 (struct target_ops): Update comments. Add const to write_memory
10917 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10919 * linux-low.c (usr_store_inferior_registers): Support
10920 registers which are allowed to fail to store.
10921 * linux-low.h (linux_target_ops): Likewise.
10922 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10923 (ppc_cannot_store_register): FPSCR may not be storable.
10925 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10927 * server.h: Include <string.h> if HAVE_STRING_H.
10928 * ChangeLog: Correct paths in last ChangeLog entry.
10930 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10932 * linux-low.h: Remove obsolete prototypes.
10933 (struct linux_target_ops): New.
10934 (extern the_low_target): New.
10935 * linux-low.c (num_regs, regmap): Remove declarations.
10936 (register_addr): Use the_low_target explicitly.
10937 (fetch_register): Likewise.
10938 (usr_fetch_inferior_registers): Likewise.
10939 (usr_store_inferior_registers): Likewise.
10940 * linux-arm-low.c (num_regs): Remove.
10941 (arm_num_regs): Define.
10942 (arm_regmap): Renamed from regmap, made static.
10943 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10945 (arm_cannot_store_register): Renamed from cannot_store_register,
10947 (the_low_target): New.
10948 * linux-i386-low.c (num_regs): Remove.
10949 (i386_num_regs): Define.
10950 (i386_regmap): Renamed from regmap, made static.
10951 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10953 (i386_cannot_store_register): Renamed from cannot_store_register,
10955 (the_low_target): New.
10956 * linux-ia64-low.c (num_regs): Remove.
10957 (ia64_num_regs): Define.
10958 (ia64_regmap): Renamed from regmap, made static.
10959 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10961 (ia64_cannot_store_register): Renamed from cannot_store_register,
10963 (the_low_target): New.
10964 * linux-m68k-low.c (num_regs): Remove.
10965 (m68k_num_regs): Define.
10966 (m68k_regmap): Renamed from regmap, made static.
10967 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10969 (m68k_cannot_store_register): Renamed from cannot_store_register,
10971 (the_low_target): New.
10972 * linux-mips-low.c (num_regs): Remove.
10973 (mips_num_regs): Define.
10974 (mips_regmap): Renamed from regmap, made static.
10975 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10977 (mips_cannot_store_register): Renamed from cannot_store_register,
10979 (the_low_target): New.
10980 * linux-ppc-low.c (num_regs): Remove.
10981 (ppc_num_regs): Define.
10982 (ppc_regmap): Renamed from regmap, made static.
10983 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10985 (ppc_cannot_store_register): Renamed from cannot_store_register,
10987 (the_low_target): New.
10988 * linux-s390-low.c (num_regs): Remove.
10989 (s390_num_regs): Define.
10990 (s390_regmap): Renamed from regmap, made static.
10991 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10993 (s390_cannot_store_register): Renamed from cannot_store_register,
10995 (the_low_target): New.
10996 * linux-sh-low.c (num_regs): Remove.
10997 (sh_num_regs): Define.
10998 (sh_regmap): Renamed from regmap, made static.
10999 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11001 (sh_cannot_store_register): Renamed from cannot_store_register,
11003 (the_low_target): New.
11004 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11005 (the_low_target): New.
11007 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11009 * Makefile.in: Add stamp-h target.
11010 * configure.in: Create stamp-h.
11011 * configure: Regenerated.
11013 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11015 * inferiors.c: New file.
11016 * target.c: New file.
11017 * target.h: New file.
11018 * Makefile.in: Add target.o and inferiors.o. Update
11020 * linux-low.c (inferior_pid): New static variable,
11021 moved from server.c.
11022 (linux_create_inferior): Renamed from create_inferior.
11023 Call add_inferior. Return 0 on success instead of a PID.
11024 (linux_attach): Renamed from myattach.
11025 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11026 (linux_thread_alive): Renamed from mythread_alive.
11027 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11029 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11030 (regsets_store_inferior_registers): Correct error message.
11031 Add missing ``return 0''.
11032 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11033 (linux_store_registers): Renamed from store_inferior_registers.
11034 (linux_read_memory): Renamed from read_inferior_memory.
11035 (linux_write_memory): Renamed from write_inferior_memory.
11036 (linux_target_ops): New structure.
11037 (initialize_low): Call set_target_ops ().
11038 * remote-utils.c (unhexify): New function.
11039 (hexify): New function.
11040 (input_interrupt): Send signals to ``signal_pid''.
11041 * server.c (inferior_pid): Remove.
11042 (start_inferior): Update create_inferior call.
11043 (attach_inferior): Call add_inferior.
11044 (handle_query): New function.
11045 (main): Call handle_query for `q' packets.
11046 * server.h: Include "target.h". Remove obsolete prototypes.
11047 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11049 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11051 * Makefile.in: Add WARN_CFLAGS. Update configury
11053 * configure.in: Check for <string.h>
11054 * configure: Regenerate.
11055 * config.in: Regenerate.
11056 * gdbreplay.c: Include needed system headers.
11057 (remote_open): Remove strchr prototype.
11058 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11059 * regcache.c (supply_register): Change buf argument to const void *.
11060 (supply_register_by_name): Likewise.
11061 (collect_register): Change buf argument to void *.
11062 (collect_register_by_name): Likewise.
11063 * regcache.h: Add missing prototypes.
11064 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11065 * server.c (handle_query): New function.
11066 (attached): New static variable, moved out of main.
11067 (main): Quiet longjmp clobber warnings.
11068 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11069 * utils.c (error): Remove NORETURN.