1 2015-06-10 Gary Benson <gbenson@redhat.com>
3 * configure.ac (AC_CHECK_FUNCS): Add setns.
4 * config.in: Regenerate.
6 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7 (linux-namespaces.o): New rule.
8 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10 2015-06-09 Gary Benson <gbenson@redhat.com>
12 * hostio.c (handle_open): Process mode argument with
15 2015-06-01 Yao Qi <yao.qi@linaro.org>
17 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
18 * linux-x86-low.c: Likewise.
20 2015-05-28 Don Breazeal <donb@codesourcery.com>
22 * linux-low.c (handle_extended_wait): Initialize
23 thread_info.last_resume_kind for new fork children.
25 2015-05-15 Pedro Alves <palves@redhat.com>
27 * target.h (target_handle_new_gdb_connection): Rewrite using if
30 2015-05-14 Joel Brobecker <brobecker@adacore.com>
32 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
33 * configure, config.in: Regenerate.
34 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
37 2015-05-12 Don Breazeal <donb@codesourcery.com>
39 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
40 PTRACE_EVENT_VFORK_DONE.
41 (linux_low_ptrace_options, extended_event_reported): Add vfork
43 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
44 and "vforkdone" for RSP 'T' Stop Reply Packet.
45 * server.h (report_vfork_events): Declare
48 2015-05-12 Don Breazeal <donb@codesourcery.com>
50 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
51 (the_low_target) <new_fork>: Initialize new member.
52 * linux-arm-low.c (arm_new_fork): New function.
53 (the_low_target) <new_fork>: Initialize new member.
54 * linux-low.c (handle_extended_wait): Call new target function
56 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
57 * linux-mips-low.c (mips_add_watchpoint): New function
58 extracted from mips_insert_point.
59 (the_low_target) <new_fork>: Initialize new member.
60 (mips_linux_new_fork): New function.
61 (mips_insert_point): Call mips_add_watchpoint.
62 * linux-x86-low.c (x86_linux_new_fork): New function.
63 (the_low_target) <new_fork>: Initialize new member.
65 2015-05-12 Don Breazeal <donb@codesourcery.com>
67 * linux-low.c (handle_extended_wait): Implement return value,
68 rename argument 'event_child' to 'event_lwp', handle
69 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
70 (linux_low_ptrace_options): New function.
71 (linux_low_filter_event): Call linux_low_ptrace_options,
72 use different argument fo linux_enable_event_reporting,
73 use return value from handle_extended_wait.
74 (extended_event_reported): New function.
75 (linux_wait_1): Call extended_event_reported and set
76 status to report fork events.
77 (linux_write_memory): Add pid to debug message.
78 (reset_lwp_ptrace_options_callback): New function.
79 (linux_handle_new_gdb_connection): New function.
80 (linux_target_ops): Initialize new structure member.
81 * linux-low.h (struct lwp_info) <waitstatus>: New member.
82 * lynx-low.c: Initialize new structure member.
83 * remote-utils.c (prepare_resume_reply): Implement stop reason
84 "fork" for "T" stop message.
85 * server.c (handle_query): Call handle_new_gdb_connection.
86 * server.h (report_fork_events): Declare global flag.
87 * target.h (struct target_ops) <handle_new_gdb_connection>:
89 (target_handle_new_gdb_connection): New macro.
90 * win32-low.c: Initialize new structure member.
92 2015-05-12 Don Breazeal <donb@codesourcery.com>
94 * mem-break.c (APPEND_TO_LIST): Define macro.
95 (clone_agent_expr): New function.
96 (clone_one_breakpoint): New function.
97 (clone_all_breakpoints): New function.
98 * mem-break.h: Declare new functions.
100 2015-05-12 Don Breazeal <donb@codesourcery.com>
102 * linux-low.c (linux_supports_fork_events): New function.
103 (linux_supports_vfork_events): New function.
104 (linux_target_ops): Initialize new structure members.
105 (initialize_low): Call linux_check_ptrace_features.
106 * lynx-low.c (lynx_target_ops): Initialize new structure
108 * server.c (report_fork_events, report_vfork_events):
110 (handle_query): Add new features to qSupported packet and
112 (captured_main): Initialize new global variables.
113 * target.h (struct target_ops) <supports_fork_events>:
115 <supports_vfork_events>: New member.
116 (target_supports_fork_events): New macro.
117 (target_supports_vfork_events): New macro.
118 * win32-low.c (win32_target_ops): Initialize new structure
121 2015-05-12 Gary Benson <gbenson@redhat.com>
123 * server.c (handle_qxfer_exec_file): Use current process
126 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
128 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
129 Remove HAVE_PTRACE_GETREGS conditionals.
130 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
131 instead of PTRACE_GETREGS and PTRACE_SETREGS.
133 2015-05-08 Yao Qi <yao.qi@linaro.org>
135 * linux-low.c (linux_supports_conditional_breakpoints): New
137 (linux_target_ops): Install new target method.
138 * lynx-low.c (lynx_target_ops): Install NULL hook for
139 supports_conditional_breakpoints.
140 * nto-low.c (nto_target_ops): Likewise.
141 * spu-low.c (spu_target_ops): Likewise.
142 * win32-low.c (win32_target_ops): Likewise.
143 * server.c (handle_query): Check
144 target_supports_conditional_breakpoints.
145 * target.h (struct target_ops) <supports_conditional_breakpoints>:
147 (target_supports_conditional_breakpoints): New macro.
149 2015-05-06 Pedro Alves <palves@redhat.com>
152 * server.c (start_inferior): If the process exits, mourn it.
154 2015-04-21 Gary Benson <gbenson@redhat.com>
156 * hostio.c (fileio_open_flags_to_host): Factored out to
157 fileio_to_host_openflags in common/fileio.c. Single use
160 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
162 * linux-xtensa-low.c (xtensa_fill_gregset)
163 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
166 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
168 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
169 (regs_info): Replace usrregs pointer with NULL.
171 2015-04-17 Gary Benson <gbenson@redhat.com>
173 * target.h (struct target_ops) <pid_to_exec_file>: New field.
174 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
175 * server.c (handle_qxfer_exec_file): New function.
176 (qxfer_packets): Add exec-file entry.
177 (handle_query): Report qXfer:exec-file:read as supported packet.
179 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
181 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
183 2015-04-09 Gary Benson <gbenson@redhat.com>
185 * hostio-errno.c (errno_to_fileio_error): Remove function.
186 Update caller to use remote_fileio_to_fio_error.
188 2015-04-09 Yao Qi <yao.qi@linaro.org>
190 * linux-low.c (linux_insert_point): Call
191 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
192 (linux_remove_point): Call remove_memory_breakpoint if type is
194 * linux-x86-low.c (x86_insert_point): Don't call
195 insert_memory_breakpoint.
196 (x86_remove_point): Don't call remove_memory_breakpoint.
198 2015-04-01 Pedro Alves <palves@redhat.com>
199 Cleber Rosa <crosa@redhat.com>
201 * server.c (gdbserver_usage): Reorganize and extend the usage
204 2015-03-24 Pedro Alves <palves@redhat.com>
206 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
207 output. Also dump TRAP_TRACE.
208 (linux_low_filter_event): In debug output, distinguish a
209 resume_stop SIGSTOP from a delayed SIGSTOP.
211 2015-03-24 Gary Benson <gbenson@redhat.com>
213 * linux-x86-low.c (x86_linux_new_thread): Moved to
215 (x86_linux_prepare_to_resume): Likewise.
217 2015-03-24 Gary Benson <gbenson@redhat.com>
219 * Makefile.in (x86-linux-dregs.o): New rule.
220 * configure.srv: Add x86-linux-dregs.o to relevant targets.
221 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
222 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
223 (x86_linux_dr_get): Likewise.
224 (x86_linux_dr_set): Likewise.
225 (update_debug_registers_callback): Likewise.
226 (x86_linux_dr_set_addr): Likewise.
227 (x86_linux_dr_get_addr): Likewise.
228 (x86_linux_dr_set_control): Likewise.
229 (x86_linux_dr_get_control): Likewise.
230 (x86_linux_dr_get_status): Likewise.
231 (x86_linux_update_debug_registers): Likewise.
233 2015-03-24 Gary Benson <gbenson@redhat.com>
235 * linux-x86-low.c (x86_linux_update_debug_registers):
236 New function, factored out from...
237 (x86_linux_prepare_to_resume): ...this.
239 2015-03-24 Gary Benson <gbenson@redhat.com>
241 * linux-x86-low.c (x86_linux_dr_get): Update comments.
242 (x86_linux_dr_set): Likewise.
243 (update_debug_registers_callback): Likewise.
244 (x86_linux_dr_set_addr): Likewise.
245 (x86_linux_dr_get_addr): Likewise.
246 (x86_linux_dr_set_control): Likewise.
247 (x86_linux_dr_get_control): Likewise.
248 (x86_linux_dr_get_status): Likewise.
249 (x86_linux_prepare_to_resume): Likewise.
251 2015-03-24 Gary Benson <gbenson@redhat.com>
253 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
254 Use perror_with_name. Pass string through gettext.
255 (x86_linux_dr_set): Likewise.
257 2015-03-24 Gary Benson <gbenson@redhat.com>
259 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
260 (x86_linux_dr_set_addr): ...this.
261 (x86_dr_low_get_addr): Rename to...
262 (x86_linux_dr_get_addr): ...this.
263 (x86_dr_low_set_control): Rename to...
264 (x86_linux_dr_set_control): ...this.
265 (x86_dr_low_get_control): Rename to...
266 (x86_linux_dr_get_control): ...this.
267 (x86_dr_low_get_status): Rename to...
268 (x86_linux_dr_get_status): ...this.
269 (x86_dr_low): Update with new function names.
271 2015-03-24 Gary Benson <gbenson@redhat.com>
273 * Makefile.in (x86-linux.o): New rule.
274 * configure.srv: Add x86-linux.o to relevant targets.
275 * linux-low.c (lwp_set_arch_private_info): New function.
276 (lwp_arch_private_info): Likewise.
277 * linux-x86-low.c: Include nat/x86-linux.h.
278 (arch_lwp_info): Removed structure.
279 (update_debug_registers_callback):
280 Use lwp_set_debug_registers_changed.
281 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
282 and lwp_set_debug_registers_changed.
283 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
285 2015-03-24 Gary Benson <gbenson@redhat.com>
287 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
288 * linux-arm-low.c (arm_new_thread): Likewise.
289 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
290 * linux-mips-low.c (mips_linux_new_thread): Likewise.
291 * linux-x86-low.c (x86_linux_new_thread): Likewise.
292 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
294 2015-03-24 Gary Benson <gbenson@redhat.com>
296 * linux-low.c (ptid_of_lwp): New function.
297 (lwp_is_stopped): Likewise.
298 (lwp_stop_reason): Likewise.
299 * linux-x86-low.c (update_debug_registers_callback):
301 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
304 2015-03-24 Gary Benson <gbenson@redhat.com>
306 * linux-low.h (linux_stop_lwp): Remove declaration.
308 2015-03-24 Gary Benson <gbenson@redhat.com>
310 * linux-low.h: Include nat/linux-nat.h.
311 * linux-low.c (iterate_over_lwps_args): New structure.
312 (iterate_over_lwps_filter): New function.
313 (iterate_over_lwps): Likewise.
314 * linux-x86-low.c (update_debug_registers_callback):
315 Update signature to what iterate_over_lwps expects.
316 Remove PID check that iterate_over_lwps now performs.
317 (x86_dr_low_set_addr): Use iterate_over_lwps.
318 (x86_dr_low_set_control): Likewise.
320 2015-03-24 Gary Benson <gbenson@redhat.com>
322 * linux-x86-low.c (x86_debug_reg_state): New function.
323 (x86_linux_prepare_to_resume): Use the above.
325 2015-03-24 Gary Benson <gbenson@redhat.com>
327 * linux-low.c (current_lwp_ptid): New function.
328 * linux-x86-low.c: Include nat/linux-nat.h.
329 (x86_dr_low_get_addr): Use current_lwp_ptid.
330 (x86_dr_low_get_control): Likewise.
331 (x86_dr_low_get_status): Likewise.
333 2015-03-20 Pedro Alves <palves@redhat.com>
335 * tracepoint.c (cmd_qtstatus): Make "str" const.
337 2015-03-20 Pedro Alves <palves@redhat.com>
339 * server.c (handle_general_set): Make "req_str" const.
341 2015-03-19 Pedro Alves <palves@redhat.com>
343 * linux-low.c (linux_resume_one_lwp): Rename to ...
344 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
345 instead call perror_with_name.
346 (check_ptrace_stopped_lwp_gone): New function.
347 (linux_resume_one_lwp): Reimplement as wrapper around
348 linux_resume_one_lwp_throw that swallows errors if the LWP is
351 2015-03-19 Pedro Alves <palves@redhat.com>
353 * linux-low.c (count_events_callback, select_event_lwp_callback):
354 No longer check whether the thread has resume_stop as last resume
357 2015-03-19 Pedro Alves <palves@redhat.com>
359 * linux-low.c (count_events_callback, select_event_lwp_callback):
360 Use the lwp's status_pending_p field, not the thread's.
362 2015-03-19 Pedro Alves <palves@redhat.com>
364 * linux-low.c (select_event_lwp_callback): Update comments to
365 no longer mention SIGTRAP.
367 2015-03-18 Gary Benson <gbenson@redhat.com>
369 * server.c (handle_query): Do not report vFile:fstat as supported.
371 2015-03-11 Gary Benson <gbenson@redhat.com>
373 * hostio.c (sys/types.h): New include.
374 (sys/stat.h): Likewise.
375 (common-remote-fileio.h): Likewise.
376 (handle_fstat): New function.
377 (handle_vFile): Handle vFile:fstat packets.
379 2015-03-11 Gary Benson <gbenson@redhat.com>
381 * configure.ac (AC_CHECK_MEMBERS): Add checks for
382 struct stat.st_blocks and struct stat.st_blksize.
383 * configure: Regenerate.
384 * config.in: Likewise.
385 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
386 (OBS): Add common-remote-fileio.o.
387 (common-remote-fileio.o): New rule.
389 2015-03-09 Pedro Alves <palves@redhat.com>
391 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
392 'struct sockaddr' pointer in 'accept' call.
394 2015-03-09 Pedro Alves <palves@redhat.com>
397 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 * configure.ac (build_warnings): Move
412 -Wdeclaration-after-statement to the C-specific set.
413 * configure: Regenerate.
415 2015-03-07 Pedro Alves <palves@redhat.com>
417 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
418 or <winsock2.h> here. Instead include "gdb_socket.h".
419 (remote_open): Use union gdb_sockaddr_u.
420 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
421 or <winsock2.h> here. Instead include "gdb_socket.h".
422 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
423 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
425 (init_named_socket, gdb_agent_helper_thread): Use union
428 2015-03-07 Pedro Alves <palves@redhat.com>
430 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
433 2015-03-06 Yao Qi <yao.qi@linaro.org>
435 * linux-aarch64-low.c (aarch64_insert_point): Use
436 show_debug_regs as a boolean.
437 (aarch64_remove_point): Likewise.
439 2015-03-05 Pedro Alves <palves@redhat.com>
441 * lynx-low.c (lynx_target_ops): Install NULL hooks for
442 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
443 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
444 * nto-low.c (nto_target_ops): Likewise.
445 * spu-low.c (spu_target_ops): Likewise.
446 * win32-low.c (win32_target_ops): Likewise.
448 2015-03-04 Pedro Alves <palves@redhat.com>
450 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
451 Decide whether a breakpoint triggered based on the SIGTRAP's
453 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
454 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
455 (linux_low_filter_event): Check for breakpoints before checking
457 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
459 (linux_stopped_by_sw_breakpoint)
460 (linux_supports_stopped_by_sw_breakpoint)
461 (linux_stopped_by_hw_breakpoint)
462 (linux_supports_stopped_by_hw_breakpoint): New functions.
463 (linux_target_ops): Install new target methods.
465 2015-03-04 Pedro Alves <palves@redhat.com>
467 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
468 * server.c (swbreak_feature, hwbreak_feature): New globals.
469 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
470 (captured_main): Clear swbreak_feature and hwbreak_feature.
471 * server.h (swbreak_feature, hwbreak_feature): Declare.
472 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
473 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
474 supports_stopped_by_hw_breakpoint>: New fields.
475 (target_supports_stopped_by_sw_breakpoint)
476 (target_stopped_by_sw_breakpoint)
477 (target_supports_stopped_by_hw_breakpoint)
478 (target_stopped_by_hw_breakpoint): Declare.
480 2015-03-04 Pedro Alves <palves@redhat.com>
482 enum lwp_stop_reason -> enum target_stop_reason
483 * linux-low.c (check_stopped_by_breakpoint): Adjust.
484 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
485 (linux_wait_1, stuck_in_jump_pad_callback)
486 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
487 (linux_stopped_by_watchpoint):
488 * linux-low.h (enum lwp_stop_reason): Delete.
489 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
490 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
492 2015-03-04 Yao Qi <yao.qi@linaro.org>
494 * Makefile.in (SFILES): Add linux-aarch64-low.c.
496 2015-03-03 Gary Benson <gbenson@redhat.com>
498 * hostio.c (handle_vFile): Fix prefix lengths.
500 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
502 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
505 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
507 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
508 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
509 (clean): Add "rm -f" for above C files.
510 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
511 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
512 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
513 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
514 * linux-s390-low.c (HWCAP_S390_VX): New macro.
515 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
516 (init_registers_s390x_vx_linux64)
517 (init_registers_s390x_tevx_linux64)
518 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
519 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
521 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
522 (s390_store_vxrs_high): New functions.
523 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
525 (s390_arch_setup): Add logic for selecting one of the new target
526 descriptions. Activate the new vector regsets if applicable.
527 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
528 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
529 and init_registers_s390x_tevx_linux64.
531 2015-03-01 Pedro Alves <palves@redhat.com>
533 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
536 2015-02-27 Pedro Alves <palves@redhat.com>
538 * linux-x86-low.c (u_debugreg_offset): New function.
539 (x86_linux_dr_get, x86_linux_dr_set): Use it.
541 2015-02-27 Pedro Alves <palves@redhat.com>
543 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
544 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
545 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
546 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
547 (ps_lsetfpregs, ps_getpid)
548 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
549 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
550 (ps_lsetxregs, ps_plog): Declare.
552 2015-02-27 Pedro Alves <palves@redhat.com>
554 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
555 IP_AGENT_EXPORT_FUNC.
556 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
557 IP_AGENT_EXPORT_FUNC.
558 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
559 (IP_AGENT_EXPORT): Delete.
560 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
561 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
562 (gdb_trampoline_buffer_error, collecting, gdb_collect)
563 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
564 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
565 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
566 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
567 (traceframe_read_count, traceframe_write_count)
568 (traceframes_created, trace_state_variables, get_raw_reg)
569 (get_trace_state_variable_value, set_trace_state_variable_value)
570 (ust_loaded, helper_thread_id, cmd_buf): Use
571 IPA_SYM_EXPORTED_NAME.
572 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
573 (tracepoints) Use IP_AGENT_EXPORT_VAR.
574 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
575 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
576 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
577 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
578 EXTERN_C_PUSH/EXTERN_C_POP.
579 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
580 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
581 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
582 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
583 (traceframe_write_count, traceframe_read_count)
584 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
585 (about_to_request_buffer_space, get_trace_state_variable_value)
586 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
587 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
588 EXTERN_C_PUSH/EXTERN_C_POP.
589 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
590 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
591 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
592 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
593 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
594 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
595 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
596 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
598 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
599 (IP_AGENT_EXPORT_VAR_DECL): Define.
601 (gdb_agent_get_raw_reg): Declare.
603 2015-02-27 Tom Tromey <tromey@redhat.com>
604 Pedro Alves <palves@redhat.com>
606 Rename symbols whose names are reserved C++ keywords throughout.
608 2015-02-27 Pedro Alves <palves@redhat.com>
610 * Makefile.in (COMPILER): New, get it from autoconf.
611 (CXX): Get from autoconf instead.
612 (COMPILE.pre): Use COMPILER.
613 (CC-LD): Rename to ...
614 (CC_LD): ... this. Use COMPILER.
615 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
616 (CXX_FOR_TARGET): Default to g++ instead of gcc.
617 * acinclude.m4: Include build-with-cxx.m4.
618 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
619 Disable -Werror by default if building in C++ mode.
620 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
621 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
622 the C++ compiler. Save/restore CXXFLAGS too.
623 * configure: Regenerate.
625 2015-02-27 Pedro Alves <palves@redhat.com>
627 * acinclude.m4: Include libiberty.m4.
628 * configure.ac: Call libiberty_INIT.
629 * config.in, configure: Regenerate.
631 2015-02-26 Pedro Alves <palves@redhat.com>
633 * linux-low.c (linux_wait_1): When incrementing the PC past a
634 program breakpoint always use the_low_target.breakpoint_len as
635 increment, rather than the maximum between that and
636 the_low_target.decr_pc_after_break.
638 2015-02-23 Pedro Alves <palves@redhat.com>
640 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
641 thread was doing a step-over; always adjust the PC if
642 we stepped over a permanent breakpoint.
643 (linux_wait_1): If we stepped over breakpoint that was on top of a
644 permanent breakpoint, manually advance the PC past it.
646 2015-02-23 Pedro Alves <palves@redhat.com>
648 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
650 (x86_fill_gregset, x86_store_gregset): Use it when handling
653 2015-02-20 Pedro Alves <palves@redhat.com>
655 * thread-db.c: Include "nat/linux-procfs.h".
656 (thread_db_init): Skip listing new threads if the kernel supports
657 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
659 2015-02-20 Pedro Alves <palves@redhat.com>
661 * linux-low.c (status_pending_p_callback): Use ptid_match.
663 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
666 * linux-low.c (wstatus_maybe_breakpoint): Remove.
667 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
668 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
670 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
673 * tracepoint.c (cmd_qtinit): Add check for current_thread.
675 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
677 * linux-low.c (linux_low_btrace_conf): Print size.
678 * server.c (handle_btrace_conf_general_set): New.
679 (hanle_general_set): Call handle_btrace_conf_general_set.
680 (handle_query): Report Qbtrace-conf:bts:size as supported.
682 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
684 * linux-low.c (linux_low_enable_btrace): Update parameters.
685 (linux_low_btrace_conf): New.
686 (linux_target_ops)<to_btrace_conf>: Initialize.
687 * server.c (current_btrace_conf): New.
688 (handle_btrace_enable): Rename to ...
689 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
690 to target_enable_btrace. Update comment. Update users.
691 (handle_qxfer_btrace_conf): New.
692 (qxfer_packets): Add btrace-conf entry.
693 (handle_query): Report qXfer:btrace-conf:read as supported packet.
694 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
695 (target_ops)<read_btrace_conf>: New.
696 (target_enable_btrace): Update parameters.
697 (target_read_btrace_conf): New.
699 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
701 * server.c (handle_btrace_general_set): Remove call to
702 target_supports_btrace.
703 (supported_btrace_packets): New.
704 (handle_query): Call supported_btrace_packets.
705 * target.h: include btrace-common.h.
706 (btrace_target_info): Removed.
707 (supports_btrace, target_supports_btrace): Update parameters.
709 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
711 * Makefile.in (SFILES): Add common/btrace-common.c.
712 (OBS): Add common/btrace-common.o.
713 (btrace-common.o): Add build rules.
714 * linux-low: Include btrace-common.h.
715 (linux_low_read_btrace): Use struct btrace_data. Call
716 btrace_data_init and btrace_data_fini.
718 2015-02-06 Pedro Alves <palves@redhat.com>
720 * thread-db.c (find_new_threads_callback): Add debug output.
722 2015-02-04 Pedro Alves <palves@redhat.com>
724 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
725 (resume_stopped_resumed_lwps): New function.
726 (linux_wait_for_event_filtered): Use it.
728 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
730 * Makefile.in (SFILES): Add linux-personality.c.
731 (linux-personality.o): New rule.
732 * configure.srv (srv_linux_obj): Add linux-personality.o to the
733 list of objects to be built.
734 * linux-low.c: Include nat/linux-personality.h.
735 (linux_create_inferior): Remove code to disable address space
736 randomization (moved to ../nat/linux-personality.c). Create
737 cleanup to disable address space randomization.
739 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
741 * Makefile.in (posix-strerror.o): New rule.
742 (mingw-strerror.o): Likewise.
743 * configure: Regenerated.
744 * configure.ac: Source file ../common/common.host. Initialize new
745 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
747 2015-01-14 Yao Qi <yao@codesourcery.com>
749 * Makefile.in (SFILES): Add nat/ppc-linux.c.
750 (ppc-linux.o): New rule.
751 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
752 * configure.ac: AC_CHECK_FUNCS(getauxval).
753 * config.in: Re-generated.
754 * configure: Re-generated.
755 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
756 ppc64_64bit_inferior_p
758 2015-01-14 Yao Qi <yao@codesourcery.com>
760 * linux-ppc-low.c: Include "nat/ppc-linux.h".
761 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
762 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
763 (PT_ORIG_R3, PT_TRAP): Likewise.
764 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
765 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
766 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
768 2015-01-10 Joel Brobecker <brobecker@adacore.com>
770 * i387-fp.c (i387_cache_to_xsave): In look over
771 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
772 zmmh_low_space field by use of zmmh_high_space.
774 2015-01-09 Pedro Alves <palves@redhat.com>
776 * linux-low.c (step_over_bkpt): Move higher up in the file.
777 (handle_extended_wait): Don't store the stop_pc here.
778 (get_stop_pc): Adjust comments and rename to ...
779 (check_stopped_by_breakpoint): ... this. Record whether the LWP
780 stopped for a software breakpoint or hardware breakpoint.
781 (thread_still_has_status_pending_p): New function.
782 (status_pending_p_callback): Use
783 thread_still_has_status_pending_p. If the event is no longer
784 interesting, resume the LWP.
785 (handle_tracepoints): Add assert.
786 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
787 (wstatus_maybe_breakpoint): New function.
788 (cancel_breakpoint): Delete function.
789 (check_stopped_by_watchpoint): New function, factored out from
790 linux_low_filter_event.
791 (lp_status_maybe_breakpoint): Delete function.
792 (linux_low_filter_event): Remove filter_ptid argument.
793 Leave thread group exits pending here. Store the LWP's stop PC.
794 Always leave events pending.
795 (linux_wait_for_event_filtered): Pull all events out of the
796 kernel, and leave them all pending.
797 (count_events_callback, select_event_lwp_callback): Consider all
799 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
800 (select_event_lwp): Only give preference to the stepping LWP in
801 all-stop mode. Adjust comments.
802 (ignore_event): New function.
803 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
804 references to cancel_breakpoints. Adjust to renames. Also give
805 equal priority to all LWPs that have had events in non-stop mode.
806 If reporting a software breakpoint event, unadjust the LWP's PC.
807 (linux_wait): If linux_wait_1 returned an ignored event, retry.
808 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
810 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
811 (resume_status_pending_p): Use thread_still_has_status_pending_p.
812 (linux_stopped_by_watchpoint): Adjust.
813 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
814 * linux-low.h (enum lwp_stop_reason): New.
815 (struct lwp_info) <stop_pc>: Adjust comment.
816 <stopped_by_watchpoint>: Delete field.
817 <stop_reason>: New field.
818 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
819 * mem-break.c (software_breakpoint_inserted_here)
820 (hardware_breakpoint_inserted_here): New function.
821 * mem-break.h (software_breakpoint_inserted_here)
822 (hardware_breakpoint_inserted_here): Declare.
823 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
824 (cancel_breakpoints): Delete.
825 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
826 (upload_fast_traceframes): Remove references to
829 2015-01-09 Pedro Alves <palves@redhat.com>
831 * thread-db.c (find_new_threads_callback): Ignore thread if the
832 kernel thread ID is -1.
834 2015-01-09 Pedro Alves <palves@redhat.com>
836 * linux-low.c (linux_attach_fail_reason_string): Move to
837 nat/linux-ptrace.c, and rename.
838 (linux_attach_lwp): Update comment.
839 (attach_proc_task_lwp_callback): New function.
840 (linux_attach): Adjust to rename and use
841 linux_proc_attach_tgid_threads.
842 (linux_attach_fail_reason_string): Delete declaration.
844 2015-01-01 Joel Brobecker <brobecker@adacore.com>
846 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
847 * server.c (gdbserver_version): Likewise.
849 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
851 * remote-utils.c: Include ctype.h.
852 (input_interrupt): Explicitly handle the case when the char
853 received is the NUL byte. Improve the printing of non-ASCII
856 2014-12-16 Joel Brobecker <brobecker@adacore.com>
858 * linux-low.c (linux_low_filter_event): Update call to
859 linux_enable_event_reporting following the addition of
860 a new parameter to that function.
862 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
865 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
866 (AARCH64_FPCR_REGNO): Likewise.
867 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
868 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
869 (aarch64_store_fpregset): Likewise.
871 2014-12-15 Joel Brobecker <brobecker@adacore.com>
873 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
874 Remove FIXME comment about assumption about N.
876 2014-12-13 Joel Brobecker <brobecker@adacore.com>
878 * configure.ac: If large-file support is disabled in GDBserver,
879 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
880 * configure: Regenerate.
882 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
884 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
885 warning upon ENODATA from ptrace.
886 * linux-s390-low.c (s390_store_tdb): New.
887 (s390_regsets): Add regset for NT_S390_TDB.
889 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
891 * linux-low.c (regsets_store_inferior_registers): Skip regsets
892 without a fill_function.
893 * linux-s390-low.c (s390_fill_last_break): Remove.
894 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
895 (s390_arch_setup): Use regset's size instead of fill_function for
898 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
900 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
901 the regset's store function when ptrace returned an error.
902 * regcache.c (get_thread_regcache): Invalidate register cache
903 before fetching inferior's registers.
905 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
907 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
908 while-loop as for-loop.
909 (regsets_store_inferior_registers): Likewise.
911 2014-11-28 Yao Qi <yao@codesourcery.com>
913 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
914 * config.in, configure: Re-generate.
915 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
918 2014-11-21 Yao Qi <yao@codesourcery.com>
920 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
921 (AC_CHECK_HEADERS): Remove malloc.h.
922 * configure: Re-generated.
923 * config.in: Re-generated.
924 * server.h: Don't include alloca.h and malloc.h.
925 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
926 Don't include malloc.h.
928 2014-11-17 Joel Brobecker <brobecker@adacore.com>
930 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
931 corresponding ERRNO check in same block.
933 2014-11-12 Pedro Alves <palves@redhat.com>
935 * server.c (cont_thread): Update comment.
936 (start_inferior, attach_inferior): No longer clear cont_thread.
937 (handle_v_cont): No longer set cont_thread.
938 (captured_main): Clear cont_thread each time a GDB connects.
940 2014-11-12 Pedro Alves <palves@redhat.com>
942 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
943 thread, and don't resume all threads if the Hc thread has exited.
945 2014-11-12 Pedro Alves <palves@redhat.com>
947 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
948 the process group instead of to a specific LWP.
950 2014-10-15 Pedro Alves <palves@redhat.com>
953 * win32-arm-low.c (arm_set_thread_context): Remove current_event
955 (arm_set_thread_context): Delete.
956 (the_low_target): Adjust.
957 * win32-i386-low.c (debug_registers_changed)
958 (debug_registers_used): Delete.
959 (update_debug_registers_callback): New function.
960 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
961 needing to update their debug registers.
962 (win32_get_current_dr): New function.
963 (x86_dr_low_get_addr, x86_dr_low_get_control)
964 (x86_dr_low_get_status): Fetch the debug register from the thread
966 (i386_initial_stuff): Adjust.
967 (i386_get_thread_context): Remove current_event parameter. Don't
968 clear debug_registers_changed nor copy DR values to
970 (i386_set_thread_context): Delete.
971 (i386_prepare_to_resume): New function.
972 (i386_thread_added): Mark the thread as needing to update irs
974 (the_low_target): Remove i386_set_thread_context and install
975 i386_prepare_to_resume.
976 * win32-low.c (win32_get_thread_context): Adjust.
977 (win32_set_thread_context): Use SetThreadContext
979 (win32_prepare_to_resume): New function.
980 (win32_require_context): New function, factored out from ...
981 (thread_rec): ... this.
982 (continue_one_thread): Call win32_prepare_to_resume on each thread
983 we're about to continue.
984 (win32_resume): Call win32_prepare_to_resume on the event thread.
985 * win32-low.h (struct win32_thread_info)
986 <debug_registers_changed>: New field.
987 (struct win32_target_ops): Change prototype of set_thread_context,
988 delete set_thread_context and add prepare_to_resume.
989 (win32_require_context): New declaration.
991 2014-10-08 Gary Benson <gbenson@redhat.com>
993 * server.h: Do not include common-exceptions.h.
995 2014-10-08 Gary Benson <gbenson@redhat.com>
997 * server.h: Do not include cleanups.h.
999 2014-09-30 James Hogan <james.hogan@imgtec.com>
1001 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1004 2014-09-23 Yao Qi <yao@codesourcery.com>
1006 * linux-low.c (lp_status_maybe_breakpoint): New function.
1007 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1008 (count_events_callback): Likewise.
1009 (select_event_lwp_callback): Likewise.
1010 (cancel_breakpoints_callback): Likewise.
1012 2014-09-19 Don Breazeal <donb@codesourcery.com>
1014 * linux-low.c (handle_extended_wait): Call
1015 linux_ptrace_get_extended_event.
1016 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1017 linux_is_extended_waitstatus.
1019 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1021 * Makefile.in (CPPFLAGS): Define.
1022 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1023 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1025 2014-09-16 Gary Benson <gbenson@redhat.com>
1027 * inferiors.h (current_inferior): Renamed as...
1028 (current_thread): New variable. All uses updated.
1029 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1030 (maybe_move_out_of_jump_pad): Likewise.
1031 (cancel_breakpoint): Likewise.
1032 (linux_low_filter_event): Likewise.
1033 (wait_for_sigstop): Likewise.
1034 (linux_resume_one_lwp): Likewise.
1035 (need_step_over_p): Likewise.
1036 (start_step_over): Likewise.
1037 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1038 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1039 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1040 and save_inferior as saved_thread.
1041 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1043 (regcache_invalidate_thread): Likewise.
1044 * remote-utils.c (prepare_resume_reply): Likewise.
1045 * thread-db.c (thread_db_get_tls_address): Likewise.
1046 (disable_thread_event_reporting): Likewise.
1047 (remove_thread_event_breakpoints): Likewise.
1048 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1050 * target.h (set_desired_inferior): Renamed as...
1051 (set_desired_thread): New declaration. All uses updated.
1052 * server.c (myresume): Updated comment to reference thread instead
1054 (handle_serial_event): Likewise.
1055 (handle_target_event): Likewise.
1057 2014-09-12 Tom Tromey <tromey@redhat.com>
1058 Gary Benson <gbenson@redhat.com>
1060 * regcache.h: Include common-regcache.h.
1061 (regcache_read_pc): Don't declare.
1062 * regcache.c (get_thread_regcache_for_ptid): New function.
1064 2014-09-11 Tom Tromey <tromey@redhat.com>
1065 Gary Benson <gbenson@redhat.com>
1067 * symbol.c: New file.
1068 * Makefile.in (SFILES): Add symbol.c.
1069 (OBS): Add symbol.o.
1071 2014-09-11 Gary Benson <gbenson@redhat.com>
1073 * target.c (target_stop_ptid, target_continue_ptid): New
1076 2014-09-11 Tom Tromey <tromey@redhat.com>
1077 Gary Benson <gbenson@redhat.com>
1079 * target.h: Include target/target.h.
1080 * target.c (target_read_memory, target_read_uint32)
1081 (target_write_memory): New functions.
1083 2014-09-11 Gary Benson <gbenson@redhat.com>
1085 * server.h (debug_hw_points): Don't declare.
1086 * server.c (debug_hw_points): Don't define. Replace all uses
1087 with show_debug_regs.
1088 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1089 all uses with show_debug_regs.
1091 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1093 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1094 endianness into account.
1095 (ppc_supply_ptrace_register): Likewise.
1097 2014-09-03 James Hogan <james.hogan@imgtec.com>
1099 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1100 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1102 2014-09-03 Gary Benson <gbenson@redhat.com>
1104 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1105 ALL_DEBUG_ADDRESS_REGISTERS.
1107 2014-09-02 Gary Benson <gbenson@redhat.com>
1109 * i386-low.h: Renamed as...
1110 * x86-low.h: New file. All type, function and variable name
1111 prefixes changed from "i386_" to "x86_". All references updated.
1112 * i386-low.c: Renamed as...
1113 * x86-low.c: New file. All type, function and variable name
1114 prefixes changed from "i386_" to "x86_". All references updated.
1116 2014-09-02 Gary Benson <gbenson@redhat.com>
1118 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1119 (x86_linux_new_thread): Likewise.
1121 2014-08-29 Gary Benson <gbenson@redhat.com>
1123 * server.h (setjmp.h): Do not include.
1124 (toplevel): Do not declare.
1125 (common-exceptions.h): Include.
1126 (cleanups.h): Likewise.
1127 * server.c (toplevel): Do not define.
1128 (exit_code): New static global.
1129 (detach_or_kill_for_exit_cleanup): New function.
1130 (main): New function. Original main renamed to...
1131 (captured_main): New function.
1132 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1134 2014-08-29 Gary Benson <gbenson@redhat.com>
1136 * Makefile.in (SFILES): Add common/common-exceptions.c.
1137 (OBS): Add common-exceptions.o.
1138 (common-exceptions.o): New rule.
1139 * utils.c (prepare_to_throw_exception): New function.
1141 2014-08-29 Gary Benson <gbenson@redhat.com>
1143 * config.in: Regenerate.
1144 * configure: Likewise.
1146 2014-08-29 Gary Benson <gbenson@redhat.com>
1148 * Makefile.in (SFILES): Add common/cleanups.c.
1150 (cleanups.o): New rule.
1152 2014-08-29 Gary Benson <gbenson@redhat.com>
1154 * utils.c (internal_vwarning): New function.
1156 2014-08-28 Gary Benson <gbenson@redhat.com>
1158 * utils.h (fatal): Remove declaration.
1159 * utils.c (fatal): Remove function.
1161 2014-08-28 Gary Benson <gbenson@redhat.com>
1163 * tracepoint.c (gdb_agent_init): Replace fatal with
1165 (initialize_tracepoint): Likewise.
1167 2014-08-28 Gary Benson <gbenson@redhat.com>
1169 * remote-utils.c (remote_prepare): Replace fatal with error.
1171 2014-08-28 Gary Benson <gbenson@redhat.com>
1173 * linux-low.c (linux_async): Replace fatal with warning.
1175 (linux_start_non_stop): Return -1 if linux_async failed.
1177 2014-08-28 Gary Benson <gbenson@redhat.com>
1179 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1181 (i386_dr_low_get_addr): Remove vague comment.
1182 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1185 2014-08-28 Gary Benson <gbenson@redhat.com>
1187 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1188 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1190 (linux_resume_one_lwp): Likewise.
1191 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1193 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1194 with internal_error.
1195 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1196 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1197 (find_register_by_name): Replace fatal with internal_error.
1198 (find_regno): Likewise.
1199 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1200 * thread-db.c (thread_db_create_event): Likewise.
1201 (thread_db_load_search): Likewise.
1202 (try_thread_db_load_1): Likewise.
1203 * tracepoint.c (get_jump_space_head): Replace fatal with
1205 (claim_trampoline_space): Likewise.
1206 (have_fast_tracepoint_trampoline_buffer): Likewise.
1207 (cmd_qtstart): Likewise.
1208 (stop_tracing): Likewise.
1209 (fast_tracepoint_collecting): Likewise.
1210 (target_malloc): Likewise.
1211 (download_tracepoint): Likewise.
1212 (download_trace_state_variables): Replace check with gdb_assert.
1213 (upload_fast_traceframes): Replace fatal with internal_error.
1215 2014-08-19 Tom Tromey <tromey@redhat.com>
1216 Gary Benson <gbenson@redhat.com>
1218 * Makefile.in (SFILES): Add common/common-debug.c.
1219 (OBS): Add common-debug.o.
1220 (common-debug.o): New rule.
1221 * debug.h (debug_printf): Don't declare.
1222 * debug.c (debug_printf): Renamed and rewritten as...
1223 (debug_vprintf): New function.
1225 2014-08-19 Gary Benson <gbenson@redhat.com>
1227 * utils.h: Do not include print-utils.h.
1229 2014-08-19 Tom Tromey <tromey@redhat.com>
1230 Gary Benson <gbenson@redhat.com>
1232 * server.h: Add static assertion.
1233 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1235 2014-08-19 Tom Tromey <tromey@redhat.com>
1236 Gary Benson <gbenson@redhat.com>
1238 * Makefile.in (SFILES): Add common/errors.c.
1239 (OBS): Add errors.o.
1240 (IPA_OBS): Add errors-ipa.o.
1241 (errors.o): New rule.
1242 (errors-ipa.o): Likewise.
1243 * utils.h (perror_with_name, error, warning): Don't declare.
1244 * utils.c (warning): Renamed and rewritten as...
1245 (vwarning): New function.
1246 (error): Renamed and rewritten as...
1247 (verror): New function.
1248 (internal_error): Renamed and rewritten as...
1249 (internal_verror): New function.
1251 2014-08-07 Gary Benson <gbenson@redhat.com>
1253 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1254 * configure: Regenerate.
1255 * config.in: Likewise.
1256 * server.h: Do not include errno.h.
1257 * event-loop.c: Likewise.
1258 * hostio-errno.c: Likewise.
1259 * linux-low.c: Likewise.
1260 * remote-utils.c: Likewise.
1261 * spu-low.c: Likewise.
1262 * utils.c: Likewise.
1263 * gdbreplay.c: Unconditionally include errno.h.
1265 2014-08-07 Gary Benson <gbenson@redhat.com>
1267 * server.h: Do not include string.h.
1268 * event-loop.c: Likewise.
1269 * linux-low.c: Likewise.
1270 * regcache.c: Likewise.
1271 * remote-utils.c: Likewise.
1272 * spu-low.c: Likewise.
1273 * utils.c: Likewise.
1275 2014-08-07 Gary Benson <gbenson@redhat.com>
1277 * server.h: Do not include gdb_assert.h.
1279 2014-08-07 Gary Benson <gbenson@redhat.com>
1281 * server.h: Do not include common-utils.h.
1283 2014-08-07 Gary Benson <gbenson@redhat.com>
1285 * server.h: Do not include ptid.h.
1286 * notif.h: Likewise.
1288 2014-08-07 Gary Benson <gbenson@redhat.com>
1290 * server.h: Do not include gdb_locale.h.
1292 2014-08-07 Gary Benson <gbenson@redhat.com>
1294 * server.h: Do not include gdb/signals.h.
1295 * win32-low.c: Likewise.
1297 2014-08-07 Gary Benson <gbenson@redhat.com>
1299 * server.h: Do not include pathmax.h.
1301 2014-08-07 Gary Benson <gbenson@redhat.com>
1303 * server.h: Do not include libiberty.h.
1304 * linux-bfin-low.c: Likewise.
1306 2014-08-07 Gary Benson <gbenson@redhat.com>
1308 * server.h: Do not include ansidecl.h.
1310 2014-08-07 Gary Benson <gbenson@redhat.com>
1312 * linux-x86-low.c: Do not include stddef.h.
1313 * lynx-ppc-low.c: Likewise.
1314 * tracepoint.c: Likewise.
1316 2014-08-07 Gary Benson <gbenson@redhat.com>
1318 * server.h: Do not include stdarg.h.
1319 * nto-low.c: Likewise.
1321 2014-08-07 Gary Benson <gbenson@redhat.com>
1323 * server.h: Do not include stdlib.h.
1324 * inferiors.c: Likewise.
1325 * linux-low.c: Likewise.
1326 * regcache.c: Likewise.
1327 * spu-low.c: Likewise.
1328 * tracepoint.c: Likewise.
1329 * utils.c: Likewise.
1331 2014-08-07 Gary Benson <gbenson@redhat.com>
1333 * server.h: Do not include stdio.h.
1334 * linux-low.c: Likewise.
1335 * remote-utils.c: Likewise.
1336 * spu-low.c: Likewise.
1337 * utils.c: Likewise.
1338 * wincecompat.c: Likewise.
1340 2014-08-06 Gary Benson <gbenson@redhat.com>
1342 * regcache.c (init_register_cache): Move conditionals inside if.
1344 2014-08-06 Gary Benson <gbenson@redhat.com>
1346 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1348 2014-07-31 Gary Benson <gbenson@redhat.com>
1350 * ax.h: Do not include server.h.
1351 * gdbthread.h: Likewise.
1352 * lynx-low.h: Likewise.
1353 * notif.h: Likewise.
1355 2014-07-30 Gary Benson <gbenson@redhat.com>
1357 * server.h: Include common-defs.h.
1358 Do not include config.h or build-gnulib-gdbserver/config.h.
1360 2014-07-30 Gary Benson <gbenson@redhat.com>
1362 * hostio-errno.c: Move server.h to top of includes list.
1363 * inferiors.c: Likewise.
1364 * linux-x86-low.c: Likewise.
1365 * notif.c: Include server.h.
1367 2014-07-24 Tom Tromey <tromey@redhat.com>
1368 Gary Benson <gbenson@redhat.com>
1370 * server.h (CORE_ADDR): Now unsigned.
1372 2014-07-16 Pedro Alves <palves@redhat.com>
1374 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1376 2014-07-15 Pedro Alves <palves@redhat.com>
1378 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1381 2014-07-11 Pedro Alves <palves@redhat.com>
1383 * linux-low.c (kill_wait_lwp): New function, based on
1384 kill_one_lwp_callback, but use my_waitpid directly.
1385 (kill_one_lwp_callback, linux_kill): Use it.
1387 2014-06-23 Pedro Alves <palves@redhat.com>
1389 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1390 before setting DR0..DR3.
1392 2014-06-20 Gary Benson <gbenson@redhat.com>
1394 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1395 * configure: Regenerated.
1396 * config.in: Likewise.
1398 2014-06-20 Gary Benson <gbenson@redhat.com>
1400 * Makefile.in (SFILES): Update locations for files moved
1402 (object file files): Reordered.
1404 2014-06-20 Gary Benson <gbenson@redhat.com>
1406 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1407 (i386_dr_low_set_addr): Likewise.
1408 (i386_dr_low_get_addr): Likewise.
1409 (i386_dr_low_can_set_control): Likewise.
1410 (i386_dr_low_set_control): Likewise.
1411 (i386_dr_low_get_control): Likewise.
1412 (i386_dr_low_get_status): Likewise.
1413 (i386_get_debug_register_length): Likewise.
1414 * linux-x86-low.c (i386_dr_low_set_addr):
1415 Changed signature. Made static.
1416 (i386_dr_low_get_addr): Likewise.
1417 (i386_dr_low_set_control): Likewise.
1418 (i386_dr_low_get_control): Likewise.
1419 (i386_dr_low_get_status): Likewise.
1420 (i386_dr_low): New global variable.
1421 * win32-i386-low.c (i386_dr_low_set_addr):
1422 Changed signature. Made static.
1423 (i386_dr_low_get_addr): Likewise.
1424 (i386_dr_low_set_control): Likewise.
1425 (i386_dr_low_get_control): Likewise.
1426 (i386_dr_low_get_status): Likewise.
1427 (i386_dr_low): New global variable.
1429 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1431 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1432 * Makefile.in (AR, AR_FLAGS): Define.
1433 * configure: Regenerate.
1435 2014-06-19 Gary Benson <gbenson@redhat.com>
1437 * Makefile.in (i386-dregs.o): New rule.
1438 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1439 * i386-low.c (target.h): Remove include.
1440 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1441 (DR_CONTROL_SHIFT): Likewise.
1442 (DR_CONTROL_SIZE): Likewise.
1443 (DR_RW_EXECUTE): Likewise.
1444 (DR_RW_WRITE): Likewise.
1445 (DR_RW_READ): Likewise.
1446 (DR_RW_IORW): Likewise.
1447 (DR_LEN_1): Likewise.
1448 (DR_LEN_2): Likewise.
1449 (DR_LEN_4): Likewise.
1450 (DR_LEN_8): Likewise.
1451 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1452 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1453 (DR_ENABLE_SIZE): Likewise.
1454 (DR_LOCAL_SLOWDOWN): Likewise.
1455 (DR_GLOBAL_SLOWDOWN): Likewise.
1456 (DR_CONTROL_RESERVED): Likewise.
1457 (I386_DR_CONTROL_MASK): Likewise.
1458 (I386_DR_VACANT): Likewise.
1459 (I386_DR_LOCAL_ENABLE): Likewise.
1460 (I386_DR_GLOBAL_ENABLE): Likewise.
1461 (I386_DR_DISABLE): Likewise.
1462 (I386_DR_SET_RW_LEN): Likewise.
1463 (I386_DR_GET_RW_LEN): Likewise.
1464 (I386_DR_WATCH_HIT): Likewise.
1465 (i386_wp_op_t): Likewise.
1466 (i386_show_dr): Likewise.
1467 (i386_length_and_rw_bits): Likewise.
1468 (i386_insert_aligned_watchpoint): Likewise.
1469 (i386_remove_aligned_watchpoint): Likewise.
1470 (i386_handle_nonaligned_watchpoint): Likewise.
1471 i386_update_inferior_debug_regs(): Likewise.
1472 (i386_dr_insert_watchpoint): Likewise.
1473 (i386_dr_remove_watchpoint): Likewise.
1474 (i386_dr_region_ok_for_watchpoint): Likewise.
1475 (i386_dr_stopped_data_address): Likewise.
1476 (i386_dr_stopped_by_watchpoint): Likewise.
1478 2014-06-19 Gary Benson <gbenson@redhat.com>
1480 * i386-low.c (i386_dr_show): Renamed to
1481 i386_show_dr and made static. All uses updated.
1482 (i386_dr_length_and_rw_bits): Renamed to
1483 i386_length_and_rw_bits and made static.
1485 (i386_dr_insert_aligned_watchpoint): Renamed to
1486 i386_insert_aligned_watchpoint and made static.
1488 (i386_dr_remove_aligned_watchpoint): Renamed to
1489 i386_remove_aligned_watchpoint and made static.
1491 (i386_dr_update_inferior_debug_regs): Renamed to
1492 i386_update_inferior_debug_regs and made static.
1495 2014-06-18 Gary Benson <gbenson@redhat.com>
1497 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1498 (i386_dr_low_can_set_control): Likewise.
1499 (i386_get_debug_register_length): Likewise.
1500 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1501 (i386_dr_low_can_set_control): Likewise.
1502 (i386_get_debug_register_length): Likewise.
1504 2014-06-17 Gary Benson <gbenson@redhat.com>
1506 * i386-low.h (i386-dregs.h): New include.
1507 (DR_FIRSTADDR): Now in i386-dregs.h.
1508 (DR_LASTADDR): Likewise.
1509 (DR_NADDR): Likewise.
1510 (DR_STATUS): Likewise.
1511 (DR_CONTROL): Likewise.
1512 (i386_debug_reg_state): Likewise.
1513 (i386_dr_insert_watchpoint): Likewise.
1514 (i386_dr_remove_watchpoint): Likewise.
1515 (i386_dr_region_ok_for_watchpoint): Likewise.
1516 (i386_dr_stopped_data_address): Likewise.
1517 (i386_dr_stopped_by_watchpoint): Likewise.
1518 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1520 2014-06-18 Gary Benson <gbenson@redhat.com>
1522 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1523 i386_dr_insert_watchpoint.
1524 (i386_low_remove_watchpoint): Renamed to
1525 i386_dr_remove_watchpoint.
1526 (i386_low_region_ok_for_watchpoint): Renamed to
1527 i386_dr_region_ok_for_watchpoint.
1528 (i386_low_stopped_data_address): Renamed to
1529 i386_dr_stopped_data_address.
1530 (i386_low_stopped_by_watchpoint): Renamed to
1531 i386_dr_stopped_by_watchpoint.
1532 * i386-low.c (i386_show_dr): Renamed to
1533 i386_dr_show and made nonstatic. All uses updated.
1534 (i386_length_and_rw_bits): Renamed to
1535 i386_dr_length_and_rw_bits and made nonstatic.
1537 (i386_insert_aligned_watchpoint): Renamed to
1538 i386_dr_insert_aligned_watchpoint and made nonstatic.
1540 (i386_remove_aligned_watchpoint): Renamed to
1541 i386_dr_remove_aligned_watchpoint and made nonstatic.
1543 (i386_update_inferior_debug_regs): Renamed to
1544 i386_dr_update_inferior_debug_regs and made nonstatic.
1546 (i386_low_insert_watchpoint): Renamed to
1547 i386_dr_insert_watchpoint. All uses updated.
1548 (i386_low_remove_watchpoint): Renamed to
1549 i386_dr_remove_watchpoint. All uses updated.
1550 (i386_low_region_ok_for_watchpoint): Renamed to
1551 i386_dr_region_ok_for_watchpoint. All uses updated.
1552 (i386_low_stopped_data_address): Renamed to
1553 i386_dr_stopped_data_address. All uses updated.
1554 (i386_low_stopped_by_watchpoint): Renamed to
1555 i386_dr_stopped_by_watchpoint. All uses updated.
1557 2014-06-18 Gary Benson <gbenson@redhat.com>
1559 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1560 (i386_dr_low_can_set_control): Likewise.
1561 (i386_insert_aligned_watchpoint): New check.
1563 2014-06-18 Gary Benson <gbenson@redhat.com>
1565 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1568 2014-06-18 Gary Benson <gbenson@redhat.com>
1570 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1571 instead of fatal and error.
1572 (i386_handle_nonaligned_watchpoint): Likewise.
1574 2014-06-18 Gary Benson <gbenson@redhat.com>
1576 * i386-low.c (i386_get_debug_register_length): New macro.
1577 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1578 (i386_show_dr): Use debug_printf instead of fprintf. Use
1579 phex to format values.
1581 2014-06-18 Gary Benson <gbenson@redhat.com>
1583 * i386-low.h: Comment changes.
1584 * i386-low.c: Likewise.
1586 2014-06-18 Gary Benson <gbenson@redhat.com>
1588 * i386-low.c: Whitespace changes.
1590 2014-06-12 Tom Tromey <tromey@redhat.com>
1592 * utils.c (freeargv): Remove.
1594 2014-06-12 Tom Tromey <tromey@redhat.com>
1596 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1597 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1598 (parse_debug_format_options): Likewise.
1599 (gdbserver_usage): Likewise.
1600 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1601 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1602 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1604 ($(LIBGNU)): Depend on libiberty.
1605 (all-lib): Recurse into all subdirs.
1606 (install-only): Invoke "install" target in subdirs.
1607 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1609 * configure: Rebuild.
1610 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1611 for vasprintf, vsnprintf, or gettimeofday.
1612 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1615 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1617 * development.sh: Delete.
1618 * Makefile.in (config.status): Adjust dependency on development.sh.
1619 * configure.ac: Adjust development.sh source call.
1620 * configure: Regenerate.
1622 2014-06-02 Pedro Alves <palves@redhat.com>
1624 * ax.c (gdb_free_agent_expr): New function.
1625 * ax.h (gdb_free_agent_expr): New declaration.
1626 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1628 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1630 (clear_breakpoint_conditions_and_commands): New function.
1631 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1632 (clear_breakpoint_conditions_and_commands): New declaration.
1634 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1636 * linux-aarch64-low.c (asm/ptrace.h): Include.
1638 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1640 Fix TLS access for -static -pthread.
1641 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1642 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1643 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1645 2014-05-20 Pedro Alves <palves@redhat.com>
1647 * linux-aarch64-low.c (aarch64_insert_point)
1648 (aarch64_remove_point): No longer check whether the type is
1649 supported here. Adjust to new interface.
1650 (the_low_target): Install aarch64_supports_z_point_type as
1651 supports_z_point_type method.
1652 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1653 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1654 instead of a Z packet char. Adjust.
1655 (arm_supports_z_point_type): New function.
1656 (arm_insert_point, arm_remove_point): Adjust to new interface.
1657 (the_low_target): Install arm_supports_z_point_type.
1658 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1659 (cris_insert_point, cris_remove_point): Adjust to new interface.
1660 Don't check whether the type is supported here.
1661 (the_low_target): Install cris_supports_z_point_type.
1662 * linux-low.c (linux_supports_z_point_type): New function.
1663 (linux_insert_point, linux_remove_point): Adjust to new interface.
1664 * linux-low.h (struct linux_target_ops) <insert_point,
1665 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1666 raw_breakpoint pointer parameter.
1667 <supports_z_point_type>: New method.
1668 * linux-mips-low.c (mips_supports_z_point_type): New function.
1669 (mips_insert_point, mips_remove_point): Adjust to new interface.
1670 Use mips_supports_z_point_type.
1671 (the_low_target): Install mips_supports_z_point_type.
1672 * linux-ppc-low.c (the_low_target): Install NULL as
1673 supports_z_point_type method.
1674 * linux-s390-low.c (the_low_target): Install NULL as
1675 supports_z_point_type method.
1676 * linux-sparc-low.c (the_low_target): Install NULL as
1677 supports_z_point_type method.
1678 * linux-x86-low.c (x86_supports_z_point_type): New function.
1679 (x86_insert_point): Adjust to new insert_point interface. Use
1680 insert_memory_breakpoint. Adjust to new
1681 i386_low_insert_watchpoint interface.
1682 (x86_remove_point): Adjust to remove_point interface. Use
1683 remove_memory_breakpoint. Adjust to new
1684 i386_low_remove_watchpoint interface.
1685 (the_low_target): Install x86_supports_z_point_type.
1686 * lynx-low.c (lynx_target_ops): Install NULL as
1687 supports_z_point_type callback.
1688 * nto-low.c (nto_supports_z_point_type): New.
1689 (nto_insert_point, nto_remove_point): Adjust to new interface.
1690 (nto_target_ops): Install nto_supports_z_point_type.
1691 * mem-break.c: Adjust intro comment.
1692 (struct raw_breakpoint) <raw_type, size>: New fields.
1693 <inserted>: Update comment.
1694 <shlib_disabled>: Delete field.
1695 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1696 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1697 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1698 (raw_bkpt_type_to_target_hw_bp_type): New function.
1699 (find_enabled_raw_code_breakpoint_at): New function.
1700 (find_raw_breakpoint_at): New type and size parameters. Use them.
1701 (insert_memory_breakpoint): New function, based off
1702 set_raw_breakpoint_at.
1703 (remove_memory_breakpoint): New function.
1704 (set_raw_breakpoint_at): Reimplement.
1705 (set_breakpoint): New, based on set_breakpoint_at.
1706 (set_breakpoint_at): Reimplement.
1707 (delete_raw_breakpoint): Go through the_target->remove_point
1708 instead of assuming memory breakpoints.
1709 (find_gdb_breakpoint_at): Delete.
1710 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1711 (find_gdb_breakpoint): New function.
1712 (set_gdb_breakpoint_at): Delete.
1713 (z_type_supported): New function.
1714 (set_gdb_breakpoint_1): New function, loosely based off
1715 set_gdb_breakpoint_at.
1716 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1717 (delete_gdb_breakpoint_at): Delete.
1718 (delete_gdb_breakpoint_1): New function, loosely based off
1719 delete_gdb_breakpoint_at.
1720 (delete_gdb_breakpoint): New function.
1721 (clear_gdb_breakpoint_conditions): Rename to ...
1722 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1724 (add_condition_to_breakpoint): Make static.
1725 (add_breakpoint_condition): Take a struct breakpoint pointer
1726 instead of an address. Adjust.
1727 (gdb_condition_true_at_breakpoint): Rename to ...
1728 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1730 (gdb_condition_true_at_breakpoint): Reimplement.
1731 (add_breakpoint_commands): Take a struct breakpoint pointer
1732 instead of an address. Adjust.
1733 (gdb_no_commands_at_breakpoint): Rename to ...
1734 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1735 parameter. Return true if no breakpoint was found. Change debug
1737 (gdb_no_commands_at_breakpoint): Reimplement.
1738 (run_breakpoint_commands): Rename to ...
1739 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1740 and change return type to boolean.
1741 (run_breakpoint_commands): New function.
1742 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1743 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1744 breakpoint. Go through the_target->remove_point instead of
1745 assuming memory breakpoint.
1746 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1747 software and hardware breakpoints.
1748 (reinsert_raw_breakpoint): Go through the_target->insert_point
1749 instead of assuming memory breakpoint.
1750 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1751 software and hardware breakpoints.
1752 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1753 Check both software and hardware breakpoints.
1754 (validate_inserted_breakpoint): Assert the breakpoint is a
1755 software breakpoint. Set the inserted flag to -1 instead of
1756 setting shlib_disabled.
1757 (delete_disabled_breakpoints): Adjust.
1758 (validate_breakpoints): Only validate software breakpoints.
1759 Adjust to inserted flag change.
1760 (check_mem_read, check_mem_write): Skip breakpoint types other
1761 than software breakpoints. Adjust to inserted flag change.
1762 * mem-break.h (enum raw_bkpt_type): New enum.
1763 (raw_breakpoint, struct process_info): Forward declare.
1764 (Z_packet_to_target_hw_bp_type): Delete declaration.
1765 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1766 (set_gdb_breakpoint, delete_gdb_breakpoint)
1767 (clear_breakpoint_conditions): New declarations.
1768 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1769 (breakpoint_inserted_here): Update comment.
1770 (add_breakpoint_condition, add_breakpoint_commands): Replace
1771 address parameter with a breakpoint pointer parameter.
1772 (gdb_breakpoint_here): Update comment.
1773 (delete_gdb_breakpoint_at): Delete.
1774 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1775 * server.c (process_point_options): Take a struct breakpoint
1776 pointer instead of an address. Adjust.
1777 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1778 delete_gdb_breakpoint.
1779 * spu-low.c (spu_target_ops): Install NULL as
1780 supports_z_point_type method.
1781 * target.h: Include mem-break.h.
1782 (struct target_ops) <prepare_to_access_memory>: Update comment.
1783 <supports_z_point_type>: New field.
1784 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1785 instead of a char. Also take a raw breakpoint pointer.
1786 * win32-arm-low.c (the_low_target): Install NULL as
1787 supports_z_point_type.
1788 * win32-i386-low.c (i386_supports_z_point_type): New function.
1789 (i386_insert_point, i386_remove_point): Adjust to new interface.
1790 (the_low_target): Install i386_supports_z_point_type.
1791 * win32-low.c (win32_supports_z_point_type): New function.
1792 (win32_insert_point, win32_remove_point): Adjust to new interface.
1793 (win32_target_ops): Install win32_supports_z_point_type.
1794 * win32-low.h (struct win32_target_ops):
1795 <supports_z_point_type>: New method.
1796 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1797 instead of a char. Also take a raw breakpoint pointer.
1799 2014-05-20 Pedro Alves <palves@redhat.com>
1801 * mem-break.h: Include break-common.h.
1802 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1803 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1804 (Z_packet_to_target_hw_bp_type): New declaration.
1805 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1806 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1807 (Z_PACKET_ACCESS_WP): Delete macros.
1808 (Z_packet_to_hw_type): Delete function.
1809 * i386-low.h: Don't include break-common.h here.
1810 (Z_packet_to_hw_type): Delete declaration.
1811 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1812 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1813 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1814 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1815 * linux-aarch64-low.c: Don't include break-common.h here.
1816 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1817 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1818 (Z_packet_to_target_hw_bp_type): Delete function.
1819 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1821 (mips_insert_point, mips_remove_point): Use
1822 Z_packet_to_target_hw_bp_type.
1824 2014-05-20 Pedro Alves <palves@redhat.com>
1826 * linux-aarch64-low.c: Include break-common.h.
1827 (enum target_point_type): Delete.
1828 (Z_packet_to_point_type): Rename to ...
1829 (Z_packet_to_target_hw_bp_type): ... this, and return a
1830 target_hw_bp_type instead.
1831 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1832 instead of an enum target_point_type.
1833 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1835 (aarch64_dr_state_insert_one_point)
1836 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1837 (aarch64_handle_aligned_watchpoint)
1838 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1839 Take an enum target_hw_bp_type instead of an enum
1841 (aarch64_supports_z_point_type): New function.
1842 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1843 use Z_packet_to_target_hw_bp_type.
1845 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1847 * configure.ac: Only use -Werror by default when DEVELOPMENT
1849 * configure: Regenerate.
1851 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1853 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1854 * linux-x86-low.c (X86_64_USER_REGS): New.
1855 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1857 2014-04-28 Yao Qi <yao@codesourcery.com>
1859 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1862 2014-04-25 Pedro Alves <palves@redhat.com>
1865 * linux-low.c (linux_attach_fail_reason_string): New function.
1866 (linux_attach_lwp): Delete.
1867 (linux_attach_lwp_1): Rename to ...
1868 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1869 argument. Remove "initial" parameter. Return int instead of
1870 void. Don't error or warn here.
1871 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1872 failure to attach to the tgid. Call warning when failing to
1874 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1875 argument. Remove "initial" parameter. Return int instead of
1876 void. Don't error or warn here.
1877 (linux_attach_fail_reason_string): New declaration.
1878 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1879 interface change. Use linux_attach_fail_reason_string.
1881 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1882 Walfred Tedeschi <walfred.tedeschi@intel.com>
1884 * Makefile.in: Added rules to handle new files
1885 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1886 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1887 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1888 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1889 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1890 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1892 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1893 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1894 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1895 i386/x32-avx512.xml.
1896 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1897 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1898 i386/x32-avx512-linux.xml.
1899 * i387-fp.c (num_avx512_k_registers): New constant for number
1901 (num_avx512_zmmh_low_registers): New constant for number of
1902 lower ZMM registers (0-15).
1903 (num_avx512_zmmh_high_registers): New constant for number of
1904 higher ZMM registers (16-31).
1905 (num_avx512_ymmh_registers): New contant for number of higher
1906 YMM registers (ymm16-31 added by avx521 on x86_64).
1907 (num_avx512_xmm_registers): New constant for number of higher
1908 XMM registers (xmm16-31 added by AVX512 on x86_64).
1909 (struct i387_xsave): Add space for AVX512 registers.
1910 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1911 Add code to handle AVX512 registers.
1912 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1913 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1914 prototypei from generated file.
1915 (tdesc_amd64_avx512_linux): Likewise.
1916 (init_registers_x32_avx512_linux): Likewise.
1917 (tdesc_x32_avx512_linux): Likewise.
1918 (init_registers_i386_avx512_linux): Likewise.
1919 (tdesc_i386_avx512_linux): Likewise.
1920 (x86_64_regmap): Add AVX512 registers.
1921 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1923 (initialize_low_arch): Add code to initialize AVX512 registers.
1925 2014-04-23 Pedro Alves <palves@redhat.com>
1927 * mem-break.c (find_gdb_breakpoint_at): Make static.
1928 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1930 2014-04-23 Pedro Alves <palves@redhat.com>
1932 * i386-low.c: Don't include break-common.h here.
1933 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1934 prototype to take target_hw_bp_type as argument instead of a Z
1936 * i386-low.h: Include break-common.h here.
1937 (Z_packet_to_hw_type): Declare.
1938 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1940 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1941 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1942 (x86_remove_point): Convert the packet number to a
1943 target_hw_bp_type before calling i386_low_remove_watchpoint.
1944 * win32-i386-low.c (i386_insert_point): Convert the packet number
1945 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1946 (i386_remove_point): Convert the packet number to a
1947 target_hw_bp_type before calling i386_low_remove_watchpoint.
1949 2014-04-23 Pedro Alves <palves@redhat.com>
1951 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1953 2014-04-10 Pedro Alves <palves@redhat.com>
1955 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1956 Check if the condition or command is NULL before checking if the
1957 breakpoint is known. On success, return true.
1958 * mem-break.h (add_breakpoint_condition): Document return.
1959 (add_breakpoint_commands): Add describing comment.
1960 * server.c (skip_to_semicolon): New function.
1961 (process_point_options): Use it.
1963 2014-04-09 Pedro Alves <palves@redhat.com>
1965 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1968 2014-02-27 Pedro Alves <palves@redhat.com>
1971 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1973 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1975 (last_thread_of_process_p): Take a PID argument instead of a
1977 (linux_wait_for_lwp): Delete.
1978 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1980 (linux_low_filter_event): New function, party factored out from
1981 linux_wait_for_event.
1982 (linux_wait_for_event): Rename to ...
1983 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1984 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1985 sigsuspend. Check for zombie leaders.
1986 (linux_wait_for_event): Reimplement as wrapper around
1987 linux_wait_for_event_filtered.
1988 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1989 a normal or signal exit is seen, it's the whole process exiting.
1990 (wait_for_sigstop): No longer a for_each_inferior callback.
1991 Rewrite on top of linux_wait_for_event_filtered.
1992 (stop_all_lwps): Call wait_for_sigstop directly.
1993 * server.c (resume, handle_target_event): Handle
1994 TARGET_WAITKIND_NO_RESUMED.
1996 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1998 * win32-low.c (psapi_get_dll_name,
1999 * win32_CreateToolhelp32Snapshot): Delete.
2000 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2001 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2003 (handle_load_dll): Add function description.
2004 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2006 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2008 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2010 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2011 base address when calling win32_add_one_solib.
2012 (handle_load_dll): Delete local variable load_addr.
2013 Remove 0x1000 offset applied to DLL base address when calling
2014 win32_add_one_solib.
2015 (handle_unload_dll): Add comment.
2017 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2019 * win32-low.c (win32_add_all_dlls): Renames
2020 win32_ensure_ntdll_loaded. Rewrite function documentation.
2021 Adjust implementation to always load all DLLs.
2022 Add 0x1000 offset to DLL base address when calling
2023 win32_add_one_solib.
2024 (child_initialization_done): New static global.
2025 (do_initial_child_stuff): Set child_initialization_done to
2026 zero during child initialization, and 1 after. Replace call
2027 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2029 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2030 (handle_unload_dll): Add function documentation.
2031 (get_child_debug_event): Ignore load and unload DLL events
2032 during child initialization.
2034 2014-02-20 Doug Evans <dje@google.com>
2036 Remove global all_lwps.
2037 * inferiors.h (ptid_of): Move here from linux-low.h.
2038 (pid_of, lwpid_of): Ditto.
2039 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2040 parameter is a struct thread_info * now.
2041 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2042 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2043 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2045 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2046 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2047 * linux-arm-low.c (update_registers_callback): Update, "entry"
2048 parameter is a struct thread_info * now.
2049 Fetch lwpid from current_inferior directly.
2050 (arm_insert_point): Pass &all_threads to find_inferior instead of
2052 (arm_remove_point): Ditto.
2053 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2054 (arm_prepare_to_resume): Fetch pid from thread.
2055 (arm_read_description): Fetch lwpid from current_inferior directly.
2056 * linux-low.c (all_lwps): Delete.
2057 (delete_lwp): Delete call to remove_inferior.
2058 (handle_extended_wait): Fetch lwpid from thread.
2059 (add_lwp): Don't set lwp->entry.id. Remove call to
2060 add_inferior_to_list.
2061 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2062 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2063 (kill_one_lwp_callback): Ditto.
2064 (linux_kill): Don't dereference NULL pointer.
2065 Fetch ptid,lwpid from thread.
2066 (get_detach_signal): Fetch ptid from thread.
2067 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2068 Simplify call to regcache_invalidate_thread.
2069 (delete_lwp_callback): Update, "entry" parameter is a
2070 struct thread_info * now. Fetch pid from thread.
2071 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2072 (status_pending_p_callback): Update, "entry" parameter is a
2073 struct thread_info * now. Fetch ptid from thread.
2074 (find_lwp_pid): Update, "entry" parameter is a
2075 struct thread_info * now.
2076 (linux_wait_for_lwp): Fetch pid from thread.
2077 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2078 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2079 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2080 (dequeue_one_deferred_signal): Ditto.
2081 (cancel_breakpoint): Fetch ptid from current_inferior.
2082 (linux_wait_for_event): Pass &all_threads to find_inferior,
2083 not &all_lwps. Fetch ptid, lwpid from thread.
2084 (count_events_callback): Update, "entry" parameter is a
2085 struct thread_info * now.
2086 (select_singlestep_lwp_callback): Ditto.
2087 (select_event_lwp_callback): Ditto.
2088 (cancel_breakpoints_callback): Ditto.
2089 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2091 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2092 (unsuspend_one_lwp): Update, "entry" parameter is a
2093 struct thread_info * now.
2094 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2096 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2097 Fetch lwpid from thread, not lwp.
2098 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2099 Pass &all_threads to find_inferior, not &all_lwps.
2100 (send_sigstop): Fetch lwpid from thread, not lwp.
2101 (send_sigstop_callback): Update, "entry" parameter is a
2102 struct thread_info * now.
2103 (suspend_and_send_sigstop_callback): Ditto.
2104 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2105 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2106 struct thread_info * now.
2107 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2109 (lwp_running): Update, "entry" parameter is a
2110 struct thread_info * now.
2111 (stop_all_lwps): Fetch ptid from thread.
2112 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2113 (linux_resume_one_lwp): Fetch lwpid from thread.
2114 (linux_set_resume_request): Update, "entry" parameter is a
2115 struct thread_info * now. Fetch pid, lwpid from thread.
2116 (resume_status_pending_p): Update, "entry" parameter is a
2117 struct thread_info * now.
2118 (need_step_over_p): Ditto. Fetch lwpid from thread.
2119 (start_step_over): Fetch lwpid from thread.
2120 (linux_resume_one_thread): Update, "entry" parameter is a
2121 struct thread_info * now. Fetch lwpid from thread.
2122 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2123 (proceed_one_lwp): Update, "entry" parameter is a
2124 struct thread_info * now. Fetch lwpid from thread.
2125 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2126 struct thread_info * now.
2127 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2128 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2129 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2131 (regsets_store_inferior_registers): Ditto.
2132 (fetch_register, store_register): Ditto.
2133 (linux_read_memory, linux_write_memory): Ditto.
2134 (linux_request_interrupt): Ditto.
2135 (linux_read_auxv): Ditto.
2136 (linux_xfer_siginfo): Ditto.
2137 (linux_qxfer_spu): Ditto.
2138 (linux_qxfer_libraries_svr4): Ditto.
2139 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2140 moved to inferiors.h.
2142 (get_thread_lwp): Update.
2143 (struct lwp_info): Delete member "entry". Simplify comment for
2146 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2147 current_inferior directly.
2148 (update_watch_registers_callback): Update, "entry" parameter is a
2149 struct thread_info * now. Fetch pid from thread.
2150 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2151 (mips_insert_point): Fetch lwpid from current_inferior.
2152 Pass &all_threads to find_inferior, not &all_lwps.
2153 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2154 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2156 (mips_stopped_data_address): Ditto.
2157 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2159 * linux-tile-low.c (tile_arch_setup): Ditto.
2160 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2161 (update_debug_registers_callback): Update, "entry" parameter is a
2162 struct thread_info * now. Fetch pid from thread.
2163 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2164 Pass &all_threads to find_inferior, not &all_lwps.
2165 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2166 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2167 Pass &all_threads to find_inferior, not &all_lwps.
2168 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2169 (i386_dr_low_get_status): Ditto.
2170 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2171 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2172 (x86_linux_read_description): Ditto.
2173 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2175 2014-02-20 Doug Evans <dje@google.com>
2177 * inferiors.c (get_first_inferior): Fix buglet.
2179 2014-02-19 Doug Evans <dje@google.com>
2181 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2182 * inferiors.c (add_thread): Change result type to struct thread_info *.
2183 All callers updated.
2184 (add_lwp): Call add_thread here instead of in callers.
2185 All callers updated.
2186 * linux-low.h (get_lwp_thread): Rewrite.
2187 (struct lwp_info): New member "thread".
2189 2014-02-19 Doug Evans <dje@google.com>
2191 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2192 All callers updated.
2194 2014-02-19 Doug Evans <dje@google.com>
2196 * inferiors.c (add_thread): Fix whitespace.
2198 2014-02-19 Doug Evans <dje@google.com>
2200 * dll.c (clear_dlls): Replace accessing list implemention details
2202 * gdbthread.h (get_first_thread): Declare.
2203 * inferiors.c (for_each_inferior_with_data): New function.
2204 (get_first_thread): New function.
2205 (find_thread_ptid): Simplify.
2206 (get_first_inferior): New function.
2207 (clear_list): Delete.
2208 (one_inferior_p): New function.
2209 (clear_inferior_list): New function.
2210 (clear_inferiors): Update.
2211 * inferiors.h (for_each_inferior_with_data): Declare.
2212 (clear_inferior_list): Declare.
2213 (one_inferior_p): Declare.
2214 (get_first_inferior): Declare.
2215 * linux-low.c (linux_wait_for_event): Replace accessing list
2216 implemention details with API function.
2217 * server.c (target_running): Ditto.
2218 (accumulate_file_name_length): New function.
2219 (emit_dll_description): New function.
2220 (handle_qxfer_libraries): Replace accessing list implemention
2221 details with API function.
2222 (handle_qxfer_threads_worker): New function.
2223 (handle_qxfer_threads_proper): Replace accessing list implemention
2224 details with API function.
2225 (handle_query): Ditto.
2226 (visit_actioned_threads_callback_ftype): New typedef.
2227 (visit_actioned_threads_data): New struct.
2228 (visit_actioned_threads): Rewrite to be find_inferior callback.
2229 (resume): Call find_inferior.
2230 (handle_status): Replace accessing list implemention
2231 details with API function.
2232 (process_serial_event): Replace accessing list implemention details
2234 * target.c (set_desired_inferior): Replace accessing list implemention
2235 details with API function.
2236 * tracepoint.c (same_process_p): New function.
2237 (gdb_agent_about_to_close): Replace accessing list implemention
2238 details with API function.
2239 * win32-low.c (child_delete_thread): Replace accessing list
2240 implemention details with API function.
2241 (match_dll_by_basename): New function.
2242 (dll_is_loaded_by_basename): New function.
2243 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2244 details call to dll_is_loaded_by_basename.
2246 2014-02-19 Doug Evans <dje@google.com>
2248 * dll.h (struct dll_info): Add comment.
2249 * gdbthread.h (struct thread_info): Add comment.
2250 (current_ptid): Simplify.
2251 * inferiors.c (add_process): Update.
2252 (remove_process): Update.
2253 * inferiors.h (struct process_info): Rename member "head" to "entry".
2254 * linux-low.c (delete_lwp): Update.
2256 (last_thread_of_process_p): Update.
2257 (kill_one_lwp_callback, linux_kill): Update.
2258 (status_pending_p_callback): Update.
2259 (wait_for_sigstop): Update. Simplify read of ptid.
2260 (start_step_over): Update.
2261 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2262 (get_lwp_thread): Update.
2263 (struct lwp_info): Rename member "head" to "entry".
2264 * regcache.h (inferior_list_entry): Delete.
2265 * server.c (kill_inferior_callback): Update.
2266 (detach_or_kill_inferior_callback): Update.
2267 (print_started_pid): Update.
2268 (print_attached_pid): Update.
2269 (process_serial_event): Simplify read of ptid.
2270 * thread-db.c (thread_db_create_event): Update.
2271 (thread_db_get_tls_address): Update.
2272 * win32-low.c (current_inferior_ptid): Simplify.
2274 2014-02-19 Tom Tromey <tromey@redhat.com>
2276 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2278 (target_supports_btrace): Update.
2280 2014-02-14 Yao Qi <yao@codesourcery.com>
2282 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2283 (rsp-low-ipa.o): New target.
2285 2014-02-12 Tom Tromey <tromey@redhat.com>
2287 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2288 convert_ascii_to_int.
2289 * regcache.c (registers_to_string): Likewise.
2290 * remote-utils.c (decode_M_packet): Likewise.
2291 * server.c (process_serial_event): Likewise.
2293 2014-02-12 Tom Tromey <tromey@redhat.com>
2295 * server.c (handle_query, handle_v_run): Use hex2bin, not
2297 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2299 2014-02-12 Tom Tromey <tromey@redhat.com>
2301 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2302 convert_int_to_ascii.
2303 * regcache.c (registers_to_string, collect_register_as_string):
2305 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2307 * server.c (process_serial_event): Likewise.
2308 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2309 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2311 2014-02-12 Tom Tromey <tromey@redhat.com>
2313 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2314 bin2hex, not hexify.
2315 * tracepoint.c (cmd_qtstatus): Likewise.
2317 2014-02-12 Tom Tromey <tromey@redhat.com>
2319 * remote-utils.c (monitor_output): Pass explicit length to
2322 2014-02-12 Tom Tromey <tromey@redhat.com>
2324 * tracepoint.c: Include rsp-low.h.
2325 * server.c: Include rsp-low.h.
2326 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2327 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2329 * remote-utils.c: Include rsp-low.h.
2330 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2331 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2332 (convert_int_to_ascii, convert_ascii_to_int): Move to
2334 * regcache.c: Include rsp-low.h.
2335 * ax.c: Include rsp-low.h.
2336 * Makefile.in (SFILES): Add common/rsp-low.c.
2337 (OBS): Add rsp-low.o.
2338 (rsp-low.o): New target.
2340 2014-02-12 Tom Tromey <tromey@redhat.com>
2342 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2343 Include print-utils.h.
2344 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2345 (plongest, thirty_two, phex_nz): Remove.
2346 * Makefile.in (SFILES): Add common/print-utils.c.
2347 (OBS): Add print-utils.o.
2348 (print-utils-ipa.o): New target.
2349 (print-utils.o): New target.
2350 (IPA_OBJS): Add print-utils-ipa.o.
2352 2014-02-06 Tom Tromey <tromey@redhat.com>
2354 * Makefile.in (SFILES): Fix indentation.
2356 2014-02-05 Doug Evans <dje@google.com>
2358 * linux-low.c (linux_wait_for_event): Improve comment.
2359 (linux_wait_1): Keep current_inferior in sync with event_child.
2361 2014-01-22 Doug Evans <dje@google.com>
2363 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2365 2014-01-22 Doug Evans <dje@google.com>
2367 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2368 * configure: Regenerate.
2369 * config.in: Regenerate.
2370 * Makefile.in (SFILES): Add debug.c.
2372 * debug.c: New file.
2373 * debug.h: New file.
2374 * linux-aarch64-low.c (*): Update all debugging printfs to use
2375 debug_printf instead of fprintf.
2376 * linux-arm-low.c (*): Ditto.
2377 * linux-cris-low.c (*): Ditto.
2378 * linux-crisv32-low.c (*): Ditto.
2379 * linux-m32r-low.c (*): Ditto.
2380 * linux-sparc-low.c (*): Ditto.
2381 * linux-x86.c (*): Ditto.
2382 * linux-low.c (*): Ditto.
2383 (linux_wait_1): Add calls to debug_enter, debug_exit.
2384 (linux_wait): Remove redundant debugging printf.
2385 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2386 (linux_resume, unstop_all_lwps): Ditto.
2387 * mem-break.c (*): Update all debugging printfs to use
2388 debug_printf instead of fprintf.
2389 * remote-utils.c (*): Ditto.
2390 * thread-db.c (*): Ditto.
2391 * server.c #include <ctype.h>, "gdb_vecs.h".
2392 (debug_threads): Moved to debug.c.
2393 (*): Update all debugging printfs to use debug_printf instead of
2395 (start_inferior): Replace call to fflush with call to debug_flush.
2396 (monitor_show_help): Mention set debug-format.
2397 (parse_debug_format_options): New function.
2398 (handle_monitor_command): Handle "monitor set debug-format".
2399 (gdbserver_usage): Mention --debug-format.
2400 (main): Parse --debug-format.
2401 * server.h (debug_threads): Declaration moved to debug.h.
2403 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2404 trace_debug_1 that uses debug_printf.
2405 (tracepoint_look_up_symbols): Update all debugging printfs to use
2406 debug_printf instead of fprintf.
2408 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2410 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2413 2014-01-17 Pedro Alves <palves@redhat.com>
2416 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2417 defined after including gdb_proc_service.h.
2419 2014-01-16 Doug Evans <dje@google.com>
2421 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2422 (match_dll): Use it.
2424 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2426 * target.h (target_ops) <read_btrace>: Change parameters and
2427 return type to allow error reporting.
2428 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2429 trace reading errors on.
2430 * linux-low.c (linux_low_read_btrace): Pass trace reading
2432 (linux_low_disable_btrace): New.
2434 2014-01-15 Doug Evans <dje@google.com>
2436 * inferiors.c (thread_id_to_gdb_id): Delete.
2437 * inferiors.h (thread_id_to_gdb_id): Delete.
2439 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2441 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2442 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2445 2014-01-08 Pedro Alves <palves@redhat.com>
2447 * server.c (handle_status): Don't discard previous queued stop
2448 replies or thread's pending status here.
2449 (main) <disconnection>: Do it here instead.
2451 2014-01-08 Pedro Alves <palves@redhat.com>
2453 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2454 * server.c (visit_actioned_threads, handle_pending_status): New
2456 (handle_v_cont): Factor out parts to ...
2457 (resume): ... this new function. If in all-stop, and a thread
2458 being resumed has a pending status, report it without actually
2460 (myresume): Adjust to use the new 'resume' function.
2461 (clear_pending_status_callback, set_pending_status_callback)
2462 (find_status_pending_thread_callback): New functions.
2463 (handle_status): Handle the case of multiple threads having
2464 interesting statuses to report. Report threads' real last signal
2465 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2466 with an interesting thread to report the status for, instead of
2467 always reporting the status of the first thread.
2469 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2471 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2472 * gdbreplay.c (gdbreplay_version): Likewise.
2474 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2476 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2477 iov.iov_len with the real length in use.
2479 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2481 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2482 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2483 for all targets that use win32-low.c.
2484 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2485 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2487 2013-12-13 Pedro Alves <palves@redhat.com>
2489 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2490 if equal to TARGET_WAITKIND_LOADED.
2491 * win32-low.c (cached_status): New static global.
2492 (win32_wait): Add declaration.
2493 (do_initial_child_stuff): Flush all initial pending debug events
2494 up to the initial breakpoint.
2495 (win32_wait): If CACHED_STATUS was set, return that instead
2496 of doing a real wait. Remove the code resuming the execution
2497 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2498 during the initial phase. Also remove the code changing
2499 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2500 TARGET_WAITKIND_STOPPED.
2502 2013-12-11 Yao Qi <yao@codesourcery.com>
2504 * notif.c (handle_notif_ack): Return 0 if no notification
2507 2013-11-20 Doug Evans <dje@google.com>
2509 * linux-low.c (linux_set_resume_request): Fix comment.
2511 2013-11-20 Doug Evans <dje@google.com>
2513 * linux-low.c (resume_status_pending_p): Tweak comment.
2515 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2517 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2518 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2519 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2520 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2521 (srv_amd64_regobj): Add amd64-mpx.o.
2522 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2523 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2524 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2525 * i387-fp.c (num_pl_bnd_register) Added constant.
2526 (num_pl_bnd_cfg_registers) Added constant.
2527 (struct i387_xsave) Added reserved area and MPX fields.
2528 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2529 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2531 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2532 (init_registers_amd64_mpx_linux): Declare new function.
2533 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2534 (x86_64_regmap): Add MPX registers.
2535 (x86_linux_read_description): Add MPX case.
2536 (initialize_low_arch): Initialize MPX targets.
2538 2013-11-18 Tom Tromey <tromey@redhat.com>
2540 * configure: Rebuild.
2541 * configure.ac: Don't check for stdlib.h.
2542 * gdbreplay.c: Unconditionally include stdlib.h.
2544 2013-11-18 Tom Tromey <tromey@redhat.com>
2546 * config.in: Rebuild.
2547 * configure: Rebuild.
2548 * configure.ac: Don't use AC_HEADER_DIRENT.
2550 2013-11-18 Tom Tromey <tromey@redhat.com>
2552 * server.h: Don't check HAVE_STRING_H.
2553 * gdbreplay.c: Don't check HAVE_STRING_H.
2554 * configure: Rebuild.
2556 2013-11-18 Tom Tromey <tromey@redhat.com>
2558 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2561 2013-11-08 Tom Tromey <tromey@redhat.com>
2563 * configure, config.in: Rebuild.
2564 * configure.ac: Remove unused configury.
2566 2013-11-08 Tom Tromey <tromey@redhat.com>
2568 * acinclude.m4: Include common.m4, codeset.m4.
2569 * configure, config.in: Rebuild.
2570 * configure.ac: Use GDB_AC_COMMON.
2572 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2574 * linux-s390-low.c (HWCAP_S390_TE): New define.
2575 (s390_arch_setup): Consider the TE field in the HWCAP for
2576 determining 'have_regset_tdb'.
2578 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2581 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2584 2013-10-02 Pedro Alves <palves@redhat.com>
2586 * server.c (process_serial_event): Don't output "GDBserver
2587 exiting" if GDB is connected through stdio.
2588 * target.c (mywait): Likewise, be silent if GDB is connected
2591 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2593 * lynx-low.c (lynx_add_threads_after_attach): New function.
2594 (lynx_attach): Remove call to add_thread. Add call to
2595 lynx_add_threads_after_attach instead.
2597 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2599 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2600 * config.in, configure: Regenerated.
2602 2013-09-18 Yao Qi <yao@codesourcery.com>
2605 * server.c (start_inferior): Clear 'resume_info'.
2607 2013-09-16 Jiong Wang <jiwang@tilera.com>
2609 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2612 2013-09-16 Jiong Wang <jiwang@tilera.com>
2614 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2615 linux-tile-low.o to srv_tgtobj.
2617 2013-09-16 Will Newton <will.newton@linaro.org>
2619 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2622 2013-09-06 Pedro Alves <palves@redhat.com>
2624 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2625 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2626 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2627 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2628 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2629 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2631 2013-09-06 Pedro Alves <palves@redhat.com>
2633 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2634 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2636 2013-09-06 Pedro Alves <palves@redhat.com>
2638 * linux-amd64-ipa.c: Include tracepoint.h.
2639 * linux-i386-ipa.c: Include tracepoint.h.
2641 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2643 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2644 (ps_get_thread_area): New function.
2646 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2648 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2649 (initialize_low_arch): Call init_registers_crisv32 rather than
2650 init_register_crisv32.
2652 2013-09-05 Pedro Alves <palves@redhat.com>
2654 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2656 * hostio.h: ... this new file.
2657 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2658 win32-low.c: Include hostio.h.
2660 2013-09-05 Pedro Alves <palves@redhat.com>
2662 * server.h (gdb_client_data, handler_func, callback_handler_func)
2663 (delete_file_handler, add_file_handler, append_callback_event)
2664 (delete_callback_event, start_event_loop, initialize_event_loop):
2665 Move to event-loop.h and include it.
2666 * event-loop.h: New file.
2668 2013-09-05 Pedro Alves <palves@redhat.com>
2670 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2671 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2672 (loaded_dll, unloaded_dll): Move to ...
2673 * dll.h: ... this new file.
2674 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2676 2013-09-05 Pedro Alves <palves@redhat.com>
2678 * server.h (current_process, get_thread_process, all_processes)
2679 (add_inferior_to_list, for_each_inferior, current_inferior)
2680 (remove_inferior, add_process, remove_process, find_process_pid)
2681 (have_started_inferiors_p, have_attached_inferiors_p)
2682 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2683 (clear_inferiors, find_inferior, find_inferior_id)
2684 (inferior_target_data, set_inferior_target_data)
2685 (inferior_regcache_data, set_inferior_regcache_data): Move to
2686 inferiors.h, and include it.
2687 * inferiors.h: New file.
2689 2013-09-05 Pedro Alves <palves@redhat.com>
2691 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2695 2013-09-05 Pedro Alves <palves@redhat.com>
2697 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2699 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2700 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2701 (handle_tracepoint_general_set, handle_tracepoint_query)
2702 (tracepoint_finished_step, tracepoint_was_hit)
2703 (release_while_stepping_state_list, current_traceframe)
2704 (in_readonly_region, traceframe_read_mem)
2705 (fetch_traceframe_registers, traceframe_read_sdata)
2706 (traceframe_read_info, struct fast_tpoint_collect_status)
2707 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2708 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2709 (supply_fast_tracepoint_registers)
2710 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2711 (ipa_tdesc, claim_trampoline_space)
2712 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2713 (agent_mem_read, agent_get_trace_state_variable_value)
2714 (agent_set_trace_state_variable_value, agent_tsv_read)
2715 (agent_mem_read_string, get_raw_reg_func_addr)
2716 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2717 * tracepoint.h: ... this new file.
2719 2013-09-05 Pedro Alves <palves@redhat.com>
2721 * server.h (perror_with_name, error, fatal, warning, paddress)
2722 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2724 * utils.h: New file.
2726 2013-09-05 Pedro Alves <palves@redhat.com>
2728 * server.h (remote_debug, noack_mode, transport_is_reliable)
2729 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2730 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2731 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2732 (write_enn, initialize_async_io, enable_async_io)
2733 (disable_async_io, check_remote_input_interrupt_request)
2734 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2735 (dead_thread_notify, prepare_resume_reply)
2736 (decode_address_to_semicolon, decode_address, decode_m_packet)
2737 (decode_M_packet, decode_X_packet, decode_xfer_write)
2738 (decode_search_memory_packet, unhexify, hexify)
2739 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2740 (look_up_one_symbol, relocate_instruction)
2741 (monitor_output): Move to remote-utils.h, and include it.
2742 * remote-utils.h: New file.
2744 2013-09-05 Pedro Alves <palves@redhat.com>
2746 * server.h (_): Delete.
2748 2013-09-02 Pedro Alves <palves@redhat.com>
2750 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2751 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2753 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2755 2013-09-02 Pierre Muller <muller@sourceware.org>
2757 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2758 or WriteProcessMemory complete successfully and handle
2759 ERROR_PARTIAL_COPY error.
2761 2013-09-02 Pedro Alves <palves@redhat.com>
2763 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2764 error instead of EIO.
2766 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2769 * linux-low.c: Include filestuff.h.
2770 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2771 * lynx-low.c: Include filestuff.h.
2772 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2773 * server.c: Include filestuff.h.
2774 (main): Call notice_open_fds.
2775 * spu-low.c: Include filestuff.h.
2776 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2778 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2780 * Makefile.in: Explain why ../target and ../nat are not
2781 listed as include file search paths.
2782 (linux-waitpid.o): New object file rule.
2783 * configure.srv (srv_native_linux_obj): New variable.
2784 Replace all occurrences of linux native object files with
2785 $srv_native_linux_obj.
2786 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2787 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2788 (linux_enable_event_reporting): Remove declaration.
2789 (my_waitpid): Moved to common/linux-waitpid.c.
2790 (linux_wait_for_event): Pass ptid when calling
2791 linux_enable_event_reporting.
2792 (linux_supports_tracefork_flag): Remove.
2793 (linux_enable_event_reporting): Likewise.
2794 (linux_tracefork_grandchild): Remove.
2795 (STACK_SIZE): Moved to common/linux-ptrace.c.
2796 (linux_tracefork_child): Remove.
2797 (linux_test_for_tracefork): Remove.
2798 (linux_look_up_symbols): Call linux_supports_traceclone.
2799 (initialize_low): Remove call to linux_test_for_tracefork.
2800 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2801 common/linux-ptrace.h.
2802 (PTRACE_TYPE_ARG4): Likewise.
2803 Include linux-ptrace.h.
2805 2013-08-21 Pedro Alves <palves@redhat.com>
2807 * config.in: Renegerate.
2809 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2811 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2812 (SFILES): Remove $(srcdir)/common/target-common.c and
2813 add $(srcdir)/target/waitstatus.c.
2814 (OBS): Remove target-common.o and add waitstatus.o.
2815 (server_h): Remove $(srcdir)/../common/target-common.h and
2816 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2817 and $(srcdir)/../target/waitstatus.h.
2818 (target-common.o): Remove.
2819 (waitstatus.o): New target object file.
2820 * target.h: Do not include target-common.h and
2821 include target/resume.h, target/wait.h and
2822 target/waitstatus.h.
2824 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2826 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2827 to PTRACE_TYPE_ARG3.
2828 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2829 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2831 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2832 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2834 2013-07-27 Jie Zhang <jie@codesourcery.com>
2835 Daniel Jacobowitz <dan@codesourcery.com>
2836 Yao Qi <yao@codesourcery.com>
2838 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2839 (mips-linux-watch.o): New rule.
2840 (mips_linux_watch_h): New variable.
2841 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2843 * linux-mips-low.c: Include mips-linux-watch.h.
2844 (struct arch_process_info, struct arch_lwp_info): New.
2845 (update_watch_registers_callback): New function.
2846 (mips_linux_new_process, mips_linux_new_thread) New functions.
2847 (mips_linux_prepare_to_resume, mips_insert_point): New
2849 (mips_remove_point, mips_stopped_by_watchpoint): New
2851 (rsp_bp_type_to_target_hw_bp_type): New function.
2852 (mips_stopped_data_address): New function.
2853 (the_low_target): Add watchpoint support functions.
2855 2013-07-27 Yao Qi <yao@codesourcery.com>
2857 * i386-low.c: Include break-common.h.
2858 (enum target_hw_bp_type): Remove.
2860 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2862 * Makefile.in (SFILES): /common/target-common.c.
2863 (OBS): Add target-common.o.
2864 (server_h): Add $(srcdir)/../common/target-common.h.
2865 (target-common.o): New target.
2866 * server.c (queue_stop_reply_callback): Free
2867 status string after use.
2868 * target.c (target_waitstatus_to_string): Remove.
2869 * target.h: Include target-common.h.
2870 (resume_kind): Likewise.
2871 (target_waitkind): Likewise.
2872 (target_waitstatus): Likewise.
2873 (TARGET_WNOHANG): Likewise.
2875 2013-07-04 Yao Qi <yao@codesourcery.com>
2877 * Makefile.in (host_alias): Use @host_noncanonical@.
2878 (target_alias): Use @target_noncanonical@.
2879 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2880 ACX_NONCANONICAL_HOST.
2881 * configure: Regenerated.
2884 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2886 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2887 * configure: Rebuild.
2888 * Makefile.in (version_host, version_target): Get from configure.
2889 (version.c): Use $(version_host) and $(version_target).
2891 2013-07-03 Pedro Alves <palves@redhat.com>
2893 * Makefile.in (config.status): Depend on development.sh.
2894 * acinclude.m4: Include libmcheck.m4.
2895 * configure: Regenerate.
2897 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2899 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2900 attribute inside the parentheses.
2901 (winapi_DebugSetProcessKillOnExit): Ditto.
2902 (winapi_DebugBreakProcess): Ditto.
2903 (winapi_GenerateConsoleCtrlEvent): Ditto.
2905 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2907 * notif.h (notif_event): Add a dummy member to avoid compiler
2910 2013-07-01 Pedro Alves <palves@redhat.com>
2912 * hostio.c (HOSTIO_PATH_MAX): Define.
2913 (require_filename, handle_open, handle_unlink, handle_readlink):
2916 2013-07-01 Pedro Alves <palves@redhat.com>
2918 * server.h: Include "pathmax.h".
2919 * linux-low.c: Don't include sys/param.h.
2920 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2922 * win32-low.c: Don't include sys/param.h.
2923 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2925 2013-07-01 Pedro Alves <palves@redhat.com>
2927 * event-loop.c: Don't check HAVE_UNISTD_H before including
2929 * gdbreplay.c: Likewise.
2930 * remote-utils.c: Likewise.
2931 * server.c: Likewise.
2932 * configure.ac: Don't check for unistd.h.
2933 * configure: Regenerate.
2935 2013-06-28 Tom Tromey <tromey@redhat.com>
2937 * Makefile.in (version.c): Use version.in, not
2940 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2942 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2943 * configure: Rebuild.
2944 * Makefile.in (version_host, version_target): Get from configure.
2945 (version.c): Use $(version_host) and $(version_target).
2947 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2949 Fix trace-status to output user name without trailing colon.
2950 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2952 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2954 Fix trace-status to output proper start-time and stop-time.
2955 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2956 output start time and stop time in hex as gdb expects.
2958 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2960 * tracepoint.c (build_traceframe_info_xml): Output trace state
2961 variables present in the trace buffer.
2963 2013-06-24 Tom Tromey <tromey@redhat.com>
2965 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2967 (version.o): Remove.
2968 * gdbreplay.c: Include version.h.
2969 (version, host_name): Don't declare.
2970 * server.h: Include version.h.
2971 (version, host_name): Don't declare.
2973 2013-06-12 Pedro Alves <palves@redhat.com>
2975 * linux-x86-low.c (linux_is_elf64): Delete global.
2976 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2977 with local linux_pid_exe_is_elf_64_file use.
2979 2013-06-11 Pedro Alves <palves@redhat.com>
2981 * linux-low.c (regset_disabled, disable_regset): New functions.
2982 (regsets_fetch_inferior_registers)
2983 (regsets_store_inferior_registers): Use them.
2984 (initialize_regsets_info); Don't allocate the disabled_regsets
2986 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2989 2013-06-11 Pedro Alves <palves@redhat.com>
2991 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2994 2013-06-11 Pedro Alves <palves@redhat.com>
2996 * linux-x86-low.c (initialize_low_arch): Call
2997 init_registers_x32_avx_linux.
2999 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3001 Fix compatibility with Android Bionic.
3002 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3005 2013-06-07 Pedro Alves <palves@redhat.com>
3008 * Makefile.in (OBS): Add tdesc.o.
3009 (IPA_OBJS): Add tdesc-ipa.o.
3010 (tdesc-ipa.o): New rule.
3011 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3013 * linux-low.c (new_inferior): Delete.
3014 (disabled_regsets, num_regsets): Delete.
3015 (linux_add_process): Adjust to set the new per-process
3017 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3018 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3019 was a stop. When calling arch_setup, switch the current inferior
3020 to the thread that got an event.
3021 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3022 (regsets_fetch_inferior_registers)
3023 (regsets_store_inferior_registers): New regsets_info parameter.
3025 (linux_register_in_regsets): New regs_info parameter. Adjust to
3027 (register_addr, fetch_register, store_register): New usrregs_info
3028 parameter. Adjust to use it.
3029 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3030 parameter regs_info. Adjust to use it.
3031 (linux_fetch_registers): Get the current inferior's regs_info, and
3033 (linux_store_registers): Ditto.
3034 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3035 (initialize_low): Don't initialize the target_regsets here. Call
3036 initialize_low_arch.
3037 * linux-low.h (target_regsets): Delete declaration.
3038 (struct regsets_info): New.
3039 (struct usrregs_info): New.
3040 (struct regs_info): New.
3041 (struct process_info_private) <new_inferior>: New field.
3042 (struct linux_target_ops): Delete the num_regs, regmap, and
3043 regset_bitmap fields. New field regs_info.
3044 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3045 * i387-fp.c (num_xmm_registers): Delete.
3046 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3047 calls to new interface.
3048 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3049 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3050 Infer the number of xmm registers from the regcache's target
3052 * i387-fp.h (num_xmm_registers): Delete.
3053 * inferiors.c (add_thread): Don't install the thread's regcache
3055 * proc-service.c (gregset_info): Fetch the current inferior's
3056 regs_info. Adjust to use it.
3057 * regcache.c: Include tdesc.h.
3058 (register_bytes, reg_defs, num_registers)
3059 (gdbserver_expedite_regs): Delete.
3060 (get_thread_regcache): If the thread doesn't have a regcache yet,
3061 create one, instead of aborting gdbserver.
3062 (regcache_invalidate_one): Rename to ...
3063 (regcache_invalidate_thread): ... this.
3064 (regcache_invalidate_one): New.
3065 (regcache_invalidate): Only invalidate registers of the current
3067 (init_register_cache): Add target_desc parameter, and use it.
3068 (new_register_cache): Ditto. Assert the target description has a
3069 non zero registers_size.
3070 (regcache_cpy): Add assertions. Adjust.
3071 (realloc_register_cache, set_register_cache): Delete.
3072 (registers_to_string, registers_from_string): Adjust.
3073 (find_register_by_name, find_regno, find_register_by_number)
3074 (register_cache_size): Add target_desc parameter, and use it.
3075 (free_register_cache_thread, free_register_cache_thread_one)
3076 (regcache_release, register_cache_size): New.
3077 (register_size): Add target_desc parameter, and use it.
3078 (register_data, supply_register, supply_register_zeroed)
3079 (supply_regblock, supply_register_by_name, collect_register)
3080 (collect_register_as_string, collect_register_by_name): Adjust.
3081 * regcache.h (struct target_desc): Forward declare.
3082 (struct regcache) <tdesc>: New field.
3083 (init_register_cache, new_register_cache): Add target_desc
3085 (regcache_invalidate_thread): Declare.
3086 (regcache_invalidate_one): Delete declaration.
3087 (regcache_release): Declare.
3088 (find_register_by_number, register_cache_size, register_size)
3089 (find_regno): Add target_desc parameter.
3090 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3092 * remote-utils.c: Include tdesc.h.
3093 (outreg, prepare_resume_reply): Adjust.
3094 * server.c: Include tdesc.h.
3095 (gdbserver_xmltarget): Delete declaration.
3096 (get_features_xml, process_serial_event): Adjust.
3097 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3099 (struct process_info) <tdesc>: New field.
3100 (ipa_tdesc): Declare.
3101 * tdesc.c: New file.
3102 * tdesc.h: New file.
3103 * tracepoint.c: Include tdesc.h.
3104 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3105 (get_context_regcache): Adjust to pass ipa_tdesc down.
3106 (do_action_at_tracepoint): Adjust to get the register cache size
3107 from the context regcache's description.
3108 (traceframe_walk_blocks): Adjust to get the register cache size
3109 from the current trace frame's description.
3110 (traceframe_get_pc): Adjust to get current trace frame's
3111 description and pass it down.
3112 (gdb_collect): Adjust to get the register cache size from the
3114 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3115 (gdbserver_xmltarget): Delete.
3116 (initialize_low_tracepoint): Set the ipa's target description.
3117 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3118 (initialize_low_tracepoint): Set the ipa's target description.
3119 * linux-x86-low.c: Include tdesc.h.
3120 [__x86_64__] (is_64bit_tdesc): New.
3121 (ps_get_thread_area, x86_get_thread_area): Use it.
3122 (i386_cannot_store_register): Rename to ...
3123 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3124 (i386_cannot_fetch_register): Rename to ...
3125 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3126 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3128 (target_regsets): Rename to ...
3129 (x86_regsets): ... this.
3130 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3132 (x86_siginfo_fixup): Use is_64bit_tdesc.
3133 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3134 (tdesc_x32_avx_linux, tdesc_x32_linux)
3135 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3137 (x86_linux_update_xmltarget): Delete.
3138 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3139 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3140 (AMD64_LINUX_USER64_CS): New.
3141 (x86_linux_read_description): New, based on
3142 x86_linux_update_xmltarget.
3143 (same_process_callback): New.
3144 (x86_arch_setup_process_callback): New.
3145 (x86_linux_update_xmltarget): New.
3146 (x86_regsets_info): New.
3147 (amd64_linux_regs_info): New.
3148 (i386_linux_usrregs_info): New.
3149 (i386_linux_regs_info): New.
3150 (x86_linux_regs_info): New.
3151 (x86_arch_setup): Reimplement.
3152 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3153 (x86_emit_ops): Ditto.
3154 (the_low_target): Adjust. Install x86_linux_regs_info,
3155 x86_cannot_fetch_register, and x86_cannot_store_register.
3156 (initialize_low_arch): New.
3157 * linux-ia64-low.c (tdesc_ia64): Declare.
3158 (ia64_fetch_register): Adjust.
3159 (ia64_usrregs_info, regs_info): New globals.
3160 (ia64_regs_info): New function.
3161 (the_low_target): Adjust.
3162 (initialize_low_arch): New function.
3163 * linux-sparc-low.c (tdesc_sparc64): Declare.
3164 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3166 (sparc_arch_setup): New function.
3167 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3168 (the_low_target): Adjust.
3169 (initialize_low_arch): New function.
3170 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3171 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3172 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3173 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3174 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3175 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3176 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3177 (tdesc_powerpc_isa205_vsx64l): Declare.
3178 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3179 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3180 (ppc_set_pc, ppc_get_hwcap): Adjust.
3181 (ppc_usrregs_info): Forward declare.
3182 (!__powerpc64__) ppc_regmap_adjusted: New global.
3183 (ppc_arch_setup): Adjust to the current process'es target
3185 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3186 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3187 (ppc_store_evrregset): Adjust.
3188 (target_regsets): Rename to ...
3189 (ppc_regsets): ... this, and make static.
3190 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3191 (ppc_regs_info): New function.
3192 (the_low_target): Adjust.
3193 (initialize_low_arch): New function.
3194 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3195 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3196 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3197 (tdesc_s390x_linux64v2): Declare.
3198 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3199 (s390_fill_gregset, s390_store_last_break): Adjust.
3200 (target_regsets): Rename to ...
3201 (s390_regsets): ... this, and make static.
3202 (s390_get_pc, s390_set_pc): Adjust.
3203 (s390_get_hwcap): New target_desc parameter, and use it.
3204 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3205 (s390_arch_setup): Adjust to set the current process'es target
3206 description. Don't adjust the regmap.
3207 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3208 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3209 (regs_info_3264): New globals.
3210 (s390_regs_info): New function.
3211 (the_low_target): Adjust.
3212 (initialize_low_arch): New function.
3213 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3214 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3215 [__mips64] (init_registers_mips_linux)
3216 (init_registers_mips_dsp_linux): Delete defines.
3217 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3218 (have_dsp): New global.
3219 (mips_read_description): New, based on mips_arch_setup.
3220 (mips_arch_setup): Reimplement.
3221 (get_usrregs_info): New function.
3222 (mips_cannot_fetch_register, mips_cannot_store_register)
3223 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3224 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3225 (target_regsets): Rename to ...
3226 (mips_regsets): ... this, and make static.
3227 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3228 (dsp_regs_info, regs_info): New globals.
3229 (mips_regs_info): New function.
3230 (the_low_target): Adjust.
3231 (initialize_low_arch): New function.
3232 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3233 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3235 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3236 (arm_read_description): New, with bits factored from
3238 (arm_arch_setup): Reimplement.
3239 (target_regsets): Rename to ...
3240 (arm_regsets): ... this, and make static.
3241 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3242 (arm_regs_info): New function.
3243 (the_low_target): Adjust.
3244 (initialize_low_arch): New function.
3245 * linux-m68k-low.c (tdesc_m68k): Declare.
3246 (target_regsets): Rename to ...
3247 (m68k_regsets): ... this, and make static.
3248 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3249 (m68k_regs_info): New function.
3250 (m68k_arch_setup): New function.
3251 (the_low_target): Adjust.
3252 (initialize_low_arch): New function.
3253 * linux-sh-low.c (tdesc_sharch): Declare.
3254 (target_regsets): Rename to ...
3255 (sh_regsets): ... this, and make static.
3256 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3257 (sh_regs_info, sh_arch_setup): New functions.
3258 (the_low_target): Adjust.
3259 (initialize_low_arch): New function.
3260 * linux-bfin-low.c (tdesc_bfin): Declare.
3261 (bfin_arch_setup): New function.
3262 (bfin_usrregs_info, regs_info): New globals.
3263 (bfin_regs_info): New function.
3264 (the_low_target): Adjust.
3265 (initialize_low_arch): New function.
3266 * linux-cris-low.c (tdesc_cris): Declare.
3267 (cris_arch_setup): New function.
3268 (cris_usrregs_info, regs_info): New globals.
3269 (cris_regs_info): New function.
3270 (the_low_target): Adjust.
3271 (initialize_low_arch): New function.
3272 * linux-cris-low.c (tdesc_crisv32): Declare.
3273 (cris_arch_setup): New function.
3274 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3275 (cris_regs_info): New function.
3276 (the_low_target): Adjust.
3277 (initialize_low_arch): New function.
3278 * linux-m32r-low.c (tdesc_m32r): Declare.
3279 (m32r_arch_setup): New function.
3280 (m32r_usrregs_info, regs_info): New globals.
3281 (m32r_regs_info): Adjust.
3282 (initialize_low_arch): New function.
3283 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3284 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3285 (tic6x_usrregs_info): Forward declare.
3286 (tic6x_read_description): New function, based on ...
3287 (tic6x_arch_setup): ... this. Reimplement.
3288 (target_regsets): Rename to ...
3289 (tic6x_regsets): ... this, and make static.
3290 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3291 (tic6x_regs_info): New function.
3292 (the_low_target): Adjust.
3293 (initialize_low_arch): New function.
3294 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3295 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3296 (target_regsets): Rename to ...
3297 (xtensa_regsets): ... this, and make static.
3298 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3300 (xtensa_arch_setup, xtensa_regs_info): New functions.
3301 (the_low_target): Adjust.
3302 (initialize_low_arch): New function.
3303 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3304 (nios2_arch_setup): Set the current process'es tdesc.
3305 (target_regsets): Rename to ...
3306 (nios2_regsets): ... this.
3307 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3308 (nios2_regs_info): New function.
3309 (the_low_target): Adjust.
3310 (initialize_low_arch): New function.
3311 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3312 (aarch64_arch_setup): Set the current process'es tdesc.
3313 (target_regsets): Rename to ...
3314 (aarch64_regsets): ... this.
3315 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3316 (aarch64_regs_info): New function.
3317 (the_low_target): Adjust.
3318 (initialize_low_arch): New function.
3319 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3321 (target_regsets): Rename to ...
3322 (tile_regsets): ... this.
3323 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3324 (tile_regs_info): New function.
3325 (tile_arch_setup): Set the current process'es tdesc.
3326 (the_low_target): Adjust.
3327 (initialize_low_arch): New function.
3328 * spu-low.c (tdesc_spu): Declare.
3329 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3330 * win32-arm-low.c (tdesc_arm): Declare.
3331 (arm_arch_setup): New function.
3332 (the_low_target): Install arm_arch_setup instead of
3334 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3335 (init_windows_x86): Rename to ...
3336 (i386_arch_setup): ... this. Set `win32_tdesc'.
3337 (the_low_target): Adjust.
3338 * win32-low.c (win32_tdesc): New global.
3339 (child_add_thread): Don't create the thread cache here.
3340 (do_initial_child_stuff): Set the new process'es tdesc.
3341 * win32-low.h (struct target_desc): Forward declare.
3342 (win32_tdesc): Declare.
3343 * lynx-i386-low.c (tdesc_i386): Declare global.
3344 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3345 * lynx-low.c (lynx_tdesc): New global.
3346 (lynx_add_process): Set the new process'es tdesc.
3347 * lynx-low.h (struct target_desc): Forward declare.
3348 (lynx_tdesc): Declare global.
3349 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3350 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3351 * nto-low.c (nto_tdesc): New global.
3352 (do_attach): Set the new process'es tdesc.
3353 * nto-low.h (struct target_desc): Forward declare.
3354 (nto_tdesc): Declare.
3355 * nto-x86-low.c (tdesc_i386): Declare.
3356 (nto_x86_arch_setup): Set `nto_tdesc'.
3358 2013-06-04 Gary Benson <gbenson@redhat.com>
3360 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3361 to qSupported response when appropriate.
3362 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3363 with nonzero-length annex.
3364 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3365 arguments supplied in annex.
3367 2013-05-31 Doug Evans <dje@google.com>
3370 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3371 64 bits in 64-cross-32 environment.
3373 2013-05-28 Pedro Alves <palves@redhat.com>
3375 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3376 (aarch64-without-fpu.c): Delete rule.
3377 * configure.srv (aarch64*-*-linux*): Remove references to
3378 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3379 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3382 2013-05-24 Pedro Alves <palves@redhat.com>
3384 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3385 instead of strchr/decode_address. Error if the range isn't split
3386 with a ','. Don't assume there's be a ':' in the action.
3388 2013-05-23 Yao Qi <yao@codesourcery.com>
3389 Pedro Alves <palves@redhat.com>
3391 * linux-low.c (lwp_in_step_range): New function.
3392 (linux_wait_1): If the thread was range stepping and stopped
3393 outside the stepping range, report the stop to GDB. Otherwise,
3394 continue stepping. Add range stepping debug output.
3395 (linux_set_resume_request): Copy the step range from the resume
3397 (linux_supports_range_stepping): New.
3398 (linux_target_ops) <supports_range_stepping>: Set to
3399 linux_supports_range_stepping.
3400 * linux-low.h (struct linux_target_ops)
3401 <supports_range_stepping>: New field.
3402 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3403 * linux-x86-low.c (x86_supports_range_stepping): New.
3404 (the_low_target) <supports_range_stepping>: Set to
3405 x86_supports_range_stepping.
3406 * server.c (handle_v_cont): Handle 'r' action.
3407 (handle_v_requests): Append ";r" if the target supports range
3409 * target.h (struct thread_resume) <step_range_start,
3410 step_range_end>: New fields.
3411 (struct target_ops) <supports_range_stepping>:
3413 (target_supports_range_stepping): New macro.
3415 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3417 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3418 confusion in comment.
3420 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3422 * lynx-low.c (struct process_info_private): New type.
3423 (lynx_add_process): New function.
3424 (lynx_create_inferior, lynx_attach): Replace calls to
3425 add_process by calls to lynx_add_process.
3426 (lynx_resume): If PTID is null, then try using
3427 current_process()->private->last_wait_event_ptid.
3429 (lynx_clear_inferiors): Delete. The contents of that function
3430 has been inlined in lynx_mourn;
3431 (lynx_wait_1): Save the ptid in the process's private data.
3432 (lynx_mourn): Free the process' private data. Replace call
3433 to lynx_clear_inferiors by call to clear_inferiors.
3435 2013-05-17 Yao Qi <yao@codesourcery.com>
3437 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3440 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3442 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3443 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3444 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3445 PT_TEXT_END_ADDR guards. Update comments.
3446 (linux_target_op) <read_offsets>: Conditionally define to
3447 linux_read_offsets if the target is UCLIBC and if it defines
3448 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3450 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3451 Andrew Jenner <andrew@codesourcery.com>
3453 * Makefile.in (SFILES): Add linux-nios2-low.c.
3454 (clean): Add action to delete nios2-linux.c.
3455 (nios2-linux.c): New rule.
3456 * configure.srv: Add nios2*-*-linux*.
3457 * linux-nios2-low.c: New.
3459 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3461 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3463 2013-04-25 Hui Zhu <hui@codesourcery.com>
3466 * ax.c (ax_printf): Add fflush.
3468 2013-04-22 Tom Tromey <tromey@redhat.com>
3470 * Makefile.in (SFILES): Add filestuff.c.
3471 (OBS): Add filestuff.o.
3472 (filestuff.o): New target.
3473 * config.in, configure: Rebuild.
3474 * configure.ac: Check for fdwalk, pipe2.
3476 2013-04-17 Pedro Alves <palves@redhat.com>
3478 * configure.ac (USE_THREAD_DB): Delete variable.
3479 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3480 Don't AC_SUBST USE_THREAD_DB.
3481 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3482 * config.in, configure: Regenerate.
3484 2013-04-16 Pedro Alves <palves@redhat.com>
3486 * linux-low.h (struct lwp_info) <thread_known>: Move under
3487 the USE_THREAD_DB #ifdef.
3489 2013-04-16 Pedro Alves <palves@redhat.com>
3491 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3492 (linux-low.o): Delete rule.
3493 * linux-low.h: Always include "gdb_thread_db.h" instead of
3494 conditionally including thread_db.h.
3495 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3498 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3500 * Makefile.in (install-only): Fix make install regression.
3502 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3504 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3505 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3507 * gdbserver.1: Remove.
3509 2013-03-22 Pedro Alves <palves@redhat.com>
3511 * linux-low.c (handle_extended_wait): Don't call
3512 linux_enable_event_reporting.
3514 2013-03-15 Tony Theodore <tonyt@logyst.com>
3517 * Makefile.in (SHELL): Use @SHELL@.
3519 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3521 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3524 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3526 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3527 Remove extraneous NULL element.
3529 2013-03-13 Yao Qi <yao@codesourcery.com>
3531 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3532 'V' block in trace frame.
3534 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3536 * target.h (struct target_ops): Add btrace ops.
3537 (target_supports_btrace): New macro.
3538 (target_enable_btrace): New macro.
3539 (target_disable_btrace): New macro.
3540 (target_read_btrace): New macro.
3541 * gdbthread.h (struct thread_info): Add btrace field.
3542 * server.c: Include btrace-common.h.
3543 (handle_btrace_general_set): New function.
3544 (handle_btrace_enable): New function.
3545 (handle_btrace_disable): New function.
3546 (handle_general_set): Call handle_btrace_general_set.
3547 (handle_qxfer_btrace): New function.
3548 (struct qxfer qxfer_packets[]): Add btrace entry.
3549 * inferiors.c (remove_thread): Disable btrace.
3550 * linux-low: Include linux-btrace.h.
3551 (linux_low_enable_btrace): New function.
3552 (linux_low_read_btrace): New function.
3553 (linux_target_ops): Add btrace ops.
3554 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3555 Add srv_linux_btrace=yes.
3556 (x86_64-*-linux*): Add linux-btrace.o.
3557 Add srv_linux_btrace=yes.
3558 * configure.ac: Define HAVE_LINUX_BTRACE.
3559 * config.in: Regenerated.
3560 * configure: Regenerated.
3562 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3564 * server.c (handle_qxfer): Preserve error message if -3 is
3566 (qxfer): Document the -3 return value.
3568 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3570 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3571 (linux_btrace_h): New variable.
3572 (linux-btrace.o): New rule.
3574 2013-03-08 Stan Shebs <stan@codesourcery.com>
3575 Hafiz Abid Qadeer <abidh@codesourcery.com>
3577 * tracepoint.c (trace_buffer_size): New global.
3578 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3579 (init_trace_buffer): Change to one-argument function. Allocate
3580 trace buffer memory.
3581 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3582 handle QTBuffer:size packet.
3583 (cmd_bigqtbuffer_size): New function.
3584 (initialize_tracepoint): Call init_trace_buffer with
3585 DEFAULT_TRACE_BUFFER_SIZE.
3586 * server.c (handle_query): Add QTBuffer:size in the
3589 2013-03-07 Yao Qi <yao@codesourcery.com>
3591 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3592 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3594 (cmd_qtsp): Adjust condition. Do post increment.
3595 Set cur_action and cur_step_action back to 0.
3597 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3600 * linux-low.c (linux_write_memory): Return early success if LEN is
3603 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3605 * configure.srv: Add x86_64-*-cygwin* as target.
3607 2013-02-28 Tom Tromey <tromey@redhat.com>
3609 * configure.ac: Invoke AC_SYS_LARGEFILE.
3610 * configure, config.in: Rebuild.
3612 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3614 * win32-low.c: Throughout, fix format strings and casts of
3615 printf-like functions to avoid type related warnings on all
3617 (get_child_debug_event): Print dwDebugEventCode as hex since
3618 that's how it's usually documented.
3620 2013-02-28 Yao Qi <yao@codesourcery.com>
3622 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3625 2013-02-27 Jiong Wang <jiwang@tilera.com>
3627 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3628 (reg-tilegx32.c): New rule.
3629 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3630 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3631 different register info initializer according to elf class.
3632 (init_registers_tilgx32): New function. The tilegx32 register info
3634 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3635 (tile_store_gregset): Likewise.
3637 2013-02-27 Yao Qi <yao@codesourcery.com>
3639 * server.c (process_point_options): Print debug message when
3640 debug_threads is true.
3642 2013-02-26 Yao Qi <yao@codesourcery.com>
3644 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3646 2013-02-19 Pedro Alves <palves@redhat.com>
3647 Kai Tietz <ktietz@redhat.com>
3651 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3652 instead of strtoul to extract address from packet.
3653 (process_serial_event) <'z'>: Likewise.
3655 2013-02-18 Yao Qi <yao@codesourcery.com>
3657 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3659 2013-02-14 Pedro Alves <palves@redhat.com>
3663 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3664 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3666 2013-02-14 Pedro Alves <palves@redhat.com>
3668 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3670 2013-02-14 Pedro Alves <palves@redhat.com>
3672 * tracepoint.c (save_string): Delete.
3673 (add_tracepoint_action): Use savestring instead of save_string.
3675 2013-02-12 Pedro Alves <palves@redhat.com>
3677 * linux-xtensa-low.c: Ditto.
3678 * xtensa-xtregs.c: Ditto.
3680 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3682 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3685 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3687 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3688 aarch64_num_wp_regs and aarch64_num_bp_regs to
3689 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3691 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3693 * linux-aarch64-low.c (ps_get_thread_area): Replace
3694 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3696 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3697 Marcus Shawcroft <marcus.shawcroft@arm.com>
3698 Nigel Stephens <nigel.stephens@arm.com>
3699 Yufeng Zhang <yufeng.zhang@arm.com>
3701 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3702 (aarch64.c, aarch64-without-fpu.c): New targets.
3703 * configure.srv (aarch64*-*-linux*): New.
3704 * linux-aarch64-low.c: New file.
3706 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3708 * linux-low.c (handle_extended_wait, linux_create_inferior)
3709 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3710 (dequeue_one_deferred_signal, linux_resume_one_thread)
3711 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3712 (linux_tracefork_grandchild, linux_test_for_tracefork)
3713 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3714 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3715 where the argument is 0.
3717 2013-01-25 Yao Qi <yao@codesourcery.com>
3719 * event-loop.c: Include "queue.h".
3720 (gdb_event_p): New typedef.
3721 (struct gdb_event) <next_event>: Remove.
3722 (event_queue): Change to QUEUE(gdb_event_p).
3723 (async_queue_event): Remove.
3724 (gdb_event_xfree): New.
3725 (initialize_event_loop): New.
3726 (process_event): Use API from QUEUE.
3727 (wait_for_event): Likewise.
3728 * server.c (main): Call initialize_event_loop.
3729 * server.h (initialize_event_loop): Declare.
3731 2013-01-18 Yao Qi <yao@codesourcery.com>
3733 * ax.h (struct eval_agent_expr_context): New.
3734 (gdb_eval_agent_expr): Update declaration.
3735 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3736 TFRAME. Add new argument CTX.
3737 * server.h (struct eval_agent_expr_context): Declare.
3738 (agent_mem_read, agent_tsv_read): Update declaration.
3739 (agent_mem_read_string): Likewise.
3740 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3741 (add_traceframe_block): Add new argument TPOINT.
3742 Increase TPOINT->traceframe_usage.
3743 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3744 eval_tracepoint_agent_expr.
3745 (condition_true_at_tracepoint): Likewise.
3746 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3747 (agent_mem_read_string, agent_tsv_read): Likewise.
3749 2013-01-16 Yao Qi <yao@codesourcery.com>
3751 * linux-low.c (linux_resume_one_lwp): Don't check
3752 'lwp->bp_reinsert != 0'.
3754 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3755 Pedro Alves <palves@redhat.com>
3757 * lynx-low.c (ptrace_request_to_str): Define a temporary
3758 macro and use it to simplify this function's implementation.
3760 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3762 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3765 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3767 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3769 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3771 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3773 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3775 * lynx-low.c (lynx_resume): Use the resume_info parameter
3776 to determine the ptid for the lynx_ptrace call, unless
3777 it is equal to minus_one_ptid, in which case we use the
3778 ptid of the current_inferior.
3779 (lynx_wait_1): After having received a thread create/exit
3780 event, resume the inferior's execution using the signaling
3781 thread's ptid, rather than the old ptid.
3783 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3785 * lynx-low.c (lynx_resume): Delete variable ret.
3787 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3789 * gdbreplay.c (gdbreplay_version): Update copyright year.
3790 * server.c (gdbserver_version): Likewise.
3792 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3794 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3797 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3799 * lynx-low.c (ptrace_request_to_str): Add handling for
3802 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3804 * lynx-low.c (lynx_attach): Delete variable new_process.
3806 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3808 * lynx-low.c (lynx_create_inferior): Delete variable
3811 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3813 * lynx-low.c (ptrace_request_to_str): Do not handle
3814 PTRACE_GETTHREADLIST if this macro does not exist.
3816 2012-12-15 Yao Qi <yao@codesourcery.com>
3818 * Makefile.in (OBS): Add notif.o.
3819 * notif.c, notif.h: New.
3820 * server.c: Include "notif.h".
3821 (struct vstop_notif) <next>: Remove.
3823 (queue_stop_reply): Update.
3824 (push_event, send_next_stop_reply): Remove.
3825 (discard_queued_stop_replies): Update.
3826 (notif_stop): New variable.
3827 (handle_v_stopped): Remove.
3828 (handle_v_requests): Don't call handle_v_stopped. Call
3829 handle_ack_notif instead.
3830 (queue_stop_reply_callback): Call notif_event_enque instead
3831 of queue_stop_reply.
3832 (handle_status): Don't call send_next_stop_reply, call
3833 notif_write_event instead.
3834 (kill_inferior_callback): Likewise.
3835 (detach_or_kill_inferior_callback): Likewise.
3836 (main): Call initialize_notif.
3837 (process_serial_event): Call QUEUE_is_empty.
3838 (handle_target_event): Call notif_push instead of push event.
3839 * server.h (push_event): Remove declaration.
3841 2012-12-10 Tom Tromey <tromey@redhat.com>
3843 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3844 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3847 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3848 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3849 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3850 (amd64-linux-ipa.o, ax.o): Rewrite.
3851 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3852 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3853 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3854 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3855 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3856 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3857 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3858 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3859 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3860 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3861 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3862 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3863 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3864 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3865 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3866 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3867 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3868 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3869 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3870 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3871 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3872 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3873 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3874 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3875 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3876 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3877 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3878 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3879 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3880 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3881 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3882 (reg-tilegx.o): Remove.
3883 (all_object_files): New macro.
3884 Include .deps files.
3885 * aclocal.m4, configure: Rebuild.
3886 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3887 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3888 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3890 2012-12-05 Tom Tromey <tromey@redhat.com>
3893 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3895 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3897 * configure.ac: Check for linux/perf_event.h.
3898 * config.in: Regenerated.
3899 * configure: Regenerated.
3901 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3903 * hostio.c (handle_readlink): Decrease buffer size
3904 parameter passed to readlink by one byte.
3906 2012-11-26 Yao Qi <yao@codesourcery.com>
3908 * configure.ac (build_warnings): Append '-Wempty-body'.
3909 * configure: Regenerated.
3910 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3913 2012-11-15 Pierre Muller <muller@sourceware.org>
3915 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3916 * config.in: Regenerate.
3917 * configure: Regenerate.
3918 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3919 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3920 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3921 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3923 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3924 instead of <sys/wait.h> header.
3925 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3927 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3929 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3930 (various make rules): Remove -DGDBSERVER
3932 2012-11-09 Yao Qi <yao@codesourcery.com>
3934 * spu-low.c (current_ptid): Move it to ..
3935 * gdbthread.h: ... here. New.
3936 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3937 * server.c (myresume, process_serial_event): Likewise.
3938 * thread-db.c (thread_db_find_new_threads): Likewise.
3939 * tracepoint.c (run_inferior_command): Likewise.
3941 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3943 * server.c (handle_search_memory_1): Include access length in
3946 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3948 * linux-crisv32-low.c: Fix compile errors.
3950 2012-09-04 Yao Qi <yao@codesourcery.com>
3952 * tracepoint.c (cmd_qtsv): Adjust debug message.
3953 Don't check CUR_TPOINT.
3955 2012-08-28 Yao Qi <yao@codesourcery.com>
3957 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3958 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3959 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3960 Remove declarations of xmalloc, xreallloc, xstrdup and
3962 * Makefile.in (libiberty_h): New.
3963 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3964 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3966 2012-08-23 Yao Qi <yao@codesourcery.com>
3968 * server.h: Remove declaration of 'xsnprintf'.
3970 2012-08-22 Keith Seitz <keiths@redhat.com>
3972 * server.h: Include build-gnulib-gbserver/config.h.
3973 * gdbreplay.c: Likewise.
3975 2012-08-08 Doug Evans <dje@google.com>
3977 * Makefile.in (SFILES): Add gdb_vecs.c.
3978 (OBS): Add gdb_vecs.o.
3979 (gdb_vecs_h, host_defs_h): New variables.
3980 (thread-db.o): Add $(gdb_vecs_h) dependency.
3981 (gdb_vecs.o): New rule.
3982 * thread-db.c: #include "gdb_vecs.h".
3983 (thread_db_load_search): Use a vector to iterate over path elements.
3984 Handle text appearing after "$pdir".
3986 * configure.ac: Add check for strstr.
3987 * config.in: Regenerate.
3988 * configure: Regenerate.
3990 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3992 * hostio.c (handle_pread): If pread fails, fall back to attempting
3994 (handle_pwrite): Likewise for pwrite.
3996 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3998 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3999 between unsupported TYPE and unimplementable ADDR/LEN combination.
4000 (arm_insert_point): Act on new return value.
4002 2012-07-31 Pedro Alves <palves@redhat.com>
4004 * server.c (process_point_options): Only skip tokens if we find
4005 one that is unrecognized. Don't treat 'X' specially while
4006 skipping unrecognized tokens.
4008 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4010 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4011 to 4-byte-align HW breakpoint addresses for Thumb.
4013 2012-07-27 Yao Qi <yao@codesourcery.com>
4017 * server.h: Declare gdb_agent_about_to_close.
4018 * target.c (kill_inferior): Include "agent.h".
4019 New. Send command 'kill'.
4020 * target.h (kill_inferior): Removed macro.
4021 * tracepoint.c (gdb_agent_about_to_close): New.
4022 (gdb_agent_helper_thread): Handle command 'close'.
4023 Wait endlessly until the inferior stops.
4024 Install gdb_agent_remove_socket to atexit hook.
4025 (agent_socket_name): New static variable.
4026 (gdb_agent_socket_init): Replace local variable 'name' with
4027 'agent_socket_name'.
4028 (gdb_agent_remove_socket): New.
4030 2012-07-27 Yao Qi <yao@codesourcery.com>
4032 * server.c (process_point_options): Stop at 'X' when parsing.
4034 2012-07-19 Michael Eager <eager@eagercon.com>
4036 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4038 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4039 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4040 hardware breakpoint.
4042 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4044 * gdbserver/linux-low.c (initialize_low): Call
4045 linux_ptrace_init_warnings.
4047 2012-07-02 Doug Evans <dje@google.com>
4049 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4052 2012-07-02 Stan Shebs <stan@codesourcery.com>
4054 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4055 (ax.o): Add it to build rule.
4057 (OBS): Add format.o.
4058 (IPA_OBS): Add format.o.
4059 * server.c (handle_query): Claim support for breakpoint commands.
4060 (process_point_options): Add command case.
4061 (process_serial_event): Leave running if there are printfs in
4063 * mem-break.h (any_persistent_commands): Declare.
4064 (add_breakpoint_commands): Declare.
4065 (gdb_no_commands_at_breakpoint): Declare.
4066 (run_breakpoint_commands): Declare.
4067 * mem-break.c (struct point_command_list): New struct.
4068 (struct breakpoint): New field command_list.
4069 (any_persistent_commands): New function.
4070 (add_commands_to_breakpoint): New function.
4071 (add_breakpoint_commands): New function.
4072 (gdb_no_commands_at_breakpoint): New function.
4073 (run_breakpoint_commands): New function.
4074 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4076 * ax.c: Include format.h.
4077 (ax_printf): New function.
4078 (gdb_eval_agent_expr): Add printf opcode.
4080 2012-06-13 Yao Qi <yao@codesourcery.com>
4082 * server.c (start_inferior): Remove duplicated writes to fields
4083 'last_resume_kind' and 'last_status' of 'current_inferior'.
4085 2012-06-12 Yao Qi <yao@codesourcery.com>
4086 Pedro Alves <palves@redhat.com>
4088 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4090 * server.c (handle_v_cont): Extend comment.
4092 2012-06-11 Yao Qi <yao@codesourcery.com>
4094 * linux-low.c (linux_attach): Add 'static'.
4096 2012-06-06 Yao Qi <yao@codesourcery.com>
4098 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4100 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4102 Fix gcc -flto compilation warning.
4103 * server.c (main): Make variable multi_mode and attach volatile.
4105 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4107 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4108 if the platform doesn't know about it.
4110 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4112 * Makefile.in (SFILES): Add linux-tile-low.c.
4113 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4114 * configure.srv: Handle tilegx-*-linux*.
4115 * linux-tile-low.c: New file.
4117 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4119 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4121 2012-05-24 Pedro Alves <palves@redhat.com>
4125 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4127 2012-05-24 Pedro Alves <palves@redhat.com>
4131 Replace target_signal with gdb_signal throughout.
4133 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4135 * linux-low.c (linux_store_registers): Avoid the copying sequence
4136 when no data has been retrieved by ptrace.
4138 2012-05-22 Will Deacon <will.deacon@arm.com>
4140 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4141 Include asm/ptrace.h.
4142 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4145 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4147 * linux-low.c (linux_store_registers): Don't re-retrieve data
4148 with ptrace that has already been obtained from /proc. Always
4149 copy any data retrieved with ptrace to the buffer supplied.
4151 2012-05-11 Yao Qi <yao@codesourcery.com>
4152 Pedro Alves <palves@redhat.com>
4154 * linux-low.c (enum stopping_threads_kind): New.
4155 (stopping_threads): Change type to `enum stopping_threads_kind'.
4156 (handle_extended_wait): If stopping and suspending threads, leave
4157 the new_lwp suspended too.
4158 (linux_wait_for_event): Adjust.
4159 (stop_all_lwps): Set `stopping_threads' to
4160 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4161 whether we're suspending threads or just stopping them. Assert no
4164 2012-04-29 Yao Qi <yao@codesourcery.com>
4166 * server.h: Move some code to ...
4167 * gdbthread.h: ... here. New.
4168 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4169 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4170 (nto-low.o, win32-low.o): Likewise.
4171 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4172 * regcache.c, remote-utils.c, server.c: Likewise.
4173 * target.c, tracepoint.c, win32-low.c: Likewise.
4175 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4177 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4178 (PTRACE_ARG4_TYPE): Likewise.
4179 (PTRACE_XFER_TYPE): Likewise.
4180 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4181 ptrace to PTRACE_ARG3_TYPE.
4182 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4183 (PTRACE_ARG4_TYPE): Likewise.
4184 (PTRACE_XFER_TYPE): Likewise.
4185 (linux_detach_one_lwp): Cast fourth argument of
4186 ptrace to long then PTRACE_ARG4_TYPE.
4187 (regsets_fetch_inferior_registers): Cast third argument of
4188 ptrace to long then PTRACE_ARG3_TYPE.
4189 (regsets_store_inferior_registers): Likewise.
4191 2012-04-20 Pedro Alves <palves@redhat.com>
4193 * configure: Regenerate.
4195 2012-04-19 Pedro Alves <palves@redhat.com>
4197 * Makefile.in (GNULIB_BUILDDIR): New.
4198 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4199 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4200 (all, install-only, uninstall, clean-info, all-lib, clean): No
4201 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4202 (maintainer-clean realclean distclean): Use subdir_do.
4204 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4205 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4206 * acinclude.m4: Include acx_configure_dir.m4.
4207 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4208 calls. Call AC_PROG_RANLIB. Configure gnulib using
4211 (GNULIB_STDINT_H): Adjust.
4212 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4213 * gdbreplay.c: Include build-gnulib/config.h.
4214 * server.h: Likewise.
4215 * aclocal.m4: Regenerate.
4216 * config.in: Regenerate.
4217 * configure: Regenerate.
4219 2012-04-19 Pedro Alves <palves@redhat.com>
4221 * Makefile.in (LIBGNU, INCGNU): Adjust.
4222 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4223 (all, install-only, uninstall, clean-info, all-lib, clean)
4224 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4225 * configure.ac: Adjust AC_OUTPUT output.
4226 * aclocal.m4: Regenerate.
4227 * configure: Regenerate.
4229 2012-04-19 Pedro Alves <palves@redhat.com>
4231 * Makefile.in (generated_files): New.
4232 (server_h): Remove the explicit dependency on config.h, and depend
4233 on $generated_files.
4235 2012-04-19 Pedro Alves <palves@redhat.com>
4237 * Makefile.in (INCGNU): Add -Ignulib.
4239 2012-04-19 Pedro Alves <palves@redhat.com>
4241 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4242 (INCGNU): ... this, and spell out -I here.
4243 (GNULIB_LIB): Rename to ...
4245 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4247 2012-04-19 Pedro Alves <palves@redhat.com>
4249 * config.in: Regenerate.
4251 2012-04-19 Pedro Alves <palves@redhat.com>
4253 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4254 * server.h (memmem): Remove declaration.
4255 * config.in: Regenerate.
4256 * configure: Regenerate.
4258 2012-04-19 Yao Qi <yao@codesourcery.com>
4260 * Makefile.in (SFILES): Add common/vec.c.
4264 2012-04-19 Yao Qi <yao@codesourcery.com>
4266 * remote-utils.c (prepare_resume_reply): Replace with macro
4267 target_core_of_thread.
4268 * server.c (handle_qxfer_threads_proper): Likewise.
4269 * target.h (traget_core_of_thread): New macro.
4271 2012-04-18 Pedro Alves <palves@redhat.com>
4273 * aclocal.m4: Regenerate.
4274 * configure: Regenerate.
4276 2012-04-16 Yao Qi <yao@codesourcery.com>
4278 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4279 duplicated on address.
4281 2012-04-16 Yao Qi <yao@codesourcery.com>
4283 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4284 (struct tracepoint_action_ops) <send>: New field.
4285 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4286 (agent_expr_send, x_tracepoint_action_send): New.
4287 (l_tracepoint_action_send): New.
4288 (cmd_qtdp): Download and install tracepoint
4289 according to `use_agent'.
4290 (run_inferior_command): Add one more parameter `len'.
4292 (tracepoint_send_agent): New.
4293 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4295 2012-04-16 Yao Qi <yao@codesourcery.com>
4297 * tracepoint.c (download_tracepoints): Moved to ...
4298 (cmd_qtstart): ... here.
4300 2012-04-14 Yao Qi <yao@codesourcery.com>
4302 * tracepoint.c: Include inttypes.h.
4303 (struct collect_memory_action): Use sized types.
4304 (struct tracepoint): Likewise.
4305 (cmd_qtdp, stop_tracing): Update print specifiers.
4306 (cmd_qtp, response_tracepoint): Likewise.
4307 (collect_data_at_tracepoint): Likewise.
4308 (collect_data_at_step): Likewise.
4310 2012-04-14 Yao Qi <yao@codesourcery.com>
4312 Import gnulib module inttypes.
4313 * aclocal.m4, config.in, configure: Regenerated.
4315 2012-04-14 Yao Qi <yao@codesourcery.com>
4317 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4318 Makefile and config.status at last.
4320 2012-04-13 Yao Qi <yao@codesourcery.com>
4322 * tracepoint.c: Include stdint.h unconditionally.
4324 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4326 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4327 on BFD_HAVE_SYS_PROCFS_TYPE.
4328 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4329 * configure: Regenerate.
4330 * config.in: Likewise.
4332 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4334 * Makefile.in (clean): Also remove x32.c x32-linux.c
4335 x32-avx.c x32-avx-linux.c.
4336 (x32.o): New target.
4338 (x32-linux.o): Likewise.
4339 (x32-linux.c): Likewise.
4340 (x32-avx.o): Likewise.
4341 (x32-avx.c): Likewise.
4342 (x32-avx-linux.o): Likewise.
4343 (x32-avx-linux.c): Likewise.
4345 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4346 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4347 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4348 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4349 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4350 i386/x32-avx-linux.xml.
4352 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4353 (init_registers_x32_avx_linux): Likwise.
4354 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4355 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4357 2012-04-13 Pedro Alves <palves@redhat.com>
4359 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4360 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4361 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4362 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4365 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4367 * linux-x86-low.c (compat_x32_clock_t): New.
4368 (compat_x32_siginfo_t): Likewise.
4369 (compat_x32_siginfo_from_siginfo): Likewise.
4370 (siginfo_from_compat_x32_siginfo): Likewise.
4371 (linux_is_elf64): Likewise.
4372 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4373 and siginfo_from_compat_x32_siginfo for x32.
4374 (x86_arch_setup): Set linux_is_elf64.
4376 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4379 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4381 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4382 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4383 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4384 compatible with process.
4386 2012-04-12 Yao Qi <yao@codesourcery.com>
4388 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4389 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4390 (install-only, install-info, clean): Handle sub dir gnulib.
4391 (all-lib, am--refresh): New targets.
4392 (memmem.o): Remove target.
4393 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4394 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4395 (AC_REPLACE_FUNCS): Remove memmem.
4396 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4397 (AC_OUTPUT): Generate Makefile in gnulib/.
4398 * aclocal.m4, config.in, configure: Regenerated.
4400 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4402 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4404 2012-04-05 Pedro Alves <palves@redhat.com>
4406 -Werror=strict-aliasing
4408 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4411 2012-04-04 Pedro Alves <palves@redhat.com>
4413 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4414 (sparc_store_gregset_from_stack, sparc_store_gregset)
4415 (sparc_breakpoint_at): Fix formatting.
4417 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4419 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4421 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4422 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4423 * config.in: Regenerate.
4424 * configure: Likewise.
4426 2012-03-29 Pedro Alves <palves@redhat.com>
4428 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4429 Correct ptrace arguments.
4431 2012-03-28 Pedro Alves <palves@redhat.com>
4433 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4434 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4435 (IA64_FR1_REGNUM): New defines.
4436 (ia64_fetch_register): New.
4437 (the_low_target): Install it.
4438 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4440 * linux-low.c (linux_fetch_registers): Try the
4441 the_low_target.fetch_register hook first.
4443 * linux-arm-low.c (the_low_target): Adjust.
4444 * linux-bfin-low.c (the_low_target): Adjust.
4445 * linux-cris-low.c (the_low_target): Adjust.
4446 * linux-crisv32-low.c (the_low_target): Adjust.
4447 * linux-m32r-low.c (the_low_target): Adjust.
4448 * linux-m68k-low.c (the_low_target): Adjust.
4449 * linux-mips-low.c (the_low_target): Adjust.
4450 * linux-ppc-low.c (the_low_target): Adjust.
4451 * linux-s390-low.c (the_low_target): Adjust.
4452 * linux-sh-low.c (the_low_target): Adjust.
4453 * linux-sparc-low.c (the_low_target): Adjust.
4454 * linux-tic6x-low.c (the_low_target): Adjust.
4455 * linux-x86-low.c (the_low_target): Adjust.
4456 * linux-xtensa-low.c (the_low_target): Adjust.
4458 2012-03-26 Pedro Alves <palves@redhat.com>
4460 * server.c (handle_qxfer_libraries): Don't bail early if
4461 the_target->qxfer_libraries_svr4 is not NULL.
4463 2012-03-26 Pedro Alves <palves@redhat.com>
4465 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4467 2012-03-23 Pedro Alves <palves@redhat.com>
4469 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4470 "library-list-svr4" element's start tag when the the DSO list is
4473 2012-03-23 Pedro Alves <palves@redhat.com>
4475 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4476 a variable whose type size is the same as the inferior's pointer
4479 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4481 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4483 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4484 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4485 * linux-low.h: Include <signal.h>.
4486 (struct siginfo): Remove forward declaration.
4487 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4490 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4492 * .gitignore: Ignore more files.
4494 2012-03-19 Pedro Alves <palves@redhat.com>
4495 Jan Kratochvil <jan.kratochvil@redhat.com>
4497 * server.c (cont_thread, general_thread): Add describing comments.
4498 (start_inferior): Clear `cont_thread'.
4499 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4502 2012-03-15 Yao Qi <yao@codesourcery.com>
4504 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4506 (cmd_qtdp): ... here.
4508 2012-03-15 Yao Qi <yao@codesourcery.com>
4510 * tracepoint.c (struct tracepoint_action_ops): New.
4511 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4512 (m_tracepoint_action_download): New.
4513 (r_tracepoint_action_download): New.
4514 (x_tracepoint_action_download): New.
4515 (l_tracepoint_action_download): New.
4516 (add_tracepoint_action): Install `action->ops' according type.
4517 (download_tracepoint_1): Move code `download' function pointer
4518 of various tracepoint_action_ops.
4520 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4522 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4523 linux_ptrace_attach_warnings.
4525 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4527 * Makefile.in (linux-ptrace.o): New.
4528 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4529 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4530 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4531 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4532 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4534 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4536 2012-03-08 Yao Qi <yao@codesourcery.com>
4537 Pedro Alves <palves@redhat.com>
4539 Fix PR server/13392.
4540 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4542 * tracepoint.c (remove_tracepoint): New.
4543 (cmd_qtdp): Call remove_tracepoint when failed to install.
4545 2012-03-07 Pedro Alves <palves@redhat.com>
4547 * linux-low.c (get_detach_signal): New.
4548 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4549 Pass on pending signals to PTRACE_DETACH. Check the result of the
4551 * server.c (program_signals, program_signals_p): New.
4552 (handle_general_set): Handle QProgramSignals.
4553 * server.h (program_signals, program_signals_p): Declare.
4555 2012-03-05 Pedro Alves <palves@redhat.com>
4556 Jan Kratochvil <jan.kratochvil@redhat.com>
4558 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4561 2012-03-03 Yao Qi <yao@codesourcery.com>
4563 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4564 agent_look_up_symbols.
4566 2012-03-03 Yao Qi <yao@codesourcery.com>
4568 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4569 (linux-x86-low.o): Likewise.
4570 * server.h: Remove in_process_agent_loaded.
4571 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4575 2012-03-03 Yao Qi <yao@codesourcery.com>
4577 * tracepoint.c (gdb_agent_capability): New global.
4578 (in_process_agent_loaded_ust): Renamed to
4579 `in_process_agent_supports_ust'.
4581 (in_process_agent_supports_ust): Call agent_capability_check.
4582 (clear_installed_tracepoints): Assert that agent supports
4585 2012-03-03 Yao Qi <yao@codesourcery.com>
4587 * linux-low.c (linux_supports_agent): New.
4588 (linux_target_ops): Initialize field `supports_agent' with
4589 linux_supports_agent.
4590 * target.h (struct target_ops) <supports_agent>: New.
4591 (target_supports_agent): New macro.
4592 * server.c (handle_general_set): Handle packet 'QAgent'.
4593 (handle_query): Send `QAgent+'.
4594 * Makefile.in (server.o): Depends on agent.h.
4596 2012-03-03 Yao Qi <yao@codesourcery.com>
4598 * Makefile.in (OBS): Add agent.o.
4599 Add new rule for agent.o.
4600 Track dependence of tracepoint.c on agent.h.
4601 * tracepoint.c (run_inferior_command_1):
4602 (run_inferior_command): Call agent_run_command.
4603 (gdb_ust_connect_sync_socket): Deleted. Move it to
4605 (resume_thread, stop_thread): Likewise.
4606 (gdb_ust_socket_init): Renamed to ...
4607 (gdb_agent_socket_init): ... New.
4608 (gdb_ust_thread): Renamed to ...
4609 (gdb_agent_helper_thread): ... New.
4610 (gdb_ust_init): Move some code to ...
4611 (gdb_agent_init): ... here. New.
4612 [HAVE_UST]: Call gdb_ust_init.
4613 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4614 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4615 * config.in, configure: Regenerated.
4617 2012-03-02 Pedro Alves <palves@redhat.com>
4619 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4620 * linux-low.c (struct simple_pid_list): New.
4621 (stopped_pids): New a struct simple_pid_list pointer.
4622 (add_to_pid_list, pull_pid_from_list): New.
4623 (handle_extended_wait): Don't assume the first signal new children
4624 report is SIGSTOP. Adjust call to pull_pid_from_list.
4625 (linux_wait_for_lwp): Adjust.
4627 2012-03-02 Yao Qi <yao@codesourcery.com>
4629 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4632 2012-03-02 Yao Qi <yao@codesourcery.com>
4634 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4635 `stop_pc' and `tpoint'. Update caller.
4637 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4639 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4640 * linux-low.c (use_linux_regsets): New macro.
4641 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4642 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4643 (linux_register_in_regsets): New function.
4644 (usr_fetch_inferior_registers): Skip registers covered by
4646 (usr_store_inferior_registers): Likewise.
4647 (usr_fetch_inferior_registers): New macro.
4648 (usr_store_inferior_registers): Likewise.
4649 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4650 (linux_store_registers): Likewise.
4651 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4653 (init_registers_mips64_dsp_linux): Likewise.
4654 (init_registers_mips_linux): New macro.
4655 (init_registers_mips_dsp_linux): Likewise.
4656 (mips_dsp_num_regs): Likewise.
4657 (DSP_BASE, DSP_CONTROL): New fallback macros.
4658 (mips_base_regs): New macro.
4659 (mips_regmap): Use it. Fix the size.
4660 (mips_dsp_regmap): New variable.
4661 (mips_dsp_regset_bitmap): Likewise.
4662 (mips_arch_setup): New function.
4663 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4665 (mips_cannot_store_register): Likewise.
4666 (the_low_target): Update .arch_setup, .num_regs and .regmap
4667 initializers. Add .regset_bitmap initializer.
4668 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4670 * linux-bfin-low.c (the_low_target): Likewise.
4671 * linux-cris-low.c (the_low_target): Likewise.
4672 * linux-crisv32-low.c (the_low_target): Likewise.
4673 * linux-ia64-low.c (the_low_target): Likewise.
4674 * linux-m32r-low.c (the_low_target): Likewise.
4675 * linux-m68k-low.c (the_low_target): Likewise.
4676 * linux-ppc-low.c (the_low_target): Likewise.
4677 * linux-s390-low.c (the_low_target): Likewise.
4678 * linux-sh-low.c (the_low_target): Likewise.
4679 * linux-sparc-low.c (the_low_target): Likewise.
4680 * linux-tic6x-low.c (the_low_target): Likewise.
4681 * linux-x86-low.c (the_low_target): Likewise.
4682 * linux-xtensa-low.c (the_low_target): Likewise.
4683 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4684 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4685 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4687 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4688 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4690 2012-02-29 Yao Qi <yao@codesourcery.com>
4691 Pedro Alves <palves@redhat.com>
4693 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4694 `step_over_finished' is true.
4696 2012-02-27 Pedro Alves <palves@redhat.com>
4698 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4699 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4701 2012-02-27 Pedro Alves <palves@redhat.com>
4704 * linux-low.c (pid_is_stopped): New.
4705 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4707 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4709 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4712 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4714 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4716 2012-02-24 Luis Machado <lgustavo@codesourcery>
4718 * server.c (handle_query): Advertise support for target-side
4719 breakpoint condition evaluation.
4720 (process_point_options): New function.
4721 (process_serial_event): When inserting a breakpoint, check for
4722 a target-side condition that should be evaluated.
4724 * mem-break.c: Include regcache.h and ax.h.
4725 (point_cond_list_t): New data structure.
4726 (breakpoint) <cond_list>: New field.
4727 (find_gdb_breakpoint_at): Make non-static.
4728 (delete_gdb_breakpoint_at): Clear any target-side
4730 (clear_gdb_breakpoint_conditions): New function.
4731 (add_condition_to_breakpoint): Likewise.
4732 (add_breakpoint_condition): Likewise.
4733 (gdb_condition_true_at_breakpoint): Likewise.
4734 (gdb_breakpoint_here): Return result directly instead
4735 of going through a local variable.
4737 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4738 (clear_gdb_breakpoint_conditions): Likewise.
4739 (add_breakpoint_condition): Likewise.
4740 (gdb_condition_true_at_breakpoint): Likewise.
4742 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4743 (need_step_over_p): Take target-side breakpoint condition into
4746 2012-02-24 Luis Machado <lgustavo@codesourcery>
4748 * server.h: Include tracepoint.h.
4749 (agent_mem_read, agent_get_trace_state_variable_value,
4750 agent_set_trace_state_variable_value,
4751 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4752 get_set_tsv_func_addr): New prototypes.
4754 * ax.h: New include file.
4755 * ax.c: New source file.
4757 * tracepoint.c: Include ax.h.
4758 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4759 agent_expr, eval_result_type): Move to ax.h.
4760 (parse_agent_expr): Rename to ...
4761 (gdb_parse_agent_expr): ... this, make it non-static and move
4763 (unparse_agent_expr) Rename to ...
4764 (gdb_unparse_agent_expr): ... this, make it non-static and move
4766 (eval_agent_expr): Rename to ...
4767 (eval_tracepoint_agent_expr): ... this.
4768 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4769 forward declarations.
4770 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4771 (agent_get_trace_state_variable_value): New function.
4772 (agent_set_trace_state_variable_value): New function.
4773 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4774 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4775 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4776 (condition_true_at_tracepoint): Likewise.
4777 (parse_agent_expr): Rename to ...
4778 (gdb_parse_agent_expr): ... this and move to ax.c.
4779 (unparse_agent_expr): Rename to ...
4780 (gdb_unparse_agent_expr): ... this and move to ax.c.
4781 (gdb_agent_op_name): Move to ax.c.
4782 (eval_agent_expr): Rename to ...
4783 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4785 (eval_tracepoint_agent_expr): New function.
4786 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4788 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4790 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4791 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4792 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4793 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4794 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4795 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4796 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4797 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4798 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4799 (compile_bytecodes): Remove forward declaration.
4800 (is_goto_target): Move to ax.c.
4801 (compile_bytecodes): Move to ax.c and call
4802 agent_get_trace_state_variable_value (...) and
4803 agent_set_trace_state_variable_value (...).
4805 * Makefile.in: Update ax.c and IPA dependencies.
4807 2012-02-24 Pedro Alves <palves@redhat.com>
4809 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4810 (cmd_bigqtbuffer_circular): ... this. Only handle
4811 'QTBuffer:circular:'.
4812 (handle_tracepoint_general_set): Adjust.
4814 2012-02-16 Yao Qi <yao@codesourcery.com>
4816 * inferiors.c: Move code to ...
4817 * dll.c: .... here. New.
4818 * server.h: Declare clear_dlls.
4819 * Makefile.in (SFILES): Add dll.c.
4823 2012-02-11 Yao Qi <yao@codesourcery.com>
4825 * server.c: (handle_monitor_command): Add a new parameter
4827 (handle_query): Update caller.
4829 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4831 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4832 * configure, config.in: Regenerate.
4833 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4836 2012-02-02 Pedro Alves <palves@redhat.com>
4838 Try SIGKILL first, then PTRACE_KILL.
4839 * linux-low.c (linux_kill_one_lwp): New.
4840 (linux_kill_one_lwp): Rename to ...
4841 (kill_one_lwp_callback): ... this. Use the new
4844 2012-02-02 Pedro Alves <palves@redhat.com>
4846 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4849 2012-01-27 Pedro Alves <palves@redhat.com>
4851 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4852 (elf_64_file_p): Make static.
4853 (linux_pid_exe_is_elf_64_file): New.
4854 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4855 Delete declarations.
4856 (linux_pid_exe_is_elf_64_file): Declare.
4857 * linux-x86-low.c (x86_arch_setup): Use
4858 linux_pid_exe_is_elf_64_file.
4860 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4862 * linux-low.c (linux_wait_for_event_1): Rename to ...
4863 (linux_wait_for_event): ... here and merge it with former
4864 linux_wait_for_event - new variable wait_ptid, use it.
4865 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4867 2012-01-23 Pedro Alves <palves@redhat.com>
4869 * server.c (main): Avoid yet another case of infinite loop while
4870 detaching/killing after a longjmp.
4872 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4875 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4877 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4879 * hostio.c (handle_readlink): New function.
4880 (handle_vFile): Call it to handle "vFile:readlink" packets.
4882 2012-01-20 Pedro Alves <palves@redhat.com>
4883 Ulrich Weigand <ulrich.weigand@linaro.org>
4885 * server.c (handle_v_requests): Only support vAttach and vRun to
4886 start multiple processes when in extended protocol mode.
4888 2012-01-17 Pedro Alves <palves@redhat.com>
4890 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4891 memalign plus mprotect to allocate the scratch buffer.
4893 2012-01-13 Pedro Alves <palves@redhat.com>
4895 * server.c (attach_inferior): Clear `cont_thread'.
4897 2012-01-13 Pedro Alves <palves@redhat.com>
4899 * server.c (main): Avoid infinite loop while detaching/killing
4902 2012-01-09 Doug Evans <dje@google.com>
4904 * server.c (start_inferior): Set last_ptid in --wrapper case.
4906 2012-01-06 Yao Qi <yao@codesourcery.com>
4908 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4910 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4912 2012-01-04 Yao Qi <yao@codesourcery.com>
4914 * tracepoint.c (cmd_qtdp): Print debug message
4915 for static tracepoint.
4917 2012-01-04 Yao Qi <yao@codesourcery.com>
4919 * tracepoint.c (trace_vdebug): Differentiate debug message
4920 between gdbserver and IPA.
4922 2012-01-03 Yao Qi <yao@codesourcery.com>
4924 * tracepoint.c (tracepoint_was_hit): Don't collect for
4927 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4929 * terminal.h: Reformat copyright header.
4931 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4933 * server.c (gdbserver_version): Update copyright year.
4934 * gdbreplay.c (gdbreplay_version): Likewise.
4936 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4938 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4941 2011-12-18 Hui Zhu <teawater@gmail.com>
4942 * linux-low.c (linux_create_inferior): Save return value to ret.
4944 2011-12-18 Hui Zhu <teawater@gmail.com>
4946 * linux-low.c (linux_create_inferior): Save return value to ret.
4948 2011-12-16 Doug Evans <dje@google.com>
4950 * linux-low.c (linux_create_inferior): If stdio connection,
4951 redirect stdin from /dev/null, stdout to stderr.
4952 * remote-utils.c (remote_is_stdio): New static global.
4953 (remote_connection_is_stdio): New function.
4954 (remote_prepare): Handle stdio connection.
4955 (remote_open): Ditto.
4956 (remote_close): Don't close stdin for stdio connections.
4957 (read_prim,write_prim): New functions. Replace all calls to
4958 read/write to these.
4959 * server.c (main): Watch for "-" argument. Move call to
4960 remote_prepare before start_inferior.
4961 * server.h (STDIO_CONNECTION_NAME): New macro.
4962 (remote_connection_is_stdio): Declare.
4964 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4965 in debugging output.
4967 2011-12-15 Yao Qi <yao@codesourcery.com>
4969 * tracepoint.c: Include sys/syscall.h.
4970 (gdb_ust_thread): Remove preprocessor conditional.
4972 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4974 * linux-low.c (linux_detach_one_lwp): Call
4975 the_low_target.prepare_to_resume before detaching.
4977 2011-12-14 Yao Qi <yao@codesourcery.com>
4979 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4982 2011-12-14 Yao Qi <yao@codesourcery.com>
4984 * i386-low.c (i386_low_stopped_data_address): Initialize local
4987 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4991 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4992 DR_CONTROL unless necessary. Extend comments.
4993 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4994 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4996 2011-12-13 Yao Qi <yao@codesourcery.com>
4998 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5000 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5002 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5004 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5005 Print new debug message for such case.
5007 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5009 Fix overlapping memcpy.
5010 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5011 the read_inferior_memory transfer.
5012 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5013 write_inferior_memory transfer.
5014 (set_fast_tracepoint_jump): New variable buf. Use it for the
5015 read_inferior_memory and write_inferior_memory transfers.
5016 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5017 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5018 Use it for the write_inferior_memory transfer.
5019 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5022 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5024 * linux-low.c (fetch_register, store_register): Make code
5025 consistent, fix formatting.
5027 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5029 * linux-low.c (usr_store_inferior_registers): Factor out code
5030 to handle individual registers into...
5031 (store_register): ... this new function.
5033 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5035 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5036 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5037 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5038 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5039 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5040 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5041 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5042 (srv_xmlfiles): Add new XML files.
5044 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5046 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5047 (init_registers_s390_linux32v1): Add prototype.
5048 (init_registers_s390_linux32v2): Likewise.
5049 (init_registers_s390_linux64v1): Likewise.
5050 (init_registers_s390_linux64v2): Likewise.
5051 (init_registers_s390x_linux64v1): Likewise.
5052 (init_registers_s390x_linux64v2): Likewise.
5053 (s390_num_regs): Increment to 52.
5054 (s390_regmap): Add orig_r2 register.
5055 (s390_num_regs_3264): Increment to 68.
5056 (s390_regmap_3264): Add orig_r2 register.
5057 (s390_collect_ptrace_register): Handle orig_r2 register.
5058 (s390_supply_ptrace_register): Likewise.
5059 (s390_fill_last_break): New function.
5060 (s390_store_last_break): Likewise.
5061 (s390_fill_system_call): New function.
5062 (s390_store_system_call): Likewise.
5063 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5065 (s390_check_regset): New function.
5066 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5067 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5068 Update target_regsets for available register sets.
5070 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5071 Jan Kratochvil <jan.kratochvil@redhat.com>
5073 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5074 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5076 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5077 * linux-low.h (struct process_info_private): New member r_debug.
5078 * server.c (handle_qxfer_libraries): Call
5079 the_target->qxfer_libraries_svr4.
5080 (handle_qxfer_libraries_svr4): New function.
5081 (qxfer_packets): New entry "libraries-svr4".
5082 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5083 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5084 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5085 PACKET_qXfer_libraries_svr4.
5087 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5089 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5090 PSW address/mask between 8-byte and 16-byte formats.
5091 (s390_supply_ptrace_register): Likewise.
5092 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5093 basic addressing mode bit.
5095 2011-11-24 Stan Shebs <stan@codesourcery.com>
5097 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5099 2011-11-17 Stan Shebs <stan@codesourcery.com>
5101 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5102 (tracing_start_time): New global.
5103 (tracing_stop_time): New global.
5104 (tracing_user_name): New global.
5105 (tracing_notes): New global.
5106 (tracing_stop_note): New global.
5107 (cmd_qtstart): Set traceframe_usage, start_time.
5108 (stop_tracing): Set stop_time.
5109 (cmd_qtstatus): Report additional status.
5110 (cmd_qtp): New function.
5111 (handle_tracepoint_query): Call it.
5112 (cmd_qtnotes): New function.
5113 (handle_tracepoint_general_set): Call it.
5114 (get_timestamp): Rename from tsv_get_timestamp.
5116 2011-11-14 Stan Shebs <stan@codesourcery.com>
5117 Kwok Cheung Yeung <kcy@codesourcery.com>
5119 * linux-x86-low.c (small_jump_insn): New.
5120 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5121 trampoline and error message, build a trampoline and issue a small
5122 jump instruction to it.
5123 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5124 trampoline and error message.
5125 (x86_get_min_fast_tracepoint_insn_len): New.
5126 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5127 * linux-low.h (struct linux_target_ops): Add arguments to
5128 install_fast_tracepoint_jump_pad operation, add new operation.
5129 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5131 (linux_get_min_fast_tracepoint_insn_len): New function.
5132 (linux_target_op): Add new operation.
5133 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5134 (gdb_trampoline_buffer_end): Ditto.
5135 (gdb_trampoline_buffer_error): Ditto.
5136 (struct ipa_sym_addresses): Add fields for new IPA variables.
5137 (symbol_list): Add entries for new IPA variables.
5138 (struct tracepoint): Add fields to hold the address range of the
5139 trampoline used by the tracepoint.
5140 (trampoline_buffer_head): New static variable.
5141 (trampoline_buffer_tail): Ditto.
5142 (claim_trampoline_space): New function.
5143 (have_fast_tracepoint_trampoline_buffer): New function.
5144 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5146 (install_fast_tracepoint): Ditto, also add error buffer argument.
5147 (cmd_qtminftpilen): New function.
5148 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5149 (fast_tracepoint_from_trampoline_address): New function.
5150 (fast_tracepoint_collecting): Handle trampoline as part of jump
5152 (set_trampoline_buffer_space): New function.
5153 (initialize_tracepoint): Initialize new IPA variables.
5154 * target.h (struct target_ops): Add arguments to
5155 install_fast_tracepoint_jump_pad operation, add new
5156 get_min_fast_tracepoint_insn_len operation.
5157 (target_get_min_fast_tracepoint_insn_len): New.
5158 (install_fast_tracepoint_jump_pad): Add arguments.
5159 * server.h (IPA_BUFSIZ): Define.
5160 * linux-i386-ipa.c: Include extra header files.
5161 (initialize_fast_tracepoint_trampoline_buffer): New function.
5162 (initialize_low_tracepoint): Call it.
5163 * server.h (set_trampoline_buffer_space): Declare.
5164 (claim_trampoline_space): Ditto.
5165 (have_fast_tracepoint_trampoline_buffer): Ditto.
5167 2011-11-14 Yao Qi <yao@codesourcery.com>
5169 * server.c (handle_query): Handle InstallInTrace for qSupported.
5170 * tracepoint.c (add_tracepoint): Sort list.
5171 (install_tracepoint, download_tracepoint): New.
5172 (cmd_qtdp): Call them to install and download tracepoints.
5173 (sort_tracepoints): Removed.
5174 (cmd_qtstart): Update.
5176 2011-11-14 Yao Qi <yao@codesourcery.com>
5178 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5179 * mem-break.h: Declare.
5180 * tracepoint.c (cmd_qtstart): Move some code to ...
5181 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5183 (download_tracepoints): Move some code to ...
5184 (download_tracepoint_1): ... here. New.
5186 2011-11-08 Yao Qi <yao@codesourcery.com>
5188 * remote-utils.c (relocate_instruction): A comment fix.
5190 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5192 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5193 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5194 dr_status_mirror and dr_control_mirror from debug_reg_state.
5195 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5196 (i386_initial_stuff): Remove use of deleted globals.
5197 (i386_get_thread_context, i386_set_thread_context,
5198 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5199 from debug_reg_state.
5201 2011-11-05 Yao Qi <yao@codesourcery.com>
5203 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5204 address as TPOINT's.
5206 2011-11-02 Stan Shebs <stan@codesourcery.com>
5208 * tracepoint.c (agent_mem_read_string): New function.
5209 (eval_agent_expr): Call it for tracenz.
5210 * server.c (handle_query): Report support for tracenz.
5212 2011-11-02 Yao Qi <yao@codesourcery.com>
5214 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5216 2011-11-02 Yao Qi <yao@codesourcery.com>
5218 * target.h: Fix a typo in comment.
5220 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5222 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5223 clobber the breakpoints' shadows with fast tracepoint jumps.
5224 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5225 * target.c (write_inferior_memory): Also pass MYADDR down to
5228 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5230 * configure.ac: Check support for personality routine.
5231 * configure: Regenerate.
5232 * config.in: Likewise.
5233 * linux-low.c: Include <sys/personality.h>.
5234 Define ADDR_NO_RANDOMIZE if necessary.
5235 (linux_create_inferior): Disable address space randomization when
5236 forking inferior, if requested.
5237 (linux_supports_disable_randomization): New function.
5238 (linux_target_ops): Install it.
5239 * server.h (disable_randomization): Declare.
5240 * server.c (disable_randomization): New global variable.
5241 (handle_general_set): Handle QDisableRandomization.
5242 (handle_query): Likewise for qSupported.
5243 (main): Support --disable-randomization and --no-disable-randomization
5244 command line arguments.
5245 * target.h (struct target_ops): Add supports_disable_randomization.
5246 (target_supports_disable_randomization): New macro.
5248 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5250 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5252 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5253 [!PT_GETDSBT] (target_loadmap): New definition.
5254 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5255 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5256 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5257 and PT_GETDSBT to LINUX_LOADMAP.
5258 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5259 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5261 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5263 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5264 (arm_linux_hwbp_cap): New static variable.
5265 (arm_linux_get_hwbp_cap): Replace by ...
5266 (arm_linux_init_hwbp_cap): ... this new function.
5267 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5268 (arm_linux_get_hw_watchpoint_count): Likewise.
5269 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5270 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5271 (arm_prepare_to_resume): Use perror_with_name instead of error.
5273 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5275 * linux-arm-low.c: Include <signal.h>.
5276 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5277 (struct arm_linux_hwbp_cap): New data type.
5278 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5279 (struct arm_linux_hw_breakpoint): New data type.
5280 (MAX_BPTS, MAX_WPTS): Define.
5281 (struct arch_process_info, struct arch_lwp_info): New data types.
5282 (arm_linux_get_hwbp_cap): New function.
5283 (arm_linux_get_hw_breakpoint_count): Likewise.
5284 (arm_linux_get_hw_watchpoint_count): Likewise.
5285 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5286 (arm_hwbp_control_initialize): Likewise.
5287 (arm_hwbp_control_is_enabled): Likewise.
5288 (arm_hwbp_control_is_initialized): Likewise.
5289 (arm_hwbp_control_disable): Likewise.
5290 (arm_linux_hw_breakpoint_equal): Likewise.
5291 (arm_linux_hw_point_initialize): Likewise.
5292 (struct update_registers_data): New data structure.
5293 (update_registers_callback: New function.
5294 (arm_insert_point): Likewise.
5295 (arm_remove_point): Likewise.
5296 (arm_stopped_by_watchpoint): Likewise.
5297 (arm_stopped_data_address): Likewise.
5298 (arm_new_process): Likewise.
5299 (arm_new_thread): Likewise.
5300 (arm_prepare_to_resume): Likewise.
5301 (the_low_target): Register arm_insert_point, arm_remove_point,
5302 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5303 arm_new_thread, and arm_prepare_to_resume.
5305 2011-09-15 Stan Shebs <stan@codesourcery.com>
5307 * server.h (struct emit_ops): Add compare-goto fields.
5308 * tracepoint.c (gdb_agent_op_sizes): New table.
5309 (emit_eq_goto): New function.
5310 (emit_ne_goto): New function.
5311 (emit_lt_goto): New function.
5312 (emit_le_goto): New function.
5313 (emit_gt_goto): New function.
5314 (emit_ge_goto): New function.
5315 (is_goto_target): New function.
5316 (compile_bytecodes): Recognize special cases of compare-goto
5317 combinations and call specialized emitters for them.
5318 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5319 (amd64_emit_ne_goto): New function.
5320 (amd64_emit_lt_goto): New function.
5321 (amd64_emit_le_goto): New function.
5322 (amd64_emit_gt_goto): New function.
5323 (amd64_emit_ge_goto): New function.
5324 (amd64_emit_ops): Add the new functions.
5325 (i386_emit_eq_goto): New function.
5326 (i386_emit_ne_goto): New function.
5327 (i386_emit_lt_goto): New function.
5328 (i386_emit_le_goto): New function.
5329 (i386_emit_gt_goto): New function.
5330 (i386_emit_ge_goto): New function.
5331 (i386_emit_ops): Add the new functions.
5333 2011-09-08 Stan Shebs <stan@codesourcery.com>
5335 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5336 (i386_emit_epilogue): Restore %ebx.
5338 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5340 * server.c (step_thread): Remove definition.
5341 (process_serial_event): Don't handle Hs.
5342 * server.h (step_thread): Remove declaration.
5343 * target.c (set_desired_inferior): Remove use of step_thread.
5345 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5347 * linux-low.c: Include linux-procfs.h.
5348 (linux_attach_lwp_1): Update comments.
5349 (linux_attach): Scan for existing threads when attaching to a
5350 process that is the tgid.
5351 * Makefile.in: Update dependencies.
5353 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5355 * configure.srv: Add linux-procfs.o dependencies.
5357 2011-08-14 Yao Qi <yao@codesourcery.com>
5359 * target.h (struct target_ops): Fix indent.
5360 * win32-low.c (win32_target_ops): Fix comment.
5362 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5363 Yao Qi <yao@codesourcery.com>
5365 * Makefile.in (clean): Remove tic6x-*.c files.
5366 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5367 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5368 (tic6x-c64xp-linux.c): Likewise.
5369 * configure.srv: Add support for tic6x-*-uclinux.
5370 * linux-tic6x-low.c: New.
5371 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5373 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5374 Yao Qi <yao@codesourcery.com>
5376 * target.h (struct target_ops): Add read_loadmap.
5377 * linux-low.c (struct target_loadseg): New type.
5378 (struct target_loadmap): New type.
5379 (linux_read_loadmap): New function.
5380 (linux_target_ops): Add linux_read_loadmap.
5381 * server.c (handle_query): Support qXfer:fdpic:read packet.
5382 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5385 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5387 * win32-low.c: Include <stdint.h>.
5389 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5391 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5392 to the inferior here.
5393 (i386_remove_aligned_watchpoint): Ditto.
5394 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5395 fit part of the watchpoint in the debug registers.
5396 (i386_update_inferior_debug_regs): New.
5397 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5398 registers, and only update the inferior on success.
5399 (i386_low_remove_watchpoint): Ditto.
5401 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5403 * linux-low.c (compare_ints, unique, list_threads, show_process,
5404 linux_core_of_thread): Delete.
5405 (linux_target_ops): Change linux_core_of_thread to
5406 linux_common_core_of_thread.
5407 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5408 * utils.c (malloc_failure): Change type of argument.
5409 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5410 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5411 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5412 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5413 (IPA_OBJS): Add common-utils-ipa.o.
5414 (ptid_h, linux_osdata_h): New macros.
5415 (server_h): Add common/common-utils.h, common/xml-utils.h,
5416 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5418 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5419 ptid.o, buffer.o): New rules.
5420 (linux-low.o): Add common/linux-osdata.h as a dependency.
5421 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5422 * configure.ac: Add AC_HEADER_DIRENT check.
5423 * config.in: Regenerate.
5424 * configure: Regenerate.
5425 * remote-utils.c (xml_escape_text): Delete.
5426 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5427 buffer_xml_printf): Move to common/buffer.c.
5428 * server.c (main): Remove call to initialize_inferiors.
5429 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5430 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5431 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5432 internal_error, gdb_assert, gdb_assert_fail): Delete.
5433 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5434 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5436 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5437 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5438 initialize_inferiors): Delete.
5440 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5442 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5445 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5447 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5449 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5451 2011-05-26 Yao Qi <yao@codesourcery.com>
5453 * Makefile.in (thread-db.o): Track dependence to
5454 common/gdb_thread_db.h.
5455 * thread-db.c: include gdb_thread_db.h from right place.
5457 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5459 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5460 __FILE__ and __LINE__ to internal_error.
5462 2011-05-13 Doug Evans <dje@google.com>
5464 * thread-db.c (try_thread_db_load_from_sdir): New function.
5465 (try_thread_db_load_from_dir): New function.
5466 (thread_db_load_search): Handle $sdir, ignore $pdir.
5467 Remove trying of system directories if search of
5468 libthread-db-search-path fails, that is now done via $sdir.
5470 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5472 * server.c (handle_query): Add EnableDisableTracepoints to the list
5473 of supported features.
5474 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5476 (cmd_qtenable_disable): New.
5477 (cmd_qtstart): Install tracepoints even if disabled.
5478 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5479 receiving a QTEnable or QTDisable packet.
5480 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5481 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5483 (gdb_probe): Skip data collection if static tracepoint is disabled.
5485 2011-05-10 Doug Evans <dje@google.com>
5487 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5489 2011-05-04 Doug Evans <dje@google.com>
5491 * linux-low.c (linux_join): Skip process lookup.
5492 * spu-low.c (spu_join): Ditto.
5493 * server.c (join_inferiors_callback): Delete.
5494 (process_serial_event): For 'D' packet (detach) call join_inferior
5497 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5499 * README: Don't mention xscale*-*-linux*.
5500 * configure.srv (xscale*-*-linux*): Don't handle target.
5502 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5504 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5506 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5507 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5508 (i386_emit_void_call_2): Likewise.
5510 2011-04-26 Yao Qi <yao@codesourcery.com>
5512 * linux-low.c: Move common macros to linux-ptrace.h.
5513 Include linux-ptrace.h.
5514 * Makefile.in (linux_ptrace_h): New.
5515 (linux-low.o): Depends on linux-ptrace.h.
5517 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5519 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5520 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5521 (remote_prepare): New function with most of the TCP code from ...
5522 (remote_open): ... here. Detect PORT here unconditionally. Move also
5523 setting transport_is_reliable.
5524 * server.c (run_once): New variable.
5525 (gdbserver_usage): Document it.
5526 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5527 the first run if RUN_ONCE.
5528 * server.h (run_once, remote_prepare): New declarations.
5530 2011-04-19 Tom Tromey <tromey@redhat.com>
5532 * win32-low.c (handle_load_dll): Remove duplicate "the".
5534 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5536 Remove support for old Cygwin 1.5 versions.
5537 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5538 function to avoid warning.
5539 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5542 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5544 * gdbserver/server.h (Macro _): Define it if not available.
5546 2011-03-14 Michael Snyder <msnyder@vmware.com>
5548 * hostio.c (handle_close): Remove unnecessary null test.
5550 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5552 * Makefile.in (maintainer-clean realclean distclean): Remove
5553 "make ... subdir_do" command.
5555 2011-03-10 Michael Snyder <msnyder@vmware.com>
5557 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5559 * server.c (handle_v_run): Free alloced buffer on early return.
5561 2011-03-09 Yao Qi <yao@codesourcery.com>
5564 2011-03-04 Yao Qi <yao@codesourcery.com>
5566 * Makefile.in: Remove GNU make feature --directory.
5568 2011-03-05 Yao Qi <yao@codesourcery.com>
5570 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5571 (subdir_do): New make target. Copied from gdb/Makefile.
5572 (maintainer-clean, realclean, distclean, clean): Call corresponding
5573 make targets in common/Makefile.
5575 2011-02-11 Yao Qi <yao@codesourcery.com>
5577 * configure.ac: Call AC_PROG_RANLIB.
5578 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5579 * configure: Regenerate.
5581 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5583 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5585 2011-03-06 Yao Qi <yao@codesourcery.com>
5587 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5589 2011-03-05 Yao Qi <yao@codesourcery.com>
5591 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5592 (subdir_do): New make target. Copied from gdb/Makefile.
5593 (maintainer-clean, realclean, distclean, clean): Call corresponding
5594 make targets in common/Makefile.
5596 2011-03-04 Yao Qi <yao@codesourcery.com>
5598 * Makefile.in: Remove GNU make feature --directory.
5600 2011-03-04 Michael Snyder <msnyder@vmware.com>
5602 * server.c (queue_stop_reply): Call xmalloc not malloc.
5604 2011-03-02 Michael Snyder <msnyder@vmware.com>
5606 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5608 2011-02-28 Michael Snyder <msnyder@vmware.com>
5610 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5611 (cmd_qtframe): Ditto.
5612 (cmd_qtbuffer): Ditto.
5613 (cmd_bigqtbuffer): Ditto.
5615 * utils.c (decimal2str): Initialize 'width' to nine, then
5618 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5620 * hostio.c (require_data): Free *data, not data.
5622 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5624 * hostio.c (require_data): Use free, not xfree.
5626 2011-02-27 Michael Snyder <msnyder@vmware.com>
5628 * server.c (handle_query): Discard unused value.
5630 * hostio.c (require_data): Free malloc memory before returning
5633 2011-02-26 Michael Snyder <msnyder@vmware.com>
5635 * linux-low.c (list_threads): Call closedir for dirent.
5637 2011-02-27 Michael Snyder <msnyder@vmware.com>
5639 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5640 a case statement falls through.
5642 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5644 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5647 2011-02-26 Michael Snyder <msnyder@vmware.com>
5649 * utils.c (decimal2str): Eliminate dead code and dead param.
5650 (pulongest): Drop dead param from call to decimal2str.
5653 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5655 Revert the following patch (not approved yet):
5656 2011-02-21 Hui Zhu <teawater@gmail.com>
5657 * tracepoint.c (tp_printf): New function.
5658 (eval_agent_expr): Handle gdb_agent_op_printf.
5660 2011-02-21 Hui Zhu <teawater@gmail.com>
5662 * tracepoint.c (tp_printf): New function.
5663 (eval_agent_expr): Handle gdb_agent_op_printf.
5665 2011-02-18 Tom Tromey <tromey@redhat.com>
5667 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5668 (tracepoint.o): Likewise.
5669 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5670 (gdb_agent_op_names): Likewise.
5672 2011-02-18 Tom Tromey <tromey@redhat.com>
5674 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5675 gdb_agent_op_rot>: New constants.
5676 (gdb_agent_op_names): Add pick and roll.
5677 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5680 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5682 * aclocal.m4: Regenerated with aclocal-1.11.1.
5684 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5686 * server.c (handle_qxfer_traceframe_info): New.
5687 (qxfer_packets): Register "traceframe-info".
5688 (handle_query): Report support for qXfer:traceframe-info:read+.
5689 * tracepoint.c (match_blocktype): New.
5690 (traceframe_find_block_type): Rename to ...
5691 (traceframe_walk_blocks): ... this. Add callback filter argument,
5693 (traceframe_find_block_type): New, reimplemented on top of
5694 traceframe_walk_blocks.
5695 (build_traceframe_info_xml): New.
5696 (traceframe_read_info): New.
5697 * server.h (traceframe_read_info): Declare.
5699 2011-02-11 Yao Qi <yao@codesourcery.com>
5701 * configure.ac: Call AC_PROG_RANLIB.
5702 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5703 * configure: Regenerate.
5705 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5707 * server.c (gdb_read_memory): Change return semantics to allow
5709 (handle_search_memory_1): Adjust.
5710 (process_serial_event) <'m' packet>: Handle partial transfers.
5711 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5713 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5715 * regcache.c (init_register_cache): Initialize
5716 regcache->register_status.
5717 (free_register_cache): Release regcache->register_status.
5718 (regcache_cpy): Copy register_status.
5719 (registers_to_string): Print 'x's for unavailable registers.
5720 (supply_register): Mark the register's status valid or
5721 unavailable, depending on whether a buffer was passed in or not.
5722 (supply_register_zeroed): New.
5723 (supply_regblock): Mark the registers' status valid or
5724 unavailable, depending on whether a buffer was passed in or not.
5725 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5726 (struct regcache): New `register_status' field.
5727 (supply_register_zeroed): Declare.
5728 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5729 supply_register_zeroed, rather than passing a NULL buffer to
5731 * tracepoint.c (fetch_traceframe_registers): Update comment.
5733 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5735 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5738 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5740 * server.h (decode_xfer_write): Change prototype.
5741 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5742 and don't extract the annex here.
5743 * server.c (decode_xfer_read): Remove `annex' parameter,
5744 and don't extract the annex here.
5746 (struct qxfer): New.
5747 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5748 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5749 (handle_qxfer_statictrace): New functions, abstracted out from
5750 handle_query, and made to use the struct qxfer interface.
5751 (handle_threads_qxfer_proper): Rename to ...
5752 (handle_qxfer_threads_proper): ... this.
5753 (handle_threads_qxfer): Rename to ...
5754 (handle_qxfer_threads): ... this. Adjust.
5755 (qxfer_packets): New array.
5756 (handle_qxfer): New function.
5757 (handle_query): Use handle_qxfer.
5759 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5761 * gdbreplay.c: Shorten lines of >= 80 columns.
5762 * linux-low.c: Ditto.
5763 * linux-ppc-low.c: Ditto.
5764 * linux-s390-low.c: Ditto.
5765 * linux-sparc-low.c: Ditto.
5766 * linux-x86-low.c: Ditto.
5767 * linux-xtensa-low.c: Ditto.
5768 * mem-break.c: Ditto.
5770 * regcache.h: Ditto.
5771 * remote-utils.c: Ditto.
5774 * thread-db.c: Ditto.
5775 * tracepoint.c: Ditto.
5777 * win32-low.h: Ditto.
5779 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5781 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5784 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5786 * server.c (gdbserver_version): Update copyright year in version
5788 * gdbreplay.c (gdbreplay_version): Ditto.
5790 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5792 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5793 * linux-bfin-low.c: New file.
5794 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5795 PT_DATA_ADDR for BFIN targets.
5796 * Makefile.in (SFILES): Add linux-bfin-low.c.
5797 (clean): Remove reg-bfin.c.
5798 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5799 * README: Mention supported Blackfin targets.
5801 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5803 * .gitignore: New file.
5805 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5807 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5809 2010-10-22 Jie Zhang <jie@codesourcery.com>
5811 * Makefile.in: Add FLAGS_TO_PASS variable.
5812 (install): Remove dependency of install-only and recursively
5813 invoke make for install-only.
5815 2010-10-04 Doug Evans <dje@google.com>
5817 * Makefile.in (uninstall): Use $(DESTDIR).
5819 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5823 * linux-x86-low.c (compat_siginfo_from_siginfo)
5824 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5825 si_code is < 0. Check for si_code == SI_TIMER before checking for
5828 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5830 * lynx-i386-low.c: New file.
5831 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5833 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5835 * lynx-low.c (ptrace_request_to_str): Remove handling for
5836 request values that have been removed in LynxOS 5.x.
5838 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5840 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5843 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5845 * configure.ac: Add --enable-inprocess-agent option.
5846 * configure: Rebuilt.
5848 2010-09-06 Yao Qi <yao@codesourcery.com>
5850 * linux-low.c (linux_kill): Remove unused variable.
5851 (linux_stabilize_threads): Likewise.
5852 * server.c (start_inferior): Likewise.
5853 (queue_stop_reply_callback): Likewise.
5854 * tracepoint.c (do_action_at_tracepoint): Likewise.
5856 2010-09-06 Yao Qi <yao@codesourcery.com>
5858 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5861 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5863 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5865 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5867 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5870 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5872 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5873 gdbserver/lynx-ppc-low.c: New files.
5874 * Makefile.in (lynx_low_h): New variable.
5875 (lynx-low.o, lynx-ppc-low.o): New rules.
5876 * configure.ac: On LynxOS, link with -lnetinet.
5877 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5878 * configure: regenerate.
5880 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5882 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5883 * configure.ac: Add check for vasprintf and vsnprintf.
5884 * configure, config.in: Regenerate.
5885 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5887 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5889 * gdbreplay.c: Move include of alloca.h up, next to include of
5891 * server.h: Add include of malloc.h.
5892 * mem-break.c: Remove include of malloc.h.
5893 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5895 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5897 * Makefile.in (memmem.o): Build with -Wno-error.
5899 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5901 * utils.c (xsnprintf): Make non-static.
5902 * server.h: Add xsnprintf declaration.
5903 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5904 replace calls to snprintf by calls to xsnprintf throughout.
5906 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5908 * configure.ac: Add configure check for alloca.
5909 * configure, config.in: Regenerate.
5910 * server.h: Include alloca.h if it exists.
5911 * gdbreplay.c: Include alloca.h if it exists.
5913 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5915 * linux-low.c (__SIGRTMIN): Define if not already defined.
5916 (linux_create_inferior): Check for __ANDROID__ rather than
5918 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5919 are already deferred.
5920 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5921 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5922 stopped and already has a pending signal to report.
5923 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5924 a pending signal to report or is moving out of a jump pad.
5925 (linux_init_signals): Check for __ANDROID__ rather than
5928 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5930 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5931 debug_threads check. Avoid a linear search when not doing debug
5934 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5936 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5937 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5938 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5939 (process_event): Change local fd's type to gdb_fildes_t.
5940 (create_file_handler): Adjust prototype.
5941 (delete_file_handler): Adjust prototype.
5942 (handle_file_event): Adjust prototype. Use pfildes.
5943 (create_file_event): Adjsut prototype.
5944 * remote-utils.c (remote_desc, listen_desc): Change type to
5946 * server.h: New gdb_fildes_t typedef.
5947 [USE_WIN32API]: Include winsock2.h.
5948 (delete_file_handler, add_file_handler): Adjust prototypes.
5950 * utils.c (pfildes): New.
5952 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5954 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5955 * configure: Regenerate.
5957 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5959 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5960 (linux_done_accessing_memory): ... this.
5961 (linux_target_ops): Adjust.
5962 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5963 * nto-low.c (nto_target_ops): Adjust comment.
5964 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5965 * spu-low.c (spu_target_ops): Adjust comment.
5966 * target.h (target_ops): Rename unprepare_to_access_memory field
5967 to done_accessing_memory.
5968 (unprepare_to_access_memory): Rename to ...
5969 (done_accessing_memory): ... this.
5971 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5973 * linux-low.c (linux_prepare_to_access_memory): New.
5974 (linux_unprepare_to_access_memory): New.
5975 (linux_target_ops): Install them.
5976 * server.c (read_memory): Rename to ...
5977 (gdb_read_memory): ... this. Use
5978 prepare_to_access_memory/prepare_to_access_memory.
5979 (write_memory): Rename to ...
5980 (gdb_write_memory): ... this. Use
5981 prepare_to_access_memory/prepare_to_access_memory.
5982 (handle_search_memory_1): Adjust.
5983 (process_serial_event): Adjust.
5984 * target.h (struct target_ops): New fields
5985 prepare_to_access_memory and unprepare_to_access_memory.
5986 (prepare_to_access_memory, unprepare_to_access_memory): New.
5987 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5988 prepare_to_access_memory/prepare_to_access_memory.
5989 * nto-low.c (nto_target_ops): Adjust.
5990 * spu-low.c (spu_target_ops): Adjust.
5991 * win32-low.c (win32_target_ops): Adjust.
5993 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5995 * Makefile.in (WARN_CFLAGS): Get it from configure.
5996 (WERROR_CFLAGS): New.
5997 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5998 * configure.ac: Introduce --enable-werror, which adds -Werror to
5999 the compiler command line. Enabled by default. Disable with
6000 --disable-werror. Add -Wdeclaration-after-statement
6001 Wpointer-arith and -Wformat-nonliteral to warning flags.
6002 * configure: Regenerate.
6004 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6006 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6008 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6010 * gdbreplay.c (remote_error): New.
6012 (expect): Use gdbchar. Check for error reading from GDB.
6013 Clarify sync error output.
6014 (play): Check for errors writing to GDB.
6015 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6016 * remote-utils.c (getpkt): Check for errors writing to the remote
6019 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6021 * linux-low.c (linux_wait_1): Move non-debugging code out of
6022 `debug_threads' control.
6024 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6026 * linux-low.c (linux_wait_1): Don't set last_status here.
6027 * server.c (push_event, queue_stop_reply_callback): Assert we're
6028 not pushing a TARGET_WAITKIND_IGNORE event.
6029 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6030 (myresume, handle_target_event): Set the thread's last_resume_kind
6031 and last_status from the target returned status.
6033 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6037 * linux-x86-low.c (update_debug_registers_callback): New.
6038 (i386_dr_low_set_addr): Use it.
6039 (i386_dr_low_get_addr): New.
6040 (i386_dr_low_set_control): Use update_debug_registers_callback.
6041 (i386_dr_low_get_control): New.
6042 (i386_dr_low_get_status): Adjust.
6043 * linux-low.c (linux_stop_lwp): New.
6044 * linux-low.h (linux_stop_lwp): Declare.
6046 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6047 argument instead of a i386_debug_reg_state.
6048 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6049 a i386_debug_reg_state.
6050 (i386_insert_aligned_watchpoint): Adjust.
6051 (i386_remove_aligned_watchpoint): Adjust.
6052 (i386_low_stopped_data_address): Read the debug registers from the
6053 inferior instead of from the mirrors.
6054 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6055 (i386_dr_low_get_addr): Declare.
6056 (i386_dr_low_get_control): Declare.
6057 (i386_dr_low_get_status): Change prototype.
6059 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6060 (i386_dr_low_get_addr): New.
6061 (i386_dr_low_get_control): New.
6062 (i386_dr_low_get_status): Adjust prototype. Return
6064 (i386_initial_stuff): Clear dr_status_mirror and
6066 (i386_get_thread_context): Adjust.
6067 (i386_set_thread_context): Adjust.
6068 (i386_thread_added): Adjust.
6070 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6072 * linux-low.h (linux_thread_area): Delete declaration.
6074 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6076 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6077 after its termination.
6079 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6081 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6082 (gdb_wants_all_stopped): Delete.
6083 (linux_wait_1): Don't call them.
6084 * server.c (handle_v_cont): Tag all threads as want-stopped.
6085 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6086 stopped as "client-wants-stopped".
6088 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6090 * Makefile.in (signals_h): New.
6091 (server_h): Depend on it.
6092 (server.o): Don't depend on $(signals_def).
6093 (signals.o): Depend on $(signals_def).
6095 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6097 * Makefile.in (signals_def): New.
6098 (server_h): Append include/gdb/signals.h and signals_def.
6099 (server.o): Append signals_def.
6101 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6103 * server.c (handle_target_event): Use target_signal_to_host for
6104 resume_info.sig initialization.
6105 * target.h (struct thread_resume) <sig>: New comment.
6107 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6109 * server.c (handle_query): strcpy() the returned string from paddress()
6110 instead of sprintf().
6111 * utils.c (paddress): Return phex_nz().
6113 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6115 * server.c (handle_v_cont): Call mourn_inferior if process
6117 (myresume): Likewise.
6119 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6121 Static tracepoints, and integration with UST.
6123 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6124 * mem-break.c (uninsert_all_breakpoints)
6125 (reinsert_all_breakpoints): New.
6126 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6127 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6128 (gdb_agent_ust_loaded, helper_thread_id)
6129 (gdb_agent_helper_thread_id): New macros.
6130 (struct ipa_sym_addresses): Add addr_ust_loaded,
6131 addr_helper_thread_id, addr_cmd_buf.
6132 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6133 (in_process_agent_loaded_ust): New.
6134 (write_e_ust_not_loaded): New.
6135 (maybe_write_ipa_ust_not_loaded): New.
6136 (struct collect_static_trace_data_action): New.
6137 (enum tracepoint_type) <static_tracepoint>: New.
6138 (struct tracepoint) <handle>: Mention static tracepoints.
6139 (struct static_tracepoint_ctx): New.
6140 (CMD_BUF_SIZE): New.
6141 (add_tracepoint_action): Handle static tracepoint actions.
6142 (unprobe_marker_at): New.
6143 (clear_installed_tracepoints): Handle static tracepoints.
6144 (cmd_qtdp): Handle static tracepoints.
6145 (probe_marker_at): New.
6146 (cmd_qtstart): Handle static tracepoints.
6147 (response_tracepoint): Handle static tracepoints.
6148 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6149 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6150 (get_context_regcache): Handle static tracepoints.
6151 (do_action_at_tracepoint): Handle static tracepoint actions.
6152 (traceframe_find_block_type): Handle static trace data blocks.
6153 (traceframe_read_sdata): New.
6154 (download_tracepoints): Download static tracepoint actions.
6155 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6156 (GDB_PROBE_NAME): New.
6161 (ust_marker_to_static_tracepoint): New.
6163 (collect_ust_data_at_tracepoint): New.
6164 (gdb_ust_probe): New.
6165 (UNIX_PATH_MAX, SOCK_DIR): New.
6166 (gdb_ust_connect_sync_socket): New.
6167 (resume_thread, stop_thread): New.
6168 (run_inferior_command): New.
6169 (init_named_socket): New.
6170 (gdb_ust_socket_init): New.
6171 (cstr_to_hexstr): New.
6173 (first_marker, next_marker): New.
6174 (response_ust_marker): New.
6175 (cmd_qtfstm, cmd_qtsstm): New.
6176 (unprobe_marker_at, probe_marker_at): New.
6177 (cmd_qtstmat, gdb_ust_thread): New.
6178 (gdb_ust_init): New.
6179 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6180 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6182 (x86_64_st_collect_regmap): New.
6183 (X86_64_NUM_ST_COLLECT_GREGS): New.
6184 (AMD64_RIP_REGNUM): New.
6185 (supply_static_tracepoint_registers): New.
6186 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6188 (i386_st_collect_regmap): New.
6189 (i386_NUM_ST_COLLECT_GREGS): New.
6190 (supply_static_tracepoint_registers): New.
6191 * server.c (handle_query): Handle qXfer:statictrace:read.
6192 <qSupported>: Report support for StaticTracepoints, and
6193 qXfer:statictrace:read features.
6194 * server.h (traceframe_read_sdata)
6195 (supply_static_tracepoint_registers): Declare.
6196 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6197 (unpack_varlen_hex): Include in IPA build.
6198 * Makefile.in (ustlibs, ustinc): New.
6199 (IPA_OBJS): Add remote-utils-ipa.o.
6200 ($(IPA_LIB)): Link -ldl and -lpthread.
6202 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6203 * config.in, configure: Regenerate.
6205 2010-06-20 Ian Lance Taylor <iant@google.com>
6206 Pedro Alves <pedro@codesourcery.com>
6208 * linux-x86-low.c (always_true): Delete.
6209 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6210 trying to fool the compiler with always_true.
6212 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6214 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6215 conditions in gdbserver.
6217 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6219 * spu-low.c (spu_read_memory): Wrap around local store limit.
6220 (spu_write_memory): Likewise.
6222 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6224 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6225 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6227 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6229 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6230 uses with LONGEST uses.
6232 2010-06-14 Stan Shebs <stan@codesourcery.com>
6233 Pedro Alves <pedro@codesourcery.com>
6237 * linux-x86-low.c: Include limits.h.
6242 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6243 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6244 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6245 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6246 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6247 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6248 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6249 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6250 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6251 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6252 (amd64_emit_void_call_2): New.
6253 (amd64_emit_ops): New.
6254 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6255 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6256 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6257 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6258 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6259 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6260 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6261 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6262 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6263 (i386_emit_stack_adjust, i386_emit_int_call_1)
6264 (i386_emit_void_call_2): New.
6265 (i386_emit_ops): New.
6266 (x86_emit_ops): New.
6267 (the_low_target): Install x86_emit_ops.
6268 * server.h (struct emit_ops): New.
6269 (get_raw_reg_func_addr): Declare.
6270 (current_insn_ptr, emit_error): Declare.
6271 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6272 (set_trace_state_variable_value): New defines.
6273 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6274 addr_get_trace_state_variable_value and
6275 addr_set_trace_state_variable_value.
6276 (symbol_list): New fields for get_raw_reg,
6277 get_trace_state_variable_value and set_trace_state_variable_value.
6278 (condfn): New typedef.
6279 (struct tracepoint): New field `compiled_cond'.
6280 (do_action_at_tracepoint): Clear compiled_cond.
6281 (get_trace_state_variable_value, set_trace_state_variable_value):
6283 (condition_true_at_tracepoint): If there's a compiled condition,
6285 (current_insn_ptr, emit_error): New globals.
6286 (struct bytecode_address): New.
6287 (get_raw_reg_func_addr): New.
6288 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6289 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6290 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6291 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6292 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6293 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6294 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6295 (compile_tracepoint_condition, compile_bytecodes): New.
6296 * target.h (emit_ops): Forward declare.
6297 (struct target_ops): New field emit_ops.
6298 (target_emit_ops): New.
6299 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6300 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6301 * linux-low.c (linux_emit_ops): New.
6302 (linux_target_ops): Install it.
6303 * linux-low.h (struct linux_target_ops): New field emit_ops.
6305 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6307 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6308 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6310 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6311 Stan Shebs <stan@codesourcery.com>
6313 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6314 (all): Depend on $(extra_libraries).
6315 (install-only): Install the IPA.
6316 (IPA_OBJS, IPA_LIB): New.
6317 (clean): Remove the IPA lib.
6318 (IPAGENT_CFLAGS): New.
6319 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6320 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6321 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6322 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6323 * configure.ac: Check for atomic builtins support in the compiler.
6324 (IPA_DEPFILES, extra_libraries): Define.
6325 * configure.srv (ipa_obj): Add description.
6326 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6327 (i[34567]86-*-linux*): Set ipa_obj.
6328 (x86_64-*-linux*): Set ipa_obj.
6329 * linux-low.c (stabilizing_threads): New.
6330 (supports_fast_tracepoints): New.
6331 (linux_detach): Stabilize threads before detaching.
6332 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6333 the lwp is either not stabilizing, or is moving out of a jump pad.
6334 (linux_fast_tracepoint_collecting): New.
6335 (maybe_move_out_of_jump_pad): New.
6336 (enqueue_one_deferred_signal): New.
6337 (dequeue_one_deferred_signal): New.
6338 (linux_wait_for_event_1): If moving out of a jump pad, defer
6339 pending signals to later.
6340 (linux_stabilize_threads): New.
6341 (linux_wait_1): Check if threads need moving out of jump pads, and
6343 (stuck_in_jump_pad_callback): New.
6344 (move_out_of_jump_pad_callback): New.
6346 (linux_resume_one_lwp): Handle moving out of jump pads.
6347 (linux_set_resume_request): Dequeue deferred signals.
6348 (need_step_over_p): Also step over fast tracepoint jumps.
6349 (start_step_over): Also uninsert fast tracepoint jumps.
6350 (finish_step_over): Also reinsert fast tracepoint jumps.
6351 (linux_install_fast_tracepoint_jump): New.
6352 (linux_target_ops): Install linux_stabilize_threads and
6353 linux_install_fast_tracepoint_jump_pad.
6354 * linux-low.h (linux_target_ops) <get_thread_area,
6355 install_fast_tracepoint_jump_pad>: New fields.
6356 (struct lwp_info) <collecting_fast_tracepoint,
6357 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6358 (linux_get_thread_area): Declare.
6359 * linux-x86-low.c (jump_insn): New.
6360 (x86_get_thread_area): New.
6361 (append_insns): New.
6363 (amd64_install_fast_tracepoint_jump_pad): New.
6364 (i386_install_fast_tracepoint_jump_pad): New.
6365 (x86_install_fast_tracepoint_jump_pad): New.
6366 (the_low_target): Install x86_get_thread_area and
6367 x86_install_fast_tracepoint_jump_pad.
6368 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6369 (struct fast_tracepoint_jump): New.
6370 (fast_tracepoint_jump_insn): New.
6371 (fast_tracepoint_jump_shadow): New.
6372 (find_fast_tracepoint_jump_at): New.
6373 (fast_tracepoint_jump_here): New.
6374 (delete_fast_tracepoint_jump): New.
6375 (set_fast_tracepoint_jump): New.
6376 (uninsert_fast_tracepoint_jumps_at): New.
6377 (reinsert_fast_tracepoint_jumps_at): New.
6378 (set_breakpoint_at): Use write_inferior_memory.
6379 (uninsert_raw_breakpoint): Use write_inferior_memory.
6380 (check_mem_read): Mask out fast tracepoint jumps.
6381 (check_mem_write): Mask out fast tracepoint jumps.
6382 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6383 (set_fast_tracepoint_jump): Declare.
6384 (delete_fast_tracepoint_jump)
6385 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6386 (reinsert_fast_tracepoint_jumps_at): Declare.
6387 * regcache.c: Don't compile many functions when building the
6388 in-process agent library.
6389 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6390 the register buffer in the heap.
6391 (free_register_cache): If the register buffer isn't owned by the
6392 regcache, don't free it.
6393 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6394 pre-existing register caches.
6395 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6397 (convert_ascii_to_int): : Constify `from' parameter type.
6398 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6399 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6400 the needed buffer in-place.
6401 (relocate_instruction): New.
6402 * server.c (handle_query) <qSymbols>: If the target supports
6403 tracepoints, give it a chance of looking up symbols. Report
6404 support for fast tracepoints.
6405 (handle_status): Stabilize threads.
6406 (process_serial_event): Adjust.
6407 * server.h (struct fast_tracepoint_jump): Forward declare.
6408 (struct process_info) <fast_tracepoint_jumps>: New field.
6409 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6410 (decode_X_packet, decode_M_packet): Adjust.
6411 (relocate_instruction): Declare.
6412 (in_process_agent_loaded): Declare.
6413 (tracepoint_look_up_symbols): Declare.
6414 (struct fast_tpoint_collect_status): Declare.
6415 (fast_tracepoint_collecting): Declare.
6416 (force_unlock_trace_buffer): Declare.
6417 (handle_tracepoint_bkpts): Declare.
6418 (initialize_low_tracepoint)
6419 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6420 * target.h (struct target_ops) <stabilize_threads,
6421 install_fast_tracepoint_jump_pad>: New fields.
6422 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6423 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6424 [HAVE_STDINT_H]: Include stdint.h.
6425 (trace_debug_1): Rename to ...
6426 (trace_vdebug): ... this.
6427 (trace_debug): Rename to ...
6428 (trace_debug_1): ... this. Add `level' parameter.
6430 (ATTR_USED, ATTR_NOINLINE): New.
6431 (IP_AGENT_EXPORT): New.
6432 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6433 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6434 (about_to_request_buffer_space, trace_buffer_is_full)
6435 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6436 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6437 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6438 (traceframe_write_count, traceframes_created)
6439 (trace_state_variables)
6440 New renaming defines.
6441 (struct ipa_sym_addresses): New.
6442 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6444 (ipa_sym_addrs): New.
6445 (all_tracepoint_symbols_looked_up): New.
6446 (in_process_agent_loaded): New.
6447 (write_e_ipa_not_loaded): New.
6448 (maybe_write_ipa_not_loaded): New.
6449 (tracepoint_look_up_symbols): New.
6450 (debug_threads) [IN_PROCESS_AGENT]: New.
6451 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6452 (UNKNOWN_SIDE_EFFECTS): New.
6453 (stop_tracing): New.
6454 (flush_trace_buffer): New.
6455 (stop_tracing_bkpt): New.
6456 (flush_trace_buffer_bkpt): New.
6457 (read_inferior_integer): New.
6458 (read_inferior_uinteger): New.
6459 (read_inferior_data_pointer): New.
6460 (write_inferior_data_pointer): New.
6461 (write_inferior_integer): New.
6462 (write_inferior_uinteger): New.
6463 (struct collect_static_trace_data_action): Delete.
6464 (enum tracepoint_type): New.
6465 (struct tracepoint) <type>: New field `type'.
6466 <actions_str, step_actions, step_actions_str>: Only include in
6468 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6469 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6470 (tracepoints): Use IP_AGENT_EXPORT.
6471 (last_tracepoint): Don't include in the IPA.
6472 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6473 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6474 (alloced_trace_state_variables): New.
6475 (trace_state_variables): Use IP_AGENT_EXPORT.
6476 (traceframe_t): Delete unused variable.
6477 (circular_trace_buffer): Don't include in the IPA.
6478 (trace_buffer_start): Delete.
6479 (struct trace_buffer_control): New.
6480 (trace_buffer_free): Delete.
6481 (struct ipa_trace_buffer_control): New.
6482 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6483 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6485 (trace_buffer_ctrl): New.
6486 (TRACE_BUFFER_CTRL_CURR): New.
6487 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6488 Reimplement as macros.
6489 (trace_buffer_wrap): Delete.
6490 (traceframe_write_count, traceframe_read_count)
6491 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6492 (struct tracepoint_hit_ctx) <type>: New field.
6493 (struct fast_tracepoint_ctx): New.
6494 (memory_barrier): New.
6496 (record_tracepoint_error): Update atomically in the IPA.
6497 (clear_inferior_trace_buffer): New.
6498 (about_to_request_buffer_space): New.
6499 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6500 updating the same buffer.
6501 (add_tracepoint): Default the tracepoint's type to trap
6502 tracepoint, and orig_size to -1.
6503 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6505 (create_trace_state_variable): New parameter `gdb'. Handle it.
6506 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6507 (cmd_qtdp): Handle fast tracepoints.
6509 (max_jump_pad_size): New.
6510 (gdb_jump_pad_head): New.
6511 (get_jump_space_head): New.
6512 (claim_jump_space): New.
6513 (sort_tracepoints): New.
6514 (MAX_JUMP_SIZE): New.
6515 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6517 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6518 support. Upload fast traceframes, and delete internal IPA
6520 (stop_tracing_handler): New.
6521 (flush_trace_buffer_handler): New.
6522 (cmd_qtstop): Upload fast tracepoints.
6523 (response_tracepoint): Handle fast tracepoints.
6524 (tracepoint_finished_step): Upload fast traceframes. Set the
6525 tracepoint hit context's tracepoint type.
6526 (handle_tracepoint_bkpts): New.
6527 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6528 type. Add comment about fast tracepoints.
6529 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6530 non-existing action_str field.
6531 (get_context_regcache): Handle fast tracepoints.
6532 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6534 (fast_tracepoint_from_jump_pad_address): New.
6535 (fast_tracepoint_from_ipa_tpoint_address): New.
6536 (collecting_t): New.
6537 (force_unlock_trace_buffer): New.
6538 (fast_tracepoint_collecting): New.
6541 (write_inferior_data_ptr): New.
6542 (target_tp_heap): New.
6543 (target_malloc): New.
6544 (download_agent_expr): New.
6546 (download_tracepoints): New.
6547 (download_trace_state_variables): New.
6548 (upload_fast_traceframes): New.
6549 (IPA_FIRST_TRACEFRAME): New.
6550 (IPA_NEXT_TRACEFRAME_1): New.
6551 (IPA_NEXT_TRACEFRAME): New.
6552 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6553 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6554 (gdb_jump_pad_buffer_end): New.
6555 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6556 (initialize_tracepoint): Adjust.
6557 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6558 buffer. Initialize the low module.
6559 * utils.c (PREFIX, TOOLNAME): New.
6560 (malloc_failure): Use PREFIX.
6561 (error): In the IPA, an error causes an exit.
6562 (fatal, warning): Use PREFIX.
6563 (internal_error): Use TOOLNAME.
6564 (NUMCELLS): Increase to 10.
6565 * configure, config.in: Regenerate.
6567 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6569 * server.c (handle_query) <qSupported>: Do two passes over the
6570 qSupported string to avoid nesting strtok.
6572 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6574 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6576 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6578 * configure: Regenerate.
6579 * proc-service.list: New.
6581 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6583 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6586 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6588 * gdbreplay.c (remote_open): Check error return from socket() call by
6589 its equality to -1 not by it being negative.
6590 * remote-utils.c (remote_open): Likewise.
6592 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6594 * config.h: Regenerate.
6596 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6598 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6599 doesn't provide PTRACE_GET_THREAD_AREA.
6601 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6603 * linux-m68k-low.c: Include <asm/ptrace.h>
6604 (ps_get_thread_area): Implement.
6606 2010-05-03 Doug Evans <dje@google.com>
6608 * event-loop.c (struct callback_event): New struct.
6609 (callback_list): New global.
6610 (append_callback_event, delete_callback_event): New functions.
6611 (process_callback): New function.
6612 (start_event_loop): Call it.
6613 * remote-utils.c (NOT_SCHEDULED): Define.
6614 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6615 moved out of readchar.
6616 (readchar): Rewrite. Call reschedule before returning.
6617 (reset_readchar): New function.
6618 (remote_close): Call it.
6619 (process_remaining, reschedule): New functions.
6620 * server.h (callback_handler_func): New typedef.
6621 (append_callback_event, delete_callback_event): Declare.
6623 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6625 * proc-service.c (ps_pglobal_lookup): Use
6626 thread_db_look_up_one_symbol.
6627 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6628 parameter. Use it instead of all_symbols_looked_up.
6629 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6631 (all_symbols_looked_up): Don't declare.
6632 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6633 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6635 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6636 Set all_symbols_looked_up here.
6637 (thread_db_look_up_one_symbol): New.
6638 (thread_db_get_tls_address): Adjust.
6639 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6640 thread_db object on the heap, and tentatively set it in the
6642 (thread_db_init): Don't set all_symbols_looked_up here.
6643 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6645 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6647 * linux-low.c (linux_kill, linux_detach): Adjust.
6648 (status_pending_p_callback): Remove redundant statement. Check
6649 for !TARGET_WAITIKIND_IGNORE, instead of
6650 TARGET_WAITKIND_STOPPED.
6651 (handle_tracepoints): Make sure LWP is locked. Adjust.
6652 (linux_wait_for_event_1): Adjust.
6653 (linux_cancel_breakpoints): New.
6654 (unsuspend_one_lwp): New.
6655 (unsuspend_all_lwps): New.
6656 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6657 (send_sigstop_callback): Change return type to int, add new
6658 `except' parameter and handle it.
6659 (suspend_and_send_sigstop_callback): New.
6660 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6661 pass them down. If SUSPEND, also increment the lwp's suspend
6663 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6664 (need_step_over_p): Don't consider suspended LWPs.
6665 (start_step_over): Adjust.
6666 (proceed_one_lwp): Change return type to int, add new `except'
6667 parameter and handle it.
6668 (unsuspend_and_proceed_one_lwp): New.
6669 (proceed_all_lwps): Use find_inferior instead of
6671 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6672 also decrement the suspend count of LWPs. Pass `except' down,
6673 instead of hacking its suspend count.
6674 (linux_pause_all): Add `freeze' parameter. Adjust.
6675 (linux_unpause_all): New.
6676 (linux_target_ops): Install linux_unpause_all.
6677 * server.c (handle_status): Adjust.
6678 * target.h (struct target_ops): New fields `unpause_all' and
6679 `cancel_breakpoints'. Add new parameter to `pause_all'.
6680 (pause_all): Add new `freeze' parameter.
6682 (cancel_breakpoints): New.
6683 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6685 (cmd_qtstart): Pause threads.
6686 (stop_tracing): Pause threads, and cancel breakpoints.
6687 * win32-low.c (win32_target_ops): Adjust.
6689 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6691 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6692 the inferior right away from here...
6693 (linux_wait_1): ... to here, and adjust to check the thread's
6694 last_resume_kind instead of the lwp's step or stop_expected flags.
6696 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6698 * README: Use consistent `GDB' and `GDBserver' spellings.
6700 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6702 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6703 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6704 (linux_detach_one_lwp): Assume the lwp is stopped.
6705 (any_thread_of): Delete.
6706 (linux_detach): Stop all lwps here. Don't blindly delete all
6708 (delete_lwp_callback): New.
6709 (linux_mourn): Delete all lwps of the process that is gone.
6710 (linux_wait_1): Don't delete the last lwp of the process here.
6711 * mem-break.h (mark_breakpoints_out): Declare.
6712 * mem-break.c (mark_breakpoints_out): New.
6713 (free_all_breakpoints): Use it.
6714 * server.c (handle_target_event): If the process is gone, mark
6716 * thread-db.c (struct thread_db) <create_bp>: New field.
6717 (thread_db_enable_reporting): Fix prototype. Store a thread event
6718 breakpoint reference in the thread_db struct.
6719 (thread_db_load_search): Clear the thread_db object.
6720 (try_thread_db_load_1): Ditto.
6721 (switch_to_process): New.
6722 (disable_thread_event_reporting): Use it.
6723 (remove_thread_event_breakpoints): New.
6724 (thread_db_detach, thread_db_mourn): Use it.
6726 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6728 * linux-low.c (linux_enable_event_reporting): New.
6729 (linux_wait_for_event_1, handle_extended_wait): Use it.
6731 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6733 * linux-low.c (linux_kill_one_lwp, linux_kill)
6734 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6735 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6736 SIGSTOP even if the LWP is stopped.
6737 (send_sigstop_callback): New.
6738 (stop_all_lwps): Use send_sigstop_callback instead.
6739 (linux_resume_one_thread): Adjust.
6740 (proceed_one_lwp): Still proceed an LWP that the client has
6741 requested to stop, if we haven't reported it as stopped yet. Make
6742 sure that LWPs the client want stopped, have a pending SIGSTOP.
6744 2010-04-26 Doug Evans <dje@google.com>
6746 * server.c (handle_general_set): Make static.
6748 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6749 Print received char after testing for error/eof instead of before.
6750 (input_interrupt): Tweak comment.
6752 2010-04-23 Doug Evans <dje@google.com>
6754 * server.c (start_inferior): Print inferior argv if --debug.
6756 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6758 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6759 * nto-x86-low.c: Include server.h
6761 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6763 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6764 be consistent with other sources of this directory.
6765 (init_registers_amd64): Correct name of source file of this function
6768 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6770 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6773 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6775 * win32-i386-low.c: Add 64-bit support.
6776 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6777 (init_registers_amd64): Declare.
6778 (mappings): Add 64-bit version of array.
6779 (init_windows_x86): New function.
6780 (the_low_target): Change init_arch field to init_windows_x86.
6782 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6784 * win32-low.c: Adapt to support also 64-bit architecture.
6785 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6786 (get_image_name): Use SIZE_T type for local variable `done'.
6787 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6788 (toolhelp_get_dll_name): Idem.
6789 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6790 Use uintptr_t typecast to avoid warning.
6791 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6792 (handle_exception): Use phex_nz to avoid warning.
6793 (win32_wait): Remove unused local variable `process'.
6795 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6797 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6800 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6802 * configure.ac: Use `ws2_32' library for srv_mingw.
6803 * configure: Regenerate.
6804 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6805 * remote-utils.c: Likewise.
6807 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6809 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6810 if __x86_64__ is defined.
6812 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6814 * configure: Regenerate.
6816 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6818 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6819 * target.h (target_ops): New get_tib_address field.
6820 * win32-low.h (win32_thread_info): Add thread_local_base field.
6821 * win32-low.c (child_add_thread): Add tlb argument.
6822 Set thread_local_base field to TLB.
6823 (get_child_debug_event): Adapt to child_add_thread change.
6824 (win32_get_tib_address): New function.
6825 (win32_target_ops): Set get_tib_address field to
6826 win32_get_tib_address.
6827 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6829 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6831 * linux-low.c (linux_mourn): Also remove the process.
6832 * server.c (handle_target_event): Don't remove the process here.
6833 * nto-low.c (nto_mourn): New.
6834 (nto_target_ops): Install it.
6835 * spu-low.c (spu_mourn): New.
6836 (spu_target_ops): Install it.
6837 * win32-low.c (win32_mourn): New.
6838 (win32_target_ops): Install it.
6840 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6842 * server.h (buffer_xml_printf): Remove redundant `;'.
6844 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6846 * regcache.c (set_register_cache): Invalidate regcaches before
6847 changing the register cache layout.
6848 (regcache_invalidate_one): Allow a NULL regcache.
6849 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6850 regcaches before changing the register cache layout or the target
6853 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6855 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6856 variable warning on Linux/x86-64.
6858 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6860 GDBserver disconnected tracing support.
6862 * linux-low.c (linux_remove_process): Delete.
6863 (add_lwp): Don't set last_resume_kind here.
6864 (linux_kill): Use `mourn'.
6865 (linux_detach): Use `thread_db_detach', and `mourn'.
6867 (linux_attach_lwp_1): Adjust comment.
6868 (linux_attach): last_resume_kind moved the thread_info; adjust.
6869 (status_pending_p_callback): Adjust.
6870 (linux_wait_for_event_1): Adjust.
6871 (count_events_callback, select_singlestep_lwp_callback)
6872 (select_event_lwp_callback, cancel_breakpoints_callback)
6873 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6874 (proceed_one_lwp): Adjust.
6875 (linux_async): Add debug output.
6876 (linux_thread_stopped): New.
6877 (linux_pause_all): New.
6878 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6880 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6881 (thread_db_free): Delete declaration.
6882 (thread_db_detach, thread_db_mourn): Declare.
6883 * thread-db.c (thread_db_init): Use thread_db_mourn.
6884 (thread_db_free): Delete, split in two.
6885 (disable_thread_event_reporting): New.
6886 (thread_db_detach): New.
6887 (thread_db_mourn): New.
6889 * server.h (struct thread_info) <last_resume_kind>: New field.
6890 <attached>: Add comment.
6891 <gdb_detached>: New field.
6892 (handler_func): Change return type to int.
6893 (handle_serial_event, handle_target_event): Ditto.
6894 (gdb_connected): Declare.
6896 (disconnected_tracing): Declare.
6897 (stop_tracing): Declare.
6899 * server.c (handle_query) <qSupported>: Report support for
6900 disconnected tracing.
6901 (queue_stop_reply_callback): Account for running threads.
6902 (gdb_wants_thread_stopped): New.
6903 (gdb_wants_all_threads_stopped): New.
6904 (gdb_reattached_process): New.
6905 (handle_status): Clear the `gdb_detached' flag of all processes.
6906 In all-stop, stop all threads.
6907 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6908 (process_serial_event): If the remote connection breaks, or if an
6909 exit was forced with "monitor exit", force an event loop exit.
6910 Handle disconnected tracing on detach.
6911 (handle_serial_event): Adjust.
6912 (handle_target_event): If GDB isn't connected, forward events back
6913 to the inferior, unless the last process exited, in which case,
6914 exit gdbserver. Adjust interface.
6916 * remote-utils.c (remote_open): Don't block in accept. Instead
6917 register an event loop source on the listen socket file
6918 descriptor. Refactor bits into ...
6919 (listen_desc): ... this new global.
6920 (gdb_connected): ... this new function.
6921 (enable_async_notification): ... this new function.
6922 (handle_accept_event): ... this new function.
6923 (remote_close): Clear remote_desc.
6925 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6927 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6929 (mourn_inferior): Define.
6930 (target_process_qsupported): Avoid the dangling else problem.
6931 (thread_stopped): Define.
6932 (pause_all): Define.
6933 (target_waitstatus_to_string): Declare.
6934 * target.c (target_waitstatus_to_string): New.
6936 * tracepoint.c (tracing): Make extern.
6937 (disconnected_tracing): New.
6938 (stop_tracing): Make extern. Handle tracing stops due to GDB
6940 (cmd_qtdisconnected): New.
6941 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6942 (handle_tracepoint_general_set): Handle QTDisconnected.
6944 * event-loop.c (event_handler_func): Change return type to int.
6945 (process_event): Bail out if the event handler wants the event
6947 (handle_file_event): Ditto.
6948 (start_event_loop): Bail out if the event handler wants the event
6951 * nto-low.c (nto_target_ops): Adjust.
6952 * spu-low.c (spu_wait): Don't remove the process here.
6953 (spu_target_ops): Adjust.
6954 * win32-low.c (win32_wait): Don't remove the process here.
6955 (win32_target_ops): Adjust.
6957 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6959 * regcache.c (realloc_register_cache): Invalidate inferior's
6960 regcache before recreating it.
6962 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6964 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6966 2010-04-09 Stan Shebs <stan@codesourcery.com>
6967 Pedro Alves <pedro@codesourcery.com>
6969 * server.h (LONGEST): New.
6970 (struct thread_info) <while_stepping>: New field.
6971 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6973 (initialize_tracepoint, handle_tracepoint_general_set)
6974 (handle_tracepoint_query, tracepoint_finished_step)
6975 (tracepoint_was_hit, release_while_stepping_state_list):
6976 (current_traceframe): Declare.
6977 * server.c (handle_general_set): Handle tracepoint packets.
6979 (write_memory): New.
6980 (handle_search_memory_1): Use read_memory.
6981 (handle_query): Report support for conditional tracepoints, trace
6982 state variables, and tracepoint sources. Handle tracepoint
6984 (main): Initialize the tracepoints module.
6985 (process_serial_event): Handle traceframe reads/writes.
6987 * linux-low.c (handle_tracepoints): New.
6988 (linux_wait_1): Call it.
6989 (linux_resume_one_lwp): Handle while-stepping.
6990 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6991 (linux_target_ops): Install them.
6992 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6994 * linux-x86-low.c (x86_supports_tracepoints): New.
6995 (the_low_target). Install it.
6997 * mem-break.h (delete_breakpoint): Declare.
6998 * mem-break.c (delete_breakpoint): Make external.
7000 * target.h (struct target_ops): Add `supports_tracepoints',
7001 `read_pc', and `write_pc' fields.
7002 (target_supports_tracepoints): Define.
7003 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7006 * regcache.h (struct regcache) <registers_owned>: New field.
7007 (init_register_cache, regcache_cpy): Declare.
7008 (regcache_read_pc, regcache_write_pc): Declare.
7009 (register_cache_size): Declare.
7010 (supply_regblock): Declare.
7011 * regcache.c (init_register_cache): New.
7012 (new_register_cache): Use it.
7013 (regcache_cpy): New.
7014 (register_cache_size): New.
7015 (supply_regblock): New.
7016 (regcache_read_pc, regcache_write_pc): New.
7018 * tracepoint.c: New.
7020 * Makefile.in (OBS): Add tracepoint.o.
7021 (tracepoint.o): New rule.
7023 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7025 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7027 (i386-mmx.c): Likewise.
7028 (i386-mmx-linux.o): Likewise.
7029 (i386-mmx-linux.c): Likewise.
7031 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7032 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7033 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7034 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7036 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7037 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7038 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7040 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7042 * Makefile.in (clean): Updated.
7044 (i386-avx.c): Likewise.
7045 (i386-avx-linux.o): Likewise.
7046 (i386-avx-linux.c): Likewise.
7047 (amd64-avx.o): Likewise.
7048 (amd64-avx.c): Likewise.
7049 (amd64-avx-linux.o): Likewise.
7050 (amd64-avx-linux.c): Likewise.
7052 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7053 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7054 (srv_amd64_regobj): Add amd64-avx.o.
7055 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7056 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7057 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7058 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7059 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7060 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7061 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7063 * i387-fp.c: Include "i386-xstate.h".
7065 (i387_cache_to_xsave): Likewise.
7066 (i387_xsave_to_cache): Likewise.
7067 (x86_xcr0): Likewise.
7069 * i387-fp.h (i387_cache_to_xsave): Likewise.
7070 (i387_xsave_to_cache): Likewise.
7071 (x86_xcr0): Likewise.
7073 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7074 * linux-crisv32-low.c (target_regsets): Likewise.
7075 * linux-m68k-low.c (target_regsets): Likewise.
7076 * linux-mips-low.c (target_regsets): Likewise.
7077 * linux-ppc-low.c (target_regsets): Likewise.
7078 * linux-s390-low.c (target_regsets): Likewise.
7079 * linux-sh-low.c (target_regsets): Likewise.
7080 * linux-sparc-low.c (target_regsets): Likewise.
7081 * linux-xtensa-low.c (target_regsets): Likewise.
7083 * linux-low.c: Include <sys/uio.h>.
7084 (regsets_fetch_inferior_registers): Support nt_type.
7085 (regsets_store_inferior_registers): Likewise.
7086 (linux_process_qsupported): New.
7087 (linux_target_ops): Add linux_process_qsupported.
7089 * linux-low.h (regset_info): Add nt_type.
7090 (linux_target_ops): Add process_qsupported.
7092 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7094 (init_registers_i386_avx_linux): New.
7095 (init_registers_amd64_avx_linux): Likewise.
7096 (xmltarget_i386_linux_no_xml): Likewise.
7097 (xmltarget_amd64_linux_no_xml): Likewise.
7098 (PTRACE_GETREGSET): Likewise.
7099 (PTRACE_SETREGSET): Likewise.
7100 (x86_fill_xstateregset): Likewise.
7101 (x86_store_xstateregset): Likewise.
7102 (use_xml): Likewise.
7103 (x86_linux_update_xmltarget): Likewise.
7104 (x86_linux_process_qsupported): Likewise.
7105 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7106 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7107 init_registers_i386_linux here. Call
7108 x86_linux_update_xmltarget.
7109 (the_low_target): Add x86_linux_process_qsupported.
7111 * server.c (handle_query): Call target_process_qsupported.
7113 * target.h (target_ops): Add process_qsupported.
7114 (target_process_qsupported): New.
7116 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7118 * inferiors.c (add_thread): Set last_status kind to
7119 TARGET_WAITKIND_IGNORE.
7120 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7121 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7122 (linux_wait_1): Move `thread' local definition to block that uses
7123 it. Don't NULL initialize `event_child'.
7124 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7125 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7126 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7128 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7130 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7131 an extended waitstatus, or by a watchpoint.
7132 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7133 thread was stepping or has been stopped by a watchpoint.
7135 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7137 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7138 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7139 of another, then delete the previous, and validate all
7141 (validate_inserted_breakpoint): New.
7142 (delete_disabled_breakpoints): New.
7143 (validate_breakpoints): New.
7144 (check_mem_read): Validate breakpoints before trusting their
7145 shadow. Delete disabled breakpoints.
7146 (check_mem_write): Validate breakpoints before trusting they
7147 should be inserted. Delete disabled breakpoints.
7148 * mem-break.h (validate_breakpoints):
7149 * server.c (handle_query): Validate breakpoints when we see a
7152 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7154 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7155 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7156 if we could tell there's a GDB breakpoint at stop_pc.
7157 (need_step_over_p): Don't do a step over if we find a GDB
7158 breakpoint at the resume PC.
7160 * mem-break.c (struct raw_breakpoint): New.
7161 (enum bkpt_type): New type `gdb_breakpoint'.
7162 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7163 fields. New field `raw'.
7164 (find_raw_breakpoint_at): New.
7165 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7167 (set_breakpoint_at): Adjust.
7168 (delete_raw_breakpoint): New.
7169 (release_breakpoint): New.
7170 (delete_breakpoint): Rename to...
7171 (delete_breakpoint_1): ... this. Add proc parameter. Use
7172 release_breakpoint. Return ENOENT.
7173 (delete_breakpoint): Reimplement.
7174 (find_breakpoint_at): Delete.
7175 (find_gdb_breakpoint_at): New.
7176 (delete_breakpoint_at): Delete.
7177 (set_gdb_breakpoint_at): New.
7178 (delete_gdb_breakpoint_at): New.
7179 (gdb_breakpoint_here): New.
7180 (set_reinsert_breakpoint): Use release_breakpoint.
7181 (uninsert_breakpoint): Rename to ...
7182 (uninsert_raw_breakpoint): ... this.
7183 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7184 (reinsert_raw_breakpoint): Change parameter type to
7186 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7188 (check_breakpoints): Adjust. Use release_breakpoint.
7189 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7190 (breakpoint_inserted_here): Ditto.
7191 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7192 Don't trust the breakpoint's shadow if it is not inserted.
7193 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7194 (delete_all_breakpoints): Adjust.
7195 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7196 use delete_breakpoint_1.
7198 * mem-break.h (breakpoints_supported): Delete declaration.
7199 (set_gdb_breakpoint_at): Declare.
7200 (gdb_breakpoint_here): Declare.
7201 (delete_breakpoint_at): Delete.
7202 (delete_gdb_breakpoint_at): Declare.
7204 * server.h (struct raw_breakpoint): Forward declare.
7205 (struct process_info): New field `raw_breakpoints'.
7207 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7210 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7212 * linux-low.c (status_pending_p_callback): Fix comment.
7213 (linux_wait_for_event_1): Move most of the internal breakpoint
7214 handling from here...
7215 (linux_wait_1): ... to here.
7216 (count_events_callback): New.
7217 (select_singlestep_lwp_callback): New.
7218 (select_event_lwp_callback): New.
7219 (cancel_breakpoints_callback): New.
7220 (select_event_lwp): New.
7221 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7222 priority to all LWPs that have had events that should be reported
7223 to the client. Cancel breakpoints when about to reporting the
7224 event to the client, not while stopping lwps. No longer cancel
7225 finished single-steps here.
7226 (cancel_finished_single_step): Delete.
7227 (cancel_finished_single_steps): Delete.
7229 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7231 * mem-break.c (enum bkpt_type): New.
7232 (struct breakpoint): New field `type'.
7233 (set_breakpoint_at): Change return type to struct breakpoint
7234 pointer. Set type to `other_breakpoint' by default.
7235 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7236 in the breakpoint list.
7237 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7238 (reinsert_breakpoint): Rename to ...
7239 (reinsert_raw_breakpoint): ... this.
7240 (reinsert_breakpoints_at): Adjust.
7241 * mem-break.h (struct breakpoint): Declare.
7242 (set_breakpoint_at): Change return type to struct breakpoint
7245 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7247 * server.c (handle_query): Assign, not compare.
7249 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7251 Teach linux gdbserver to step-over-breakpoints.
7253 * linux-low.c (can_hardware_single_step): New.
7254 (supports_breakpoints): New.
7255 (handle_extended_wait): If stopping threads, read the stop pc of
7258 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7259 low target doesn't support retrieving the PC.
7260 (add_lwp): Set last_resume_kind to resume_continue.
7261 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7262 (linux_attach): Don't clear stop_expected. Set the lwp's
7263 last_resume_kind to resume_stop.
7264 (linux_detach_one_lwp): Don't check for removed breakpoints.
7265 (check_removed_breakpoint): Delete.
7266 (status_pending_p): Rename to ...
7267 (status_pending_p_callback): ... this. Don't check for removed
7268 breakpoints. Don't consider threads that are stopped from GDB's
7270 (linux_wait_for_lwp): Always read the stop_pc here.
7271 (cancel_breakpoint): New.
7272 (step_over_bkpt): New global.
7273 (linux_wait_for_event_1): Implement stepping over breakpoints.
7274 (gdb_wants_lwp_stopped): New.
7275 (gdb_wants_all_stopped): New.
7276 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7277 single-step traps here. Store the thread's last reported target
7279 (send_sigstop): Don't clear stop_expected. Always set it,
7281 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7282 (cancel_finished_single_step): New.
7283 (cancel_finished_single_steps): New.
7284 (wait_for_sigstop): Don't cancel finished single-step traps here.
7285 (linux_resume_one_lwp): Don't check for removed breakpoints.
7286 Don't set `step' on non-hardware step archs.
7287 (linux_set_resume_request): Ignore resume_stop requests if already
7288 stopping or stopped. Set the lwp's last_resume_kind.
7289 (resume_status_pending_p): Don't check for removed breakpoints.
7290 (need_step_over_p): New.
7291 (start_step_over): New.
7292 (finish_step_over): New.
7293 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7294 requests. Clear the thread's last reported target waitstatus.
7295 Don't use the `suspended' flag. Don't consider pending breakpoints.
7296 (linux_resume): Start a step-over if necessary.
7297 (proceed_one_lwp): New.
7298 (proceed_all_lwps): New.
7299 (unstop_all_lwps): New.
7300 * linux-low.h (struct lwp_info): Rewrite comment for the
7301 `suspended' flag. Add the `stop_pc' field. Delete the
7302 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7303 Add `'last_resume_kind' and `need_step_over' fields.
7304 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7305 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7306 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7307 (set_raw_breakpoint_at): New.
7308 (set_breakpoint_at): Rewrite to use it.
7309 (reinsert_breakpoint_handler): Delete.
7310 (set_reinsert_breakpoint): New.
7311 (reinsert_breakpoint_by_bp): Delete.
7312 (delete_reinsert_breakpoints): New.
7313 (uninsert_breakpoint): Rewrite.
7314 (uninsert_breakpoints_at): New.
7315 (reinsert_breakpoint): Rewrite.
7316 (reinsert_breakpoints_at): New.
7317 (check_breakpoints): Rewrite.
7318 (breakpoint_here): New.
7319 (breakpoint_inserted_here): New.
7320 (check_mem_read): Adjust.
7321 * mem-break.h (breakpoints_supported, breakpoint_here)
7322 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7323 (reinsert_breakpoint_by_bp): Delete declaration.
7324 (delete_reinsert_breakpoints): Declare.
7325 (reinsert_breakpoint): Delete declaration.
7326 (reinsert_breakpoints_at): Declare.
7327 (uninsert_breakpoint): Delete declaration.
7328 (uninsert_breakpoints_at): Declare.
7329 (check_breakpoints): Adjust prototype.
7330 * server.h: Adjust include order.
7331 (struct thread_info): Declare here. Add a `last_status' field.
7333 2010-03-23 Michael Snyder <msnyder@vmware.com>
7335 * server.c (crc32): New function.
7336 (handle_query): Add handling for 'qCRC:' request.
7338 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7340 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7341 lwp had been stopped by a watchpoint.
7343 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7345 * server.h (internal_error): Declare.
7346 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7347 * utils.c (internal_error): New function.
7349 2010-03-15 Andreas Schwab <schwab@redhat.com>
7351 * configure.srv: Fix typo setting srv_regobj.
7353 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7355 * linux-low.c (fetch_register): Avoid passing a non string literal
7357 (usr_store_inferior_registers): Ditto.
7359 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7361 * linux-low.c (linux_write_memory): Bail out early if peeking
7364 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7366 * linux-low.h (struct lwp_info): New fields
7367 `stopped_by_watchpoint' and `stopped_data_address'.
7368 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7369 here, and cache them in the lwp object.
7370 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7372 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7374 (linux_stopped_by_watchpoint): Rewrite.
7375 (linux_stopped_data_address): Rewrite.
7377 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7379 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7380 switching the current inferior, not before.
7382 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7384 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7385 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7386 i386-linux.c and amd64-linux.c.
7387 (reg-i386.o): Removed.
7388 (reg-i386.c): Likewise.
7389 (reg-i386-linux.o): Likewise.
7390 (reg-i386-linux.c): Likewise.
7391 (reg-x86-64.o): Likewise.
7392 (reg-x86-64.c): Likewise.
7393 (reg-x86-64-linux.o): Likewise.
7394 (reg-x86-64-linux.c): Likewise.
7397 (i386-linux.o): Likewise.
7398 (i386-linux.c): Likewise.
7399 (amd64.o): Likewise.
7400 (amd64.c): Likewise.
7401 (amd64-linux.o): Likewise.
7402 (amd64-linux.c): Likewise.
7404 * configure.srv (srv_i386_regobj): New.
7405 (srv_i386_linux_regobj): Likewise.
7406 (srv_amd64_regobj): Likewise.
7407 (srv_amd64_linux_regobj): Likewise.
7408 (srv_i386_32bit_xmlfiles): Likewise.
7409 (srv_i386_64bit_xmlfiles): Likewise.
7410 (srv_i386_xmlfiles): Likewise.
7411 (srv_amd64_xmlfiles): Likewise.
7412 (srv_i386_linux_xmlfiles): Likewise.
7413 (srv_amd64_linux_xmlfiles): Likewise.
7414 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7415 srv_xmlfiles to $srv_i386_xmlfiles.
7416 (i[34567]86-*-mingw32ce*): Likewise.
7417 (i[34567]86-*-mingw*): Likewise.
7418 (i[34567]86-*-nto*): Likewise.
7419 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7420 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7421 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7422 (x86_64-*-linux*): Likewise.
7424 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7425 (init_registers_amd64_linux): New.
7426 (x86_arch_setup): Replace init_registers_x86_64_linux with
7427 init_registers_amd64_linux.
7429 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7431 * configure.ac: Check for libdl. If it is not available link against
7432 static libthread_db.
7433 * configure: Regenerate.
7435 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7439 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7440 handing a read watchpoint.
7441 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7443 2010-02-12 Doug Evans <dje@google.com>
7445 * linux-low.c (linux_supports_tracefork_flag): Document.
7446 (linux_look_up_symbols): Add comment.
7448 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7450 * regcache.c (supply_register): Clear regcache if buf is NULL.
7452 2010-02-02 Nicolas Roche <roche@sourceware.org>
7453 Joel Brobecker <brobecker@adacore.com>
7455 * inferiors.c (find_inferior): Add function documentation.
7456 (unloaded_dll): Handle the case where the unloaded dll has not
7457 been previously registered in the dll list.
7459 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7461 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7462 (thumb2_breakpoint): New.
7463 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7465 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7467 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7468 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7471 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7473 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7475 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7477 * linux-s390-low.c (s390_collect_ptrace_register)
7478 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7480 2010-01-21 Doug Evans <dje@google.com>
7482 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7483 (PTRACE_ARG4_TYPE): New macro.
7484 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7485 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7486 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7487 (usr_store_inferior_registers): Ditto.
7488 (linux_read_memory, linux_write_memory): Ditto.
7489 (linux_test_for_tracefork): Ditto.
7491 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7492 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7494 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7496 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7499 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7501 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7502 prototype to take a regcache. Adjust.
7504 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7506 * regcache.h (struct thread_info): Forward declare.
7507 (struct regcache): New.
7508 (new_register_cache): Adjust prototype.
7509 (get_thread_regcache): Declare.
7510 (free_register_cache): Adjust prototype.
7511 (registers_to_string, registers_from_string): Ditto.
7512 (supply_register, supply_register_by_name, collect_register)
7513 (collect_register_as_string, collect_register_by_name): Ditto.
7514 * regcache.c (struct inferior_regcache_data): Delete.
7515 (get_regcache): Rename to ...
7516 (get_thread_regcache): ... this. Adjust. Switch inferior before
7518 (regcache_invalidate_one): Adjust.
7519 (regcache_invalidate): Fix prototype.
7520 (new_register_cache): Return the new register cache.
7521 (free_register_cache): Change prototype.
7522 (realloc_register_cache): Adjust.
7523 (registers_to_string): Change prototype to take a regcache. Adjust.
7524 (registers_from_string): Ditto.
7525 (register_data): Ditto.
7526 (supply_register): Ditto.
7527 (supply_register_by_name): Ditto.
7528 (collect_register): Ditto.
7529 (collect_register_as_string): Ditto.
7530 (collect_register_by_name): Ditto.
7531 * server.c (process_serial_event): Adjust.
7532 * linux-low.h (regset_fill_func, regset_store_func): Change
7534 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7536 * linux-low.c (get_stop_pc): Adjust.
7537 (check_removed_breakpoint): Adjust.
7538 (linux_wait_for_event): Adjust.
7539 (linux_resume_one_lwp): Adjust.
7540 (fetch_register): Add regcache parameter. Adjust.
7541 (usr_store_inferior_registers): Ditto.
7542 (regsets_fetch_inferior_registers): Ditto.
7543 (regsets_store_inferior_registers): Ditto.
7544 (linux_fetch_registers, linux_store_registers): Ditto.
7545 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7547 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7549 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7550 prototype to take a regcache.
7551 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7552 * remote-utils.c (convert_ascii_to_int, outreg)
7553 (prepare_resume_reply): Change prototype to take a regcache.
7555 * target.h (struct target_ops) <fetch_registers, store_registers>:
7556 Change prototype to take a regcache.
7557 (fetch_inferior_registers, store_inferior_registers): Change
7558 prototype to take a regcache. Adjust.
7559 * proc-service.c (ps_lgetregs): Adjust.
7560 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7561 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7562 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7563 take a regcache. Adjust.
7564 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7565 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7566 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7567 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7568 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7569 (cris_cannot_fetch_register):
7570 (cris_breakpoint_at): Change prototype to take a regcache.
7572 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7573 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7574 to take a regcache. Adjust.
7575 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7577 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7578 take a regcache. Adjust.
7579 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7580 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7581 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7582 * linux-mips-low.c (mips_get_pc):
7583 (mips_set_pc): Change prototype to take a regcache. Adjust.
7584 (mips_reinsert_addr): Adjust.
7585 (mips_collect_register): Change prototype to take a regcache.
7587 (mips_supply_register):
7588 (mips_collect_register_32bit, mips_supply_register_32bit)
7589 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7590 (mips_store_fpregset): Ditto.
7591 * linux-ppc-low.c (ppc_supply_ptrace_register)
7592 (ppc_supply_ptrace_register): Ditto.
7593 (parse_spufs_run): Adjust.
7594 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7595 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7596 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7597 take a regcache. Adjust.
7598 * linux-s390-low.c (s390_collect_ptrace_register)
7599 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7600 (s390_set_pc): Change prototype to take a regcache. Adjust.
7601 (s390_arch_setup): Adjust.
7602 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7603 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7604 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7605 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7606 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7608 (sparc_breakpoint_at): Adjust.
7609 * linux-xtensa-low.c (xtensa_fill_gregset):
7610 (xtensa_store_gregset):
7611 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7612 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7613 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7614 prototype to take a regcache. Adjust.
7615 * win32-arm-low.c (arm_fetch_inferior_register)
7616 (arm_store_inferior_register): Change prototype to take a
7618 * win32-i386-low.c (i386_fetch_inferior_register)
7619 (i386_store_inferior_register): Change prototype to take a
7621 * win32-low.c (child_fetch_inferior_registers)
7622 (child_store_inferior_registers): Change prototype to take a
7624 (win32_wait): Adjust.
7625 (win32_fetch_inferior_registers): Change prototype to take a
7627 (win32_store_inferior_registers): Adjust.
7628 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7629 store_inferior_register>: Change prototype to take a regcache.
7631 2010-01-20 Doug Evans <dje@google.com>
7633 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7635 (linux_wait_for_event1, linux_init_signals): Ditto.
7636 (W_STOPCODE): Provide definition if missing.
7638 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7640 * linux-low.c (linux_core_of_thread): New.
7641 (compare_ints, show_process, list_threads): New.
7642 (linux_qxfer_osdata): Report threads and cores.
7643 (linux_target_op): Register linux_core_of_thread.
7644 * remote-utils.c (prepare_resume_reply): Report the core.
7645 (buffer_xml_printf): Support %d specifier.
7646 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7648 (handle_query): Handle qXfer:threads. Announce availability
7650 * target.h (struct target_ops): New field core_of_thread.
7652 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7654 * Makefile.in (clean): Remove new generated files.
7655 (reg-s390.o, reg-s390.c): Remove rules.
7656 (reg-s390x.o, reg-s390x.c): Likewise.
7657 (s390-linux32.o, s390-linux32.c): Add rules.
7658 (s390-linux64.o, s390-linux64.c): Likewise.
7659 (s390x-linux64.o, s390x-linux64.c): Likewise.
7660 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7661 * linux-s390-low.c: Include <elf.h>.
7662 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7663 (init_registers_s390): Remove prototype.
7664 (init_registers_s390x): Likewise.
7665 (init_registers_s390_linux32): Add prototype.
7666 (init_registers_s390_linux64): Likewise.
7667 (init_registers_s390x_linux64): Likewise.
7668 (s390_num_regs_3264): New define.
7669 (s390_regmap_3264): New global variable.
7670 (s390_cannot_fetch_register): Remove obsolete check.
7671 (s390_cannot_store_register): Likewise.
7672 (s390_collect_ptrace_register): Handle upper/lower register halves.
7673 (s390_supply_ptrace_register): Likewise.
7674 (s390_fill_gregset): Update to register number changes.
7675 (s390_get_hwcap): New routine.
7676 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7677 Install appropriate regmap and register set.
7679 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7681 * server.c (gdbserver_version): Update copyright year to 2010.
7682 * gdbreplay.c (gdbreplay_version): Likewise.
7684 2009-12-28 Doug Evans <dje@google.com>
7686 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7687 elf/external.h. Include <elf.h> instead but only if necessary.
7689 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7691 * linux-low.c (linux_remove_process): Remove `detaching'
7692 parameter. Don't release/detach from thread_db here.
7693 (linux_kill): Release/detach from thread_db here, ...
7694 (linux_detach): ... and here, before actually detaching.
7695 (linux_wait_1): ... and here, when a process exits.
7696 * thread-db.c (any_thread_of): New.
7697 (thread_db_free): Switch the current inferior to a thread of the
7700 2009-12-21 Doug Evans <dje@google.com>
7702 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7704 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7705 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7706 warning ifndef __NR_tkill. Move setting of errno there too.
7707 Delete unnecessary resetting of errno after syscall.
7708 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7710 * configure.ac: Check for dladdr.
7711 * config.in: Regenerate.
7712 * configure: Regenerate.
7713 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7714 (try_thread_db_load): Update.
7716 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7718 2009-12-18 Doug Evans <dje@google.com>
7720 * event-loop.c: Include unistd.h if it exists.
7722 * linux-low.c (my_waitpid): Move definition away from being in
7723 between linux_tracefork_child/linux_test_for_tracefork.
7725 * gdb_proc_service.h (psaddr_t): Fix type.
7726 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7727 signature to match glibc.
7729 2009-12-16 Doug Evans <dje@google.com>
7731 * linux-low.c (linux_read_memory): Fix argument to read.
7733 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7735 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7736 events, don't leave current_inferior pointing at null.
7738 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7740 * win32-low.c (LOG): Delete.
7741 (OUTMSG): Output to stderr.
7742 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7743 on compile time LOG macro.
7744 (win32_wait): Fix debug output.
7746 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7748 * win32-low.c (win32_add_one_solib): If the dll name is
7749 "ntdll.dll", prepend the system directory to the dll path.
7751 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7753 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7755 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7756 Vladimir Prus <vladimir@codesourcery.com>
7758 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7759 * configure.ac: Check for __mcoldfire__ and set
7760 gdb_cv_m68k_is_coldfire.
7761 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7762 reg-cf.o and reg-m68k.o.
7763 * configure: Regenerated.
7765 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7767 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7768 Pass it to thread_db_free.
7769 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7770 proper `detaching' argument to linux_remove_process.
7771 * linux-low.h (thread_db_free): Add `detaching' parameter.
7772 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7774 (thread_db_free): Add `detaching' parameter. Only
7775 call td_ta_clear_event if detaching from process.
7777 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7779 * thread-db.c (thread_db_free): Fix typo.
7781 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7784 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7786 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7788 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7789 with an i686 compiler.
7790 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7792 * configure: Rebuilt.
7794 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7798 * server.c (handle_search_memory_1): Correct read_addr initialization
7799 in loop for searching subsequent chunks.
7801 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7803 * configure.ac: New --with-libthread-db option.
7804 * thread-db.c: Allow direct dependence on libthread_db.
7805 (thread_db_free): Adjust.
7806 * config.in: Regenerate.
7807 * configure: Likewise.
7809 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7812 * thread-db.c (attach_thread): New function.
7813 (maybe_attach_thread): Return success/failure.
7814 (find_new_threads_callback): Adjust.
7815 (thread_db_find_new_threads): Loop until no new threads.
7817 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7819 * proc-service.c (ps_lgetregs): Formatting.
7821 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7823 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7824 * configure.ac: Adjust.
7825 * linux-low.h (struct process_info_private): Move members to struct
7827 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7828 * linux-low.c (linux_remove_process): Adjust.
7829 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7830 * server.c (handle_query): Move code ...
7831 (handle_monitor_command): ... here. New function.
7832 * target.h (struct target_ops): New member.
7833 * thread-db.c (struct thread_db): New.
7834 (libthread_db_search_path): New variable.
7835 (thread_db_create_event, thread_db_enable_reporting)
7836 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7837 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7838 (try_thread_db_load_1, dladdr_to_soname): New functions.
7839 (try_thread_db_load, thread_db_load_search): New functions.
7840 (thread_db_init): Search for libthread_db.
7841 (thread_db_free): New function.
7842 (thread_db_handle_monitor_command): Likewise.
7843 * config.in: Regenerate.
7844 * configure: Regenerate.
7846 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7848 * spu-low.c (spu_kill): Wait for inferior to terminate.
7849 Call clear_inferiors.
7850 (spu_detach): Call clear_inferiors.
7852 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7854 * aclocal.m4: Regenerate.
7855 * config.in: Likewise.
7856 * configure: Likewise.
7858 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7860 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7861 (parse_spufs_run): New function.
7862 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7863 (ppc_breakpoint_at): Handle SPU breakpoints.
7865 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7867 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7868 (SPUFS_MAGIC): Define.
7869 (spu_enumerate_spu_ids): New function.
7870 (linux_qxfer_spu): New function.
7871 (linux_target_ops): Install linux_qxfer_spu.
7873 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7875 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7876 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7877 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7878 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7879 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7880 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7881 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7882 (init_registers_powerpc_cell32l): Add prototype.
7883 (init_registers_powerpc_cell64l): Likewise.
7884 (ppc_arch_setup): Detect Cell/B.E. architecture.
7886 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7888 * Makefile.in (datarootdir): New variable.
7890 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7892 * linux-low.c (linux_write_memory): Update debugging output.
7893 * Makefile.in (clean): Add new descriptions.
7894 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7895 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7896 * configure.srv: Add new files for arm*-*-linux*.
7897 * linux-arm-low.c: Add new declarations.
7898 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7899 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7900 (HWCAP_VFPv3D16): New.
7901 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7902 instead of __IWMMXT__.
7903 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7904 (arm_arch_setup): New.
7905 (target_regsets): Remove #ifdef. Add VFP regset.
7906 (the_low_target): Use arm_arch_setup.
7908 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7910 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7911 the main thread again.
7913 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7915 Adding Neutrino gdbserver.
7916 * configure: Regenerated.
7917 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7918 * configure.srv (i[34567]86-*-nto*): New target.
7919 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7920 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7921 (nto_comctrl) [__QNX__]: New function.
7922 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7924 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7926 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7929 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7930 Pedro Alves <pedro@codesourcery.com>
7932 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7933 don't support CONTEXT_EXTENDED_REGISTERS.
7934 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7935 (the_low_target): Install them.
7936 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7937 failing with ERROR_PIPE_NOT_CONNECTED.
7939 2009-06-30 Doug Evans <dje@google.com>
7940 Pierre Muller <muller@ics.u-strasbg.fr>
7942 Add h/w watchpoint support to x86-linux, win32-i386.
7943 * Makefile.in (SFILES): Add i386-low.c
7944 (i386_low_h): Define.
7945 (i386-low.o): Add dependencies.
7946 (linux-x86-low.o): Add i386-low.h dependency.
7947 (win32-i386-low.o): Ditto.
7948 * i386-low.c: New file.
7949 * i386-low.h: New file.
7950 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7951 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7952 * linux-low.c (linux_add_process): Initialize arch_private.
7953 (linux_remove_process): Free arch_private.
7954 (add_lwp): Initialize arch_private.
7955 (delete_lwp): Free arch_private.
7956 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7958 * linux-low.h (process_info_private): New member arch_private.
7959 (lwp_info): New member arch_private.
7960 (linux_target_ops): New members new_process, new_thread,
7962 (ptid_of): New macro.
7963 * linux-x86-low.c: Include stddef.h, i386-low.h.
7964 (arch_process_info): New struct.
7965 (arch_lwp_info): New struct.
7966 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7967 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7968 (i386_dr_low_get_status): New function.
7969 (x86_insert_point, x86_remove_point): New functions.
7970 (x86_stopped_by_watchpoint): New function.
7971 (x86_stopped_data_address): New function.
7972 (x86_linux_new_process, x86_linux_new_thread): New functions.
7973 (x86_linux_prepare_to_resume): New function.
7974 (the_low_target): Add entries for insert_point, remove_point,
7975 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7977 * server.c (debug_hw_points): New global.
7978 (monitor_show_help): Document set debug-hw-points.
7979 (handle_query): Process "set debug-hw-points".
7980 * server.h (debug_hw_points): Declare.
7981 (paddress): Declare.
7982 * utils.c (NUMCELLS, CELLSIZE): New macros.
7983 (get_sell, xsnprintf, paddress): New functions.
7984 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7985 remove_point, stopped_by_watchpoint, stopped_data_address.
7986 * win32-i386-low.c: Include i386-low.h.
7987 (debug_reg_state): Replaces dr.
7988 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7989 (i386_dr_low_get_status): New function.
7990 (i386_insert_point, i386_remove_point): New functions.
7991 (i386_stopped_by_watchpoint): New function.
7992 (i386_stopped_data_address): New function.
7993 (i386_initial_stuff): Update.
7994 (get_thread_context,set_thread_context,i386_thread_added): Update.
7995 (the_low_target): Add entries for insert_point,
7996 remove_point, stopped_by_watchpoint, stopped_data_address.
7997 * win32-low.c (win32_insert_watchpoint): New function.
7998 (win32_remove_watchpoint): New function.
7999 (win32_stopped_by_watchpoint): New function.
8000 (win32_stopped_data_address): New function.
8001 (win32_target_ops): Add entries for insert_watchpoint,
8002 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8003 * win32-low.h (win32_target_ops): New members insert_point,
8004 remove_point, stopped_by_watchpoint, stopped_data_address.
8006 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8008 * server.c (process_serial_event): Re-return unsupported, not
8009 error, if the type isn't recognized. Re-allow supporting only
8010 insert or remove packets. Also call require_running for
8011 breakpoints. Add missing break statement to default case. Tidy.
8012 * target.h (struct target_ops): Rename insert_watchpoint to
8013 insert_point, and remove_watchpoint to remove_point.
8015 * linux-low.h (struct linux_target_ops): Likewise.
8016 * linux-low.c (linux_insert_watchpoint): Rename to ...
8017 (linux_insert_point): ... this. Adjust.
8018 (linux_remove_watchpoint): Rename to ...
8019 (linux_remove_point): ... this. Adjust.
8020 (linux_target_ops): Adjust.
8021 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8022 (cris_insert_point): ... this.
8023 (cris_remove_watchpoint): Rename to ...
8024 (cris_remove_point): ... this.
8025 (the_low_target): Adjust.
8027 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8029 * server.c (handle_v_kill): Pass signal_pid to
8030 kill_inferior if multi_process is zero.
8032 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8034 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8035 * target.h (target_ops): Comment for *_watchpoint to make it clear
8036 the functions can get types '0' and '1'.
8038 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8040 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8041 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8042 * regcache.c (get_regcache): Likewise.
8043 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8044 * win32-low.c (child_fetch_inferior_registers): Remove check for
8047 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8048 Pedro Alves <pedro@codesourcery.com>
8050 * target.h (struct target_ops) <supports_multi_process>: New
8052 (target_supports_multi_process): New.
8053 * server.c (handle_query): Even if GDB reports support, only
8054 enable multi-process if the target also supports it. Report
8055 multi-process support only if the target backend supports it.
8056 * linux-low.c (linux_supports_multi_process): New function.
8057 (linux_target_ops): Install it as target_supports_multi_process
8060 2009-05-24 Doug Evans <dje@google.com>
8062 Global renaming of find_thread_pid to find_thread_ptid.
8063 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8064 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8065 All callers updated.
8067 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8068 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8071 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8072 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8073 (linux_resume_one_lwp): Ditto.
8075 2009-05-23 Doug Evans <dje@google.com>
8077 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8078 from struct inferior_list_entry * to struct lwp_info *.
8079 All callers updated.
8081 2009-05-13 Doug Evans <dje@google.com>
8083 * linux-x86-low.c: Don't include assert.h.
8084 (x86_siginfo_fixup): Use fatal, not assert.
8085 (x86_arch_setup): Fix comment.
8087 2009-05-12 Doug Evans <dje@google.com>
8089 Biarch support for i386/amd64 gdbserver.
8090 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8091 Add linux-x86-low.c.
8092 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8093 (linux-x86-low.o): Add.
8094 * linux-x86-64-low.c: Delete.
8095 * linux-i386-low.c: Delete.
8096 * linux-x86-low.c: New file.
8097 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8099 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8101 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8102 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8103 (linux_child_pid_to_exec_file): New function.
8104 (elf_64_header_p, elf_64_file_p): New functions.
8105 (siginfo_fixup): New function.
8106 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8107 give target a chance to convert layout.
8108 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8109 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8111 2009-05-07 Doug Evans <dje@google.com>
8113 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8114 (regsets_store_inferior_registers): Ditto.
8116 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8120 * linux-low.c (must_set_ptrace_flags): Delete.
8121 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8123 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8124 `lwp->must_set_ptrace_flags' instead.
8125 (linux_wait_for_event_1): Set ptrace options here.
8126 (linux_wait_1): ... not here.
8128 2009-04-30 Doug Evans <dje@google.com>
8130 * inferiors.c (started_inferior_callback): New function.
8131 (attached_inferior_callback): New function.
8132 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8133 * server.c (print_started_pid, print_attached_pid): New functions.
8134 (detach_or_kill_for_exit): New function.
8135 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8136 * server.h (have_started_inferiors_p): Declare.
8137 (have_attached_inferiors_p): Declare.
8139 * inferiors.c (remove_process): Fix memory leak, free process.
8140 * linux-low.c (linux_remove_process): New function.
8141 (linux_kill): Call it instead of remove_process.
8142 (linux_detach, linux_wait_1): Ditto.
8144 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8146 * configure.srv: Add x86 Windows CE target.
8148 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8150 * inferiors.c (get_thread_process): Make global.
8151 * server.h (get_thread_process): Add prototype.
8152 * thread-db.c (find_one_thread): Use get_thread_process
8153 instead of current_process.
8154 (thread_db_get_tls_address): Do not crash if called when
8155 thread layer is not yet initialized.
8157 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8159 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8160 * spu-low.c (current_tid): Rename to ...
8161 (current_ptid): ... this.
8162 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8163 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8164 ptid_get_lwp (current_ptid) instead of current_tid.
8165 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8166 instead of current_tid. Use find_process_pid to verify pid
8167 argument is valid. Pass proper argument to remove_process.
8168 (spu_thread_alive): Compare current_ptid instead of current_tid.
8169 (spu_resume): Likewise.
8171 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8173 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8176 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8178 Implement the multiprocess extensions, and add linux multiprocess
8181 * server.h (ULONGEST): Declare.
8182 (struct ptid, ptid_t): New.
8183 (minus_one_ptid, null_ptid): Declare.
8184 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8185 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8186 (struct inferior_list_entry): Change `id' type from unsigned from
8188 (struct sym_cache, struct breakpoint, struct
8189 process_info_private): Forward declare.
8190 (struct process_info): Declare.
8191 (current_process): Declare.
8192 (all_processes): Declare.
8193 (initialize_inferiors): Declare.
8194 (add_thread): Adjust to use ptid_t.
8195 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8196 (add_process, remove_process, find_thread_pid): Declare.
8197 (find_inferior_id): Adjust to use ptid_t.
8198 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8199 (multi_process): Declare.
8200 (push_event): Adjust to use ptid_t.
8201 (read_ptid, write_ptid): Declare.
8202 (prepare_resume_reply): Adjust to use ptid_t.
8203 (clear_symbol_cache): Declare.
8204 * inferiors.c (all_processes): New.
8205 (null_ptid, minus_one_ptid): New.
8206 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8207 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8208 (add_thread): Change unsigned long to ptid. Remove gdb_id
8210 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8211 (gdb_id_to_thread): Rename to ...
8212 (find_thread_pid): ... this. Change unsigned long to ptid.
8213 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8214 (loaded_dll, pull_pid_from_list): Adjust.
8215 (add_process, remove_process, find_process_pid)
8216 (get_thread_process, current_process, initialize_inferiors): New.
8217 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8218 (struct target_waitstatus) <related_pid>: Ditto.
8219 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8221 (struct target_ops) <join>: Add `pid' argument.
8222 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8223 (struct target_ops) <wait>: Add `ptid' field. Change return type
8225 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8226 (mywait): Add `ptid' argument. Change return type to ptid_t.
8227 (target_pid_to_str): Declare.
8228 * target.c (set_desired_inferior): Adjust to use ptids.
8229 (mywait): Add new `ptid' argument. Adjust.
8230 (target_pid_to_str): New.
8231 * mem-break.h (free_all_breakpoints): Declare.
8232 * mem-break.c (breakpoints): Delelete.
8233 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8234 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8235 to use per-process breakpoint list.
8236 (free_all_breakpoints): New.
8237 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8238 (symbol_cache, all_symbols_looked_up): Delete.
8240 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8242 (prepare_resume_reply): Change ptid argument's type from unsigned
8243 long to ptid_t. Adjust. Implement W;process and X;process.
8244 (free_sym_cache, clear_symbol_cache): New.
8245 (look_up_one_symbol): Adjust to per-process symbol cache. *
8246 * server.c (cont_thread, general_thread, step_thread): Change type
8249 (multi_process): New.
8250 (last_ptid): Change type to ptid_t.
8251 (struct vstop_notif) <ptid>: Change type to ptid_t.
8252 (queue_stop_reply, push_event): Change `ptid' argument's type to
8254 (discard_queued_stop_replies): Add `pid' argument.
8255 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8256 changes. Don't reference the `attached' global.
8257 (attach_inferior): Adjust to mywait interface changes.
8258 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8259 features. Handle and report "multiprocess+". Handle
8261 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8263 (handle_v_kill): New.
8264 (handle_v_stopped): Adjust to use target_pid_to_str.
8265 (handle_v_requests): Allow multiple attaches and runs when
8266 multiprocess extensions are in effect. Handle "vKill".
8267 (myresume): Adjust to use ptids.
8268 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8269 (handle_status): Adjust to discard_queued_stop_replies interface
8271 (first_thread_of, kill_inferior_callback)
8272 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8273 (main): Call initialize_inferiors. Adjust to use ptids, killing
8274 and detaching from all inferiors. Handle multiprocess packet
8276 * linux-low.h: Include gdb_proc_service.h.
8277 (struct process_info_private): New.
8278 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8279 <lwpid_of>: Use ptid_get_lwp.
8280 (get_lwp_thread): Adjust.
8281 (struct lwp_info): Add `dead' member.
8282 (find_lwp_pid): Declare.
8283 * linux-low.c (thread_db_active): Delete.
8284 (new_inferior): Adjust comment.
8285 (inferior_pid): Delete.
8286 (linux_add_process): New.
8287 (handle_extended_wait): Adjust.
8288 (add_lwp): Change unsigned long to ptid.
8289 (linux_create_inferior): Add process to processes table. Adjust
8290 to use ptids. Don't set new_inferior here.
8291 (linux_attach_lwp): Rename to ...
8292 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8293 it. Adjust to use ptids.
8294 (linux_attach_lwp): New.
8295 (linux_attach): Add process to processes table. Don't set
8297 (struct counter): New.
8298 (second_thread_of_pid_p, last_thread_of_process_p): New.
8299 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8301 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8302 processes. Remove process from process table.
8303 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8304 to multiple processes.
8305 (any_thread_of): New.
8306 (linux_detach): Add `pid' argument, and handle it. Remove process
8307 from processes table.
8308 (linux_join): Add `pid' argument. Handle it.
8309 (linux_thread_alive): Change unsighed long argument to ptid_t.
8310 Consider dead lwps as not being alive.
8311 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8312 threads we're not interested in.
8313 (same_lwp, find_lwp_pid): New.
8314 (linux_wait_for_lwp): Change `pid' argument's type from int to
8316 (linux_wait_for_event): Rename to ...
8317 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8318 from int to ptid_t. Adjust.
8319 (linux_wait_for_event): New.
8320 (linux_wait_1): Add `ptid' argument. Change return type to
8321 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8322 that exit from the process table.
8323 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8325 (mark_lwp_dead): New.
8326 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8327 stopping all threads, mark its main lwp as dead.
8328 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8330 (fetch_register, usr_store_inferior_registers)
8331 (regsets_fetch_inferior_registers)
8332 (regsets_store_inferior_registers, linux_read_memory)
8333 (linux_write_memory): Inline `inferior_pid'.
8334 (linux_look_up_symbols): Adjust to use per-process
8336 (linux_request_interrupt): Adjust to use ptids.
8337 (linux_read_auxv): Inline `inferior_pid'.
8338 (initialize_low): Don't reference thread_db_active.
8339 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8340 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8341 (ps_getpid): Return the pid of the current inferior.
8342 * thread-db.c (proc_handle, thread_agent): Delete.
8343 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8345 (find_one_thread): Change argument type to ptid_t. Adjust to
8347 (maybe_attach_thread): Adjust to per-process data and ptids.
8348 (thread_db_find_new_threads): Ditto.
8349 (thread_db_init): Ditto.
8350 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8351 processes table. Adjust to use ptids.
8352 (spu_kill, spu_detach): Adjust interface. Remove process from
8354 (spu_join, spu_thread_alive): Adjust interface.
8355 (spu_wait): Adjust interface. Remove process from processes
8356 table. Adjust to use ptids.
8357 * win32-low.c (current_inferior_tid): Delete.
8358 (current_inferior_ptid): New.
8359 (debug_event_ptid): New.
8360 (thread_rec): Take a ptid. Adjust.
8361 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8362 (child_delete_thread): Ditto.
8363 (do_initial_child_stuff): Add `attached' argument. Add process to
8365 (child_fetch_inferior_registers, child_store_inferior_registers):
8367 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8368 (win32_attach): Pass 1 to do_initial_child_stuff.
8369 (win32_kill): Adjust interface. Remove process from processes
8371 (win32_detach): Ditto.
8372 (win32_join): Adjust interface.
8373 (win32_thread_alive): Take a ptid.
8374 (win32_resume): Adjust to use ptids.
8375 (get_child_debug_event): Ditto.
8376 (win32_wait): Adjust interface. Remove exiting process from
8379 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8381 Non-stop mode support.
8383 * server.h (non_stop): Declare.
8384 (gdb_client_data, handler_func): Declare.
8385 (delete_file_handler, add_file_handler, start_event_loop):
8387 (handle_serial_event, handle_target_event, push_event)
8388 (putpkt_notif): Declare.
8389 * target.h (enum resume_kind): New.
8390 (struct thread_resume): Replace `step' field by `kind' field.
8391 (TARGET_WNOHANG): Define.
8392 (struct target_ops) <wait>: Add `options' argument.
8393 <supports_non_stop, async, start_non_stop>: New fields.
8394 (target_supports_non_stop, target_async): New.
8395 (start_non_stop): Declare.
8396 (mywait): Add `options' argument.
8397 * target.c (mywait): Add `options' argument. Print child exit
8399 (start_non_stop): New.
8400 * server.c (non_stop, own_buf, mem_buf): New globals.
8401 (struct vstop_notif): New.
8402 (notif_queue): New global.
8403 (queue_stop_reply, push_event, discard_queued_stop_replies)
8404 (send_next_stop_reply): New.
8405 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8407 (attach_inferior): In non-stop mode, don't wait for the target
8409 (handle_general_set): Handle QNonStop.
8410 (handle_query): When handling qC, return the current general
8411 thread, instead of the first thread of the list.
8412 (handle_query): If the backend supports non-stop mode, include
8413 QNonStop+ in the qSupported query response.
8414 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8416 (handle_v_attach, handle_v_run): Handle non-stop mode.
8417 (handle_v_stopped): New.
8418 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8419 (myresume): Adjust to use resume_kind. Handle non-stop.
8420 (queue_stop_reply_callback): New.
8421 (handle_status): Handle non-stop mode.
8422 (main): Clear non_stop flag on reconnection. Use the event-loop.
8423 Refactor serial protocol handling from here ...
8424 (process_serial_event): ... to this new function. When GDB
8425 selects any thread, select one here. In non-stop mode, wait until
8426 GDB acks all pending events before exiting.
8427 (handle_serial_event, handle_target_event): New.
8428 * remote-utils.c (remote_open): Install remote_desc in the event
8430 (remote_close): Remove remote_desc from the event loop.
8431 (putpkt_binary): Rename to...
8432 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8433 (putpkt_binary): New as wrapper around putpkt_binary_1.
8434 (putpkt_notif): New.
8435 (prepare_resume_reply): In non-stop mode, don't change the
8437 * event-loop.c: New.
8438 * Makefile.in (OBJ): Add event-loop.o.
8439 (event-loop.o): New rule.
8441 * linux-low.h (pid_of): Moved here.
8443 (get_lwp_thread): Use lwpid_of.
8444 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8445 * linux-low.c (pid_of): Delete.
8446 (inferior_pid): Use lwpid_of.
8447 (linux_event_pipe): New.
8448 (target_is_async_p): New.
8450 (handle_extended_wait): Use lwpid_of.
8451 (add_lwp): Don't set lwpid field.
8452 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8453 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8454 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8455 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8456 first. Adjust to linux_wait_for_event interface changes. Use
8458 (linux_detach): Don't delete the main lwp here.
8459 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8460 (status_pending_p): Don't consider explicitly suspended lwps.
8461 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8462 pointer. Add OPTIONS argument. Change return type to int. Use
8463 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8464 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8465 pointer. Add status pointer argument. Return a pid instead of a
8466 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8467 changes. In non-stop mode, don't switch to a random thread.
8468 (linux_wait): Rename to...
8469 (linux_wait_1): ... this. Add target_options argument, and handle
8470 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8471 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8472 clean exit and signal exit code. Don't stop all threads in
8473 non-stop mode. In all-stop mode, only stop all threads when
8474 reporting a stop to GDB. Handle explicit thread stop requests.
8475 (async_file_flush, async_file_mark): New.
8477 (send_sigstop): Use lwpid_of.
8478 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8479 interface changes. In non-stop mode, don't switch to a random
8481 (linux_resume_one_lwp): Use lwpid_of.
8482 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8483 (linux_resume_one_thread): ... this. Handle resume_stop. In
8484 non-stop mode, don't look for pending flag in all threads.
8485 (resume_status_pending_p): Don't consider explicitly suspended
8487 (my_waitpid): Reimplement. Emulate __WALL.
8488 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8490 (sigchld_handler, linux_supports_non_stop, linux_async)
8491 (linux_start_non_stop): New.
8492 (linux_target_ops): Register linux_supports_non_stop, linux_async
8493 and linux_start_non_stop.
8494 (initialize_low): Install SIGCHLD handler.
8495 * thread-db.c (thread_db_create_event, find_one_thread)
8496 (thread_db_get_tls_address): Use lwpid_of.
8497 * win32-low.c (win32_detach): Adjust to use resume_kind.
8498 (win32_wait): Add `options' argument.
8499 * spu-low.c (spu_resume): Adjust to use resume_kind.
8500 (spu_wait): Add `options' argument.
8502 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8504 Decouple target code from remote protocol.
8506 * target.h (enum target_waitkind): New.
8507 (struct target_waitstatus): New.
8508 (struct target_ops) <wait>: Return an unsigned long. Take a
8509 target_waitstatus pointer instead of a char pointer.
8511 * target.c (mywait): Change prototype to return an unsigned long.
8512 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8513 * server.h (thread_from_wait, old_thread_from_wait): Delete
8515 (prepare_resume_reply): Change prototype to take a
8517 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8518 (last_status, last_ptid): New.
8519 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8520 pid instead of a signal.
8521 (attach_inferior): Remove "status" and "signal" parameters.
8523 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8525 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8526 (handle_v_requests, myresume): Remove "status" and "signal"
8528 (handle_status): New.
8529 (main): Delete local `status'. Adjust.
8530 * remote-utils.c: Include target.h.
8531 (prepare_resume_reply): Change prototype to take a
8532 target_waitstatus. Adjust.
8534 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8536 * spu-low.c (spu_wait): Adjust.
8537 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8539 (win32_wait): Adjust.
8541 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8543 * target.h (struct thread_resume): Delete leave_stopped member.
8544 (struct target_ops): Add a `n' argument to the `resume' callback.
8545 * server.c (start_inferior): Adjust.
8546 (handle_v_cont, myresume): Adjust.
8547 * linux-low.c (check_removed_breakpoint): Adjust to resume
8548 interface change, and to removed leave_stopped field.
8549 (resume_ptr): Delete.
8550 (struct thread_resume_array): New.
8551 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8552 resume interface change.
8553 (linux_continue_one_thread, linux_queue_one_thread)
8554 (resume_status_pending_p): Check if the resume field is NULL
8555 instead of checking the leave_stopped member.
8556 (linux_resume): Adjust to the target resume interface change.
8557 * spu-low.c (spu_resume): Adjust to the target resume interface
8559 * win32-low.c (win32_detach, win32_resume): Ditto.
8561 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8563 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8565 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8567 (linux_continue_one_thread): Only preserve the stepping flag if
8568 there's a pending breakpoint.
8570 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8572 * server.c (main): After the inferior having exited, call
8573 remote_close before exiting gdbserver.
8575 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8577 Fix size of FPSCR in Power 7 processors.
8578 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8579 (PPC_FEATURE_HAS_DFP): New #define.
8580 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8583 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8585 * server.c (handle_query) Whitespace and formatting.
8587 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8589 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8590 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8591 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8592 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8593 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8594 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8595 Makefile.in, configure.ac: Fix whitespace throughout.
8596 * configure: Regenerate.
8598 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8600 * inferiors.c (find_inferior): Make it safe for the callback
8601 function to delete the currently iterated inferior.
8603 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8605 * Makefile.in (linuw_low_h): Move higher.
8606 (thread-db.o): Depend on $(linux_low_h).
8608 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8610 Rename "process" to "lwp" throughout.
8612 * linux-low.c (all_processes): Rename to...
8613 (all_lwps): ... this.
8614 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8615 (add_process): Rename to ...
8616 (add_lwp): ... this. Adjust.
8617 (linux_create_inferior): Adjust.
8618 (linux_attach_lwp): Adjust.
8619 (linux_attach): Adjust.
8620 (linux_kill_one_process): Rename to ...
8621 (linux_kill_one_lwp): ... this. Adjust.
8622 (linux_kill): Adjust.
8623 (linux_detach_one_process): Rename to ...
8624 (linux_detach_one_lwp): ... this. Adjust.
8625 (linux_detach): Adjust.
8626 (check_removed_breakpoint): Adjust.
8627 (status_pending_p): Adjust.
8628 (linux_wait_for_process): Rename to ...
8629 (linux_wait_for_lwp): ... this. Adjust.
8630 (linux_wait_for_event): Adjust.
8631 (send_sigstop): Adjust.
8632 (wait_for_sigstop): Adjust.
8633 (stop_all_processes): Rename to ...
8634 (stop_all_lwps): ... this.
8635 (linux_resume_one_process): Rename to ...
8636 (linux_resume_one_lwp): ... this. Adjust.
8637 (linux_set_resume_request, linux_continue_one_thread)
8638 (linux_queue_one_thread, resume_status_pending_p)
8639 (usr_store_inferior_registers, regsets_store_inferior_registers)
8640 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8642 * linux-low.h (get_process): Rename to ...
8643 (get_lwp): ... this. Adjust.
8644 (get_thread_process): Rename to ...
8645 (get_thread_lwp): ... this. Adjust.
8646 (get_process_thread): Rename to ...
8647 (get_lwp_thread): ... this. Adjust.
8648 (struct process_info): Rename to ...
8649 (struct lwp_info): ... this.
8650 (all_processes): Rename to ...
8651 (all_lwps): ... this.
8652 * proc-service.c (ps_lgetregs): Adjust.
8653 * thread-db.c (thread_db_create_event, find_one_thread)
8654 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8656 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8658 * server.c (handle_query): Handle "qAttached".
8660 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8662 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8663 GPLv3, update license URL.
8665 2009-03-01 Doug Evans <dje@google.com>
8667 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8668 (server_h): Add gdb_signals.h.
8669 (signals.o): Update.
8670 * server.h (target_signal_from_host,target_signal_to_host_p)
8671 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8673 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8675 * remote-utils.c (getpkt): Also generate remote-debug
8676 information if noack_mode is set.
8678 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8680 * server.c (handle_query): Report qXfer:siginfo:read and
8681 qXfer:siginfo:write as supported and handle them.
8682 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8683 * linux-low.c (linux_xfer_siginfo): New.
8684 (linux_target_ops): Set it.
8686 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8688 * server.c (gdbserver_usage): Mention --remote-debug.
8689 (main): Accept '--remote-debug' switch.
8691 2009-01-18 Doug Evans <dje@google.com>
8693 * regcache.c (new_register_cache): No need to check result of xcalloc.
8694 * server.c (handle_search_memory): Back out calls to xmalloc,
8695 result is checked and error is returned to user upon failure.
8696 (handle_query): Ditto. Add more checks for result of malloc.
8697 (handle_v_cont): Check result of malloc, report error back to
8699 (handle_v_run): Ditto. Call freeargv.
8700 * server.h (freeargv): Declare.
8701 * utils.c (freeargv): New fn.
8703 2009-01-15 Doug Evans <dje@google.com>
8705 * gdbreplay.c (perror_with_name): Make arg const char *.
8706 * server.h (target_signal_to_name): Make return type const char *.
8707 * thread-db.c (thread_db_err_str): Make return type const char *.
8708 * utils.c (perror_with_name): Make arg const char *.
8710 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8712 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8713 when handling a EXIT_PROCESS_DEBUG_EVENT.
8715 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8717 * gdbreplay.c (gdbreplay_version): Update copyright year.
8718 * server.c (gdbserver_version): Likewise.
8720 2009-01-05 Doug Evans <dje@google.com>
8722 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8723 (handle_extended_wait): Improve comment.
8725 2008-12-13 Doug Evans <dje@google.com>
8727 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8728 * server.h (ATTR_MALLOC): New macro.
8729 (xmalloc,xcalloc,xstrdup): Declare.
8730 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8731 * inferiors.c: Ditto.
8732 * linux-low.c: Ditto.
8733 * mem-break.c: Ditto.
8734 * regcache.c: Ditto.
8735 * remote-utils.c: Ditto.
8738 * win32-low.c: Ditto.
8740 2008-12-12 Doug Evans <dje@google.com>
8742 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8743 in debugging printf.
8745 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8747 2008-12-09 Doug Evans <dje@google.com>
8749 * linux-low.h (struct process_info): Delete member tid, unused.
8750 * thread-db.c (find_one_thread): Update.
8751 (maybe_attach_thread): Update.
8753 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8755 * target.h (struct target_ops): Add qxfer_osdata member.
8756 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8758 (linux_qxfer_osdata): New functions.
8759 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8761 * server.c (handle_query): Handle "qXfer:osdata:read:".
8762 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8763 (buffer_xml_printf): New functions.
8764 * server.h (struct buffer): New.
8765 (buffer_grow_str, buffer_grow_str0): New macros.
8766 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8767 (buffer_xml_printf): Declare.
8769 2008-11-24 Doug Evans <dje@google.com>
8771 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8773 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8775 * server.c (handle_v_run): Always use the supplied argument list.
8777 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8779 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8780 (xtensa_regmap_table): Add entry for scompare1.
8782 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8784 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8785 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8786 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8787 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8788 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8789 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8790 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8791 XML target descriptions.
8792 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8793 when inferior is running on an ISA 2.05 or later processor. Add
8794 special case to return offset for full 64-bit slot of FPSCR when
8797 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8799 * Makefile.in (SFILES, clean): Added sparc64 files.
8800 (reg-sparc64.o, reg-sparc64.c): New.
8801 * configure.srv (sparc*-*-linux*): New configuration.
8802 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8803 syscall arguments for SPARC.
8804 (regsets_store_inferior_registers): Likewise.
8805 * linux-sparc-low.c: New file.
8807 2008-10-21 Doug Evans <dje@google.com>
8809 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8810 (READLINE_DIR,READLINE_DEP): Delete.
8811 (INTERNAL_CFLAGS): Update.
8812 (LINTFLAGS): Update.
8814 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8816 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8817 whole argv from the last run, not just argv[0].
8819 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8821 * regcache.c (new_register_cache): Return NULL if the register
8822 cache size isn't known yet.
8823 (free_register_cache): Avoid dereferencing a NULL regcache.
8825 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8827 * configure.srv: Merge MIPS and MIPS64.
8829 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8831 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8833 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8835 * Makefile.in: Add required vsx dependencies.
8837 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8838 Declare init_registers_powerpc_vsx32l.
8839 Declare init_registers_powerpc_vsx64l.
8840 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8841 (ppc_arch_setup): Check for VSX in hwcap.
8842 (ppc_fill_vsxregset): New function.
8843 (ppc_store_vsxregset): New function.
8844 Add new VSX entry in regset_info target_regsets.
8846 * configure.srv: Add new VSX dependencies.
8848 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8850 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8851 (remote_open): Set or clear transport_is_reliable.
8852 (putpkt_binary): Don't expect acks in noack mode.
8853 (getpkt): Don't send ack/nac in noack mode.
8854 * server.c (handle_general_set): Handle QStartNoAckMode.
8855 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8857 (main): Reset noack_mode on every connection.
8858 * server.h (noack_mode): Declare.
8860 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8862 * Makefile.in (GDBREPLAY_OBS): New variable.
8863 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8865 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8866 Daniel Jacobowitz <dan@codesourcery.com>
8868 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8869 (usr_store_inferior_registers): Likewise.
8870 (regsets_store_inferior_registers): Likewise.
8872 2008-07-31 Rolf Jansen <rj@surtec.com>
8873 Pedro Alves <pedro@codesourcery.com>
8875 * configure.ac: Check for memmem declaration.
8876 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8877 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8878 (disable_packet_qfThreadInfo): Unconditionally compile.
8879 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8880 * configure, config.in: Regenerate.
8882 2008-07-28 Doug Kwan <dougkwan@google.com>
8884 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8885 (linux_write_memory): Remove declaration of errno.
8887 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8889 * linux-low.c (handle_extended_wait): Do not use "status"
8890 variable uninitialized.
8892 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8894 * server.c (handle_v_attach): Inhibit reporting dll changes.
8896 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8898 * remote-utils.c (prepare_resume_reply): If requested, don't
8899 output "thread:TID" in the T stop reply.
8901 * server.c (disable_packet_vCont, disable_packet_Tthread)
8902 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8903 (handle_query): If requested, disable support for qC, qfThreadInfo
8905 (handle_v_requests): If requested, disable support for vCont.
8906 (gdbserver_show_disableable): New.
8907 (main): Handle --disable-packet and --disable-packet=LIST.
8909 * server.h (disable_packet_vCont, disable_packet_Tthread)
8910 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8912 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8914 * server.c (gdbserver_usage): Mention --version.
8916 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8918 * Makefile.in (gdbreplay.o): New rule.
8920 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8922 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8923 message, not gdbserver.
8925 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8926 Nathan Sidwell <nathan@codesourcery.com>
8927 Joseph Myers <joseph@codesourcery.com>
8929 * acinclude.m4: Include ../../config/acx.m4.
8930 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8931 * configure, config.in: Regenerate.
8932 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8933 * server.c (gdbserver_version): Print PKGVERSION.
8934 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8935 (main): Adjust gdbserver_usage calls.
8936 * gdbreplay.c (version, host_name): Add declarations.
8937 (gdbreplay_version, gdbreplay_usage): New.
8938 (main): Accept --version and --help options.
8940 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8942 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8943 (arm_breakpoint_at): Handle Thumb.
8944 (the_low_target): Add comment.
8946 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8948 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8950 2008-05-09 Doug Evans <dje@google.com>
8952 * server.h (decode_search_memory_packet): Declare.
8953 * remote-utils.c (decode_search_memory_packet): New fn.
8954 * server.c (handle_search_memory_1): New fn.
8955 (handle_search_memory): New fn.
8956 (handle_query): Process qSearch:memory packets.
8958 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8960 * regcache.c (registers_length): Remove.
8961 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8962 full register packet.
8963 * regcache.h (registers_length): Remove prototype.
8964 * server.h (PBUFSIZ): Define to 16384.
8966 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8968 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8969 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8970 powerpc-64l.o, and powerpc-altivec64l.o.
8971 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8972 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8973 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8974 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8975 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8978 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8979 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8980 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8981 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8982 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8983 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8984 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8985 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8986 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8987 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8990 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8991 (init_registers_powerpc_32l): ... this new prototype.
8992 (init_registers_powerpc_32): Remove, replace by ...
8993 (init_registers_powerpc_altivec32l): ... this new prototype.
8994 (init_registers_powerpc_e500): Remove, replace by ...
8995 (init_registers_powerpc_e500l): ... this new prototype.
8996 (init_registers_ppc64): Remove, replace by ...
8997 (init_registers_powerpc_64l): ... this new prototype.
8998 (init_registers_powerpc_64): Remove, replace by ...
8999 (init_registers_powerpc_altivec64l): ... this new prototype.
9000 (ppc_num_regs): Set to 73.
9001 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9002 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9003 (ppc_cannot_store_register): Handle orig_r3 and trap.
9004 (ppc_arch_setup): Update init_registers_... calls.
9005 (ppc_fill_gregset): Handle orig_r3 and trap.
9007 * inferiors.c (clear_inferiors): Reset current_inferior.
9009 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9011 * acinclude.m4: Add override.m4.
9012 * configure: Regenerate.
9014 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9016 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9017 initial call to init_register_ppc64.
9019 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9021 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9022 single powerpc*-*-linux* case.
9023 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9025 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9027 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9028 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9030 * linux-ppc-low.c: Include <elf.h>.
9031 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9032 (ppc_hwcap): New global variable.
9033 (ppc_regmap): Remove __SPE__ #ifdef sections.
9034 (ppc_regmap_e500): New global variable.
9035 (ppc_cannot_store_register): Update __SPE__ special case.
9036 (ppc_get_hwcap): New function.
9037 (ppc_arch_setup): Use it to determine whether inferior supports
9038 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9039 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9040 Do not access registers if target does not support AltiVec.
9041 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9042 Do not access registers if target does not support SPE.
9043 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9045 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9047 * linux-low.c (disabled_regsets, num_regsets): New.
9048 (use_regsets_p): Delete.
9049 (linux_wait_for_process): Clear disabled_regsets.
9050 (regsets_fetch_inferior_registers): Check and set it.
9051 (regsets_store_inferior_registers): Likewise.
9052 (linux_fetch_registers, linux_store_registers): Do not use
9054 (initialize_low): Allocate disabled_regsets.
9056 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9058 * Makefile.in (LIBOBJS): New.
9060 (memmem.o): New rule.
9061 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9062 * configure: Regenerated.
9064 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9066 * server.c (handle_query): Never return "unsupported" for
9067 qXfer:features:read queries.
9069 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9071 * server.c (get_features_xml): Fix inverted condition.
9072 (handle_query): Always support qXfer:feature:read.
9074 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9076 * server.c (wrapper_argv): New.
9077 (start_inferior): Handle wrapper_argv. If set, expect an extra
9079 (gdbserver_usage): Document --wrapper.
9080 (main): Parse --wrapper.
9082 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9084 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9085 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9086 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9087 (ppc_set_pc): Likewise.
9088 (ppc_arch_setup): New function.
9089 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9090 of collect_register.
9091 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9093 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9095 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9096 instead of linux-ppc64-low.o.
9097 * linux-ppc64-low.c: Remove file.
9098 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9099 (linux-ppc64-low.o): Remove rule.
9101 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9102 (init_registers_powerpc_64): Likewise.
9103 (ppc_regmap): Conditionally define depending on __powerpc64__.
9104 (ppc_cannot_store_register): Do not special-case "fpscr" when
9105 compiled on __powerpc64__.
9106 (ppc_collect_ptrace_register): New function.
9107 (ppc_supply_ptrace_register): New function.
9108 (ppc_breakpoint): Change type to "unsigned int".
9109 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9110 (the_low_target): Conditionally provide initializers for the
9111 arch_setup member depending on __powerpc64__. Install
9112 collect_ptrace_register and supply_ptrace_register members.
9114 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9116 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9117 * server.c (gdbserver_xmltarget): Define.
9118 (get_features_xml): Use it to replace "target.xml" and arch_string.
9120 * configure.srv: Remove srv_xmltarget. Add XML files that were
9121 mentioned there to srv_xmlfiles instead. Remove conditional tests
9122 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9123 srv_xmlfiles and srv_regobj to include all possible choices.
9124 * configure.ac (srv_xmltarget): Remove.
9125 (srv_xmlfiles): Do not add "target.xml".
9126 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9127 checks for supplementary target information.
9128 * configure: Regenerate.
9129 * Makefile.in (XML_TARGET): Remove.
9130 (target.xml): Remove rule.
9131 (clean): Do not clean up target.xml.
9132 (.PRECIOUS): Do not mention target.xml.
9134 * target.h (struct target_ops): Remove arch_string member.
9135 * linux-low.c (linux_arch_string): Remove.
9136 (linux_target_ops): Remove arch_string initializer.
9137 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9138 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9139 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9140 * spu-low.c (spu_arch_string): Remove.
9141 (spu_target_ops): Remove arch_string initializer.
9142 * win32-low.c (win32_arch_string): Remove.
9143 (win32_target_ops): Remove arch_string initializer.
9144 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9145 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9146 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9148 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9150 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9151 by collect_ptrace_register and supply_ptrace_register hooks.
9152 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9153 instead of checking for the_low_target.left_pad_xfer.
9154 (usr_store_inferior_registers): Use collect_ptrace_register callback
9155 instead of checking for the_low_target.left_pad_xfer.
9157 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9158 (s390_supply_ptrace_register): Likewise.
9159 (s390_fill_gregset): Call s390_collect_ptrace_register.
9160 (the_low_target): Update.
9162 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9163 (ppc_supply_ptrace_register): Likewise.
9164 (the_low_target): Update.
9166 * linux-i386-low.c (the_low_target): Update.
9167 * linux-x86-64-low.c (the_low_target): Update.
9169 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9171 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9172 reg-s390.o and reg-s390x.o.
9174 * linux-low.c (new_inferior): New global variable.
9175 (linux_create_inferior, linux_attach): Set it.
9176 (linux_wait_for_process): Call the_low_target.arch_setup after the
9177 target has stopped for the first time.
9178 (initialize_low): Do not call the_low_target.arch_setup.
9180 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9181 (s390_set_pc): Likewise.
9182 (s390_arch_setup): New function.
9183 (the_low_target): Use s390_arch_setup as arch_setup routine.
9185 * regcache.c (realloc_register_cache): New function.
9186 (set_register_cache): Call it for each existing regcache.
9188 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9190 * server.h (init_registers): Remove prototype.
9192 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9193 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9194 instead of init_registers ().
9195 * linux-arm-low.c (init_registers_arm): Add prototype.
9196 (init_registers_arm_with_iwmmxt): Likewise.
9197 (the_low_target): Add initializer for arch_setup field.
9198 * linux-cris-low.c (init_registers_cris): Add prototype.
9199 (the_low_target): Add initializer for arch_setup field.
9200 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9201 (the_low_target): Add initializer for arch_setup field.
9202 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9203 (the_low_target): Add initializer for arch_setup field.
9204 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9205 (the_low_target): Add initializer for arch_setup field.
9206 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9207 (the_low_target): Add initializer for arch_setup field.
9208 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9209 (the_low_target): Add initializer for arch_setup field.
9210 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9211 (init_registers_mips64_linux): Likewise.
9212 (the_low_target): Add initializer for arch_setup field.
9213 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9214 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9215 (the_low_target): Add initializer for arch_setup field.
9216 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9217 (init_registers_powerpc_64): Likewise.
9218 (the_low_target): Add initializer for arch_setup field.
9219 * linux-s390-low.c (init_registers_s390): Add prototype.
9220 (init_registers_s390x): Likewise.
9221 (the_low_target): Add initializer for arch_setup field.
9222 * linux-sh-low.c (init_registers_sh): Add prototype.
9223 (the_low_target): Add initializer for arch_setup field.
9224 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9225 (the_low_target): Add initializer for arch_setup field.
9226 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9227 (the_low_target): Add initializer for arch_setup field.
9229 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9230 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9231 instead of init_registers ().
9232 * win32-arm-low.c (init_registers_arm): Add prototype.
9233 (the_low_target): Add initializer for arch_setup field.
9234 * win32-i386-low.c (init_registers_i386): Add prototype.
9235 (the_low_target): Add initializer for arch_setup field.
9237 * spu-low.c (init_registers_spu): Add prototype.
9238 (initialize_low): Call initialie_registers_spu () instead of
9239 initialize_registers ().
9241 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9243 * server.c (handle_v_requests): When handling the vRun and vAttach
9244 packets, if already debugging a process, don't kill it. Return an
9247 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9249 * server.c (handle_query): Correct length check.
9251 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9253 * win32-low.c (do_initial_child_stuff): Add process handle
9254 parameter. Set current_process_handle and current_process_id from the
9255 parameters. Clear globals.
9256 (win32_create_inferior): Don't set current_process_handle and
9257 current_process_id here. Instead pass them on the call to
9258 do_initial_child_stuff.
9259 (win32_attach): Likewise.
9260 (win32_clear_inferiors): New.
9261 (win32_kill): Don't close the current process handle or the
9262 current thread handle here. Instead call win32_clear_inferiors.
9263 (win32_detach): Don't open a new handle to the process. Call
9264 win32_clear_inferiors.
9265 (win32_join): Don't rely on current_process_handle; open a new
9266 handle using the process id.
9267 (win32_wait): Call win32_clear_inferiors when the inferior process
9270 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9272 * server.c (monitor_show_help): Add "exit".
9274 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9276 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9277 (clean): Add reg-xtensa.c.
9278 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9279 * configure.srv (xtensa*-*-linux*) New target.
9280 * linux-xtensa-low.c: New.
9281 * xtensa-xtregs.c: New.
9283 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9285 * hostio.c: Don't include errno.h.
9286 (errno_to_fileio_errno): Move to hostio-errno.
9287 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9288 error number outputting to the target->hostio_last_error callback.
9289 (hostio_packet_error): Use FILEIO_EINVAL directly.
9290 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9291 calls to hostio_error.
9292 * hostio-errno.c: New.
9293 * server.h (hostio_last_error_from_errno): Declare.
9294 * target.h (target_ops): Add hostio_last_error member.
9295 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9296 as hostio_last_error handler.
9297 * spu-low.c (spu_target_ops): Likewise.
9298 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9299 (wince_hostio_last_error): New functions.
9300 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9301 as hostio_last_error handler.
9302 (win32_target_ops) [!_WIN32_WCE]: Register
9303 hostio_last_error_from_errno as hostio_last_error handler.
9304 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9305 (hostio-errno.o): New rule.
9306 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9307 * configure.srv (srv_hostio_err_objs): New variable. Default to
9309 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9310 * configure: Regenerate.
9312 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9314 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9315 (linux_kill, linux_detach): Clean up the process list.
9316 * remote-utils.c (remote_open): Improve port number parsing.
9317 (putpkt_binary, input_interrupt): Only send interrupts if the target
9319 * server.c (extended_protocol): Make static.
9320 (attached): Define earlier.
9321 (exit_requested, response_needed, program_argv): New variables.
9322 (target_running): New.
9323 (start_inferior): Clear attached here.
9324 (attach_inferior): Set attached here.
9325 (require_running): Define.
9326 (handle_query): Use require_running and target_running. Implement
9328 (handle_v_attach, handle_v_run): New.
9329 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9330 (gdbserver_usage): Update.
9331 (main): Redo argument parsing. Handle --debug and --multi. Handle
9332 --attach along with other options or after the port. Save
9333 program_argv. Support no initial program. Resynchronize
9334 communication with GDB after an error. Handle "monitor exit".
9335 Use require_running and target_running. Always allow the extended
9336 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9337 restart in extended mode.
9338 * README: Refer to the GDB manual. Update --attach usage.
9340 2007-12-20 Andreas Schwab <schwab@suse.de>
9342 * linux-low.c (STACK_SIZE): Define.
9343 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9344 (linux_test_for_tracefork): Likewise.
9346 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9348 * linux-low.c (linux_wait_for_event): Update messages. Do not
9349 reinsert auto-delete breakpoints.
9350 * mem-break.c (struct breakpoint): Change return type of handler to
9352 (set_breakpoint_at): Update handler type.
9353 (reinsert_breakpoint_handler): Return 1 instead of calling
9355 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9357 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9358 * mem-break.h (set_breakpoint_at): Update handler type.
9359 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9360 * win32-low.c (auto_delete_breakpoint): New.
9361 (get_child_debug_event): Use it.
9363 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9365 * configure.ac: Check for pread and pwrite.
9366 * hostio.c (handle_pread): Fall back to lseek and read.
9367 (handle_pwrite): Fall back to lseek and write.
9368 * config.in, configure: Regenerated.
9370 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9372 * server.c (myresume): Add own_buf argument.
9373 (main): Update calls.
9375 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9377 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9378 * remote-utils.c (remote_open): Do not call disable_async_io.
9379 (block_async_io): Delete.
9380 (unblock_async_io): Make static.
9381 (initialize_async_io): New.
9382 * server.c (handle_v_cont): Handle async I/O here.
9383 (myresume): Likewise. Move other common resume tasks here...
9384 (main): ... from here. Call initialize_async_io. Disable async
9385 I/O before the main loop.
9386 * server.h (initialize_async_io): Declare.
9387 (block_async_io, unblock_async_io): Delete prototypes.
9388 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9390 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9392 * remote-utils.c (readchar): Allow binary data in received messages.
9394 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9396 * win32-low.c (attaching): New global.
9397 (win32_create_inferior): Clear the `attaching' global.
9398 (win32_attach): Set the `attaching' global.
9399 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9400 attaching. Only set a breakpoint at the entry point if not
9403 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9405 * server.c (main): Don't report dll events on the initial
9406 connection on attaches.
9408 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9410 * server.c (main): Relax numerical bases supported for the pid of
9411 the --attach command line argument.
9413 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9415 * win32-low.c (win32_attach): Call OpenProcess before
9416 DebugActiveProcess, not after. Add last error output to error
9419 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9421 * win32-low.c (win32_get_thread_context)
9422 (win32_set_thread_context): New functions.
9423 (thread_rec): Use win32_get_thread_context.
9424 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9425 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9428 2007-12-03 Leo Zayas
9429 Pedro Alves <pedro_alves@portugalmail.pt>
9431 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9433 (child_add_thread): Minor cleanup.
9434 (child_continue): Resume artificially suspended threads before
9435 calling ContinueDebugEvent.
9436 (suspend_one_thread): New.
9437 (fake_breakpoint_event): New.
9438 (get_child_debug_event): Change return type to int. Check here if
9439 gdb sent an interrupt request. If a soft interrupt was requested,
9440 fake a breakpoint event. Return 0 if there is no event to handle,
9442 (win32_wait): Don't check here if gdb sent an interrupt request.
9443 Ensure there is a valid event to handle.
9444 (win32_request_interrupt): Add soft interruption method as last
9447 2007-12-03 Leo Zayas
9448 Pedro Alves <pedro_alves@portugalmail.pt>
9450 * win32-low.h (win32_thread_info): Add descriptions to the
9451 structure members. Replace `suspend_count' counter by a
9453 * win32-low.c (thread_rec): Update condition of when to get the
9454 context from the inferior. Rely on ContextFlags being set if it
9455 has already been retrieved. Only suspend the inferior thread if
9456 we haven't already. Warn if that fails.
9457 (continue_one_thread): s/suspend_count/suspended/. Only call
9458 ResumeThread once. Warn if that fails.
9460 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9462 * win32-low.c (win32_wait): Don't read from the inferior when it
9465 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9467 * Makefile.in (win32_low_h): New variable.
9468 (win32-low.o): Add dependency on $(win32_low_h).
9469 (win32-arm-low.o, win32-i386-low.o): New rules.
9471 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9473 * hostio.c: Correct copyright year.
9475 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9477 * Makefile.in (OBS): Add hostio.o.
9478 (hostio.o): New rule.
9479 * server.h (handle_vFile): Declare.
9480 * hostio.c: New file.
9481 * server.c (handle_v_requests): Take packet_len and new_packet_len
9482 for binary packets. Call handle_vFile.
9483 (main): Update call to handle_v_requests.
9485 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9487 * linux-low.c: Include <sched.h>.
9489 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9491 * linux-low.c (linux_tracefork_grandchild): New.
9492 (linux_tracefork_child): Use clone.
9493 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9495 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9497 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9499 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9501 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9503 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9505 * inferiors.c (change_inferior_id): Delete.
9506 (add_pid_to_list, pull_pid_from_list): New.
9507 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9508 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9509 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9510 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9511 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9512 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9513 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9514 (using_threads): Always set to 1.
9515 (handle_extended_wait): New.
9516 (add_process): Do not set TID.
9517 (linux_create_inferior): Set must_set_ptrace_flags.
9518 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9519 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9520 (linux_thread_alive): Rename TID argument to LWPID.
9521 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9522 (linux_wait_for_event): Do not use TID or check using_threads. Update
9523 call to dead_thread_notify. Call handle_extended_wait.
9524 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9525 (send_sigstop): Delete sigstop_sent.
9526 (wait_for_sigstop): Avoid TID.
9527 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9528 (linux_test_for_tracefork): New.
9529 (linux_lookup_signals): Use thread_db_active and
9530 linux_supports_tracefork_flag.
9531 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9532 * linux-low.h (get_process_thread): Avoid TID.
9533 (struct process_ifo): Move thread_known and tid to the end. Remove
9535 (linux_attach_lwp, thread_db_init): Update prototypes.
9536 * server.h (change_inferior_id): Delete prototype.
9537 (add_pid_to_list, pull_pid_from_list): New prototypes.
9538 * thread-db.c (thread_db_use_events): New.
9539 (find_first_thread): Rename to...
9540 (find_one_thread): ...this. Update callers and messages. Do not
9541 call fatal. Check thread_db_use_events. Do not call
9542 change_inferior_id or new_thread_notify.
9543 (maybe_attach_thread): Update. Do not call new_thread_notify.
9544 (thread_db_init): Set thread_db_use_events. Check use_events.
9545 * utils.c (fatal, warning): Correct message prefix.
9547 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9549 * Makefile.in (clean): Remove new files.
9550 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9551 (powerpc-64.o, powerpc-64.c): New rules.
9552 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9553 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9555 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9557 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9558 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9559 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9560 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9561 (target_regsets): Add AltiVec and SPE register sets.
9562 * configure.ac: Check for AltiVec and SPE.
9563 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9564 (ppc_fill_vrregset, ppc_store_vrregset): New.
9565 (target_regsets): Add AltiVec register set.
9566 * configure: Regenerated.
9568 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9570 * linux-low.c (O_LARGEFILE): Define.
9571 (linux_read_memory): Use /proc/PID/mem.
9572 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9573 * configure, config.in: Regenerated.
9575 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9577 * linux-low.c (linux_wait_for_event): Do not pass signals while
9580 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9582 * win32-low.c (create_process): New.
9583 (win32_create_inferior): Use create_process instead of
9584 CreateProcess. If create_process failed retry appending an ".exe"
9585 suffix. Store the GetLastError result immediatelly after
9586 create_process calls and use it on the call to error.
9588 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9590 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9592 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9594 * configure.ac: Switch license to GPLv3.
9596 2007-08-01 Michael Snyder <msnyder@access-company.com>
9598 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9600 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9602 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9604 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9605 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9606 CloseToolhelp32Snapshot.
9607 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9608 CloseToolhelp32Snapshot.
9610 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9612 * server.c (main): Check for inferior exit before main loop.
9614 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9616 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9617 instead of on tmp_desc.
9619 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9620 Daniel Jacobowitz <dan@codesourcery.com>
9622 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9623 (add_thread): Minor cleanups.
9624 (clear_inferiors): Move lower in the file. Clear the DLL
9626 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9627 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9628 (xml_escape_text): New.
9629 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9631 (handle_v_cont): Report errors.
9632 (gdbserver_version): Update.
9633 (main): Correct size of own_buf. Do not report initial DLL events.
9634 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9635 (unloaded_dll, xml_escape_text): New.
9636 * win32-low.c (enum target_waitkind): Update comments.
9637 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9638 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9639 (win32_EnumProcessModules, win32_GetModuleInformation)
9640 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9641 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9642 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9643 (win32_Module32First, win32_Module32Next, load_toolhelp)
9644 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9645 (get_child_debug_event): Handle DLL events.
9646 (win32_wait): Likewise.
9648 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9650 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9651 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9653 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9655 * win32-low.c (handle_output_debug_string): Ignore event if not
9658 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9660 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9662 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9664 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9666 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9668 * inferiors.c (change_inferior_id): Add comment.
9669 * linux-low.c (check_removed_breakpoint): Add an early
9670 prototype. Improve debug output.
9671 (linux_attach): Doc update.
9672 (linux_detach_one_process, linux_detach): Clean up before releasing
9674 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9675 * linux-low.h (struct process_info): Doc improvement.
9676 * mem-break.c (delete_all_breakpoints): New.
9677 * mem-break.h (delete_all_breakpoints): New prototype.
9678 * thread-db.c (find_first_thread): New.
9679 (thread_db_create_event): Call it instead of
9680 thread_db_find_new_threads. Clean up unused variables.
9681 (maybe_attach_thread): Remove first thread handling.
9682 (thread_db_find_new_threads): Use find_first_thread.
9683 (thread_db_get_tls_address): Likewise.
9685 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9687 * thread-db.c (thread_db_find_new_threads): Add prototype.
9688 (thread_db_create_event): Check for the main thread before adding
9690 (maybe_attach_thread): Only enable event reporting if TID == 0.
9691 (thread_db_get_tls_address): Check for new threads.
9693 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9695 * linux-low.c (linux_create_inferior): Try execv before execvp.
9696 * spu-low.c (spu_create_inferior): Likewise.
9698 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9700 * linux-low.c (linux_create_inferior): Change execv to execvp.
9701 * spu-low.c (spu_create_inferior): Likewies.
9703 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9705 * Makefile.in (clean): Clean new files instead of deleted ones.
9706 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9707 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9709 * configure.srv: Specify XML files and new regformats for MIPS and
9711 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9712 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9713 an entry for the restart register.
9714 (mips_cannot_fetch_register, mips_cannot_store_register)
9715 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9716 register names to match the XML descriptions.
9717 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9718 restart register instead of $0.
9720 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9721 Markus Deuling <deuling@de.ibm.com>
9723 * remote-utils.c (decode_xfer_write): New function.
9724 * server.h (decode_xfer_write): Add prototype.
9725 * server.c (handle_query): Add PACKET_LEN argument. Support
9726 qXfer:spu:read and qXfer:spu:write packets.
9727 (main): Pass packet_len to handle_query.
9728 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9729 * target.h (target_ops): Add qxfer_spu.
9731 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9733 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9734 accessing non-seekable spufs files.
9736 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9738 * server.c (handle_query): Add reply for qC packet.
9740 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9741 Leo Zayas <lerele@champenstudios@com>
9743 * server.h (check_remote_input_interrupt_request): New function.
9744 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9745 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9746 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9747 (check_remote_input_interrupt_request): New function.
9748 * server.h (check_remote_input_interrupt_request): Declare.
9749 * win32-low.c (winapi_DebugBreakProcess,
9750 winapi_GenerateConsoleCtrlEvent): New typedefs.
9751 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9753 (win32_wait): Check for remote interrupt request
9754 with check_remote_input_interrupt_request.
9755 (win32_request_interrupt): New function.
9756 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9758 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9760 * win32-low.c (debug_registers_changed,
9761 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9762 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9763 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9764 (thread_rec): Get context using the low target.
9765 (child_add_thread): Call thread_added on the low target,
9766 which does the same thing.
9768 (do_initial_child_stuff): Remove debug registers references.
9769 Set context using the low target. Resume threads after
9770 setting the contexts.
9771 (child_continue): Remove dead variable. Remove debug
9772 registers references.
9773 (child_fetch_inferior_registers): Go through the low target.
9774 (do_child_store_inferior_registers): Remove.
9775 (child_store_inferior_registers): Go through the low target.
9776 (win32_resume): Remove debug registers references.
9777 Set context using the low target.
9778 (handle_exception): Change return type to void. Don't record
9779 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9780 first chance exception.
9781 (get_child_debug_event): Change return type to void. Remove
9782 goto loop. Always return after waiting for debug event.
9783 (win32_wait): Convert to switch statement. Handle spurious
9786 * win32-i386-low.c (debug_registers_changed,
9787 debug_registers_used): New.
9788 (initial_stuff): Rename to ...
9789 (i386_initial_stuff): ... this. Clear debug registers
9791 (store_debug_registers): Delete.
9792 (i386_get_thread_context): New.
9793 (load_debug_registers): Delete.
9794 (i386_set_thread_context): New.
9795 (i386_thread_added): New.
9796 (single_step): Rename to ...
9797 (i386_single_step): ... this.
9798 (do_fetch_inferior_registers): Rename to ...
9799 (i386_fetch_inferior_register): ... this.
9800 (i386_store_inferior_register): New.
9801 (the_low_target): Adapt to new interface.
9803 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9804 (arm_get_thread_context): New.
9805 (arm_set_thread_context): New.
9807 (do_fetch_inferior_registers): Rename to ...
9808 (arm_fetch_inferior_register): ... this.
9809 (arm_store_inferior_register): New.
9810 (arm_wince_breakpoint): Reimplement as unsigned long.
9811 (arm_wince_breakpoint_len): Define.
9812 (the_low_target): Adapt to new interface.
9814 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9815 load_debug_registers. Add get_thread_context, set_thread_context,
9816 thread_added and store_inferior_register. Rename
9817 fetch_inferior_registers to fetch_inferior_register.
9818 (regptr): Remove declaration.
9820 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9822 * linux-low.c (linux_detach): Change return type to int. Return 0.
9823 * spu-low.c (spu_detach): Likewise.
9825 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9827 * target.h (target_ops): Change return type of detach to int.
9829 (join_inferior): New.
9830 * server.c (main): Don't skip detach support on mingw32.
9831 If the inferior doesn't support detaching return error.
9832 Call join_inferior instead of using waitpid.
9833 * linux-low.c (linux_join): New.
9834 (linux_target_op): Add linux_join.
9835 * spu-low.c (spu_join): New.
9836 (spu_target_ops): Add spu_join.
9837 * win32-low.c (win32_detach): Adapt to new interface.
9838 Reopen current_process_handle before detaching. Issue a child
9839 resume before detaching.
9841 (win32_target_op): Add win32_join.
9843 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9845 * win32-low.c (win32-attach): Fix return value.
9846 * target.h (target_ops): Describe ATTACH return values.
9848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9850 * win32-low.c (GETPROCADDRESS): Define.
9851 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9852 (winapi_DebugSetProcessKillOnExit): Likewise.
9853 (win32_create_inferior): Force usage of ansi CreateProcessA.
9854 (win32_attach): Use GETPROCADDRESS.
9855 (win32_detach): Likewise.
9857 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9859 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9861 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9863 * win32-low.c: Commit leftover changes from 2007-03-29.
9865 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9867 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9868 fields short instead of int. Add explicit padding.
9869 (i387_cache_to_fsave): Remove unnecessary casts.
9870 (i387_fsave_to_cache): Doc fix.
9871 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9873 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9875 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9876 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9878 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9880 * configure.srv (arm*-*-mingw32ce*): Move near the other
9883 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9885 * configure.ac: Add errno checking.
9886 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9887 sys/file.h and malloc.h.
9888 (AC_CHECK_DECLS): Add perror.
9889 (srv_mingwce): Handle.
9890 * configure.srv (i[34567]86-*-cygwin*): Add
9891 win32-i386-low.o to srv_tgtobj.
9892 (i[34567]86-*-mingw*): Likewise.
9893 (arm*-*-mingw32ce*): Add case.
9894 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9895 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9896 [__MINGW32CE__] (strerror): New function.
9897 [__MINGW32CE__] (errno): Define to GetLastError.
9898 [__MINGW32CE__] (COUNTOF): New macro.
9899 (remote_open): Remove extra close call.
9900 * mem-break.c (delete_breakpoint_at): New function.
9901 * mem-break.h (delete_breakpoint_at): Declare.
9902 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9903 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9904 [USE_WIN32API] (read, write): Add char* casts.
9905 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9906 * server.h: Include wincecompat.h on Windows CE.
9907 [HAVE_ERRNO_H]: Check.
9908 (perror): Declare if not declared.
9909 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9910 (perror_with_name): Remove errno declaration.
9911 * wincecompat.h: New.
9912 * wincecompat.c: New.
9914 * win32-arm-low.c: New.
9915 * win32-i386-low.c: New.
9916 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9917 (OUTMSG2): Make it safe.
9919 (COUNTOF): New macro.
9920 (NUM_REGS): Get it from the low target.
9921 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9922 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9923 (thread_rec): Let low target handle debug registers.
9924 (child_add_thread): Likewise.
9925 (child_init_thread_list): Likewise.
9926 (continue_one_thread): Likewise.
9928 (do_child_fetch_inferior_registers): Move to ...
9929 * win32-i386-low.c: ... here, and rename to ...
9930 (do_fetch_inferior_registers): ... this.
9931 * win32-low.c (child_fetch_inferior_registers):
9932 Go through the low target.
9933 (do_child_store_inferior_registers): Use regptr.
9934 (strwinerror): New function.
9935 (win32_create_inferior): Handle Windows CE.
9936 Use strwinerror instead of strerror on Windows error
9937 codes. Add program to the error output.
9938 Don't close the main thread handle on Windows CE.
9939 (win32_attach): Use coredll.dll on Windows CE.
9940 (win32_kill): Close current process and current
9942 (win32_detach): Use coredll.dll on Windows CE.
9943 (win32_resume): Let low target handle debug registers, and
9945 (handle_exception): Add/Remove initial breakpoint. Avoid
9946 non-existant WSTOPSIG on Windows CE.
9947 (win32_read_inferior_memory): Cast to remove warning.
9948 (win32_arch_string): Go through the low target.
9949 (initialize_low): Call set_breakpoint_data with the low
9950 target's breakpoint.
9951 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9952 FOP_REGNUM, mappings): Move to ...
9953 * win32-i386-low.c: ... here.
9954 * win32-low.c (win32_thread_info): Move to ...
9955 * win32-low.h: ... here.
9956 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9957 win32-arm-low.c and wincecompat.c.
9958 (all:): Add $EXEEXT.
9959 (install-only:): Likewise.
9960 (gdbserver:): Likewise.
9961 (gdbreplay:): Likewise.
9962 * config.in: Regenerate.
9963 * configure: Regenerate.
9965 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9967 * win32-low.c: Rename typedef thread_info to
9968 win32_thread_info throughout.
9970 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9972 * win32-i386-low.c: Rename to ...
9973 * win32-low.c: ... this.
9974 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9975 * Makefile.in: Likewise.
9977 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9979 * remote-utils.c (monitor_output): Constify msg parameter.
9980 * server.h (monitor_output): Likewise.
9981 * win32-i386-low.c (handle_output_debug_string): New.
9982 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9983 handle_output_debug_string.
9984 (get_child_debug_event): Likewise.
9986 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9988 * server.c (main): Correct strtoul check.
9990 2007-03-27 Jon Ringle <jon@ringle.org>
9992 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9994 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9996 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9998 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10000 * terminal.h: Check HAVE_SGTTY_H.
10002 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10004 * remote-utils.c (remote_open): Print out the assigned port number.
10006 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10008 * remote-utils.c (monitor_output): New function.
10009 * server.c (debug_threads): Define here.
10010 (monitor_show_help): New function.
10011 (handle_query): Handle qRcmd.
10012 (main): Do not handle 'd' packet.
10013 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10014 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10017 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10019 * Makefile.in (EXEEXT): New.
10020 (clean): Use $(EXEEXT).
10022 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10024 * target.h (target_ops): Rename send_signal to request_interrupt,
10025 and remove enum target_signal parameter.
10026 * linux-low.c (linux_request_interrupt): Rename from
10027 linux_send_signal, and always send SIGINT.
10028 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10029 and always send SIGINT.
10030 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10032 (input_interrupt): Likewise.
10034 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10036 * server.c (get_features_xml): Check if target implemented
10038 * win32-i386-low.c (win32_arch_string): New.
10039 (win32_target_ops): Add win32_arch_string as arch_string member.
10041 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10043 * spu-low.c (spu_arch_string): New.
10044 (spu_target_ops): Add spu_arch_string.
10046 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10048 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10049 * configure.ac: Do not check for terminal.h.
10050 * configure, config.in: Regenerated.
10052 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10054 * Makefile.in (OBS): Add $(XML_BUILTIN).
10055 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10057 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10058 (arm-with-iwmmxt.c): New.
10059 * config.in, configure: Regenerate.
10060 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10061 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10062 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10063 (arm*-*-linux*): Add iWMMXt and regset support.
10064 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10065 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10066 (arm_store_wmmxregset, target_regsets): New.
10067 * server.c (get_features_xml): Take annex argument. Check builtin
10069 (handle_query): Handle multiple annexes.
10071 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10073 * remote-utils.c [USE_WIN32API] (read, write): Define.
10074 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10077 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10079 * linux-i386-low.c (the_low_target): Set arch_string.
10080 * linux-x86-64-low.c (the_low_target): Likewise.
10081 * linux-low.c (linux_arch_string): New.
10082 (linux_target_ops): Add it.
10083 * linux-low.h (struct linux_target_ops): Add arch_string.
10084 * server.c (write_qxfer_response): Use const void * for DATA.
10085 (get_features_xml): New.
10086 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10087 * target.h (struct target_ops): Add arch_string method.
10089 2007-01-03 Denis Pilat <denis.pilat@st.com>
10090 Daniel Jacobowitz <dan@codesourcery.com>
10092 * linux-low.c (linux_kill): Handle being called with no threads.
10093 * win32-i386-low.c (win32_kill): Likewise.
10094 (get_child_debug_event): Clear current_process_handle.
10096 2006-12-30 Denis PILAT <denis.pilat@st.com>
10097 Daniel Jacobowitz <dan@codesourcery.com>
10099 * remote-utils.c (remote_open): Check the type of specified
10100 serial port devices before opening them.
10101 * server.c (main): Kill the inferior if an error occurs during
10102 the first remote_open.
10104 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10106 * README: Update supported targets.
10108 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10110 * Makefile.in (clean): Remove reg-mips64.c.
10111 (reg-mips64.c, reg-mips64.o): New rules.
10112 * configure.srv: Handle mips64. Include regset support for mips.
10113 * linux-mips-low.c (union mips_register): New.
10114 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10115 (mips_breakpoint, mips_breakpoint_at): Use int.
10116 (mips_collect_register, mips_supply_register)
10117 (mips_collect_register_32bit, mips_supply_register_32bit)
10118 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10119 (mips_store_fpregset, target_regsets): New.
10120 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10122 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10124 * configure.srv: Add target "spu*-*-*".
10125 * Makefile.in (clean): Remove reg-spu.c.
10126 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10127 * spu-low.c: New file.
10129 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10131 * configure.ac: Correct td_thr_tls_get_addr test.
10132 * configure: Regenerated.
10134 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10136 * linux-low.c (linux_wait_for_event): Reformat. Use the
10137 pass_signals array.
10138 * remote-utils.c (decode_address_to_semicolon): New.
10139 * server.c (pass_signals, handle_general_set): New.
10140 (handle_query): Mention QPassSignals for qSupported.
10141 (main): Call handle_general_set.
10142 * server.h (pass_signals, decode_address_to_semicolon): New.
10144 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10146 * server.c (handle_query): Correct error handling for read_auxv.
10148 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10150 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10151 and srv_linux_thread_db to yes.
10152 * linux-s390-low.c (s390_fill_gregset): New function.
10153 (target_regsets): Define data structure.
10155 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10157 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10158 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10159 * config.in, configure: Regenerated.
10160 * inferiors.c (gdb_id_to_thread): New function.
10161 (gdb_id_to_thread_id): Use it.
10162 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10163 * linux-low.h (struct process_info): Add th member.
10164 (thread_db_get_tls_address): New prototype.
10165 * remote-utils.c (decode_address): Make non-static.
10166 * server.c (handle_query): Handle qGetTLSAddr.
10167 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10168 * target.h (struct target_ops): Add get_tls_address.
10169 * thread-db.c (maybe_attach_thread): Save the thread handle.
10170 (thread_db_get_tls_address): New.
10172 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10174 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10175 (linux_resume_one_process): Take a siginfo_t *. Update all
10176 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10177 (struct pending_signals): Add a siginfo_t.
10178 (linux_wait_for_process): Always set last_status.
10179 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10180 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10181 * linux-low.h (struct process_info): Add last_status.
10183 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10185 * remote-utils.c (try_rle): New function.
10186 (putpkt_binary): Use it.
10188 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10190 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10191 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10192 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10193 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10194 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10197 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10199 * server.c (terminal_fd): New variable.
10200 (old_foreground_pgrp): Likewise.
10201 (restore_old_foreground_pgrp): New function.
10202 (start_inferior): Record the terminal file descriptor in terminal_fd
10203 and its original foreground group in old_foreground_pgrp. Register
10204 restore_old_foreground_pgrp with atexit().
10206 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10208 * server.c (handle_query): Correct qPart to qXfer.
10210 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10212 * configure.ac: Check for more headers which are missing on
10213 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10214 * configure.srv: Add Cygwin and mingw32.
10215 * remote-utils.c: Don't include headers unconditionally which
10216 are missing on mingw32. Include <winsock.h> for mingw32.
10217 (remote_open): Adjust for mingw32 support. Flush
10218 standard error after writing to it.
10219 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10220 (unblock_async_io, enable_async_io, disable_async_io)
10221 (readchar, getpkt): Update for Winsock support.
10222 (prepare_resume_reply): Expect a protocol signal number.
10223 * server.c: Disable <sys/wait.h> on mingw32.
10224 (start_inferior): Adjust for mingw32 support. Flush
10225 standard error after writing to it.
10226 (attach_inferior): Likewise. Use protocol signal
10228 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10230 * win32-i386-low.c: New file.
10231 * Makefile.in (XM_CLIBS): Set.
10232 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10233 (win32-i386-low.o): New dependency rule.
10234 * linux-low.c (linux_wait): Use target signal numbers.
10235 * target.h (struct target_ops): Doc fix.
10236 * server.h (target_signal_to_name): New prototype.
10237 * gdbreplay.c: Don't include headers unconditionally which
10238 are missing on mingw32. Include <winsock.h> for mingw32.
10239 (remote_close, remote_open): Adjust for Winsock support.
10240 * configure, config.in: Regenerated.
10242 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10244 * server.c (decode_xfer_read, write_qxfer_response): New.
10245 (handle_query): Take a packet length argument. Handle
10246 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10247 the qSupported response.
10248 (main): Update call to handle_query.
10250 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10252 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10253 (putpkt_binary): Renamed from putpkt and adjusted for binary
10255 (putpkt): New wrapper for putpkt_binary.
10256 (readchar): Don't mask off the high bit.
10257 (decode_X_packet): New function.
10258 * server.c (main): Call putpkt_binary if a handler sets the packet
10259 length. Save the length of the incoming packet. Handle 'X'.
10260 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10262 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10264 * server.c (handle_query): Handle qSupported.
10266 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10268 * remote-utils.c (all_symbols_looked_up): New variable.
10269 (look_up_one_symbol): Check it.
10270 * server.h (look_up_one_symbol): New declaration.
10271 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10273 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10275 * Makefile.in (linux-arm-low.o): Update dependencies.
10276 * linux-arm-low.c: Include "gdb_proc_service.h".
10277 (PTRACE_GET_THREAD_AREA): Define.
10278 (ps_get_thread_area): New function.
10280 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10282 * configure.srv (m68k*-*-uclinux*): New target.
10283 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10284 (linux_resume_one_process): Remove extraneous cast.
10285 (linux_read_offsets): New.
10286 (linux_target_op): Add linux_read_offsets on mmuless systems.
10287 * server.c (handle_query): Add qOffsets logic.
10288 * target.h (struct target_ops): Add read_offsets.
10290 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10292 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10293 (PTRACE_GET_THREAD_AREA): Define.
10294 (ps_get_thread_area): New function.
10295 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10296 (linux-x86-64-low.o): Update.
10298 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10300 * configure.ac: Remove checks for prfpregset_t.
10301 * gdb_proc_service.h: New file.
10302 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10303 new "gdb_proc_service.h".
10304 * proc-service.c: Likewise.
10305 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10306 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10307 * Makefile.in (gdb_proc_service_h): Updated.
10308 * configure, config.in: Regenerated.
10310 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10312 * remote-utils.c (prepare_resume_reply): Move declaration
10313 of gdb_id_from_wait to the top of the block.
10315 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10317 * linux-low.c (regsets_store_inferior_registers): Read the regset
10318 from the target before filling it.
10320 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10322 * server.c (attach_inferior): Return SIGTRAP for a successful
10325 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10327 * Makefile.in (OBS): Add version.o.
10328 (STAGESTUFF): Delete.
10329 (version.o): Add dependencies.
10330 (version.c): Replace rule.
10331 (clean): Remove version.c.
10332 * server.c (gdbserver_version): New.
10333 (gdbserver_usage): Use printf.
10334 (main): Handle --version and --help.
10335 * server.h (version, host_name): Add declarations.
10337 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10349 * linux-x86-64-low.c:
10351 * linux-s390-low.c:
10352 * linux-ppc64-low.c:
10354 * linux-mips-low.c:
10355 * linux-m68k-low.c:
10356 * linux-m32r-low.c:
10359 * linux-ia64-low.c:
10360 * linux-i386-low.c:
10361 * linux-crisv32-low.c:
10373 * gdbserver.1: Add (C) after Copyright. Update the FSF
10376 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10378 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10379 (arm_breakpoint_at): Recognize both breakpoints.
10380 (the_low_target): Use the correct breakpoint instruction.
10382 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10384 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10385 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10386 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10387 (the_low_target): Update.
10389 2005-10-25 Andreas Schwab <schwab@suse.de>
10391 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10393 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10394 (ia64_num_regs): Reduce to 462.
10396 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10398 * acinclude.m4: Correct quoting.
10399 * aclocal.m4: Regenerated.
10401 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10402 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10403 (thread_db_init): Call thread_db_err_str.
10404 * configure.ac: Check for TD_VERSION.
10405 * config.in, configure: Regenerated.
10407 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10409 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10411 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10413 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10414 is not available. Define HAVE_PTRACE_GETREGS if it is.
10415 * config.in, configure: Regenerated.
10416 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10417 * linux-i386-low.c, linux-m68k-low.c: Update to use
10418 HAVE_PTRACE_GETREGS.
10419 * linux-low.c (regsets_fetch_inferior_registers)
10420 (regsets_store_inferior_registers): Only return 0 if we processed
10422 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10423 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10425 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10427 * inferiors.c (struct thread_info): Add gdb_id.
10428 (add_thread): Add gdb_id argument.
10429 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10430 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10431 calls to add_thread.
10432 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10433 * server.c (handle_query): Use thread_to_gdb_id.
10434 (handle_v_cont, main): Use gdb_id_to_thread_id.
10435 * server.h (add_thread): Update prototype.
10436 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10439 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10441 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10442 left-padded registers.
10443 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10444 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10446 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10448 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10449 * configure: Regenerate.
10450 * config.in: Regenerate.
10451 * server.h (NEED_DECLARATION_STRERROR):
10452 Replace with !HAVE_DECL_STRERROR.
10454 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10456 * linux-low.c (linux_wait, linux_send_signal): Don't test
10457 an unsigned long variable for > 0 if it could be MAX_ULONG.
10458 * server.c (myresume): Likewise.
10459 * target.c (set_desired_inferior): Likewise.
10461 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10463 * configure.ac: Simplify and improve check for socklen_t.
10464 * configure, config.in: Regenerate.
10466 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10468 * acconfig.h: Remove.
10469 * configure.ac: Add a test for socklen_t. Use three-argument
10470 AC_DEFINE throughout.
10471 * config.in: Regenerated using autoheader 2.59.
10472 * configure: Regenerated.
10474 * gdbreplay.c (socklen_t): Provide a default.
10475 (remote_open): Use socklen_t.
10476 * remote-utils.c (socklen_t): Provide a default.
10477 (remote_open): Use socklen_t.
10478 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10481 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10483 * linux-low.c (linux_read_memory, linux_write_memory)
10484 (linux_read_auxv): Likewise.
10485 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10486 (check_mem_write): Likewise.
10487 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10489 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10490 (registers_from_string, register_data): Likewise.
10491 * server.c (handle_query, main): Likewise.
10492 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10493 (decode_M_packet): Likewise.
10494 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10495 * target.h (struct target_ops): Update read_memory, write_memory,
10497 (read_inferior_memory, write_inferior_memory): Update.
10498 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10499 to unsigned char *.
10500 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10501 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10502 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10503 linux-s390-low.c, linux-sh-low.c: Update for changes in
10504 read_inferior_memory and the_low_target->breakpoint.
10506 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10508 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10509 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10510 * configure.srv: Add powerpc64-*-linux*.
10511 * linux-ppc64-low.c: New file.
10513 2005-05-23 Orjan Friberg <orjanf@axis.com>
10515 * linux-cris-low.c: New file with support for CRIS.
10516 * linux-crisv32-low.c: Ditto for CRISv32.
10517 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10518 (clean): Add reg-cris.c and reg-crisv32.c.
10519 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10520 reg-crisv32.o, and reg-crisv32.c to make rules.
10521 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10522 recognized targets.
10524 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10526 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10527 of sizeof (PTRACE_XFER_TYPE).
10528 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10530 2005-05-12 Orjan Friberg <orjanf@axis.com>
10532 * target.h (struct target_ops): Add insert_watchpoint,
10533 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10534 pointers for hardware watchpoint support.
10535 * linux-low.h (struct linux_target_ops): Ditto.
10536 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10537 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10538 to linux_target_ops.
10539 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10541 * server.c (main): Recognize 'Z' and 'z' packets.
10543 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10545 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10546 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10547 (the_low_target): Add new members.
10549 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10551 * proc-service.c (ps_lgetregs): Search all_processes instead of
10554 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10556 * server.c (start_inferior): Change return type to int.
10557 (attach_inferior): Change sigptr to int *.
10558 (handle_v_cont, handle_v_requests): Change signal to int *.
10559 (main): Change signal to int.
10561 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10563 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10564 * configure.srv: Add m32r*-*-linux*.
10565 * linux-m32r-low.c: New file.
10567 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10569 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10571 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10573 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10574 Take unsigned long arguments for PIDs.
10575 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10576 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10577 (wait_for_sigstop, linux_resume_one_process)
10578 (regsets_fetch_inferior_registers, linux_send_signal)
10579 (linux_read_auxv): Likewise. Update the types of variables holding
10580 PIDs. Update format string specifiers.
10581 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10582 * remote-utils.c (prepare_resume_reply): Likewise.
10583 * server.c (cont_thread, general_thread, step_thread)
10584 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10586 (handle_query): Update format specifiers.
10587 (handle_v_cont, main): Use strtoul for thread IDs.
10588 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10589 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10590 (general_thread, step_thread, thread_from_wait)
10591 (old_thread_from_wait): Update.
10592 * target.h (struct thread_resume): Use unsigned long for THREAD.
10593 (struct target_ops): Use unsigned long for arguments to attach and
10596 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10598 * acinclude.m4: Include bfd/bfd.m4 directly.
10599 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10600 <agriffis@toolchain.org>.
10601 * aclocal.m4, configure: Regenerated.
10603 2005-01-07 Andrew Cagney <cagney@gnu.org>
10605 * configure.ac: Rename configure.in, require autoconf 2.59.
10606 * configure: Re-generate.
10608 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10610 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10611 LIBS when finished.
10612 * aclocal.m4: Regenerated.
10613 * configure: Regenerated.
10615 2004-11-21 Andreas Schwab <schwab@suse.de>
10617 * linux-m68k-low.c (m68k_num_gregs): Define.
10618 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10619 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10620 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10621 (m68k_breakpoint_at): New. Add to the_low_target.
10623 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10624 srv_linux_thread_db to yes.
10626 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10628 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10629 (ARCH_SET_FS): Likewise.
10630 (ARCH_GET_FS): Likewise.
10631 (ARCH_GET_GS): Likewise.
10633 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10635 * linux-i386-low.c (ps_get_thread_area): New.
10636 * linux-x86-64-low.c (ps_get_thread_area): New.
10637 * linux-low.c: Include <sys/syscall.h>.
10638 (linux_kill_one_process): Don't kill the first thread here.
10639 (linux_kill): Kill the first thread here.
10640 (kill_lwp): New function.
10641 (send_sigstop, linux_send_signal): Use it.
10642 * proc-service.c: Clean up #ifdefs.
10643 (fpregset_info): Delete.
10644 (ps_lgetregs): Update and enable implementation.
10645 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10647 * remote-utils.c (struct sym_cache, symbol_cache): New.
10648 (input_interrupt): Print a clearer message.
10649 (async_io_enabled): New variable.
10650 (enable_async_io, disable_async_io): Use it. Update comments.
10651 (look_up_one_symbol): Use the symbol cache.
10652 * thread-db.c (thread_db_look_up_symbols): New function.
10653 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10655 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10657 * configure.in: Test for -rdynamic.
10658 * configure: Regenerated.
10659 * Makefile (INTERNAL_LDFLAGS): New.
10660 (gdbserver, gdbreplay): Use it.
10662 2004-09-02 Andrew Cagney <cagney@gnu.org>
10664 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10666 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10668 * linux-low.c (linux_wait): Clear all_processes list also.
10670 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10672 * linux-low.c: Include <errno.h>. Remove extern declaration of
10675 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10677 * gdbreplay.c, server.h, utils.c: Update copyright years.
10679 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10681 * server.c (main): Print child status or termination signal from
10682 variable 'signal', not 'sig'.
10684 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10686 * linux-low.c (linux_read_memory): Change return type to
10687 int. Check for and return error from ptrace().
10688 * target.c (read_inferior_memory): Change return type to int. Pass
10689 back return status from the_target->read_memory().
10690 * target.h (struct target_ops): Adapt *read_memory() prototype.
10692 (read_inferior_memory): Adapt prototype.
10693 * server.c (main): Return an error packet if
10694 read_inferior_memory() returns an error.
10696 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10698 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10699 Unify with other clean targets.
10701 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10703 * server.c (handle_v_cont): Call set_desired_inferior.
10705 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10707 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10709 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10711 * linux-low.c (linux_wait): Unblock async I/O.
10712 (linux_resume): Block and enable async I/O.
10713 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10714 * server.h (block_async_io, unblock_async_io): Add prototypes.
10716 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10718 * remote-utils.c (remote_open): Print a status notice after
10719 opening a TCP port.
10720 * server.c (attach_inferior): Print a status notice after
10723 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10725 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10727 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10729 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10731 * server.c, target.h: Update copyright years.
10733 2004-02-25 Roland McGrath <roland@redhat.com>
10735 * target.h (struct target_ops): New member `read_auxv'.
10736 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10737 * linux-low.c (linux_read_auxv): New function.
10738 (linux_target_ops): Initialize `read_auxv' member to that.
10740 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10742 Committed by Jim Blandy <jimb@redhat.com>.
10744 * linux-s390-low.c (s390_num_regs): Update.
10745 (s390_regmap): Remove control registers. Use __s390x__ predefine
10746 instead of GPR_SIZE to distiguish s390 and s390x targets.
10748 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10750 * linux-low.c: Update copyright year.
10751 (check_removed_breakpoint): Clear pending_is_breakpoint.
10752 (linux_set_resume_request, linux_queue_one_thread)
10753 (resume_status_pending_p): New functions.
10754 (linux_continue_one_thread): Use process->resume.
10755 (linux_resume): Only resume threads if there are no pending events.
10756 * linux-low.h (struct process_info): Add resume request
10759 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10761 * regcache.c (new_register_cache): Clear the allocated register
10762 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10764 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10766 * linux-low.c (linux_resume): Take a struct thread_resume *
10768 (linux_wait): Update call.
10769 (resume_ptr): New static variable.
10770 (linux_continue_one_thread): Renamed from
10771 linux_continue_one_process. Use resume_ptr.
10772 (linux_resume): Use linux_continue_one_thread.
10773 * server.c (handle_v_cont, handle_v_requests): New functions.
10774 (myresume): New function.
10775 (main): Handle 'v' case.
10776 * target.h (struct thread_resume): New type.
10777 (struct target_ops): Change argument of "resume" to struct
10779 (myresume): Delete macro.
10781 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10783 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10784 (uninstall): Support DESTDIR.
10786 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10788 * configure.srv: Add xscale*linux copy of arm*linux entry.
10790 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10792 * linux-arm-low.c (arm_reinsert_addr): New function.
10793 (the_low_target): Add arm_reinsert_addr.
10795 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10797 * mem-break.c: Remove whitespace at end of file.
10799 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10801 * configure.in: Check whether we need to prototype strerror.
10802 * server.h: Optionally prototype strerror.
10803 * gdbreplay.c (perror_with_name): Use strerror.
10804 * linux-low.c (linux_attach_lwp): Use strerror.
10805 * utils.c (perror_with_name): Use strerror.
10806 * config.in, configure: Regenerated.
10808 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10810 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10811 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10813 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10815 * Makefile.in (SFILES): Update.
10816 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10817 low-sun3.c: Remove files.
10819 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10821 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10822 (linux_detach_one_process, linux_detach): New functions.
10823 (linux_target_ops): Add linux_detach.
10824 * server.c (main): Handle 'D' packet.
10825 * target.h (struct target_ops): Add "detach" member.
10826 (detach_inferior): Define.
10828 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10830 From Kelley Cook <kelleycook@wideopenwest.com>:
10831 * configure.srv: Accept i[34567]86 variants.
10833 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10835 * linux-low.c (linux_wait_for_event): Correct comment typos.
10836 (linux_resume_one_process): Call check_removed_breakpoint.
10837 (linux_send_signal): New function.
10838 (linux_target_ops): Add linux_send_signal.
10839 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10841 * target.h (struct target_ops): Add send_signal.
10843 2003-05-29 Jim Blandy <jimb@redhat.com>
10845 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10846 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10847 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10848 away part of the register's value.
10850 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10852 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10853 (linux_wait_for_event, linux_init_signals): Likewise.
10855 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10857 * configure.in: Check for stdlib.h.
10858 * configure: Regenerated.
10859 * config.in: Regenerated.
10861 2003-01-04 Andreas Schwab <schwab@suse.de>
10863 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10865 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10867 * Makefile.in: Remove obsolete code.
10869 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10871 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10872 defined(PT_FPR0_HI).
10874 2002-11-17 Stuart Hughes <seh@zee2.com>
10876 * linux-arm-low.c (arm_num_regs): Increase.
10877 (arm_regmap): Include status register.
10879 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10881 * linux-low.c (register_addr): Remove incorrect -1 check.
10883 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10885 * linux-low.c (linux_create_inferior): Call setpgid. Return
10887 (unstopped_p, linux_signal_pid): Remove.
10888 (linux_target_ops): Remove linux_signal_pid.
10889 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10890 global instead of target method.
10891 * target.h (struct target_ops): Remove signal_pid. Update comment
10892 for create_inferior.
10893 * server.c (signal_pid): New variable.
10894 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10895 gdbserver. Set the child to be the foreground process group.
10896 (attach_inferior): Set signal_pid.
10898 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10900 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10902 2002-08-20 Jim Blandy <jimb@redhat.com>
10904 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10907 2002-08-01 Andrew Cagney <cagney@redhat.com>
10909 * Makefile.in: Make chill references obsolete.
10911 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10913 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10914 * configure: Regenerate.
10915 * config.in: Regenerate.
10917 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10919 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10920 (perror_with_name, remote_close, remote_open, expect, play): Static.
10922 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10924 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10925 byte offsets instead of an array of indexes.
10926 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10928 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10930 * regcache.c: Add comment.
10932 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10934 * thread-db.c: New file.
10935 * proc-service.c: New file.
10936 * acinclude.m4: New file.
10937 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10938 proc-service.o, and thread-db.o.
10939 (linux-low.o): Add USE_THREAD_DB.
10940 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10941 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10942 * aclocal.m4: Regenerated.
10943 * config.in: Regenerated.
10944 * configure: Regenerated.
10945 * configure.in: Check for proc_service.h, sys/procfs.h,
10946 thread_db.h, and linux/elf.h headrs.
10947 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10948 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10949 Check for -lthread_db and thread support.
10950 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10951 PowerPC, and SuperH.
10952 * i387-fp.c: Constify arguments.
10953 * i387-fp.h: Likewise.
10954 * inferiors.c: (struct thread_info): Renamed from
10955 `struct inferior_info'. Remove PID member. Use generic inferior
10956 list header. All uses updated.
10957 (inferiors, signal_pid): Removed.
10958 (all_threads): New variable.
10959 (get_thread): Define.
10960 (add_inferior_to_list): New function.
10961 (for_each_inferior): New function.
10962 (change_inferior_id): New function.
10963 (add_inferior): Removed.
10964 (remove_inferior): New function.
10965 (add_thread): New function.
10966 (free_one_thread): New function.
10967 (remove_thread): New function.
10968 (clear_inferiors): Use for_each_inferior and free_one_thread.
10969 (find_inferior): New function.
10970 (find_inferior_id): New function.
10971 (inferior_target_data): Update argument type.
10972 (set_inferior_target_data): Likewise.
10973 (inferior_regcache_data): Likewise.
10974 (set_inferior_regcache_data): Likewise.
10975 * linux-low.c (linux_bp_reinsert): Remove.
10976 (all_processes, stopping_threads, using_thrads)
10977 (struct pending_signals, debug_threads, pid_of): New.
10978 (inferior_pid): Replace with macro.
10979 (struct inferior_linux_data): Remove.
10980 (get_stop_pc, add_process): New functions.
10981 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10982 Use add_process and add_thread.
10983 (linux_attach_lwp): New function, based on old linux_attach. Use
10984 add_process and add_thread. Set stop_expected for new threads.
10985 (linux_attach): New function.
10986 (linux_kill_one_process): New function.
10987 (linux_kill): Kill all LWPs.
10988 (linux_thread_alive): Use find_inferior_id.
10989 (check_removed_breakpoints, status_pending_p): New functions.
10990 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10991 Update. Use WNOHANG. Wait for cloned processes also. Update process
10992 struct for the found process.
10993 (linux_wait_for_event): New function.
10994 (linux_wait): Use it. Support LWPs.
10995 (send_sigstop, wait_for_sigstop, stop_all_processes)
10996 (linux_resume_one_process, linux_continue_one_process): New functions.
10997 (linux_resume): Support LWPs.
10998 (REGISTER_RAW_SIZE): Remove.
10999 (fetch_register): Use register_size instead. Call supply_register.
11000 (usr_store_inferior_registers): Likewise. Call collect_register.
11001 Fix recursive case.
11002 (regsets_fetch_inferior_registers): Improve error message.
11003 (regsets_store_inferior_registers): Add debugging.
11004 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11005 (unstopped_p, linux_signal_pid): New functions.
11006 (linux_target_ops): Add linux_signal_pid.
11007 (linux_init_signals): New function.
11008 (initialize_low): Call it. Initialize using_threads.
11009 * regcache.c (inferior_regcache_data): Add valid
11011 (get_regcache): Fetch registers lazily. Add fetch argument
11012 and update all callers.
11013 (regcache_invalidate_one, regcache_invalidate): New
11015 (new_register_cache): Renamed from create_register_cache.
11016 Return the new regcache.
11017 (free_register_cache): Change argument to a void *.
11018 (registers_to_string, registers_from_string): Call get_regcache
11019 with fetch flag set.
11020 (register_data): Make static. Pass fetch flag to get_regcache.
11021 (supply_register): Call get_regcache with fetch flag clear.
11022 (collect_register): Call get_regcache with fetch flag set.
11023 (collect_register_as_string): New function.
11024 * regcache.h: Update.
11025 * remote-utils.c (putpkt): Flush after debug output and use
11027 Handle input interrupts while waiting for an ACK.
11028 (input_interrupt): Use signal_pid method.
11029 (getpkt): Flush after debug output and use stderr.
11030 (outreg): Use collect_register_as_string.
11031 (new_thread_notify, dead_thread_notify): New functions.
11032 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11033 and general_thread.
11034 (look_up_one_symbol): Flush after debug output.
11035 * server.c (step_thread, server_waiting): New variables.
11036 (start_inferior): Don't use signal_pid. Update call to mywait.
11037 (attach_inferior): Update call to mywait.
11038 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11039 (main): Don't fetch/store registers explicitly. Use
11040 set_desired_inferior. Support proposed ``Hs'' packet. Update
11042 * server.h: Update.
11043 (struct inferior_list, struct_inferior_list_entry): New.
11044 * target.c (set_desired_inferior): New.
11045 (write_inferior_memory): Constify.
11046 (mywait): New function.
11047 * target.h: Update.
11048 (struct target_ops): New signal_pid method.
11049 (mywait): Removed macro, added prototype.
11051 * linux-low.h (regset_func): Removed.
11052 (regset_fill_func, regset_store_func): New.
11053 (enum regset_type): New.
11054 (struct regset_info): Add type field. Use new operation types.
11055 (struct linux_target_ops): stop_pc renamed to get_pc.
11056 Add decr_pc_after_break and breakpoint_at.
11057 (get_process, get_thread_proess, get_process_thread)
11058 (strut process_info, all_processes, linux_attach_lwp)
11059 (thread_db_init): New.
11061 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11062 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11063 (the_low_target): Add new members.
11064 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11065 (i386_store_fpxregset): Constify.
11066 (target_regsets): Add new kind identifier.
11067 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11068 (i386_set_pc): Add debugging.
11069 (i386_breakpoint_at): New function.
11070 (the_low_target): Add new members.
11071 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11072 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11073 (mips_breakpoint_at): New.
11074 (the_low_target): Add new members.
11075 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11076 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11077 (the_low_target): Add new members.
11078 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11079 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11080 (the_low_target): Add new members.
11081 * linux-x86-64-low.c (target_regsets): Add new kind
11084 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11086 From Martin Pool <mbp@samba.org>:
11087 * server.c (gdbserver_usage): New function.
11090 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11092 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11093 stop_at -> stop_pc.
11095 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11097 * Makefile.in: Remove obsolete code.
11099 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11101 * linux-low.c (regsets_fetch_inferior_registers),
11102 (regsets_store_inferior_registers): Removed cast to int from
11104 * regcache.h: Added declaration of struct inferior_info.
11106 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11108 * inferiors.c (struct inferior_info): Add regcache_data.
11109 (add_inferior): Call create_register_cache.
11110 (clear_inferiors): Call free_register_cache.
11111 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11112 * regcache.c (struct inferior_regcache_data): New.
11113 (registers): Remove.
11114 (get_regcache): New function.
11115 (create_register_cache, free_register_cache): New functions.
11116 (set_register_cache): Don't initialize the register cache here.
11117 (registers_to_string, registers_from_string, register_data): Call
11119 * regcache.h: Add prototypes.
11120 * server.h: Likewise.
11122 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11124 * mem-break.c: New file.
11125 * mem-break.h: New file.
11126 * Makefile.in: Add mem-break.o rule; update server.h
11128 * inferiors.c (struct inferior_info): Add target_data
11130 (clear_inferiors): Free target_data member if set.
11131 (inferior_target_data, set_inferior_target_data): New functions.
11132 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11133 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11134 * linux-low.c (linux_bp_reinsert): New variable.
11135 (struct inferior_linux_data): New.
11136 (linux_create_inferior): Use set_inferior_target_data.
11137 (linux_attach): Likewise. Call add_inferior.
11138 (linux_wait_for_one_inferior): New function.
11139 (linux_wait): Call it.
11140 (linux_write_memory): Add const.
11141 (initialize_low): Call set_breakpoint_data.
11142 * linux-low.h (struct linux_target_ops): Add breakpoint
11144 * server.c (attach_inferior): Remove extra add_inferior
11146 * server.h: Include mem-break.h. Update inferior.c
11148 * target.c (read_inferior_memory)
11149 (write_inferior_memory): New functions.
11150 * target.h (read_inferior_memory)
11151 (write_inferior_memory): Change macros to prototypes.
11152 (struct target_ops): Update comments. Add const to write_memory
11155 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11157 * linux-low.c (usr_store_inferior_registers): Support
11158 registers which are allowed to fail to store.
11159 * linux-low.h (linux_target_ops): Likewise.
11160 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11161 (ppc_cannot_store_register): FPSCR may not be storable.
11163 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11165 * server.h: Include <string.h> if HAVE_STRING_H.
11166 * ChangeLog: Correct paths in last ChangeLog entry.
11168 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11170 * linux-low.h: Remove obsolete prototypes.
11171 (struct linux_target_ops): New.
11172 (extern the_low_target): New.
11173 * linux-low.c (num_regs, regmap): Remove declarations.
11174 (register_addr): Use the_low_target explicitly.
11175 (fetch_register): Likewise.
11176 (usr_fetch_inferior_registers): Likewise.
11177 (usr_store_inferior_registers): Likewise.
11178 * linux-arm-low.c (num_regs): Remove.
11179 (arm_num_regs): Define.
11180 (arm_regmap): Renamed from regmap, made static.
11181 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11183 (arm_cannot_store_register): Renamed from cannot_store_register,
11185 (the_low_target): New.
11186 * linux-i386-low.c (num_regs): Remove.
11187 (i386_num_regs): Define.
11188 (i386_regmap): Renamed from regmap, made static.
11189 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11191 (i386_cannot_store_register): Renamed from cannot_store_register,
11193 (the_low_target): New.
11194 * linux-ia64-low.c (num_regs): Remove.
11195 (ia64_num_regs): Define.
11196 (ia64_regmap): Renamed from regmap, made static.
11197 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11199 (ia64_cannot_store_register): Renamed from cannot_store_register,
11201 (the_low_target): New.
11202 * linux-m68k-low.c (num_regs): Remove.
11203 (m68k_num_regs): Define.
11204 (m68k_regmap): Renamed from regmap, made static.
11205 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11207 (m68k_cannot_store_register): Renamed from cannot_store_register,
11209 (the_low_target): New.
11210 * linux-mips-low.c (num_regs): Remove.
11211 (mips_num_regs): Define.
11212 (mips_regmap): Renamed from regmap, made static.
11213 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11215 (mips_cannot_store_register): Renamed from cannot_store_register,
11217 (the_low_target): New.
11218 * linux-ppc-low.c (num_regs): Remove.
11219 (ppc_num_regs): Define.
11220 (ppc_regmap): Renamed from regmap, made static.
11221 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11223 (ppc_cannot_store_register): Renamed from cannot_store_register,
11225 (the_low_target): New.
11226 * linux-s390-low.c (num_regs): Remove.
11227 (s390_num_regs): Define.
11228 (s390_regmap): Renamed from regmap, made static.
11229 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11231 (s390_cannot_store_register): Renamed from cannot_store_register,
11233 (the_low_target): New.
11234 * linux-sh-low.c (num_regs): Remove.
11235 (sh_num_regs): Define.
11236 (sh_regmap): Renamed from regmap, made static.
11237 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11239 (sh_cannot_store_register): Renamed from cannot_store_register,
11241 (the_low_target): New.
11242 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11243 (the_low_target): New.
11245 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11247 * Makefile.in: Add stamp-h target.
11248 * configure.in: Create stamp-h.
11249 * configure: Regenerated.
11251 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11253 * inferiors.c: New file.
11254 * target.c: New file.
11255 * target.h: New file.
11256 * Makefile.in: Add target.o and inferiors.o. Update
11258 * linux-low.c (inferior_pid): New static variable,
11259 moved from server.c.
11260 (linux_create_inferior): Renamed from create_inferior.
11261 Call add_inferior. Return 0 on success instead of a PID.
11262 (linux_attach): Renamed from myattach.
11263 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11264 (linux_thread_alive): Renamed from mythread_alive.
11265 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11267 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11268 (regsets_store_inferior_registers): Correct error message.
11269 Add missing ``return 0''.
11270 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11271 (linux_store_registers): Renamed from store_inferior_registers.
11272 (linux_read_memory): Renamed from read_inferior_memory.
11273 (linux_write_memory): Renamed from write_inferior_memory.
11274 (linux_target_ops): New structure.
11275 (initialize_low): Call set_target_ops ().
11276 * remote-utils.c (unhexify): New function.
11277 (hexify): New function.
11278 (input_interrupt): Send signals to ``signal_pid''.
11279 * server.c (inferior_pid): Remove.
11280 (start_inferior): Update create_inferior call.
11281 (attach_inferior): Call add_inferior.
11282 (handle_query): New function.
11283 (main): Call handle_query for `q' packets.
11284 * server.h: Include "target.h". Remove obsolete prototypes.
11285 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11287 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11289 * Makefile.in: Add WARN_CFLAGS. Update configury
11291 * configure.in: Check for <string.h>
11292 * configure: Regenerate.
11293 * config.in: Regenerate.
11294 * gdbreplay.c: Include needed system headers.
11295 (remote_open): Remove strchr prototype.
11296 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11297 * regcache.c (supply_register): Change buf argument to const void *.
11298 (supply_register_by_name): Likewise.
11299 (collect_register): Change buf argument to void *.
11300 (collect_register_by_name): Likewise.
11301 * regcache.h: Add missing prototypes.
11302 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11303 * server.c (handle_query): New function.
11304 (attached): New static variable, moved out of main.
11305 (main): Quiet longjmp clobber warnings.
11306 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11307 * utils.c (error): Remove NORETURN.