1 2015-05-28 Don Breazeal <donb@codesourcery.com>
3 * linux-low.c (handle_extended_wait): Initialize
4 thread_info.last_resume_kind for new fork children.
6 2015-05-15 Pedro Alves <palves@redhat.com>
8 * target.h (target_handle_new_gdb_connection): Rewrite using if
11 2015-05-14 Joel Brobecker <brobecker@adacore.com>
13 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
14 * configure, config.in: Regenerate.
15 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
18 2015-05-12 Don Breazeal <donb@codesourcery.com>
20 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
21 PTRACE_EVENT_VFORK_DONE.
22 (linux_low_ptrace_options, extended_event_reported): Add vfork
24 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
25 and "vforkdone" for RSP 'T' Stop Reply Packet.
26 * server.h (report_vfork_events): Declare
29 2015-05-12 Don Breazeal <donb@codesourcery.com>
31 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
32 (the_low_target) <new_fork>: Initialize new member.
33 * linux-arm-low.c (arm_new_fork): New function.
34 (the_low_target) <new_fork>: Initialize new member.
35 * linux-low.c (handle_extended_wait): Call new target function
37 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
38 * linux-mips-low.c (mips_add_watchpoint): New function
39 extracted from mips_insert_point.
40 (the_low_target) <new_fork>: Initialize new member.
41 (mips_linux_new_fork): New function.
42 (mips_insert_point): Call mips_add_watchpoint.
43 * linux-x86-low.c (x86_linux_new_fork): New function.
44 (the_low_target) <new_fork>: Initialize new member.
46 2015-05-12 Don Breazeal <donb@codesourcery.com>
48 * linux-low.c (handle_extended_wait): Implement return value,
49 rename argument 'event_child' to 'event_lwp', handle
50 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
51 (linux_low_ptrace_options): New function.
52 (linux_low_filter_event): Call linux_low_ptrace_options,
53 use different argument fo linux_enable_event_reporting,
54 use return value from handle_extended_wait.
55 (extended_event_reported): New function.
56 (linux_wait_1): Call extended_event_reported and set
57 status to report fork events.
58 (linux_write_memory): Add pid to debug message.
59 (reset_lwp_ptrace_options_callback): New function.
60 (linux_handle_new_gdb_connection): New function.
61 (linux_target_ops): Initialize new structure member.
62 * linux-low.h (struct lwp_info) <waitstatus>: New member.
63 * lynx-low.c: Initialize new structure member.
64 * remote-utils.c (prepare_resume_reply): Implement stop reason
65 "fork" for "T" stop message.
66 * server.c (handle_query): Call handle_new_gdb_connection.
67 * server.h (report_fork_events): Declare global flag.
68 * target.h (struct target_ops) <handle_new_gdb_connection>:
70 (target_handle_new_gdb_connection): New macro.
71 * win32-low.c: Initialize new structure member.
73 2015-05-12 Don Breazeal <donb@codesourcery.com>
75 * mem-break.c (APPEND_TO_LIST): Define macro.
76 (clone_agent_expr): New function.
77 (clone_one_breakpoint): New function.
78 (clone_all_breakpoints): New function.
79 * mem-break.h: Declare new functions.
81 2015-05-12 Don Breazeal <donb@codesourcery.com>
83 * linux-low.c (linux_supports_fork_events): New function.
84 (linux_supports_vfork_events): New function.
85 (linux_target_ops): Initialize new structure members.
86 (initialize_low): Call linux_check_ptrace_features.
87 * lynx-low.c (lynx_target_ops): Initialize new structure
89 * server.c (report_fork_events, report_vfork_events):
91 (handle_query): Add new features to qSupported packet and
93 (captured_main): Initialize new global variables.
94 * target.h (struct target_ops) <supports_fork_events>:
96 <supports_vfork_events>: New member.
97 (target_supports_fork_events): New macro.
98 (target_supports_vfork_events): New macro.
99 * win32-low.c (win32_target_ops): Initialize new structure
102 2015-05-12 Gary Benson <gbenson@redhat.com>
104 * server.c (handle_qxfer_exec_file): Use current process
107 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
109 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
110 Remove HAVE_PTRACE_GETREGS conditionals.
111 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
112 instead of PTRACE_GETREGS and PTRACE_SETREGS.
114 2015-05-08 Yao Qi <yao.qi@linaro.org>
116 * linux-low.c (linux_supports_conditional_breakpoints): New
118 (linux_target_ops): Install new target method.
119 * lynx-low.c (lynx_target_ops): Install NULL hook for
120 supports_conditional_breakpoints.
121 * nto-low.c (nto_target_ops): Likewise.
122 * spu-low.c (spu_target_ops): Likewise.
123 * win32-low.c (win32_target_ops): Likewise.
124 * server.c (handle_query): Check
125 target_supports_conditional_breakpoints.
126 * target.h (struct target_ops) <supports_conditional_breakpoints>:
128 (target_supports_conditional_breakpoints): New macro.
130 2015-05-06 Pedro Alves <palves@redhat.com>
133 * server.c (start_inferior): If the process exits, mourn it.
135 2015-04-21 Gary Benson <gbenson@redhat.com>
137 * hostio.c (fileio_open_flags_to_host): Factored out to
138 fileio_to_host_openflags in common/fileio.c. Single use
141 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
143 * linux-xtensa-low.c (xtensa_fill_gregset)
144 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
147 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
149 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
150 (regs_info): Replace usrregs pointer with NULL.
152 2015-04-17 Gary Benson <gbenson@redhat.com>
154 * target.h (struct target_ops) <pid_to_exec_file>: New field.
155 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
156 * server.c (handle_qxfer_exec_file): New function.
157 (qxfer_packets): Add exec-file entry.
158 (handle_query): Report qXfer:exec-file:read as supported packet.
160 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
162 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
164 2015-04-09 Gary Benson <gbenson@redhat.com>
166 * hostio-errno.c (errno_to_fileio_error): Remove function.
167 Update caller to use remote_fileio_to_fio_error.
169 2015-04-09 Yao Qi <yao.qi@linaro.org>
171 * linux-low.c (linux_insert_point): Call
172 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
173 (linux_remove_point): Call remove_memory_breakpoint if type is
175 * linux-x86-low.c (x86_insert_point): Don't call
176 insert_memory_breakpoint.
177 (x86_remove_point): Don't call remove_memory_breakpoint.
179 2015-04-01 Pedro Alves <palves@redhat.com>
180 Cleber Rosa <crosa@redhat.com>
182 * server.c (gdbserver_usage): Reorganize and extend the usage
185 2015-03-24 Pedro Alves <palves@redhat.com>
187 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
188 output. Also dump TRAP_TRACE.
189 (linux_low_filter_event): In debug output, distinguish a
190 resume_stop SIGSTOP from a delayed SIGSTOP.
192 2015-03-24 Gary Benson <gbenson@redhat.com>
194 * linux-x86-low.c (x86_linux_new_thread): Moved to
196 (x86_linux_prepare_to_resume): Likewise.
198 2015-03-24 Gary Benson <gbenson@redhat.com>
200 * Makefile.in (x86-linux-dregs.o): New rule.
201 * configure.srv: Add x86-linux-dregs.o to relevant targets.
202 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
203 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
204 (x86_linux_dr_get): Likewise.
205 (x86_linux_dr_set): Likewise.
206 (update_debug_registers_callback): Likewise.
207 (x86_linux_dr_set_addr): Likewise.
208 (x86_linux_dr_get_addr): Likewise.
209 (x86_linux_dr_set_control): Likewise.
210 (x86_linux_dr_get_control): Likewise.
211 (x86_linux_dr_get_status): Likewise.
212 (x86_linux_update_debug_registers): Likewise.
214 2015-03-24 Gary Benson <gbenson@redhat.com>
216 * linux-x86-low.c (x86_linux_update_debug_registers):
217 New function, factored out from...
218 (x86_linux_prepare_to_resume): ...this.
220 2015-03-24 Gary Benson <gbenson@redhat.com>
222 * linux-x86-low.c (x86_linux_dr_get): Update comments.
223 (x86_linux_dr_set): Likewise.
224 (update_debug_registers_callback): Likewise.
225 (x86_linux_dr_set_addr): Likewise.
226 (x86_linux_dr_get_addr): Likewise.
227 (x86_linux_dr_set_control): Likewise.
228 (x86_linux_dr_get_control): Likewise.
229 (x86_linux_dr_get_status): Likewise.
230 (x86_linux_prepare_to_resume): Likewise.
232 2015-03-24 Gary Benson <gbenson@redhat.com>
234 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
235 Use perror_with_name. Pass string through gettext.
236 (x86_linux_dr_set): Likewise.
238 2015-03-24 Gary Benson <gbenson@redhat.com>
240 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
241 (x86_linux_dr_set_addr): ...this.
242 (x86_dr_low_get_addr): Rename to...
243 (x86_linux_dr_get_addr): ...this.
244 (x86_dr_low_set_control): Rename to...
245 (x86_linux_dr_set_control): ...this.
246 (x86_dr_low_get_control): Rename to...
247 (x86_linux_dr_get_control): ...this.
248 (x86_dr_low_get_status): Rename to...
249 (x86_linux_dr_get_status): ...this.
250 (x86_dr_low): Update with new function names.
252 2015-03-24 Gary Benson <gbenson@redhat.com>
254 * Makefile.in (x86-linux.o): New rule.
255 * configure.srv: Add x86-linux.o to relevant targets.
256 * linux-low.c (lwp_set_arch_private_info): New function.
257 (lwp_arch_private_info): Likewise.
258 * linux-x86-low.c: Include nat/x86-linux.h.
259 (arch_lwp_info): Removed structure.
260 (update_debug_registers_callback):
261 Use lwp_set_debug_registers_changed.
262 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
263 and lwp_set_debug_registers_changed.
264 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
266 2015-03-24 Gary Benson <gbenson@redhat.com>
268 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
269 * linux-arm-low.c (arm_new_thread): Likewise.
270 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
271 * linux-mips-low.c (mips_linux_new_thread): Likewise.
272 * linux-x86-low.c (x86_linux_new_thread): Likewise.
273 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
275 2015-03-24 Gary Benson <gbenson@redhat.com>
277 * linux-low.c (ptid_of_lwp): New function.
278 (lwp_is_stopped): Likewise.
279 (lwp_stop_reason): Likewise.
280 * linux-x86-low.c (update_debug_registers_callback):
282 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
285 2015-03-24 Gary Benson <gbenson@redhat.com>
287 * linux-low.h (linux_stop_lwp): Remove declaration.
289 2015-03-24 Gary Benson <gbenson@redhat.com>
291 * linux-low.h: Include nat/linux-nat.h.
292 * linux-low.c (iterate_over_lwps_args): New structure.
293 (iterate_over_lwps_filter): New function.
294 (iterate_over_lwps): Likewise.
295 * linux-x86-low.c (update_debug_registers_callback):
296 Update signature to what iterate_over_lwps expects.
297 Remove PID check that iterate_over_lwps now performs.
298 (x86_dr_low_set_addr): Use iterate_over_lwps.
299 (x86_dr_low_set_control): Likewise.
301 2015-03-24 Gary Benson <gbenson@redhat.com>
303 * linux-x86-low.c (x86_debug_reg_state): New function.
304 (x86_linux_prepare_to_resume): Use the above.
306 2015-03-24 Gary Benson <gbenson@redhat.com>
308 * linux-low.c (current_lwp_ptid): New function.
309 * linux-x86-low.c: Include nat/linux-nat.h.
310 (x86_dr_low_get_addr): Use current_lwp_ptid.
311 (x86_dr_low_get_control): Likewise.
312 (x86_dr_low_get_status): Likewise.
314 2015-03-20 Pedro Alves <palves@redhat.com>
316 * tracepoint.c (cmd_qtstatus): Make "str" const.
318 2015-03-20 Pedro Alves <palves@redhat.com>
320 * server.c (handle_general_set): Make "req_str" const.
322 2015-03-19 Pedro Alves <palves@redhat.com>
324 * linux-low.c (linux_resume_one_lwp): Rename to ...
325 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
326 instead call perror_with_name.
327 (check_ptrace_stopped_lwp_gone): New function.
328 (linux_resume_one_lwp): Reimplement as wrapper around
329 linux_resume_one_lwp_throw that swallows errors if the LWP is
332 2015-03-19 Pedro Alves <palves@redhat.com>
334 * linux-low.c (count_events_callback, select_event_lwp_callback):
335 No longer check whether the thread has resume_stop as last resume
338 2015-03-19 Pedro Alves <palves@redhat.com>
340 * linux-low.c (count_events_callback, select_event_lwp_callback):
341 Use the lwp's status_pending_p field, not the thread's.
343 2015-03-19 Pedro Alves <palves@redhat.com>
345 * linux-low.c (select_event_lwp_callback): Update comments to
346 no longer mention SIGTRAP.
348 2015-03-18 Gary Benson <gbenson@redhat.com>
350 * server.c (handle_query): Do not report vFile:fstat as supported.
352 2015-03-11 Gary Benson <gbenson@redhat.com>
354 * hostio.c (sys/types.h): New include.
355 (sys/stat.h): Likewise.
356 (common-remote-fileio.h): Likewise.
357 (handle_fstat): New function.
358 (handle_vFile): Handle vFile:fstat packets.
360 2015-03-11 Gary Benson <gbenson@redhat.com>
362 * configure.ac (AC_CHECK_MEMBERS): Add checks for
363 struct stat.st_blocks and struct stat.st_blksize.
364 * configure: Regenerate.
365 * config.in: Likewise.
366 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
367 (OBS): Add common-remote-fileio.o.
368 (common-remote-fileio.o): New rule.
370 2015-03-09 Pedro Alves <palves@redhat.com>
372 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
373 'struct sockaddr' pointer in 'accept' call.
375 2015-03-09 Pedro Alves <palves@redhat.com>
378 2015-03-07 Pedro Alves <palves@redhat.com>
379 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
380 or <winsock2.h> here. Instead include "gdb_socket.h".
381 (remote_open): Use union gdb_sockaddr_u.
382 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
383 or <winsock2.h> here. Instead include "gdb_socket.h".
384 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
385 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
387 (init_named_socket, gdb_agent_helper_thread): Use union
390 2015-03-07 Pedro Alves <palves@redhat.com>
392 * configure.ac (build_warnings): Move
393 -Wdeclaration-after-statement to the C-specific set.
394 * configure: Regenerate.
396 2015-03-07 Pedro Alves <palves@redhat.com>
398 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
399 or <winsock2.h> here. Instead include "gdb_socket.h".
400 (remote_open): Use union gdb_sockaddr_u.
401 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
402 or <winsock2.h> here. Instead include "gdb_socket.h".
403 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
404 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
406 (init_named_socket, gdb_agent_helper_thread): Use union
409 2015-03-07 Pedro Alves <palves@redhat.com>
411 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
414 2015-03-06 Yao Qi <yao.qi@linaro.org>
416 * linux-aarch64-low.c (aarch64_insert_point): Use
417 show_debug_regs as a boolean.
418 (aarch64_remove_point): Likewise.
420 2015-03-05 Pedro Alves <palves@redhat.com>
422 * lynx-low.c (lynx_target_ops): Install NULL hooks for
423 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
424 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
425 * nto-low.c (nto_target_ops): Likewise.
426 * spu-low.c (spu_target_ops): Likewise.
427 * win32-low.c (win32_target_ops): Likewise.
429 2015-03-04 Pedro Alves <palves@redhat.com>
431 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
432 Decide whether a breakpoint triggered based on the SIGTRAP's
434 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
435 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
436 (linux_low_filter_event): Check for breakpoints before checking
438 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
440 (linux_stopped_by_sw_breakpoint)
441 (linux_supports_stopped_by_sw_breakpoint)
442 (linux_stopped_by_hw_breakpoint)
443 (linux_supports_stopped_by_hw_breakpoint): New functions.
444 (linux_target_ops): Install new target methods.
446 2015-03-04 Pedro Alves <palves@redhat.com>
448 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
449 * server.c (swbreak_feature, hwbreak_feature): New globals.
450 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
451 (captured_main): Clear swbreak_feature and hwbreak_feature.
452 * server.h (swbreak_feature, hwbreak_feature): Declare.
453 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
454 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
455 supports_stopped_by_hw_breakpoint>: New fields.
456 (target_supports_stopped_by_sw_breakpoint)
457 (target_stopped_by_sw_breakpoint)
458 (target_supports_stopped_by_hw_breakpoint)
459 (target_stopped_by_hw_breakpoint): Declare.
461 2015-03-04 Pedro Alves <palves@redhat.com>
463 enum lwp_stop_reason -> enum target_stop_reason
464 * linux-low.c (check_stopped_by_breakpoint): Adjust.
465 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
466 (linux_wait_1, stuck_in_jump_pad_callback)
467 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
468 (linux_stopped_by_watchpoint):
469 * linux-low.h (enum lwp_stop_reason): Delete.
470 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
471 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
473 2015-03-04 Yao Qi <yao.qi@linaro.org>
475 * Makefile.in (SFILES): Add linux-aarch64-low.c.
477 2015-03-03 Gary Benson <gbenson@redhat.com>
479 * hostio.c (handle_vFile): Fix prefix lengths.
481 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
483 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
486 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
488 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
489 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
490 (clean): Add "rm -f" for above C files.
491 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
492 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
493 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
494 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
495 * linux-s390-low.c (HWCAP_S390_VX): New macro.
496 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
497 (init_registers_s390x_vx_linux64)
498 (init_registers_s390x_tevx_linux64)
499 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
500 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
502 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
503 (s390_store_vxrs_high): New functions.
504 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
506 (s390_arch_setup): Add logic for selecting one of the new target
507 descriptions. Activate the new vector regsets if applicable.
508 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
509 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
510 and init_registers_s390x_tevx_linux64.
512 2015-03-01 Pedro Alves <palves@redhat.com>
514 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
517 2015-02-27 Pedro Alves <palves@redhat.com>
519 * linux-x86-low.c (u_debugreg_offset): New function.
520 (x86_linux_dr_get, x86_linux_dr_set): Use it.
522 2015-02-27 Pedro Alves <palves@redhat.com>
524 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
525 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
526 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
527 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
528 (ps_lsetfpregs, ps_getpid)
529 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
530 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
531 (ps_lsetxregs, ps_plog): Declare.
533 2015-02-27 Pedro Alves <palves@redhat.com>
535 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
536 IP_AGENT_EXPORT_FUNC.
537 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
538 IP_AGENT_EXPORT_FUNC.
539 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
540 (IP_AGENT_EXPORT): Delete.
541 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
542 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
543 (gdb_trampoline_buffer_error, collecting, gdb_collect)
544 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
545 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
546 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
547 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
548 (traceframe_read_count, traceframe_write_count)
549 (traceframes_created, trace_state_variables, get_raw_reg)
550 (get_trace_state_variable_value, set_trace_state_variable_value)
551 (ust_loaded, helper_thread_id, cmd_buf): Use
552 IPA_SYM_EXPORTED_NAME.
553 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
554 (tracepoints) Use IP_AGENT_EXPORT_VAR.
555 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
556 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
557 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
558 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
559 EXTERN_C_PUSH/EXTERN_C_POP.
560 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
561 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
562 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
563 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
564 (traceframe_write_count, traceframe_read_count)
565 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
566 (about_to_request_buffer_space, get_trace_state_variable_value)
567 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
568 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
569 EXTERN_C_PUSH/EXTERN_C_POP.
570 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
571 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
572 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
573 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
574 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
575 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
576 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
577 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
579 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
580 (IP_AGENT_EXPORT_VAR_DECL): Define.
582 (gdb_agent_get_raw_reg): Declare.
584 2015-02-27 Tom Tromey <tromey@redhat.com>
585 Pedro Alves <palves@redhat.com>
587 Rename symbols whose names are reserved C++ keywords throughout.
589 2015-02-27 Pedro Alves <palves@redhat.com>
591 * Makefile.in (COMPILER): New, get it from autoconf.
592 (CXX): Get from autoconf instead.
593 (COMPILE.pre): Use COMPILER.
594 (CC-LD): Rename to ...
595 (CC_LD): ... this. Use COMPILER.
596 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
597 (CXX_FOR_TARGET): Default to g++ instead of gcc.
598 * acinclude.m4: Include build-with-cxx.m4.
599 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
600 Disable -Werror by default if building in C++ mode.
601 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
602 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
603 the C++ compiler. Save/restore CXXFLAGS too.
604 * configure: Regenerate.
606 2015-02-27 Pedro Alves <palves@redhat.com>
608 * acinclude.m4: Include libiberty.m4.
609 * configure.ac: Call libiberty_INIT.
610 * config.in, configure: Regenerate.
612 2015-02-26 Pedro Alves <palves@redhat.com>
614 * linux-low.c (linux_wait_1): When incrementing the PC past a
615 program breakpoint always use the_low_target.breakpoint_len as
616 increment, rather than the maximum between that and
617 the_low_target.decr_pc_after_break.
619 2015-02-23 Pedro Alves <palves@redhat.com>
621 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
622 thread was doing a step-over; always adjust the PC if
623 we stepped over a permanent breakpoint.
624 (linux_wait_1): If we stepped over breakpoint that was on top of a
625 permanent breakpoint, manually advance the PC past it.
627 2015-02-23 Pedro Alves <palves@redhat.com>
629 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
631 (x86_fill_gregset, x86_store_gregset): Use it when handling
634 2015-02-20 Pedro Alves <palves@redhat.com>
636 * thread-db.c: Include "nat/linux-procfs.h".
637 (thread_db_init): Skip listing new threads if the kernel supports
638 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
640 2015-02-20 Pedro Alves <palves@redhat.com>
642 * linux-low.c (status_pending_p_callback): Use ptid_match.
644 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
647 * linux-low.c (wstatus_maybe_breakpoint): Remove.
648 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
649 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
651 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
654 * tracepoint.c (cmd_qtinit): Add check for current_thread.
656 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
658 * linux-low.c (linux_low_btrace_conf): Print size.
659 * server.c (handle_btrace_conf_general_set): New.
660 (hanle_general_set): Call handle_btrace_conf_general_set.
661 (handle_query): Report Qbtrace-conf:bts:size as supported.
663 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
665 * linux-low.c (linux_low_enable_btrace): Update parameters.
666 (linux_low_btrace_conf): New.
667 (linux_target_ops)<to_btrace_conf>: Initialize.
668 * server.c (current_btrace_conf): New.
669 (handle_btrace_enable): Rename to ...
670 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
671 to target_enable_btrace. Update comment. Update users.
672 (handle_qxfer_btrace_conf): New.
673 (qxfer_packets): Add btrace-conf entry.
674 (handle_query): Report qXfer:btrace-conf:read as supported packet.
675 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
676 (target_ops)<read_btrace_conf>: New.
677 (target_enable_btrace): Update parameters.
678 (target_read_btrace_conf): New.
680 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
682 * server.c (handle_btrace_general_set): Remove call to
683 target_supports_btrace.
684 (supported_btrace_packets): New.
685 (handle_query): Call supported_btrace_packets.
686 * target.h: include btrace-common.h.
687 (btrace_target_info): Removed.
688 (supports_btrace, target_supports_btrace): Update parameters.
690 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
692 * Makefile.in (SFILES): Add common/btrace-common.c.
693 (OBS): Add common/btrace-common.o.
694 (btrace-common.o): Add build rules.
695 * linux-low: Include btrace-common.h.
696 (linux_low_read_btrace): Use struct btrace_data. Call
697 btrace_data_init and btrace_data_fini.
699 2015-02-06 Pedro Alves <palves@redhat.com>
701 * thread-db.c (find_new_threads_callback): Add debug output.
703 2015-02-04 Pedro Alves <palves@redhat.com>
705 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
706 (resume_stopped_resumed_lwps): New function.
707 (linux_wait_for_event_filtered): Use it.
709 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
711 * Makefile.in (SFILES): Add linux-personality.c.
712 (linux-personality.o): New rule.
713 * configure.srv (srv_linux_obj): Add linux-personality.o to the
714 list of objects to be built.
715 * linux-low.c: Include nat/linux-personality.h.
716 (linux_create_inferior): Remove code to disable address space
717 randomization (moved to ../nat/linux-personality.c). Create
718 cleanup to disable address space randomization.
720 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
722 * Makefile.in (posix-strerror.o): New rule.
723 (mingw-strerror.o): Likewise.
724 * configure: Regenerated.
725 * configure.ac: Source file ../common/common.host. Initialize new
726 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
728 2015-01-14 Yao Qi <yao@codesourcery.com>
730 * Makefile.in (SFILES): Add nat/ppc-linux.c.
731 (ppc-linux.o): New rule.
732 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
733 * configure.ac: AC_CHECK_FUNCS(getauxval).
734 * config.in: Re-generated.
735 * configure: Re-generated.
736 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
737 ppc64_64bit_inferior_p
739 2015-01-14 Yao Qi <yao@codesourcery.com>
741 * linux-ppc-low.c: Include "nat/ppc-linux.h".
742 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
743 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
744 (PT_ORIG_R3, PT_TRAP): Likewise.
745 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
746 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
747 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
749 2015-01-10 Joel Brobecker <brobecker@adacore.com>
751 * i387-fp.c (i387_cache_to_xsave): In look over
752 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
753 zmmh_low_space field by use of zmmh_high_space.
755 2015-01-09 Pedro Alves <palves@redhat.com>
757 * linux-low.c (step_over_bkpt): Move higher up in the file.
758 (handle_extended_wait): Don't store the stop_pc here.
759 (get_stop_pc): Adjust comments and rename to ...
760 (check_stopped_by_breakpoint): ... this. Record whether the LWP
761 stopped for a software breakpoint or hardware breakpoint.
762 (thread_still_has_status_pending_p): New function.
763 (status_pending_p_callback): Use
764 thread_still_has_status_pending_p. If the event is no longer
765 interesting, resume the LWP.
766 (handle_tracepoints): Add assert.
767 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
768 (wstatus_maybe_breakpoint): New function.
769 (cancel_breakpoint): Delete function.
770 (check_stopped_by_watchpoint): New function, factored out from
771 linux_low_filter_event.
772 (lp_status_maybe_breakpoint): Delete function.
773 (linux_low_filter_event): Remove filter_ptid argument.
774 Leave thread group exits pending here. Store the LWP's stop PC.
775 Always leave events pending.
776 (linux_wait_for_event_filtered): Pull all events out of the
777 kernel, and leave them all pending.
778 (count_events_callback, select_event_lwp_callback): Consider all
780 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
781 (select_event_lwp): Only give preference to the stepping LWP in
782 all-stop mode. Adjust comments.
783 (ignore_event): New function.
784 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
785 references to cancel_breakpoints. Adjust to renames. Also give
786 equal priority to all LWPs that have had events in non-stop mode.
787 If reporting a software breakpoint event, unadjust the LWP's PC.
788 (linux_wait): If linux_wait_1 returned an ignored event, retry.
789 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
791 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
792 (resume_status_pending_p): Use thread_still_has_status_pending_p.
793 (linux_stopped_by_watchpoint): Adjust.
794 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
795 * linux-low.h (enum lwp_stop_reason): New.
796 (struct lwp_info) <stop_pc>: Adjust comment.
797 <stopped_by_watchpoint>: Delete field.
798 <stop_reason>: New field.
799 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
800 * mem-break.c (software_breakpoint_inserted_here)
801 (hardware_breakpoint_inserted_here): New function.
802 * mem-break.h (software_breakpoint_inserted_here)
803 (hardware_breakpoint_inserted_here): Declare.
804 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
805 (cancel_breakpoints): Delete.
806 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
807 (upload_fast_traceframes): Remove references to
810 2015-01-09 Pedro Alves <palves@redhat.com>
812 * thread-db.c (find_new_threads_callback): Ignore thread if the
813 kernel thread ID is -1.
815 2015-01-09 Pedro Alves <palves@redhat.com>
817 * linux-low.c (linux_attach_fail_reason_string): Move to
818 nat/linux-ptrace.c, and rename.
819 (linux_attach_lwp): Update comment.
820 (attach_proc_task_lwp_callback): New function.
821 (linux_attach): Adjust to rename and use
822 linux_proc_attach_tgid_threads.
823 (linux_attach_fail_reason_string): Delete declaration.
825 2015-01-01 Joel Brobecker <brobecker@adacore.com>
827 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
828 * server.c (gdbserver_version): Likewise.
830 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
832 * remote-utils.c: Include ctype.h.
833 (input_interrupt): Explicitly handle the case when the char
834 received is the NUL byte. Improve the printing of non-ASCII
837 2014-12-16 Joel Brobecker <brobecker@adacore.com>
839 * linux-low.c (linux_low_filter_event): Update call to
840 linux_enable_event_reporting following the addition of
841 a new parameter to that function.
843 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
846 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
847 (AARCH64_FPCR_REGNO): Likewise.
848 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
849 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
850 (aarch64_store_fpregset): Likewise.
852 2014-12-15 Joel Brobecker <brobecker@adacore.com>
854 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
855 Remove FIXME comment about assumption about N.
857 2014-12-13 Joel Brobecker <brobecker@adacore.com>
859 * configure.ac: If large-file support is disabled in GDBserver,
860 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
861 * configure: Regenerate.
863 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
865 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
866 warning upon ENODATA from ptrace.
867 * linux-s390-low.c (s390_store_tdb): New.
868 (s390_regsets): Add regset for NT_S390_TDB.
870 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
872 * linux-low.c (regsets_store_inferior_registers): Skip regsets
873 without a fill_function.
874 * linux-s390-low.c (s390_fill_last_break): Remove.
875 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
876 (s390_arch_setup): Use regset's size instead of fill_function for
879 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
881 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
882 the regset's store function when ptrace returned an error.
883 * regcache.c (get_thread_regcache): Invalidate register cache
884 before fetching inferior's registers.
886 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
888 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
889 while-loop as for-loop.
890 (regsets_store_inferior_registers): Likewise.
892 2014-11-28 Yao Qi <yao@codesourcery.com>
894 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
895 * config.in, configure: Re-generate.
896 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
899 2014-11-21 Yao Qi <yao@codesourcery.com>
901 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
902 (AC_CHECK_HEADERS): Remove malloc.h.
903 * configure: Re-generated.
904 * config.in: Re-generated.
905 * server.h: Don't include alloca.h and malloc.h.
906 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
907 Don't include malloc.h.
909 2014-11-17 Joel Brobecker <brobecker@adacore.com>
911 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
912 corresponding ERRNO check in same block.
914 2014-11-12 Pedro Alves <palves@redhat.com>
916 * server.c (cont_thread): Update comment.
917 (start_inferior, attach_inferior): No longer clear cont_thread.
918 (handle_v_cont): No longer set cont_thread.
919 (captured_main): Clear cont_thread each time a GDB connects.
921 2014-11-12 Pedro Alves <palves@redhat.com>
923 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
924 thread, and don't resume all threads if the Hc thread has exited.
926 2014-11-12 Pedro Alves <palves@redhat.com>
928 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
929 the process group instead of to a specific LWP.
931 2014-10-15 Pedro Alves <palves@redhat.com>
934 * win32-arm-low.c (arm_set_thread_context): Remove current_event
936 (arm_set_thread_context): Delete.
937 (the_low_target): Adjust.
938 * win32-i386-low.c (debug_registers_changed)
939 (debug_registers_used): Delete.
940 (update_debug_registers_callback): New function.
941 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
942 needing to update their debug registers.
943 (win32_get_current_dr): New function.
944 (x86_dr_low_get_addr, x86_dr_low_get_control)
945 (x86_dr_low_get_status): Fetch the debug register from the thread
947 (i386_initial_stuff): Adjust.
948 (i386_get_thread_context): Remove current_event parameter. Don't
949 clear debug_registers_changed nor copy DR values to
951 (i386_set_thread_context): Delete.
952 (i386_prepare_to_resume): New function.
953 (i386_thread_added): Mark the thread as needing to update irs
955 (the_low_target): Remove i386_set_thread_context and install
956 i386_prepare_to_resume.
957 * win32-low.c (win32_get_thread_context): Adjust.
958 (win32_set_thread_context): Use SetThreadContext
960 (win32_prepare_to_resume): New function.
961 (win32_require_context): New function, factored out from ...
962 (thread_rec): ... this.
963 (continue_one_thread): Call win32_prepare_to_resume on each thread
964 we're about to continue.
965 (win32_resume): Call win32_prepare_to_resume on the event thread.
966 * win32-low.h (struct win32_thread_info)
967 <debug_registers_changed>: New field.
968 (struct win32_target_ops): Change prototype of set_thread_context,
969 delete set_thread_context and add prepare_to_resume.
970 (win32_require_context): New declaration.
972 2014-10-08 Gary Benson <gbenson@redhat.com>
974 * server.h: Do not include common-exceptions.h.
976 2014-10-08 Gary Benson <gbenson@redhat.com>
978 * server.h: Do not include cleanups.h.
980 2014-09-30 James Hogan <james.hogan@imgtec.com>
982 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
985 2014-09-23 Yao Qi <yao@codesourcery.com>
987 * linux-low.c (lp_status_maybe_breakpoint): New function.
988 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
989 (count_events_callback): Likewise.
990 (select_event_lwp_callback): Likewise.
991 (cancel_breakpoints_callback): Likewise.
993 2014-09-19 Don Breazeal <donb@codesourcery.com>
995 * linux-low.c (handle_extended_wait): Call
996 linux_ptrace_get_extended_event.
997 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
998 linux_is_extended_waitstatus.
1000 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1002 * Makefile.in (CPPFLAGS): Define.
1003 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1004 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1006 2014-09-16 Gary Benson <gbenson@redhat.com>
1008 * inferiors.h (current_inferior): Renamed as...
1009 (current_thread): New variable. All uses updated.
1010 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1011 (maybe_move_out_of_jump_pad): Likewise.
1012 (cancel_breakpoint): Likewise.
1013 (linux_low_filter_event): Likewise.
1014 (wait_for_sigstop): Likewise.
1015 (linux_resume_one_lwp): Likewise.
1016 (need_step_over_p): Likewise.
1017 (start_step_over): Likewise.
1018 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1019 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1020 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1021 and save_inferior as saved_thread.
1022 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1024 (regcache_invalidate_thread): Likewise.
1025 * remote-utils.c (prepare_resume_reply): Likewise.
1026 * thread-db.c (thread_db_get_tls_address): Likewise.
1027 (disable_thread_event_reporting): Likewise.
1028 (remove_thread_event_breakpoints): Likewise.
1029 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1031 * target.h (set_desired_inferior): Renamed as...
1032 (set_desired_thread): New declaration. All uses updated.
1033 * server.c (myresume): Updated comment to reference thread instead
1035 (handle_serial_event): Likewise.
1036 (handle_target_event): Likewise.
1038 2014-09-12 Tom Tromey <tromey@redhat.com>
1039 Gary Benson <gbenson@redhat.com>
1041 * regcache.h: Include common-regcache.h.
1042 (regcache_read_pc): Don't declare.
1043 * regcache.c (get_thread_regcache_for_ptid): New function.
1045 2014-09-11 Tom Tromey <tromey@redhat.com>
1046 Gary Benson <gbenson@redhat.com>
1048 * symbol.c: New file.
1049 * Makefile.in (SFILES): Add symbol.c.
1050 (OBS): Add symbol.o.
1052 2014-09-11 Gary Benson <gbenson@redhat.com>
1054 * target.c (target_stop_ptid, target_continue_ptid): New
1057 2014-09-11 Tom Tromey <tromey@redhat.com>
1058 Gary Benson <gbenson@redhat.com>
1060 * target.h: Include target/target.h.
1061 * target.c (target_read_memory, target_read_uint32)
1062 (target_write_memory): New functions.
1064 2014-09-11 Gary Benson <gbenson@redhat.com>
1066 * server.h (debug_hw_points): Don't declare.
1067 * server.c (debug_hw_points): Don't define. Replace all uses
1068 with show_debug_regs.
1069 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1070 all uses with show_debug_regs.
1072 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1074 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1075 endianness into account.
1076 (ppc_supply_ptrace_register): Likewise.
1078 2014-09-03 James Hogan <james.hogan@imgtec.com>
1080 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1081 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1083 2014-09-03 Gary Benson <gbenson@redhat.com>
1085 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1086 ALL_DEBUG_ADDRESS_REGISTERS.
1088 2014-09-02 Gary Benson <gbenson@redhat.com>
1090 * i386-low.h: Renamed as...
1091 * x86-low.h: New file. All type, function and variable name
1092 prefixes changed from "i386_" to "x86_". All references updated.
1093 * i386-low.c: Renamed as...
1094 * x86-low.c: New file. All type, function and variable name
1095 prefixes changed from "i386_" to "x86_". All references updated.
1097 2014-09-02 Gary Benson <gbenson@redhat.com>
1099 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1100 (x86_linux_new_thread): Likewise.
1102 2014-08-29 Gary Benson <gbenson@redhat.com>
1104 * server.h (setjmp.h): Do not include.
1105 (toplevel): Do not declare.
1106 (common-exceptions.h): Include.
1107 (cleanups.h): Likewise.
1108 * server.c (toplevel): Do not define.
1109 (exit_code): New static global.
1110 (detach_or_kill_for_exit_cleanup): New function.
1111 (main): New function. Original main renamed to...
1112 (captured_main): New function.
1113 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1115 2014-08-29 Gary Benson <gbenson@redhat.com>
1117 * Makefile.in (SFILES): Add common/common-exceptions.c.
1118 (OBS): Add common-exceptions.o.
1119 (common-exceptions.o): New rule.
1120 * utils.c (prepare_to_throw_exception): New function.
1122 2014-08-29 Gary Benson <gbenson@redhat.com>
1124 * config.in: Regenerate.
1125 * configure: Likewise.
1127 2014-08-29 Gary Benson <gbenson@redhat.com>
1129 * Makefile.in (SFILES): Add common/cleanups.c.
1131 (cleanups.o): New rule.
1133 2014-08-29 Gary Benson <gbenson@redhat.com>
1135 * utils.c (internal_vwarning): New function.
1137 2014-08-28 Gary Benson <gbenson@redhat.com>
1139 * utils.h (fatal): Remove declaration.
1140 * utils.c (fatal): Remove function.
1142 2014-08-28 Gary Benson <gbenson@redhat.com>
1144 * tracepoint.c (gdb_agent_init): Replace fatal with
1146 (initialize_tracepoint): Likewise.
1148 2014-08-28 Gary Benson <gbenson@redhat.com>
1150 * remote-utils.c (remote_prepare): Replace fatal with error.
1152 2014-08-28 Gary Benson <gbenson@redhat.com>
1154 * linux-low.c (linux_async): Replace fatal with warning.
1156 (linux_start_non_stop): Return -1 if linux_async failed.
1158 2014-08-28 Gary Benson <gbenson@redhat.com>
1160 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1162 (i386_dr_low_get_addr): Remove vague comment.
1163 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1166 2014-08-28 Gary Benson <gbenson@redhat.com>
1168 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1169 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1171 (linux_resume_one_lwp): Likewise.
1172 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1174 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1175 with internal_error.
1176 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1177 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1178 (find_register_by_name): Replace fatal with internal_error.
1179 (find_regno): Likewise.
1180 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1181 * thread-db.c (thread_db_create_event): Likewise.
1182 (thread_db_load_search): Likewise.
1183 (try_thread_db_load_1): Likewise.
1184 * tracepoint.c (get_jump_space_head): Replace fatal with
1186 (claim_trampoline_space): Likewise.
1187 (have_fast_tracepoint_trampoline_buffer): Likewise.
1188 (cmd_qtstart): Likewise.
1189 (stop_tracing): Likewise.
1190 (fast_tracepoint_collecting): Likewise.
1191 (target_malloc): Likewise.
1192 (download_tracepoint): Likewise.
1193 (download_trace_state_variables): Replace check with gdb_assert.
1194 (upload_fast_traceframes): Replace fatal with internal_error.
1196 2014-08-19 Tom Tromey <tromey@redhat.com>
1197 Gary Benson <gbenson@redhat.com>
1199 * Makefile.in (SFILES): Add common/common-debug.c.
1200 (OBS): Add common-debug.o.
1201 (common-debug.o): New rule.
1202 * debug.h (debug_printf): Don't declare.
1203 * debug.c (debug_printf): Renamed and rewritten as...
1204 (debug_vprintf): New function.
1206 2014-08-19 Gary Benson <gbenson@redhat.com>
1208 * utils.h: Do not include print-utils.h.
1210 2014-08-19 Tom Tromey <tromey@redhat.com>
1211 Gary Benson <gbenson@redhat.com>
1213 * server.h: Add static assertion.
1214 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1216 2014-08-19 Tom Tromey <tromey@redhat.com>
1217 Gary Benson <gbenson@redhat.com>
1219 * Makefile.in (SFILES): Add common/errors.c.
1220 (OBS): Add errors.o.
1221 (IPA_OBS): Add errors-ipa.o.
1222 (errors.o): New rule.
1223 (errors-ipa.o): Likewise.
1224 * utils.h (perror_with_name, error, warning): Don't declare.
1225 * utils.c (warning): Renamed and rewritten as...
1226 (vwarning): New function.
1227 (error): Renamed and rewritten as...
1228 (verror): New function.
1229 (internal_error): Renamed and rewritten as...
1230 (internal_verror): New function.
1232 2014-08-07 Gary Benson <gbenson@redhat.com>
1234 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1235 * configure: Regenerate.
1236 * config.in: Likewise.
1237 * server.h: Do not include errno.h.
1238 * event-loop.c: Likewise.
1239 * hostio-errno.c: Likewise.
1240 * linux-low.c: Likewise.
1241 * remote-utils.c: Likewise.
1242 * spu-low.c: Likewise.
1243 * utils.c: Likewise.
1244 * gdbreplay.c: Unconditionally include errno.h.
1246 2014-08-07 Gary Benson <gbenson@redhat.com>
1248 * server.h: Do not include string.h.
1249 * event-loop.c: Likewise.
1250 * linux-low.c: Likewise.
1251 * regcache.c: Likewise.
1252 * remote-utils.c: Likewise.
1253 * spu-low.c: Likewise.
1254 * utils.c: Likewise.
1256 2014-08-07 Gary Benson <gbenson@redhat.com>
1258 * server.h: Do not include gdb_assert.h.
1260 2014-08-07 Gary Benson <gbenson@redhat.com>
1262 * server.h: Do not include common-utils.h.
1264 2014-08-07 Gary Benson <gbenson@redhat.com>
1266 * server.h: Do not include ptid.h.
1267 * notif.h: Likewise.
1269 2014-08-07 Gary Benson <gbenson@redhat.com>
1271 * server.h: Do not include gdb_locale.h.
1273 2014-08-07 Gary Benson <gbenson@redhat.com>
1275 * server.h: Do not include gdb/signals.h.
1276 * win32-low.c: Likewise.
1278 2014-08-07 Gary Benson <gbenson@redhat.com>
1280 * server.h: Do not include pathmax.h.
1282 2014-08-07 Gary Benson <gbenson@redhat.com>
1284 * server.h: Do not include libiberty.h.
1285 * linux-bfin-low.c: Likewise.
1287 2014-08-07 Gary Benson <gbenson@redhat.com>
1289 * server.h: Do not include ansidecl.h.
1291 2014-08-07 Gary Benson <gbenson@redhat.com>
1293 * linux-x86-low.c: Do not include stddef.h.
1294 * lynx-ppc-low.c: Likewise.
1295 * tracepoint.c: Likewise.
1297 2014-08-07 Gary Benson <gbenson@redhat.com>
1299 * server.h: Do not include stdarg.h.
1300 * nto-low.c: Likewise.
1302 2014-08-07 Gary Benson <gbenson@redhat.com>
1304 * server.h: Do not include stdlib.h.
1305 * inferiors.c: Likewise.
1306 * linux-low.c: Likewise.
1307 * regcache.c: Likewise.
1308 * spu-low.c: Likewise.
1309 * tracepoint.c: Likewise.
1310 * utils.c: Likewise.
1312 2014-08-07 Gary Benson <gbenson@redhat.com>
1314 * server.h: Do not include stdio.h.
1315 * linux-low.c: Likewise.
1316 * remote-utils.c: Likewise.
1317 * spu-low.c: Likewise.
1318 * utils.c: Likewise.
1319 * wincecompat.c: Likewise.
1321 2014-08-06 Gary Benson <gbenson@redhat.com>
1323 * regcache.c (init_register_cache): Move conditionals inside if.
1325 2014-08-06 Gary Benson <gbenson@redhat.com>
1327 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1329 2014-07-31 Gary Benson <gbenson@redhat.com>
1331 * ax.h: Do not include server.h.
1332 * gdbthread.h: Likewise.
1333 * lynx-low.h: Likewise.
1334 * notif.h: Likewise.
1336 2014-07-30 Gary Benson <gbenson@redhat.com>
1338 * server.h: Include common-defs.h.
1339 Do not include config.h or build-gnulib-gdbserver/config.h.
1341 2014-07-30 Gary Benson <gbenson@redhat.com>
1343 * hostio-errno.c: Move server.h to top of includes list.
1344 * inferiors.c: Likewise.
1345 * linux-x86-low.c: Likewise.
1346 * notif.c: Include server.h.
1348 2014-07-24 Tom Tromey <tromey@redhat.com>
1349 Gary Benson <gbenson@redhat.com>
1351 * server.h (CORE_ADDR): Now unsigned.
1353 2014-07-16 Pedro Alves <palves@redhat.com>
1355 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1357 2014-07-15 Pedro Alves <palves@redhat.com>
1359 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1362 2014-07-11 Pedro Alves <palves@redhat.com>
1364 * linux-low.c (kill_wait_lwp): New function, based on
1365 kill_one_lwp_callback, but use my_waitpid directly.
1366 (kill_one_lwp_callback, linux_kill): Use it.
1368 2014-06-23 Pedro Alves <palves@redhat.com>
1370 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1371 before setting DR0..DR3.
1373 2014-06-20 Gary Benson <gbenson@redhat.com>
1375 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1376 * configure: Regenerated.
1377 * config.in: Likewise.
1379 2014-06-20 Gary Benson <gbenson@redhat.com>
1381 * Makefile.in (SFILES): Update locations for files moved
1383 (object file files): Reordered.
1385 2014-06-20 Gary Benson <gbenson@redhat.com>
1387 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1388 (i386_dr_low_set_addr): Likewise.
1389 (i386_dr_low_get_addr): Likewise.
1390 (i386_dr_low_can_set_control): Likewise.
1391 (i386_dr_low_set_control): Likewise.
1392 (i386_dr_low_get_control): Likewise.
1393 (i386_dr_low_get_status): Likewise.
1394 (i386_get_debug_register_length): Likewise.
1395 * linux-x86-low.c (i386_dr_low_set_addr):
1396 Changed signature. Made static.
1397 (i386_dr_low_get_addr): Likewise.
1398 (i386_dr_low_set_control): Likewise.
1399 (i386_dr_low_get_control): Likewise.
1400 (i386_dr_low_get_status): Likewise.
1401 (i386_dr_low): New global variable.
1402 * win32-i386-low.c (i386_dr_low_set_addr):
1403 Changed signature. Made static.
1404 (i386_dr_low_get_addr): Likewise.
1405 (i386_dr_low_set_control): Likewise.
1406 (i386_dr_low_get_control): Likewise.
1407 (i386_dr_low_get_status): Likewise.
1408 (i386_dr_low): New global variable.
1410 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1412 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1413 * Makefile.in (AR, AR_FLAGS): Define.
1414 * configure: Regenerate.
1416 2014-06-19 Gary Benson <gbenson@redhat.com>
1418 * Makefile.in (i386-dregs.o): New rule.
1419 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1420 * i386-low.c (target.h): Remove include.
1421 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1422 (DR_CONTROL_SHIFT): Likewise.
1423 (DR_CONTROL_SIZE): Likewise.
1424 (DR_RW_EXECUTE): Likewise.
1425 (DR_RW_WRITE): Likewise.
1426 (DR_RW_READ): Likewise.
1427 (DR_RW_IORW): Likewise.
1428 (DR_LEN_1): Likewise.
1429 (DR_LEN_2): Likewise.
1430 (DR_LEN_4): Likewise.
1431 (DR_LEN_8): Likewise.
1432 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1433 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1434 (DR_ENABLE_SIZE): Likewise.
1435 (DR_LOCAL_SLOWDOWN): Likewise.
1436 (DR_GLOBAL_SLOWDOWN): Likewise.
1437 (DR_CONTROL_RESERVED): Likewise.
1438 (I386_DR_CONTROL_MASK): Likewise.
1439 (I386_DR_VACANT): Likewise.
1440 (I386_DR_LOCAL_ENABLE): Likewise.
1441 (I386_DR_GLOBAL_ENABLE): Likewise.
1442 (I386_DR_DISABLE): Likewise.
1443 (I386_DR_SET_RW_LEN): Likewise.
1444 (I386_DR_GET_RW_LEN): Likewise.
1445 (I386_DR_WATCH_HIT): Likewise.
1446 (i386_wp_op_t): Likewise.
1447 (i386_show_dr): Likewise.
1448 (i386_length_and_rw_bits): Likewise.
1449 (i386_insert_aligned_watchpoint): Likewise.
1450 (i386_remove_aligned_watchpoint): Likewise.
1451 (i386_handle_nonaligned_watchpoint): Likewise.
1452 i386_update_inferior_debug_regs(): Likewise.
1453 (i386_dr_insert_watchpoint): Likewise.
1454 (i386_dr_remove_watchpoint): Likewise.
1455 (i386_dr_region_ok_for_watchpoint): Likewise.
1456 (i386_dr_stopped_data_address): Likewise.
1457 (i386_dr_stopped_by_watchpoint): Likewise.
1459 2014-06-19 Gary Benson <gbenson@redhat.com>
1461 * i386-low.c (i386_dr_show): Renamed to
1462 i386_show_dr and made static. All uses updated.
1463 (i386_dr_length_and_rw_bits): Renamed to
1464 i386_length_and_rw_bits and made static.
1466 (i386_dr_insert_aligned_watchpoint): Renamed to
1467 i386_insert_aligned_watchpoint and made static.
1469 (i386_dr_remove_aligned_watchpoint): Renamed to
1470 i386_remove_aligned_watchpoint and made static.
1472 (i386_dr_update_inferior_debug_regs): Renamed to
1473 i386_update_inferior_debug_regs and made static.
1476 2014-06-18 Gary Benson <gbenson@redhat.com>
1478 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1479 (i386_dr_low_can_set_control): Likewise.
1480 (i386_get_debug_register_length): Likewise.
1481 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1482 (i386_dr_low_can_set_control): Likewise.
1483 (i386_get_debug_register_length): Likewise.
1485 2014-06-17 Gary Benson <gbenson@redhat.com>
1487 * i386-low.h (i386-dregs.h): New include.
1488 (DR_FIRSTADDR): Now in i386-dregs.h.
1489 (DR_LASTADDR): Likewise.
1490 (DR_NADDR): Likewise.
1491 (DR_STATUS): Likewise.
1492 (DR_CONTROL): Likewise.
1493 (i386_debug_reg_state): Likewise.
1494 (i386_dr_insert_watchpoint): Likewise.
1495 (i386_dr_remove_watchpoint): Likewise.
1496 (i386_dr_region_ok_for_watchpoint): Likewise.
1497 (i386_dr_stopped_data_address): Likewise.
1498 (i386_dr_stopped_by_watchpoint): Likewise.
1499 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1501 2014-06-18 Gary Benson <gbenson@redhat.com>
1503 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1504 i386_dr_insert_watchpoint.
1505 (i386_low_remove_watchpoint): Renamed to
1506 i386_dr_remove_watchpoint.
1507 (i386_low_region_ok_for_watchpoint): Renamed to
1508 i386_dr_region_ok_for_watchpoint.
1509 (i386_low_stopped_data_address): Renamed to
1510 i386_dr_stopped_data_address.
1511 (i386_low_stopped_by_watchpoint): Renamed to
1512 i386_dr_stopped_by_watchpoint.
1513 * i386-low.c (i386_show_dr): Renamed to
1514 i386_dr_show and made nonstatic. All uses updated.
1515 (i386_length_and_rw_bits): Renamed to
1516 i386_dr_length_and_rw_bits and made nonstatic.
1518 (i386_insert_aligned_watchpoint): Renamed to
1519 i386_dr_insert_aligned_watchpoint and made nonstatic.
1521 (i386_remove_aligned_watchpoint): Renamed to
1522 i386_dr_remove_aligned_watchpoint and made nonstatic.
1524 (i386_update_inferior_debug_regs): Renamed to
1525 i386_dr_update_inferior_debug_regs and made nonstatic.
1527 (i386_low_insert_watchpoint): Renamed to
1528 i386_dr_insert_watchpoint. All uses updated.
1529 (i386_low_remove_watchpoint): Renamed to
1530 i386_dr_remove_watchpoint. All uses updated.
1531 (i386_low_region_ok_for_watchpoint): Renamed to
1532 i386_dr_region_ok_for_watchpoint. All uses updated.
1533 (i386_low_stopped_data_address): Renamed to
1534 i386_dr_stopped_data_address. All uses updated.
1535 (i386_low_stopped_by_watchpoint): Renamed to
1536 i386_dr_stopped_by_watchpoint. All uses updated.
1538 2014-06-18 Gary Benson <gbenson@redhat.com>
1540 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1541 (i386_dr_low_can_set_control): Likewise.
1542 (i386_insert_aligned_watchpoint): New check.
1544 2014-06-18 Gary Benson <gbenson@redhat.com>
1546 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1549 2014-06-18 Gary Benson <gbenson@redhat.com>
1551 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1552 instead of fatal and error.
1553 (i386_handle_nonaligned_watchpoint): Likewise.
1555 2014-06-18 Gary Benson <gbenson@redhat.com>
1557 * i386-low.c (i386_get_debug_register_length): New macro.
1558 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1559 (i386_show_dr): Use debug_printf instead of fprintf. Use
1560 phex to format values.
1562 2014-06-18 Gary Benson <gbenson@redhat.com>
1564 * i386-low.h: Comment changes.
1565 * i386-low.c: Likewise.
1567 2014-06-18 Gary Benson <gbenson@redhat.com>
1569 * i386-low.c: Whitespace changes.
1571 2014-06-12 Tom Tromey <tromey@redhat.com>
1573 * utils.c (freeargv): Remove.
1575 2014-06-12 Tom Tromey <tromey@redhat.com>
1577 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1578 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1579 (parse_debug_format_options): Likewise.
1580 (gdbserver_usage): Likewise.
1581 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1582 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1583 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1585 ($(LIBGNU)): Depend on libiberty.
1586 (all-lib): Recurse into all subdirs.
1587 (install-only): Invoke "install" target in subdirs.
1588 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1590 * configure: Rebuild.
1591 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1592 for vasprintf, vsnprintf, or gettimeofday.
1593 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1596 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1598 * development.sh: Delete.
1599 * Makefile.in (config.status): Adjust dependency on development.sh.
1600 * configure.ac: Adjust development.sh source call.
1601 * configure: Regenerate.
1603 2014-06-02 Pedro Alves <palves@redhat.com>
1605 * ax.c (gdb_free_agent_expr): New function.
1606 * ax.h (gdb_free_agent_expr): New declaration.
1607 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1609 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1611 (clear_breakpoint_conditions_and_commands): New function.
1612 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1613 (clear_breakpoint_conditions_and_commands): New declaration.
1615 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1617 * linux-aarch64-low.c (asm/ptrace.h): Include.
1619 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1621 Fix TLS access for -static -pthread.
1622 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1623 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1624 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1626 2014-05-20 Pedro Alves <palves@redhat.com>
1628 * linux-aarch64-low.c (aarch64_insert_point)
1629 (aarch64_remove_point): No longer check whether the type is
1630 supported here. Adjust to new interface.
1631 (the_low_target): Install aarch64_supports_z_point_type as
1632 supports_z_point_type method.
1633 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1634 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1635 instead of a Z packet char. Adjust.
1636 (arm_supports_z_point_type): New function.
1637 (arm_insert_point, arm_remove_point): Adjust to new interface.
1638 (the_low_target): Install arm_supports_z_point_type.
1639 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1640 (cris_insert_point, cris_remove_point): Adjust to new interface.
1641 Don't check whether the type is supported here.
1642 (the_low_target): Install cris_supports_z_point_type.
1643 * linux-low.c (linux_supports_z_point_type): New function.
1644 (linux_insert_point, linux_remove_point): Adjust to new interface.
1645 * linux-low.h (struct linux_target_ops) <insert_point,
1646 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1647 raw_breakpoint pointer parameter.
1648 <supports_z_point_type>: New method.
1649 * linux-mips-low.c (mips_supports_z_point_type): New function.
1650 (mips_insert_point, mips_remove_point): Adjust to new interface.
1651 Use mips_supports_z_point_type.
1652 (the_low_target): Install mips_supports_z_point_type.
1653 * linux-ppc-low.c (the_low_target): Install NULL as
1654 supports_z_point_type method.
1655 * linux-s390-low.c (the_low_target): Install NULL as
1656 supports_z_point_type method.
1657 * linux-sparc-low.c (the_low_target): Install NULL as
1658 supports_z_point_type method.
1659 * linux-x86-low.c (x86_supports_z_point_type): New function.
1660 (x86_insert_point): Adjust to new insert_point interface. Use
1661 insert_memory_breakpoint. Adjust to new
1662 i386_low_insert_watchpoint interface.
1663 (x86_remove_point): Adjust to remove_point interface. Use
1664 remove_memory_breakpoint. Adjust to new
1665 i386_low_remove_watchpoint interface.
1666 (the_low_target): Install x86_supports_z_point_type.
1667 * lynx-low.c (lynx_target_ops): Install NULL as
1668 supports_z_point_type callback.
1669 * nto-low.c (nto_supports_z_point_type): New.
1670 (nto_insert_point, nto_remove_point): Adjust to new interface.
1671 (nto_target_ops): Install nto_supports_z_point_type.
1672 * mem-break.c: Adjust intro comment.
1673 (struct raw_breakpoint) <raw_type, size>: New fields.
1674 <inserted>: Update comment.
1675 <shlib_disabled>: Delete field.
1676 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1677 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1678 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1679 (raw_bkpt_type_to_target_hw_bp_type): New function.
1680 (find_enabled_raw_code_breakpoint_at): New function.
1681 (find_raw_breakpoint_at): New type and size parameters. Use them.
1682 (insert_memory_breakpoint): New function, based off
1683 set_raw_breakpoint_at.
1684 (remove_memory_breakpoint): New function.
1685 (set_raw_breakpoint_at): Reimplement.
1686 (set_breakpoint): New, based on set_breakpoint_at.
1687 (set_breakpoint_at): Reimplement.
1688 (delete_raw_breakpoint): Go through the_target->remove_point
1689 instead of assuming memory breakpoints.
1690 (find_gdb_breakpoint_at): Delete.
1691 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1692 (find_gdb_breakpoint): New function.
1693 (set_gdb_breakpoint_at): Delete.
1694 (z_type_supported): New function.
1695 (set_gdb_breakpoint_1): New function, loosely based off
1696 set_gdb_breakpoint_at.
1697 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1698 (delete_gdb_breakpoint_at): Delete.
1699 (delete_gdb_breakpoint_1): New function, loosely based off
1700 delete_gdb_breakpoint_at.
1701 (delete_gdb_breakpoint): New function.
1702 (clear_gdb_breakpoint_conditions): Rename to ...
1703 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1705 (add_condition_to_breakpoint): Make static.
1706 (add_breakpoint_condition): Take a struct breakpoint pointer
1707 instead of an address. Adjust.
1708 (gdb_condition_true_at_breakpoint): Rename to ...
1709 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1711 (gdb_condition_true_at_breakpoint): Reimplement.
1712 (add_breakpoint_commands): Take a struct breakpoint pointer
1713 instead of an address. Adjust.
1714 (gdb_no_commands_at_breakpoint): Rename to ...
1715 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1716 parameter. Return true if no breakpoint was found. Change debug
1718 (gdb_no_commands_at_breakpoint): Reimplement.
1719 (run_breakpoint_commands): Rename to ...
1720 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1721 and change return type to boolean.
1722 (run_breakpoint_commands): New function.
1723 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1724 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1725 breakpoint. Go through the_target->remove_point instead of
1726 assuming memory breakpoint.
1727 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1728 software and hardware breakpoints.
1729 (reinsert_raw_breakpoint): Go through the_target->insert_point
1730 instead of assuming memory breakpoint.
1731 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1732 software and hardware breakpoints.
1733 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1734 Check both software and hardware breakpoints.
1735 (validate_inserted_breakpoint): Assert the breakpoint is a
1736 software breakpoint. Set the inserted flag to -1 instead of
1737 setting shlib_disabled.
1738 (delete_disabled_breakpoints): Adjust.
1739 (validate_breakpoints): Only validate software breakpoints.
1740 Adjust to inserted flag change.
1741 (check_mem_read, check_mem_write): Skip breakpoint types other
1742 than software breakpoints. Adjust to inserted flag change.
1743 * mem-break.h (enum raw_bkpt_type): New enum.
1744 (raw_breakpoint, struct process_info): Forward declare.
1745 (Z_packet_to_target_hw_bp_type): Delete declaration.
1746 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1747 (set_gdb_breakpoint, delete_gdb_breakpoint)
1748 (clear_breakpoint_conditions): New declarations.
1749 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1750 (breakpoint_inserted_here): Update comment.
1751 (add_breakpoint_condition, add_breakpoint_commands): Replace
1752 address parameter with a breakpoint pointer parameter.
1753 (gdb_breakpoint_here): Update comment.
1754 (delete_gdb_breakpoint_at): Delete.
1755 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1756 * server.c (process_point_options): Take a struct breakpoint
1757 pointer instead of an address. Adjust.
1758 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1759 delete_gdb_breakpoint.
1760 * spu-low.c (spu_target_ops): Install NULL as
1761 supports_z_point_type method.
1762 * target.h: Include mem-break.h.
1763 (struct target_ops) <prepare_to_access_memory>: Update comment.
1764 <supports_z_point_type>: New field.
1765 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1766 instead of a char. Also take a raw breakpoint pointer.
1767 * win32-arm-low.c (the_low_target): Install NULL as
1768 supports_z_point_type.
1769 * win32-i386-low.c (i386_supports_z_point_type): New function.
1770 (i386_insert_point, i386_remove_point): Adjust to new interface.
1771 (the_low_target): Install i386_supports_z_point_type.
1772 * win32-low.c (win32_supports_z_point_type): New function.
1773 (win32_insert_point, win32_remove_point): Adjust to new interface.
1774 (win32_target_ops): Install win32_supports_z_point_type.
1775 * win32-low.h (struct win32_target_ops):
1776 <supports_z_point_type>: New method.
1777 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1778 instead of a char. Also take a raw breakpoint pointer.
1780 2014-05-20 Pedro Alves <palves@redhat.com>
1782 * mem-break.h: Include break-common.h.
1783 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1784 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1785 (Z_packet_to_target_hw_bp_type): New declaration.
1786 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1787 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1788 (Z_PACKET_ACCESS_WP): Delete macros.
1789 (Z_packet_to_hw_type): Delete function.
1790 * i386-low.h: Don't include break-common.h here.
1791 (Z_packet_to_hw_type): Delete declaration.
1792 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1793 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1794 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1795 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1796 * linux-aarch64-low.c: Don't include break-common.h here.
1797 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1798 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1799 (Z_packet_to_target_hw_bp_type): Delete function.
1800 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1802 (mips_insert_point, mips_remove_point): Use
1803 Z_packet_to_target_hw_bp_type.
1805 2014-05-20 Pedro Alves <palves@redhat.com>
1807 * linux-aarch64-low.c: Include break-common.h.
1808 (enum target_point_type): Delete.
1809 (Z_packet_to_point_type): Rename to ...
1810 (Z_packet_to_target_hw_bp_type): ... this, and return a
1811 target_hw_bp_type instead.
1812 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1813 instead of an enum target_point_type.
1814 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1816 (aarch64_dr_state_insert_one_point)
1817 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1818 (aarch64_handle_aligned_watchpoint)
1819 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1820 Take an enum target_hw_bp_type instead of an enum
1822 (aarch64_supports_z_point_type): New function.
1823 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1824 use Z_packet_to_target_hw_bp_type.
1826 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1828 * configure.ac: Only use -Werror by default when DEVELOPMENT
1830 * configure: Regenerate.
1832 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1834 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1835 * linux-x86-low.c (X86_64_USER_REGS): New.
1836 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1838 2014-04-28 Yao Qi <yao@codesourcery.com>
1840 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1843 2014-04-25 Pedro Alves <palves@redhat.com>
1846 * linux-low.c (linux_attach_fail_reason_string): New function.
1847 (linux_attach_lwp): Delete.
1848 (linux_attach_lwp_1): Rename to ...
1849 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1850 argument. Remove "initial" parameter. Return int instead of
1851 void. Don't error or warn here.
1852 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1853 failure to attach to the tgid. Call warning when failing to
1855 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1856 argument. Remove "initial" parameter. Return int instead of
1857 void. Don't error or warn here.
1858 (linux_attach_fail_reason_string): New declaration.
1859 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1860 interface change. Use linux_attach_fail_reason_string.
1862 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1863 Walfred Tedeschi <walfred.tedeschi@intel.com>
1865 * Makefile.in: Added rules to handle new files
1866 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1867 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1868 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1869 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1870 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1871 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1873 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1874 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1875 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1876 i386/x32-avx512.xml.
1877 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1878 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1879 i386/x32-avx512-linux.xml.
1880 * i387-fp.c (num_avx512_k_registers): New constant for number
1882 (num_avx512_zmmh_low_registers): New constant for number of
1883 lower ZMM registers (0-15).
1884 (num_avx512_zmmh_high_registers): New constant for number of
1885 higher ZMM registers (16-31).
1886 (num_avx512_ymmh_registers): New contant for number of higher
1887 YMM registers (ymm16-31 added by avx521 on x86_64).
1888 (num_avx512_xmm_registers): New constant for number of higher
1889 XMM registers (xmm16-31 added by AVX512 on x86_64).
1890 (struct i387_xsave): Add space for AVX512 registers.
1891 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1892 Add code to handle AVX512 registers.
1893 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1894 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1895 prototypei from generated file.
1896 (tdesc_amd64_avx512_linux): Likewise.
1897 (init_registers_x32_avx512_linux): Likewise.
1898 (tdesc_x32_avx512_linux): Likewise.
1899 (init_registers_i386_avx512_linux): Likewise.
1900 (tdesc_i386_avx512_linux): Likewise.
1901 (x86_64_regmap): Add AVX512 registers.
1902 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1904 (initialize_low_arch): Add code to initialize AVX512 registers.
1906 2014-04-23 Pedro Alves <palves@redhat.com>
1908 * mem-break.c (find_gdb_breakpoint_at): Make static.
1909 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1911 2014-04-23 Pedro Alves <palves@redhat.com>
1913 * i386-low.c: Don't include break-common.h here.
1914 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1915 prototype to take target_hw_bp_type as argument instead of a Z
1917 * i386-low.h: Include break-common.h here.
1918 (Z_packet_to_hw_type): Declare.
1919 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1921 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1922 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1923 (x86_remove_point): Convert the packet number to a
1924 target_hw_bp_type before calling i386_low_remove_watchpoint.
1925 * win32-i386-low.c (i386_insert_point): Convert the packet number
1926 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1927 (i386_remove_point): Convert the packet number to a
1928 target_hw_bp_type before calling i386_low_remove_watchpoint.
1930 2014-04-23 Pedro Alves <palves@redhat.com>
1932 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1934 2014-04-10 Pedro Alves <palves@redhat.com>
1936 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1937 Check if the condition or command is NULL before checking if the
1938 breakpoint is known. On success, return true.
1939 * mem-break.h (add_breakpoint_condition): Document return.
1940 (add_breakpoint_commands): Add describing comment.
1941 * server.c (skip_to_semicolon): New function.
1942 (process_point_options): Use it.
1944 2014-04-09 Pedro Alves <palves@redhat.com>
1946 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1949 2014-02-27 Pedro Alves <palves@redhat.com>
1952 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1954 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1956 (last_thread_of_process_p): Take a PID argument instead of a
1958 (linux_wait_for_lwp): Delete.
1959 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1961 (linux_low_filter_event): New function, party factored out from
1962 linux_wait_for_event.
1963 (linux_wait_for_event): Rename to ...
1964 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1965 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1966 sigsuspend. Check for zombie leaders.
1967 (linux_wait_for_event): Reimplement as wrapper around
1968 linux_wait_for_event_filtered.
1969 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1970 a normal or signal exit is seen, it's the whole process exiting.
1971 (wait_for_sigstop): No longer a for_each_inferior callback.
1972 Rewrite on top of linux_wait_for_event_filtered.
1973 (stop_all_lwps): Call wait_for_sigstop directly.
1974 * server.c (resume, handle_target_event): Handle
1975 TARGET_WAITKIND_NO_RESUMED.
1977 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1979 * win32-low.c (psapi_get_dll_name,
1980 * win32_CreateToolhelp32Snapshot): Delete.
1981 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1982 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1984 (handle_load_dll): Add function description.
1985 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1987 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1989 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1991 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1992 base address when calling win32_add_one_solib.
1993 (handle_load_dll): Delete local variable load_addr.
1994 Remove 0x1000 offset applied to DLL base address when calling
1995 win32_add_one_solib.
1996 (handle_unload_dll): Add comment.
1998 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2000 * win32-low.c (win32_add_all_dlls): Renames
2001 win32_ensure_ntdll_loaded. Rewrite function documentation.
2002 Adjust implementation to always load all DLLs.
2003 Add 0x1000 offset to DLL base address when calling
2004 win32_add_one_solib.
2005 (child_initialization_done): New static global.
2006 (do_initial_child_stuff): Set child_initialization_done to
2007 zero during child initialization, and 1 after. Replace call
2008 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2010 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2011 (handle_unload_dll): Add function documentation.
2012 (get_child_debug_event): Ignore load and unload DLL events
2013 during child initialization.
2015 2014-02-20 Doug Evans <dje@google.com>
2017 Remove global all_lwps.
2018 * inferiors.h (ptid_of): Move here from linux-low.h.
2019 (pid_of, lwpid_of): Ditto.
2020 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2021 parameter is a struct thread_info * now.
2022 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2023 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2024 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2026 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2027 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2028 * linux-arm-low.c (update_registers_callback): Update, "entry"
2029 parameter is a struct thread_info * now.
2030 Fetch lwpid from current_inferior directly.
2031 (arm_insert_point): Pass &all_threads to find_inferior instead of
2033 (arm_remove_point): Ditto.
2034 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2035 (arm_prepare_to_resume): Fetch pid from thread.
2036 (arm_read_description): Fetch lwpid from current_inferior directly.
2037 * linux-low.c (all_lwps): Delete.
2038 (delete_lwp): Delete call to remove_inferior.
2039 (handle_extended_wait): Fetch lwpid from thread.
2040 (add_lwp): Don't set lwp->entry.id. Remove call to
2041 add_inferior_to_list.
2042 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2043 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2044 (kill_one_lwp_callback): Ditto.
2045 (linux_kill): Don't dereference NULL pointer.
2046 Fetch ptid,lwpid from thread.
2047 (get_detach_signal): Fetch ptid from thread.
2048 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2049 Simplify call to regcache_invalidate_thread.
2050 (delete_lwp_callback): Update, "entry" parameter is a
2051 struct thread_info * now. Fetch pid from thread.
2052 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2053 (status_pending_p_callback): Update, "entry" parameter is a
2054 struct thread_info * now. Fetch ptid from thread.
2055 (find_lwp_pid): Update, "entry" parameter is a
2056 struct thread_info * now.
2057 (linux_wait_for_lwp): Fetch pid from thread.
2058 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2059 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2060 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2061 (dequeue_one_deferred_signal): Ditto.
2062 (cancel_breakpoint): Fetch ptid from current_inferior.
2063 (linux_wait_for_event): Pass &all_threads to find_inferior,
2064 not &all_lwps. Fetch ptid, lwpid from thread.
2065 (count_events_callback): Update, "entry" parameter is a
2066 struct thread_info * now.
2067 (select_singlestep_lwp_callback): Ditto.
2068 (select_event_lwp_callback): Ditto.
2069 (cancel_breakpoints_callback): Ditto.
2070 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2072 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2073 (unsuspend_one_lwp): Update, "entry" parameter is a
2074 struct thread_info * now.
2075 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2077 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2078 Fetch lwpid from thread, not lwp.
2079 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2080 Pass &all_threads to find_inferior, not &all_lwps.
2081 (send_sigstop): Fetch lwpid from thread, not lwp.
2082 (send_sigstop_callback): Update, "entry" parameter is a
2083 struct thread_info * now.
2084 (suspend_and_send_sigstop_callback): Ditto.
2085 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2086 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2087 struct thread_info * now.
2088 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2090 (lwp_running): Update, "entry" parameter is a
2091 struct thread_info * now.
2092 (stop_all_lwps): Fetch ptid from thread.
2093 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2094 (linux_resume_one_lwp): Fetch lwpid from thread.
2095 (linux_set_resume_request): Update, "entry" parameter is a
2096 struct thread_info * now. Fetch pid, lwpid from thread.
2097 (resume_status_pending_p): Update, "entry" parameter is a
2098 struct thread_info * now.
2099 (need_step_over_p): Ditto. Fetch lwpid from thread.
2100 (start_step_over): Fetch lwpid from thread.
2101 (linux_resume_one_thread): Update, "entry" parameter is a
2102 struct thread_info * now. Fetch lwpid from thread.
2103 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2104 (proceed_one_lwp): Update, "entry" parameter is a
2105 struct thread_info * now. Fetch lwpid from thread.
2106 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2107 struct thread_info * now.
2108 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2109 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2110 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2112 (regsets_store_inferior_registers): Ditto.
2113 (fetch_register, store_register): Ditto.
2114 (linux_read_memory, linux_write_memory): Ditto.
2115 (linux_request_interrupt): Ditto.
2116 (linux_read_auxv): Ditto.
2117 (linux_xfer_siginfo): Ditto.
2118 (linux_qxfer_spu): Ditto.
2119 (linux_qxfer_libraries_svr4): Ditto.
2120 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2121 moved to inferiors.h.
2123 (get_thread_lwp): Update.
2124 (struct lwp_info): Delete member "entry". Simplify comment for
2127 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2128 current_inferior directly.
2129 (update_watch_registers_callback): Update, "entry" parameter is a
2130 struct thread_info * now. Fetch pid from thread.
2131 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2132 (mips_insert_point): Fetch lwpid from current_inferior.
2133 Pass &all_threads to find_inferior, not &all_lwps.
2134 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2135 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2137 (mips_stopped_data_address): Ditto.
2138 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2140 * linux-tile-low.c (tile_arch_setup): Ditto.
2141 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2142 (update_debug_registers_callback): Update, "entry" parameter is a
2143 struct thread_info * now. Fetch pid from thread.
2144 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2145 Pass &all_threads to find_inferior, not &all_lwps.
2146 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2147 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2148 Pass &all_threads to find_inferior, not &all_lwps.
2149 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2150 (i386_dr_low_get_status): Ditto.
2151 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2152 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2153 (x86_linux_read_description): Ditto.
2154 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2156 2014-02-20 Doug Evans <dje@google.com>
2158 * inferiors.c (get_first_inferior): Fix buglet.
2160 2014-02-19 Doug Evans <dje@google.com>
2162 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2163 * inferiors.c (add_thread): Change result type to struct thread_info *.
2164 All callers updated.
2165 (add_lwp): Call add_thread here instead of in callers.
2166 All callers updated.
2167 * linux-low.h (get_lwp_thread): Rewrite.
2168 (struct lwp_info): New member "thread".
2170 2014-02-19 Doug Evans <dje@google.com>
2172 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2173 All callers updated.
2175 2014-02-19 Doug Evans <dje@google.com>
2177 * inferiors.c (add_thread): Fix whitespace.
2179 2014-02-19 Doug Evans <dje@google.com>
2181 * dll.c (clear_dlls): Replace accessing list implemention details
2183 * gdbthread.h (get_first_thread): Declare.
2184 * inferiors.c (for_each_inferior_with_data): New function.
2185 (get_first_thread): New function.
2186 (find_thread_ptid): Simplify.
2187 (get_first_inferior): New function.
2188 (clear_list): Delete.
2189 (one_inferior_p): New function.
2190 (clear_inferior_list): New function.
2191 (clear_inferiors): Update.
2192 * inferiors.h (for_each_inferior_with_data): Declare.
2193 (clear_inferior_list): Declare.
2194 (one_inferior_p): Declare.
2195 (get_first_inferior): Declare.
2196 * linux-low.c (linux_wait_for_event): Replace accessing list
2197 implemention details with API function.
2198 * server.c (target_running): Ditto.
2199 (accumulate_file_name_length): New function.
2200 (emit_dll_description): New function.
2201 (handle_qxfer_libraries): Replace accessing list implemention
2202 details with API function.
2203 (handle_qxfer_threads_worker): New function.
2204 (handle_qxfer_threads_proper): Replace accessing list implemention
2205 details with API function.
2206 (handle_query): Ditto.
2207 (visit_actioned_threads_callback_ftype): New typedef.
2208 (visit_actioned_threads_data): New struct.
2209 (visit_actioned_threads): Rewrite to be find_inferior callback.
2210 (resume): Call find_inferior.
2211 (handle_status): Replace accessing list implemention
2212 details with API function.
2213 (process_serial_event): Replace accessing list implemention details
2215 * target.c (set_desired_inferior): Replace accessing list implemention
2216 details with API function.
2217 * tracepoint.c (same_process_p): New function.
2218 (gdb_agent_about_to_close): Replace accessing list implemention
2219 details with API function.
2220 * win32-low.c (child_delete_thread): Replace accessing list
2221 implemention details with API function.
2222 (match_dll_by_basename): New function.
2223 (dll_is_loaded_by_basename): New function.
2224 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2225 details call to dll_is_loaded_by_basename.
2227 2014-02-19 Doug Evans <dje@google.com>
2229 * dll.h (struct dll_info): Add comment.
2230 * gdbthread.h (struct thread_info): Add comment.
2231 (current_ptid): Simplify.
2232 * inferiors.c (add_process): Update.
2233 (remove_process): Update.
2234 * inferiors.h (struct process_info): Rename member "head" to "entry".
2235 * linux-low.c (delete_lwp): Update.
2237 (last_thread_of_process_p): Update.
2238 (kill_one_lwp_callback, linux_kill): Update.
2239 (status_pending_p_callback): Update.
2240 (wait_for_sigstop): Update. Simplify read of ptid.
2241 (start_step_over): Update.
2242 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2243 (get_lwp_thread): Update.
2244 (struct lwp_info): Rename member "head" to "entry".
2245 * regcache.h (inferior_list_entry): Delete.
2246 * server.c (kill_inferior_callback): Update.
2247 (detach_or_kill_inferior_callback): Update.
2248 (print_started_pid): Update.
2249 (print_attached_pid): Update.
2250 (process_serial_event): Simplify read of ptid.
2251 * thread-db.c (thread_db_create_event): Update.
2252 (thread_db_get_tls_address): Update.
2253 * win32-low.c (current_inferior_ptid): Simplify.
2255 2014-02-19 Tom Tromey <tromey@redhat.com>
2257 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2259 (target_supports_btrace): Update.
2261 2014-02-14 Yao Qi <yao@codesourcery.com>
2263 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2264 (rsp-low-ipa.o): New target.
2266 2014-02-12 Tom Tromey <tromey@redhat.com>
2268 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2269 convert_ascii_to_int.
2270 * regcache.c (registers_to_string): Likewise.
2271 * remote-utils.c (decode_M_packet): Likewise.
2272 * server.c (process_serial_event): Likewise.
2274 2014-02-12 Tom Tromey <tromey@redhat.com>
2276 * server.c (handle_query, handle_v_run): Use hex2bin, not
2278 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2280 2014-02-12 Tom Tromey <tromey@redhat.com>
2282 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2283 convert_int_to_ascii.
2284 * regcache.c (registers_to_string, collect_register_as_string):
2286 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2288 * server.c (process_serial_event): Likewise.
2289 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2290 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2292 2014-02-12 Tom Tromey <tromey@redhat.com>
2294 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2295 bin2hex, not hexify.
2296 * tracepoint.c (cmd_qtstatus): Likewise.
2298 2014-02-12 Tom Tromey <tromey@redhat.com>
2300 * remote-utils.c (monitor_output): Pass explicit length to
2303 2014-02-12 Tom Tromey <tromey@redhat.com>
2305 * tracepoint.c: Include rsp-low.h.
2306 * server.c: Include rsp-low.h.
2307 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2308 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2310 * remote-utils.c: Include rsp-low.h.
2311 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2312 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2313 (convert_int_to_ascii, convert_ascii_to_int): Move to
2315 * regcache.c: Include rsp-low.h.
2316 * ax.c: Include rsp-low.h.
2317 * Makefile.in (SFILES): Add common/rsp-low.c.
2318 (OBS): Add rsp-low.o.
2319 (rsp-low.o): New target.
2321 2014-02-12 Tom Tromey <tromey@redhat.com>
2323 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2324 Include print-utils.h.
2325 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2326 (plongest, thirty_two, phex_nz): Remove.
2327 * Makefile.in (SFILES): Add common/print-utils.c.
2328 (OBS): Add print-utils.o.
2329 (print-utils-ipa.o): New target.
2330 (print-utils.o): New target.
2331 (IPA_OBJS): Add print-utils-ipa.o.
2333 2014-02-06 Tom Tromey <tromey@redhat.com>
2335 * Makefile.in (SFILES): Fix indentation.
2337 2014-02-05 Doug Evans <dje@google.com>
2339 * linux-low.c (linux_wait_for_event): Improve comment.
2340 (linux_wait_1): Keep current_inferior in sync with event_child.
2342 2014-01-22 Doug Evans <dje@google.com>
2344 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2346 2014-01-22 Doug Evans <dje@google.com>
2348 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2349 * configure: Regenerate.
2350 * config.in: Regenerate.
2351 * Makefile.in (SFILES): Add debug.c.
2353 * debug.c: New file.
2354 * debug.h: New file.
2355 * linux-aarch64-low.c (*): Update all debugging printfs to use
2356 debug_printf instead of fprintf.
2357 * linux-arm-low.c (*): Ditto.
2358 * linux-cris-low.c (*): Ditto.
2359 * linux-crisv32-low.c (*): Ditto.
2360 * linux-m32r-low.c (*): Ditto.
2361 * linux-sparc-low.c (*): Ditto.
2362 * linux-x86.c (*): Ditto.
2363 * linux-low.c (*): Ditto.
2364 (linux_wait_1): Add calls to debug_enter, debug_exit.
2365 (linux_wait): Remove redundant debugging printf.
2366 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2367 (linux_resume, unstop_all_lwps): Ditto.
2368 * mem-break.c (*): Update all debugging printfs to use
2369 debug_printf instead of fprintf.
2370 * remote-utils.c (*): Ditto.
2371 * thread-db.c (*): Ditto.
2372 * server.c #include <ctype.h>, "gdb_vecs.h".
2373 (debug_threads): Moved to debug.c.
2374 (*): Update all debugging printfs to use debug_printf instead of
2376 (start_inferior): Replace call to fflush with call to debug_flush.
2377 (monitor_show_help): Mention set debug-format.
2378 (parse_debug_format_options): New function.
2379 (handle_monitor_command): Handle "monitor set debug-format".
2380 (gdbserver_usage): Mention --debug-format.
2381 (main): Parse --debug-format.
2382 * server.h (debug_threads): Declaration moved to debug.h.
2384 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2385 trace_debug_1 that uses debug_printf.
2386 (tracepoint_look_up_symbols): Update all debugging printfs to use
2387 debug_printf instead of fprintf.
2389 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2391 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2394 2014-01-17 Pedro Alves <palves@redhat.com>
2397 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2398 defined after including gdb_proc_service.h.
2400 2014-01-16 Doug Evans <dje@google.com>
2402 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2403 (match_dll): Use it.
2405 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2407 * target.h (target_ops) <read_btrace>: Change parameters and
2408 return type to allow error reporting.
2409 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2410 trace reading errors on.
2411 * linux-low.c (linux_low_read_btrace): Pass trace reading
2413 (linux_low_disable_btrace): New.
2415 2014-01-15 Doug Evans <dje@google.com>
2417 * inferiors.c (thread_id_to_gdb_id): Delete.
2418 * inferiors.h (thread_id_to_gdb_id): Delete.
2420 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2422 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2423 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2426 2014-01-08 Pedro Alves <palves@redhat.com>
2428 * server.c (handle_status): Don't discard previous queued stop
2429 replies or thread's pending status here.
2430 (main) <disconnection>: Do it here instead.
2432 2014-01-08 Pedro Alves <palves@redhat.com>
2434 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2435 * server.c (visit_actioned_threads, handle_pending_status): New
2437 (handle_v_cont): Factor out parts to ...
2438 (resume): ... this new function. If in all-stop, and a thread
2439 being resumed has a pending status, report it without actually
2441 (myresume): Adjust to use the new 'resume' function.
2442 (clear_pending_status_callback, set_pending_status_callback)
2443 (find_status_pending_thread_callback): New functions.
2444 (handle_status): Handle the case of multiple threads having
2445 interesting statuses to report. Report threads' real last signal
2446 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2447 with an interesting thread to report the status for, instead of
2448 always reporting the status of the first thread.
2450 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2452 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2453 * gdbreplay.c (gdbreplay_version): Likewise.
2455 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2457 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2458 iov.iov_len with the real length in use.
2460 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2462 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2463 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2464 for all targets that use win32-low.c.
2465 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2466 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2468 2013-12-13 Pedro Alves <palves@redhat.com>
2470 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2471 if equal to TARGET_WAITKIND_LOADED.
2472 * win32-low.c (cached_status): New static global.
2473 (win32_wait): Add declaration.
2474 (do_initial_child_stuff): Flush all initial pending debug events
2475 up to the initial breakpoint.
2476 (win32_wait): If CACHED_STATUS was set, return that instead
2477 of doing a real wait. Remove the code resuming the execution
2478 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2479 during the initial phase. Also remove the code changing
2480 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2481 TARGET_WAITKIND_STOPPED.
2483 2013-12-11 Yao Qi <yao@codesourcery.com>
2485 * notif.c (handle_notif_ack): Return 0 if no notification
2488 2013-11-20 Doug Evans <dje@google.com>
2490 * linux-low.c (linux_set_resume_request): Fix comment.
2492 2013-11-20 Doug Evans <dje@google.com>
2494 * linux-low.c (resume_status_pending_p): Tweak comment.
2496 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2498 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2499 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2500 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2501 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2502 (srv_amd64_regobj): Add amd64-mpx.o.
2503 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2504 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2505 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2506 * i387-fp.c (num_pl_bnd_register) Added constant.
2507 (num_pl_bnd_cfg_registers) Added constant.
2508 (struct i387_xsave) Added reserved area and MPX fields.
2509 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2510 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2512 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2513 (init_registers_amd64_mpx_linux): Declare new function.
2514 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2515 (x86_64_regmap): Add MPX registers.
2516 (x86_linux_read_description): Add MPX case.
2517 (initialize_low_arch): Initialize MPX targets.
2519 2013-11-18 Tom Tromey <tromey@redhat.com>
2521 * configure: Rebuild.
2522 * configure.ac: Don't check for stdlib.h.
2523 * gdbreplay.c: Unconditionally include stdlib.h.
2525 2013-11-18 Tom Tromey <tromey@redhat.com>
2527 * config.in: Rebuild.
2528 * configure: Rebuild.
2529 * configure.ac: Don't use AC_HEADER_DIRENT.
2531 2013-11-18 Tom Tromey <tromey@redhat.com>
2533 * server.h: Don't check HAVE_STRING_H.
2534 * gdbreplay.c: Don't check HAVE_STRING_H.
2535 * configure: Rebuild.
2537 2013-11-18 Tom Tromey <tromey@redhat.com>
2539 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2542 2013-11-08 Tom Tromey <tromey@redhat.com>
2544 * configure, config.in: Rebuild.
2545 * configure.ac: Remove unused configury.
2547 2013-11-08 Tom Tromey <tromey@redhat.com>
2549 * acinclude.m4: Include common.m4, codeset.m4.
2550 * configure, config.in: Rebuild.
2551 * configure.ac: Use GDB_AC_COMMON.
2553 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2555 * linux-s390-low.c (HWCAP_S390_TE): New define.
2556 (s390_arch_setup): Consider the TE field in the HWCAP for
2557 determining 'have_regset_tdb'.
2559 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2562 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2565 2013-10-02 Pedro Alves <palves@redhat.com>
2567 * server.c (process_serial_event): Don't output "GDBserver
2568 exiting" if GDB is connected through stdio.
2569 * target.c (mywait): Likewise, be silent if GDB is connected
2572 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2574 * lynx-low.c (lynx_add_threads_after_attach): New function.
2575 (lynx_attach): Remove call to add_thread. Add call to
2576 lynx_add_threads_after_attach instead.
2578 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2580 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2581 * config.in, configure: Regenerated.
2583 2013-09-18 Yao Qi <yao@codesourcery.com>
2586 * server.c (start_inferior): Clear 'resume_info'.
2588 2013-09-16 Jiong Wang <jiwang@tilera.com>
2590 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2593 2013-09-16 Jiong Wang <jiwang@tilera.com>
2595 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2596 linux-tile-low.o to srv_tgtobj.
2598 2013-09-16 Will Newton <will.newton@linaro.org>
2600 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2603 2013-09-06 Pedro Alves <palves@redhat.com>
2605 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2606 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2607 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2608 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2609 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2610 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2612 2013-09-06 Pedro Alves <palves@redhat.com>
2614 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2615 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2617 2013-09-06 Pedro Alves <palves@redhat.com>
2619 * linux-amd64-ipa.c: Include tracepoint.h.
2620 * linux-i386-ipa.c: Include tracepoint.h.
2622 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2624 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2625 (ps_get_thread_area): New function.
2627 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2629 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2630 (initialize_low_arch): Call init_registers_crisv32 rather than
2631 init_register_crisv32.
2633 2013-09-05 Pedro Alves <palves@redhat.com>
2635 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2637 * hostio.h: ... this new file.
2638 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2639 win32-low.c: Include hostio.h.
2641 2013-09-05 Pedro Alves <palves@redhat.com>
2643 * server.h (gdb_client_data, handler_func, callback_handler_func)
2644 (delete_file_handler, add_file_handler, append_callback_event)
2645 (delete_callback_event, start_event_loop, initialize_event_loop):
2646 Move to event-loop.h and include it.
2647 * event-loop.h: New file.
2649 2013-09-05 Pedro Alves <palves@redhat.com>
2651 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2652 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2653 (loaded_dll, unloaded_dll): Move to ...
2654 * dll.h: ... this new file.
2655 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2657 2013-09-05 Pedro Alves <palves@redhat.com>
2659 * server.h (current_process, get_thread_process, all_processes)
2660 (add_inferior_to_list, for_each_inferior, current_inferior)
2661 (remove_inferior, add_process, remove_process, find_process_pid)
2662 (have_started_inferiors_p, have_attached_inferiors_p)
2663 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2664 (clear_inferiors, find_inferior, find_inferior_id)
2665 (inferior_target_data, set_inferior_target_data)
2666 (inferior_regcache_data, set_inferior_regcache_data): Move to
2667 inferiors.h, and include it.
2668 * inferiors.h: New file.
2670 2013-09-05 Pedro Alves <palves@redhat.com>
2672 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2676 2013-09-05 Pedro Alves <palves@redhat.com>
2678 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2680 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2681 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2682 (handle_tracepoint_general_set, handle_tracepoint_query)
2683 (tracepoint_finished_step, tracepoint_was_hit)
2684 (release_while_stepping_state_list, current_traceframe)
2685 (in_readonly_region, traceframe_read_mem)
2686 (fetch_traceframe_registers, traceframe_read_sdata)
2687 (traceframe_read_info, struct fast_tpoint_collect_status)
2688 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2689 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2690 (supply_fast_tracepoint_registers)
2691 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2692 (ipa_tdesc, claim_trampoline_space)
2693 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2694 (agent_mem_read, agent_get_trace_state_variable_value)
2695 (agent_set_trace_state_variable_value, agent_tsv_read)
2696 (agent_mem_read_string, get_raw_reg_func_addr)
2697 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2698 * tracepoint.h: ... this new file.
2700 2013-09-05 Pedro Alves <palves@redhat.com>
2702 * server.h (perror_with_name, error, fatal, warning, paddress)
2703 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2705 * utils.h: New file.
2707 2013-09-05 Pedro Alves <palves@redhat.com>
2709 * server.h (remote_debug, noack_mode, transport_is_reliable)
2710 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2711 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2712 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2713 (write_enn, initialize_async_io, enable_async_io)
2714 (disable_async_io, check_remote_input_interrupt_request)
2715 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2716 (dead_thread_notify, prepare_resume_reply)
2717 (decode_address_to_semicolon, decode_address, decode_m_packet)
2718 (decode_M_packet, decode_X_packet, decode_xfer_write)
2719 (decode_search_memory_packet, unhexify, hexify)
2720 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2721 (look_up_one_symbol, relocate_instruction)
2722 (monitor_output): Move to remote-utils.h, and include it.
2723 * remote-utils.h: New file.
2725 2013-09-05 Pedro Alves <palves@redhat.com>
2727 * server.h (_): Delete.
2729 2013-09-02 Pedro Alves <palves@redhat.com>
2731 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2732 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2734 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2736 2013-09-02 Pierre Muller <muller@sourceware.org>
2738 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2739 or WriteProcessMemory complete successfully and handle
2740 ERROR_PARTIAL_COPY error.
2742 2013-09-02 Pedro Alves <palves@redhat.com>
2744 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2745 error instead of EIO.
2747 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2750 * linux-low.c: Include filestuff.h.
2751 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2752 * lynx-low.c: Include filestuff.h.
2753 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2754 * server.c: Include filestuff.h.
2755 (main): Call notice_open_fds.
2756 * spu-low.c: Include filestuff.h.
2757 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2759 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2761 * Makefile.in: Explain why ../target and ../nat are not
2762 listed as include file search paths.
2763 (linux-waitpid.o): New object file rule.
2764 * configure.srv (srv_native_linux_obj): New variable.
2765 Replace all occurrences of linux native object files with
2766 $srv_native_linux_obj.
2767 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2768 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2769 (linux_enable_event_reporting): Remove declaration.
2770 (my_waitpid): Moved to common/linux-waitpid.c.
2771 (linux_wait_for_event): Pass ptid when calling
2772 linux_enable_event_reporting.
2773 (linux_supports_tracefork_flag): Remove.
2774 (linux_enable_event_reporting): Likewise.
2775 (linux_tracefork_grandchild): Remove.
2776 (STACK_SIZE): Moved to common/linux-ptrace.c.
2777 (linux_tracefork_child): Remove.
2778 (linux_test_for_tracefork): Remove.
2779 (linux_look_up_symbols): Call linux_supports_traceclone.
2780 (initialize_low): Remove call to linux_test_for_tracefork.
2781 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2782 common/linux-ptrace.h.
2783 (PTRACE_TYPE_ARG4): Likewise.
2784 Include linux-ptrace.h.
2786 2013-08-21 Pedro Alves <palves@redhat.com>
2788 * config.in: Renegerate.
2790 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2792 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2793 (SFILES): Remove $(srcdir)/common/target-common.c and
2794 add $(srcdir)/target/waitstatus.c.
2795 (OBS): Remove target-common.o and add waitstatus.o.
2796 (server_h): Remove $(srcdir)/../common/target-common.h and
2797 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2798 and $(srcdir)/../target/waitstatus.h.
2799 (target-common.o): Remove.
2800 (waitstatus.o): New target object file.
2801 * target.h: Do not include target-common.h and
2802 include target/resume.h, target/wait.h and
2803 target/waitstatus.h.
2805 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2807 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2808 to PTRACE_TYPE_ARG3.
2809 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2810 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2812 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2813 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2815 2013-07-27 Jie Zhang <jie@codesourcery.com>
2816 Daniel Jacobowitz <dan@codesourcery.com>
2817 Yao Qi <yao@codesourcery.com>
2819 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2820 (mips-linux-watch.o): New rule.
2821 (mips_linux_watch_h): New variable.
2822 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2824 * linux-mips-low.c: Include mips-linux-watch.h.
2825 (struct arch_process_info, struct arch_lwp_info): New.
2826 (update_watch_registers_callback): New function.
2827 (mips_linux_new_process, mips_linux_new_thread) New functions.
2828 (mips_linux_prepare_to_resume, mips_insert_point): New
2830 (mips_remove_point, mips_stopped_by_watchpoint): New
2832 (rsp_bp_type_to_target_hw_bp_type): New function.
2833 (mips_stopped_data_address): New function.
2834 (the_low_target): Add watchpoint support functions.
2836 2013-07-27 Yao Qi <yao@codesourcery.com>
2838 * i386-low.c: Include break-common.h.
2839 (enum target_hw_bp_type): Remove.
2841 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2843 * Makefile.in (SFILES): /common/target-common.c.
2844 (OBS): Add target-common.o.
2845 (server_h): Add $(srcdir)/../common/target-common.h.
2846 (target-common.o): New target.
2847 * server.c (queue_stop_reply_callback): Free
2848 status string after use.
2849 * target.c (target_waitstatus_to_string): Remove.
2850 * target.h: Include target-common.h.
2851 (resume_kind): Likewise.
2852 (target_waitkind): Likewise.
2853 (target_waitstatus): Likewise.
2854 (TARGET_WNOHANG): Likewise.
2856 2013-07-04 Yao Qi <yao@codesourcery.com>
2858 * Makefile.in (host_alias): Use @host_noncanonical@.
2859 (target_alias): Use @target_noncanonical@.
2860 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2861 ACX_NONCANONICAL_HOST.
2862 * configure: Regenerated.
2865 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2867 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2868 * configure: Rebuild.
2869 * Makefile.in (version_host, version_target): Get from configure.
2870 (version.c): Use $(version_host) and $(version_target).
2872 2013-07-03 Pedro Alves <palves@redhat.com>
2874 * Makefile.in (config.status): Depend on development.sh.
2875 * acinclude.m4: Include libmcheck.m4.
2876 * configure: Regenerate.
2878 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2880 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2881 attribute inside the parentheses.
2882 (winapi_DebugSetProcessKillOnExit): Ditto.
2883 (winapi_DebugBreakProcess): Ditto.
2884 (winapi_GenerateConsoleCtrlEvent): Ditto.
2886 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2888 * notif.h (notif_event): Add a dummy member to avoid compiler
2891 2013-07-01 Pedro Alves <palves@redhat.com>
2893 * hostio.c (HOSTIO_PATH_MAX): Define.
2894 (require_filename, handle_open, handle_unlink, handle_readlink):
2897 2013-07-01 Pedro Alves <palves@redhat.com>
2899 * server.h: Include "pathmax.h".
2900 * linux-low.c: Don't include sys/param.h.
2901 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2903 * win32-low.c: Don't include sys/param.h.
2904 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2906 2013-07-01 Pedro Alves <palves@redhat.com>
2908 * event-loop.c: Don't check HAVE_UNISTD_H before including
2910 * gdbreplay.c: Likewise.
2911 * remote-utils.c: Likewise.
2912 * server.c: Likewise.
2913 * configure.ac: Don't check for unistd.h.
2914 * configure: Regenerate.
2916 2013-06-28 Tom Tromey <tromey@redhat.com>
2918 * Makefile.in (version.c): Use version.in, not
2921 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2923 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2924 * configure: Rebuild.
2925 * Makefile.in (version_host, version_target): Get from configure.
2926 (version.c): Use $(version_host) and $(version_target).
2928 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2930 Fix trace-status to output user name without trailing colon.
2931 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2933 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2935 Fix trace-status to output proper start-time and stop-time.
2936 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2937 output start time and stop time in hex as gdb expects.
2939 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2941 * tracepoint.c (build_traceframe_info_xml): Output trace state
2942 variables present in the trace buffer.
2944 2013-06-24 Tom Tromey <tromey@redhat.com>
2946 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2948 (version.o): Remove.
2949 * gdbreplay.c: Include version.h.
2950 (version, host_name): Don't declare.
2951 * server.h: Include version.h.
2952 (version, host_name): Don't declare.
2954 2013-06-12 Pedro Alves <palves@redhat.com>
2956 * linux-x86-low.c (linux_is_elf64): Delete global.
2957 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2958 with local linux_pid_exe_is_elf_64_file use.
2960 2013-06-11 Pedro Alves <palves@redhat.com>
2962 * linux-low.c (regset_disabled, disable_regset): New functions.
2963 (regsets_fetch_inferior_registers)
2964 (regsets_store_inferior_registers): Use them.
2965 (initialize_regsets_info); Don't allocate the disabled_regsets
2967 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2970 2013-06-11 Pedro Alves <palves@redhat.com>
2972 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2975 2013-06-11 Pedro Alves <palves@redhat.com>
2977 * linux-x86-low.c (initialize_low_arch): Call
2978 init_registers_x32_avx_linux.
2980 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2982 Fix compatibility with Android Bionic.
2983 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2986 2013-06-07 Pedro Alves <palves@redhat.com>
2989 * Makefile.in (OBS): Add tdesc.o.
2990 (IPA_OBJS): Add tdesc-ipa.o.
2991 (tdesc-ipa.o): New rule.
2992 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2994 * linux-low.c (new_inferior): Delete.
2995 (disabled_regsets, num_regsets): Delete.
2996 (linux_add_process): Adjust to set the new per-process
2998 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2999 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3000 was a stop. When calling arch_setup, switch the current inferior
3001 to the thread that got an event.
3002 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3003 (regsets_fetch_inferior_registers)
3004 (regsets_store_inferior_registers): New regsets_info parameter.
3006 (linux_register_in_regsets): New regs_info parameter. Adjust to
3008 (register_addr, fetch_register, store_register): New usrregs_info
3009 parameter. Adjust to use it.
3010 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3011 parameter regs_info. Adjust to use it.
3012 (linux_fetch_registers): Get the current inferior's regs_info, and
3014 (linux_store_registers): Ditto.
3015 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3016 (initialize_low): Don't initialize the target_regsets here. Call
3017 initialize_low_arch.
3018 * linux-low.h (target_regsets): Delete declaration.
3019 (struct regsets_info): New.
3020 (struct usrregs_info): New.
3021 (struct regs_info): New.
3022 (struct process_info_private) <new_inferior>: New field.
3023 (struct linux_target_ops): Delete the num_regs, regmap, and
3024 regset_bitmap fields. New field regs_info.
3025 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3026 * i387-fp.c (num_xmm_registers): Delete.
3027 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3028 calls to new interface.
3029 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3030 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3031 Infer the number of xmm registers from the regcache's target
3033 * i387-fp.h (num_xmm_registers): Delete.
3034 * inferiors.c (add_thread): Don't install the thread's regcache
3036 * proc-service.c (gregset_info): Fetch the current inferior's
3037 regs_info. Adjust to use it.
3038 * regcache.c: Include tdesc.h.
3039 (register_bytes, reg_defs, num_registers)
3040 (gdbserver_expedite_regs): Delete.
3041 (get_thread_regcache): If the thread doesn't have a regcache yet,
3042 create one, instead of aborting gdbserver.
3043 (regcache_invalidate_one): Rename to ...
3044 (regcache_invalidate_thread): ... this.
3045 (regcache_invalidate_one): New.
3046 (regcache_invalidate): Only invalidate registers of the current
3048 (init_register_cache): Add target_desc parameter, and use it.
3049 (new_register_cache): Ditto. Assert the target description has a
3050 non zero registers_size.
3051 (regcache_cpy): Add assertions. Adjust.
3052 (realloc_register_cache, set_register_cache): Delete.
3053 (registers_to_string, registers_from_string): Adjust.
3054 (find_register_by_name, find_regno, find_register_by_number)
3055 (register_cache_size): Add target_desc parameter, and use it.
3056 (free_register_cache_thread, free_register_cache_thread_one)
3057 (regcache_release, register_cache_size): New.
3058 (register_size): Add target_desc parameter, and use it.
3059 (register_data, supply_register, supply_register_zeroed)
3060 (supply_regblock, supply_register_by_name, collect_register)
3061 (collect_register_as_string, collect_register_by_name): Adjust.
3062 * regcache.h (struct target_desc): Forward declare.
3063 (struct regcache) <tdesc>: New field.
3064 (init_register_cache, new_register_cache): Add target_desc
3066 (regcache_invalidate_thread): Declare.
3067 (regcache_invalidate_one): Delete declaration.
3068 (regcache_release): Declare.
3069 (find_register_by_number, register_cache_size, register_size)
3070 (find_regno): Add target_desc parameter.
3071 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3073 * remote-utils.c: Include tdesc.h.
3074 (outreg, prepare_resume_reply): Adjust.
3075 * server.c: Include tdesc.h.
3076 (gdbserver_xmltarget): Delete declaration.
3077 (get_features_xml, process_serial_event): Adjust.
3078 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3080 (struct process_info) <tdesc>: New field.
3081 (ipa_tdesc): Declare.
3082 * tdesc.c: New file.
3083 * tdesc.h: New file.
3084 * tracepoint.c: Include tdesc.h.
3085 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3086 (get_context_regcache): Adjust to pass ipa_tdesc down.
3087 (do_action_at_tracepoint): Adjust to get the register cache size
3088 from the context regcache's description.
3089 (traceframe_walk_blocks): Adjust to get the register cache size
3090 from the current trace frame's description.
3091 (traceframe_get_pc): Adjust to get current trace frame's
3092 description and pass it down.
3093 (gdb_collect): Adjust to get the register cache size from the
3095 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3096 (gdbserver_xmltarget): Delete.
3097 (initialize_low_tracepoint): Set the ipa's target description.
3098 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3099 (initialize_low_tracepoint): Set the ipa's target description.
3100 * linux-x86-low.c: Include tdesc.h.
3101 [__x86_64__] (is_64bit_tdesc): New.
3102 (ps_get_thread_area, x86_get_thread_area): Use it.
3103 (i386_cannot_store_register): Rename to ...
3104 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3105 (i386_cannot_fetch_register): Rename to ...
3106 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3107 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3109 (target_regsets): Rename to ...
3110 (x86_regsets): ... this.
3111 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3113 (x86_siginfo_fixup): Use is_64bit_tdesc.
3114 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3115 (tdesc_x32_avx_linux, tdesc_x32_linux)
3116 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3118 (x86_linux_update_xmltarget): Delete.
3119 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3120 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3121 (AMD64_LINUX_USER64_CS): New.
3122 (x86_linux_read_description): New, based on
3123 x86_linux_update_xmltarget.
3124 (same_process_callback): New.
3125 (x86_arch_setup_process_callback): New.
3126 (x86_linux_update_xmltarget): New.
3127 (x86_regsets_info): New.
3128 (amd64_linux_regs_info): New.
3129 (i386_linux_usrregs_info): New.
3130 (i386_linux_regs_info): New.
3131 (x86_linux_regs_info): New.
3132 (x86_arch_setup): Reimplement.
3133 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3134 (x86_emit_ops): Ditto.
3135 (the_low_target): Adjust. Install x86_linux_regs_info,
3136 x86_cannot_fetch_register, and x86_cannot_store_register.
3137 (initialize_low_arch): New.
3138 * linux-ia64-low.c (tdesc_ia64): Declare.
3139 (ia64_fetch_register): Adjust.
3140 (ia64_usrregs_info, regs_info): New globals.
3141 (ia64_regs_info): New function.
3142 (the_low_target): Adjust.
3143 (initialize_low_arch): New function.
3144 * linux-sparc-low.c (tdesc_sparc64): Declare.
3145 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3147 (sparc_arch_setup): New function.
3148 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3149 (the_low_target): Adjust.
3150 (initialize_low_arch): New function.
3151 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3152 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3153 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3154 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3155 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3156 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3157 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3158 (tdesc_powerpc_isa205_vsx64l): Declare.
3159 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3160 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3161 (ppc_set_pc, ppc_get_hwcap): Adjust.
3162 (ppc_usrregs_info): Forward declare.
3163 (!__powerpc64__) ppc_regmap_adjusted: New global.
3164 (ppc_arch_setup): Adjust to the current process'es target
3166 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3167 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3168 (ppc_store_evrregset): Adjust.
3169 (target_regsets): Rename to ...
3170 (ppc_regsets): ... this, and make static.
3171 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3172 (ppc_regs_info): New function.
3173 (the_low_target): Adjust.
3174 (initialize_low_arch): New function.
3175 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3176 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3177 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3178 (tdesc_s390x_linux64v2): Declare.
3179 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3180 (s390_fill_gregset, s390_store_last_break): Adjust.
3181 (target_regsets): Rename to ...
3182 (s390_regsets): ... this, and make static.
3183 (s390_get_pc, s390_set_pc): Adjust.
3184 (s390_get_hwcap): New target_desc parameter, and use it.
3185 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3186 (s390_arch_setup): Adjust to set the current process'es target
3187 description. Don't adjust the regmap.
3188 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3189 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3190 (regs_info_3264): New globals.
3191 (s390_regs_info): New function.
3192 (the_low_target): Adjust.
3193 (initialize_low_arch): New function.
3194 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3195 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3196 [__mips64] (init_registers_mips_linux)
3197 (init_registers_mips_dsp_linux): Delete defines.
3198 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3199 (have_dsp): New global.
3200 (mips_read_description): New, based on mips_arch_setup.
3201 (mips_arch_setup): Reimplement.
3202 (get_usrregs_info): New function.
3203 (mips_cannot_fetch_register, mips_cannot_store_register)
3204 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3205 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3206 (target_regsets): Rename to ...
3207 (mips_regsets): ... this, and make static.
3208 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3209 (dsp_regs_info, regs_info): New globals.
3210 (mips_regs_info): New function.
3211 (the_low_target): Adjust.
3212 (initialize_low_arch): New function.
3213 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3214 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3216 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3217 (arm_read_description): New, with bits factored from
3219 (arm_arch_setup): Reimplement.
3220 (target_regsets): Rename to ...
3221 (arm_regsets): ... this, and make static.
3222 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3223 (arm_regs_info): New function.
3224 (the_low_target): Adjust.
3225 (initialize_low_arch): New function.
3226 * linux-m68k-low.c (tdesc_m68k): Declare.
3227 (target_regsets): Rename to ...
3228 (m68k_regsets): ... this, and make static.
3229 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3230 (m68k_regs_info): New function.
3231 (m68k_arch_setup): New function.
3232 (the_low_target): Adjust.
3233 (initialize_low_arch): New function.
3234 * linux-sh-low.c (tdesc_sharch): Declare.
3235 (target_regsets): Rename to ...
3236 (sh_regsets): ... this, and make static.
3237 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3238 (sh_regs_info, sh_arch_setup): New functions.
3239 (the_low_target): Adjust.
3240 (initialize_low_arch): New function.
3241 * linux-bfin-low.c (tdesc_bfin): Declare.
3242 (bfin_arch_setup): New function.
3243 (bfin_usrregs_info, regs_info): New globals.
3244 (bfin_regs_info): New function.
3245 (the_low_target): Adjust.
3246 (initialize_low_arch): New function.
3247 * linux-cris-low.c (tdesc_cris): Declare.
3248 (cris_arch_setup): New function.
3249 (cris_usrregs_info, regs_info): New globals.
3250 (cris_regs_info): New function.
3251 (the_low_target): Adjust.
3252 (initialize_low_arch): New function.
3253 * linux-cris-low.c (tdesc_crisv32): Declare.
3254 (cris_arch_setup): New function.
3255 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3256 (cris_regs_info): New function.
3257 (the_low_target): Adjust.
3258 (initialize_low_arch): New function.
3259 * linux-m32r-low.c (tdesc_m32r): Declare.
3260 (m32r_arch_setup): New function.
3261 (m32r_usrregs_info, regs_info): New globals.
3262 (m32r_regs_info): Adjust.
3263 (initialize_low_arch): New function.
3264 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3265 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3266 (tic6x_usrregs_info): Forward declare.
3267 (tic6x_read_description): New function, based on ...
3268 (tic6x_arch_setup): ... this. Reimplement.
3269 (target_regsets): Rename to ...
3270 (tic6x_regsets): ... this, and make static.
3271 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3272 (tic6x_regs_info): New function.
3273 (the_low_target): Adjust.
3274 (initialize_low_arch): New function.
3275 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3276 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3277 (target_regsets): Rename to ...
3278 (xtensa_regsets): ... this, and make static.
3279 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3281 (xtensa_arch_setup, xtensa_regs_info): New functions.
3282 (the_low_target): Adjust.
3283 (initialize_low_arch): New function.
3284 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3285 (nios2_arch_setup): Set the current process'es tdesc.
3286 (target_regsets): Rename to ...
3287 (nios2_regsets): ... this.
3288 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3289 (nios2_regs_info): New function.
3290 (the_low_target): Adjust.
3291 (initialize_low_arch): New function.
3292 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3293 (aarch64_arch_setup): Set the current process'es tdesc.
3294 (target_regsets): Rename to ...
3295 (aarch64_regsets): ... this.
3296 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3297 (aarch64_regs_info): New function.
3298 (the_low_target): Adjust.
3299 (initialize_low_arch): New function.
3300 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3302 (target_regsets): Rename to ...
3303 (tile_regsets): ... this.
3304 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3305 (tile_regs_info): New function.
3306 (tile_arch_setup): Set the current process'es tdesc.
3307 (the_low_target): Adjust.
3308 (initialize_low_arch): New function.
3309 * spu-low.c (tdesc_spu): Declare.
3310 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3311 * win32-arm-low.c (tdesc_arm): Declare.
3312 (arm_arch_setup): New function.
3313 (the_low_target): Install arm_arch_setup instead of
3315 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3316 (init_windows_x86): Rename to ...
3317 (i386_arch_setup): ... this. Set `win32_tdesc'.
3318 (the_low_target): Adjust.
3319 * win32-low.c (win32_tdesc): New global.
3320 (child_add_thread): Don't create the thread cache here.
3321 (do_initial_child_stuff): Set the new process'es tdesc.
3322 * win32-low.h (struct target_desc): Forward declare.
3323 (win32_tdesc): Declare.
3324 * lynx-i386-low.c (tdesc_i386): Declare global.
3325 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3326 * lynx-low.c (lynx_tdesc): New global.
3327 (lynx_add_process): Set the new process'es tdesc.
3328 * lynx-low.h (struct target_desc): Forward declare.
3329 (lynx_tdesc): Declare global.
3330 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3331 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3332 * nto-low.c (nto_tdesc): New global.
3333 (do_attach): Set the new process'es tdesc.
3334 * nto-low.h (struct target_desc): Forward declare.
3335 (nto_tdesc): Declare.
3336 * nto-x86-low.c (tdesc_i386): Declare.
3337 (nto_x86_arch_setup): Set `nto_tdesc'.
3339 2013-06-04 Gary Benson <gbenson@redhat.com>
3341 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3342 to qSupported response when appropriate.
3343 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3344 with nonzero-length annex.
3345 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3346 arguments supplied in annex.
3348 2013-05-31 Doug Evans <dje@google.com>
3351 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3352 64 bits in 64-cross-32 environment.
3354 2013-05-28 Pedro Alves <palves@redhat.com>
3356 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3357 (aarch64-without-fpu.c): Delete rule.
3358 * configure.srv (aarch64*-*-linux*): Remove references to
3359 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3360 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3363 2013-05-24 Pedro Alves <palves@redhat.com>
3365 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3366 instead of strchr/decode_address. Error if the range isn't split
3367 with a ','. Don't assume there's be a ':' in the action.
3369 2013-05-23 Yao Qi <yao@codesourcery.com>
3370 Pedro Alves <palves@redhat.com>
3372 * linux-low.c (lwp_in_step_range): New function.
3373 (linux_wait_1): If the thread was range stepping and stopped
3374 outside the stepping range, report the stop to GDB. Otherwise,
3375 continue stepping. Add range stepping debug output.
3376 (linux_set_resume_request): Copy the step range from the resume
3378 (linux_supports_range_stepping): New.
3379 (linux_target_ops) <supports_range_stepping>: Set to
3380 linux_supports_range_stepping.
3381 * linux-low.h (struct linux_target_ops)
3382 <supports_range_stepping>: New field.
3383 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3384 * linux-x86-low.c (x86_supports_range_stepping): New.
3385 (the_low_target) <supports_range_stepping>: Set to
3386 x86_supports_range_stepping.
3387 * server.c (handle_v_cont): Handle 'r' action.
3388 (handle_v_requests): Append ";r" if the target supports range
3390 * target.h (struct thread_resume) <step_range_start,
3391 step_range_end>: New fields.
3392 (struct target_ops) <supports_range_stepping>:
3394 (target_supports_range_stepping): New macro.
3396 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3398 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3399 confusion in comment.
3401 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3403 * lynx-low.c (struct process_info_private): New type.
3404 (lynx_add_process): New function.
3405 (lynx_create_inferior, lynx_attach): Replace calls to
3406 add_process by calls to lynx_add_process.
3407 (lynx_resume): If PTID is null, then try using
3408 current_process()->private->last_wait_event_ptid.
3410 (lynx_clear_inferiors): Delete. The contents of that function
3411 has been inlined in lynx_mourn;
3412 (lynx_wait_1): Save the ptid in the process's private data.
3413 (lynx_mourn): Free the process' private data. Replace call
3414 to lynx_clear_inferiors by call to clear_inferiors.
3416 2013-05-17 Yao Qi <yao@codesourcery.com>
3418 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3421 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3423 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3424 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3425 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3426 PT_TEXT_END_ADDR guards. Update comments.
3427 (linux_target_op) <read_offsets>: Conditionally define to
3428 linux_read_offsets if the target is UCLIBC and if it defines
3429 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3431 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3432 Andrew Jenner <andrew@codesourcery.com>
3434 * Makefile.in (SFILES): Add linux-nios2-low.c.
3435 (clean): Add action to delete nios2-linux.c.
3436 (nios2-linux.c): New rule.
3437 * configure.srv: Add nios2*-*-linux*.
3438 * linux-nios2-low.c: New.
3440 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3442 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3444 2013-04-25 Hui Zhu <hui@codesourcery.com>
3447 * ax.c (ax_printf): Add fflush.
3449 2013-04-22 Tom Tromey <tromey@redhat.com>
3451 * Makefile.in (SFILES): Add filestuff.c.
3452 (OBS): Add filestuff.o.
3453 (filestuff.o): New target.
3454 * config.in, configure: Rebuild.
3455 * configure.ac: Check for fdwalk, pipe2.
3457 2013-04-17 Pedro Alves <palves@redhat.com>
3459 * configure.ac (USE_THREAD_DB): Delete variable.
3460 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3461 Don't AC_SUBST USE_THREAD_DB.
3462 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3463 * config.in, configure: Regenerate.
3465 2013-04-16 Pedro Alves <palves@redhat.com>
3467 * linux-low.h (struct lwp_info) <thread_known>: Move under
3468 the USE_THREAD_DB #ifdef.
3470 2013-04-16 Pedro Alves <palves@redhat.com>
3472 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3473 (linux-low.o): Delete rule.
3474 * linux-low.h: Always include "gdb_thread_db.h" instead of
3475 conditionally including thread_db.h.
3476 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3479 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3481 * Makefile.in (install-only): Fix make install regression.
3483 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3485 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3486 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3488 * gdbserver.1: Remove.
3490 2013-03-22 Pedro Alves <palves@redhat.com>
3492 * linux-low.c (handle_extended_wait): Don't call
3493 linux_enable_event_reporting.
3495 2013-03-15 Tony Theodore <tonyt@logyst.com>
3498 * Makefile.in (SHELL): Use @SHELL@.
3500 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3502 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3505 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3507 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3508 Remove extraneous NULL element.
3510 2013-03-13 Yao Qi <yao@codesourcery.com>
3512 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3513 'V' block in trace frame.
3515 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3517 * target.h (struct target_ops): Add btrace ops.
3518 (target_supports_btrace): New macro.
3519 (target_enable_btrace): New macro.
3520 (target_disable_btrace): New macro.
3521 (target_read_btrace): New macro.
3522 * gdbthread.h (struct thread_info): Add btrace field.
3523 * server.c: Include btrace-common.h.
3524 (handle_btrace_general_set): New function.
3525 (handle_btrace_enable): New function.
3526 (handle_btrace_disable): New function.
3527 (handle_general_set): Call handle_btrace_general_set.
3528 (handle_qxfer_btrace): New function.
3529 (struct qxfer qxfer_packets[]): Add btrace entry.
3530 * inferiors.c (remove_thread): Disable btrace.
3531 * linux-low: Include linux-btrace.h.
3532 (linux_low_enable_btrace): New function.
3533 (linux_low_read_btrace): New function.
3534 (linux_target_ops): Add btrace ops.
3535 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3536 Add srv_linux_btrace=yes.
3537 (x86_64-*-linux*): Add linux-btrace.o.
3538 Add srv_linux_btrace=yes.
3539 * configure.ac: Define HAVE_LINUX_BTRACE.
3540 * config.in: Regenerated.
3541 * configure: Regenerated.
3543 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3545 * server.c (handle_qxfer): Preserve error message if -3 is
3547 (qxfer): Document the -3 return value.
3549 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3551 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3552 (linux_btrace_h): New variable.
3553 (linux-btrace.o): New rule.
3555 2013-03-08 Stan Shebs <stan@codesourcery.com>
3556 Hafiz Abid Qadeer <abidh@codesourcery.com>
3558 * tracepoint.c (trace_buffer_size): New global.
3559 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3560 (init_trace_buffer): Change to one-argument function. Allocate
3561 trace buffer memory.
3562 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3563 handle QTBuffer:size packet.
3564 (cmd_bigqtbuffer_size): New function.
3565 (initialize_tracepoint): Call init_trace_buffer with
3566 DEFAULT_TRACE_BUFFER_SIZE.
3567 * server.c (handle_query): Add QTBuffer:size in the
3570 2013-03-07 Yao Qi <yao@codesourcery.com>
3572 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3573 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3575 (cmd_qtsp): Adjust condition. Do post increment.
3576 Set cur_action and cur_step_action back to 0.
3578 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3581 * linux-low.c (linux_write_memory): Return early success if LEN is
3584 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3586 * configure.srv: Add x86_64-*-cygwin* as target.
3588 2013-02-28 Tom Tromey <tromey@redhat.com>
3590 * configure.ac: Invoke AC_SYS_LARGEFILE.
3591 * configure, config.in: Rebuild.
3593 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3595 * win32-low.c: Throughout, fix format strings and casts of
3596 printf-like functions to avoid type related warnings on all
3598 (get_child_debug_event): Print dwDebugEventCode as hex since
3599 that's how it's usually documented.
3601 2013-02-28 Yao Qi <yao@codesourcery.com>
3603 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3606 2013-02-27 Jiong Wang <jiwang@tilera.com>
3608 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3609 (reg-tilegx32.c): New rule.
3610 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3611 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3612 different register info initializer according to elf class.
3613 (init_registers_tilgx32): New function. The tilegx32 register info
3615 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3616 (tile_store_gregset): Likewise.
3618 2013-02-27 Yao Qi <yao@codesourcery.com>
3620 * server.c (process_point_options): Print debug message when
3621 debug_threads is true.
3623 2013-02-26 Yao Qi <yao@codesourcery.com>
3625 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3627 2013-02-19 Pedro Alves <palves@redhat.com>
3628 Kai Tietz <ktietz@redhat.com>
3632 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3633 instead of strtoul to extract address from packet.
3634 (process_serial_event) <'z'>: Likewise.
3636 2013-02-18 Yao Qi <yao@codesourcery.com>
3638 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3640 2013-02-14 Pedro Alves <palves@redhat.com>
3644 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3645 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3647 2013-02-14 Pedro Alves <palves@redhat.com>
3649 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3651 2013-02-14 Pedro Alves <palves@redhat.com>
3653 * tracepoint.c (save_string): Delete.
3654 (add_tracepoint_action): Use savestring instead of save_string.
3656 2013-02-12 Pedro Alves <palves@redhat.com>
3658 * linux-xtensa-low.c: Ditto.
3659 * xtensa-xtregs.c: Ditto.
3661 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3663 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3666 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3668 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3669 aarch64_num_wp_regs and aarch64_num_bp_regs to
3670 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3672 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3674 * linux-aarch64-low.c (ps_get_thread_area): Replace
3675 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3677 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3678 Marcus Shawcroft <marcus.shawcroft@arm.com>
3679 Nigel Stephens <nigel.stephens@arm.com>
3680 Yufeng Zhang <yufeng.zhang@arm.com>
3682 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3683 (aarch64.c, aarch64-without-fpu.c): New targets.
3684 * configure.srv (aarch64*-*-linux*): New.
3685 * linux-aarch64-low.c: New file.
3687 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3689 * linux-low.c (handle_extended_wait, linux_create_inferior)
3690 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3691 (dequeue_one_deferred_signal, linux_resume_one_thread)
3692 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3693 (linux_tracefork_grandchild, linux_test_for_tracefork)
3694 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3695 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3696 where the argument is 0.
3698 2013-01-25 Yao Qi <yao@codesourcery.com>
3700 * event-loop.c: Include "queue.h".
3701 (gdb_event_p): New typedef.
3702 (struct gdb_event) <next_event>: Remove.
3703 (event_queue): Change to QUEUE(gdb_event_p).
3704 (async_queue_event): Remove.
3705 (gdb_event_xfree): New.
3706 (initialize_event_loop): New.
3707 (process_event): Use API from QUEUE.
3708 (wait_for_event): Likewise.
3709 * server.c (main): Call initialize_event_loop.
3710 * server.h (initialize_event_loop): Declare.
3712 2013-01-18 Yao Qi <yao@codesourcery.com>
3714 * ax.h (struct eval_agent_expr_context): New.
3715 (gdb_eval_agent_expr): Update declaration.
3716 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3717 TFRAME. Add new argument CTX.
3718 * server.h (struct eval_agent_expr_context): Declare.
3719 (agent_mem_read, agent_tsv_read): Update declaration.
3720 (agent_mem_read_string): Likewise.
3721 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3722 (add_traceframe_block): Add new argument TPOINT.
3723 Increase TPOINT->traceframe_usage.
3724 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3725 eval_tracepoint_agent_expr.
3726 (condition_true_at_tracepoint): Likewise.
3727 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3728 (agent_mem_read_string, agent_tsv_read): Likewise.
3730 2013-01-16 Yao Qi <yao@codesourcery.com>
3732 * linux-low.c (linux_resume_one_lwp): Don't check
3733 'lwp->bp_reinsert != 0'.
3735 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3736 Pedro Alves <palves@redhat.com>
3738 * lynx-low.c (ptrace_request_to_str): Define a temporary
3739 macro and use it to simplify this function's implementation.
3741 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3743 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3746 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3748 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3750 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3752 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3754 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3756 * lynx-low.c (lynx_resume): Use the resume_info parameter
3757 to determine the ptid for the lynx_ptrace call, unless
3758 it is equal to minus_one_ptid, in which case we use the
3759 ptid of the current_inferior.
3760 (lynx_wait_1): After having received a thread create/exit
3761 event, resume the inferior's execution using the signaling
3762 thread's ptid, rather than the old ptid.
3764 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3766 * lynx-low.c (lynx_resume): Delete variable ret.
3768 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3770 * gdbreplay.c (gdbreplay_version): Update copyright year.
3771 * server.c (gdbserver_version): Likewise.
3773 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3775 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3778 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3780 * lynx-low.c (ptrace_request_to_str): Add handling for
3783 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3785 * lynx-low.c (lynx_attach): Delete variable new_process.
3787 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3789 * lynx-low.c (lynx_create_inferior): Delete variable
3792 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3794 * lynx-low.c (ptrace_request_to_str): Do not handle
3795 PTRACE_GETTHREADLIST if this macro does not exist.
3797 2012-12-15 Yao Qi <yao@codesourcery.com>
3799 * Makefile.in (OBS): Add notif.o.
3800 * notif.c, notif.h: New.
3801 * server.c: Include "notif.h".
3802 (struct vstop_notif) <next>: Remove.
3804 (queue_stop_reply): Update.
3805 (push_event, send_next_stop_reply): Remove.
3806 (discard_queued_stop_replies): Update.
3807 (notif_stop): New variable.
3808 (handle_v_stopped): Remove.
3809 (handle_v_requests): Don't call handle_v_stopped. Call
3810 handle_ack_notif instead.
3811 (queue_stop_reply_callback): Call notif_event_enque instead
3812 of queue_stop_reply.
3813 (handle_status): Don't call send_next_stop_reply, call
3814 notif_write_event instead.
3815 (kill_inferior_callback): Likewise.
3816 (detach_or_kill_inferior_callback): Likewise.
3817 (main): Call initialize_notif.
3818 (process_serial_event): Call QUEUE_is_empty.
3819 (handle_target_event): Call notif_push instead of push event.
3820 * server.h (push_event): Remove declaration.
3822 2012-12-10 Tom Tromey <tromey@redhat.com>
3824 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3825 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3828 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3829 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3830 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3831 (amd64-linux-ipa.o, ax.o): Rewrite.
3832 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3833 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3834 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3835 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3836 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3837 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3838 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3839 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3840 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3841 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3842 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3843 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3844 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3845 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3846 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3847 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3848 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3849 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3850 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3851 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3852 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3853 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3854 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3855 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3856 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3857 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3858 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3859 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3860 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3861 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3862 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3863 (reg-tilegx.o): Remove.
3864 (all_object_files): New macro.
3865 Include .deps files.
3866 * aclocal.m4, configure: Rebuild.
3867 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3868 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3869 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3871 2012-12-05 Tom Tromey <tromey@redhat.com>
3874 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3876 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3878 * configure.ac: Check for linux/perf_event.h.
3879 * config.in: Regenerated.
3880 * configure: Regenerated.
3882 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3884 * hostio.c (handle_readlink): Decrease buffer size
3885 parameter passed to readlink by one byte.
3887 2012-11-26 Yao Qi <yao@codesourcery.com>
3889 * configure.ac (build_warnings): Append '-Wempty-body'.
3890 * configure: Regenerated.
3891 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3894 2012-11-15 Pierre Muller <muller@sourceware.org>
3896 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3897 * config.in: Regenerate.
3898 * configure: Regenerate.
3899 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3900 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3901 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3902 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3904 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3905 instead of <sys/wait.h> header.
3906 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3908 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3910 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3911 (various make rules): Remove -DGDBSERVER
3913 2012-11-09 Yao Qi <yao@codesourcery.com>
3915 * spu-low.c (current_ptid): Move it to ..
3916 * gdbthread.h: ... here. New.
3917 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3918 * server.c (myresume, process_serial_event): Likewise.
3919 * thread-db.c (thread_db_find_new_threads): Likewise.
3920 * tracepoint.c (run_inferior_command): Likewise.
3922 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3924 * server.c (handle_search_memory_1): Include access length in
3927 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3929 * linux-crisv32-low.c: Fix compile errors.
3931 2012-09-04 Yao Qi <yao@codesourcery.com>
3933 * tracepoint.c (cmd_qtsv): Adjust debug message.
3934 Don't check CUR_TPOINT.
3936 2012-08-28 Yao Qi <yao@codesourcery.com>
3938 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3939 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3940 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3941 Remove declarations of xmalloc, xreallloc, xstrdup and
3943 * Makefile.in (libiberty_h): New.
3944 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3945 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3947 2012-08-23 Yao Qi <yao@codesourcery.com>
3949 * server.h: Remove declaration of 'xsnprintf'.
3951 2012-08-22 Keith Seitz <keiths@redhat.com>
3953 * server.h: Include build-gnulib-gbserver/config.h.
3954 * gdbreplay.c: Likewise.
3956 2012-08-08 Doug Evans <dje@google.com>
3958 * Makefile.in (SFILES): Add gdb_vecs.c.
3959 (OBS): Add gdb_vecs.o.
3960 (gdb_vecs_h, host_defs_h): New variables.
3961 (thread-db.o): Add $(gdb_vecs_h) dependency.
3962 (gdb_vecs.o): New rule.
3963 * thread-db.c: #include "gdb_vecs.h".
3964 (thread_db_load_search): Use a vector to iterate over path elements.
3965 Handle text appearing after "$pdir".
3967 * configure.ac: Add check for strstr.
3968 * config.in: Regenerate.
3969 * configure: Regenerate.
3971 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3973 * hostio.c (handle_pread): If pread fails, fall back to attempting
3975 (handle_pwrite): Likewise for pwrite.
3977 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3979 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3980 between unsupported TYPE and unimplementable ADDR/LEN combination.
3981 (arm_insert_point): Act on new return value.
3983 2012-07-31 Pedro Alves <palves@redhat.com>
3985 * server.c (process_point_options): Only skip tokens if we find
3986 one that is unrecognized. Don't treat 'X' specially while
3987 skipping unrecognized tokens.
3989 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3991 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3992 to 4-byte-align HW breakpoint addresses for Thumb.
3994 2012-07-27 Yao Qi <yao@codesourcery.com>
3998 * server.h: Declare gdb_agent_about_to_close.
3999 * target.c (kill_inferior): Include "agent.h".
4000 New. Send command 'kill'.
4001 * target.h (kill_inferior): Removed macro.
4002 * tracepoint.c (gdb_agent_about_to_close): New.
4003 (gdb_agent_helper_thread): Handle command 'close'.
4004 Wait endlessly until the inferior stops.
4005 Install gdb_agent_remove_socket to atexit hook.
4006 (agent_socket_name): New static variable.
4007 (gdb_agent_socket_init): Replace local variable 'name' with
4008 'agent_socket_name'.
4009 (gdb_agent_remove_socket): New.
4011 2012-07-27 Yao Qi <yao@codesourcery.com>
4013 * server.c (process_point_options): Stop at 'X' when parsing.
4015 2012-07-19 Michael Eager <eager@eagercon.com>
4017 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4019 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4020 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4021 hardware breakpoint.
4023 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4025 * gdbserver/linux-low.c (initialize_low): Call
4026 linux_ptrace_init_warnings.
4028 2012-07-02 Doug Evans <dje@google.com>
4030 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4033 2012-07-02 Stan Shebs <stan@codesourcery.com>
4035 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4036 (ax.o): Add it to build rule.
4038 (OBS): Add format.o.
4039 (IPA_OBS): Add format.o.
4040 * server.c (handle_query): Claim support for breakpoint commands.
4041 (process_point_options): Add command case.
4042 (process_serial_event): Leave running if there are printfs in
4044 * mem-break.h (any_persistent_commands): Declare.
4045 (add_breakpoint_commands): Declare.
4046 (gdb_no_commands_at_breakpoint): Declare.
4047 (run_breakpoint_commands): Declare.
4048 * mem-break.c (struct point_command_list): New struct.
4049 (struct breakpoint): New field command_list.
4050 (any_persistent_commands): New function.
4051 (add_commands_to_breakpoint): New function.
4052 (add_breakpoint_commands): New function.
4053 (gdb_no_commands_at_breakpoint): New function.
4054 (run_breakpoint_commands): New function.
4055 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4057 * ax.c: Include format.h.
4058 (ax_printf): New function.
4059 (gdb_eval_agent_expr): Add printf opcode.
4061 2012-06-13 Yao Qi <yao@codesourcery.com>
4063 * server.c (start_inferior): Remove duplicated writes to fields
4064 'last_resume_kind' and 'last_status' of 'current_inferior'.
4066 2012-06-12 Yao Qi <yao@codesourcery.com>
4067 Pedro Alves <palves@redhat.com>
4069 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4071 * server.c (handle_v_cont): Extend comment.
4073 2012-06-11 Yao Qi <yao@codesourcery.com>
4075 * linux-low.c (linux_attach): Add 'static'.
4077 2012-06-06 Yao Qi <yao@codesourcery.com>
4079 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4081 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4083 Fix gcc -flto compilation warning.
4084 * server.c (main): Make variable multi_mode and attach volatile.
4086 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4088 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4089 if the platform doesn't know about it.
4091 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4093 * Makefile.in (SFILES): Add linux-tile-low.c.
4094 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4095 * configure.srv: Handle tilegx-*-linux*.
4096 * linux-tile-low.c: New file.
4098 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4100 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4102 2012-05-24 Pedro Alves <palves@redhat.com>
4106 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4108 2012-05-24 Pedro Alves <palves@redhat.com>
4112 Replace target_signal with gdb_signal throughout.
4114 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4116 * linux-low.c (linux_store_registers): Avoid the copying sequence
4117 when no data has been retrieved by ptrace.
4119 2012-05-22 Will Deacon <will.deacon@arm.com>
4121 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4122 Include asm/ptrace.h.
4123 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4126 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4128 * linux-low.c (linux_store_registers): Don't re-retrieve data
4129 with ptrace that has already been obtained from /proc. Always
4130 copy any data retrieved with ptrace to the buffer supplied.
4132 2012-05-11 Yao Qi <yao@codesourcery.com>
4133 Pedro Alves <palves@redhat.com>
4135 * linux-low.c (enum stopping_threads_kind): New.
4136 (stopping_threads): Change type to `enum stopping_threads_kind'.
4137 (handle_extended_wait): If stopping and suspending threads, leave
4138 the new_lwp suspended too.
4139 (linux_wait_for_event): Adjust.
4140 (stop_all_lwps): Set `stopping_threads' to
4141 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4142 whether we're suspending threads or just stopping them. Assert no
4145 2012-04-29 Yao Qi <yao@codesourcery.com>
4147 * server.h: Move some code to ...
4148 * gdbthread.h: ... here. New.
4149 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4150 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4151 (nto-low.o, win32-low.o): Likewise.
4152 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4153 * regcache.c, remote-utils.c, server.c: Likewise.
4154 * target.c, tracepoint.c, win32-low.c: Likewise.
4156 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4158 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4159 (PTRACE_ARG4_TYPE): Likewise.
4160 (PTRACE_XFER_TYPE): Likewise.
4161 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4162 ptrace to PTRACE_ARG3_TYPE.
4163 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4164 (PTRACE_ARG4_TYPE): Likewise.
4165 (PTRACE_XFER_TYPE): Likewise.
4166 (linux_detach_one_lwp): Cast fourth argument of
4167 ptrace to long then PTRACE_ARG4_TYPE.
4168 (regsets_fetch_inferior_registers): Cast third argument of
4169 ptrace to long then PTRACE_ARG3_TYPE.
4170 (regsets_store_inferior_registers): Likewise.
4172 2012-04-20 Pedro Alves <palves@redhat.com>
4174 * configure: Regenerate.
4176 2012-04-19 Pedro Alves <palves@redhat.com>
4178 * Makefile.in (GNULIB_BUILDDIR): New.
4179 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4180 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4181 (all, install-only, uninstall, clean-info, all-lib, clean): No
4182 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4183 (maintainer-clean realclean distclean): Use subdir_do.
4185 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4186 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4187 * acinclude.m4: Include acx_configure_dir.m4.
4188 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4189 calls. Call AC_PROG_RANLIB. Configure gnulib using
4192 (GNULIB_STDINT_H): Adjust.
4193 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4194 * gdbreplay.c: Include build-gnulib/config.h.
4195 * server.h: Likewise.
4196 * aclocal.m4: Regenerate.
4197 * config.in: Regenerate.
4198 * configure: Regenerate.
4200 2012-04-19 Pedro Alves <palves@redhat.com>
4202 * Makefile.in (LIBGNU, INCGNU): Adjust.
4203 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4204 (all, install-only, uninstall, clean-info, all-lib, clean)
4205 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4206 * configure.ac: Adjust AC_OUTPUT output.
4207 * aclocal.m4: Regenerate.
4208 * configure: Regenerate.
4210 2012-04-19 Pedro Alves <palves@redhat.com>
4212 * Makefile.in (generated_files): New.
4213 (server_h): Remove the explicit dependency on config.h, and depend
4214 on $generated_files.
4216 2012-04-19 Pedro Alves <palves@redhat.com>
4218 * Makefile.in (INCGNU): Add -Ignulib.
4220 2012-04-19 Pedro Alves <palves@redhat.com>
4222 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4223 (INCGNU): ... this, and spell out -I here.
4224 (GNULIB_LIB): Rename to ...
4226 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4228 2012-04-19 Pedro Alves <palves@redhat.com>
4230 * config.in: Regenerate.
4232 2012-04-19 Pedro Alves <palves@redhat.com>
4234 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4235 * server.h (memmem): Remove declaration.
4236 * config.in: Regenerate.
4237 * configure: Regenerate.
4239 2012-04-19 Yao Qi <yao@codesourcery.com>
4241 * Makefile.in (SFILES): Add common/vec.c.
4245 2012-04-19 Yao Qi <yao@codesourcery.com>
4247 * remote-utils.c (prepare_resume_reply): Replace with macro
4248 target_core_of_thread.
4249 * server.c (handle_qxfer_threads_proper): Likewise.
4250 * target.h (traget_core_of_thread): New macro.
4252 2012-04-18 Pedro Alves <palves@redhat.com>
4254 * aclocal.m4: Regenerate.
4255 * configure: Regenerate.
4257 2012-04-16 Yao Qi <yao@codesourcery.com>
4259 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4260 duplicated on address.
4262 2012-04-16 Yao Qi <yao@codesourcery.com>
4264 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4265 (struct tracepoint_action_ops) <send>: New field.
4266 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4267 (agent_expr_send, x_tracepoint_action_send): New.
4268 (l_tracepoint_action_send): New.
4269 (cmd_qtdp): Download and install tracepoint
4270 according to `use_agent'.
4271 (run_inferior_command): Add one more parameter `len'.
4273 (tracepoint_send_agent): New.
4274 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4276 2012-04-16 Yao Qi <yao@codesourcery.com>
4278 * tracepoint.c (download_tracepoints): Moved to ...
4279 (cmd_qtstart): ... here.
4281 2012-04-14 Yao Qi <yao@codesourcery.com>
4283 * tracepoint.c: Include inttypes.h.
4284 (struct collect_memory_action): Use sized types.
4285 (struct tracepoint): Likewise.
4286 (cmd_qtdp, stop_tracing): Update print specifiers.
4287 (cmd_qtp, response_tracepoint): Likewise.
4288 (collect_data_at_tracepoint): Likewise.
4289 (collect_data_at_step): Likewise.
4291 2012-04-14 Yao Qi <yao@codesourcery.com>
4293 Import gnulib module inttypes.
4294 * aclocal.m4, config.in, configure: Regenerated.
4296 2012-04-14 Yao Qi <yao@codesourcery.com>
4298 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4299 Makefile and config.status at last.
4301 2012-04-13 Yao Qi <yao@codesourcery.com>
4303 * tracepoint.c: Include stdint.h unconditionally.
4305 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4307 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4308 on BFD_HAVE_SYS_PROCFS_TYPE.
4309 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4310 * configure: Regenerate.
4311 * config.in: Likewise.
4313 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4315 * Makefile.in (clean): Also remove x32.c x32-linux.c
4316 x32-avx.c x32-avx-linux.c.
4317 (x32.o): New target.
4319 (x32-linux.o): Likewise.
4320 (x32-linux.c): Likewise.
4321 (x32-avx.o): Likewise.
4322 (x32-avx.c): Likewise.
4323 (x32-avx-linux.o): Likewise.
4324 (x32-avx-linux.c): Likewise.
4326 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4327 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4328 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4329 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4330 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4331 i386/x32-avx-linux.xml.
4333 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4334 (init_registers_x32_avx_linux): Likwise.
4335 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4336 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4338 2012-04-13 Pedro Alves <palves@redhat.com>
4340 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4341 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4342 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4343 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4346 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4348 * linux-x86-low.c (compat_x32_clock_t): New.
4349 (compat_x32_siginfo_t): Likewise.
4350 (compat_x32_siginfo_from_siginfo): Likewise.
4351 (siginfo_from_compat_x32_siginfo): Likewise.
4352 (linux_is_elf64): Likewise.
4353 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4354 and siginfo_from_compat_x32_siginfo for x32.
4355 (x86_arch_setup): Set linux_is_elf64.
4357 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4360 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4362 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4363 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4364 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4365 compatible with process.
4367 2012-04-12 Yao Qi <yao@codesourcery.com>
4369 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4370 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4371 (install-only, install-info, clean): Handle sub dir gnulib.
4372 (all-lib, am--refresh): New targets.
4373 (memmem.o): Remove target.
4374 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4375 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4376 (AC_REPLACE_FUNCS): Remove memmem.
4377 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4378 (AC_OUTPUT): Generate Makefile in gnulib/.
4379 * aclocal.m4, config.in, configure: Regenerated.
4381 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4383 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4385 2012-04-05 Pedro Alves <palves@redhat.com>
4387 -Werror=strict-aliasing
4389 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4392 2012-04-04 Pedro Alves <palves@redhat.com>
4394 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4395 (sparc_store_gregset_from_stack, sparc_store_gregset)
4396 (sparc_breakpoint_at): Fix formatting.
4398 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4400 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4402 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4403 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4404 * config.in: Regenerate.
4405 * configure: Likewise.
4407 2012-03-29 Pedro Alves <palves@redhat.com>
4409 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4410 Correct ptrace arguments.
4412 2012-03-28 Pedro Alves <palves@redhat.com>
4414 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4415 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4416 (IA64_FR1_REGNUM): New defines.
4417 (ia64_fetch_register): New.
4418 (the_low_target): Install it.
4419 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4421 * linux-low.c (linux_fetch_registers): Try the
4422 the_low_target.fetch_register hook first.
4424 * linux-arm-low.c (the_low_target): Adjust.
4425 * linux-bfin-low.c (the_low_target): Adjust.
4426 * linux-cris-low.c (the_low_target): Adjust.
4427 * linux-crisv32-low.c (the_low_target): Adjust.
4428 * linux-m32r-low.c (the_low_target): Adjust.
4429 * linux-m68k-low.c (the_low_target): Adjust.
4430 * linux-mips-low.c (the_low_target): Adjust.
4431 * linux-ppc-low.c (the_low_target): Adjust.
4432 * linux-s390-low.c (the_low_target): Adjust.
4433 * linux-sh-low.c (the_low_target): Adjust.
4434 * linux-sparc-low.c (the_low_target): Adjust.
4435 * linux-tic6x-low.c (the_low_target): Adjust.
4436 * linux-x86-low.c (the_low_target): Adjust.
4437 * linux-xtensa-low.c (the_low_target): Adjust.
4439 2012-03-26 Pedro Alves <palves@redhat.com>
4441 * server.c (handle_qxfer_libraries): Don't bail early if
4442 the_target->qxfer_libraries_svr4 is not NULL.
4444 2012-03-26 Pedro Alves <palves@redhat.com>
4446 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4448 2012-03-23 Pedro Alves <palves@redhat.com>
4450 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4451 "library-list-svr4" element's start tag when the the DSO list is
4454 2012-03-23 Pedro Alves <palves@redhat.com>
4456 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4457 a variable whose type size is the same as the inferior's pointer
4460 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4462 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4464 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4465 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4466 * linux-low.h: Include <signal.h>.
4467 (struct siginfo): Remove forward declaration.
4468 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4471 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4473 * .gitignore: Ignore more files.
4475 2012-03-19 Pedro Alves <palves@redhat.com>
4476 Jan Kratochvil <jan.kratochvil@redhat.com>
4478 * server.c (cont_thread, general_thread): Add describing comments.
4479 (start_inferior): Clear `cont_thread'.
4480 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4483 2012-03-15 Yao Qi <yao@codesourcery.com>
4485 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4487 (cmd_qtdp): ... here.
4489 2012-03-15 Yao Qi <yao@codesourcery.com>
4491 * tracepoint.c (struct tracepoint_action_ops): New.
4492 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4493 (m_tracepoint_action_download): New.
4494 (r_tracepoint_action_download): New.
4495 (x_tracepoint_action_download): New.
4496 (l_tracepoint_action_download): New.
4497 (add_tracepoint_action): Install `action->ops' according type.
4498 (download_tracepoint_1): Move code `download' function pointer
4499 of various tracepoint_action_ops.
4501 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4503 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4504 linux_ptrace_attach_warnings.
4506 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4508 * Makefile.in (linux-ptrace.o): New.
4509 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4510 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4511 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4512 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4513 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4515 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4517 2012-03-08 Yao Qi <yao@codesourcery.com>
4518 Pedro Alves <palves@redhat.com>
4520 Fix PR server/13392.
4521 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4523 * tracepoint.c (remove_tracepoint): New.
4524 (cmd_qtdp): Call remove_tracepoint when failed to install.
4526 2012-03-07 Pedro Alves <palves@redhat.com>
4528 * linux-low.c (get_detach_signal): New.
4529 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4530 Pass on pending signals to PTRACE_DETACH. Check the result of the
4532 * server.c (program_signals, program_signals_p): New.
4533 (handle_general_set): Handle QProgramSignals.
4534 * server.h (program_signals, program_signals_p): Declare.
4536 2012-03-05 Pedro Alves <palves@redhat.com>
4537 Jan Kratochvil <jan.kratochvil@redhat.com>
4539 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4542 2012-03-03 Yao Qi <yao@codesourcery.com>
4544 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4545 agent_look_up_symbols.
4547 2012-03-03 Yao Qi <yao@codesourcery.com>
4549 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4550 (linux-x86-low.o): Likewise.
4551 * server.h: Remove in_process_agent_loaded.
4552 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4556 2012-03-03 Yao Qi <yao@codesourcery.com>
4558 * tracepoint.c (gdb_agent_capability): New global.
4559 (in_process_agent_loaded_ust): Renamed to
4560 `in_process_agent_supports_ust'.
4562 (in_process_agent_supports_ust): Call agent_capability_check.
4563 (clear_installed_tracepoints): Assert that agent supports
4566 2012-03-03 Yao Qi <yao@codesourcery.com>
4568 * linux-low.c (linux_supports_agent): New.
4569 (linux_target_ops): Initialize field `supports_agent' with
4570 linux_supports_agent.
4571 * target.h (struct target_ops) <supports_agent>: New.
4572 (target_supports_agent): New macro.
4573 * server.c (handle_general_set): Handle packet 'QAgent'.
4574 (handle_query): Send `QAgent+'.
4575 * Makefile.in (server.o): Depends on agent.h.
4577 2012-03-03 Yao Qi <yao@codesourcery.com>
4579 * Makefile.in (OBS): Add agent.o.
4580 Add new rule for agent.o.
4581 Track dependence of tracepoint.c on agent.h.
4582 * tracepoint.c (run_inferior_command_1):
4583 (run_inferior_command): Call agent_run_command.
4584 (gdb_ust_connect_sync_socket): Deleted. Move it to
4586 (resume_thread, stop_thread): Likewise.
4587 (gdb_ust_socket_init): Renamed to ...
4588 (gdb_agent_socket_init): ... New.
4589 (gdb_ust_thread): Renamed to ...
4590 (gdb_agent_helper_thread): ... New.
4591 (gdb_ust_init): Move some code to ...
4592 (gdb_agent_init): ... here. New.
4593 [HAVE_UST]: Call gdb_ust_init.
4594 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4595 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4596 * config.in, configure: Regenerated.
4598 2012-03-02 Pedro Alves <palves@redhat.com>
4600 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4601 * linux-low.c (struct simple_pid_list): New.
4602 (stopped_pids): New a struct simple_pid_list pointer.
4603 (add_to_pid_list, pull_pid_from_list): New.
4604 (handle_extended_wait): Don't assume the first signal new children
4605 report is SIGSTOP. Adjust call to pull_pid_from_list.
4606 (linux_wait_for_lwp): Adjust.
4608 2012-03-02 Yao Qi <yao@codesourcery.com>
4610 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4613 2012-03-02 Yao Qi <yao@codesourcery.com>
4615 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4616 `stop_pc' and `tpoint'. Update caller.
4618 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4620 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4621 * linux-low.c (use_linux_regsets): New macro.
4622 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4623 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4624 (linux_register_in_regsets): New function.
4625 (usr_fetch_inferior_registers): Skip registers covered by
4627 (usr_store_inferior_registers): Likewise.
4628 (usr_fetch_inferior_registers): New macro.
4629 (usr_store_inferior_registers): Likewise.
4630 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4631 (linux_store_registers): Likewise.
4632 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4634 (init_registers_mips64_dsp_linux): Likewise.
4635 (init_registers_mips_linux): New macro.
4636 (init_registers_mips_dsp_linux): Likewise.
4637 (mips_dsp_num_regs): Likewise.
4638 (DSP_BASE, DSP_CONTROL): New fallback macros.
4639 (mips_base_regs): New macro.
4640 (mips_regmap): Use it. Fix the size.
4641 (mips_dsp_regmap): New variable.
4642 (mips_dsp_regset_bitmap): Likewise.
4643 (mips_arch_setup): New function.
4644 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4646 (mips_cannot_store_register): Likewise.
4647 (the_low_target): Update .arch_setup, .num_regs and .regmap
4648 initializers. Add .regset_bitmap initializer.
4649 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4651 * linux-bfin-low.c (the_low_target): Likewise.
4652 * linux-cris-low.c (the_low_target): Likewise.
4653 * linux-crisv32-low.c (the_low_target): Likewise.
4654 * linux-ia64-low.c (the_low_target): Likewise.
4655 * linux-m32r-low.c (the_low_target): Likewise.
4656 * linux-m68k-low.c (the_low_target): Likewise.
4657 * linux-ppc-low.c (the_low_target): Likewise.
4658 * linux-s390-low.c (the_low_target): Likewise.
4659 * linux-sh-low.c (the_low_target): Likewise.
4660 * linux-sparc-low.c (the_low_target): Likewise.
4661 * linux-tic6x-low.c (the_low_target): Likewise.
4662 * linux-x86-low.c (the_low_target): Likewise.
4663 * linux-xtensa-low.c (the_low_target): Likewise.
4664 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4665 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4666 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4668 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4669 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4671 2012-02-29 Yao Qi <yao@codesourcery.com>
4672 Pedro Alves <palves@redhat.com>
4674 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4675 `step_over_finished' is true.
4677 2012-02-27 Pedro Alves <palves@redhat.com>
4679 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4680 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4682 2012-02-27 Pedro Alves <palves@redhat.com>
4685 * linux-low.c (pid_is_stopped): New.
4686 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4688 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4690 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4693 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4695 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4697 2012-02-24 Luis Machado <lgustavo@codesourcery>
4699 * server.c (handle_query): Advertise support for target-side
4700 breakpoint condition evaluation.
4701 (process_point_options): New function.
4702 (process_serial_event): When inserting a breakpoint, check for
4703 a target-side condition that should be evaluated.
4705 * mem-break.c: Include regcache.h and ax.h.
4706 (point_cond_list_t): New data structure.
4707 (breakpoint) <cond_list>: New field.
4708 (find_gdb_breakpoint_at): Make non-static.
4709 (delete_gdb_breakpoint_at): Clear any target-side
4711 (clear_gdb_breakpoint_conditions): New function.
4712 (add_condition_to_breakpoint): Likewise.
4713 (add_breakpoint_condition): Likewise.
4714 (gdb_condition_true_at_breakpoint): Likewise.
4715 (gdb_breakpoint_here): Return result directly instead
4716 of going through a local variable.
4718 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4719 (clear_gdb_breakpoint_conditions): Likewise.
4720 (add_breakpoint_condition): Likewise.
4721 (gdb_condition_true_at_breakpoint): Likewise.
4723 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4724 (need_step_over_p): Take target-side breakpoint condition into
4727 2012-02-24 Luis Machado <lgustavo@codesourcery>
4729 * server.h: Include tracepoint.h.
4730 (agent_mem_read, agent_get_trace_state_variable_value,
4731 agent_set_trace_state_variable_value,
4732 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4733 get_set_tsv_func_addr): New prototypes.
4735 * ax.h: New include file.
4736 * ax.c: New source file.
4738 * tracepoint.c: Include ax.h.
4739 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4740 agent_expr, eval_result_type): Move to ax.h.
4741 (parse_agent_expr): Rename to ...
4742 (gdb_parse_agent_expr): ... this, make it non-static and move
4744 (unparse_agent_expr) Rename to ...
4745 (gdb_unparse_agent_expr): ... this, make it non-static and move
4747 (eval_agent_expr): Rename to ...
4748 (eval_tracepoint_agent_expr): ... this.
4749 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4750 forward declarations.
4751 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4752 (agent_get_trace_state_variable_value): New function.
4753 (agent_set_trace_state_variable_value): New function.
4754 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4755 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4756 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4757 (condition_true_at_tracepoint): Likewise.
4758 (parse_agent_expr): Rename to ...
4759 (gdb_parse_agent_expr): ... this and move to ax.c.
4760 (unparse_agent_expr): Rename to ...
4761 (gdb_unparse_agent_expr): ... this and move to ax.c.
4762 (gdb_agent_op_name): Move to ax.c.
4763 (eval_agent_expr): Rename to ...
4764 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4766 (eval_tracepoint_agent_expr): New function.
4767 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4769 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4771 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4772 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4773 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4774 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4775 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4776 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4777 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4778 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4779 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4780 (compile_bytecodes): Remove forward declaration.
4781 (is_goto_target): Move to ax.c.
4782 (compile_bytecodes): Move to ax.c and call
4783 agent_get_trace_state_variable_value (...) and
4784 agent_set_trace_state_variable_value (...).
4786 * Makefile.in: Update ax.c and IPA dependencies.
4788 2012-02-24 Pedro Alves <palves@redhat.com>
4790 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4791 (cmd_bigqtbuffer_circular): ... this. Only handle
4792 'QTBuffer:circular:'.
4793 (handle_tracepoint_general_set): Adjust.
4795 2012-02-16 Yao Qi <yao@codesourcery.com>
4797 * inferiors.c: Move code to ...
4798 * dll.c: .... here. New.
4799 * server.h: Declare clear_dlls.
4800 * Makefile.in (SFILES): Add dll.c.
4804 2012-02-11 Yao Qi <yao@codesourcery.com>
4806 * server.c: (handle_monitor_command): Add a new parameter
4808 (handle_query): Update caller.
4810 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4812 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4813 * configure, config.in: Regenerate.
4814 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4817 2012-02-02 Pedro Alves <palves@redhat.com>
4819 Try SIGKILL first, then PTRACE_KILL.
4820 * linux-low.c (linux_kill_one_lwp): New.
4821 (linux_kill_one_lwp): Rename to ...
4822 (kill_one_lwp_callback): ... this. Use the new
4825 2012-02-02 Pedro Alves <palves@redhat.com>
4827 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4830 2012-01-27 Pedro Alves <palves@redhat.com>
4832 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4833 (elf_64_file_p): Make static.
4834 (linux_pid_exe_is_elf_64_file): New.
4835 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4836 Delete declarations.
4837 (linux_pid_exe_is_elf_64_file): Declare.
4838 * linux-x86-low.c (x86_arch_setup): Use
4839 linux_pid_exe_is_elf_64_file.
4841 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4843 * linux-low.c (linux_wait_for_event_1): Rename to ...
4844 (linux_wait_for_event): ... here and merge it with former
4845 linux_wait_for_event - new variable wait_ptid, use it.
4846 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4848 2012-01-23 Pedro Alves <palves@redhat.com>
4850 * server.c (main): Avoid yet another case of infinite loop while
4851 detaching/killing after a longjmp.
4853 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4856 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4858 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4860 * hostio.c (handle_readlink): New function.
4861 (handle_vFile): Call it to handle "vFile:readlink" packets.
4863 2012-01-20 Pedro Alves <palves@redhat.com>
4864 Ulrich Weigand <ulrich.weigand@linaro.org>
4866 * server.c (handle_v_requests): Only support vAttach and vRun to
4867 start multiple processes when in extended protocol mode.
4869 2012-01-17 Pedro Alves <palves@redhat.com>
4871 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4872 memalign plus mprotect to allocate the scratch buffer.
4874 2012-01-13 Pedro Alves <palves@redhat.com>
4876 * server.c (attach_inferior): Clear `cont_thread'.
4878 2012-01-13 Pedro Alves <palves@redhat.com>
4880 * server.c (main): Avoid infinite loop while detaching/killing
4883 2012-01-09 Doug Evans <dje@google.com>
4885 * server.c (start_inferior): Set last_ptid in --wrapper case.
4887 2012-01-06 Yao Qi <yao@codesourcery.com>
4889 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4891 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4893 2012-01-04 Yao Qi <yao@codesourcery.com>
4895 * tracepoint.c (cmd_qtdp): Print debug message
4896 for static tracepoint.
4898 2012-01-04 Yao Qi <yao@codesourcery.com>
4900 * tracepoint.c (trace_vdebug): Differentiate debug message
4901 between gdbserver and IPA.
4903 2012-01-03 Yao Qi <yao@codesourcery.com>
4905 * tracepoint.c (tracepoint_was_hit): Don't collect for
4908 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4910 * terminal.h: Reformat copyright header.
4912 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4914 * server.c (gdbserver_version): Update copyright year.
4915 * gdbreplay.c (gdbreplay_version): Likewise.
4917 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4919 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4922 2011-12-18 Hui Zhu <teawater@gmail.com>
4923 * linux-low.c (linux_create_inferior): Save return value to ret.
4925 2011-12-18 Hui Zhu <teawater@gmail.com>
4927 * linux-low.c (linux_create_inferior): Save return value to ret.
4929 2011-12-16 Doug Evans <dje@google.com>
4931 * linux-low.c (linux_create_inferior): If stdio connection,
4932 redirect stdin from /dev/null, stdout to stderr.
4933 * remote-utils.c (remote_is_stdio): New static global.
4934 (remote_connection_is_stdio): New function.
4935 (remote_prepare): Handle stdio connection.
4936 (remote_open): Ditto.
4937 (remote_close): Don't close stdin for stdio connections.
4938 (read_prim,write_prim): New functions. Replace all calls to
4939 read/write to these.
4940 * server.c (main): Watch for "-" argument. Move call to
4941 remote_prepare before start_inferior.
4942 * server.h (STDIO_CONNECTION_NAME): New macro.
4943 (remote_connection_is_stdio): Declare.
4945 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4946 in debugging output.
4948 2011-12-15 Yao Qi <yao@codesourcery.com>
4950 * tracepoint.c: Include sys/syscall.h.
4951 (gdb_ust_thread): Remove preprocessor conditional.
4953 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4955 * linux-low.c (linux_detach_one_lwp): Call
4956 the_low_target.prepare_to_resume before detaching.
4958 2011-12-14 Yao Qi <yao@codesourcery.com>
4960 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4963 2011-12-14 Yao Qi <yao@codesourcery.com>
4965 * i386-low.c (i386_low_stopped_data_address): Initialize local
4968 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4972 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4973 DR_CONTROL unless necessary. Extend comments.
4974 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4975 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4977 2011-12-13 Yao Qi <yao@codesourcery.com>
4979 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4981 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4983 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4985 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4986 Print new debug message for such case.
4988 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4990 Fix overlapping memcpy.
4991 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4992 the read_inferior_memory transfer.
4993 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4994 write_inferior_memory transfer.
4995 (set_fast_tracepoint_jump): New variable buf. Use it for the
4996 read_inferior_memory and write_inferior_memory transfers.
4997 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4998 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4999 Use it for the write_inferior_memory transfer.
5000 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5003 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5005 * linux-low.c (fetch_register, store_register): Make code
5006 consistent, fix formatting.
5008 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5010 * linux-low.c (usr_store_inferior_registers): Factor out code
5011 to handle individual registers into...
5012 (store_register): ... this new function.
5014 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5016 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5017 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5018 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5019 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5020 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5021 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5022 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5023 (srv_xmlfiles): Add new XML files.
5025 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5027 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5028 (init_registers_s390_linux32v1): Add prototype.
5029 (init_registers_s390_linux32v2): Likewise.
5030 (init_registers_s390_linux64v1): Likewise.
5031 (init_registers_s390_linux64v2): Likewise.
5032 (init_registers_s390x_linux64v1): Likewise.
5033 (init_registers_s390x_linux64v2): Likewise.
5034 (s390_num_regs): Increment to 52.
5035 (s390_regmap): Add orig_r2 register.
5036 (s390_num_regs_3264): Increment to 68.
5037 (s390_regmap_3264): Add orig_r2 register.
5038 (s390_collect_ptrace_register): Handle orig_r2 register.
5039 (s390_supply_ptrace_register): Likewise.
5040 (s390_fill_last_break): New function.
5041 (s390_store_last_break): Likewise.
5042 (s390_fill_system_call): New function.
5043 (s390_store_system_call): Likewise.
5044 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5046 (s390_check_regset): New function.
5047 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5048 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5049 Update target_regsets for available register sets.
5051 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5052 Jan Kratochvil <jan.kratochvil@redhat.com>
5054 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5055 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5057 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5058 * linux-low.h (struct process_info_private): New member r_debug.
5059 * server.c (handle_qxfer_libraries): Call
5060 the_target->qxfer_libraries_svr4.
5061 (handle_qxfer_libraries_svr4): New function.
5062 (qxfer_packets): New entry "libraries-svr4".
5063 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5064 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5065 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5066 PACKET_qXfer_libraries_svr4.
5068 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5070 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5071 PSW address/mask between 8-byte and 16-byte formats.
5072 (s390_supply_ptrace_register): Likewise.
5073 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5074 basic addressing mode bit.
5076 2011-11-24 Stan Shebs <stan@codesourcery.com>
5078 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5080 2011-11-17 Stan Shebs <stan@codesourcery.com>
5082 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5083 (tracing_start_time): New global.
5084 (tracing_stop_time): New global.
5085 (tracing_user_name): New global.
5086 (tracing_notes): New global.
5087 (tracing_stop_note): New global.
5088 (cmd_qtstart): Set traceframe_usage, start_time.
5089 (stop_tracing): Set stop_time.
5090 (cmd_qtstatus): Report additional status.
5091 (cmd_qtp): New function.
5092 (handle_tracepoint_query): Call it.
5093 (cmd_qtnotes): New function.
5094 (handle_tracepoint_general_set): Call it.
5095 (get_timestamp): Rename from tsv_get_timestamp.
5097 2011-11-14 Stan Shebs <stan@codesourcery.com>
5098 Kwok Cheung Yeung <kcy@codesourcery.com>
5100 * linux-x86-low.c (small_jump_insn): New.
5101 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5102 trampoline and error message, build a trampoline and issue a small
5103 jump instruction to it.
5104 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5105 trampoline and error message.
5106 (x86_get_min_fast_tracepoint_insn_len): New.
5107 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5108 * linux-low.h (struct linux_target_ops): Add arguments to
5109 install_fast_tracepoint_jump_pad operation, add new operation.
5110 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5112 (linux_get_min_fast_tracepoint_insn_len): New function.
5113 (linux_target_op): Add new operation.
5114 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5115 (gdb_trampoline_buffer_end): Ditto.
5116 (gdb_trampoline_buffer_error): Ditto.
5117 (struct ipa_sym_addresses): Add fields for new IPA variables.
5118 (symbol_list): Add entries for new IPA variables.
5119 (struct tracepoint): Add fields to hold the address range of the
5120 trampoline used by the tracepoint.
5121 (trampoline_buffer_head): New static variable.
5122 (trampoline_buffer_tail): Ditto.
5123 (claim_trampoline_space): New function.
5124 (have_fast_tracepoint_trampoline_buffer): New function.
5125 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5127 (install_fast_tracepoint): Ditto, also add error buffer argument.
5128 (cmd_qtminftpilen): New function.
5129 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5130 (fast_tracepoint_from_trampoline_address): New function.
5131 (fast_tracepoint_collecting): Handle trampoline as part of jump
5133 (set_trampoline_buffer_space): New function.
5134 (initialize_tracepoint): Initialize new IPA variables.
5135 * target.h (struct target_ops): Add arguments to
5136 install_fast_tracepoint_jump_pad operation, add new
5137 get_min_fast_tracepoint_insn_len operation.
5138 (target_get_min_fast_tracepoint_insn_len): New.
5139 (install_fast_tracepoint_jump_pad): Add arguments.
5140 * server.h (IPA_BUFSIZ): Define.
5141 * linux-i386-ipa.c: Include extra header files.
5142 (initialize_fast_tracepoint_trampoline_buffer): New function.
5143 (initialize_low_tracepoint): Call it.
5144 * server.h (set_trampoline_buffer_space): Declare.
5145 (claim_trampoline_space): Ditto.
5146 (have_fast_tracepoint_trampoline_buffer): Ditto.
5148 2011-11-14 Yao Qi <yao@codesourcery.com>
5150 * server.c (handle_query): Handle InstallInTrace for qSupported.
5151 * tracepoint.c (add_tracepoint): Sort list.
5152 (install_tracepoint, download_tracepoint): New.
5153 (cmd_qtdp): Call them to install and download tracepoints.
5154 (sort_tracepoints): Removed.
5155 (cmd_qtstart): Update.
5157 2011-11-14 Yao Qi <yao@codesourcery.com>
5159 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5160 * mem-break.h: Declare.
5161 * tracepoint.c (cmd_qtstart): Move some code to ...
5162 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5164 (download_tracepoints): Move some code to ...
5165 (download_tracepoint_1): ... here. New.
5167 2011-11-08 Yao Qi <yao@codesourcery.com>
5169 * remote-utils.c (relocate_instruction): A comment fix.
5171 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5173 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5174 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5175 dr_status_mirror and dr_control_mirror from debug_reg_state.
5176 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5177 (i386_initial_stuff): Remove use of deleted globals.
5178 (i386_get_thread_context, i386_set_thread_context,
5179 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5180 from debug_reg_state.
5182 2011-11-05 Yao Qi <yao@codesourcery.com>
5184 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5185 address as TPOINT's.
5187 2011-11-02 Stan Shebs <stan@codesourcery.com>
5189 * tracepoint.c (agent_mem_read_string): New function.
5190 (eval_agent_expr): Call it for tracenz.
5191 * server.c (handle_query): Report support for tracenz.
5193 2011-11-02 Yao Qi <yao@codesourcery.com>
5195 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5197 2011-11-02 Yao Qi <yao@codesourcery.com>
5199 * target.h: Fix a typo in comment.
5201 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5203 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5204 clobber the breakpoints' shadows with fast tracepoint jumps.
5205 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5206 * target.c (write_inferior_memory): Also pass MYADDR down to
5209 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5211 * configure.ac: Check support for personality routine.
5212 * configure: Regenerate.
5213 * config.in: Likewise.
5214 * linux-low.c: Include <sys/personality.h>.
5215 Define ADDR_NO_RANDOMIZE if necessary.
5216 (linux_create_inferior): Disable address space randomization when
5217 forking inferior, if requested.
5218 (linux_supports_disable_randomization): New function.
5219 (linux_target_ops): Install it.
5220 * server.h (disable_randomization): Declare.
5221 * server.c (disable_randomization): New global variable.
5222 (handle_general_set): Handle QDisableRandomization.
5223 (handle_query): Likewise for qSupported.
5224 (main): Support --disable-randomization and --no-disable-randomization
5225 command line arguments.
5226 * target.h (struct target_ops): Add supports_disable_randomization.
5227 (target_supports_disable_randomization): New macro.
5229 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5231 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5233 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5234 [!PT_GETDSBT] (target_loadmap): New definition.
5235 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5236 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5237 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5238 and PT_GETDSBT to LINUX_LOADMAP.
5239 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5240 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5242 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5244 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5245 (arm_linux_hwbp_cap): New static variable.
5246 (arm_linux_get_hwbp_cap): Replace by ...
5247 (arm_linux_init_hwbp_cap): ... this new function.
5248 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5249 (arm_linux_get_hw_watchpoint_count): Likewise.
5250 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5251 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5252 (arm_prepare_to_resume): Use perror_with_name instead of error.
5254 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5256 * linux-arm-low.c: Include <signal.h>.
5257 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5258 (struct arm_linux_hwbp_cap): New data type.
5259 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5260 (struct arm_linux_hw_breakpoint): New data type.
5261 (MAX_BPTS, MAX_WPTS): Define.
5262 (struct arch_process_info, struct arch_lwp_info): New data types.
5263 (arm_linux_get_hwbp_cap): New function.
5264 (arm_linux_get_hw_breakpoint_count): Likewise.
5265 (arm_linux_get_hw_watchpoint_count): Likewise.
5266 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5267 (arm_hwbp_control_initialize): Likewise.
5268 (arm_hwbp_control_is_enabled): Likewise.
5269 (arm_hwbp_control_is_initialized): Likewise.
5270 (arm_hwbp_control_disable): Likewise.
5271 (arm_linux_hw_breakpoint_equal): Likewise.
5272 (arm_linux_hw_point_initialize): Likewise.
5273 (struct update_registers_data): New data structure.
5274 (update_registers_callback: New function.
5275 (arm_insert_point): Likewise.
5276 (arm_remove_point): Likewise.
5277 (arm_stopped_by_watchpoint): Likewise.
5278 (arm_stopped_data_address): Likewise.
5279 (arm_new_process): Likewise.
5280 (arm_new_thread): Likewise.
5281 (arm_prepare_to_resume): Likewise.
5282 (the_low_target): Register arm_insert_point, arm_remove_point,
5283 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5284 arm_new_thread, and arm_prepare_to_resume.
5286 2011-09-15 Stan Shebs <stan@codesourcery.com>
5288 * server.h (struct emit_ops): Add compare-goto fields.
5289 * tracepoint.c (gdb_agent_op_sizes): New table.
5290 (emit_eq_goto): New function.
5291 (emit_ne_goto): New function.
5292 (emit_lt_goto): New function.
5293 (emit_le_goto): New function.
5294 (emit_gt_goto): New function.
5295 (emit_ge_goto): New function.
5296 (is_goto_target): New function.
5297 (compile_bytecodes): Recognize special cases of compare-goto
5298 combinations and call specialized emitters for them.
5299 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5300 (amd64_emit_ne_goto): New function.
5301 (amd64_emit_lt_goto): New function.
5302 (amd64_emit_le_goto): New function.
5303 (amd64_emit_gt_goto): New function.
5304 (amd64_emit_ge_goto): New function.
5305 (amd64_emit_ops): Add the new functions.
5306 (i386_emit_eq_goto): New function.
5307 (i386_emit_ne_goto): New function.
5308 (i386_emit_lt_goto): New function.
5309 (i386_emit_le_goto): New function.
5310 (i386_emit_gt_goto): New function.
5311 (i386_emit_ge_goto): New function.
5312 (i386_emit_ops): Add the new functions.
5314 2011-09-08 Stan Shebs <stan@codesourcery.com>
5316 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5317 (i386_emit_epilogue): Restore %ebx.
5319 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5321 * server.c (step_thread): Remove definition.
5322 (process_serial_event): Don't handle Hs.
5323 * server.h (step_thread): Remove declaration.
5324 * target.c (set_desired_inferior): Remove use of step_thread.
5326 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5328 * linux-low.c: Include linux-procfs.h.
5329 (linux_attach_lwp_1): Update comments.
5330 (linux_attach): Scan for existing threads when attaching to a
5331 process that is the tgid.
5332 * Makefile.in: Update dependencies.
5334 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5336 * configure.srv: Add linux-procfs.o dependencies.
5338 2011-08-14 Yao Qi <yao@codesourcery.com>
5340 * target.h (struct target_ops): Fix indent.
5341 * win32-low.c (win32_target_ops): Fix comment.
5343 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5344 Yao Qi <yao@codesourcery.com>
5346 * Makefile.in (clean): Remove tic6x-*.c files.
5347 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5348 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5349 (tic6x-c64xp-linux.c): Likewise.
5350 * configure.srv: Add support for tic6x-*-uclinux.
5351 * linux-tic6x-low.c: New.
5352 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5354 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5355 Yao Qi <yao@codesourcery.com>
5357 * target.h (struct target_ops): Add read_loadmap.
5358 * linux-low.c (struct target_loadseg): New type.
5359 (struct target_loadmap): New type.
5360 (linux_read_loadmap): New function.
5361 (linux_target_ops): Add linux_read_loadmap.
5362 * server.c (handle_query): Support qXfer:fdpic:read packet.
5363 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5366 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5368 * win32-low.c: Include <stdint.h>.
5370 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5372 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5373 to the inferior here.
5374 (i386_remove_aligned_watchpoint): Ditto.
5375 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5376 fit part of the watchpoint in the debug registers.
5377 (i386_update_inferior_debug_regs): New.
5378 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5379 registers, and only update the inferior on success.
5380 (i386_low_remove_watchpoint): Ditto.
5382 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5384 * linux-low.c (compare_ints, unique, list_threads, show_process,
5385 linux_core_of_thread): Delete.
5386 (linux_target_ops): Change linux_core_of_thread to
5387 linux_common_core_of_thread.
5388 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5389 * utils.c (malloc_failure): Change type of argument.
5390 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5391 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5392 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5393 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5394 (IPA_OBJS): Add common-utils-ipa.o.
5395 (ptid_h, linux_osdata_h): New macros.
5396 (server_h): Add common/common-utils.h, common/xml-utils.h,
5397 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5399 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5400 ptid.o, buffer.o): New rules.
5401 (linux-low.o): Add common/linux-osdata.h as a dependency.
5402 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5403 * configure.ac: Add AC_HEADER_DIRENT check.
5404 * config.in: Regenerate.
5405 * configure: Regenerate.
5406 * remote-utils.c (xml_escape_text): Delete.
5407 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5408 buffer_xml_printf): Move to common/buffer.c.
5409 * server.c (main): Remove call to initialize_inferiors.
5410 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5411 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5412 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5413 internal_error, gdb_assert, gdb_assert_fail): Delete.
5414 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5415 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5417 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5418 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5419 initialize_inferiors): Delete.
5421 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5423 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5426 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5428 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5430 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5432 2011-05-26 Yao Qi <yao@codesourcery.com>
5434 * Makefile.in (thread-db.o): Track dependence to
5435 common/gdb_thread_db.h.
5436 * thread-db.c: include gdb_thread_db.h from right place.
5438 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5440 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5441 __FILE__ and __LINE__ to internal_error.
5443 2011-05-13 Doug Evans <dje@google.com>
5445 * thread-db.c (try_thread_db_load_from_sdir): New function.
5446 (try_thread_db_load_from_dir): New function.
5447 (thread_db_load_search): Handle $sdir, ignore $pdir.
5448 Remove trying of system directories if search of
5449 libthread-db-search-path fails, that is now done via $sdir.
5451 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5453 * server.c (handle_query): Add EnableDisableTracepoints to the list
5454 of supported features.
5455 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5457 (cmd_qtenable_disable): New.
5458 (cmd_qtstart): Install tracepoints even if disabled.
5459 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5460 receiving a QTEnable or QTDisable packet.
5461 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5462 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5464 (gdb_probe): Skip data collection if static tracepoint is disabled.
5466 2011-05-10 Doug Evans <dje@google.com>
5468 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5470 2011-05-04 Doug Evans <dje@google.com>
5472 * linux-low.c (linux_join): Skip process lookup.
5473 * spu-low.c (spu_join): Ditto.
5474 * server.c (join_inferiors_callback): Delete.
5475 (process_serial_event): For 'D' packet (detach) call join_inferior
5478 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5480 * README: Don't mention xscale*-*-linux*.
5481 * configure.srv (xscale*-*-linux*): Don't handle target.
5483 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5485 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5487 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5488 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5489 (i386_emit_void_call_2): Likewise.
5491 2011-04-26 Yao Qi <yao@codesourcery.com>
5493 * linux-low.c: Move common macros to linux-ptrace.h.
5494 Include linux-ptrace.h.
5495 * Makefile.in (linux_ptrace_h): New.
5496 (linux-low.o): Depends on linux-ptrace.h.
5498 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5500 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5501 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5502 (remote_prepare): New function with most of the TCP code from ...
5503 (remote_open): ... here. Detect PORT here unconditionally. Move also
5504 setting transport_is_reliable.
5505 * server.c (run_once): New variable.
5506 (gdbserver_usage): Document it.
5507 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5508 the first run if RUN_ONCE.
5509 * server.h (run_once, remote_prepare): New declarations.
5511 2011-04-19 Tom Tromey <tromey@redhat.com>
5513 * win32-low.c (handle_load_dll): Remove duplicate "the".
5515 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5517 Remove support for old Cygwin 1.5 versions.
5518 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5519 function to avoid warning.
5520 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5523 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5525 * gdbserver/server.h (Macro _): Define it if not available.
5527 2011-03-14 Michael Snyder <msnyder@vmware.com>
5529 * hostio.c (handle_close): Remove unnecessary null test.
5531 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5533 * Makefile.in (maintainer-clean realclean distclean): Remove
5534 "make ... subdir_do" command.
5536 2011-03-10 Michael Snyder <msnyder@vmware.com>
5538 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5540 * server.c (handle_v_run): Free alloced buffer on early return.
5542 2011-03-09 Yao Qi <yao@codesourcery.com>
5545 2011-03-04 Yao Qi <yao@codesourcery.com>
5547 * Makefile.in: Remove GNU make feature --directory.
5549 2011-03-05 Yao Qi <yao@codesourcery.com>
5551 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5552 (subdir_do): New make target. Copied from gdb/Makefile.
5553 (maintainer-clean, realclean, distclean, clean): Call corresponding
5554 make targets in common/Makefile.
5556 2011-02-11 Yao Qi <yao@codesourcery.com>
5558 * configure.ac: Call AC_PROG_RANLIB.
5559 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5560 * configure: Regenerate.
5562 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5564 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5566 2011-03-06 Yao Qi <yao@codesourcery.com>
5568 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5570 2011-03-05 Yao Qi <yao@codesourcery.com>
5572 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5573 (subdir_do): New make target. Copied from gdb/Makefile.
5574 (maintainer-clean, realclean, distclean, clean): Call corresponding
5575 make targets in common/Makefile.
5577 2011-03-04 Yao Qi <yao@codesourcery.com>
5579 * Makefile.in: Remove GNU make feature --directory.
5581 2011-03-04 Michael Snyder <msnyder@vmware.com>
5583 * server.c (queue_stop_reply): Call xmalloc not malloc.
5585 2011-03-02 Michael Snyder <msnyder@vmware.com>
5587 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5589 2011-02-28 Michael Snyder <msnyder@vmware.com>
5591 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5592 (cmd_qtframe): Ditto.
5593 (cmd_qtbuffer): Ditto.
5594 (cmd_bigqtbuffer): Ditto.
5596 * utils.c (decimal2str): Initialize 'width' to nine, then
5599 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5601 * hostio.c (require_data): Free *data, not data.
5603 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5605 * hostio.c (require_data): Use free, not xfree.
5607 2011-02-27 Michael Snyder <msnyder@vmware.com>
5609 * server.c (handle_query): Discard unused value.
5611 * hostio.c (require_data): Free malloc memory before returning
5614 2011-02-26 Michael Snyder <msnyder@vmware.com>
5616 * linux-low.c (list_threads): Call closedir for dirent.
5618 2011-02-27 Michael Snyder <msnyder@vmware.com>
5620 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5621 a case statement falls through.
5623 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5625 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5628 2011-02-26 Michael Snyder <msnyder@vmware.com>
5630 * utils.c (decimal2str): Eliminate dead code and dead param.
5631 (pulongest): Drop dead param from call to decimal2str.
5634 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5636 Revert the following patch (not approved yet):
5637 2011-02-21 Hui Zhu <teawater@gmail.com>
5638 * tracepoint.c (tp_printf): New function.
5639 (eval_agent_expr): Handle gdb_agent_op_printf.
5641 2011-02-21 Hui Zhu <teawater@gmail.com>
5643 * tracepoint.c (tp_printf): New function.
5644 (eval_agent_expr): Handle gdb_agent_op_printf.
5646 2011-02-18 Tom Tromey <tromey@redhat.com>
5648 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5649 (tracepoint.o): Likewise.
5650 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5651 (gdb_agent_op_names): Likewise.
5653 2011-02-18 Tom Tromey <tromey@redhat.com>
5655 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5656 gdb_agent_op_rot>: New constants.
5657 (gdb_agent_op_names): Add pick and roll.
5658 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5661 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5663 * aclocal.m4: Regenerated with aclocal-1.11.1.
5665 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5667 * server.c (handle_qxfer_traceframe_info): New.
5668 (qxfer_packets): Register "traceframe-info".
5669 (handle_query): Report support for qXfer:traceframe-info:read+.
5670 * tracepoint.c (match_blocktype): New.
5671 (traceframe_find_block_type): Rename to ...
5672 (traceframe_walk_blocks): ... this. Add callback filter argument,
5674 (traceframe_find_block_type): New, reimplemented on top of
5675 traceframe_walk_blocks.
5676 (build_traceframe_info_xml): New.
5677 (traceframe_read_info): New.
5678 * server.h (traceframe_read_info): Declare.
5680 2011-02-11 Yao Qi <yao@codesourcery.com>
5682 * configure.ac: Call AC_PROG_RANLIB.
5683 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5684 * configure: Regenerate.
5686 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5688 * server.c (gdb_read_memory): Change return semantics to allow
5690 (handle_search_memory_1): Adjust.
5691 (process_serial_event) <'m' packet>: Handle partial transfers.
5692 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5694 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5696 * regcache.c (init_register_cache): Initialize
5697 regcache->register_status.
5698 (free_register_cache): Release regcache->register_status.
5699 (regcache_cpy): Copy register_status.
5700 (registers_to_string): Print 'x's for unavailable registers.
5701 (supply_register): Mark the register's status valid or
5702 unavailable, depending on whether a buffer was passed in or not.
5703 (supply_register_zeroed): New.
5704 (supply_regblock): Mark the registers' status valid or
5705 unavailable, depending on whether a buffer was passed in or not.
5706 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5707 (struct regcache): New `register_status' field.
5708 (supply_register_zeroed): Declare.
5709 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5710 supply_register_zeroed, rather than passing a NULL buffer to
5712 * tracepoint.c (fetch_traceframe_registers): Update comment.
5714 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5716 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5719 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5721 * server.h (decode_xfer_write): Change prototype.
5722 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5723 and don't extract the annex here.
5724 * server.c (decode_xfer_read): Remove `annex' parameter,
5725 and don't extract the annex here.
5727 (struct qxfer): New.
5728 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5729 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5730 (handle_qxfer_statictrace): New functions, abstracted out from
5731 handle_query, and made to use the struct qxfer interface.
5732 (handle_threads_qxfer_proper): Rename to ...
5733 (handle_qxfer_threads_proper): ... this.
5734 (handle_threads_qxfer): Rename to ...
5735 (handle_qxfer_threads): ... this. Adjust.
5736 (qxfer_packets): New array.
5737 (handle_qxfer): New function.
5738 (handle_query): Use handle_qxfer.
5740 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5742 * gdbreplay.c: Shorten lines of >= 80 columns.
5743 * linux-low.c: Ditto.
5744 * linux-ppc-low.c: Ditto.
5745 * linux-s390-low.c: Ditto.
5746 * linux-sparc-low.c: Ditto.
5747 * linux-x86-low.c: Ditto.
5748 * linux-xtensa-low.c: Ditto.
5749 * mem-break.c: Ditto.
5751 * regcache.h: Ditto.
5752 * remote-utils.c: Ditto.
5755 * thread-db.c: Ditto.
5756 * tracepoint.c: Ditto.
5758 * win32-low.h: Ditto.
5760 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5762 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5765 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5767 * server.c (gdbserver_version): Update copyright year in version
5769 * gdbreplay.c (gdbreplay_version): Ditto.
5771 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5773 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5774 * linux-bfin-low.c: New file.
5775 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5776 PT_DATA_ADDR for BFIN targets.
5777 * Makefile.in (SFILES): Add linux-bfin-low.c.
5778 (clean): Remove reg-bfin.c.
5779 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5780 * README: Mention supported Blackfin targets.
5782 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5784 * .gitignore: New file.
5786 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5788 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5790 2010-10-22 Jie Zhang <jie@codesourcery.com>
5792 * Makefile.in: Add FLAGS_TO_PASS variable.
5793 (install): Remove dependency of install-only and recursively
5794 invoke make for install-only.
5796 2010-10-04 Doug Evans <dje@google.com>
5798 * Makefile.in (uninstall): Use $(DESTDIR).
5800 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5804 * linux-x86-low.c (compat_siginfo_from_siginfo)
5805 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5806 si_code is < 0. Check for si_code == SI_TIMER before checking for
5809 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5811 * lynx-i386-low.c: New file.
5812 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5814 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5816 * lynx-low.c (ptrace_request_to_str): Remove handling for
5817 request values that have been removed in LynxOS 5.x.
5819 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5821 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5824 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5826 * configure.ac: Add --enable-inprocess-agent option.
5827 * configure: Rebuilt.
5829 2010-09-06 Yao Qi <yao@codesourcery.com>
5831 * linux-low.c (linux_kill): Remove unused variable.
5832 (linux_stabilize_threads): Likewise.
5833 * server.c (start_inferior): Likewise.
5834 (queue_stop_reply_callback): Likewise.
5835 * tracepoint.c (do_action_at_tracepoint): Likewise.
5837 2010-09-06 Yao Qi <yao@codesourcery.com>
5839 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5842 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5844 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5846 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5848 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5851 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5853 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5854 gdbserver/lynx-ppc-low.c: New files.
5855 * Makefile.in (lynx_low_h): New variable.
5856 (lynx-low.o, lynx-ppc-low.o): New rules.
5857 * configure.ac: On LynxOS, link with -lnetinet.
5858 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5859 * configure: regenerate.
5861 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5863 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5864 * configure.ac: Add check for vasprintf and vsnprintf.
5865 * configure, config.in: Regenerate.
5866 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5868 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5870 * gdbreplay.c: Move include of alloca.h up, next to include of
5872 * server.h: Add include of malloc.h.
5873 * mem-break.c: Remove include of malloc.h.
5874 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5876 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5878 * Makefile.in (memmem.o): Build with -Wno-error.
5880 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5882 * utils.c (xsnprintf): Make non-static.
5883 * server.h: Add xsnprintf declaration.
5884 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5885 replace calls to snprintf by calls to xsnprintf throughout.
5887 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5889 * configure.ac: Add configure check for alloca.
5890 * configure, config.in: Regenerate.
5891 * server.h: Include alloca.h if it exists.
5892 * gdbreplay.c: Include alloca.h if it exists.
5894 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5896 * linux-low.c (__SIGRTMIN): Define if not already defined.
5897 (linux_create_inferior): Check for __ANDROID__ rather than
5899 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5900 are already deferred.
5901 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5902 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5903 stopped and already has a pending signal to report.
5904 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5905 a pending signal to report or is moving out of a jump pad.
5906 (linux_init_signals): Check for __ANDROID__ rather than
5909 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5911 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5912 debug_threads check. Avoid a linear search when not doing debug
5915 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5917 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5918 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5919 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5920 (process_event): Change local fd's type to gdb_fildes_t.
5921 (create_file_handler): Adjust prototype.
5922 (delete_file_handler): Adjust prototype.
5923 (handle_file_event): Adjust prototype. Use pfildes.
5924 (create_file_event): Adjsut prototype.
5925 * remote-utils.c (remote_desc, listen_desc): Change type to
5927 * server.h: New gdb_fildes_t typedef.
5928 [USE_WIN32API]: Include winsock2.h.
5929 (delete_file_handler, add_file_handler): Adjust prototypes.
5931 * utils.c (pfildes): New.
5933 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5935 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5936 * configure: Regenerate.
5938 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5940 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5941 (linux_done_accessing_memory): ... this.
5942 (linux_target_ops): Adjust.
5943 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5944 * nto-low.c (nto_target_ops): Adjust comment.
5945 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5946 * spu-low.c (spu_target_ops): Adjust comment.
5947 * target.h (target_ops): Rename unprepare_to_access_memory field
5948 to done_accessing_memory.
5949 (unprepare_to_access_memory): Rename to ...
5950 (done_accessing_memory): ... this.
5952 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5954 * linux-low.c (linux_prepare_to_access_memory): New.
5955 (linux_unprepare_to_access_memory): New.
5956 (linux_target_ops): Install them.
5957 * server.c (read_memory): Rename to ...
5958 (gdb_read_memory): ... this. Use
5959 prepare_to_access_memory/prepare_to_access_memory.
5960 (write_memory): Rename to ...
5961 (gdb_write_memory): ... this. Use
5962 prepare_to_access_memory/prepare_to_access_memory.
5963 (handle_search_memory_1): Adjust.
5964 (process_serial_event): Adjust.
5965 * target.h (struct target_ops): New fields
5966 prepare_to_access_memory and unprepare_to_access_memory.
5967 (prepare_to_access_memory, unprepare_to_access_memory): New.
5968 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5969 prepare_to_access_memory/prepare_to_access_memory.
5970 * nto-low.c (nto_target_ops): Adjust.
5971 * spu-low.c (spu_target_ops): Adjust.
5972 * win32-low.c (win32_target_ops): Adjust.
5974 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5976 * Makefile.in (WARN_CFLAGS): Get it from configure.
5977 (WERROR_CFLAGS): New.
5978 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5979 * configure.ac: Introduce --enable-werror, which adds -Werror to
5980 the compiler command line. Enabled by default. Disable with
5981 --disable-werror. Add -Wdeclaration-after-statement
5982 Wpointer-arith and -Wformat-nonliteral to warning flags.
5983 * configure: Regenerate.
5985 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5987 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5989 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5991 * gdbreplay.c (remote_error): New.
5993 (expect): Use gdbchar. Check for error reading from GDB.
5994 Clarify sync error output.
5995 (play): Check for errors writing to GDB.
5996 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5997 * remote-utils.c (getpkt): Check for errors writing to the remote
6000 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6002 * linux-low.c (linux_wait_1): Move non-debugging code out of
6003 `debug_threads' control.
6005 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6007 * linux-low.c (linux_wait_1): Don't set last_status here.
6008 * server.c (push_event, queue_stop_reply_callback): Assert we're
6009 not pushing a TARGET_WAITKIND_IGNORE event.
6010 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6011 (myresume, handle_target_event): Set the thread's last_resume_kind
6012 and last_status from the target returned status.
6014 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6018 * linux-x86-low.c (update_debug_registers_callback): New.
6019 (i386_dr_low_set_addr): Use it.
6020 (i386_dr_low_get_addr): New.
6021 (i386_dr_low_set_control): Use update_debug_registers_callback.
6022 (i386_dr_low_get_control): New.
6023 (i386_dr_low_get_status): Adjust.
6024 * linux-low.c (linux_stop_lwp): New.
6025 * linux-low.h (linux_stop_lwp): Declare.
6027 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6028 argument instead of a i386_debug_reg_state.
6029 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6030 a i386_debug_reg_state.
6031 (i386_insert_aligned_watchpoint): Adjust.
6032 (i386_remove_aligned_watchpoint): Adjust.
6033 (i386_low_stopped_data_address): Read the debug registers from the
6034 inferior instead of from the mirrors.
6035 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6036 (i386_dr_low_get_addr): Declare.
6037 (i386_dr_low_get_control): Declare.
6038 (i386_dr_low_get_status): Change prototype.
6040 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6041 (i386_dr_low_get_addr): New.
6042 (i386_dr_low_get_control): New.
6043 (i386_dr_low_get_status): Adjust prototype. Return
6045 (i386_initial_stuff): Clear dr_status_mirror and
6047 (i386_get_thread_context): Adjust.
6048 (i386_set_thread_context): Adjust.
6049 (i386_thread_added): Adjust.
6051 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6053 * linux-low.h (linux_thread_area): Delete declaration.
6055 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6057 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6058 after its termination.
6060 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6062 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6063 (gdb_wants_all_stopped): Delete.
6064 (linux_wait_1): Don't call them.
6065 * server.c (handle_v_cont): Tag all threads as want-stopped.
6066 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6067 stopped as "client-wants-stopped".
6069 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6071 * Makefile.in (signals_h): New.
6072 (server_h): Depend on it.
6073 (server.o): Don't depend on $(signals_def).
6074 (signals.o): Depend on $(signals_def).
6076 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6078 * Makefile.in (signals_def): New.
6079 (server_h): Append include/gdb/signals.h and signals_def.
6080 (server.o): Append signals_def.
6082 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6084 * server.c (handle_target_event): Use target_signal_to_host for
6085 resume_info.sig initialization.
6086 * target.h (struct thread_resume) <sig>: New comment.
6088 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6090 * server.c (handle_query): strcpy() the returned string from paddress()
6091 instead of sprintf().
6092 * utils.c (paddress): Return phex_nz().
6094 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6096 * server.c (handle_v_cont): Call mourn_inferior if process
6098 (myresume): Likewise.
6100 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6102 Static tracepoints, and integration with UST.
6104 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6105 * mem-break.c (uninsert_all_breakpoints)
6106 (reinsert_all_breakpoints): New.
6107 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6108 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6109 (gdb_agent_ust_loaded, helper_thread_id)
6110 (gdb_agent_helper_thread_id): New macros.
6111 (struct ipa_sym_addresses): Add addr_ust_loaded,
6112 addr_helper_thread_id, addr_cmd_buf.
6113 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6114 (in_process_agent_loaded_ust): New.
6115 (write_e_ust_not_loaded): New.
6116 (maybe_write_ipa_ust_not_loaded): New.
6117 (struct collect_static_trace_data_action): New.
6118 (enum tracepoint_type) <static_tracepoint>: New.
6119 (struct tracepoint) <handle>: Mention static tracepoints.
6120 (struct static_tracepoint_ctx): New.
6121 (CMD_BUF_SIZE): New.
6122 (add_tracepoint_action): Handle static tracepoint actions.
6123 (unprobe_marker_at): New.
6124 (clear_installed_tracepoints): Handle static tracepoints.
6125 (cmd_qtdp): Handle static tracepoints.
6126 (probe_marker_at): New.
6127 (cmd_qtstart): Handle static tracepoints.
6128 (response_tracepoint): Handle static tracepoints.
6129 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6130 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6131 (get_context_regcache): Handle static tracepoints.
6132 (do_action_at_tracepoint): Handle static tracepoint actions.
6133 (traceframe_find_block_type): Handle static trace data blocks.
6134 (traceframe_read_sdata): New.
6135 (download_tracepoints): Download static tracepoint actions.
6136 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6137 (GDB_PROBE_NAME): New.
6142 (ust_marker_to_static_tracepoint): New.
6144 (collect_ust_data_at_tracepoint): New.
6145 (gdb_ust_probe): New.
6146 (UNIX_PATH_MAX, SOCK_DIR): New.
6147 (gdb_ust_connect_sync_socket): New.
6148 (resume_thread, stop_thread): New.
6149 (run_inferior_command): New.
6150 (init_named_socket): New.
6151 (gdb_ust_socket_init): New.
6152 (cstr_to_hexstr): New.
6154 (first_marker, next_marker): New.
6155 (response_ust_marker): New.
6156 (cmd_qtfstm, cmd_qtsstm): New.
6157 (unprobe_marker_at, probe_marker_at): New.
6158 (cmd_qtstmat, gdb_ust_thread): New.
6159 (gdb_ust_init): New.
6160 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6161 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6163 (x86_64_st_collect_regmap): New.
6164 (X86_64_NUM_ST_COLLECT_GREGS): New.
6165 (AMD64_RIP_REGNUM): New.
6166 (supply_static_tracepoint_registers): New.
6167 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6169 (i386_st_collect_regmap): New.
6170 (i386_NUM_ST_COLLECT_GREGS): New.
6171 (supply_static_tracepoint_registers): New.
6172 * server.c (handle_query): Handle qXfer:statictrace:read.
6173 <qSupported>: Report support for StaticTracepoints, and
6174 qXfer:statictrace:read features.
6175 * server.h (traceframe_read_sdata)
6176 (supply_static_tracepoint_registers): Declare.
6177 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6178 (unpack_varlen_hex): Include in IPA build.
6179 * Makefile.in (ustlibs, ustinc): New.
6180 (IPA_OBJS): Add remote-utils-ipa.o.
6181 ($(IPA_LIB)): Link -ldl and -lpthread.
6183 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6184 * config.in, configure: Regenerate.
6186 2010-06-20 Ian Lance Taylor <iant@google.com>
6187 Pedro Alves <pedro@codesourcery.com>
6189 * linux-x86-low.c (always_true): Delete.
6190 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6191 trying to fool the compiler with always_true.
6193 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6195 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6196 conditions in gdbserver.
6198 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6200 * spu-low.c (spu_read_memory): Wrap around local store limit.
6201 (spu_write_memory): Likewise.
6203 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6205 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6206 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6208 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6210 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6211 uses with LONGEST uses.
6213 2010-06-14 Stan Shebs <stan@codesourcery.com>
6214 Pedro Alves <pedro@codesourcery.com>
6218 * linux-x86-low.c: Include limits.h.
6223 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6224 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6225 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6226 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6227 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6228 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6229 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6230 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6231 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6232 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6233 (amd64_emit_void_call_2): New.
6234 (amd64_emit_ops): New.
6235 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6236 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6237 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6238 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6239 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6240 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6241 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6242 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6243 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6244 (i386_emit_stack_adjust, i386_emit_int_call_1)
6245 (i386_emit_void_call_2): New.
6246 (i386_emit_ops): New.
6247 (x86_emit_ops): New.
6248 (the_low_target): Install x86_emit_ops.
6249 * server.h (struct emit_ops): New.
6250 (get_raw_reg_func_addr): Declare.
6251 (current_insn_ptr, emit_error): Declare.
6252 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6253 (set_trace_state_variable_value): New defines.
6254 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6255 addr_get_trace_state_variable_value and
6256 addr_set_trace_state_variable_value.
6257 (symbol_list): New fields for get_raw_reg,
6258 get_trace_state_variable_value and set_trace_state_variable_value.
6259 (condfn): New typedef.
6260 (struct tracepoint): New field `compiled_cond'.
6261 (do_action_at_tracepoint): Clear compiled_cond.
6262 (get_trace_state_variable_value, set_trace_state_variable_value):
6264 (condition_true_at_tracepoint): If there's a compiled condition,
6266 (current_insn_ptr, emit_error): New globals.
6267 (struct bytecode_address): New.
6268 (get_raw_reg_func_addr): New.
6269 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6270 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6271 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6272 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6273 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6274 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6275 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6276 (compile_tracepoint_condition, compile_bytecodes): New.
6277 * target.h (emit_ops): Forward declare.
6278 (struct target_ops): New field emit_ops.
6279 (target_emit_ops): New.
6280 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6281 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6282 * linux-low.c (linux_emit_ops): New.
6283 (linux_target_ops): Install it.
6284 * linux-low.h (struct linux_target_ops): New field emit_ops.
6286 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6288 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6289 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6291 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6292 Stan Shebs <stan@codesourcery.com>
6294 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6295 (all): Depend on $(extra_libraries).
6296 (install-only): Install the IPA.
6297 (IPA_OBJS, IPA_LIB): New.
6298 (clean): Remove the IPA lib.
6299 (IPAGENT_CFLAGS): New.
6300 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6301 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6302 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6303 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6304 * configure.ac: Check for atomic builtins support in the compiler.
6305 (IPA_DEPFILES, extra_libraries): Define.
6306 * configure.srv (ipa_obj): Add description.
6307 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6308 (i[34567]86-*-linux*): Set ipa_obj.
6309 (x86_64-*-linux*): Set ipa_obj.
6310 * linux-low.c (stabilizing_threads): New.
6311 (supports_fast_tracepoints): New.
6312 (linux_detach): Stabilize threads before detaching.
6313 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6314 the lwp is either not stabilizing, or is moving out of a jump pad.
6315 (linux_fast_tracepoint_collecting): New.
6316 (maybe_move_out_of_jump_pad): New.
6317 (enqueue_one_deferred_signal): New.
6318 (dequeue_one_deferred_signal): New.
6319 (linux_wait_for_event_1): If moving out of a jump pad, defer
6320 pending signals to later.
6321 (linux_stabilize_threads): New.
6322 (linux_wait_1): Check if threads need moving out of jump pads, and
6324 (stuck_in_jump_pad_callback): New.
6325 (move_out_of_jump_pad_callback): New.
6327 (linux_resume_one_lwp): Handle moving out of jump pads.
6328 (linux_set_resume_request): Dequeue deferred signals.
6329 (need_step_over_p): Also step over fast tracepoint jumps.
6330 (start_step_over): Also uninsert fast tracepoint jumps.
6331 (finish_step_over): Also reinsert fast tracepoint jumps.
6332 (linux_install_fast_tracepoint_jump): New.
6333 (linux_target_ops): Install linux_stabilize_threads and
6334 linux_install_fast_tracepoint_jump_pad.
6335 * linux-low.h (linux_target_ops) <get_thread_area,
6336 install_fast_tracepoint_jump_pad>: New fields.
6337 (struct lwp_info) <collecting_fast_tracepoint,
6338 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6339 (linux_get_thread_area): Declare.
6340 * linux-x86-low.c (jump_insn): New.
6341 (x86_get_thread_area): New.
6342 (append_insns): New.
6344 (amd64_install_fast_tracepoint_jump_pad): New.
6345 (i386_install_fast_tracepoint_jump_pad): New.
6346 (x86_install_fast_tracepoint_jump_pad): New.
6347 (the_low_target): Install x86_get_thread_area and
6348 x86_install_fast_tracepoint_jump_pad.
6349 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6350 (struct fast_tracepoint_jump): New.
6351 (fast_tracepoint_jump_insn): New.
6352 (fast_tracepoint_jump_shadow): New.
6353 (find_fast_tracepoint_jump_at): New.
6354 (fast_tracepoint_jump_here): New.
6355 (delete_fast_tracepoint_jump): New.
6356 (set_fast_tracepoint_jump): New.
6357 (uninsert_fast_tracepoint_jumps_at): New.
6358 (reinsert_fast_tracepoint_jumps_at): New.
6359 (set_breakpoint_at): Use write_inferior_memory.
6360 (uninsert_raw_breakpoint): Use write_inferior_memory.
6361 (check_mem_read): Mask out fast tracepoint jumps.
6362 (check_mem_write): Mask out fast tracepoint jumps.
6363 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6364 (set_fast_tracepoint_jump): Declare.
6365 (delete_fast_tracepoint_jump)
6366 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6367 (reinsert_fast_tracepoint_jumps_at): Declare.
6368 * regcache.c: Don't compile many functions when building the
6369 in-process agent library.
6370 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6371 the register buffer in the heap.
6372 (free_register_cache): If the register buffer isn't owned by the
6373 regcache, don't free it.
6374 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6375 pre-existing register caches.
6376 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6378 (convert_ascii_to_int): : Constify `from' parameter type.
6379 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6380 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6381 the needed buffer in-place.
6382 (relocate_instruction): New.
6383 * server.c (handle_query) <qSymbols>: If the target supports
6384 tracepoints, give it a chance of looking up symbols. Report
6385 support for fast tracepoints.
6386 (handle_status): Stabilize threads.
6387 (process_serial_event): Adjust.
6388 * server.h (struct fast_tracepoint_jump): Forward declare.
6389 (struct process_info) <fast_tracepoint_jumps>: New field.
6390 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6391 (decode_X_packet, decode_M_packet): Adjust.
6392 (relocate_instruction): Declare.
6393 (in_process_agent_loaded): Declare.
6394 (tracepoint_look_up_symbols): Declare.
6395 (struct fast_tpoint_collect_status): Declare.
6396 (fast_tracepoint_collecting): Declare.
6397 (force_unlock_trace_buffer): Declare.
6398 (handle_tracepoint_bkpts): Declare.
6399 (initialize_low_tracepoint)
6400 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6401 * target.h (struct target_ops) <stabilize_threads,
6402 install_fast_tracepoint_jump_pad>: New fields.
6403 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6404 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6405 [HAVE_STDINT_H]: Include stdint.h.
6406 (trace_debug_1): Rename to ...
6407 (trace_vdebug): ... this.
6408 (trace_debug): Rename to ...
6409 (trace_debug_1): ... this. Add `level' parameter.
6411 (ATTR_USED, ATTR_NOINLINE): New.
6412 (IP_AGENT_EXPORT): New.
6413 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6414 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6415 (about_to_request_buffer_space, trace_buffer_is_full)
6416 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6417 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6418 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6419 (traceframe_write_count, traceframes_created)
6420 (trace_state_variables)
6421 New renaming defines.
6422 (struct ipa_sym_addresses): New.
6423 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6425 (ipa_sym_addrs): New.
6426 (all_tracepoint_symbols_looked_up): New.
6427 (in_process_agent_loaded): New.
6428 (write_e_ipa_not_loaded): New.
6429 (maybe_write_ipa_not_loaded): New.
6430 (tracepoint_look_up_symbols): New.
6431 (debug_threads) [IN_PROCESS_AGENT]: New.
6432 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6433 (UNKNOWN_SIDE_EFFECTS): New.
6434 (stop_tracing): New.
6435 (flush_trace_buffer): New.
6436 (stop_tracing_bkpt): New.
6437 (flush_trace_buffer_bkpt): New.
6438 (read_inferior_integer): New.
6439 (read_inferior_uinteger): New.
6440 (read_inferior_data_pointer): New.
6441 (write_inferior_data_pointer): New.
6442 (write_inferior_integer): New.
6443 (write_inferior_uinteger): New.
6444 (struct collect_static_trace_data_action): Delete.
6445 (enum tracepoint_type): New.
6446 (struct tracepoint) <type>: New field `type'.
6447 <actions_str, step_actions, step_actions_str>: Only include in
6449 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6450 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6451 (tracepoints): Use IP_AGENT_EXPORT.
6452 (last_tracepoint): Don't include in the IPA.
6453 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6454 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6455 (alloced_trace_state_variables): New.
6456 (trace_state_variables): Use IP_AGENT_EXPORT.
6457 (traceframe_t): Delete unused variable.
6458 (circular_trace_buffer): Don't include in the IPA.
6459 (trace_buffer_start): Delete.
6460 (struct trace_buffer_control): New.
6461 (trace_buffer_free): Delete.
6462 (struct ipa_trace_buffer_control): New.
6463 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6464 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6466 (trace_buffer_ctrl): New.
6467 (TRACE_BUFFER_CTRL_CURR): New.
6468 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6469 Reimplement as macros.
6470 (trace_buffer_wrap): Delete.
6471 (traceframe_write_count, traceframe_read_count)
6472 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6473 (struct tracepoint_hit_ctx) <type>: New field.
6474 (struct fast_tracepoint_ctx): New.
6475 (memory_barrier): New.
6477 (record_tracepoint_error): Update atomically in the IPA.
6478 (clear_inferior_trace_buffer): New.
6479 (about_to_request_buffer_space): New.
6480 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6481 updating the same buffer.
6482 (add_tracepoint): Default the tracepoint's type to trap
6483 tracepoint, and orig_size to -1.
6484 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6486 (create_trace_state_variable): New parameter `gdb'. Handle it.
6487 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6488 (cmd_qtdp): Handle fast tracepoints.
6490 (max_jump_pad_size): New.
6491 (gdb_jump_pad_head): New.
6492 (get_jump_space_head): New.
6493 (claim_jump_space): New.
6494 (sort_tracepoints): New.
6495 (MAX_JUMP_SIZE): New.
6496 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6498 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6499 support. Upload fast traceframes, and delete internal IPA
6501 (stop_tracing_handler): New.
6502 (flush_trace_buffer_handler): New.
6503 (cmd_qtstop): Upload fast tracepoints.
6504 (response_tracepoint): Handle fast tracepoints.
6505 (tracepoint_finished_step): Upload fast traceframes. Set the
6506 tracepoint hit context's tracepoint type.
6507 (handle_tracepoint_bkpts): New.
6508 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6509 type. Add comment about fast tracepoints.
6510 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6511 non-existing action_str field.
6512 (get_context_regcache): Handle fast tracepoints.
6513 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6515 (fast_tracepoint_from_jump_pad_address): New.
6516 (fast_tracepoint_from_ipa_tpoint_address): New.
6517 (collecting_t): New.
6518 (force_unlock_trace_buffer): New.
6519 (fast_tracepoint_collecting): New.
6522 (write_inferior_data_ptr): New.
6523 (target_tp_heap): New.
6524 (target_malloc): New.
6525 (download_agent_expr): New.
6527 (download_tracepoints): New.
6528 (download_trace_state_variables): New.
6529 (upload_fast_traceframes): New.
6530 (IPA_FIRST_TRACEFRAME): New.
6531 (IPA_NEXT_TRACEFRAME_1): New.
6532 (IPA_NEXT_TRACEFRAME): New.
6533 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6534 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6535 (gdb_jump_pad_buffer_end): New.
6536 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6537 (initialize_tracepoint): Adjust.
6538 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6539 buffer. Initialize the low module.
6540 * utils.c (PREFIX, TOOLNAME): New.
6541 (malloc_failure): Use PREFIX.
6542 (error): In the IPA, an error causes an exit.
6543 (fatal, warning): Use PREFIX.
6544 (internal_error): Use TOOLNAME.
6545 (NUMCELLS): Increase to 10.
6546 * configure, config.in: Regenerate.
6548 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6550 * server.c (handle_query) <qSupported>: Do two passes over the
6551 qSupported string to avoid nesting strtok.
6553 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6555 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6557 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6559 * configure: Regenerate.
6560 * proc-service.list: New.
6562 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6564 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6567 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6569 * gdbreplay.c (remote_open): Check error return from socket() call by
6570 its equality to -1 not by it being negative.
6571 * remote-utils.c (remote_open): Likewise.
6573 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6575 * config.h: Regenerate.
6577 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6579 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6580 doesn't provide PTRACE_GET_THREAD_AREA.
6582 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6584 * linux-m68k-low.c: Include <asm/ptrace.h>
6585 (ps_get_thread_area): Implement.
6587 2010-05-03 Doug Evans <dje@google.com>
6589 * event-loop.c (struct callback_event): New struct.
6590 (callback_list): New global.
6591 (append_callback_event, delete_callback_event): New functions.
6592 (process_callback): New function.
6593 (start_event_loop): Call it.
6594 * remote-utils.c (NOT_SCHEDULED): Define.
6595 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6596 moved out of readchar.
6597 (readchar): Rewrite. Call reschedule before returning.
6598 (reset_readchar): New function.
6599 (remote_close): Call it.
6600 (process_remaining, reschedule): New functions.
6601 * server.h (callback_handler_func): New typedef.
6602 (append_callback_event, delete_callback_event): Declare.
6604 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6606 * proc-service.c (ps_pglobal_lookup): Use
6607 thread_db_look_up_one_symbol.
6608 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6609 parameter. Use it instead of all_symbols_looked_up.
6610 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6612 (all_symbols_looked_up): Don't declare.
6613 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6614 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6616 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6617 Set all_symbols_looked_up here.
6618 (thread_db_look_up_one_symbol): New.
6619 (thread_db_get_tls_address): Adjust.
6620 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6621 thread_db object on the heap, and tentatively set it in the
6623 (thread_db_init): Don't set all_symbols_looked_up here.
6624 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6626 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6628 * linux-low.c (linux_kill, linux_detach): Adjust.
6629 (status_pending_p_callback): Remove redundant statement. Check
6630 for !TARGET_WAITIKIND_IGNORE, instead of
6631 TARGET_WAITKIND_STOPPED.
6632 (handle_tracepoints): Make sure LWP is locked. Adjust.
6633 (linux_wait_for_event_1): Adjust.
6634 (linux_cancel_breakpoints): New.
6635 (unsuspend_one_lwp): New.
6636 (unsuspend_all_lwps): New.
6637 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6638 (send_sigstop_callback): Change return type to int, add new
6639 `except' parameter and handle it.
6640 (suspend_and_send_sigstop_callback): New.
6641 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6642 pass them down. If SUSPEND, also increment the lwp's suspend
6644 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6645 (need_step_over_p): Don't consider suspended LWPs.
6646 (start_step_over): Adjust.
6647 (proceed_one_lwp): Change return type to int, add new `except'
6648 parameter and handle it.
6649 (unsuspend_and_proceed_one_lwp): New.
6650 (proceed_all_lwps): Use find_inferior instead of
6652 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6653 also decrement the suspend count of LWPs. Pass `except' down,
6654 instead of hacking its suspend count.
6655 (linux_pause_all): Add `freeze' parameter. Adjust.
6656 (linux_unpause_all): New.
6657 (linux_target_ops): Install linux_unpause_all.
6658 * server.c (handle_status): Adjust.
6659 * target.h (struct target_ops): New fields `unpause_all' and
6660 `cancel_breakpoints'. Add new parameter to `pause_all'.
6661 (pause_all): Add new `freeze' parameter.
6663 (cancel_breakpoints): New.
6664 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6666 (cmd_qtstart): Pause threads.
6667 (stop_tracing): Pause threads, and cancel breakpoints.
6668 * win32-low.c (win32_target_ops): Adjust.
6670 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6672 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6673 the inferior right away from here...
6674 (linux_wait_1): ... to here, and adjust to check the thread's
6675 last_resume_kind instead of the lwp's step or stop_expected flags.
6677 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6679 * README: Use consistent `GDB' and `GDBserver' spellings.
6681 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6683 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6684 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6685 (linux_detach_one_lwp): Assume the lwp is stopped.
6686 (any_thread_of): Delete.
6687 (linux_detach): Stop all lwps here. Don't blindly delete all
6689 (delete_lwp_callback): New.
6690 (linux_mourn): Delete all lwps of the process that is gone.
6691 (linux_wait_1): Don't delete the last lwp of the process here.
6692 * mem-break.h (mark_breakpoints_out): Declare.
6693 * mem-break.c (mark_breakpoints_out): New.
6694 (free_all_breakpoints): Use it.
6695 * server.c (handle_target_event): If the process is gone, mark
6697 * thread-db.c (struct thread_db) <create_bp>: New field.
6698 (thread_db_enable_reporting): Fix prototype. Store a thread event
6699 breakpoint reference in the thread_db struct.
6700 (thread_db_load_search): Clear the thread_db object.
6701 (try_thread_db_load_1): Ditto.
6702 (switch_to_process): New.
6703 (disable_thread_event_reporting): Use it.
6704 (remove_thread_event_breakpoints): New.
6705 (thread_db_detach, thread_db_mourn): Use it.
6707 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6709 * linux-low.c (linux_enable_event_reporting): New.
6710 (linux_wait_for_event_1, handle_extended_wait): Use it.
6712 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6714 * linux-low.c (linux_kill_one_lwp, linux_kill)
6715 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6716 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6717 SIGSTOP even if the LWP is stopped.
6718 (send_sigstop_callback): New.
6719 (stop_all_lwps): Use send_sigstop_callback instead.
6720 (linux_resume_one_thread): Adjust.
6721 (proceed_one_lwp): Still proceed an LWP that the client has
6722 requested to stop, if we haven't reported it as stopped yet. Make
6723 sure that LWPs the client want stopped, have a pending SIGSTOP.
6725 2010-04-26 Doug Evans <dje@google.com>
6727 * server.c (handle_general_set): Make static.
6729 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6730 Print received char after testing for error/eof instead of before.
6731 (input_interrupt): Tweak comment.
6733 2010-04-23 Doug Evans <dje@google.com>
6735 * server.c (start_inferior): Print inferior argv if --debug.
6737 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6739 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6740 * nto-x86-low.c: Include server.h
6742 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6744 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6745 be consistent with other sources of this directory.
6746 (init_registers_amd64): Correct name of source file of this function
6749 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6751 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6754 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6756 * win32-i386-low.c: Add 64-bit support.
6757 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6758 (init_registers_amd64): Declare.
6759 (mappings): Add 64-bit version of array.
6760 (init_windows_x86): New function.
6761 (the_low_target): Change init_arch field to init_windows_x86.
6763 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6765 * win32-low.c: Adapt to support also 64-bit architecture.
6766 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6767 (get_image_name): Use SIZE_T type for local variable `done'.
6768 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6769 (toolhelp_get_dll_name): Idem.
6770 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6771 Use uintptr_t typecast to avoid warning.
6772 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6773 (handle_exception): Use phex_nz to avoid warning.
6774 (win32_wait): Remove unused local variable `process'.
6776 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6778 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6781 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6783 * configure.ac: Use `ws2_32' library for srv_mingw.
6784 * configure: Regenerate.
6785 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6786 * remote-utils.c: Likewise.
6788 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6790 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6791 if __x86_64__ is defined.
6793 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6795 * configure: Regenerate.
6797 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6799 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6800 * target.h (target_ops): New get_tib_address field.
6801 * win32-low.h (win32_thread_info): Add thread_local_base field.
6802 * win32-low.c (child_add_thread): Add tlb argument.
6803 Set thread_local_base field to TLB.
6804 (get_child_debug_event): Adapt to child_add_thread change.
6805 (win32_get_tib_address): New function.
6806 (win32_target_ops): Set get_tib_address field to
6807 win32_get_tib_address.
6808 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6810 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6812 * linux-low.c (linux_mourn): Also remove the process.
6813 * server.c (handle_target_event): Don't remove the process here.
6814 * nto-low.c (nto_mourn): New.
6815 (nto_target_ops): Install it.
6816 * spu-low.c (spu_mourn): New.
6817 (spu_target_ops): Install it.
6818 * win32-low.c (win32_mourn): New.
6819 (win32_target_ops): Install it.
6821 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6823 * server.h (buffer_xml_printf): Remove redundant `;'.
6825 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6827 * regcache.c (set_register_cache): Invalidate regcaches before
6828 changing the register cache layout.
6829 (regcache_invalidate_one): Allow a NULL regcache.
6830 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6831 regcaches before changing the register cache layout or the target
6834 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6836 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6837 variable warning on Linux/x86-64.
6839 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6841 GDBserver disconnected tracing support.
6843 * linux-low.c (linux_remove_process): Delete.
6844 (add_lwp): Don't set last_resume_kind here.
6845 (linux_kill): Use `mourn'.
6846 (linux_detach): Use `thread_db_detach', and `mourn'.
6848 (linux_attach_lwp_1): Adjust comment.
6849 (linux_attach): last_resume_kind moved the thread_info; adjust.
6850 (status_pending_p_callback): Adjust.
6851 (linux_wait_for_event_1): Adjust.
6852 (count_events_callback, select_singlestep_lwp_callback)
6853 (select_event_lwp_callback, cancel_breakpoints_callback)
6854 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6855 (proceed_one_lwp): Adjust.
6856 (linux_async): Add debug output.
6857 (linux_thread_stopped): New.
6858 (linux_pause_all): New.
6859 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6861 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6862 (thread_db_free): Delete declaration.
6863 (thread_db_detach, thread_db_mourn): Declare.
6864 * thread-db.c (thread_db_init): Use thread_db_mourn.
6865 (thread_db_free): Delete, split in two.
6866 (disable_thread_event_reporting): New.
6867 (thread_db_detach): New.
6868 (thread_db_mourn): New.
6870 * server.h (struct thread_info) <last_resume_kind>: New field.
6871 <attached>: Add comment.
6872 <gdb_detached>: New field.
6873 (handler_func): Change return type to int.
6874 (handle_serial_event, handle_target_event): Ditto.
6875 (gdb_connected): Declare.
6877 (disconnected_tracing): Declare.
6878 (stop_tracing): Declare.
6880 * server.c (handle_query) <qSupported>: Report support for
6881 disconnected tracing.
6882 (queue_stop_reply_callback): Account for running threads.
6883 (gdb_wants_thread_stopped): New.
6884 (gdb_wants_all_threads_stopped): New.
6885 (gdb_reattached_process): New.
6886 (handle_status): Clear the `gdb_detached' flag of all processes.
6887 In all-stop, stop all threads.
6888 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6889 (process_serial_event): If the remote connection breaks, or if an
6890 exit was forced with "monitor exit", force an event loop exit.
6891 Handle disconnected tracing on detach.
6892 (handle_serial_event): Adjust.
6893 (handle_target_event): If GDB isn't connected, forward events back
6894 to the inferior, unless the last process exited, in which case,
6895 exit gdbserver. Adjust interface.
6897 * remote-utils.c (remote_open): Don't block in accept. Instead
6898 register an event loop source on the listen socket file
6899 descriptor. Refactor bits into ...
6900 (listen_desc): ... this new global.
6901 (gdb_connected): ... this new function.
6902 (enable_async_notification): ... this new function.
6903 (handle_accept_event): ... this new function.
6904 (remote_close): Clear remote_desc.
6906 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6908 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6910 (mourn_inferior): Define.
6911 (target_process_qsupported): Avoid the dangling else problem.
6912 (thread_stopped): Define.
6913 (pause_all): Define.
6914 (target_waitstatus_to_string): Declare.
6915 * target.c (target_waitstatus_to_string): New.
6917 * tracepoint.c (tracing): Make extern.
6918 (disconnected_tracing): New.
6919 (stop_tracing): Make extern. Handle tracing stops due to GDB
6921 (cmd_qtdisconnected): New.
6922 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6923 (handle_tracepoint_general_set): Handle QTDisconnected.
6925 * event-loop.c (event_handler_func): Change return type to int.
6926 (process_event): Bail out if the event handler wants the event
6928 (handle_file_event): Ditto.
6929 (start_event_loop): Bail out if the event handler wants the event
6932 * nto-low.c (nto_target_ops): Adjust.
6933 * spu-low.c (spu_wait): Don't remove the process here.
6934 (spu_target_ops): Adjust.
6935 * win32-low.c (win32_wait): Don't remove the process here.
6936 (win32_target_ops): Adjust.
6938 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6940 * regcache.c (realloc_register_cache): Invalidate inferior's
6941 regcache before recreating it.
6943 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6945 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6947 2010-04-09 Stan Shebs <stan@codesourcery.com>
6948 Pedro Alves <pedro@codesourcery.com>
6950 * server.h (LONGEST): New.
6951 (struct thread_info) <while_stepping>: New field.
6952 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6954 (initialize_tracepoint, handle_tracepoint_general_set)
6955 (handle_tracepoint_query, tracepoint_finished_step)
6956 (tracepoint_was_hit, release_while_stepping_state_list):
6957 (current_traceframe): Declare.
6958 * server.c (handle_general_set): Handle tracepoint packets.
6960 (write_memory): New.
6961 (handle_search_memory_1): Use read_memory.
6962 (handle_query): Report support for conditional tracepoints, trace
6963 state variables, and tracepoint sources. Handle tracepoint
6965 (main): Initialize the tracepoints module.
6966 (process_serial_event): Handle traceframe reads/writes.
6968 * linux-low.c (handle_tracepoints): New.
6969 (linux_wait_1): Call it.
6970 (linux_resume_one_lwp): Handle while-stepping.
6971 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6972 (linux_target_ops): Install them.
6973 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6975 * linux-x86-low.c (x86_supports_tracepoints): New.
6976 (the_low_target). Install it.
6978 * mem-break.h (delete_breakpoint): Declare.
6979 * mem-break.c (delete_breakpoint): Make external.
6981 * target.h (struct target_ops): Add `supports_tracepoints',
6982 `read_pc', and `write_pc' fields.
6983 (target_supports_tracepoints): Define.
6984 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6987 * regcache.h (struct regcache) <registers_owned>: New field.
6988 (init_register_cache, regcache_cpy): Declare.
6989 (regcache_read_pc, regcache_write_pc): Declare.
6990 (register_cache_size): Declare.
6991 (supply_regblock): Declare.
6992 * regcache.c (init_register_cache): New.
6993 (new_register_cache): Use it.
6994 (regcache_cpy): New.
6995 (register_cache_size): New.
6996 (supply_regblock): New.
6997 (regcache_read_pc, regcache_write_pc): New.
6999 * tracepoint.c: New.
7001 * Makefile.in (OBS): Add tracepoint.o.
7002 (tracepoint.o): New rule.
7004 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7006 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7008 (i386-mmx.c): Likewise.
7009 (i386-mmx-linux.o): Likewise.
7010 (i386-mmx-linux.c): Likewise.
7012 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7013 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7014 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7015 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7017 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7018 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7019 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7021 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7023 * Makefile.in (clean): Updated.
7025 (i386-avx.c): Likewise.
7026 (i386-avx-linux.o): Likewise.
7027 (i386-avx-linux.c): Likewise.
7028 (amd64-avx.o): Likewise.
7029 (amd64-avx.c): Likewise.
7030 (amd64-avx-linux.o): Likewise.
7031 (amd64-avx-linux.c): Likewise.
7033 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7034 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7035 (srv_amd64_regobj): Add amd64-avx.o.
7036 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7037 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7038 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7039 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7040 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7041 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7042 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7044 * i387-fp.c: Include "i386-xstate.h".
7046 (i387_cache_to_xsave): Likewise.
7047 (i387_xsave_to_cache): Likewise.
7048 (x86_xcr0): Likewise.
7050 * i387-fp.h (i387_cache_to_xsave): Likewise.
7051 (i387_xsave_to_cache): Likewise.
7052 (x86_xcr0): Likewise.
7054 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7055 * linux-crisv32-low.c (target_regsets): Likewise.
7056 * linux-m68k-low.c (target_regsets): Likewise.
7057 * linux-mips-low.c (target_regsets): Likewise.
7058 * linux-ppc-low.c (target_regsets): Likewise.
7059 * linux-s390-low.c (target_regsets): Likewise.
7060 * linux-sh-low.c (target_regsets): Likewise.
7061 * linux-sparc-low.c (target_regsets): Likewise.
7062 * linux-xtensa-low.c (target_regsets): Likewise.
7064 * linux-low.c: Include <sys/uio.h>.
7065 (regsets_fetch_inferior_registers): Support nt_type.
7066 (regsets_store_inferior_registers): Likewise.
7067 (linux_process_qsupported): New.
7068 (linux_target_ops): Add linux_process_qsupported.
7070 * linux-low.h (regset_info): Add nt_type.
7071 (linux_target_ops): Add process_qsupported.
7073 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7075 (init_registers_i386_avx_linux): New.
7076 (init_registers_amd64_avx_linux): Likewise.
7077 (xmltarget_i386_linux_no_xml): Likewise.
7078 (xmltarget_amd64_linux_no_xml): Likewise.
7079 (PTRACE_GETREGSET): Likewise.
7080 (PTRACE_SETREGSET): Likewise.
7081 (x86_fill_xstateregset): Likewise.
7082 (x86_store_xstateregset): Likewise.
7083 (use_xml): Likewise.
7084 (x86_linux_update_xmltarget): Likewise.
7085 (x86_linux_process_qsupported): Likewise.
7086 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7087 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7088 init_registers_i386_linux here. Call
7089 x86_linux_update_xmltarget.
7090 (the_low_target): Add x86_linux_process_qsupported.
7092 * server.c (handle_query): Call target_process_qsupported.
7094 * target.h (target_ops): Add process_qsupported.
7095 (target_process_qsupported): New.
7097 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7099 * inferiors.c (add_thread): Set last_status kind to
7100 TARGET_WAITKIND_IGNORE.
7101 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7102 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7103 (linux_wait_1): Move `thread' local definition to block that uses
7104 it. Don't NULL initialize `event_child'.
7105 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7106 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7107 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7109 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7111 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7112 an extended waitstatus, or by a watchpoint.
7113 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7114 thread was stepping or has been stopped by a watchpoint.
7116 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7118 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7119 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7120 of another, then delete the previous, and validate all
7122 (validate_inserted_breakpoint): New.
7123 (delete_disabled_breakpoints): New.
7124 (validate_breakpoints): New.
7125 (check_mem_read): Validate breakpoints before trusting their
7126 shadow. Delete disabled breakpoints.
7127 (check_mem_write): Validate breakpoints before trusting they
7128 should be inserted. Delete disabled breakpoints.
7129 * mem-break.h (validate_breakpoints):
7130 * server.c (handle_query): Validate breakpoints when we see a
7133 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7135 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7136 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7137 if we could tell there's a GDB breakpoint at stop_pc.
7138 (need_step_over_p): Don't do a step over if we find a GDB
7139 breakpoint at the resume PC.
7141 * mem-break.c (struct raw_breakpoint): New.
7142 (enum bkpt_type): New type `gdb_breakpoint'.
7143 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7144 fields. New field `raw'.
7145 (find_raw_breakpoint_at): New.
7146 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7148 (set_breakpoint_at): Adjust.
7149 (delete_raw_breakpoint): New.
7150 (release_breakpoint): New.
7151 (delete_breakpoint): Rename to...
7152 (delete_breakpoint_1): ... this. Add proc parameter. Use
7153 release_breakpoint. Return ENOENT.
7154 (delete_breakpoint): Reimplement.
7155 (find_breakpoint_at): Delete.
7156 (find_gdb_breakpoint_at): New.
7157 (delete_breakpoint_at): Delete.
7158 (set_gdb_breakpoint_at): New.
7159 (delete_gdb_breakpoint_at): New.
7160 (gdb_breakpoint_here): New.
7161 (set_reinsert_breakpoint): Use release_breakpoint.
7162 (uninsert_breakpoint): Rename to ...
7163 (uninsert_raw_breakpoint): ... this.
7164 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7165 (reinsert_raw_breakpoint): Change parameter type to
7167 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7169 (check_breakpoints): Adjust. Use release_breakpoint.
7170 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7171 (breakpoint_inserted_here): Ditto.
7172 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7173 Don't trust the breakpoint's shadow if it is not inserted.
7174 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7175 (delete_all_breakpoints): Adjust.
7176 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7177 use delete_breakpoint_1.
7179 * mem-break.h (breakpoints_supported): Delete declaration.
7180 (set_gdb_breakpoint_at): Declare.
7181 (gdb_breakpoint_here): Declare.
7182 (delete_breakpoint_at): Delete.
7183 (delete_gdb_breakpoint_at): Declare.
7185 * server.h (struct raw_breakpoint): Forward declare.
7186 (struct process_info): New field `raw_breakpoints'.
7188 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7191 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7193 * linux-low.c (status_pending_p_callback): Fix comment.
7194 (linux_wait_for_event_1): Move most of the internal breakpoint
7195 handling from here...
7196 (linux_wait_1): ... to here.
7197 (count_events_callback): New.
7198 (select_singlestep_lwp_callback): New.
7199 (select_event_lwp_callback): New.
7200 (cancel_breakpoints_callback): New.
7201 (select_event_lwp): New.
7202 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7203 priority to all LWPs that have had events that should be reported
7204 to the client. Cancel breakpoints when about to reporting the
7205 event to the client, not while stopping lwps. No longer cancel
7206 finished single-steps here.
7207 (cancel_finished_single_step): Delete.
7208 (cancel_finished_single_steps): Delete.
7210 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7212 * mem-break.c (enum bkpt_type): New.
7213 (struct breakpoint): New field `type'.
7214 (set_breakpoint_at): Change return type to struct breakpoint
7215 pointer. Set type to `other_breakpoint' by default.
7216 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7217 in the breakpoint list.
7218 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7219 (reinsert_breakpoint): Rename to ...
7220 (reinsert_raw_breakpoint): ... this.
7221 (reinsert_breakpoints_at): Adjust.
7222 * mem-break.h (struct breakpoint): Declare.
7223 (set_breakpoint_at): Change return type to struct breakpoint
7226 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7228 * server.c (handle_query): Assign, not compare.
7230 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7232 Teach linux gdbserver to step-over-breakpoints.
7234 * linux-low.c (can_hardware_single_step): New.
7235 (supports_breakpoints): New.
7236 (handle_extended_wait): If stopping threads, read the stop pc of
7239 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7240 low target doesn't support retrieving the PC.
7241 (add_lwp): Set last_resume_kind to resume_continue.
7242 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7243 (linux_attach): Don't clear stop_expected. Set the lwp's
7244 last_resume_kind to resume_stop.
7245 (linux_detach_one_lwp): Don't check for removed breakpoints.
7246 (check_removed_breakpoint): Delete.
7247 (status_pending_p): Rename to ...
7248 (status_pending_p_callback): ... this. Don't check for removed
7249 breakpoints. Don't consider threads that are stopped from GDB's
7251 (linux_wait_for_lwp): Always read the stop_pc here.
7252 (cancel_breakpoint): New.
7253 (step_over_bkpt): New global.
7254 (linux_wait_for_event_1): Implement stepping over breakpoints.
7255 (gdb_wants_lwp_stopped): New.
7256 (gdb_wants_all_stopped): New.
7257 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7258 single-step traps here. Store the thread's last reported target
7260 (send_sigstop): Don't clear stop_expected. Always set it,
7262 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7263 (cancel_finished_single_step): New.
7264 (cancel_finished_single_steps): New.
7265 (wait_for_sigstop): Don't cancel finished single-step traps here.
7266 (linux_resume_one_lwp): Don't check for removed breakpoints.
7267 Don't set `step' on non-hardware step archs.
7268 (linux_set_resume_request): Ignore resume_stop requests if already
7269 stopping or stopped. Set the lwp's last_resume_kind.
7270 (resume_status_pending_p): Don't check for removed breakpoints.
7271 (need_step_over_p): New.
7272 (start_step_over): New.
7273 (finish_step_over): New.
7274 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7275 requests. Clear the thread's last reported target waitstatus.
7276 Don't use the `suspended' flag. Don't consider pending breakpoints.
7277 (linux_resume): Start a step-over if necessary.
7278 (proceed_one_lwp): New.
7279 (proceed_all_lwps): New.
7280 (unstop_all_lwps): New.
7281 * linux-low.h (struct lwp_info): Rewrite comment for the
7282 `suspended' flag. Add the `stop_pc' field. Delete the
7283 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7284 Add `'last_resume_kind' and `need_step_over' fields.
7285 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7286 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7287 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7288 (set_raw_breakpoint_at): New.
7289 (set_breakpoint_at): Rewrite to use it.
7290 (reinsert_breakpoint_handler): Delete.
7291 (set_reinsert_breakpoint): New.
7292 (reinsert_breakpoint_by_bp): Delete.
7293 (delete_reinsert_breakpoints): New.
7294 (uninsert_breakpoint): Rewrite.
7295 (uninsert_breakpoints_at): New.
7296 (reinsert_breakpoint): Rewrite.
7297 (reinsert_breakpoints_at): New.
7298 (check_breakpoints): Rewrite.
7299 (breakpoint_here): New.
7300 (breakpoint_inserted_here): New.
7301 (check_mem_read): Adjust.
7302 * mem-break.h (breakpoints_supported, breakpoint_here)
7303 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7304 (reinsert_breakpoint_by_bp): Delete declaration.
7305 (delete_reinsert_breakpoints): Declare.
7306 (reinsert_breakpoint): Delete declaration.
7307 (reinsert_breakpoints_at): Declare.
7308 (uninsert_breakpoint): Delete declaration.
7309 (uninsert_breakpoints_at): Declare.
7310 (check_breakpoints): Adjust prototype.
7311 * server.h: Adjust include order.
7312 (struct thread_info): Declare here. Add a `last_status' field.
7314 2010-03-23 Michael Snyder <msnyder@vmware.com>
7316 * server.c (crc32): New function.
7317 (handle_query): Add handling for 'qCRC:' request.
7319 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7321 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7322 lwp had been stopped by a watchpoint.
7324 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7326 * server.h (internal_error): Declare.
7327 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7328 * utils.c (internal_error): New function.
7330 2010-03-15 Andreas Schwab <schwab@redhat.com>
7332 * configure.srv: Fix typo setting srv_regobj.
7334 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7336 * linux-low.c (fetch_register): Avoid passing a non string literal
7338 (usr_store_inferior_registers): Ditto.
7340 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7342 * linux-low.c (linux_write_memory): Bail out early if peeking
7345 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7347 * linux-low.h (struct lwp_info): New fields
7348 `stopped_by_watchpoint' and `stopped_data_address'.
7349 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7350 here, and cache them in the lwp object.
7351 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7353 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7355 (linux_stopped_by_watchpoint): Rewrite.
7356 (linux_stopped_data_address): Rewrite.
7358 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7360 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7361 switching the current inferior, not before.
7363 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7365 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7366 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7367 i386-linux.c and amd64-linux.c.
7368 (reg-i386.o): Removed.
7369 (reg-i386.c): Likewise.
7370 (reg-i386-linux.o): Likewise.
7371 (reg-i386-linux.c): Likewise.
7372 (reg-x86-64.o): Likewise.
7373 (reg-x86-64.c): Likewise.
7374 (reg-x86-64-linux.o): Likewise.
7375 (reg-x86-64-linux.c): Likewise.
7378 (i386-linux.o): Likewise.
7379 (i386-linux.c): Likewise.
7380 (amd64.o): Likewise.
7381 (amd64.c): Likewise.
7382 (amd64-linux.o): Likewise.
7383 (amd64-linux.c): Likewise.
7385 * configure.srv (srv_i386_regobj): New.
7386 (srv_i386_linux_regobj): Likewise.
7387 (srv_amd64_regobj): Likewise.
7388 (srv_amd64_linux_regobj): Likewise.
7389 (srv_i386_32bit_xmlfiles): Likewise.
7390 (srv_i386_64bit_xmlfiles): Likewise.
7391 (srv_i386_xmlfiles): Likewise.
7392 (srv_amd64_xmlfiles): Likewise.
7393 (srv_i386_linux_xmlfiles): Likewise.
7394 (srv_amd64_linux_xmlfiles): Likewise.
7395 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7396 srv_xmlfiles to $srv_i386_xmlfiles.
7397 (i[34567]86-*-mingw32ce*): Likewise.
7398 (i[34567]86-*-mingw*): Likewise.
7399 (i[34567]86-*-nto*): Likewise.
7400 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7401 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7402 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7403 (x86_64-*-linux*): Likewise.
7405 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7406 (init_registers_amd64_linux): New.
7407 (x86_arch_setup): Replace init_registers_x86_64_linux with
7408 init_registers_amd64_linux.
7410 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7412 * configure.ac: Check for libdl. If it is not available link against
7413 static libthread_db.
7414 * configure: Regenerate.
7416 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7420 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7421 handing a read watchpoint.
7422 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7424 2010-02-12 Doug Evans <dje@google.com>
7426 * linux-low.c (linux_supports_tracefork_flag): Document.
7427 (linux_look_up_symbols): Add comment.
7429 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7431 * regcache.c (supply_register): Clear regcache if buf is NULL.
7433 2010-02-02 Nicolas Roche <roche@sourceware.org>
7434 Joel Brobecker <brobecker@adacore.com>
7436 * inferiors.c (find_inferior): Add function documentation.
7437 (unloaded_dll): Handle the case where the unloaded dll has not
7438 been previously registered in the dll list.
7440 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7442 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7443 (thumb2_breakpoint): New.
7444 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7446 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7448 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7449 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7452 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7454 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7456 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7458 * linux-s390-low.c (s390_collect_ptrace_register)
7459 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7461 2010-01-21 Doug Evans <dje@google.com>
7463 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7464 (PTRACE_ARG4_TYPE): New macro.
7465 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7466 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7467 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7468 (usr_store_inferior_registers): Ditto.
7469 (linux_read_memory, linux_write_memory): Ditto.
7470 (linux_test_for_tracefork): Ditto.
7472 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7473 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7475 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7477 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7480 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7482 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7483 prototype to take a regcache. Adjust.
7485 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7487 * regcache.h (struct thread_info): Forward declare.
7488 (struct regcache): New.
7489 (new_register_cache): Adjust prototype.
7490 (get_thread_regcache): Declare.
7491 (free_register_cache): Adjust prototype.
7492 (registers_to_string, registers_from_string): Ditto.
7493 (supply_register, supply_register_by_name, collect_register)
7494 (collect_register_as_string, collect_register_by_name): Ditto.
7495 * regcache.c (struct inferior_regcache_data): Delete.
7496 (get_regcache): Rename to ...
7497 (get_thread_regcache): ... this. Adjust. Switch inferior before
7499 (regcache_invalidate_one): Adjust.
7500 (regcache_invalidate): Fix prototype.
7501 (new_register_cache): Return the new register cache.
7502 (free_register_cache): Change prototype.
7503 (realloc_register_cache): Adjust.
7504 (registers_to_string): Change prototype to take a regcache. Adjust.
7505 (registers_from_string): Ditto.
7506 (register_data): Ditto.
7507 (supply_register): Ditto.
7508 (supply_register_by_name): Ditto.
7509 (collect_register): Ditto.
7510 (collect_register_as_string): Ditto.
7511 (collect_register_by_name): Ditto.
7512 * server.c (process_serial_event): Adjust.
7513 * linux-low.h (regset_fill_func, regset_store_func): Change
7515 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7517 * linux-low.c (get_stop_pc): Adjust.
7518 (check_removed_breakpoint): Adjust.
7519 (linux_wait_for_event): Adjust.
7520 (linux_resume_one_lwp): Adjust.
7521 (fetch_register): Add regcache parameter. Adjust.
7522 (usr_store_inferior_registers): Ditto.
7523 (regsets_fetch_inferior_registers): Ditto.
7524 (regsets_store_inferior_registers): Ditto.
7525 (linux_fetch_registers, linux_store_registers): Ditto.
7526 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7528 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7530 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7531 prototype to take a regcache.
7532 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7533 * remote-utils.c (convert_ascii_to_int, outreg)
7534 (prepare_resume_reply): Change prototype to take a regcache.
7536 * target.h (struct target_ops) <fetch_registers, store_registers>:
7537 Change prototype to take a regcache.
7538 (fetch_inferior_registers, store_inferior_registers): Change
7539 prototype to take a regcache. Adjust.
7540 * proc-service.c (ps_lgetregs): Adjust.
7541 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7542 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7543 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7544 take a regcache. Adjust.
7545 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7546 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7547 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7548 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7549 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7550 (cris_cannot_fetch_register):
7551 (cris_breakpoint_at): Change prototype to take a regcache.
7553 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7554 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7555 to take a regcache. Adjust.
7556 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7558 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7559 take a regcache. Adjust.
7560 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7561 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7562 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7563 * linux-mips-low.c (mips_get_pc):
7564 (mips_set_pc): Change prototype to take a regcache. Adjust.
7565 (mips_reinsert_addr): Adjust.
7566 (mips_collect_register): Change prototype to take a regcache.
7568 (mips_supply_register):
7569 (mips_collect_register_32bit, mips_supply_register_32bit)
7570 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7571 (mips_store_fpregset): Ditto.
7572 * linux-ppc-low.c (ppc_supply_ptrace_register)
7573 (ppc_supply_ptrace_register): Ditto.
7574 (parse_spufs_run): Adjust.
7575 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7576 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7577 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7578 take a regcache. Adjust.
7579 * linux-s390-low.c (s390_collect_ptrace_register)
7580 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7581 (s390_set_pc): Change prototype to take a regcache. Adjust.
7582 (s390_arch_setup): Adjust.
7583 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7584 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7585 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7586 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7587 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7589 (sparc_breakpoint_at): Adjust.
7590 * linux-xtensa-low.c (xtensa_fill_gregset):
7591 (xtensa_store_gregset):
7592 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7593 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7594 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7595 prototype to take a regcache. Adjust.
7596 * win32-arm-low.c (arm_fetch_inferior_register)
7597 (arm_store_inferior_register): Change prototype to take a
7599 * win32-i386-low.c (i386_fetch_inferior_register)
7600 (i386_store_inferior_register): Change prototype to take a
7602 * win32-low.c (child_fetch_inferior_registers)
7603 (child_store_inferior_registers): Change prototype to take a
7605 (win32_wait): Adjust.
7606 (win32_fetch_inferior_registers): Change prototype to take a
7608 (win32_store_inferior_registers): Adjust.
7609 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7610 store_inferior_register>: Change prototype to take a regcache.
7612 2010-01-20 Doug Evans <dje@google.com>
7614 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7616 (linux_wait_for_event1, linux_init_signals): Ditto.
7617 (W_STOPCODE): Provide definition if missing.
7619 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7621 * linux-low.c (linux_core_of_thread): New.
7622 (compare_ints, show_process, list_threads): New.
7623 (linux_qxfer_osdata): Report threads and cores.
7624 (linux_target_op): Register linux_core_of_thread.
7625 * remote-utils.c (prepare_resume_reply): Report the core.
7626 (buffer_xml_printf): Support %d specifier.
7627 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7629 (handle_query): Handle qXfer:threads. Announce availability
7631 * target.h (struct target_ops): New field core_of_thread.
7633 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7635 * Makefile.in (clean): Remove new generated files.
7636 (reg-s390.o, reg-s390.c): Remove rules.
7637 (reg-s390x.o, reg-s390x.c): Likewise.
7638 (s390-linux32.o, s390-linux32.c): Add rules.
7639 (s390-linux64.o, s390-linux64.c): Likewise.
7640 (s390x-linux64.o, s390x-linux64.c): Likewise.
7641 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7642 * linux-s390-low.c: Include <elf.h>.
7643 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7644 (init_registers_s390): Remove prototype.
7645 (init_registers_s390x): Likewise.
7646 (init_registers_s390_linux32): Add prototype.
7647 (init_registers_s390_linux64): Likewise.
7648 (init_registers_s390x_linux64): Likewise.
7649 (s390_num_regs_3264): New define.
7650 (s390_regmap_3264): New global variable.
7651 (s390_cannot_fetch_register): Remove obsolete check.
7652 (s390_cannot_store_register): Likewise.
7653 (s390_collect_ptrace_register): Handle upper/lower register halves.
7654 (s390_supply_ptrace_register): Likewise.
7655 (s390_fill_gregset): Update to register number changes.
7656 (s390_get_hwcap): New routine.
7657 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7658 Install appropriate regmap and register set.
7660 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7662 * server.c (gdbserver_version): Update copyright year to 2010.
7663 * gdbreplay.c (gdbreplay_version): Likewise.
7665 2009-12-28 Doug Evans <dje@google.com>
7667 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7668 elf/external.h. Include <elf.h> instead but only if necessary.
7670 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7672 * linux-low.c (linux_remove_process): Remove `detaching'
7673 parameter. Don't release/detach from thread_db here.
7674 (linux_kill): Release/detach from thread_db here, ...
7675 (linux_detach): ... and here, before actually detaching.
7676 (linux_wait_1): ... and here, when a process exits.
7677 * thread-db.c (any_thread_of): New.
7678 (thread_db_free): Switch the current inferior to a thread of the
7681 2009-12-21 Doug Evans <dje@google.com>
7683 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7685 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7686 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7687 warning ifndef __NR_tkill. Move setting of errno there too.
7688 Delete unnecessary resetting of errno after syscall.
7689 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7691 * configure.ac: Check for dladdr.
7692 * config.in: Regenerate.
7693 * configure: Regenerate.
7694 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7695 (try_thread_db_load): Update.
7697 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7699 2009-12-18 Doug Evans <dje@google.com>
7701 * event-loop.c: Include unistd.h if it exists.
7703 * linux-low.c (my_waitpid): Move definition away from being in
7704 between linux_tracefork_child/linux_test_for_tracefork.
7706 * gdb_proc_service.h (psaddr_t): Fix type.
7707 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7708 signature to match glibc.
7710 2009-12-16 Doug Evans <dje@google.com>
7712 * linux-low.c (linux_read_memory): Fix argument to read.
7714 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7716 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7717 events, don't leave current_inferior pointing at null.
7719 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7721 * win32-low.c (LOG): Delete.
7722 (OUTMSG): Output to stderr.
7723 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7724 on compile time LOG macro.
7725 (win32_wait): Fix debug output.
7727 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7729 * win32-low.c (win32_add_one_solib): If the dll name is
7730 "ntdll.dll", prepend the system directory to the dll path.
7732 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7734 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7736 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7737 Vladimir Prus <vladimir@codesourcery.com>
7739 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7740 * configure.ac: Check for __mcoldfire__ and set
7741 gdb_cv_m68k_is_coldfire.
7742 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7743 reg-cf.o and reg-m68k.o.
7744 * configure: Regenerated.
7746 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7748 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7749 Pass it to thread_db_free.
7750 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7751 proper `detaching' argument to linux_remove_process.
7752 * linux-low.h (thread_db_free): Add `detaching' parameter.
7753 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7755 (thread_db_free): Add `detaching' parameter. Only
7756 call td_ta_clear_event if detaching from process.
7758 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7760 * thread-db.c (thread_db_free): Fix typo.
7762 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7765 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7767 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7769 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7770 with an i686 compiler.
7771 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7773 * configure: Rebuilt.
7775 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7779 * server.c (handle_search_memory_1): Correct read_addr initialization
7780 in loop for searching subsequent chunks.
7782 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7784 * configure.ac: New --with-libthread-db option.
7785 * thread-db.c: Allow direct dependence on libthread_db.
7786 (thread_db_free): Adjust.
7787 * config.in: Regenerate.
7788 * configure: Likewise.
7790 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7793 * thread-db.c (attach_thread): New function.
7794 (maybe_attach_thread): Return success/failure.
7795 (find_new_threads_callback): Adjust.
7796 (thread_db_find_new_threads): Loop until no new threads.
7798 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7800 * proc-service.c (ps_lgetregs): Formatting.
7802 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7804 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7805 * configure.ac: Adjust.
7806 * linux-low.h (struct process_info_private): Move members to struct
7808 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7809 * linux-low.c (linux_remove_process): Adjust.
7810 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7811 * server.c (handle_query): Move code ...
7812 (handle_monitor_command): ... here. New function.
7813 * target.h (struct target_ops): New member.
7814 * thread-db.c (struct thread_db): New.
7815 (libthread_db_search_path): New variable.
7816 (thread_db_create_event, thread_db_enable_reporting)
7817 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7818 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7819 (try_thread_db_load_1, dladdr_to_soname): New functions.
7820 (try_thread_db_load, thread_db_load_search): New functions.
7821 (thread_db_init): Search for libthread_db.
7822 (thread_db_free): New function.
7823 (thread_db_handle_monitor_command): Likewise.
7824 * config.in: Regenerate.
7825 * configure: Regenerate.
7827 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7829 * spu-low.c (spu_kill): Wait for inferior to terminate.
7830 Call clear_inferiors.
7831 (spu_detach): Call clear_inferiors.
7833 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7835 * aclocal.m4: Regenerate.
7836 * config.in: Likewise.
7837 * configure: Likewise.
7839 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7841 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7842 (parse_spufs_run): New function.
7843 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7844 (ppc_breakpoint_at): Handle SPU breakpoints.
7846 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7848 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7849 (SPUFS_MAGIC): Define.
7850 (spu_enumerate_spu_ids): New function.
7851 (linux_qxfer_spu): New function.
7852 (linux_target_ops): Install linux_qxfer_spu.
7854 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7856 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7857 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7858 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7859 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7860 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7861 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7862 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7863 (init_registers_powerpc_cell32l): Add prototype.
7864 (init_registers_powerpc_cell64l): Likewise.
7865 (ppc_arch_setup): Detect Cell/B.E. architecture.
7867 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7869 * Makefile.in (datarootdir): New variable.
7871 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7873 * linux-low.c (linux_write_memory): Update debugging output.
7874 * Makefile.in (clean): Add new descriptions.
7875 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7876 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7877 * configure.srv: Add new files for arm*-*-linux*.
7878 * linux-arm-low.c: Add new declarations.
7879 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7880 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7881 (HWCAP_VFPv3D16): New.
7882 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7883 instead of __IWMMXT__.
7884 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7885 (arm_arch_setup): New.
7886 (target_regsets): Remove #ifdef. Add VFP regset.
7887 (the_low_target): Use arm_arch_setup.
7889 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7891 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7892 the main thread again.
7894 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7896 Adding Neutrino gdbserver.
7897 * configure: Regenerated.
7898 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7899 * configure.srv (i[34567]86-*-nto*): New target.
7900 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7901 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7902 (nto_comctrl) [__QNX__]: New function.
7903 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7905 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7907 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7910 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7911 Pedro Alves <pedro@codesourcery.com>
7913 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7914 don't support CONTEXT_EXTENDED_REGISTERS.
7915 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7916 (the_low_target): Install them.
7917 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7918 failing with ERROR_PIPE_NOT_CONNECTED.
7920 2009-06-30 Doug Evans <dje@google.com>
7921 Pierre Muller <muller@ics.u-strasbg.fr>
7923 Add h/w watchpoint support to x86-linux, win32-i386.
7924 * Makefile.in (SFILES): Add i386-low.c
7925 (i386_low_h): Define.
7926 (i386-low.o): Add dependencies.
7927 (linux-x86-low.o): Add i386-low.h dependency.
7928 (win32-i386-low.o): Ditto.
7929 * i386-low.c: New file.
7930 * i386-low.h: New file.
7931 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7932 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7933 * linux-low.c (linux_add_process): Initialize arch_private.
7934 (linux_remove_process): Free arch_private.
7935 (add_lwp): Initialize arch_private.
7936 (delete_lwp): Free arch_private.
7937 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7939 * linux-low.h (process_info_private): New member arch_private.
7940 (lwp_info): New member arch_private.
7941 (linux_target_ops): New members new_process, new_thread,
7943 (ptid_of): New macro.
7944 * linux-x86-low.c: Include stddef.h, i386-low.h.
7945 (arch_process_info): New struct.
7946 (arch_lwp_info): New struct.
7947 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7948 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7949 (i386_dr_low_get_status): New function.
7950 (x86_insert_point, x86_remove_point): New functions.
7951 (x86_stopped_by_watchpoint): New function.
7952 (x86_stopped_data_address): New function.
7953 (x86_linux_new_process, x86_linux_new_thread): New functions.
7954 (x86_linux_prepare_to_resume): New function.
7955 (the_low_target): Add entries for insert_point, remove_point,
7956 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7958 * server.c (debug_hw_points): New global.
7959 (monitor_show_help): Document set debug-hw-points.
7960 (handle_query): Process "set debug-hw-points".
7961 * server.h (debug_hw_points): Declare.
7962 (paddress): Declare.
7963 * utils.c (NUMCELLS, CELLSIZE): New macros.
7964 (get_sell, xsnprintf, paddress): New functions.
7965 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7966 remove_point, stopped_by_watchpoint, stopped_data_address.
7967 * win32-i386-low.c: Include i386-low.h.
7968 (debug_reg_state): Replaces dr.
7969 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7970 (i386_dr_low_get_status): New function.
7971 (i386_insert_point, i386_remove_point): New functions.
7972 (i386_stopped_by_watchpoint): New function.
7973 (i386_stopped_data_address): New function.
7974 (i386_initial_stuff): Update.
7975 (get_thread_context,set_thread_context,i386_thread_added): Update.
7976 (the_low_target): Add entries for insert_point,
7977 remove_point, stopped_by_watchpoint, stopped_data_address.
7978 * win32-low.c (win32_insert_watchpoint): New function.
7979 (win32_remove_watchpoint): New function.
7980 (win32_stopped_by_watchpoint): New function.
7981 (win32_stopped_data_address): New function.
7982 (win32_target_ops): Add entries for insert_watchpoint,
7983 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7984 * win32-low.h (win32_target_ops): New members insert_point,
7985 remove_point, stopped_by_watchpoint, stopped_data_address.
7987 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7989 * server.c (process_serial_event): Re-return unsupported, not
7990 error, if the type isn't recognized. Re-allow supporting only
7991 insert or remove packets. Also call require_running for
7992 breakpoints. Add missing break statement to default case. Tidy.
7993 * target.h (struct target_ops): Rename insert_watchpoint to
7994 insert_point, and remove_watchpoint to remove_point.
7996 * linux-low.h (struct linux_target_ops): Likewise.
7997 * linux-low.c (linux_insert_watchpoint): Rename to ...
7998 (linux_insert_point): ... this. Adjust.
7999 (linux_remove_watchpoint): Rename to ...
8000 (linux_remove_point): ... this. Adjust.
8001 (linux_target_ops): Adjust.
8002 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8003 (cris_insert_point): ... this.
8004 (cris_remove_watchpoint): Rename to ...
8005 (cris_remove_point): ... this.
8006 (the_low_target): Adjust.
8008 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8010 * server.c (handle_v_kill): Pass signal_pid to
8011 kill_inferior if multi_process is zero.
8013 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8015 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8016 * target.h (target_ops): Comment for *_watchpoint to make it clear
8017 the functions can get types '0' and '1'.
8019 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8021 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8022 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8023 * regcache.c (get_regcache): Likewise.
8024 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8025 * win32-low.c (child_fetch_inferior_registers): Remove check for
8028 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8029 Pedro Alves <pedro@codesourcery.com>
8031 * target.h (struct target_ops) <supports_multi_process>: New
8033 (target_supports_multi_process): New.
8034 * server.c (handle_query): Even if GDB reports support, only
8035 enable multi-process if the target also supports it. Report
8036 multi-process support only if the target backend supports it.
8037 * linux-low.c (linux_supports_multi_process): New function.
8038 (linux_target_ops): Install it as target_supports_multi_process
8041 2009-05-24 Doug Evans <dje@google.com>
8043 Global renaming of find_thread_pid to find_thread_ptid.
8044 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8045 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8046 All callers updated.
8048 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8049 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8052 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8053 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8054 (linux_resume_one_lwp): Ditto.
8056 2009-05-23 Doug Evans <dje@google.com>
8058 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8059 from struct inferior_list_entry * to struct lwp_info *.
8060 All callers updated.
8062 2009-05-13 Doug Evans <dje@google.com>
8064 * linux-x86-low.c: Don't include assert.h.
8065 (x86_siginfo_fixup): Use fatal, not assert.
8066 (x86_arch_setup): Fix comment.
8068 2009-05-12 Doug Evans <dje@google.com>
8070 Biarch support for i386/amd64 gdbserver.
8071 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8072 Add linux-x86-low.c.
8073 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8074 (linux-x86-low.o): Add.
8075 * linux-x86-64-low.c: Delete.
8076 * linux-i386-low.c: Delete.
8077 * linux-x86-low.c: New file.
8078 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8080 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8082 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8083 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8084 (linux_child_pid_to_exec_file): New function.
8085 (elf_64_header_p, elf_64_file_p): New functions.
8086 (siginfo_fixup): New function.
8087 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8088 give target a chance to convert layout.
8089 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8090 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8092 2009-05-07 Doug Evans <dje@google.com>
8094 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8095 (regsets_store_inferior_registers): Ditto.
8097 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8101 * linux-low.c (must_set_ptrace_flags): Delete.
8102 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8104 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8105 `lwp->must_set_ptrace_flags' instead.
8106 (linux_wait_for_event_1): Set ptrace options here.
8107 (linux_wait_1): ... not here.
8109 2009-04-30 Doug Evans <dje@google.com>
8111 * inferiors.c (started_inferior_callback): New function.
8112 (attached_inferior_callback): New function.
8113 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8114 * server.c (print_started_pid, print_attached_pid): New functions.
8115 (detach_or_kill_for_exit): New function.
8116 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8117 * server.h (have_started_inferiors_p): Declare.
8118 (have_attached_inferiors_p): Declare.
8120 * inferiors.c (remove_process): Fix memory leak, free process.
8121 * linux-low.c (linux_remove_process): New function.
8122 (linux_kill): Call it instead of remove_process.
8123 (linux_detach, linux_wait_1): Ditto.
8125 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8127 * configure.srv: Add x86 Windows CE target.
8129 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8131 * inferiors.c (get_thread_process): Make global.
8132 * server.h (get_thread_process): Add prototype.
8133 * thread-db.c (find_one_thread): Use get_thread_process
8134 instead of current_process.
8135 (thread_db_get_tls_address): Do not crash if called when
8136 thread layer is not yet initialized.
8138 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8140 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8141 * spu-low.c (current_tid): Rename to ...
8142 (current_ptid): ... this.
8143 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8144 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8145 ptid_get_lwp (current_ptid) instead of current_tid.
8146 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8147 instead of current_tid. Use find_process_pid to verify pid
8148 argument is valid. Pass proper argument to remove_process.
8149 (spu_thread_alive): Compare current_ptid instead of current_tid.
8150 (spu_resume): Likewise.
8152 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8154 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8157 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8159 Implement the multiprocess extensions, and add linux multiprocess
8162 * server.h (ULONGEST): Declare.
8163 (struct ptid, ptid_t): New.
8164 (minus_one_ptid, null_ptid): Declare.
8165 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8166 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8167 (struct inferior_list_entry): Change `id' type from unsigned from
8169 (struct sym_cache, struct breakpoint, struct
8170 process_info_private): Forward declare.
8171 (struct process_info): Declare.
8172 (current_process): Declare.
8173 (all_processes): Declare.
8174 (initialize_inferiors): Declare.
8175 (add_thread): Adjust to use ptid_t.
8176 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8177 (add_process, remove_process, find_thread_pid): Declare.
8178 (find_inferior_id): Adjust to use ptid_t.
8179 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8180 (multi_process): Declare.
8181 (push_event): Adjust to use ptid_t.
8182 (read_ptid, write_ptid): Declare.
8183 (prepare_resume_reply): Adjust to use ptid_t.
8184 (clear_symbol_cache): Declare.
8185 * inferiors.c (all_processes): New.
8186 (null_ptid, minus_one_ptid): New.
8187 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8188 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8189 (add_thread): Change unsigned long to ptid. Remove gdb_id
8191 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8192 (gdb_id_to_thread): Rename to ...
8193 (find_thread_pid): ... this. Change unsigned long to ptid.
8194 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8195 (loaded_dll, pull_pid_from_list): Adjust.
8196 (add_process, remove_process, find_process_pid)
8197 (get_thread_process, current_process, initialize_inferiors): New.
8198 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8199 (struct target_waitstatus) <related_pid>: Ditto.
8200 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8202 (struct target_ops) <join>: Add `pid' argument.
8203 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8204 (struct target_ops) <wait>: Add `ptid' field. Change return type
8206 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8207 (mywait): Add `ptid' argument. Change return type to ptid_t.
8208 (target_pid_to_str): Declare.
8209 * target.c (set_desired_inferior): Adjust to use ptids.
8210 (mywait): Add new `ptid' argument. Adjust.
8211 (target_pid_to_str): New.
8212 * mem-break.h (free_all_breakpoints): Declare.
8213 * mem-break.c (breakpoints): Delelete.
8214 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8215 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8216 to use per-process breakpoint list.
8217 (free_all_breakpoints): New.
8218 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8219 (symbol_cache, all_symbols_looked_up): Delete.
8221 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8223 (prepare_resume_reply): Change ptid argument's type from unsigned
8224 long to ptid_t. Adjust. Implement W;process and X;process.
8225 (free_sym_cache, clear_symbol_cache): New.
8226 (look_up_one_symbol): Adjust to per-process symbol cache. *
8227 * server.c (cont_thread, general_thread, step_thread): Change type
8230 (multi_process): New.
8231 (last_ptid): Change type to ptid_t.
8232 (struct vstop_notif) <ptid>: Change type to ptid_t.
8233 (queue_stop_reply, push_event): Change `ptid' argument's type to
8235 (discard_queued_stop_replies): Add `pid' argument.
8236 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8237 changes. Don't reference the `attached' global.
8238 (attach_inferior): Adjust to mywait interface changes.
8239 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8240 features. Handle and report "multiprocess+". Handle
8242 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8244 (handle_v_kill): New.
8245 (handle_v_stopped): Adjust to use target_pid_to_str.
8246 (handle_v_requests): Allow multiple attaches and runs when
8247 multiprocess extensions are in effect. Handle "vKill".
8248 (myresume): Adjust to use ptids.
8249 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8250 (handle_status): Adjust to discard_queued_stop_replies interface
8252 (first_thread_of, kill_inferior_callback)
8253 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8254 (main): Call initialize_inferiors. Adjust to use ptids, killing
8255 and detaching from all inferiors. Handle multiprocess packet
8257 * linux-low.h: Include gdb_proc_service.h.
8258 (struct process_info_private): New.
8259 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8260 <lwpid_of>: Use ptid_get_lwp.
8261 (get_lwp_thread): Adjust.
8262 (struct lwp_info): Add `dead' member.
8263 (find_lwp_pid): Declare.
8264 * linux-low.c (thread_db_active): Delete.
8265 (new_inferior): Adjust comment.
8266 (inferior_pid): Delete.
8267 (linux_add_process): New.
8268 (handle_extended_wait): Adjust.
8269 (add_lwp): Change unsigned long to ptid.
8270 (linux_create_inferior): Add process to processes table. Adjust
8271 to use ptids. Don't set new_inferior here.
8272 (linux_attach_lwp): Rename to ...
8273 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8274 it. Adjust to use ptids.
8275 (linux_attach_lwp): New.
8276 (linux_attach): Add process to processes table. Don't set
8278 (struct counter): New.
8279 (second_thread_of_pid_p, last_thread_of_process_p): New.
8280 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8282 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8283 processes. Remove process from process table.
8284 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8285 to multiple processes.
8286 (any_thread_of): New.
8287 (linux_detach): Add `pid' argument, and handle it. Remove process
8288 from processes table.
8289 (linux_join): Add `pid' argument. Handle it.
8290 (linux_thread_alive): Change unsighed long argument to ptid_t.
8291 Consider dead lwps as not being alive.
8292 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8293 threads we're not interested in.
8294 (same_lwp, find_lwp_pid): New.
8295 (linux_wait_for_lwp): Change `pid' argument's type from int to
8297 (linux_wait_for_event): Rename to ...
8298 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8299 from int to ptid_t. Adjust.
8300 (linux_wait_for_event): New.
8301 (linux_wait_1): Add `ptid' argument. Change return type to
8302 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8303 that exit from the process table.
8304 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8306 (mark_lwp_dead): New.
8307 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8308 stopping all threads, mark its main lwp as dead.
8309 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8311 (fetch_register, usr_store_inferior_registers)
8312 (regsets_fetch_inferior_registers)
8313 (regsets_store_inferior_registers, linux_read_memory)
8314 (linux_write_memory): Inline `inferior_pid'.
8315 (linux_look_up_symbols): Adjust to use per-process
8317 (linux_request_interrupt): Adjust to use ptids.
8318 (linux_read_auxv): Inline `inferior_pid'.
8319 (initialize_low): Don't reference thread_db_active.
8320 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8321 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8322 (ps_getpid): Return the pid of the current inferior.
8323 * thread-db.c (proc_handle, thread_agent): Delete.
8324 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8326 (find_one_thread): Change argument type to ptid_t. Adjust to
8328 (maybe_attach_thread): Adjust to per-process data and ptids.
8329 (thread_db_find_new_threads): Ditto.
8330 (thread_db_init): Ditto.
8331 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8332 processes table. Adjust to use ptids.
8333 (spu_kill, spu_detach): Adjust interface. Remove process from
8335 (spu_join, spu_thread_alive): Adjust interface.
8336 (spu_wait): Adjust interface. Remove process from processes
8337 table. Adjust to use ptids.
8338 * win32-low.c (current_inferior_tid): Delete.
8339 (current_inferior_ptid): New.
8340 (debug_event_ptid): New.
8341 (thread_rec): Take a ptid. Adjust.
8342 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8343 (child_delete_thread): Ditto.
8344 (do_initial_child_stuff): Add `attached' argument. Add process to
8346 (child_fetch_inferior_registers, child_store_inferior_registers):
8348 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8349 (win32_attach): Pass 1 to do_initial_child_stuff.
8350 (win32_kill): Adjust interface. Remove process from processes
8352 (win32_detach): Ditto.
8353 (win32_join): Adjust interface.
8354 (win32_thread_alive): Take a ptid.
8355 (win32_resume): Adjust to use ptids.
8356 (get_child_debug_event): Ditto.
8357 (win32_wait): Adjust interface. Remove exiting process from
8360 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8362 Non-stop mode support.
8364 * server.h (non_stop): Declare.
8365 (gdb_client_data, handler_func): Declare.
8366 (delete_file_handler, add_file_handler, start_event_loop):
8368 (handle_serial_event, handle_target_event, push_event)
8369 (putpkt_notif): Declare.
8370 * target.h (enum resume_kind): New.
8371 (struct thread_resume): Replace `step' field by `kind' field.
8372 (TARGET_WNOHANG): Define.
8373 (struct target_ops) <wait>: Add `options' argument.
8374 <supports_non_stop, async, start_non_stop>: New fields.
8375 (target_supports_non_stop, target_async): New.
8376 (start_non_stop): Declare.
8377 (mywait): Add `options' argument.
8378 * target.c (mywait): Add `options' argument. Print child exit
8380 (start_non_stop): New.
8381 * server.c (non_stop, own_buf, mem_buf): New globals.
8382 (struct vstop_notif): New.
8383 (notif_queue): New global.
8384 (queue_stop_reply, push_event, discard_queued_stop_replies)
8385 (send_next_stop_reply): New.
8386 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8388 (attach_inferior): In non-stop mode, don't wait for the target
8390 (handle_general_set): Handle QNonStop.
8391 (handle_query): When handling qC, return the current general
8392 thread, instead of the first thread of the list.
8393 (handle_query): If the backend supports non-stop mode, include
8394 QNonStop+ in the qSupported query response.
8395 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8397 (handle_v_attach, handle_v_run): Handle non-stop mode.
8398 (handle_v_stopped): New.
8399 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8400 (myresume): Adjust to use resume_kind. Handle non-stop.
8401 (queue_stop_reply_callback): New.
8402 (handle_status): Handle non-stop mode.
8403 (main): Clear non_stop flag on reconnection. Use the event-loop.
8404 Refactor serial protocol handling from here ...
8405 (process_serial_event): ... to this new function. When GDB
8406 selects any thread, select one here. In non-stop mode, wait until
8407 GDB acks all pending events before exiting.
8408 (handle_serial_event, handle_target_event): New.
8409 * remote-utils.c (remote_open): Install remote_desc in the event
8411 (remote_close): Remove remote_desc from the event loop.
8412 (putpkt_binary): Rename to...
8413 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8414 (putpkt_binary): New as wrapper around putpkt_binary_1.
8415 (putpkt_notif): New.
8416 (prepare_resume_reply): In non-stop mode, don't change the
8418 * event-loop.c: New.
8419 * Makefile.in (OBJ): Add event-loop.o.
8420 (event-loop.o): New rule.
8422 * linux-low.h (pid_of): Moved here.
8424 (get_lwp_thread): Use lwpid_of.
8425 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8426 * linux-low.c (pid_of): Delete.
8427 (inferior_pid): Use lwpid_of.
8428 (linux_event_pipe): New.
8429 (target_is_async_p): New.
8431 (handle_extended_wait): Use lwpid_of.
8432 (add_lwp): Don't set lwpid field.
8433 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8434 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8435 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8436 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8437 first. Adjust to linux_wait_for_event interface changes. Use
8439 (linux_detach): Don't delete the main lwp here.
8440 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8441 (status_pending_p): Don't consider explicitly suspended lwps.
8442 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8443 pointer. Add OPTIONS argument. Change return type to int. Use
8444 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8445 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8446 pointer. Add status pointer argument. Return a pid instead of a
8447 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8448 changes. In non-stop mode, don't switch to a random thread.
8449 (linux_wait): Rename to...
8450 (linux_wait_1): ... this. Add target_options argument, and handle
8451 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8452 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8453 clean exit and signal exit code. Don't stop all threads in
8454 non-stop mode. In all-stop mode, only stop all threads when
8455 reporting a stop to GDB. Handle explicit thread stop requests.
8456 (async_file_flush, async_file_mark): New.
8458 (send_sigstop): Use lwpid_of.
8459 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8460 interface changes. In non-stop mode, don't switch to a random
8462 (linux_resume_one_lwp): Use lwpid_of.
8463 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8464 (linux_resume_one_thread): ... this. Handle resume_stop. In
8465 non-stop mode, don't look for pending flag in all threads.
8466 (resume_status_pending_p): Don't consider explicitly suspended
8468 (my_waitpid): Reimplement. Emulate __WALL.
8469 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8471 (sigchld_handler, linux_supports_non_stop, linux_async)
8472 (linux_start_non_stop): New.
8473 (linux_target_ops): Register linux_supports_non_stop, linux_async
8474 and linux_start_non_stop.
8475 (initialize_low): Install SIGCHLD handler.
8476 * thread-db.c (thread_db_create_event, find_one_thread)
8477 (thread_db_get_tls_address): Use lwpid_of.
8478 * win32-low.c (win32_detach): Adjust to use resume_kind.
8479 (win32_wait): Add `options' argument.
8480 * spu-low.c (spu_resume): Adjust to use resume_kind.
8481 (spu_wait): Add `options' argument.
8483 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8485 Decouple target code from remote protocol.
8487 * target.h (enum target_waitkind): New.
8488 (struct target_waitstatus): New.
8489 (struct target_ops) <wait>: Return an unsigned long. Take a
8490 target_waitstatus pointer instead of a char pointer.
8492 * target.c (mywait): Change prototype to return an unsigned long.
8493 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8494 * server.h (thread_from_wait, old_thread_from_wait): Delete
8496 (prepare_resume_reply): Change prototype to take a
8498 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8499 (last_status, last_ptid): New.
8500 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8501 pid instead of a signal.
8502 (attach_inferior): Remove "status" and "signal" parameters.
8504 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8506 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8507 (handle_v_requests, myresume): Remove "status" and "signal"
8509 (handle_status): New.
8510 (main): Delete local `status'. Adjust.
8511 * remote-utils.c: Include target.h.
8512 (prepare_resume_reply): Change prototype to take a
8513 target_waitstatus. Adjust.
8515 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8517 * spu-low.c (spu_wait): Adjust.
8518 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8520 (win32_wait): Adjust.
8522 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8524 * target.h (struct thread_resume): Delete leave_stopped member.
8525 (struct target_ops): Add a `n' argument to the `resume' callback.
8526 * server.c (start_inferior): Adjust.
8527 (handle_v_cont, myresume): Adjust.
8528 * linux-low.c (check_removed_breakpoint): Adjust to resume
8529 interface change, and to removed leave_stopped field.
8530 (resume_ptr): Delete.
8531 (struct thread_resume_array): New.
8532 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8533 resume interface change.
8534 (linux_continue_one_thread, linux_queue_one_thread)
8535 (resume_status_pending_p): Check if the resume field is NULL
8536 instead of checking the leave_stopped member.
8537 (linux_resume): Adjust to the target resume interface change.
8538 * spu-low.c (spu_resume): Adjust to the target resume interface
8540 * win32-low.c (win32_detach, win32_resume): Ditto.
8542 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8544 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8546 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8548 (linux_continue_one_thread): Only preserve the stepping flag if
8549 there's a pending breakpoint.
8551 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8553 * server.c (main): After the inferior having exited, call
8554 remote_close before exiting gdbserver.
8556 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8558 Fix size of FPSCR in Power 7 processors.
8559 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8560 (PPC_FEATURE_HAS_DFP): New #define.
8561 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8564 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8566 * server.c (handle_query) Whitespace and formatting.
8568 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8570 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8571 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8572 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8573 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8574 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8575 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8576 Makefile.in, configure.ac: Fix whitespace throughout.
8577 * configure: Regenerate.
8579 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8581 * inferiors.c (find_inferior): Make it safe for the callback
8582 function to delete the currently iterated inferior.
8584 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8586 * Makefile.in (linuw_low_h): Move higher.
8587 (thread-db.o): Depend on $(linux_low_h).
8589 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8591 Rename "process" to "lwp" throughout.
8593 * linux-low.c (all_processes): Rename to...
8594 (all_lwps): ... this.
8595 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8596 (add_process): Rename to ...
8597 (add_lwp): ... this. Adjust.
8598 (linux_create_inferior): Adjust.
8599 (linux_attach_lwp): Adjust.
8600 (linux_attach): Adjust.
8601 (linux_kill_one_process): Rename to ...
8602 (linux_kill_one_lwp): ... this. Adjust.
8603 (linux_kill): Adjust.
8604 (linux_detach_one_process): Rename to ...
8605 (linux_detach_one_lwp): ... this. Adjust.
8606 (linux_detach): Adjust.
8607 (check_removed_breakpoint): Adjust.
8608 (status_pending_p): Adjust.
8609 (linux_wait_for_process): Rename to ...
8610 (linux_wait_for_lwp): ... this. Adjust.
8611 (linux_wait_for_event): Adjust.
8612 (send_sigstop): Adjust.
8613 (wait_for_sigstop): Adjust.
8614 (stop_all_processes): Rename to ...
8615 (stop_all_lwps): ... this.
8616 (linux_resume_one_process): Rename to ...
8617 (linux_resume_one_lwp): ... this. Adjust.
8618 (linux_set_resume_request, linux_continue_one_thread)
8619 (linux_queue_one_thread, resume_status_pending_p)
8620 (usr_store_inferior_registers, regsets_store_inferior_registers)
8621 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8623 * linux-low.h (get_process): Rename to ...
8624 (get_lwp): ... this. Adjust.
8625 (get_thread_process): Rename to ...
8626 (get_thread_lwp): ... this. Adjust.
8627 (get_process_thread): Rename to ...
8628 (get_lwp_thread): ... this. Adjust.
8629 (struct process_info): Rename to ...
8630 (struct lwp_info): ... this.
8631 (all_processes): Rename to ...
8632 (all_lwps): ... this.
8633 * proc-service.c (ps_lgetregs): Adjust.
8634 * thread-db.c (thread_db_create_event, find_one_thread)
8635 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8637 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8639 * server.c (handle_query): Handle "qAttached".
8641 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8643 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8644 GPLv3, update license URL.
8646 2009-03-01 Doug Evans <dje@google.com>
8648 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8649 (server_h): Add gdb_signals.h.
8650 (signals.o): Update.
8651 * server.h (target_signal_from_host,target_signal_to_host_p)
8652 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8654 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8656 * remote-utils.c (getpkt): Also generate remote-debug
8657 information if noack_mode is set.
8659 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8661 * server.c (handle_query): Report qXfer:siginfo:read and
8662 qXfer:siginfo:write as supported and handle them.
8663 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8664 * linux-low.c (linux_xfer_siginfo): New.
8665 (linux_target_ops): Set it.
8667 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8669 * server.c (gdbserver_usage): Mention --remote-debug.
8670 (main): Accept '--remote-debug' switch.
8672 2009-01-18 Doug Evans <dje@google.com>
8674 * regcache.c (new_register_cache): No need to check result of xcalloc.
8675 * server.c (handle_search_memory): Back out calls to xmalloc,
8676 result is checked and error is returned to user upon failure.
8677 (handle_query): Ditto. Add more checks for result of malloc.
8678 (handle_v_cont): Check result of malloc, report error back to
8680 (handle_v_run): Ditto. Call freeargv.
8681 * server.h (freeargv): Declare.
8682 * utils.c (freeargv): New fn.
8684 2009-01-15 Doug Evans <dje@google.com>
8686 * gdbreplay.c (perror_with_name): Make arg const char *.
8687 * server.h (target_signal_to_name): Make return type const char *.
8688 * thread-db.c (thread_db_err_str): Make return type const char *.
8689 * utils.c (perror_with_name): Make arg const char *.
8691 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8693 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8694 when handling a EXIT_PROCESS_DEBUG_EVENT.
8696 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8698 * gdbreplay.c (gdbreplay_version): Update copyright year.
8699 * server.c (gdbserver_version): Likewise.
8701 2009-01-05 Doug Evans <dje@google.com>
8703 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8704 (handle_extended_wait): Improve comment.
8706 2008-12-13 Doug Evans <dje@google.com>
8708 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8709 * server.h (ATTR_MALLOC): New macro.
8710 (xmalloc,xcalloc,xstrdup): Declare.
8711 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8712 * inferiors.c: Ditto.
8713 * linux-low.c: Ditto.
8714 * mem-break.c: Ditto.
8715 * regcache.c: Ditto.
8716 * remote-utils.c: Ditto.
8719 * win32-low.c: Ditto.
8721 2008-12-12 Doug Evans <dje@google.com>
8723 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8724 in debugging printf.
8726 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8728 2008-12-09 Doug Evans <dje@google.com>
8730 * linux-low.h (struct process_info): Delete member tid, unused.
8731 * thread-db.c (find_one_thread): Update.
8732 (maybe_attach_thread): Update.
8734 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8736 * target.h (struct target_ops): Add qxfer_osdata member.
8737 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8739 (linux_qxfer_osdata): New functions.
8740 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8742 * server.c (handle_query): Handle "qXfer:osdata:read:".
8743 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8744 (buffer_xml_printf): New functions.
8745 * server.h (struct buffer): New.
8746 (buffer_grow_str, buffer_grow_str0): New macros.
8747 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8748 (buffer_xml_printf): Declare.
8750 2008-11-24 Doug Evans <dje@google.com>
8752 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8754 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8756 * server.c (handle_v_run): Always use the supplied argument list.
8758 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8760 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8761 (xtensa_regmap_table): Add entry for scompare1.
8763 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8765 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8766 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8767 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8768 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8769 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8770 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8771 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8772 XML target descriptions.
8773 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8774 when inferior is running on an ISA 2.05 or later processor. Add
8775 special case to return offset for full 64-bit slot of FPSCR when
8778 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8780 * Makefile.in (SFILES, clean): Added sparc64 files.
8781 (reg-sparc64.o, reg-sparc64.c): New.
8782 * configure.srv (sparc*-*-linux*): New configuration.
8783 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8784 syscall arguments for SPARC.
8785 (regsets_store_inferior_registers): Likewise.
8786 * linux-sparc-low.c: New file.
8788 2008-10-21 Doug Evans <dje@google.com>
8790 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8791 (READLINE_DIR,READLINE_DEP): Delete.
8792 (INTERNAL_CFLAGS): Update.
8793 (LINTFLAGS): Update.
8795 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8797 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8798 whole argv from the last run, not just argv[0].
8800 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8802 * regcache.c (new_register_cache): Return NULL if the register
8803 cache size isn't known yet.
8804 (free_register_cache): Avoid dereferencing a NULL regcache.
8806 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8808 * configure.srv: Merge MIPS and MIPS64.
8810 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8812 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8814 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8816 * Makefile.in: Add required vsx dependencies.
8818 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8819 Declare init_registers_powerpc_vsx32l.
8820 Declare init_registers_powerpc_vsx64l.
8821 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8822 (ppc_arch_setup): Check for VSX in hwcap.
8823 (ppc_fill_vsxregset): New function.
8824 (ppc_store_vsxregset): New function.
8825 Add new VSX entry in regset_info target_regsets.
8827 * configure.srv: Add new VSX dependencies.
8829 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8831 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8832 (remote_open): Set or clear transport_is_reliable.
8833 (putpkt_binary): Don't expect acks in noack mode.
8834 (getpkt): Don't send ack/nac in noack mode.
8835 * server.c (handle_general_set): Handle QStartNoAckMode.
8836 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8838 (main): Reset noack_mode on every connection.
8839 * server.h (noack_mode): Declare.
8841 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8843 * Makefile.in (GDBREPLAY_OBS): New variable.
8844 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8846 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8847 Daniel Jacobowitz <dan@codesourcery.com>
8849 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8850 (usr_store_inferior_registers): Likewise.
8851 (regsets_store_inferior_registers): Likewise.
8853 2008-07-31 Rolf Jansen <rj@surtec.com>
8854 Pedro Alves <pedro@codesourcery.com>
8856 * configure.ac: Check for memmem declaration.
8857 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8858 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8859 (disable_packet_qfThreadInfo): Unconditionally compile.
8860 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8861 * configure, config.in: Regenerate.
8863 2008-07-28 Doug Kwan <dougkwan@google.com>
8865 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8866 (linux_write_memory): Remove declaration of errno.
8868 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8870 * linux-low.c (handle_extended_wait): Do not use "status"
8871 variable uninitialized.
8873 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8875 * server.c (handle_v_attach): Inhibit reporting dll changes.
8877 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8879 * remote-utils.c (prepare_resume_reply): If requested, don't
8880 output "thread:TID" in the T stop reply.
8882 * server.c (disable_packet_vCont, disable_packet_Tthread)
8883 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8884 (handle_query): If requested, disable support for qC, qfThreadInfo
8886 (handle_v_requests): If requested, disable support for vCont.
8887 (gdbserver_show_disableable): New.
8888 (main): Handle --disable-packet and --disable-packet=LIST.
8890 * server.h (disable_packet_vCont, disable_packet_Tthread)
8891 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8893 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8895 * server.c (gdbserver_usage): Mention --version.
8897 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8899 * Makefile.in (gdbreplay.o): New rule.
8901 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8903 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8904 message, not gdbserver.
8906 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8907 Nathan Sidwell <nathan@codesourcery.com>
8908 Joseph Myers <joseph@codesourcery.com>
8910 * acinclude.m4: Include ../../config/acx.m4.
8911 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8912 * configure, config.in: Regenerate.
8913 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8914 * server.c (gdbserver_version): Print PKGVERSION.
8915 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8916 (main): Adjust gdbserver_usage calls.
8917 * gdbreplay.c (version, host_name): Add declarations.
8918 (gdbreplay_version, gdbreplay_usage): New.
8919 (main): Accept --version and --help options.
8921 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8923 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8924 (arm_breakpoint_at): Handle Thumb.
8925 (the_low_target): Add comment.
8927 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8929 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8931 2008-05-09 Doug Evans <dje@google.com>
8933 * server.h (decode_search_memory_packet): Declare.
8934 * remote-utils.c (decode_search_memory_packet): New fn.
8935 * server.c (handle_search_memory_1): New fn.
8936 (handle_search_memory): New fn.
8937 (handle_query): Process qSearch:memory packets.
8939 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8941 * regcache.c (registers_length): Remove.
8942 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8943 full register packet.
8944 * regcache.h (registers_length): Remove prototype.
8945 * server.h (PBUFSIZ): Define to 16384.
8947 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8949 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8950 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8951 powerpc-64l.o, and powerpc-altivec64l.o.
8952 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8953 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8954 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8955 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8956 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8959 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8960 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8961 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8962 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8963 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8964 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8965 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8966 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8967 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8968 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8971 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8972 (init_registers_powerpc_32l): ... this new prototype.
8973 (init_registers_powerpc_32): Remove, replace by ...
8974 (init_registers_powerpc_altivec32l): ... this new prototype.
8975 (init_registers_powerpc_e500): Remove, replace by ...
8976 (init_registers_powerpc_e500l): ... this new prototype.
8977 (init_registers_ppc64): Remove, replace by ...
8978 (init_registers_powerpc_64l): ... this new prototype.
8979 (init_registers_powerpc_64): Remove, replace by ...
8980 (init_registers_powerpc_altivec64l): ... this new prototype.
8981 (ppc_num_regs): Set to 73.
8982 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8983 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8984 (ppc_cannot_store_register): Handle orig_r3 and trap.
8985 (ppc_arch_setup): Update init_registers_... calls.
8986 (ppc_fill_gregset): Handle orig_r3 and trap.
8988 * inferiors.c (clear_inferiors): Reset current_inferior.
8990 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8992 * acinclude.m4: Add override.m4.
8993 * configure: Regenerate.
8995 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8997 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8998 initial call to init_register_ppc64.
9000 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9002 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9003 single powerpc*-*-linux* case.
9004 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9006 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9008 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9009 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9011 * linux-ppc-low.c: Include <elf.h>.
9012 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9013 (ppc_hwcap): New global variable.
9014 (ppc_regmap): Remove __SPE__ #ifdef sections.
9015 (ppc_regmap_e500): New global variable.
9016 (ppc_cannot_store_register): Update __SPE__ special case.
9017 (ppc_get_hwcap): New function.
9018 (ppc_arch_setup): Use it to determine whether inferior supports
9019 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9020 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9021 Do not access registers if target does not support AltiVec.
9022 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9023 Do not access registers if target does not support SPE.
9024 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9026 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9028 * linux-low.c (disabled_regsets, num_regsets): New.
9029 (use_regsets_p): Delete.
9030 (linux_wait_for_process): Clear disabled_regsets.
9031 (regsets_fetch_inferior_registers): Check and set it.
9032 (regsets_store_inferior_registers): Likewise.
9033 (linux_fetch_registers, linux_store_registers): Do not use
9035 (initialize_low): Allocate disabled_regsets.
9037 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9039 * Makefile.in (LIBOBJS): New.
9041 (memmem.o): New rule.
9042 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9043 * configure: Regenerated.
9045 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9047 * server.c (handle_query): Never return "unsupported" for
9048 qXfer:features:read queries.
9050 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9052 * server.c (get_features_xml): Fix inverted condition.
9053 (handle_query): Always support qXfer:feature:read.
9055 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9057 * server.c (wrapper_argv): New.
9058 (start_inferior): Handle wrapper_argv. If set, expect an extra
9060 (gdbserver_usage): Document --wrapper.
9061 (main): Parse --wrapper.
9063 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9065 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9066 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9067 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9068 (ppc_set_pc): Likewise.
9069 (ppc_arch_setup): New function.
9070 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9071 of collect_register.
9072 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9074 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9076 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9077 instead of linux-ppc64-low.o.
9078 * linux-ppc64-low.c: Remove file.
9079 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9080 (linux-ppc64-low.o): Remove rule.
9082 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9083 (init_registers_powerpc_64): Likewise.
9084 (ppc_regmap): Conditionally define depending on __powerpc64__.
9085 (ppc_cannot_store_register): Do not special-case "fpscr" when
9086 compiled on __powerpc64__.
9087 (ppc_collect_ptrace_register): New function.
9088 (ppc_supply_ptrace_register): New function.
9089 (ppc_breakpoint): Change type to "unsigned int".
9090 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9091 (the_low_target): Conditionally provide initializers for the
9092 arch_setup member depending on __powerpc64__. Install
9093 collect_ptrace_register and supply_ptrace_register members.
9095 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9097 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9098 * server.c (gdbserver_xmltarget): Define.
9099 (get_features_xml): Use it to replace "target.xml" and arch_string.
9101 * configure.srv: Remove srv_xmltarget. Add XML files that were
9102 mentioned there to srv_xmlfiles instead. Remove conditional tests
9103 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9104 srv_xmlfiles and srv_regobj to include all possible choices.
9105 * configure.ac (srv_xmltarget): Remove.
9106 (srv_xmlfiles): Do not add "target.xml".
9107 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9108 checks for supplementary target information.
9109 * configure: Regenerate.
9110 * Makefile.in (XML_TARGET): Remove.
9111 (target.xml): Remove rule.
9112 (clean): Do not clean up target.xml.
9113 (.PRECIOUS): Do not mention target.xml.
9115 * target.h (struct target_ops): Remove arch_string member.
9116 * linux-low.c (linux_arch_string): Remove.
9117 (linux_target_ops): Remove arch_string initializer.
9118 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9119 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9120 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9121 * spu-low.c (spu_arch_string): Remove.
9122 (spu_target_ops): Remove arch_string initializer.
9123 * win32-low.c (win32_arch_string): Remove.
9124 (win32_target_ops): Remove arch_string initializer.
9125 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9126 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9127 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9129 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9131 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9132 by collect_ptrace_register and supply_ptrace_register hooks.
9133 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9134 instead of checking for the_low_target.left_pad_xfer.
9135 (usr_store_inferior_registers): Use collect_ptrace_register callback
9136 instead of checking for the_low_target.left_pad_xfer.
9138 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9139 (s390_supply_ptrace_register): Likewise.
9140 (s390_fill_gregset): Call s390_collect_ptrace_register.
9141 (the_low_target): Update.
9143 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9144 (ppc_supply_ptrace_register): Likewise.
9145 (the_low_target): Update.
9147 * linux-i386-low.c (the_low_target): Update.
9148 * linux-x86-64-low.c (the_low_target): Update.
9150 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9152 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9153 reg-s390.o and reg-s390x.o.
9155 * linux-low.c (new_inferior): New global variable.
9156 (linux_create_inferior, linux_attach): Set it.
9157 (linux_wait_for_process): Call the_low_target.arch_setup after the
9158 target has stopped for the first time.
9159 (initialize_low): Do not call the_low_target.arch_setup.
9161 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9162 (s390_set_pc): Likewise.
9163 (s390_arch_setup): New function.
9164 (the_low_target): Use s390_arch_setup as arch_setup routine.
9166 * regcache.c (realloc_register_cache): New function.
9167 (set_register_cache): Call it for each existing regcache.
9169 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9171 * server.h (init_registers): Remove prototype.
9173 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9174 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9175 instead of init_registers ().
9176 * linux-arm-low.c (init_registers_arm): Add prototype.
9177 (init_registers_arm_with_iwmmxt): Likewise.
9178 (the_low_target): Add initializer for arch_setup field.
9179 * linux-cris-low.c (init_registers_cris): Add prototype.
9180 (the_low_target): Add initializer for arch_setup field.
9181 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9182 (the_low_target): Add initializer for arch_setup field.
9183 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9184 (the_low_target): Add initializer for arch_setup field.
9185 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9186 (the_low_target): Add initializer for arch_setup field.
9187 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9188 (the_low_target): Add initializer for arch_setup field.
9189 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9190 (the_low_target): Add initializer for arch_setup field.
9191 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9192 (init_registers_mips64_linux): Likewise.
9193 (the_low_target): Add initializer for arch_setup field.
9194 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9195 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9196 (the_low_target): Add initializer for arch_setup field.
9197 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9198 (init_registers_powerpc_64): Likewise.
9199 (the_low_target): Add initializer for arch_setup field.
9200 * linux-s390-low.c (init_registers_s390): Add prototype.
9201 (init_registers_s390x): Likewise.
9202 (the_low_target): Add initializer for arch_setup field.
9203 * linux-sh-low.c (init_registers_sh): Add prototype.
9204 (the_low_target): Add initializer for arch_setup field.
9205 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9206 (the_low_target): Add initializer for arch_setup field.
9207 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9208 (the_low_target): Add initializer for arch_setup field.
9210 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9211 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9212 instead of init_registers ().
9213 * win32-arm-low.c (init_registers_arm): Add prototype.
9214 (the_low_target): Add initializer for arch_setup field.
9215 * win32-i386-low.c (init_registers_i386): Add prototype.
9216 (the_low_target): Add initializer for arch_setup field.
9218 * spu-low.c (init_registers_spu): Add prototype.
9219 (initialize_low): Call initialie_registers_spu () instead of
9220 initialize_registers ().
9222 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9224 * server.c (handle_v_requests): When handling the vRun and vAttach
9225 packets, if already debugging a process, don't kill it. Return an
9228 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9230 * server.c (handle_query): Correct length check.
9232 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9234 * win32-low.c (do_initial_child_stuff): Add process handle
9235 parameter. Set current_process_handle and current_process_id from the
9236 parameters. Clear globals.
9237 (win32_create_inferior): Don't set current_process_handle and
9238 current_process_id here. Instead pass them on the call to
9239 do_initial_child_stuff.
9240 (win32_attach): Likewise.
9241 (win32_clear_inferiors): New.
9242 (win32_kill): Don't close the current process handle or the
9243 current thread handle here. Instead call win32_clear_inferiors.
9244 (win32_detach): Don't open a new handle to the process. Call
9245 win32_clear_inferiors.
9246 (win32_join): Don't rely on current_process_handle; open a new
9247 handle using the process id.
9248 (win32_wait): Call win32_clear_inferiors when the inferior process
9251 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9253 * server.c (monitor_show_help): Add "exit".
9255 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9257 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9258 (clean): Add reg-xtensa.c.
9259 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9260 * configure.srv (xtensa*-*-linux*) New target.
9261 * linux-xtensa-low.c: New.
9262 * xtensa-xtregs.c: New.
9264 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9266 * hostio.c: Don't include errno.h.
9267 (errno_to_fileio_errno): Move to hostio-errno.
9268 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9269 error number outputting to the target->hostio_last_error callback.
9270 (hostio_packet_error): Use FILEIO_EINVAL directly.
9271 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9272 calls to hostio_error.
9273 * hostio-errno.c: New.
9274 * server.h (hostio_last_error_from_errno): Declare.
9275 * target.h (target_ops): Add hostio_last_error member.
9276 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9277 as hostio_last_error handler.
9278 * spu-low.c (spu_target_ops): Likewise.
9279 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9280 (wince_hostio_last_error): New functions.
9281 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9282 as hostio_last_error handler.
9283 (win32_target_ops) [!_WIN32_WCE]: Register
9284 hostio_last_error_from_errno as hostio_last_error handler.
9285 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9286 (hostio-errno.o): New rule.
9287 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9288 * configure.srv (srv_hostio_err_objs): New variable. Default to
9290 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9291 * configure: Regenerate.
9293 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9295 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9296 (linux_kill, linux_detach): Clean up the process list.
9297 * remote-utils.c (remote_open): Improve port number parsing.
9298 (putpkt_binary, input_interrupt): Only send interrupts if the target
9300 * server.c (extended_protocol): Make static.
9301 (attached): Define earlier.
9302 (exit_requested, response_needed, program_argv): New variables.
9303 (target_running): New.
9304 (start_inferior): Clear attached here.
9305 (attach_inferior): Set attached here.
9306 (require_running): Define.
9307 (handle_query): Use require_running and target_running. Implement
9309 (handle_v_attach, handle_v_run): New.
9310 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9311 (gdbserver_usage): Update.
9312 (main): Redo argument parsing. Handle --debug and --multi. Handle
9313 --attach along with other options or after the port. Save
9314 program_argv. Support no initial program. Resynchronize
9315 communication with GDB after an error. Handle "monitor exit".
9316 Use require_running and target_running. Always allow the extended
9317 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9318 restart in extended mode.
9319 * README: Refer to the GDB manual. Update --attach usage.
9321 2007-12-20 Andreas Schwab <schwab@suse.de>
9323 * linux-low.c (STACK_SIZE): Define.
9324 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9325 (linux_test_for_tracefork): Likewise.
9327 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9329 * linux-low.c (linux_wait_for_event): Update messages. Do not
9330 reinsert auto-delete breakpoints.
9331 * mem-break.c (struct breakpoint): Change return type of handler to
9333 (set_breakpoint_at): Update handler type.
9334 (reinsert_breakpoint_handler): Return 1 instead of calling
9336 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9338 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9339 * mem-break.h (set_breakpoint_at): Update handler type.
9340 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9341 * win32-low.c (auto_delete_breakpoint): New.
9342 (get_child_debug_event): Use it.
9344 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9346 * configure.ac: Check for pread and pwrite.
9347 * hostio.c (handle_pread): Fall back to lseek and read.
9348 (handle_pwrite): Fall back to lseek and write.
9349 * config.in, configure: Regenerated.
9351 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9353 * server.c (myresume): Add own_buf argument.
9354 (main): Update calls.
9356 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9358 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9359 * remote-utils.c (remote_open): Do not call disable_async_io.
9360 (block_async_io): Delete.
9361 (unblock_async_io): Make static.
9362 (initialize_async_io): New.
9363 * server.c (handle_v_cont): Handle async I/O here.
9364 (myresume): Likewise. Move other common resume tasks here...
9365 (main): ... from here. Call initialize_async_io. Disable async
9366 I/O before the main loop.
9367 * server.h (initialize_async_io): Declare.
9368 (block_async_io, unblock_async_io): Delete prototypes.
9369 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9371 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9373 * remote-utils.c (readchar): Allow binary data in received messages.
9375 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9377 * win32-low.c (attaching): New global.
9378 (win32_create_inferior): Clear the `attaching' global.
9379 (win32_attach): Set the `attaching' global.
9380 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9381 attaching. Only set a breakpoint at the entry point if not
9384 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9386 * server.c (main): Don't report dll events on the initial
9387 connection on attaches.
9389 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9391 * server.c (main): Relax numerical bases supported for the pid of
9392 the --attach command line argument.
9394 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9396 * win32-low.c (win32_attach): Call OpenProcess before
9397 DebugActiveProcess, not after. Add last error output to error
9400 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9402 * win32-low.c (win32_get_thread_context)
9403 (win32_set_thread_context): New functions.
9404 (thread_rec): Use win32_get_thread_context.
9405 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9406 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9409 2007-12-03 Leo Zayas
9410 Pedro Alves <pedro_alves@portugalmail.pt>
9412 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9414 (child_add_thread): Minor cleanup.
9415 (child_continue): Resume artificially suspended threads before
9416 calling ContinueDebugEvent.
9417 (suspend_one_thread): New.
9418 (fake_breakpoint_event): New.
9419 (get_child_debug_event): Change return type to int. Check here if
9420 gdb sent an interrupt request. If a soft interrupt was requested,
9421 fake a breakpoint event. Return 0 if there is no event to handle,
9423 (win32_wait): Don't check here if gdb sent an interrupt request.
9424 Ensure there is a valid event to handle.
9425 (win32_request_interrupt): Add soft interruption method as last
9428 2007-12-03 Leo Zayas
9429 Pedro Alves <pedro_alves@portugalmail.pt>
9431 * win32-low.h (win32_thread_info): Add descriptions to the
9432 structure members. Replace `suspend_count' counter by a
9434 * win32-low.c (thread_rec): Update condition of when to get the
9435 context from the inferior. Rely on ContextFlags being set if it
9436 has already been retrieved. Only suspend the inferior thread if
9437 we haven't already. Warn if that fails.
9438 (continue_one_thread): s/suspend_count/suspended/. Only call
9439 ResumeThread once. Warn if that fails.
9441 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9443 * win32-low.c (win32_wait): Don't read from the inferior when it
9446 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9448 * Makefile.in (win32_low_h): New variable.
9449 (win32-low.o): Add dependency on $(win32_low_h).
9450 (win32-arm-low.o, win32-i386-low.o): New rules.
9452 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9454 * hostio.c: Correct copyright year.
9456 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9458 * Makefile.in (OBS): Add hostio.o.
9459 (hostio.o): New rule.
9460 * server.h (handle_vFile): Declare.
9461 * hostio.c: New file.
9462 * server.c (handle_v_requests): Take packet_len and new_packet_len
9463 for binary packets. Call handle_vFile.
9464 (main): Update call to handle_v_requests.
9466 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9468 * linux-low.c: Include <sched.h>.
9470 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9472 * linux-low.c (linux_tracefork_grandchild): New.
9473 (linux_tracefork_child): Use clone.
9474 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9476 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9478 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9480 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9482 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9484 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9486 * inferiors.c (change_inferior_id): Delete.
9487 (add_pid_to_list, pull_pid_from_list): New.
9488 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9489 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9490 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9491 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9492 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9493 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9494 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9495 (using_threads): Always set to 1.
9496 (handle_extended_wait): New.
9497 (add_process): Do not set TID.
9498 (linux_create_inferior): Set must_set_ptrace_flags.
9499 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9500 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9501 (linux_thread_alive): Rename TID argument to LWPID.
9502 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9503 (linux_wait_for_event): Do not use TID or check using_threads. Update
9504 call to dead_thread_notify. Call handle_extended_wait.
9505 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9506 (send_sigstop): Delete sigstop_sent.
9507 (wait_for_sigstop): Avoid TID.
9508 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9509 (linux_test_for_tracefork): New.
9510 (linux_lookup_signals): Use thread_db_active and
9511 linux_supports_tracefork_flag.
9512 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9513 * linux-low.h (get_process_thread): Avoid TID.
9514 (struct process_ifo): Move thread_known and tid to the end. Remove
9516 (linux_attach_lwp, thread_db_init): Update prototypes.
9517 * server.h (change_inferior_id): Delete prototype.
9518 (add_pid_to_list, pull_pid_from_list): New prototypes.
9519 * thread-db.c (thread_db_use_events): New.
9520 (find_first_thread): Rename to...
9521 (find_one_thread): ...this. Update callers and messages. Do not
9522 call fatal. Check thread_db_use_events. Do not call
9523 change_inferior_id or new_thread_notify.
9524 (maybe_attach_thread): Update. Do not call new_thread_notify.
9525 (thread_db_init): Set thread_db_use_events. Check use_events.
9526 * utils.c (fatal, warning): Correct message prefix.
9528 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9530 * Makefile.in (clean): Remove new files.
9531 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9532 (powerpc-64.o, powerpc-64.c): New rules.
9533 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9534 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9536 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9538 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9539 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9540 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9541 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9542 (target_regsets): Add AltiVec and SPE register sets.
9543 * configure.ac: Check for AltiVec and SPE.
9544 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9545 (ppc_fill_vrregset, ppc_store_vrregset): New.
9546 (target_regsets): Add AltiVec register set.
9547 * configure: Regenerated.
9549 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9551 * linux-low.c (O_LARGEFILE): Define.
9552 (linux_read_memory): Use /proc/PID/mem.
9553 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9554 * configure, config.in: Regenerated.
9556 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9558 * linux-low.c (linux_wait_for_event): Do not pass signals while
9561 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9563 * win32-low.c (create_process): New.
9564 (win32_create_inferior): Use create_process instead of
9565 CreateProcess. If create_process failed retry appending an ".exe"
9566 suffix. Store the GetLastError result immediatelly after
9567 create_process calls and use it on the call to error.
9569 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9571 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9573 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9575 * configure.ac: Switch license to GPLv3.
9577 2007-08-01 Michael Snyder <msnyder@access-company.com>
9579 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9581 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9583 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9585 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9586 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9587 CloseToolhelp32Snapshot.
9588 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9589 CloseToolhelp32Snapshot.
9591 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9593 * server.c (main): Check for inferior exit before main loop.
9595 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9597 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9598 instead of on tmp_desc.
9600 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9601 Daniel Jacobowitz <dan@codesourcery.com>
9603 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9604 (add_thread): Minor cleanups.
9605 (clear_inferiors): Move lower in the file. Clear the DLL
9607 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9608 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9609 (xml_escape_text): New.
9610 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9612 (handle_v_cont): Report errors.
9613 (gdbserver_version): Update.
9614 (main): Correct size of own_buf. Do not report initial DLL events.
9615 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9616 (unloaded_dll, xml_escape_text): New.
9617 * win32-low.c (enum target_waitkind): Update comments.
9618 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9619 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9620 (win32_EnumProcessModules, win32_GetModuleInformation)
9621 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9622 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9623 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9624 (win32_Module32First, win32_Module32Next, load_toolhelp)
9625 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9626 (get_child_debug_event): Handle DLL events.
9627 (win32_wait): Likewise.
9629 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9631 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9632 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9634 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9636 * win32-low.c (handle_output_debug_string): Ignore event if not
9639 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9641 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9643 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9645 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9647 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9649 * inferiors.c (change_inferior_id): Add comment.
9650 * linux-low.c (check_removed_breakpoint): Add an early
9651 prototype. Improve debug output.
9652 (linux_attach): Doc update.
9653 (linux_detach_one_process, linux_detach): Clean up before releasing
9655 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9656 * linux-low.h (struct process_info): Doc improvement.
9657 * mem-break.c (delete_all_breakpoints): New.
9658 * mem-break.h (delete_all_breakpoints): New prototype.
9659 * thread-db.c (find_first_thread): New.
9660 (thread_db_create_event): Call it instead of
9661 thread_db_find_new_threads. Clean up unused variables.
9662 (maybe_attach_thread): Remove first thread handling.
9663 (thread_db_find_new_threads): Use find_first_thread.
9664 (thread_db_get_tls_address): Likewise.
9666 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9668 * thread-db.c (thread_db_find_new_threads): Add prototype.
9669 (thread_db_create_event): Check for the main thread before adding
9671 (maybe_attach_thread): Only enable event reporting if TID == 0.
9672 (thread_db_get_tls_address): Check for new threads.
9674 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9676 * linux-low.c (linux_create_inferior): Try execv before execvp.
9677 * spu-low.c (spu_create_inferior): Likewise.
9679 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9681 * linux-low.c (linux_create_inferior): Change execv to execvp.
9682 * spu-low.c (spu_create_inferior): Likewies.
9684 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9686 * Makefile.in (clean): Clean new files instead of deleted ones.
9687 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9688 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9690 * configure.srv: Specify XML files and new regformats for MIPS and
9692 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9693 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9694 an entry for the restart register.
9695 (mips_cannot_fetch_register, mips_cannot_store_register)
9696 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9697 register names to match the XML descriptions.
9698 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9699 restart register instead of $0.
9701 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9702 Markus Deuling <deuling@de.ibm.com>
9704 * remote-utils.c (decode_xfer_write): New function.
9705 * server.h (decode_xfer_write): Add prototype.
9706 * server.c (handle_query): Add PACKET_LEN argument. Support
9707 qXfer:spu:read and qXfer:spu:write packets.
9708 (main): Pass packet_len to handle_query.
9709 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9710 * target.h (target_ops): Add qxfer_spu.
9712 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9714 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9715 accessing non-seekable spufs files.
9717 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9719 * server.c (handle_query): Add reply for qC packet.
9721 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9722 Leo Zayas <lerele@champenstudios@com>
9724 * server.h (check_remote_input_interrupt_request): New function.
9725 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9726 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9727 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9728 (check_remote_input_interrupt_request): New function.
9729 * server.h (check_remote_input_interrupt_request): Declare.
9730 * win32-low.c (winapi_DebugBreakProcess,
9731 winapi_GenerateConsoleCtrlEvent): New typedefs.
9732 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9734 (win32_wait): Check for remote interrupt request
9735 with check_remote_input_interrupt_request.
9736 (win32_request_interrupt): New function.
9737 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9739 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9741 * win32-low.c (debug_registers_changed,
9742 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9743 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9744 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9745 (thread_rec): Get context using the low target.
9746 (child_add_thread): Call thread_added on the low target,
9747 which does the same thing.
9749 (do_initial_child_stuff): Remove debug registers references.
9750 Set context using the low target. Resume threads after
9751 setting the contexts.
9752 (child_continue): Remove dead variable. Remove debug
9753 registers references.
9754 (child_fetch_inferior_registers): Go through the low target.
9755 (do_child_store_inferior_registers): Remove.
9756 (child_store_inferior_registers): Go through the low target.
9757 (win32_resume): Remove debug registers references.
9758 Set context using the low target.
9759 (handle_exception): Change return type to void. Don't record
9760 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9761 first chance exception.
9762 (get_child_debug_event): Change return type to void. Remove
9763 goto loop. Always return after waiting for debug event.
9764 (win32_wait): Convert to switch statement. Handle spurious
9767 * win32-i386-low.c (debug_registers_changed,
9768 debug_registers_used): New.
9769 (initial_stuff): Rename to ...
9770 (i386_initial_stuff): ... this. Clear debug registers
9772 (store_debug_registers): Delete.
9773 (i386_get_thread_context): New.
9774 (load_debug_registers): Delete.
9775 (i386_set_thread_context): New.
9776 (i386_thread_added): New.
9777 (single_step): Rename to ...
9778 (i386_single_step): ... this.
9779 (do_fetch_inferior_registers): Rename to ...
9780 (i386_fetch_inferior_register): ... this.
9781 (i386_store_inferior_register): New.
9782 (the_low_target): Adapt to new interface.
9784 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9785 (arm_get_thread_context): New.
9786 (arm_set_thread_context): New.
9788 (do_fetch_inferior_registers): Rename to ...
9789 (arm_fetch_inferior_register): ... this.
9790 (arm_store_inferior_register): New.
9791 (arm_wince_breakpoint): Reimplement as unsigned long.
9792 (arm_wince_breakpoint_len): Define.
9793 (the_low_target): Adapt to new interface.
9795 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9796 load_debug_registers. Add get_thread_context, set_thread_context,
9797 thread_added and store_inferior_register. Rename
9798 fetch_inferior_registers to fetch_inferior_register.
9799 (regptr): Remove declaration.
9801 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9803 * linux-low.c (linux_detach): Change return type to int. Return 0.
9804 * spu-low.c (spu_detach): Likewise.
9806 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9808 * target.h (target_ops): Change return type of detach to int.
9810 (join_inferior): New.
9811 * server.c (main): Don't skip detach support on mingw32.
9812 If the inferior doesn't support detaching return error.
9813 Call join_inferior instead of using waitpid.
9814 * linux-low.c (linux_join): New.
9815 (linux_target_op): Add linux_join.
9816 * spu-low.c (spu_join): New.
9817 (spu_target_ops): Add spu_join.
9818 * win32-low.c (win32_detach): Adapt to new interface.
9819 Reopen current_process_handle before detaching. Issue a child
9820 resume before detaching.
9822 (win32_target_op): Add win32_join.
9824 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9826 * win32-low.c (win32-attach): Fix return value.
9827 * target.h (target_ops): Describe ATTACH return values.
9829 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9831 * win32-low.c (GETPROCADDRESS): Define.
9832 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9833 (winapi_DebugSetProcessKillOnExit): Likewise.
9834 (win32_create_inferior): Force usage of ansi CreateProcessA.
9835 (win32_attach): Use GETPROCADDRESS.
9836 (win32_detach): Likewise.
9838 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9840 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9842 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9844 * win32-low.c: Commit leftover changes from 2007-03-29.
9846 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9848 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9849 fields short instead of int. Add explicit padding.
9850 (i387_cache_to_fsave): Remove unnecessary casts.
9851 (i387_fsave_to_cache): Doc fix.
9852 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9854 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9856 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9857 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9859 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9861 * configure.srv (arm*-*-mingw32ce*): Move near the other
9864 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9866 * configure.ac: Add errno checking.
9867 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9868 sys/file.h and malloc.h.
9869 (AC_CHECK_DECLS): Add perror.
9870 (srv_mingwce): Handle.
9871 * configure.srv (i[34567]86-*-cygwin*): Add
9872 win32-i386-low.o to srv_tgtobj.
9873 (i[34567]86-*-mingw*): Likewise.
9874 (arm*-*-mingw32ce*): Add case.
9875 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9876 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9877 [__MINGW32CE__] (strerror): New function.
9878 [__MINGW32CE__] (errno): Define to GetLastError.
9879 [__MINGW32CE__] (COUNTOF): New macro.
9880 (remote_open): Remove extra close call.
9881 * mem-break.c (delete_breakpoint_at): New function.
9882 * mem-break.h (delete_breakpoint_at): Declare.
9883 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9884 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9885 [USE_WIN32API] (read, write): Add char* casts.
9886 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9887 * server.h: Include wincecompat.h on Windows CE.
9888 [HAVE_ERRNO_H]: Check.
9889 (perror): Declare if not declared.
9890 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9891 (perror_with_name): Remove errno declaration.
9892 * wincecompat.h: New.
9893 * wincecompat.c: New.
9895 * win32-arm-low.c: New.
9896 * win32-i386-low.c: New.
9897 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9898 (OUTMSG2): Make it safe.
9900 (COUNTOF): New macro.
9901 (NUM_REGS): Get it from the low target.
9902 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9903 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9904 (thread_rec): Let low target handle debug registers.
9905 (child_add_thread): Likewise.
9906 (child_init_thread_list): Likewise.
9907 (continue_one_thread): Likewise.
9909 (do_child_fetch_inferior_registers): Move to ...
9910 * win32-i386-low.c: ... here, and rename to ...
9911 (do_fetch_inferior_registers): ... this.
9912 * win32-low.c (child_fetch_inferior_registers):
9913 Go through the low target.
9914 (do_child_store_inferior_registers): Use regptr.
9915 (strwinerror): New function.
9916 (win32_create_inferior): Handle Windows CE.
9917 Use strwinerror instead of strerror on Windows error
9918 codes. Add program to the error output.
9919 Don't close the main thread handle on Windows CE.
9920 (win32_attach): Use coredll.dll on Windows CE.
9921 (win32_kill): Close current process and current
9923 (win32_detach): Use coredll.dll on Windows CE.
9924 (win32_resume): Let low target handle debug registers, and
9926 (handle_exception): Add/Remove initial breakpoint. Avoid
9927 non-existant WSTOPSIG on Windows CE.
9928 (win32_read_inferior_memory): Cast to remove warning.
9929 (win32_arch_string): Go through the low target.
9930 (initialize_low): Call set_breakpoint_data with the low
9931 target's breakpoint.
9932 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9933 FOP_REGNUM, mappings): Move to ...
9934 * win32-i386-low.c: ... here.
9935 * win32-low.c (win32_thread_info): Move to ...
9936 * win32-low.h: ... here.
9937 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9938 win32-arm-low.c and wincecompat.c.
9939 (all:): Add $EXEEXT.
9940 (install-only:): Likewise.
9941 (gdbserver:): Likewise.
9942 (gdbreplay:): Likewise.
9943 * config.in: Regenerate.
9944 * configure: Regenerate.
9946 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9948 * win32-low.c: Rename typedef thread_info to
9949 win32_thread_info throughout.
9951 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9953 * win32-i386-low.c: Rename to ...
9954 * win32-low.c: ... this.
9955 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9956 * Makefile.in: Likewise.
9958 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9960 * remote-utils.c (monitor_output): Constify msg parameter.
9961 * server.h (monitor_output): Likewise.
9962 * win32-i386-low.c (handle_output_debug_string): New.
9963 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9964 handle_output_debug_string.
9965 (get_child_debug_event): Likewise.
9967 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9969 * server.c (main): Correct strtoul check.
9971 2007-03-27 Jon Ringle <jon@ringle.org>
9973 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9975 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9977 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9979 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9981 * terminal.h: Check HAVE_SGTTY_H.
9983 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9985 * remote-utils.c (remote_open): Print out the assigned port number.
9987 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9989 * remote-utils.c (monitor_output): New function.
9990 * server.c (debug_threads): Define here.
9991 (monitor_show_help): New function.
9992 (handle_query): Handle qRcmd.
9993 (main): Do not handle 'd' packet.
9994 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9995 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9998 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10000 * Makefile.in (EXEEXT): New.
10001 (clean): Use $(EXEEXT).
10003 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10005 * target.h (target_ops): Rename send_signal to request_interrupt,
10006 and remove enum target_signal parameter.
10007 * linux-low.c (linux_request_interrupt): Rename from
10008 linux_send_signal, and always send SIGINT.
10009 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10010 and always send SIGINT.
10011 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10013 (input_interrupt): Likewise.
10015 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10017 * server.c (get_features_xml): Check if target implemented
10019 * win32-i386-low.c (win32_arch_string): New.
10020 (win32_target_ops): Add win32_arch_string as arch_string member.
10022 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10024 * spu-low.c (spu_arch_string): New.
10025 (spu_target_ops): Add spu_arch_string.
10027 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10029 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10030 * configure.ac: Do not check for terminal.h.
10031 * configure, config.in: Regenerated.
10033 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10035 * Makefile.in (OBS): Add $(XML_BUILTIN).
10036 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10038 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10039 (arm-with-iwmmxt.c): New.
10040 * config.in, configure: Regenerate.
10041 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10042 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10043 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10044 (arm*-*-linux*): Add iWMMXt and regset support.
10045 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10046 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10047 (arm_store_wmmxregset, target_regsets): New.
10048 * server.c (get_features_xml): Take annex argument. Check builtin
10050 (handle_query): Handle multiple annexes.
10052 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10054 * remote-utils.c [USE_WIN32API] (read, write): Define.
10055 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10058 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10060 * linux-i386-low.c (the_low_target): Set arch_string.
10061 * linux-x86-64-low.c (the_low_target): Likewise.
10062 * linux-low.c (linux_arch_string): New.
10063 (linux_target_ops): Add it.
10064 * linux-low.h (struct linux_target_ops): Add arch_string.
10065 * server.c (write_qxfer_response): Use const void * for DATA.
10066 (get_features_xml): New.
10067 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10068 * target.h (struct target_ops): Add arch_string method.
10070 2007-01-03 Denis Pilat <denis.pilat@st.com>
10071 Daniel Jacobowitz <dan@codesourcery.com>
10073 * linux-low.c (linux_kill): Handle being called with no threads.
10074 * win32-i386-low.c (win32_kill): Likewise.
10075 (get_child_debug_event): Clear current_process_handle.
10077 2006-12-30 Denis PILAT <denis.pilat@st.com>
10078 Daniel Jacobowitz <dan@codesourcery.com>
10080 * remote-utils.c (remote_open): Check the type of specified
10081 serial port devices before opening them.
10082 * server.c (main): Kill the inferior if an error occurs during
10083 the first remote_open.
10085 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10087 * README: Update supported targets.
10089 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10091 * Makefile.in (clean): Remove reg-mips64.c.
10092 (reg-mips64.c, reg-mips64.o): New rules.
10093 * configure.srv: Handle mips64. Include regset support for mips.
10094 * linux-mips-low.c (union mips_register): New.
10095 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10096 (mips_breakpoint, mips_breakpoint_at): Use int.
10097 (mips_collect_register, mips_supply_register)
10098 (mips_collect_register_32bit, mips_supply_register_32bit)
10099 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10100 (mips_store_fpregset, target_regsets): New.
10101 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10103 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10105 * configure.srv: Add target "spu*-*-*".
10106 * Makefile.in (clean): Remove reg-spu.c.
10107 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10108 * spu-low.c: New file.
10110 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10112 * configure.ac: Correct td_thr_tls_get_addr test.
10113 * configure: Regenerated.
10115 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10117 * linux-low.c (linux_wait_for_event): Reformat. Use the
10118 pass_signals array.
10119 * remote-utils.c (decode_address_to_semicolon): New.
10120 * server.c (pass_signals, handle_general_set): New.
10121 (handle_query): Mention QPassSignals for qSupported.
10122 (main): Call handle_general_set.
10123 * server.h (pass_signals, decode_address_to_semicolon): New.
10125 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10127 * server.c (handle_query): Correct error handling for read_auxv.
10129 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10131 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10132 and srv_linux_thread_db to yes.
10133 * linux-s390-low.c (s390_fill_gregset): New function.
10134 (target_regsets): Define data structure.
10136 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10138 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10139 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10140 * config.in, configure: Regenerated.
10141 * inferiors.c (gdb_id_to_thread): New function.
10142 (gdb_id_to_thread_id): Use it.
10143 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10144 * linux-low.h (struct process_info): Add th member.
10145 (thread_db_get_tls_address): New prototype.
10146 * remote-utils.c (decode_address): Make non-static.
10147 * server.c (handle_query): Handle qGetTLSAddr.
10148 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10149 * target.h (struct target_ops): Add get_tls_address.
10150 * thread-db.c (maybe_attach_thread): Save the thread handle.
10151 (thread_db_get_tls_address): New.
10153 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10155 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10156 (linux_resume_one_process): Take a siginfo_t *. Update all
10157 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10158 (struct pending_signals): Add a siginfo_t.
10159 (linux_wait_for_process): Always set last_status.
10160 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10161 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10162 * linux-low.h (struct process_info): Add last_status.
10164 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10166 * remote-utils.c (try_rle): New function.
10167 (putpkt_binary): Use it.
10169 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10171 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10172 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10173 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10174 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10175 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10178 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10180 * server.c (terminal_fd): New variable.
10181 (old_foreground_pgrp): Likewise.
10182 (restore_old_foreground_pgrp): New function.
10183 (start_inferior): Record the terminal file descriptor in terminal_fd
10184 and its original foreground group in old_foreground_pgrp. Register
10185 restore_old_foreground_pgrp with atexit().
10187 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10189 * server.c (handle_query): Correct qPart to qXfer.
10191 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10193 * configure.ac: Check for more headers which are missing on
10194 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10195 * configure.srv: Add Cygwin and mingw32.
10196 * remote-utils.c: Don't include headers unconditionally which
10197 are missing on mingw32. Include <winsock.h> for mingw32.
10198 (remote_open): Adjust for mingw32 support. Flush
10199 standard error after writing to it.
10200 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10201 (unblock_async_io, enable_async_io, disable_async_io)
10202 (readchar, getpkt): Update for Winsock support.
10203 (prepare_resume_reply): Expect a protocol signal number.
10204 * server.c: Disable <sys/wait.h> on mingw32.
10205 (start_inferior): Adjust for mingw32 support. Flush
10206 standard error after writing to it.
10207 (attach_inferior): Likewise. Use protocol signal
10209 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10211 * win32-i386-low.c: New file.
10212 * Makefile.in (XM_CLIBS): Set.
10213 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10214 (win32-i386-low.o): New dependency rule.
10215 * linux-low.c (linux_wait): Use target signal numbers.
10216 * target.h (struct target_ops): Doc fix.
10217 * server.h (target_signal_to_name): New prototype.
10218 * gdbreplay.c: Don't include headers unconditionally which
10219 are missing on mingw32. Include <winsock.h> for mingw32.
10220 (remote_close, remote_open): Adjust for Winsock support.
10221 * configure, config.in: Regenerated.
10223 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10225 * server.c (decode_xfer_read, write_qxfer_response): New.
10226 (handle_query): Take a packet length argument. Handle
10227 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10228 the qSupported response.
10229 (main): Update call to handle_query.
10231 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10233 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10234 (putpkt_binary): Renamed from putpkt and adjusted for binary
10236 (putpkt): New wrapper for putpkt_binary.
10237 (readchar): Don't mask off the high bit.
10238 (decode_X_packet): New function.
10239 * server.c (main): Call putpkt_binary if a handler sets the packet
10240 length. Save the length of the incoming packet. Handle 'X'.
10241 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10243 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10245 * server.c (handle_query): Handle qSupported.
10247 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10249 * remote-utils.c (all_symbols_looked_up): New variable.
10250 (look_up_one_symbol): Check it.
10251 * server.h (look_up_one_symbol): New declaration.
10252 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10254 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10256 * Makefile.in (linux-arm-low.o): Update dependencies.
10257 * linux-arm-low.c: Include "gdb_proc_service.h".
10258 (PTRACE_GET_THREAD_AREA): Define.
10259 (ps_get_thread_area): New function.
10261 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10263 * configure.srv (m68k*-*-uclinux*): New target.
10264 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10265 (linux_resume_one_process): Remove extraneous cast.
10266 (linux_read_offsets): New.
10267 (linux_target_op): Add linux_read_offsets on mmuless systems.
10268 * server.c (handle_query): Add qOffsets logic.
10269 * target.h (struct target_ops): Add read_offsets.
10271 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10273 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10274 (PTRACE_GET_THREAD_AREA): Define.
10275 (ps_get_thread_area): New function.
10276 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10277 (linux-x86-64-low.o): Update.
10279 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10281 * configure.ac: Remove checks for prfpregset_t.
10282 * gdb_proc_service.h: New file.
10283 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10284 new "gdb_proc_service.h".
10285 * proc-service.c: Likewise.
10286 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10287 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10288 * Makefile.in (gdb_proc_service_h): Updated.
10289 * configure, config.in: Regenerated.
10291 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10293 * remote-utils.c (prepare_resume_reply): Move declaration
10294 of gdb_id_from_wait to the top of the block.
10296 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10298 * linux-low.c (regsets_store_inferior_registers): Read the regset
10299 from the target before filling it.
10301 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10303 * server.c (attach_inferior): Return SIGTRAP for a successful
10306 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10308 * Makefile.in (OBS): Add version.o.
10309 (STAGESTUFF): Delete.
10310 (version.o): Add dependencies.
10311 (version.c): Replace rule.
10312 (clean): Remove version.c.
10313 * server.c (gdbserver_version): New.
10314 (gdbserver_usage): Use printf.
10315 (main): Handle --version and --help.
10316 * server.h (version, host_name): Add declarations.
10318 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10330 * linux-x86-64-low.c:
10332 * linux-s390-low.c:
10333 * linux-ppc64-low.c:
10335 * linux-mips-low.c:
10336 * linux-m68k-low.c:
10337 * linux-m32r-low.c:
10340 * linux-ia64-low.c:
10341 * linux-i386-low.c:
10342 * linux-crisv32-low.c:
10354 * gdbserver.1: Add (C) after Copyright. Update the FSF
10357 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10359 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10360 (arm_breakpoint_at): Recognize both breakpoints.
10361 (the_low_target): Use the correct breakpoint instruction.
10363 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10365 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10366 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10367 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10368 (the_low_target): Update.
10370 2005-10-25 Andreas Schwab <schwab@suse.de>
10372 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10374 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10375 (ia64_num_regs): Reduce to 462.
10377 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10379 * acinclude.m4: Correct quoting.
10380 * aclocal.m4: Regenerated.
10382 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10383 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10384 (thread_db_init): Call thread_db_err_str.
10385 * configure.ac: Check for TD_VERSION.
10386 * config.in, configure: Regenerated.
10388 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10390 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10392 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10394 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10395 is not available. Define HAVE_PTRACE_GETREGS if it is.
10396 * config.in, configure: Regenerated.
10397 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10398 * linux-i386-low.c, linux-m68k-low.c: Update to use
10399 HAVE_PTRACE_GETREGS.
10400 * linux-low.c (regsets_fetch_inferior_registers)
10401 (regsets_store_inferior_registers): Only return 0 if we processed
10403 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10404 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10406 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10408 * inferiors.c (struct thread_info): Add gdb_id.
10409 (add_thread): Add gdb_id argument.
10410 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10411 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10412 calls to add_thread.
10413 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10414 * server.c (handle_query): Use thread_to_gdb_id.
10415 (handle_v_cont, main): Use gdb_id_to_thread_id.
10416 * server.h (add_thread): Update prototype.
10417 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10420 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10422 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10423 left-padded registers.
10424 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10425 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10427 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10429 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10430 * configure: Regenerate.
10431 * config.in: Regenerate.
10432 * server.h (NEED_DECLARATION_STRERROR):
10433 Replace with !HAVE_DECL_STRERROR.
10435 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10437 * linux-low.c (linux_wait, linux_send_signal): Don't test
10438 an unsigned long variable for > 0 if it could be MAX_ULONG.
10439 * server.c (myresume): Likewise.
10440 * target.c (set_desired_inferior): Likewise.
10442 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10444 * configure.ac: Simplify and improve check for socklen_t.
10445 * configure, config.in: Regenerate.
10447 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10449 * acconfig.h: Remove.
10450 * configure.ac: Add a test for socklen_t. Use three-argument
10451 AC_DEFINE throughout.
10452 * config.in: Regenerated using autoheader 2.59.
10453 * configure: Regenerated.
10455 * gdbreplay.c (socklen_t): Provide a default.
10456 (remote_open): Use socklen_t.
10457 * remote-utils.c (socklen_t): Provide a default.
10458 (remote_open): Use socklen_t.
10459 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10462 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10464 * linux-low.c (linux_read_memory, linux_write_memory)
10465 (linux_read_auxv): Likewise.
10466 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10467 (check_mem_write): Likewise.
10468 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10470 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10471 (registers_from_string, register_data): Likewise.
10472 * server.c (handle_query, main): Likewise.
10473 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10474 (decode_M_packet): Likewise.
10475 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10476 * target.h (struct target_ops): Update read_memory, write_memory,
10478 (read_inferior_memory, write_inferior_memory): Update.
10479 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10480 to unsigned char *.
10481 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10482 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10483 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10484 linux-s390-low.c, linux-sh-low.c: Update for changes in
10485 read_inferior_memory and the_low_target->breakpoint.
10487 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10489 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10490 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10491 * configure.srv: Add powerpc64-*-linux*.
10492 * linux-ppc64-low.c: New file.
10494 2005-05-23 Orjan Friberg <orjanf@axis.com>
10496 * linux-cris-low.c: New file with support for CRIS.
10497 * linux-crisv32-low.c: Ditto for CRISv32.
10498 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10499 (clean): Add reg-cris.c and reg-crisv32.c.
10500 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10501 reg-crisv32.o, and reg-crisv32.c to make rules.
10502 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10503 recognized targets.
10505 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10507 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10508 of sizeof (PTRACE_XFER_TYPE).
10509 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10511 2005-05-12 Orjan Friberg <orjanf@axis.com>
10513 * target.h (struct target_ops): Add insert_watchpoint,
10514 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10515 pointers for hardware watchpoint support.
10516 * linux-low.h (struct linux_target_ops): Ditto.
10517 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10518 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10519 to linux_target_ops.
10520 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10522 * server.c (main): Recognize 'Z' and 'z' packets.
10524 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10526 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10527 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10528 (the_low_target): Add new members.
10530 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10532 * proc-service.c (ps_lgetregs): Search all_processes instead of
10535 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10537 * server.c (start_inferior): Change return type to int.
10538 (attach_inferior): Change sigptr to int *.
10539 (handle_v_cont, handle_v_requests): Change signal to int *.
10540 (main): Change signal to int.
10542 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10544 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10545 * configure.srv: Add m32r*-*-linux*.
10546 * linux-m32r-low.c: New file.
10548 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10550 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10552 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10554 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10555 Take unsigned long arguments for PIDs.
10556 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10557 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10558 (wait_for_sigstop, linux_resume_one_process)
10559 (regsets_fetch_inferior_registers, linux_send_signal)
10560 (linux_read_auxv): Likewise. Update the types of variables holding
10561 PIDs. Update format string specifiers.
10562 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10563 * remote-utils.c (prepare_resume_reply): Likewise.
10564 * server.c (cont_thread, general_thread, step_thread)
10565 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10567 (handle_query): Update format specifiers.
10568 (handle_v_cont, main): Use strtoul for thread IDs.
10569 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10570 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10571 (general_thread, step_thread, thread_from_wait)
10572 (old_thread_from_wait): Update.
10573 * target.h (struct thread_resume): Use unsigned long for THREAD.
10574 (struct target_ops): Use unsigned long for arguments to attach and
10577 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10579 * acinclude.m4: Include bfd/bfd.m4 directly.
10580 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10581 <agriffis@toolchain.org>.
10582 * aclocal.m4, configure: Regenerated.
10584 2005-01-07 Andrew Cagney <cagney@gnu.org>
10586 * configure.ac: Rename configure.in, require autoconf 2.59.
10587 * configure: Re-generate.
10589 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10591 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10592 LIBS when finished.
10593 * aclocal.m4: Regenerated.
10594 * configure: Regenerated.
10596 2004-11-21 Andreas Schwab <schwab@suse.de>
10598 * linux-m68k-low.c (m68k_num_gregs): Define.
10599 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10600 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10601 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10602 (m68k_breakpoint_at): New. Add to the_low_target.
10604 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10605 srv_linux_thread_db to yes.
10607 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10609 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10610 (ARCH_SET_FS): Likewise.
10611 (ARCH_GET_FS): Likewise.
10612 (ARCH_GET_GS): Likewise.
10614 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10616 * linux-i386-low.c (ps_get_thread_area): New.
10617 * linux-x86-64-low.c (ps_get_thread_area): New.
10618 * linux-low.c: Include <sys/syscall.h>.
10619 (linux_kill_one_process): Don't kill the first thread here.
10620 (linux_kill): Kill the first thread here.
10621 (kill_lwp): New function.
10622 (send_sigstop, linux_send_signal): Use it.
10623 * proc-service.c: Clean up #ifdefs.
10624 (fpregset_info): Delete.
10625 (ps_lgetregs): Update and enable implementation.
10626 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10628 * remote-utils.c (struct sym_cache, symbol_cache): New.
10629 (input_interrupt): Print a clearer message.
10630 (async_io_enabled): New variable.
10631 (enable_async_io, disable_async_io): Use it. Update comments.
10632 (look_up_one_symbol): Use the symbol cache.
10633 * thread-db.c (thread_db_look_up_symbols): New function.
10634 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10636 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10638 * configure.in: Test for -rdynamic.
10639 * configure: Regenerated.
10640 * Makefile (INTERNAL_LDFLAGS): New.
10641 (gdbserver, gdbreplay): Use it.
10643 2004-09-02 Andrew Cagney <cagney@gnu.org>
10645 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10647 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10649 * linux-low.c (linux_wait): Clear all_processes list also.
10651 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10653 * linux-low.c: Include <errno.h>. Remove extern declaration of
10656 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10658 * gdbreplay.c, server.h, utils.c: Update copyright years.
10660 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10662 * server.c (main): Print child status or termination signal from
10663 variable 'signal', not 'sig'.
10665 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10667 * linux-low.c (linux_read_memory): Change return type to
10668 int. Check for and return error from ptrace().
10669 * target.c (read_inferior_memory): Change return type to int. Pass
10670 back return status from the_target->read_memory().
10671 * target.h (struct target_ops): Adapt *read_memory() prototype.
10673 (read_inferior_memory): Adapt prototype.
10674 * server.c (main): Return an error packet if
10675 read_inferior_memory() returns an error.
10677 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10679 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10680 Unify with other clean targets.
10682 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10684 * server.c (handle_v_cont): Call set_desired_inferior.
10686 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10688 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10690 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10692 * linux-low.c (linux_wait): Unblock async I/O.
10693 (linux_resume): Block and enable async I/O.
10694 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10695 * server.h (block_async_io, unblock_async_io): Add prototypes.
10697 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10699 * remote-utils.c (remote_open): Print a status notice after
10700 opening a TCP port.
10701 * server.c (attach_inferior): Print a status notice after
10704 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10706 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10708 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10710 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10712 * server.c, target.h: Update copyright years.
10714 2004-02-25 Roland McGrath <roland@redhat.com>
10716 * target.h (struct target_ops): New member `read_auxv'.
10717 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10718 * linux-low.c (linux_read_auxv): New function.
10719 (linux_target_ops): Initialize `read_auxv' member to that.
10721 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10723 Committed by Jim Blandy <jimb@redhat.com>.
10725 * linux-s390-low.c (s390_num_regs): Update.
10726 (s390_regmap): Remove control registers. Use __s390x__ predefine
10727 instead of GPR_SIZE to distiguish s390 and s390x targets.
10729 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10731 * linux-low.c: Update copyright year.
10732 (check_removed_breakpoint): Clear pending_is_breakpoint.
10733 (linux_set_resume_request, linux_queue_one_thread)
10734 (resume_status_pending_p): New functions.
10735 (linux_continue_one_thread): Use process->resume.
10736 (linux_resume): Only resume threads if there are no pending events.
10737 * linux-low.h (struct process_info): Add resume request
10740 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10742 * regcache.c (new_register_cache): Clear the allocated register
10743 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10745 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10747 * linux-low.c (linux_resume): Take a struct thread_resume *
10749 (linux_wait): Update call.
10750 (resume_ptr): New static variable.
10751 (linux_continue_one_thread): Renamed from
10752 linux_continue_one_process. Use resume_ptr.
10753 (linux_resume): Use linux_continue_one_thread.
10754 * server.c (handle_v_cont, handle_v_requests): New functions.
10755 (myresume): New function.
10756 (main): Handle 'v' case.
10757 * target.h (struct thread_resume): New type.
10758 (struct target_ops): Change argument of "resume" to struct
10760 (myresume): Delete macro.
10762 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10764 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10765 (uninstall): Support DESTDIR.
10767 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10769 * configure.srv: Add xscale*linux copy of arm*linux entry.
10771 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10773 * linux-arm-low.c (arm_reinsert_addr): New function.
10774 (the_low_target): Add arm_reinsert_addr.
10776 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10778 * mem-break.c: Remove whitespace at end of file.
10780 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10782 * configure.in: Check whether we need to prototype strerror.
10783 * server.h: Optionally prototype strerror.
10784 * gdbreplay.c (perror_with_name): Use strerror.
10785 * linux-low.c (linux_attach_lwp): Use strerror.
10786 * utils.c (perror_with_name): Use strerror.
10787 * config.in, configure: Regenerated.
10789 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10791 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10792 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10794 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10796 * Makefile.in (SFILES): Update.
10797 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10798 low-sun3.c: Remove files.
10800 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10802 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10803 (linux_detach_one_process, linux_detach): New functions.
10804 (linux_target_ops): Add linux_detach.
10805 * server.c (main): Handle 'D' packet.
10806 * target.h (struct target_ops): Add "detach" member.
10807 (detach_inferior): Define.
10809 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10811 From Kelley Cook <kelleycook@wideopenwest.com>:
10812 * configure.srv: Accept i[34567]86 variants.
10814 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10816 * linux-low.c (linux_wait_for_event): Correct comment typos.
10817 (linux_resume_one_process): Call check_removed_breakpoint.
10818 (linux_send_signal): New function.
10819 (linux_target_ops): Add linux_send_signal.
10820 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10822 * target.h (struct target_ops): Add send_signal.
10824 2003-05-29 Jim Blandy <jimb@redhat.com>
10826 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10827 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10828 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10829 away part of the register's value.
10831 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10833 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10834 (linux_wait_for_event, linux_init_signals): Likewise.
10836 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10838 * configure.in: Check for stdlib.h.
10839 * configure: Regenerated.
10840 * config.in: Regenerated.
10842 2003-01-04 Andreas Schwab <schwab@suse.de>
10844 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10846 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10848 * Makefile.in: Remove obsolete code.
10850 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10852 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10853 defined(PT_FPR0_HI).
10855 2002-11-17 Stuart Hughes <seh@zee2.com>
10857 * linux-arm-low.c (arm_num_regs): Increase.
10858 (arm_regmap): Include status register.
10860 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10862 * linux-low.c (register_addr): Remove incorrect -1 check.
10864 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10866 * linux-low.c (linux_create_inferior): Call setpgid. Return
10868 (unstopped_p, linux_signal_pid): Remove.
10869 (linux_target_ops): Remove linux_signal_pid.
10870 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10871 global instead of target method.
10872 * target.h (struct target_ops): Remove signal_pid. Update comment
10873 for create_inferior.
10874 * server.c (signal_pid): New variable.
10875 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10876 gdbserver. Set the child to be the foreground process group.
10877 (attach_inferior): Set signal_pid.
10879 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10881 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10883 2002-08-20 Jim Blandy <jimb@redhat.com>
10885 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10888 2002-08-01 Andrew Cagney <cagney@redhat.com>
10890 * Makefile.in: Make chill references obsolete.
10892 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10894 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10895 * configure: Regenerate.
10896 * config.in: Regenerate.
10898 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10900 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10901 (perror_with_name, remote_close, remote_open, expect, play): Static.
10903 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10905 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10906 byte offsets instead of an array of indexes.
10907 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10909 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10911 * regcache.c: Add comment.
10913 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10915 * thread-db.c: New file.
10916 * proc-service.c: New file.
10917 * acinclude.m4: New file.
10918 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10919 proc-service.o, and thread-db.o.
10920 (linux-low.o): Add USE_THREAD_DB.
10921 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10922 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10923 * aclocal.m4: Regenerated.
10924 * config.in: Regenerated.
10925 * configure: Regenerated.
10926 * configure.in: Check for proc_service.h, sys/procfs.h,
10927 thread_db.h, and linux/elf.h headrs.
10928 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10929 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10930 Check for -lthread_db and thread support.
10931 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10932 PowerPC, and SuperH.
10933 * i387-fp.c: Constify arguments.
10934 * i387-fp.h: Likewise.
10935 * inferiors.c: (struct thread_info): Renamed from
10936 `struct inferior_info'. Remove PID member. Use generic inferior
10937 list header. All uses updated.
10938 (inferiors, signal_pid): Removed.
10939 (all_threads): New variable.
10940 (get_thread): Define.
10941 (add_inferior_to_list): New function.
10942 (for_each_inferior): New function.
10943 (change_inferior_id): New function.
10944 (add_inferior): Removed.
10945 (remove_inferior): New function.
10946 (add_thread): New function.
10947 (free_one_thread): New function.
10948 (remove_thread): New function.
10949 (clear_inferiors): Use for_each_inferior and free_one_thread.
10950 (find_inferior): New function.
10951 (find_inferior_id): New function.
10952 (inferior_target_data): Update argument type.
10953 (set_inferior_target_data): Likewise.
10954 (inferior_regcache_data): Likewise.
10955 (set_inferior_regcache_data): Likewise.
10956 * linux-low.c (linux_bp_reinsert): Remove.
10957 (all_processes, stopping_threads, using_thrads)
10958 (struct pending_signals, debug_threads, pid_of): New.
10959 (inferior_pid): Replace with macro.
10960 (struct inferior_linux_data): Remove.
10961 (get_stop_pc, add_process): New functions.
10962 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10963 Use add_process and add_thread.
10964 (linux_attach_lwp): New function, based on old linux_attach. Use
10965 add_process and add_thread. Set stop_expected for new threads.
10966 (linux_attach): New function.
10967 (linux_kill_one_process): New function.
10968 (linux_kill): Kill all LWPs.
10969 (linux_thread_alive): Use find_inferior_id.
10970 (check_removed_breakpoints, status_pending_p): New functions.
10971 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10972 Update. Use WNOHANG. Wait for cloned processes also. Update process
10973 struct for the found process.
10974 (linux_wait_for_event): New function.
10975 (linux_wait): Use it. Support LWPs.
10976 (send_sigstop, wait_for_sigstop, stop_all_processes)
10977 (linux_resume_one_process, linux_continue_one_process): New functions.
10978 (linux_resume): Support LWPs.
10979 (REGISTER_RAW_SIZE): Remove.
10980 (fetch_register): Use register_size instead. Call supply_register.
10981 (usr_store_inferior_registers): Likewise. Call collect_register.
10982 Fix recursive case.
10983 (regsets_fetch_inferior_registers): Improve error message.
10984 (regsets_store_inferior_registers): Add debugging.
10985 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10986 (unstopped_p, linux_signal_pid): New functions.
10987 (linux_target_ops): Add linux_signal_pid.
10988 (linux_init_signals): New function.
10989 (initialize_low): Call it. Initialize using_threads.
10990 * regcache.c (inferior_regcache_data): Add valid
10992 (get_regcache): Fetch registers lazily. Add fetch argument
10993 and update all callers.
10994 (regcache_invalidate_one, regcache_invalidate): New
10996 (new_register_cache): Renamed from create_register_cache.
10997 Return the new regcache.
10998 (free_register_cache): Change argument to a void *.
10999 (registers_to_string, registers_from_string): Call get_regcache
11000 with fetch flag set.
11001 (register_data): Make static. Pass fetch flag to get_regcache.
11002 (supply_register): Call get_regcache with fetch flag clear.
11003 (collect_register): Call get_regcache with fetch flag set.
11004 (collect_register_as_string): New function.
11005 * regcache.h: Update.
11006 * remote-utils.c (putpkt): Flush after debug output and use
11008 Handle input interrupts while waiting for an ACK.
11009 (input_interrupt): Use signal_pid method.
11010 (getpkt): Flush after debug output and use stderr.
11011 (outreg): Use collect_register_as_string.
11012 (new_thread_notify, dead_thread_notify): New functions.
11013 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11014 and general_thread.
11015 (look_up_one_symbol): Flush after debug output.
11016 * server.c (step_thread, server_waiting): New variables.
11017 (start_inferior): Don't use signal_pid. Update call to mywait.
11018 (attach_inferior): Update call to mywait.
11019 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11020 (main): Don't fetch/store registers explicitly. Use
11021 set_desired_inferior. Support proposed ``Hs'' packet. Update
11023 * server.h: Update.
11024 (struct inferior_list, struct_inferior_list_entry): New.
11025 * target.c (set_desired_inferior): New.
11026 (write_inferior_memory): Constify.
11027 (mywait): New function.
11028 * target.h: Update.
11029 (struct target_ops): New signal_pid method.
11030 (mywait): Removed macro, added prototype.
11032 * linux-low.h (regset_func): Removed.
11033 (regset_fill_func, regset_store_func): New.
11034 (enum regset_type): New.
11035 (struct regset_info): Add type field. Use new operation types.
11036 (struct linux_target_ops): stop_pc renamed to get_pc.
11037 Add decr_pc_after_break and breakpoint_at.
11038 (get_process, get_thread_proess, get_process_thread)
11039 (strut process_info, all_processes, linux_attach_lwp)
11040 (thread_db_init): New.
11042 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11043 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11044 (the_low_target): Add new members.
11045 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11046 (i386_store_fpxregset): Constify.
11047 (target_regsets): Add new kind identifier.
11048 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11049 (i386_set_pc): Add debugging.
11050 (i386_breakpoint_at): New function.
11051 (the_low_target): Add new members.
11052 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11053 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11054 (mips_breakpoint_at): New.
11055 (the_low_target): Add new members.
11056 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11057 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11058 (the_low_target): Add new members.
11059 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11060 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11061 (the_low_target): Add new members.
11062 * linux-x86-64-low.c (target_regsets): Add new kind
11065 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11067 From Martin Pool <mbp@samba.org>:
11068 * server.c (gdbserver_usage): New function.
11071 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11073 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11074 stop_at -> stop_pc.
11076 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11078 * Makefile.in: Remove obsolete code.
11080 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11082 * linux-low.c (regsets_fetch_inferior_registers),
11083 (regsets_store_inferior_registers): Removed cast to int from
11085 * regcache.h: Added declaration of struct inferior_info.
11087 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11089 * inferiors.c (struct inferior_info): Add regcache_data.
11090 (add_inferior): Call create_register_cache.
11091 (clear_inferiors): Call free_register_cache.
11092 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11093 * regcache.c (struct inferior_regcache_data): New.
11094 (registers): Remove.
11095 (get_regcache): New function.
11096 (create_register_cache, free_register_cache): New functions.
11097 (set_register_cache): Don't initialize the register cache here.
11098 (registers_to_string, registers_from_string, register_data): Call
11100 * regcache.h: Add prototypes.
11101 * server.h: Likewise.
11103 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11105 * mem-break.c: New file.
11106 * mem-break.h: New file.
11107 * Makefile.in: Add mem-break.o rule; update server.h
11109 * inferiors.c (struct inferior_info): Add target_data
11111 (clear_inferiors): Free target_data member if set.
11112 (inferior_target_data, set_inferior_target_data): New functions.
11113 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11114 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11115 * linux-low.c (linux_bp_reinsert): New variable.
11116 (struct inferior_linux_data): New.
11117 (linux_create_inferior): Use set_inferior_target_data.
11118 (linux_attach): Likewise. Call add_inferior.
11119 (linux_wait_for_one_inferior): New function.
11120 (linux_wait): Call it.
11121 (linux_write_memory): Add const.
11122 (initialize_low): Call set_breakpoint_data.
11123 * linux-low.h (struct linux_target_ops): Add breakpoint
11125 * server.c (attach_inferior): Remove extra add_inferior
11127 * server.h: Include mem-break.h. Update inferior.c
11129 * target.c (read_inferior_memory)
11130 (write_inferior_memory): New functions.
11131 * target.h (read_inferior_memory)
11132 (write_inferior_memory): Change macros to prototypes.
11133 (struct target_ops): Update comments. Add const to write_memory
11136 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11138 * linux-low.c (usr_store_inferior_registers): Support
11139 registers which are allowed to fail to store.
11140 * linux-low.h (linux_target_ops): Likewise.
11141 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11142 (ppc_cannot_store_register): FPSCR may not be storable.
11144 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11146 * server.h: Include <string.h> if HAVE_STRING_H.
11147 * ChangeLog: Correct paths in last ChangeLog entry.
11149 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11151 * linux-low.h: Remove obsolete prototypes.
11152 (struct linux_target_ops): New.
11153 (extern the_low_target): New.
11154 * linux-low.c (num_regs, regmap): Remove declarations.
11155 (register_addr): Use the_low_target explicitly.
11156 (fetch_register): Likewise.
11157 (usr_fetch_inferior_registers): Likewise.
11158 (usr_store_inferior_registers): Likewise.
11159 * linux-arm-low.c (num_regs): Remove.
11160 (arm_num_regs): Define.
11161 (arm_regmap): Renamed from regmap, made static.
11162 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11164 (arm_cannot_store_register): Renamed from cannot_store_register,
11166 (the_low_target): New.
11167 * linux-i386-low.c (num_regs): Remove.
11168 (i386_num_regs): Define.
11169 (i386_regmap): Renamed from regmap, made static.
11170 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11172 (i386_cannot_store_register): Renamed from cannot_store_register,
11174 (the_low_target): New.
11175 * linux-ia64-low.c (num_regs): Remove.
11176 (ia64_num_regs): Define.
11177 (ia64_regmap): Renamed from regmap, made static.
11178 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11180 (ia64_cannot_store_register): Renamed from cannot_store_register,
11182 (the_low_target): New.
11183 * linux-m68k-low.c (num_regs): Remove.
11184 (m68k_num_regs): Define.
11185 (m68k_regmap): Renamed from regmap, made static.
11186 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11188 (m68k_cannot_store_register): Renamed from cannot_store_register,
11190 (the_low_target): New.
11191 * linux-mips-low.c (num_regs): Remove.
11192 (mips_num_regs): Define.
11193 (mips_regmap): Renamed from regmap, made static.
11194 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11196 (mips_cannot_store_register): Renamed from cannot_store_register,
11198 (the_low_target): New.
11199 * linux-ppc-low.c (num_regs): Remove.
11200 (ppc_num_regs): Define.
11201 (ppc_regmap): Renamed from regmap, made static.
11202 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11204 (ppc_cannot_store_register): Renamed from cannot_store_register,
11206 (the_low_target): New.
11207 * linux-s390-low.c (num_regs): Remove.
11208 (s390_num_regs): Define.
11209 (s390_regmap): Renamed from regmap, made static.
11210 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11212 (s390_cannot_store_register): Renamed from cannot_store_register,
11214 (the_low_target): New.
11215 * linux-sh-low.c (num_regs): Remove.
11216 (sh_num_regs): Define.
11217 (sh_regmap): Renamed from regmap, made static.
11218 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11220 (sh_cannot_store_register): Renamed from cannot_store_register,
11222 (the_low_target): New.
11223 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11224 (the_low_target): New.
11226 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11228 * Makefile.in: Add stamp-h target.
11229 * configure.in: Create stamp-h.
11230 * configure: Regenerated.
11232 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11234 * inferiors.c: New file.
11235 * target.c: New file.
11236 * target.h: New file.
11237 * Makefile.in: Add target.o and inferiors.o. Update
11239 * linux-low.c (inferior_pid): New static variable,
11240 moved from server.c.
11241 (linux_create_inferior): Renamed from create_inferior.
11242 Call add_inferior. Return 0 on success instead of a PID.
11243 (linux_attach): Renamed from myattach.
11244 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11245 (linux_thread_alive): Renamed from mythread_alive.
11246 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11248 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11249 (regsets_store_inferior_registers): Correct error message.
11250 Add missing ``return 0''.
11251 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11252 (linux_store_registers): Renamed from store_inferior_registers.
11253 (linux_read_memory): Renamed from read_inferior_memory.
11254 (linux_write_memory): Renamed from write_inferior_memory.
11255 (linux_target_ops): New structure.
11256 (initialize_low): Call set_target_ops ().
11257 * remote-utils.c (unhexify): New function.
11258 (hexify): New function.
11259 (input_interrupt): Send signals to ``signal_pid''.
11260 * server.c (inferior_pid): Remove.
11261 (start_inferior): Update create_inferior call.
11262 (attach_inferior): Call add_inferior.
11263 (handle_query): New function.
11264 (main): Call handle_query for `q' packets.
11265 * server.h: Include "target.h". Remove obsolete prototypes.
11266 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11268 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11270 * Makefile.in: Add WARN_CFLAGS. Update configury
11272 * configure.in: Check for <string.h>
11273 * configure: Regenerate.
11274 * config.in: Regenerate.
11275 * gdbreplay.c: Include needed system headers.
11276 (remote_open): Remove strchr prototype.
11277 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11278 * regcache.c (supply_register): Change buf argument to const void *.
11279 (supply_register_by_name): Likewise.
11280 (collect_register): Change buf argument to void *.
11281 (collect_register_by_name): Likewise.
11282 * regcache.h: Add missing prototypes.
11283 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11284 * server.c (handle_query): New function.
11285 (attached): New static variable, moved out of main.
11286 (main): Quiet longjmp clobber warnings.
11287 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11288 * utils.c (error): Remove NORETURN.