1 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2 Jan Kratochvil <jan.kratochvil@redhat.com>
4 * target.c: Include target/target-utils.h and fcntl.h.
5 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6 (target_fileio_read_stralloc): New functions.
8 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10 * Makefile.in (OBS): Add gdb_regex.o.
15 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
16 Jan Kratochvil <jan.kratochvil@redhat.com>
18 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
19 * Makefile.in (OBS): Add target-utils.o.
20 (linux-maps.o, target-utils.o): New.
21 * configure.srv (srv_linux_obj): Add linux-maps.o.
23 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
25 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
27 (the_low_target): Install it.
29 2015-07-14 Pedro Alves <palves@redhat.com>
31 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
32 Instead, ignore ECHILD, and throw an error for other errnos.
34 2015-07-10 Pedro Alves <palves@redhat.com>
36 * event-loop.c (struct callback_event) <data>: Change type to
37 gdb_client_data instance instead of gdb_client_data pointer.
38 (append_callback_event): Adjust.
40 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
42 * linux-aarch64-low.c: Add comments for each linux_target_ops
43 method. Remove comments already covered in target_ops and
44 linux_target_ops definitions.
45 (the_low_target): Add comments for each unimplemented method.
47 2015-07-09 Yao Qi <yao.qi@linaro.org>
49 * linux-aarch64-low.c (aarch64_regmap): Remove.
50 (aarch64_usrregs_info): Remove.
51 (regs_info): Set field usrregs to NULL.
53 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
55 * linux-low.c: Include "rsp-low.h"
56 (linux_low_encode_pt_config, linux_low_encode_raw): New.
57 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
58 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
59 (handle_btrace_enable_pt): New.
60 (handle_btrace_general_set): Support "pt".
61 (handle_btrace_conf_general_set): Support "pt:size".
63 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
65 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
68 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
70 * linux-aarch64-low.c: Remove comment about endianness.
71 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
72 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
75 2015-06-24 Gary Benson <gbenson@redhat.com>
77 * linux-i386-ipa.c (stdint.h): Do not include.
78 * lynx-i386-low.c (stdint.h): Likewise.
79 * lynx-ppc-low.c (stdint.h): Likewise.
80 * mem-break.c (stdint.h): Likewise.
81 * thread-db.c (stdint.h): Likewise.
82 * tracepoint.c (stdint.h): Likewise.
83 * win32-low.c (stdint.h): Likewise.
85 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
87 * server.c (write_qxfer_response): Update call to
90 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
91 Jan Kratochvil <jan.kratochvil@redhat.com>
93 Merge multiple hex conversions.
94 * gdbreplay.c (tohex): Rename to 'fromhex'.
95 (logchar): Use fromhex.
97 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
99 * server.c (handle_qxfer_libraries): Set `version' attribute for
102 2015-06-10 Gary Benson <gbenson@redhat.com>
104 * target.h (struct target_ops) <multifs_open>: New field.
105 <multifs_unlink>: Likewise.
106 <multifs_readlink>: Likewise.
107 * linux-low.c (nat/linux-namespaces.h): New include.
108 (linux_target_ops): Initialize the_target->multifs_open,
109 the_target->multifs_unlink and the_target->multifs_readlink.
110 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
111 * hostio.c (hostio_fs_pid): New static variable.
112 (hostio_handle_new_gdb_connection): New function.
113 (handle_setfs): Likewise.
114 (handle_open): Use the_target->multifs_open as appropriate.
115 (handle_unlink): Use the_target->multifs_unlink as appropriate.
116 (handle_readlink): Use the_target->multifs_readlink as
118 (handle_vFile): Handle vFile:setfs packets.
119 * server.c (handle_query): Call hostio_handle_new_gdb_connection
120 after target_handle_new_gdb_connection.
122 2015-06-10 Gary Benson <gbenson@redhat.com>
124 * configure.ac (AC_CHECK_FUNCS): Add setns.
125 * config.in: Regenerate.
126 * configure: Likewise.
127 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
128 (linux-namespaces.o): New rule.
129 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
131 2015-06-09 Gary Benson <gbenson@redhat.com>
133 * hostio.c (handle_open): Process mode argument with
136 2015-06-01 Yao Qi <yao.qi@linaro.org>
138 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
139 * linux-x86-low.c: Likewise.
141 2015-05-28 Don Breazeal <donb@codesourcery.com>
143 * linux-low.c (handle_extended_wait): Initialize
144 thread_info.last_resume_kind for new fork children.
146 2015-05-15 Pedro Alves <palves@redhat.com>
148 * target.h (target_handle_new_gdb_connection): Rewrite using if
151 2015-05-14 Joel Brobecker <brobecker@adacore.com>
153 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
154 * configure, config.in: Regenerate.
155 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
158 2015-05-12 Don Breazeal <donb@codesourcery.com>
160 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
161 PTRACE_EVENT_VFORK_DONE.
162 (linux_low_ptrace_options, extended_event_reported): Add vfork
164 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
165 and "vforkdone" for RSP 'T' Stop Reply Packet.
166 * server.h (report_vfork_events): Declare
169 2015-05-12 Don Breazeal <donb@codesourcery.com>
171 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
172 (the_low_target) <new_fork>: Initialize new member.
173 * linux-arm-low.c (arm_new_fork): New function.
174 (the_low_target) <new_fork>: Initialize new member.
175 * linux-low.c (handle_extended_wait): Call new target function
177 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
178 * linux-mips-low.c (mips_add_watchpoint): New function
179 extracted from mips_insert_point.
180 (the_low_target) <new_fork>: Initialize new member.
181 (mips_linux_new_fork): New function.
182 (mips_insert_point): Call mips_add_watchpoint.
183 * linux-x86-low.c (x86_linux_new_fork): New function.
184 (the_low_target) <new_fork>: Initialize new member.
186 2015-05-12 Don Breazeal <donb@codesourcery.com>
188 * linux-low.c (handle_extended_wait): Implement return value,
189 rename argument 'event_child' to 'event_lwp', handle
190 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
191 (linux_low_ptrace_options): New function.
192 (linux_low_filter_event): Call linux_low_ptrace_options,
193 use different argument fo linux_enable_event_reporting,
194 use return value from handle_extended_wait.
195 (extended_event_reported): New function.
196 (linux_wait_1): Call extended_event_reported and set
197 status to report fork events.
198 (linux_write_memory): Add pid to debug message.
199 (reset_lwp_ptrace_options_callback): New function.
200 (linux_handle_new_gdb_connection): New function.
201 (linux_target_ops): Initialize new structure member.
202 * linux-low.h (struct lwp_info) <waitstatus>: New member.
203 * lynx-low.c: Initialize new structure member.
204 * remote-utils.c (prepare_resume_reply): Implement stop reason
205 "fork" for "T" stop message.
206 * server.c (handle_query): Call handle_new_gdb_connection.
207 * server.h (report_fork_events): Declare global flag.
208 * target.h (struct target_ops) <handle_new_gdb_connection>:
210 (target_handle_new_gdb_connection): New macro.
211 * win32-low.c: Initialize new structure member.
213 2015-05-12 Don Breazeal <donb@codesourcery.com>
215 * mem-break.c (APPEND_TO_LIST): Define macro.
216 (clone_agent_expr): New function.
217 (clone_one_breakpoint): New function.
218 (clone_all_breakpoints): New function.
219 * mem-break.h: Declare new functions.
221 2015-05-12 Don Breazeal <donb@codesourcery.com>
223 * linux-low.c (linux_supports_fork_events): New function.
224 (linux_supports_vfork_events): New function.
225 (linux_target_ops): Initialize new structure members.
226 (initialize_low): Call linux_check_ptrace_features.
227 * lynx-low.c (lynx_target_ops): Initialize new structure
229 * server.c (report_fork_events, report_vfork_events):
231 (handle_query): Add new features to qSupported packet and
233 (captured_main): Initialize new global variables.
234 * target.h (struct target_ops) <supports_fork_events>:
236 <supports_vfork_events>: New member.
237 (target_supports_fork_events): New macro.
238 (target_supports_vfork_events): New macro.
239 * win32-low.c (win32_target_ops): Initialize new structure
242 2015-05-12 Gary Benson <gbenson@redhat.com>
244 * server.c (handle_qxfer_exec_file): Use current process
247 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
249 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
250 Remove HAVE_PTRACE_GETREGS conditionals.
251 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
252 instead of PTRACE_GETREGS and PTRACE_SETREGS.
254 2015-05-08 Yao Qi <yao.qi@linaro.org>
256 * linux-low.c (linux_supports_conditional_breakpoints): New
258 (linux_target_ops): Install new target method.
259 * lynx-low.c (lynx_target_ops): Install NULL hook for
260 supports_conditional_breakpoints.
261 * nto-low.c (nto_target_ops): Likewise.
262 * spu-low.c (spu_target_ops): Likewise.
263 * win32-low.c (win32_target_ops): Likewise.
264 * server.c (handle_query): Check
265 target_supports_conditional_breakpoints.
266 * target.h (struct target_ops) <supports_conditional_breakpoints>:
268 (target_supports_conditional_breakpoints): New macro.
270 2015-05-06 Pedro Alves <palves@redhat.com>
273 * server.c (start_inferior): If the process exits, mourn it.
275 2015-04-21 Gary Benson <gbenson@redhat.com>
277 * hostio.c (fileio_open_flags_to_host): Factored out to
278 fileio_to_host_openflags in common/fileio.c. Single use
281 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
283 * linux-xtensa-low.c (xtensa_fill_gregset)
284 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
287 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
289 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
290 (regs_info): Replace usrregs pointer with NULL.
292 2015-04-17 Gary Benson <gbenson@redhat.com>
294 * target.h (struct target_ops) <pid_to_exec_file>: New field.
295 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
296 * server.c (handle_qxfer_exec_file): New function.
297 (qxfer_packets): Add exec-file entry.
298 (handle_query): Report qXfer:exec-file:read as supported packet.
300 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
302 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
304 2015-04-09 Gary Benson <gbenson@redhat.com>
306 * hostio-errno.c (errno_to_fileio_error): Remove function.
307 Update caller to use remote_fileio_to_fio_error.
309 2015-04-09 Yao Qi <yao.qi@linaro.org>
311 * linux-low.c (linux_insert_point): Call
312 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
313 (linux_remove_point): Call remove_memory_breakpoint if type is
315 * linux-x86-low.c (x86_insert_point): Don't call
316 insert_memory_breakpoint.
317 (x86_remove_point): Don't call remove_memory_breakpoint.
319 2015-04-01 Pedro Alves <palves@redhat.com>
320 Cleber Rosa <crosa@redhat.com>
322 * server.c (gdbserver_usage): Reorganize and extend the usage
325 2015-03-24 Pedro Alves <palves@redhat.com>
327 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
328 output. Also dump TRAP_TRACE.
329 (linux_low_filter_event): In debug output, distinguish a
330 resume_stop SIGSTOP from a delayed SIGSTOP.
332 2015-03-24 Gary Benson <gbenson@redhat.com>
334 * linux-x86-low.c (x86_linux_new_thread): Moved to
336 (x86_linux_prepare_to_resume): Likewise.
338 2015-03-24 Gary Benson <gbenson@redhat.com>
340 * Makefile.in (x86-linux-dregs.o): New rule.
341 * configure.srv: Add x86-linux-dregs.o to relevant targets.
342 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
343 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
344 (x86_linux_dr_get): Likewise.
345 (x86_linux_dr_set): Likewise.
346 (update_debug_registers_callback): Likewise.
347 (x86_linux_dr_set_addr): Likewise.
348 (x86_linux_dr_get_addr): Likewise.
349 (x86_linux_dr_set_control): Likewise.
350 (x86_linux_dr_get_control): Likewise.
351 (x86_linux_dr_get_status): Likewise.
352 (x86_linux_update_debug_registers): Likewise.
354 2015-03-24 Gary Benson <gbenson@redhat.com>
356 * linux-x86-low.c (x86_linux_update_debug_registers):
357 New function, factored out from...
358 (x86_linux_prepare_to_resume): ...this.
360 2015-03-24 Gary Benson <gbenson@redhat.com>
362 * linux-x86-low.c (x86_linux_dr_get): Update comments.
363 (x86_linux_dr_set): Likewise.
364 (update_debug_registers_callback): Likewise.
365 (x86_linux_dr_set_addr): Likewise.
366 (x86_linux_dr_get_addr): Likewise.
367 (x86_linux_dr_set_control): Likewise.
368 (x86_linux_dr_get_control): Likewise.
369 (x86_linux_dr_get_status): Likewise.
370 (x86_linux_prepare_to_resume): Likewise.
372 2015-03-24 Gary Benson <gbenson@redhat.com>
374 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
375 Use perror_with_name. Pass string through gettext.
376 (x86_linux_dr_set): Likewise.
378 2015-03-24 Gary Benson <gbenson@redhat.com>
380 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
381 (x86_linux_dr_set_addr): ...this.
382 (x86_dr_low_get_addr): Rename to...
383 (x86_linux_dr_get_addr): ...this.
384 (x86_dr_low_set_control): Rename to...
385 (x86_linux_dr_set_control): ...this.
386 (x86_dr_low_get_control): Rename to...
387 (x86_linux_dr_get_control): ...this.
388 (x86_dr_low_get_status): Rename to...
389 (x86_linux_dr_get_status): ...this.
390 (x86_dr_low): Update with new function names.
392 2015-03-24 Gary Benson <gbenson@redhat.com>
394 * Makefile.in (x86-linux.o): New rule.
395 * configure.srv: Add x86-linux.o to relevant targets.
396 * linux-low.c (lwp_set_arch_private_info): New function.
397 (lwp_arch_private_info): Likewise.
398 * linux-x86-low.c: Include nat/x86-linux.h.
399 (arch_lwp_info): Removed structure.
400 (update_debug_registers_callback):
401 Use lwp_set_debug_registers_changed.
402 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
403 and lwp_set_debug_registers_changed.
404 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
406 2015-03-24 Gary Benson <gbenson@redhat.com>
408 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
409 * linux-arm-low.c (arm_new_thread): Likewise.
410 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
411 * linux-mips-low.c (mips_linux_new_thread): Likewise.
412 * linux-x86-low.c (x86_linux_new_thread): Likewise.
413 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
415 2015-03-24 Gary Benson <gbenson@redhat.com>
417 * linux-low.c (ptid_of_lwp): New function.
418 (lwp_is_stopped): Likewise.
419 (lwp_stop_reason): Likewise.
420 * linux-x86-low.c (update_debug_registers_callback):
422 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
425 2015-03-24 Gary Benson <gbenson@redhat.com>
427 * linux-low.h (linux_stop_lwp): Remove declaration.
429 2015-03-24 Gary Benson <gbenson@redhat.com>
431 * linux-low.h: Include nat/linux-nat.h.
432 * linux-low.c (iterate_over_lwps_args): New structure.
433 (iterate_over_lwps_filter): New function.
434 (iterate_over_lwps): Likewise.
435 * linux-x86-low.c (update_debug_registers_callback):
436 Update signature to what iterate_over_lwps expects.
437 Remove PID check that iterate_over_lwps now performs.
438 (x86_dr_low_set_addr): Use iterate_over_lwps.
439 (x86_dr_low_set_control): Likewise.
441 2015-03-24 Gary Benson <gbenson@redhat.com>
443 * linux-x86-low.c (x86_debug_reg_state): New function.
444 (x86_linux_prepare_to_resume): Use the above.
446 2015-03-24 Gary Benson <gbenson@redhat.com>
448 * linux-low.c (current_lwp_ptid): New function.
449 * linux-x86-low.c: Include nat/linux-nat.h.
450 (x86_dr_low_get_addr): Use current_lwp_ptid.
451 (x86_dr_low_get_control): Likewise.
452 (x86_dr_low_get_status): Likewise.
454 2015-03-20 Pedro Alves <palves@redhat.com>
456 * tracepoint.c (cmd_qtstatus): Make "str" const.
458 2015-03-20 Pedro Alves <palves@redhat.com>
460 * server.c (handle_general_set): Make "req_str" const.
462 2015-03-19 Pedro Alves <palves@redhat.com>
464 * linux-low.c (linux_resume_one_lwp): Rename to ...
465 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
466 instead call perror_with_name.
467 (check_ptrace_stopped_lwp_gone): New function.
468 (linux_resume_one_lwp): Reimplement as wrapper around
469 linux_resume_one_lwp_throw that swallows errors if the LWP is
472 2015-03-19 Pedro Alves <palves@redhat.com>
474 * linux-low.c (count_events_callback, select_event_lwp_callback):
475 No longer check whether the thread has resume_stop as last resume
478 2015-03-19 Pedro Alves <palves@redhat.com>
480 * linux-low.c (count_events_callback, select_event_lwp_callback):
481 Use the lwp's status_pending_p field, not the thread's.
483 2015-03-19 Pedro Alves <palves@redhat.com>
485 * linux-low.c (select_event_lwp_callback): Update comments to
486 no longer mention SIGTRAP.
488 2015-03-18 Gary Benson <gbenson@redhat.com>
490 * server.c (handle_query): Do not report vFile:fstat as supported.
492 2015-03-11 Gary Benson <gbenson@redhat.com>
494 * hostio.c (sys/types.h): New include.
495 (sys/stat.h): Likewise.
496 (common-remote-fileio.h): Likewise.
497 (handle_fstat): New function.
498 (handle_vFile): Handle vFile:fstat packets.
500 2015-03-11 Gary Benson <gbenson@redhat.com>
502 * configure.ac (AC_CHECK_MEMBERS): Add checks for
503 struct stat.st_blocks and struct stat.st_blksize.
504 * configure: Regenerate.
505 * config.in: Likewise.
506 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
507 (OBS): Add common-remote-fileio.o.
508 (common-remote-fileio.o): New rule.
510 2015-03-09 Pedro Alves <palves@redhat.com>
512 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
513 'struct sockaddr' pointer in 'accept' call.
515 2015-03-09 Pedro Alves <palves@redhat.com>
518 2015-03-07 Pedro Alves <palves@redhat.com>
519 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
520 or <winsock2.h> here. Instead include "gdb_socket.h".
521 (remote_open): Use union gdb_sockaddr_u.
522 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
523 or <winsock2.h> here. Instead include "gdb_socket.h".
524 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
525 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
527 (init_named_socket, gdb_agent_helper_thread): Use union
530 2015-03-07 Pedro Alves <palves@redhat.com>
532 * configure.ac (build_warnings): Move
533 -Wdeclaration-after-statement to the C-specific set.
534 * configure: Regenerate.
536 2015-03-07 Pedro Alves <palves@redhat.com>
538 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
539 or <winsock2.h> here. Instead include "gdb_socket.h".
540 (remote_open): Use union gdb_sockaddr_u.
541 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
542 or <winsock2.h> here. Instead include "gdb_socket.h".
543 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
544 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
546 (init_named_socket, gdb_agent_helper_thread): Use union
549 2015-03-07 Pedro Alves <palves@redhat.com>
551 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
554 2015-03-06 Yao Qi <yao.qi@linaro.org>
556 * linux-aarch64-low.c (aarch64_insert_point): Use
557 show_debug_regs as a boolean.
558 (aarch64_remove_point): Likewise.
560 2015-03-05 Pedro Alves <palves@redhat.com>
562 * lynx-low.c (lynx_target_ops): Install NULL hooks for
563 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
564 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
565 * nto-low.c (nto_target_ops): Likewise.
566 * spu-low.c (spu_target_ops): Likewise.
567 * win32-low.c (win32_target_ops): Likewise.
569 2015-03-04 Pedro Alves <palves@redhat.com>
571 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
572 Decide whether a breakpoint triggered based on the SIGTRAP's
574 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
575 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
576 (linux_low_filter_event): Check for breakpoints before checking
578 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
580 (linux_stopped_by_sw_breakpoint)
581 (linux_supports_stopped_by_sw_breakpoint)
582 (linux_stopped_by_hw_breakpoint)
583 (linux_supports_stopped_by_hw_breakpoint): New functions.
584 (linux_target_ops): Install new target methods.
586 2015-03-04 Pedro Alves <palves@redhat.com>
588 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
589 * server.c (swbreak_feature, hwbreak_feature): New globals.
590 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
591 (captured_main): Clear swbreak_feature and hwbreak_feature.
592 * server.h (swbreak_feature, hwbreak_feature): Declare.
593 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
594 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
595 supports_stopped_by_hw_breakpoint>: New fields.
596 (target_supports_stopped_by_sw_breakpoint)
597 (target_stopped_by_sw_breakpoint)
598 (target_supports_stopped_by_hw_breakpoint)
599 (target_stopped_by_hw_breakpoint): Declare.
601 2015-03-04 Pedro Alves <palves@redhat.com>
603 enum lwp_stop_reason -> enum target_stop_reason
604 * linux-low.c (check_stopped_by_breakpoint): Adjust.
605 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
606 (linux_wait_1, stuck_in_jump_pad_callback)
607 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
608 (linux_stopped_by_watchpoint):
609 * linux-low.h (enum lwp_stop_reason): Delete.
610 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
611 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
613 2015-03-04 Yao Qi <yao.qi@linaro.org>
615 * Makefile.in (SFILES): Add linux-aarch64-low.c.
617 2015-03-03 Gary Benson <gbenson@redhat.com>
619 * hostio.c (handle_vFile): Fix prefix lengths.
621 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
623 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
626 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
628 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
629 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
630 (clean): Add "rm -f" for above C files.
631 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
632 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
633 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
634 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
635 * linux-s390-low.c (HWCAP_S390_VX): New macro.
636 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
637 (init_registers_s390x_vx_linux64)
638 (init_registers_s390x_tevx_linux64)
639 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
640 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
642 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
643 (s390_store_vxrs_high): New functions.
644 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
646 (s390_arch_setup): Add logic for selecting one of the new target
647 descriptions. Activate the new vector regsets if applicable.
648 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
649 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
650 and init_registers_s390x_tevx_linux64.
652 2015-03-01 Pedro Alves <palves@redhat.com>
654 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
657 2015-02-27 Pedro Alves <palves@redhat.com>
659 * linux-x86-low.c (u_debugreg_offset): New function.
660 (x86_linux_dr_get, x86_linux_dr_set): Use it.
662 2015-02-27 Pedro Alves <palves@redhat.com>
664 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
665 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
666 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
667 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
668 (ps_lsetfpregs, ps_getpid)
669 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
670 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
671 (ps_lsetxregs, ps_plog): Declare.
673 2015-02-27 Pedro Alves <palves@redhat.com>
675 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
676 IP_AGENT_EXPORT_FUNC.
677 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
678 IP_AGENT_EXPORT_FUNC.
679 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
680 (IP_AGENT_EXPORT): Delete.
681 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
682 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
683 (gdb_trampoline_buffer_error, collecting, gdb_collect)
684 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
685 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
686 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
687 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
688 (traceframe_read_count, traceframe_write_count)
689 (traceframes_created, trace_state_variables, get_raw_reg)
690 (get_trace_state_variable_value, set_trace_state_variable_value)
691 (ust_loaded, helper_thread_id, cmd_buf): Use
692 IPA_SYM_EXPORTED_NAME.
693 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
694 (tracepoints) Use IP_AGENT_EXPORT_VAR.
695 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
696 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
697 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
698 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
699 EXTERN_C_PUSH/EXTERN_C_POP.
700 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
701 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
702 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
703 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
704 (traceframe_write_count, traceframe_read_count)
705 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
706 (about_to_request_buffer_space, get_trace_state_variable_value)
707 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
708 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
709 EXTERN_C_PUSH/EXTERN_C_POP.
710 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
711 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
712 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
713 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
714 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
715 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
716 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
717 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
719 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
720 (IP_AGENT_EXPORT_VAR_DECL): Define.
722 (gdb_agent_get_raw_reg): Declare.
724 2015-02-27 Tom Tromey <tromey@redhat.com>
725 Pedro Alves <palves@redhat.com>
727 Rename symbols whose names are reserved C++ keywords throughout.
729 2015-02-27 Pedro Alves <palves@redhat.com>
731 * Makefile.in (COMPILER): New, get it from autoconf.
732 (CXX): Get from autoconf instead.
733 (COMPILE.pre): Use COMPILER.
734 (CC-LD): Rename to ...
735 (CC_LD): ... this. Use COMPILER.
736 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
737 (CXX_FOR_TARGET): Default to g++ instead of gcc.
738 * acinclude.m4: Include build-with-cxx.m4.
739 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
740 Disable -Werror by default if building in C++ mode.
741 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
742 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
743 the C++ compiler. Save/restore CXXFLAGS too.
744 * configure: Regenerate.
746 2015-02-27 Pedro Alves <palves@redhat.com>
748 * acinclude.m4: Include libiberty.m4.
749 * configure.ac: Call libiberty_INIT.
750 * config.in, configure: Regenerate.
752 2015-02-26 Pedro Alves <palves@redhat.com>
754 * linux-low.c (linux_wait_1): When incrementing the PC past a
755 program breakpoint always use the_low_target.breakpoint_len as
756 increment, rather than the maximum between that and
757 the_low_target.decr_pc_after_break.
759 2015-02-23 Pedro Alves <palves@redhat.com>
761 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
762 thread was doing a step-over; always adjust the PC if
763 we stepped over a permanent breakpoint.
764 (linux_wait_1): If we stepped over breakpoint that was on top of a
765 permanent breakpoint, manually advance the PC past it.
767 2015-02-23 Pedro Alves <palves@redhat.com>
769 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
771 (x86_fill_gregset, x86_store_gregset): Use it when handling
774 2015-02-20 Pedro Alves <palves@redhat.com>
776 * thread-db.c: Include "nat/linux-procfs.h".
777 (thread_db_init): Skip listing new threads if the kernel supports
778 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
780 2015-02-20 Pedro Alves <palves@redhat.com>
782 * linux-low.c (status_pending_p_callback): Use ptid_match.
784 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
787 * linux-low.c (wstatus_maybe_breakpoint): Remove.
788 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
789 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
791 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
794 * tracepoint.c (cmd_qtinit): Add check for current_thread.
796 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
798 * linux-low.c (linux_low_btrace_conf): Print size.
799 * server.c (handle_btrace_conf_general_set): New.
800 (hanle_general_set): Call handle_btrace_conf_general_set.
801 (handle_query): Report Qbtrace-conf:bts:size as supported.
803 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
805 * linux-low.c (linux_low_enable_btrace): Update parameters.
806 (linux_low_btrace_conf): New.
807 (linux_target_ops)<to_btrace_conf>: Initialize.
808 * server.c (current_btrace_conf): New.
809 (handle_btrace_enable): Rename to ...
810 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
811 to target_enable_btrace. Update comment. Update users.
812 (handle_qxfer_btrace_conf): New.
813 (qxfer_packets): Add btrace-conf entry.
814 (handle_query): Report qXfer:btrace-conf:read as supported packet.
815 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
816 (target_ops)<read_btrace_conf>: New.
817 (target_enable_btrace): Update parameters.
818 (target_read_btrace_conf): New.
820 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
822 * server.c (handle_btrace_general_set): Remove call to
823 target_supports_btrace.
824 (supported_btrace_packets): New.
825 (handle_query): Call supported_btrace_packets.
826 * target.h: include btrace-common.h.
827 (btrace_target_info): Removed.
828 (supports_btrace, target_supports_btrace): Update parameters.
830 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
832 * Makefile.in (SFILES): Add common/btrace-common.c.
833 (OBS): Add common/btrace-common.o.
834 (btrace-common.o): Add build rules.
835 * linux-low: Include btrace-common.h.
836 (linux_low_read_btrace): Use struct btrace_data. Call
837 btrace_data_init and btrace_data_fini.
839 2015-02-06 Pedro Alves <palves@redhat.com>
841 * thread-db.c (find_new_threads_callback): Add debug output.
843 2015-02-04 Pedro Alves <palves@redhat.com>
845 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
846 (resume_stopped_resumed_lwps): New function.
847 (linux_wait_for_event_filtered): Use it.
849 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
851 * Makefile.in (SFILES): Add linux-personality.c.
852 (linux-personality.o): New rule.
853 * configure.srv (srv_linux_obj): Add linux-personality.o to the
854 list of objects to be built.
855 * linux-low.c: Include nat/linux-personality.h.
856 (linux_create_inferior): Remove code to disable address space
857 randomization (moved to ../nat/linux-personality.c). Create
858 cleanup to disable address space randomization.
860 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
862 * Makefile.in (posix-strerror.o): New rule.
863 (mingw-strerror.o): Likewise.
864 * configure: Regenerated.
865 * configure.ac: Source file ../common/common.host. Initialize new
866 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
868 2015-01-14 Yao Qi <yao@codesourcery.com>
870 * Makefile.in (SFILES): Add nat/ppc-linux.c.
871 (ppc-linux.o): New rule.
872 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
873 * configure.ac: AC_CHECK_FUNCS(getauxval).
874 * config.in: Re-generated.
875 * configure: Re-generated.
876 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
877 ppc64_64bit_inferior_p
879 2015-01-14 Yao Qi <yao@codesourcery.com>
881 * linux-ppc-low.c: Include "nat/ppc-linux.h".
882 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
883 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
884 (PT_ORIG_R3, PT_TRAP): Likewise.
885 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
886 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
887 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
889 2015-01-10 Joel Brobecker <brobecker@adacore.com>
891 * i387-fp.c (i387_cache_to_xsave): In look over
892 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
893 zmmh_low_space field by use of zmmh_high_space.
895 2015-01-09 Pedro Alves <palves@redhat.com>
897 * linux-low.c (step_over_bkpt): Move higher up in the file.
898 (handle_extended_wait): Don't store the stop_pc here.
899 (get_stop_pc): Adjust comments and rename to ...
900 (check_stopped_by_breakpoint): ... this. Record whether the LWP
901 stopped for a software breakpoint or hardware breakpoint.
902 (thread_still_has_status_pending_p): New function.
903 (status_pending_p_callback): Use
904 thread_still_has_status_pending_p. If the event is no longer
905 interesting, resume the LWP.
906 (handle_tracepoints): Add assert.
907 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
908 (wstatus_maybe_breakpoint): New function.
909 (cancel_breakpoint): Delete function.
910 (check_stopped_by_watchpoint): New function, factored out from
911 linux_low_filter_event.
912 (lp_status_maybe_breakpoint): Delete function.
913 (linux_low_filter_event): Remove filter_ptid argument.
914 Leave thread group exits pending here. Store the LWP's stop PC.
915 Always leave events pending.
916 (linux_wait_for_event_filtered): Pull all events out of the
917 kernel, and leave them all pending.
918 (count_events_callback, select_event_lwp_callback): Consider all
920 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
921 (select_event_lwp): Only give preference to the stepping LWP in
922 all-stop mode. Adjust comments.
923 (ignore_event): New function.
924 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
925 references to cancel_breakpoints. Adjust to renames. Also give
926 equal priority to all LWPs that have had events in non-stop mode.
927 If reporting a software breakpoint event, unadjust the LWP's PC.
928 (linux_wait): If linux_wait_1 returned an ignored event, retry.
929 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
931 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
932 (resume_status_pending_p): Use thread_still_has_status_pending_p.
933 (linux_stopped_by_watchpoint): Adjust.
934 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
935 * linux-low.h (enum lwp_stop_reason): New.
936 (struct lwp_info) <stop_pc>: Adjust comment.
937 <stopped_by_watchpoint>: Delete field.
938 <stop_reason>: New field.
939 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
940 * mem-break.c (software_breakpoint_inserted_here)
941 (hardware_breakpoint_inserted_here): New function.
942 * mem-break.h (software_breakpoint_inserted_here)
943 (hardware_breakpoint_inserted_here): Declare.
944 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
945 (cancel_breakpoints): Delete.
946 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
947 (upload_fast_traceframes): Remove references to
950 2015-01-09 Pedro Alves <palves@redhat.com>
952 * thread-db.c (find_new_threads_callback): Ignore thread if the
953 kernel thread ID is -1.
955 2015-01-09 Pedro Alves <palves@redhat.com>
957 * linux-low.c (linux_attach_fail_reason_string): Move to
958 nat/linux-ptrace.c, and rename.
959 (linux_attach_lwp): Update comment.
960 (attach_proc_task_lwp_callback): New function.
961 (linux_attach): Adjust to rename and use
962 linux_proc_attach_tgid_threads.
963 (linux_attach_fail_reason_string): Delete declaration.
965 2015-01-01 Joel Brobecker <brobecker@adacore.com>
967 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
968 * server.c (gdbserver_version): Likewise.
970 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
972 * remote-utils.c: Include ctype.h.
973 (input_interrupt): Explicitly handle the case when the char
974 received is the NUL byte. Improve the printing of non-ASCII
977 2014-12-16 Joel Brobecker <brobecker@adacore.com>
979 * linux-low.c (linux_low_filter_event): Update call to
980 linux_enable_event_reporting following the addition of
981 a new parameter to that function.
983 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
986 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
987 (AARCH64_FPCR_REGNO): Likewise.
988 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
989 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
990 (aarch64_store_fpregset): Likewise.
992 2014-12-15 Joel Brobecker <brobecker@adacore.com>
994 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
995 Remove FIXME comment about assumption about N.
997 2014-12-13 Joel Brobecker <brobecker@adacore.com>
999 * configure.ac: If large-file support is disabled in GDBserver,
1000 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1001 * configure: Regenerate.
1003 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1005 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1006 warning upon ENODATA from ptrace.
1007 * linux-s390-low.c (s390_store_tdb): New.
1008 (s390_regsets): Add regset for NT_S390_TDB.
1010 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1012 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1013 without a fill_function.
1014 * linux-s390-low.c (s390_fill_last_break): Remove.
1015 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1016 (s390_arch_setup): Use regset's size instead of fill_function for
1019 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1021 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1022 the regset's store function when ptrace returned an error.
1023 * regcache.c (get_thread_regcache): Invalidate register cache
1024 before fetching inferior's registers.
1026 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1028 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1029 while-loop as for-loop.
1030 (regsets_store_inferior_registers): Likewise.
1032 2014-11-28 Yao Qi <yao@codesourcery.com>
1034 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1035 * config.in, configure: Re-generate.
1036 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1039 2014-11-21 Yao Qi <yao@codesourcery.com>
1041 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1042 (AC_CHECK_HEADERS): Remove malloc.h.
1043 * configure: Re-generated.
1044 * config.in: Re-generated.
1045 * server.h: Don't include alloca.h and malloc.h.
1046 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1047 Don't include malloc.h.
1049 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1051 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1052 corresponding ERRNO check in same block.
1054 2014-11-12 Pedro Alves <palves@redhat.com>
1056 * server.c (cont_thread): Update comment.
1057 (start_inferior, attach_inferior): No longer clear cont_thread.
1058 (handle_v_cont): No longer set cont_thread.
1059 (captured_main): Clear cont_thread each time a GDB connects.
1061 2014-11-12 Pedro Alves <palves@redhat.com>
1063 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1064 thread, and don't resume all threads if the Hc thread has exited.
1066 2014-11-12 Pedro Alves <palves@redhat.com>
1068 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1069 the process group instead of to a specific LWP.
1071 2014-10-15 Pedro Alves <palves@redhat.com>
1074 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1076 (arm_set_thread_context): Delete.
1077 (the_low_target): Adjust.
1078 * win32-i386-low.c (debug_registers_changed)
1079 (debug_registers_used): Delete.
1080 (update_debug_registers_callback): New function.
1081 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1082 needing to update their debug registers.
1083 (win32_get_current_dr): New function.
1084 (x86_dr_low_get_addr, x86_dr_low_get_control)
1085 (x86_dr_low_get_status): Fetch the debug register from the thread
1087 (i386_initial_stuff): Adjust.
1088 (i386_get_thread_context): Remove current_event parameter. Don't
1089 clear debug_registers_changed nor copy DR values to
1091 (i386_set_thread_context): Delete.
1092 (i386_prepare_to_resume): New function.
1093 (i386_thread_added): Mark the thread as needing to update irs
1095 (the_low_target): Remove i386_set_thread_context and install
1096 i386_prepare_to_resume.
1097 * win32-low.c (win32_get_thread_context): Adjust.
1098 (win32_set_thread_context): Use SetThreadContext
1100 (win32_prepare_to_resume): New function.
1101 (win32_require_context): New function, factored out from ...
1102 (thread_rec): ... this.
1103 (continue_one_thread): Call win32_prepare_to_resume on each thread
1104 we're about to continue.
1105 (win32_resume): Call win32_prepare_to_resume on the event thread.
1106 * win32-low.h (struct win32_thread_info)
1107 <debug_registers_changed>: New field.
1108 (struct win32_target_ops): Change prototype of set_thread_context,
1109 delete set_thread_context and add prepare_to_resume.
1110 (win32_require_context): New declaration.
1112 2014-10-08 Gary Benson <gbenson@redhat.com>
1114 * server.h: Do not include common-exceptions.h.
1116 2014-10-08 Gary Benson <gbenson@redhat.com>
1118 * server.h: Do not include cleanups.h.
1120 2014-09-30 James Hogan <james.hogan@imgtec.com>
1122 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1125 2014-09-23 Yao Qi <yao@codesourcery.com>
1127 * linux-low.c (lp_status_maybe_breakpoint): New function.
1128 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1129 (count_events_callback): Likewise.
1130 (select_event_lwp_callback): Likewise.
1131 (cancel_breakpoints_callback): Likewise.
1133 2014-09-19 Don Breazeal <donb@codesourcery.com>
1135 * linux-low.c (handle_extended_wait): Call
1136 linux_ptrace_get_extended_event.
1137 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1138 linux_is_extended_waitstatus.
1140 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1142 * Makefile.in (CPPFLAGS): Define.
1143 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1144 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1146 2014-09-16 Gary Benson <gbenson@redhat.com>
1148 * inferiors.h (current_inferior): Renamed as...
1149 (current_thread): New variable. All uses updated.
1150 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1151 (maybe_move_out_of_jump_pad): Likewise.
1152 (cancel_breakpoint): Likewise.
1153 (linux_low_filter_event): Likewise.
1154 (wait_for_sigstop): Likewise.
1155 (linux_resume_one_lwp): Likewise.
1156 (need_step_over_p): Likewise.
1157 (start_step_over): Likewise.
1158 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1159 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1160 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1161 and save_inferior as saved_thread.
1162 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1164 (regcache_invalidate_thread): Likewise.
1165 * remote-utils.c (prepare_resume_reply): Likewise.
1166 * thread-db.c (thread_db_get_tls_address): Likewise.
1167 (disable_thread_event_reporting): Likewise.
1168 (remove_thread_event_breakpoints): Likewise.
1169 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1171 * target.h (set_desired_inferior): Renamed as...
1172 (set_desired_thread): New declaration. All uses updated.
1173 * server.c (myresume): Updated comment to reference thread instead
1175 (handle_serial_event): Likewise.
1176 (handle_target_event): Likewise.
1178 2014-09-12 Tom Tromey <tromey@redhat.com>
1179 Gary Benson <gbenson@redhat.com>
1181 * regcache.h: Include common-regcache.h.
1182 (regcache_read_pc): Don't declare.
1183 * regcache.c (get_thread_regcache_for_ptid): New function.
1185 2014-09-11 Tom Tromey <tromey@redhat.com>
1186 Gary Benson <gbenson@redhat.com>
1188 * symbol.c: New file.
1189 * Makefile.in (SFILES): Add symbol.c.
1190 (OBS): Add symbol.o.
1192 2014-09-11 Gary Benson <gbenson@redhat.com>
1194 * target.c (target_stop_ptid, target_continue_ptid): New
1197 2014-09-11 Tom Tromey <tromey@redhat.com>
1198 Gary Benson <gbenson@redhat.com>
1200 * target.h: Include target/target.h.
1201 * target.c (target_read_memory, target_read_uint32)
1202 (target_write_memory): New functions.
1204 2014-09-11 Gary Benson <gbenson@redhat.com>
1206 * server.h (debug_hw_points): Don't declare.
1207 * server.c (debug_hw_points): Don't define. Replace all uses
1208 with show_debug_regs.
1209 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1210 all uses with show_debug_regs.
1212 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1214 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1215 endianness into account.
1216 (ppc_supply_ptrace_register): Likewise.
1218 2014-09-03 James Hogan <james.hogan@imgtec.com>
1220 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1221 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1223 2014-09-03 Gary Benson <gbenson@redhat.com>
1225 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1226 ALL_DEBUG_ADDRESS_REGISTERS.
1228 2014-09-02 Gary Benson <gbenson@redhat.com>
1230 * i386-low.h: Renamed as...
1231 * x86-low.h: New file. All type, function and variable name
1232 prefixes changed from "i386_" to "x86_". All references updated.
1233 * i386-low.c: Renamed as...
1234 * x86-low.c: New file. All type, function and variable name
1235 prefixes changed from "i386_" to "x86_". All references updated.
1237 2014-09-02 Gary Benson <gbenson@redhat.com>
1239 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1240 (x86_linux_new_thread): Likewise.
1242 2014-08-29 Gary Benson <gbenson@redhat.com>
1244 * server.h (setjmp.h): Do not include.
1245 (toplevel): Do not declare.
1246 (common-exceptions.h): Include.
1247 (cleanups.h): Likewise.
1248 * server.c (toplevel): Do not define.
1249 (exit_code): New static global.
1250 (detach_or_kill_for_exit_cleanup): New function.
1251 (main): New function. Original main renamed to...
1252 (captured_main): New function.
1253 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1255 2014-08-29 Gary Benson <gbenson@redhat.com>
1257 * Makefile.in (SFILES): Add common/common-exceptions.c.
1258 (OBS): Add common-exceptions.o.
1259 (common-exceptions.o): New rule.
1260 * utils.c (prepare_to_throw_exception): New function.
1262 2014-08-29 Gary Benson <gbenson@redhat.com>
1264 * config.in: Regenerate.
1265 * configure: Likewise.
1267 2014-08-29 Gary Benson <gbenson@redhat.com>
1269 * Makefile.in (SFILES): Add common/cleanups.c.
1271 (cleanups.o): New rule.
1273 2014-08-29 Gary Benson <gbenson@redhat.com>
1275 * utils.c (internal_vwarning): New function.
1277 2014-08-28 Gary Benson <gbenson@redhat.com>
1279 * utils.h (fatal): Remove declaration.
1280 * utils.c (fatal): Remove function.
1282 2014-08-28 Gary Benson <gbenson@redhat.com>
1284 * tracepoint.c (gdb_agent_init): Replace fatal with
1286 (initialize_tracepoint): Likewise.
1288 2014-08-28 Gary Benson <gbenson@redhat.com>
1290 * remote-utils.c (remote_prepare): Replace fatal with error.
1292 2014-08-28 Gary Benson <gbenson@redhat.com>
1294 * linux-low.c (linux_async): Replace fatal with warning.
1296 (linux_start_non_stop): Return -1 if linux_async failed.
1298 2014-08-28 Gary Benson <gbenson@redhat.com>
1300 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1302 (i386_dr_low_get_addr): Remove vague comment.
1303 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1306 2014-08-28 Gary Benson <gbenson@redhat.com>
1308 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1309 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1311 (linux_resume_one_lwp): Likewise.
1312 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1314 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1315 with internal_error.
1316 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1317 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1318 (find_register_by_name): Replace fatal with internal_error.
1319 (find_regno): Likewise.
1320 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1321 * thread-db.c (thread_db_create_event): Likewise.
1322 (thread_db_load_search): Likewise.
1323 (try_thread_db_load_1): Likewise.
1324 * tracepoint.c (get_jump_space_head): Replace fatal with
1326 (claim_trampoline_space): Likewise.
1327 (have_fast_tracepoint_trampoline_buffer): Likewise.
1328 (cmd_qtstart): Likewise.
1329 (stop_tracing): Likewise.
1330 (fast_tracepoint_collecting): Likewise.
1331 (target_malloc): Likewise.
1332 (download_tracepoint): Likewise.
1333 (download_trace_state_variables): Replace check with gdb_assert.
1334 (upload_fast_traceframes): Replace fatal with internal_error.
1336 2014-08-19 Tom Tromey <tromey@redhat.com>
1337 Gary Benson <gbenson@redhat.com>
1339 * Makefile.in (SFILES): Add common/common-debug.c.
1340 (OBS): Add common-debug.o.
1341 (common-debug.o): New rule.
1342 * debug.h (debug_printf): Don't declare.
1343 * debug.c (debug_printf): Renamed and rewritten as...
1344 (debug_vprintf): New function.
1346 2014-08-19 Gary Benson <gbenson@redhat.com>
1348 * utils.h: Do not include print-utils.h.
1350 2014-08-19 Tom Tromey <tromey@redhat.com>
1351 Gary Benson <gbenson@redhat.com>
1353 * server.h: Add static assertion.
1354 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1356 2014-08-19 Tom Tromey <tromey@redhat.com>
1357 Gary Benson <gbenson@redhat.com>
1359 * Makefile.in (SFILES): Add common/errors.c.
1360 (OBS): Add errors.o.
1361 (IPA_OBS): Add errors-ipa.o.
1362 (errors.o): New rule.
1363 (errors-ipa.o): Likewise.
1364 * utils.h (perror_with_name, error, warning): Don't declare.
1365 * utils.c (warning): Renamed and rewritten as...
1366 (vwarning): New function.
1367 (error): Renamed and rewritten as...
1368 (verror): New function.
1369 (internal_error): Renamed and rewritten as...
1370 (internal_verror): New function.
1372 2014-08-07 Gary Benson <gbenson@redhat.com>
1374 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1375 * configure: Regenerate.
1376 * config.in: Likewise.
1377 * server.h: Do not include errno.h.
1378 * event-loop.c: Likewise.
1379 * hostio-errno.c: Likewise.
1380 * linux-low.c: Likewise.
1381 * remote-utils.c: Likewise.
1382 * spu-low.c: Likewise.
1383 * utils.c: Likewise.
1384 * gdbreplay.c: Unconditionally include errno.h.
1386 2014-08-07 Gary Benson <gbenson@redhat.com>
1388 * server.h: Do not include string.h.
1389 * event-loop.c: Likewise.
1390 * linux-low.c: Likewise.
1391 * regcache.c: Likewise.
1392 * remote-utils.c: Likewise.
1393 * spu-low.c: Likewise.
1394 * utils.c: Likewise.
1396 2014-08-07 Gary Benson <gbenson@redhat.com>
1398 * server.h: Do not include gdb_assert.h.
1400 2014-08-07 Gary Benson <gbenson@redhat.com>
1402 * server.h: Do not include common-utils.h.
1404 2014-08-07 Gary Benson <gbenson@redhat.com>
1406 * server.h: Do not include ptid.h.
1407 * notif.h: Likewise.
1409 2014-08-07 Gary Benson <gbenson@redhat.com>
1411 * server.h: Do not include gdb_locale.h.
1413 2014-08-07 Gary Benson <gbenson@redhat.com>
1415 * server.h: Do not include gdb/signals.h.
1416 * win32-low.c: Likewise.
1418 2014-08-07 Gary Benson <gbenson@redhat.com>
1420 * server.h: Do not include pathmax.h.
1422 2014-08-07 Gary Benson <gbenson@redhat.com>
1424 * server.h: Do not include libiberty.h.
1425 * linux-bfin-low.c: Likewise.
1427 2014-08-07 Gary Benson <gbenson@redhat.com>
1429 * server.h: Do not include ansidecl.h.
1431 2014-08-07 Gary Benson <gbenson@redhat.com>
1433 * linux-x86-low.c: Do not include stddef.h.
1434 * lynx-ppc-low.c: Likewise.
1435 * tracepoint.c: Likewise.
1437 2014-08-07 Gary Benson <gbenson@redhat.com>
1439 * server.h: Do not include stdarg.h.
1440 * nto-low.c: Likewise.
1442 2014-08-07 Gary Benson <gbenson@redhat.com>
1444 * server.h: Do not include stdlib.h.
1445 * inferiors.c: Likewise.
1446 * linux-low.c: Likewise.
1447 * regcache.c: Likewise.
1448 * spu-low.c: Likewise.
1449 * tracepoint.c: Likewise.
1450 * utils.c: Likewise.
1452 2014-08-07 Gary Benson <gbenson@redhat.com>
1454 * server.h: Do not include stdio.h.
1455 * linux-low.c: Likewise.
1456 * remote-utils.c: Likewise.
1457 * spu-low.c: Likewise.
1458 * utils.c: Likewise.
1459 * wincecompat.c: Likewise.
1461 2014-08-06 Gary Benson <gbenson@redhat.com>
1463 * regcache.c (init_register_cache): Move conditionals inside if.
1465 2014-08-06 Gary Benson <gbenson@redhat.com>
1467 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1469 2014-07-31 Gary Benson <gbenson@redhat.com>
1471 * ax.h: Do not include server.h.
1472 * gdbthread.h: Likewise.
1473 * lynx-low.h: Likewise.
1474 * notif.h: Likewise.
1476 2014-07-30 Gary Benson <gbenson@redhat.com>
1478 * server.h: Include common-defs.h.
1479 Do not include config.h or build-gnulib-gdbserver/config.h.
1481 2014-07-30 Gary Benson <gbenson@redhat.com>
1483 * hostio-errno.c: Move server.h to top of includes list.
1484 * inferiors.c: Likewise.
1485 * linux-x86-low.c: Likewise.
1486 * notif.c: Include server.h.
1488 2014-07-24 Tom Tromey <tromey@redhat.com>
1489 Gary Benson <gbenson@redhat.com>
1491 * server.h (CORE_ADDR): Now unsigned.
1493 2014-07-16 Pedro Alves <palves@redhat.com>
1495 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1497 2014-07-15 Pedro Alves <palves@redhat.com>
1499 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1502 2014-07-11 Pedro Alves <palves@redhat.com>
1504 * linux-low.c (kill_wait_lwp): New function, based on
1505 kill_one_lwp_callback, but use my_waitpid directly.
1506 (kill_one_lwp_callback, linux_kill): Use it.
1508 2014-06-23 Pedro Alves <palves@redhat.com>
1510 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1511 before setting DR0..DR3.
1513 2014-06-20 Gary Benson <gbenson@redhat.com>
1515 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1516 * configure: Regenerated.
1517 * config.in: Likewise.
1519 2014-06-20 Gary Benson <gbenson@redhat.com>
1521 * Makefile.in (SFILES): Update locations for files moved
1523 (object file files): Reordered.
1525 2014-06-20 Gary Benson <gbenson@redhat.com>
1527 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1528 (i386_dr_low_set_addr): Likewise.
1529 (i386_dr_low_get_addr): Likewise.
1530 (i386_dr_low_can_set_control): Likewise.
1531 (i386_dr_low_set_control): Likewise.
1532 (i386_dr_low_get_control): Likewise.
1533 (i386_dr_low_get_status): Likewise.
1534 (i386_get_debug_register_length): Likewise.
1535 * linux-x86-low.c (i386_dr_low_set_addr):
1536 Changed signature. Made static.
1537 (i386_dr_low_get_addr): Likewise.
1538 (i386_dr_low_set_control): Likewise.
1539 (i386_dr_low_get_control): Likewise.
1540 (i386_dr_low_get_status): Likewise.
1541 (i386_dr_low): New global variable.
1542 * win32-i386-low.c (i386_dr_low_set_addr):
1543 Changed signature. Made static.
1544 (i386_dr_low_get_addr): Likewise.
1545 (i386_dr_low_set_control): Likewise.
1546 (i386_dr_low_get_control): Likewise.
1547 (i386_dr_low_get_status): Likewise.
1548 (i386_dr_low): New global variable.
1550 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1552 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1553 * Makefile.in (AR, AR_FLAGS): Define.
1554 * configure: Regenerate.
1556 2014-06-19 Gary Benson <gbenson@redhat.com>
1558 * Makefile.in (i386-dregs.o): New rule.
1559 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1560 * i386-low.c (target.h): Remove include.
1561 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1562 (DR_CONTROL_SHIFT): Likewise.
1563 (DR_CONTROL_SIZE): Likewise.
1564 (DR_RW_EXECUTE): Likewise.
1565 (DR_RW_WRITE): Likewise.
1566 (DR_RW_READ): Likewise.
1567 (DR_RW_IORW): Likewise.
1568 (DR_LEN_1): Likewise.
1569 (DR_LEN_2): Likewise.
1570 (DR_LEN_4): Likewise.
1571 (DR_LEN_8): Likewise.
1572 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1573 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1574 (DR_ENABLE_SIZE): Likewise.
1575 (DR_LOCAL_SLOWDOWN): Likewise.
1576 (DR_GLOBAL_SLOWDOWN): Likewise.
1577 (DR_CONTROL_RESERVED): Likewise.
1578 (I386_DR_CONTROL_MASK): Likewise.
1579 (I386_DR_VACANT): Likewise.
1580 (I386_DR_LOCAL_ENABLE): Likewise.
1581 (I386_DR_GLOBAL_ENABLE): Likewise.
1582 (I386_DR_DISABLE): Likewise.
1583 (I386_DR_SET_RW_LEN): Likewise.
1584 (I386_DR_GET_RW_LEN): Likewise.
1585 (I386_DR_WATCH_HIT): Likewise.
1586 (i386_wp_op_t): Likewise.
1587 (i386_show_dr): Likewise.
1588 (i386_length_and_rw_bits): Likewise.
1589 (i386_insert_aligned_watchpoint): Likewise.
1590 (i386_remove_aligned_watchpoint): Likewise.
1591 (i386_handle_nonaligned_watchpoint): Likewise.
1592 i386_update_inferior_debug_regs(): Likewise.
1593 (i386_dr_insert_watchpoint): Likewise.
1594 (i386_dr_remove_watchpoint): Likewise.
1595 (i386_dr_region_ok_for_watchpoint): Likewise.
1596 (i386_dr_stopped_data_address): Likewise.
1597 (i386_dr_stopped_by_watchpoint): Likewise.
1599 2014-06-19 Gary Benson <gbenson@redhat.com>
1601 * i386-low.c (i386_dr_show): Renamed to
1602 i386_show_dr and made static. All uses updated.
1603 (i386_dr_length_and_rw_bits): Renamed to
1604 i386_length_and_rw_bits and made static.
1606 (i386_dr_insert_aligned_watchpoint): Renamed to
1607 i386_insert_aligned_watchpoint and made static.
1609 (i386_dr_remove_aligned_watchpoint): Renamed to
1610 i386_remove_aligned_watchpoint and made static.
1612 (i386_dr_update_inferior_debug_regs): Renamed to
1613 i386_update_inferior_debug_regs and made static.
1616 2014-06-18 Gary Benson <gbenson@redhat.com>
1618 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1619 (i386_dr_low_can_set_control): Likewise.
1620 (i386_get_debug_register_length): Likewise.
1621 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1622 (i386_dr_low_can_set_control): Likewise.
1623 (i386_get_debug_register_length): Likewise.
1625 2014-06-17 Gary Benson <gbenson@redhat.com>
1627 * i386-low.h (i386-dregs.h): New include.
1628 (DR_FIRSTADDR): Now in i386-dregs.h.
1629 (DR_LASTADDR): Likewise.
1630 (DR_NADDR): Likewise.
1631 (DR_STATUS): Likewise.
1632 (DR_CONTROL): Likewise.
1633 (i386_debug_reg_state): Likewise.
1634 (i386_dr_insert_watchpoint): Likewise.
1635 (i386_dr_remove_watchpoint): Likewise.
1636 (i386_dr_region_ok_for_watchpoint): Likewise.
1637 (i386_dr_stopped_data_address): Likewise.
1638 (i386_dr_stopped_by_watchpoint): Likewise.
1639 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1641 2014-06-18 Gary Benson <gbenson@redhat.com>
1643 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1644 i386_dr_insert_watchpoint.
1645 (i386_low_remove_watchpoint): Renamed to
1646 i386_dr_remove_watchpoint.
1647 (i386_low_region_ok_for_watchpoint): Renamed to
1648 i386_dr_region_ok_for_watchpoint.
1649 (i386_low_stopped_data_address): Renamed to
1650 i386_dr_stopped_data_address.
1651 (i386_low_stopped_by_watchpoint): Renamed to
1652 i386_dr_stopped_by_watchpoint.
1653 * i386-low.c (i386_show_dr): Renamed to
1654 i386_dr_show and made nonstatic. All uses updated.
1655 (i386_length_and_rw_bits): Renamed to
1656 i386_dr_length_and_rw_bits and made nonstatic.
1658 (i386_insert_aligned_watchpoint): Renamed to
1659 i386_dr_insert_aligned_watchpoint and made nonstatic.
1661 (i386_remove_aligned_watchpoint): Renamed to
1662 i386_dr_remove_aligned_watchpoint and made nonstatic.
1664 (i386_update_inferior_debug_regs): Renamed to
1665 i386_dr_update_inferior_debug_regs and made nonstatic.
1667 (i386_low_insert_watchpoint): Renamed to
1668 i386_dr_insert_watchpoint. All uses updated.
1669 (i386_low_remove_watchpoint): Renamed to
1670 i386_dr_remove_watchpoint. All uses updated.
1671 (i386_low_region_ok_for_watchpoint): Renamed to
1672 i386_dr_region_ok_for_watchpoint. All uses updated.
1673 (i386_low_stopped_data_address): Renamed to
1674 i386_dr_stopped_data_address. All uses updated.
1675 (i386_low_stopped_by_watchpoint): Renamed to
1676 i386_dr_stopped_by_watchpoint. All uses updated.
1678 2014-06-18 Gary Benson <gbenson@redhat.com>
1680 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1681 (i386_dr_low_can_set_control): Likewise.
1682 (i386_insert_aligned_watchpoint): New check.
1684 2014-06-18 Gary Benson <gbenson@redhat.com>
1686 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1689 2014-06-18 Gary Benson <gbenson@redhat.com>
1691 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1692 instead of fatal and error.
1693 (i386_handle_nonaligned_watchpoint): Likewise.
1695 2014-06-18 Gary Benson <gbenson@redhat.com>
1697 * i386-low.c (i386_get_debug_register_length): New macro.
1698 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1699 (i386_show_dr): Use debug_printf instead of fprintf. Use
1700 phex to format values.
1702 2014-06-18 Gary Benson <gbenson@redhat.com>
1704 * i386-low.h: Comment changes.
1705 * i386-low.c: Likewise.
1707 2014-06-18 Gary Benson <gbenson@redhat.com>
1709 * i386-low.c: Whitespace changes.
1711 2014-06-12 Tom Tromey <tromey@redhat.com>
1713 * utils.c (freeargv): Remove.
1715 2014-06-12 Tom Tromey <tromey@redhat.com>
1717 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1718 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1719 (parse_debug_format_options): Likewise.
1720 (gdbserver_usage): Likewise.
1721 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1722 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1723 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1725 ($(LIBGNU)): Depend on libiberty.
1726 (all-lib): Recurse into all subdirs.
1727 (install-only): Invoke "install" target in subdirs.
1728 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1730 * configure: Rebuild.
1731 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1732 for vasprintf, vsnprintf, or gettimeofday.
1733 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1736 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1738 * development.sh: Delete.
1739 * Makefile.in (config.status): Adjust dependency on development.sh.
1740 * configure.ac: Adjust development.sh source call.
1741 * configure: Regenerate.
1743 2014-06-02 Pedro Alves <palves@redhat.com>
1745 * ax.c (gdb_free_agent_expr): New function.
1746 * ax.h (gdb_free_agent_expr): New declaration.
1747 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1749 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1751 (clear_breakpoint_conditions_and_commands): New function.
1752 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1753 (clear_breakpoint_conditions_and_commands): New declaration.
1755 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1757 * linux-aarch64-low.c (asm/ptrace.h): Include.
1759 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1761 Fix TLS access for -static -pthread.
1762 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1763 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1764 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1766 2014-05-20 Pedro Alves <palves@redhat.com>
1768 * linux-aarch64-low.c (aarch64_insert_point)
1769 (aarch64_remove_point): No longer check whether the type is
1770 supported here. Adjust to new interface.
1771 (the_low_target): Install aarch64_supports_z_point_type as
1772 supports_z_point_type method.
1773 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1774 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1775 instead of a Z packet char. Adjust.
1776 (arm_supports_z_point_type): New function.
1777 (arm_insert_point, arm_remove_point): Adjust to new interface.
1778 (the_low_target): Install arm_supports_z_point_type.
1779 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1780 (cris_insert_point, cris_remove_point): Adjust to new interface.
1781 Don't check whether the type is supported here.
1782 (the_low_target): Install cris_supports_z_point_type.
1783 * linux-low.c (linux_supports_z_point_type): New function.
1784 (linux_insert_point, linux_remove_point): Adjust to new interface.
1785 * linux-low.h (struct linux_target_ops) <insert_point,
1786 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1787 raw_breakpoint pointer parameter.
1788 <supports_z_point_type>: New method.
1789 * linux-mips-low.c (mips_supports_z_point_type): New function.
1790 (mips_insert_point, mips_remove_point): Adjust to new interface.
1791 Use mips_supports_z_point_type.
1792 (the_low_target): Install mips_supports_z_point_type.
1793 * linux-ppc-low.c (the_low_target): Install NULL as
1794 supports_z_point_type method.
1795 * linux-s390-low.c (the_low_target): Install NULL as
1796 supports_z_point_type method.
1797 * linux-sparc-low.c (the_low_target): Install NULL as
1798 supports_z_point_type method.
1799 * linux-x86-low.c (x86_supports_z_point_type): New function.
1800 (x86_insert_point): Adjust to new insert_point interface. Use
1801 insert_memory_breakpoint. Adjust to new
1802 i386_low_insert_watchpoint interface.
1803 (x86_remove_point): Adjust to remove_point interface. Use
1804 remove_memory_breakpoint. Adjust to new
1805 i386_low_remove_watchpoint interface.
1806 (the_low_target): Install x86_supports_z_point_type.
1807 * lynx-low.c (lynx_target_ops): Install NULL as
1808 supports_z_point_type callback.
1809 * nto-low.c (nto_supports_z_point_type): New.
1810 (nto_insert_point, nto_remove_point): Adjust to new interface.
1811 (nto_target_ops): Install nto_supports_z_point_type.
1812 * mem-break.c: Adjust intro comment.
1813 (struct raw_breakpoint) <raw_type, size>: New fields.
1814 <inserted>: Update comment.
1815 <shlib_disabled>: Delete field.
1816 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1817 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1818 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1819 (raw_bkpt_type_to_target_hw_bp_type): New function.
1820 (find_enabled_raw_code_breakpoint_at): New function.
1821 (find_raw_breakpoint_at): New type and size parameters. Use them.
1822 (insert_memory_breakpoint): New function, based off
1823 set_raw_breakpoint_at.
1824 (remove_memory_breakpoint): New function.
1825 (set_raw_breakpoint_at): Reimplement.
1826 (set_breakpoint): New, based on set_breakpoint_at.
1827 (set_breakpoint_at): Reimplement.
1828 (delete_raw_breakpoint): Go through the_target->remove_point
1829 instead of assuming memory breakpoints.
1830 (find_gdb_breakpoint_at): Delete.
1831 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1832 (find_gdb_breakpoint): New function.
1833 (set_gdb_breakpoint_at): Delete.
1834 (z_type_supported): New function.
1835 (set_gdb_breakpoint_1): New function, loosely based off
1836 set_gdb_breakpoint_at.
1837 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1838 (delete_gdb_breakpoint_at): Delete.
1839 (delete_gdb_breakpoint_1): New function, loosely based off
1840 delete_gdb_breakpoint_at.
1841 (delete_gdb_breakpoint): New function.
1842 (clear_gdb_breakpoint_conditions): Rename to ...
1843 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1845 (add_condition_to_breakpoint): Make static.
1846 (add_breakpoint_condition): Take a struct breakpoint pointer
1847 instead of an address. Adjust.
1848 (gdb_condition_true_at_breakpoint): Rename to ...
1849 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1851 (gdb_condition_true_at_breakpoint): Reimplement.
1852 (add_breakpoint_commands): Take a struct breakpoint pointer
1853 instead of an address. Adjust.
1854 (gdb_no_commands_at_breakpoint): Rename to ...
1855 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1856 parameter. Return true if no breakpoint was found. Change debug
1858 (gdb_no_commands_at_breakpoint): Reimplement.
1859 (run_breakpoint_commands): Rename to ...
1860 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1861 and change return type to boolean.
1862 (run_breakpoint_commands): New function.
1863 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1864 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1865 breakpoint. Go through the_target->remove_point instead of
1866 assuming memory breakpoint.
1867 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1868 software and hardware breakpoints.
1869 (reinsert_raw_breakpoint): Go through the_target->insert_point
1870 instead of assuming memory breakpoint.
1871 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1872 software and hardware breakpoints.
1873 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1874 Check both software and hardware breakpoints.
1875 (validate_inserted_breakpoint): Assert the breakpoint is a
1876 software breakpoint. Set the inserted flag to -1 instead of
1877 setting shlib_disabled.
1878 (delete_disabled_breakpoints): Adjust.
1879 (validate_breakpoints): Only validate software breakpoints.
1880 Adjust to inserted flag change.
1881 (check_mem_read, check_mem_write): Skip breakpoint types other
1882 than software breakpoints. Adjust to inserted flag change.
1883 * mem-break.h (enum raw_bkpt_type): New enum.
1884 (raw_breakpoint, struct process_info): Forward declare.
1885 (Z_packet_to_target_hw_bp_type): Delete declaration.
1886 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1887 (set_gdb_breakpoint, delete_gdb_breakpoint)
1888 (clear_breakpoint_conditions): New declarations.
1889 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1890 (breakpoint_inserted_here): Update comment.
1891 (add_breakpoint_condition, add_breakpoint_commands): Replace
1892 address parameter with a breakpoint pointer parameter.
1893 (gdb_breakpoint_here): Update comment.
1894 (delete_gdb_breakpoint_at): Delete.
1895 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1896 * server.c (process_point_options): Take a struct breakpoint
1897 pointer instead of an address. Adjust.
1898 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1899 delete_gdb_breakpoint.
1900 * spu-low.c (spu_target_ops): Install NULL as
1901 supports_z_point_type method.
1902 * target.h: Include mem-break.h.
1903 (struct target_ops) <prepare_to_access_memory>: Update comment.
1904 <supports_z_point_type>: New field.
1905 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1906 instead of a char. Also take a raw breakpoint pointer.
1907 * win32-arm-low.c (the_low_target): Install NULL as
1908 supports_z_point_type.
1909 * win32-i386-low.c (i386_supports_z_point_type): New function.
1910 (i386_insert_point, i386_remove_point): Adjust to new interface.
1911 (the_low_target): Install i386_supports_z_point_type.
1912 * win32-low.c (win32_supports_z_point_type): New function.
1913 (win32_insert_point, win32_remove_point): Adjust to new interface.
1914 (win32_target_ops): Install win32_supports_z_point_type.
1915 * win32-low.h (struct win32_target_ops):
1916 <supports_z_point_type>: New method.
1917 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1918 instead of a char. Also take a raw breakpoint pointer.
1920 2014-05-20 Pedro Alves <palves@redhat.com>
1922 * mem-break.h: Include break-common.h.
1923 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1924 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1925 (Z_packet_to_target_hw_bp_type): New declaration.
1926 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1927 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1928 (Z_PACKET_ACCESS_WP): Delete macros.
1929 (Z_packet_to_hw_type): Delete function.
1930 * i386-low.h: Don't include break-common.h here.
1931 (Z_packet_to_hw_type): Delete declaration.
1932 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1933 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1934 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1935 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1936 * linux-aarch64-low.c: Don't include break-common.h here.
1937 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1938 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1939 (Z_packet_to_target_hw_bp_type): Delete function.
1940 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1942 (mips_insert_point, mips_remove_point): Use
1943 Z_packet_to_target_hw_bp_type.
1945 2014-05-20 Pedro Alves <palves@redhat.com>
1947 * linux-aarch64-low.c: Include break-common.h.
1948 (enum target_point_type): Delete.
1949 (Z_packet_to_point_type): Rename to ...
1950 (Z_packet_to_target_hw_bp_type): ... this, and return a
1951 target_hw_bp_type instead.
1952 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1953 instead of an enum target_point_type.
1954 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1956 (aarch64_dr_state_insert_one_point)
1957 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1958 (aarch64_handle_aligned_watchpoint)
1959 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1960 Take an enum target_hw_bp_type instead of an enum
1962 (aarch64_supports_z_point_type): New function.
1963 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1964 use Z_packet_to_target_hw_bp_type.
1966 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1968 * configure.ac: Only use -Werror by default when DEVELOPMENT
1970 * configure: Regenerate.
1972 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1974 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1975 * linux-x86-low.c (X86_64_USER_REGS): New.
1976 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1978 2014-04-28 Yao Qi <yao@codesourcery.com>
1980 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1983 2014-04-25 Pedro Alves <palves@redhat.com>
1986 * linux-low.c (linux_attach_fail_reason_string): New function.
1987 (linux_attach_lwp): Delete.
1988 (linux_attach_lwp_1): Rename to ...
1989 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1990 argument. Remove "initial" parameter. Return int instead of
1991 void. Don't error or warn here.
1992 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1993 failure to attach to the tgid. Call warning when failing to
1995 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1996 argument. Remove "initial" parameter. Return int instead of
1997 void. Don't error or warn here.
1998 (linux_attach_fail_reason_string): New declaration.
1999 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2000 interface change. Use linux_attach_fail_reason_string.
2002 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2003 Walfred Tedeschi <walfred.tedeschi@intel.com>
2005 * Makefile.in: Added rules to handle new files
2006 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2007 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2008 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2009 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2010 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2011 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2013 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2014 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2015 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2016 i386/x32-avx512.xml.
2017 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2018 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2019 i386/x32-avx512-linux.xml.
2020 * i387-fp.c (num_avx512_k_registers): New constant for number
2022 (num_avx512_zmmh_low_registers): New constant for number of
2023 lower ZMM registers (0-15).
2024 (num_avx512_zmmh_high_registers): New constant for number of
2025 higher ZMM registers (16-31).
2026 (num_avx512_ymmh_registers): New contant for number of higher
2027 YMM registers (ymm16-31 added by avx521 on x86_64).
2028 (num_avx512_xmm_registers): New constant for number of higher
2029 XMM registers (xmm16-31 added by AVX512 on x86_64).
2030 (struct i387_xsave): Add space for AVX512 registers.
2031 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2032 Add code to handle AVX512 registers.
2033 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2034 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2035 prototypei from generated file.
2036 (tdesc_amd64_avx512_linux): Likewise.
2037 (init_registers_x32_avx512_linux): Likewise.
2038 (tdesc_x32_avx512_linux): Likewise.
2039 (init_registers_i386_avx512_linux): Likewise.
2040 (tdesc_i386_avx512_linux): Likewise.
2041 (x86_64_regmap): Add AVX512 registers.
2042 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2044 (initialize_low_arch): Add code to initialize AVX512 registers.
2046 2014-04-23 Pedro Alves <palves@redhat.com>
2048 * mem-break.c (find_gdb_breakpoint_at): Make static.
2049 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2051 2014-04-23 Pedro Alves <palves@redhat.com>
2053 * i386-low.c: Don't include break-common.h here.
2054 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2055 prototype to take target_hw_bp_type as argument instead of a Z
2057 * i386-low.h: Include break-common.h here.
2058 (Z_packet_to_hw_type): Declare.
2059 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2061 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2062 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2063 (x86_remove_point): Convert the packet number to a
2064 target_hw_bp_type before calling i386_low_remove_watchpoint.
2065 * win32-i386-low.c (i386_insert_point): Convert the packet number
2066 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2067 (i386_remove_point): Convert the packet number to a
2068 target_hw_bp_type before calling i386_low_remove_watchpoint.
2070 2014-04-23 Pedro Alves <palves@redhat.com>
2072 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2074 2014-04-10 Pedro Alves <palves@redhat.com>
2076 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2077 Check if the condition or command is NULL before checking if the
2078 breakpoint is known. On success, return true.
2079 * mem-break.h (add_breakpoint_condition): Document return.
2080 (add_breakpoint_commands): Add describing comment.
2081 * server.c (skip_to_semicolon): New function.
2082 (process_point_options): Use it.
2084 2014-04-09 Pedro Alves <palves@redhat.com>
2086 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2089 2014-02-27 Pedro Alves <palves@redhat.com>
2092 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2094 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2096 (last_thread_of_process_p): Take a PID argument instead of a
2098 (linux_wait_for_lwp): Delete.
2099 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2101 (linux_low_filter_event): New function, party factored out from
2102 linux_wait_for_event.
2103 (linux_wait_for_event): Rename to ...
2104 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2105 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2106 sigsuspend. Check for zombie leaders.
2107 (linux_wait_for_event): Reimplement as wrapper around
2108 linux_wait_for_event_filtered.
2109 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2110 a normal or signal exit is seen, it's the whole process exiting.
2111 (wait_for_sigstop): No longer a for_each_inferior callback.
2112 Rewrite on top of linux_wait_for_event_filtered.
2113 (stop_all_lwps): Call wait_for_sigstop directly.
2114 * server.c (resume, handle_target_event): Handle
2115 TARGET_WAITKIND_NO_RESUMED.
2117 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2119 * win32-low.c (psapi_get_dll_name,
2120 * win32_CreateToolhelp32Snapshot): Delete.
2121 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2122 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2124 (handle_load_dll): Add function description.
2125 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2127 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2129 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2131 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2132 base address when calling win32_add_one_solib.
2133 (handle_load_dll): Delete local variable load_addr.
2134 Remove 0x1000 offset applied to DLL base address when calling
2135 win32_add_one_solib.
2136 (handle_unload_dll): Add comment.
2138 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2140 * win32-low.c (win32_add_all_dlls): Renames
2141 win32_ensure_ntdll_loaded. Rewrite function documentation.
2142 Adjust implementation to always load all DLLs.
2143 Add 0x1000 offset to DLL base address when calling
2144 win32_add_one_solib.
2145 (child_initialization_done): New static global.
2146 (do_initial_child_stuff): Set child_initialization_done to
2147 zero during child initialization, and 1 after. Replace call
2148 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2150 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2151 (handle_unload_dll): Add function documentation.
2152 (get_child_debug_event): Ignore load and unload DLL events
2153 during child initialization.
2155 2014-02-20 Doug Evans <dje@google.com>
2157 Remove global all_lwps.
2158 * inferiors.h (ptid_of): Move here from linux-low.h.
2159 (pid_of, lwpid_of): Ditto.
2160 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2161 parameter is a struct thread_info * now.
2162 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2163 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2164 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2166 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2167 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2168 * linux-arm-low.c (update_registers_callback): Update, "entry"
2169 parameter is a struct thread_info * now.
2170 Fetch lwpid from current_inferior directly.
2171 (arm_insert_point): Pass &all_threads to find_inferior instead of
2173 (arm_remove_point): Ditto.
2174 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2175 (arm_prepare_to_resume): Fetch pid from thread.
2176 (arm_read_description): Fetch lwpid from current_inferior directly.
2177 * linux-low.c (all_lwps): Delete.
2178 (delete_lwp): Delete call to remove_inferior.
2179 (handle_extended_wait): Fetch lwpid from thread.
2180 (add_lwp): Don't set lwp->entry.id. Remove call to
2181 add_inferior_to_list.
2182 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2183 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2184 (kill_one_lwp_callback): Ditto.
2185 (linux_kill): Don't dereference NULL pointer.
2186 Fetch ptid,lwpid from thread.
2187 (get_detach_signal): Fetch ptid from thread.
2188 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2189 Simplify call to regcache_invalidate_thread.
2190 (delete_lwp_callback): Update, "entry" parameter is a
2191 struct thread_info * now. Fetch pid from thread.
2192 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2193 (status_pending_p_callback): Update, "entry" parameter is a
2194 struct thread_info * now. Fetch ptid from thread.
2195 (find_lwp_pid): Update, "entry" parameter is a
2196 struct thread_info * now.
2197 (linux_wait_for_lwp): Fetch pid from thread.
2198 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2199 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2200 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2201 (dequeue_one_deferred_signal): Ditto.
2202 (cancel_breakpoint): Fetch ptid from current_inferior.
2203 (linux_wait_for_event): Pass &all_threads to find_inferior,
2204 not &all_lwps. Fetch ptid, lwpid from thread.
2205 (count_events_callback): Update, "entry" parameter is a
2206 struct thread_info * now.
2207 (select_singlestep_lwp_callback): Ditto.
2208 (select_event_lwp_callback): Ditto.
2209 (cancel_breakpoints_callback): Ditto.
2210 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2212 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2213 (unsuspend_one_lwp): Update, "entry" parameter is a
2214 struct thread_info * now.
2215 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2217 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2218 Fetch lwpid from thread, not lwp.
2219 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2220 Pass &all_threads to find_inferior, not &all_lwps.
2221 (send_sigstop): Fetch lwpid from thread, not lwp.
2222 (send_sigstop_callback): Update, "entry" parameter is a
2223 struct thread_info * now.
2224 (suspend_and_send_sigstop_callback): Ditto.
2225 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2226 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2227 struct thread_info * now.
2228 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2230 (lwp_running): Update, "entry" parameter is a
2231 struct thread_info * now.
2232 (stop_all_lwps): Fetch ptid from thread.
2233 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2234 (linux_resume_one_lwp): Fetch lwpid from thread.
2235 (linux_set_resume_request): Update, "entry" parameter is a
2236 struct thread_info * now. Fetch pid, lwpid from thread.
2237 (resume_status_pending_p): Update, "entry" parameter is a
2238 struct thread_info * now.
2239 (need_step_over_p): Ditto. Fetch lwpid from thread.
2240 (start_step_over): Fetch lwpid from thread.
2241 (linux_resume_one_thread): Update, "entry" parameter is a
2242 struct thread_info * now. Fetch lwpid from thread.
2243 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2244 (proceed_one_lwp): Update, "entry" parameter is a
2245 struct thread_info * now. Fetch lwpid from thread.
2246 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2247 struct thread_info * now.
2248 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2249 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2250 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2252 (regsets_store_inferior_registers): Ditto.
2253 (fetch_register, store_register): Ditto.
2254 (linux_read_memory, linux_write_memory): Ditto.
2255 (linux_request_interrupt): Ditto.
2256 (linux_read_auxv): Ditto.
2257 (linux_xfer_siginfo): Ditto.
2258 (linux_qxfer_spu): Ditto.
2259 (linux_qxfer_libraries_svr4): Ditto.
2260 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2261 moved to inferiors.h.
2263 (get_thread_lwp): Update.
2264 (struct lwp_info): Delete member "entry". Simplify comment for
2267 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2268 current_inferior directly.
2269 (update_watch_registers_callback): Update, "entry" parameter is a
2270 struct thread_info * now. Fetch pid from thread.
2271 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2272 (mips_insert_point): Fetch lwpid from current_inferior.
2273 Pass &all_threads to find_inferior, not &all_lwps.
2274 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2275 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2277 (mips_stopped_data_address): Ditto.
2278 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2280 * linux-tile-low.c (tile_arch_setup): Ditto.
2281 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2282 (update_debug_registers_callback): Update, "entry" parameter is a
2283 struct thread_info * now. Fetch pid from thread.
2284 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2285 Pass &all_threads to find_inferior, not &all_lwps.
2286 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2287 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2288 Pass &all_threads to find_inferior, not &all_lwps.
2289 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2290 (i386_dr_low_get_status): Ditto.
2291 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2292 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2293 (x86_linux_read_description): Ditto.
2294 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2296 2014-02-20 Doug Evans <dje@google.com>
2298 * inferiors.c (get_first_inferior): Fix buglet.
2300 2014-02-19 Doug Evans <dje@google.com>
2302 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2303 * inferiors.c (add_thread): Change result type to struct thread_info *.
2304 All callers updated.
2305 (add_lwp): Call add_thread here instead of in callers.
2306 All callers updated.
2307 * linux-low.h (get_lwp_thread): Rewrite.
2308 (struct lwp_info): New member "thread".
2310 2014-02-19 Doug Evans <dje@google.com>
2312 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2313 All callers updated.
2315 2014-02-19 Doug Evans <dje@google.com>
2317 * inferiors.c (add_thread): Fix whitespace.
2319 2014-02-19 Doug Evans <dje@google.com>
2321 * dll.c (clear_dlls): Replace accessing list implemention details
2323 * gdbthread.h (get_first_thread): Declare.
2324 * inferiors.c (for_each_inferior_with_data): New function.
2325 (get_first_thread): New function.
2326 (find_thread_ptid): Simplify.
2327 (get_first_inferior): New function.
2328 (clear_list): Delete.
2329 (one_inferior_p): New function.
2330 (clear_inferior_list): New function.
2331 (clear_inferiors): Update.
2332 * inferiors.h (for_each_inferior_with_data): Declare.
2333 (clear_inferior_list): Declare.
2334 (one_inferior_p): Declare.
2335 (get_first_inferior): Declare.
2336 * linux-low.c (linux_wait_for_event): Replace accessing list
2337 implemention details with API function.
2338 * server.c (target_running): Ditto.
2339 (accumulate_file_name_length): New function.
2340 (emit_dll_description): New function.
2341 (handle_qxfer_libraries): Replace accessing list implemention
2342 details with API function.
2343 (handle_qxfer_threads_worker): New function.
2344 (handle_qxfer_threads_proper): Replace accessing list implemention
2345 details with API function.
2346 (handle_query): Ditto.
2347 (visit_actioned_threads_callback_ftype): New typedef.
2348 (visit_actioned_threads_data): New struct.
2349 (visit_actioned_threads): Rewrite to be find_inferior callback.
2350 (resume): Call find_inferior.
2351 (handle_status): Replace accessing list implemention
2352 details with API function.
2353 (process_serial_event): Replace accessing list implemention details
2355 * target.c (set_desired_inferior): Replace accessing list implemention
2356 details with API function.
2357 * tracepoint.c (same_process_p): New function.
2358 (gdb_agent_about_to_close): Replace accessing list implemention
2359 details with API function.
2360 * win32-low.c (child_delete_thread): Replace accessing list
2361 implemention details with API function.
2362 (match_dll_by_basename): New function.
2363 (dll_is_loaded_by_basename): New function.
2364 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2365 details call to dll_is_loaded_by_basename.
2367 2014-02-19 Doug Evans <dje@google.com>
2369 * dll.h (struct dll_info): Add comment.
2370 * gdbthread.h (struct thread_info): Add comment.
2371 (current_ptid): Simplify.
2372 * inferiors.c (add_process): Update.
2373 (remove_process): Update.
2374 * inferiors.h (struct process_info): Rename member "head" to "entry".
2375 * linux-low.c (delete_lwp): Update.
2377 (last_thread_of_process_p): Update.
2378 (kill_one_lwp_callback, linux_kill): Update.
2379 (status_pending_p_callback): Update.
2380 (wait_for_sigstop): Update. Simplify read of ptid.
2381 (start_step_over): Update.
2382 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2383 (get_lwp_thread): Update.
2384 (struct lwp_info): Rename member "head" to "entry".
2385 * regcache.h (inferior_list_entry): Delete.
2386 * server.c (kill_inferior_callback): Update.
2387 (detach_or_kill_inferior_callback): Update.
2388 (print_started_pid): Update.
2389 (print_attached_pid): Update.
2390 (process_serial_event): Simplify read of ptid.
2391 * thread-db.c (thread_db_create_event): Update.
2392 (thread_db_get_tls_address): Update.
2393 * win32-low.c (current_inferior_ptid): Simplify.
2395 2014-02-19 Tom Tromey <tromey@redhat.com>
2397 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2399 (target_supports_btrace): Update.
2401 2014-02-14 Yao Qi <yao@codesourcery.com>
2403 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2404 (rsp-low-ipa.o): New target.
2406 2014-02-12 Tom Tromey <tromey@redhat.com>
2408 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2409 convert_ascii_to_int.
2410 * regcache.c (registers_to_string): Likewise.
2411 * remote-utils.c (decode_M_packet): Likewise.
2412 * server.c (process_serial_event): Likewise.
2414 2014-02-12 Tom Tromey <tromey@redhat.com>
2416 * server.c (handle_query, handle_v_run): Use hex2bin, not
2418 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2420 2014-02-12 Tom Tromey <tromey@redhat.com>
2422 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2423 convert_int_to_ascii.
2424 * regcache.c (registers_to_string, collect_register_as_string):
2426 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2428 * server.c (process_serial_event): Likewise.
2429 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2430 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2432 2014-02-12 Tom Tromey <tromey@redhat.com>
2434 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2435 bin2hex, not hexify.
2436 * tracepoint.c (cmd_qtstatus): Likewise.
2438 2014-02-12 Tom Tromey <tromey@redhat.com>
2440 * remote-utils.c (monitor_output): Pass explicit length to
2443 2014-02-12 Tom Tromey <tromey@redhat.com>
2445 * tracepoint.c: Include rsp-low.h.
2446 * server.c: Include rsp-low.h.
2447 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2448 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2450 * remote-utils.c: Include rsp-low.h.
2451 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2452 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2453 (convert_int_to_ascii, convert_ascii_to_int): Move to
2455 * regcache.c: Include rsp-low.h.
2456 * ax.c: Include rsp-low.h.
2457 * Makefile.in (SFILES): Add common/rsp-low.c.
2458 (OBS): Add rsp-low.o.
2459 (rsp-low.o): New target.
2461 2014-02-12 Tom Tromey <tromey@redhat.com>
2463 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2464 Include print-utils.h.
2465 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2466 (plongest, thirty_two, phex_nz): Remove.
2467 * Makefile.in (SFILES): Add common/print-utils.c.
2468 (OBS): Add print-utils.o.
2469 (print-utils-ipa.o): New target.
2470 (print-utils.o): New target.
2471 (IPA_OBJS): Add print-utils-ipa.o.
2473 2014-02-06 Tom Tromey <tromey@redhat.com>
2475 * Makefile.in (SFILES): Fix indentation.
2477 2014-02-05 Doug Evans <dje@google.com>
2479 * linux-low.c (linux_wait_for_event): Improve comment.
2480 (linux_wait_1): Keep current_inferior in sync with event_child.
2482 2014-01-22 Doug Evans <dje@google.com>
2484 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2486 2014-01-22 Doug Evans <dje@google.com>
2488 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2489 * configure: Regenerate.
2490 * config.in: Regenerate.
2491 * Makefile.in (SFILES): Add debug.c.
2493 * debug.c: New file.
2494 * debug.h: New file.
2495 * linux-aarch64-low.c (*): Update all debugging printfs to use
2496 debug_printf instead of fprintf.
2497 * linux-arm-low.c (*): Ditto.
2498 * linux-cris-low.c (*): Ditto.
2499 * linux-crisv32-low.c (*): Ditto.
2500 * linux-m32r-low.c (*): Ditto.
2501 * linux-sparc-low.c (*): Ditto.
2502 * linux-x86.c (*): Ditto.
2503 * linux-low.c (*): Ditto.
2504 (linux_wait_1): Add calls to debug_enter, debug_exit.
2505 (linux_wait): Remove redundant debugging printf.
2506 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2507 (linux_resume, unstop_all_lwps): Ditto.
2508 * mem-break.c (*): Update all debugging printfs to use
2509 debug_printf instead of fprintf.
2510 * remote-utils.c (*): Ditto.
2511 * thread-db.c (*): Ditto.
2512 * server.c #include <ctype.h>, "gdb_vecs.h".
2513 (debug_threads): Moved to debug.c.
2514 (*): Update all debugging printfs to use debug_printf instead of
2516 (start_inferior): Replace call to fflush with call to debug_flush.
2517 (monitor_show_help): Mention set debug-format.
2518 (parse_debug_format_options): New function.
2519 (handle_monitor_command): Handle "monitor set debug-format".
2520 (gdbserver_usage): Mention --debug-format.
2521 (main): Parse --debug-format.
2522 * server.h (debug_threads): Declaration moved to debug.h.
2524 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2525 trace_debug_1 that uses debug_printf.
2526 (tracepoint_look_up_symbols): Update all debugging printfs to use
2527 debug_printf instead of fprintf.
2529 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2531 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2534 2014-01-17 Pedro Alves <palves@redhat.com>
2537 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2538 defined after including gdb_proc_service.h.
2540 2014-01-16 Doug Evans <dje@google.com>
2542 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2543 (match_dll): Use it.
2545 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2547 * target.h (target_ops) <read_btrace>: Change parameters and
2548 return type to allow error reporting.
2549 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2550 trace reading errors on.
2551 * linux-low.c (linux_low_read_btrace): Pass trace reading
2553 (linux_low_disable_btrace): New.
2555 2014-01-15 Doug Evans <dje@google.com>
2557 * inferiors.c (thread_id_to_gdb_id): Delete.
2558 * inferiors.h (thread_id_to_gdb_id): Delete.
2560 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2562 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2563 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2566 2014-01-08 Pedro Alves <palves@redhat.com>
2568 * server.c (handle_status): Don't discard previous queued stop
2569 replies or thread's pending status here.
2570 (main) <disconnection>: Do it here instead.
2572 2014-01-08 Pedro Alves <palves@redhat.com>
2574 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2575 * server.c (visit_actioned_threads, handle_pending_status): New
2577 (handle_v_cont): Factor out parts to ...
2578 (resume): ... this new function. If in all-stop, and a thread
2579 being resumed has a pending status, report it without actually
2581 (myresume): Adjust to use the new 'resume' function.
2582 (clear_pending_status_callback, set_pending_status_callback)
2583 (find_status_pending_thread_callback): New functions.
2584 (handle_status): Handle the case of multiple threads having
2585 interesting statuses to report. Report threads' real last signal
2586 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2587 with an interesting thread to report the status for, instead of
2588 always reporting the status of the first thread.
2590 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2592 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2593 * gdbreplay.c (gdbreplay_version): Likewise.
2595 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2597 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2598 iov.iov_len with the real length in use.
2600 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2602 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2603 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2604 for all targets that use win32-low.c.
2605 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2606 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2608 2013-12-13 Pedro Alves <palves@redhat.com>
2610 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2611 if equal to TARGET_WAITKIND_LOADED.
2612 * win32-low.c (cached_status): New static global.
2613 (win32_wait): Add declaration.
2614 (do_initial_child_stuff): Flush all initial pending debug events
2615 up to the initial breakpoint.
2616 (win32_wait): If CACHED_STATUS was set, return that instead
2617 of doing a real wait. Remove the code resuming the execution
2618 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2619 during the initial phase. Also remove the code changing
2620 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2621 TARGET_WAITKIND_STOPPED.
2623 2013-12-11 Yao Qi <yao@codesourcery.com>
2625 * notif.c (handle_notif_ack): Return 0 if no notification
2628 2013-11-20 Doug Evans <dje@google.com>
2630 * linux-low.c (linux_set_resume_request): Fix comment.
2632 2013-11-20 Doug Evans <dje@google.com>
2634 * linux-low.c (resume_status_pending_p): Tweak comment.
2636 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2638 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2639 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2640 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2641 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2642 (srv_amd64_regobj): Add amd64-mpx.o.
2643 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2644 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2645 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2646 * i387-fp.c (num_pl_bnd_register) Added constant.
2647 (num_pl_bnd_cfg_registers) Added constant.
2648 (struct i387_xsave) Added reserved area and MPX fields.
2649 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2650 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2652 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2653 (init_registers_amd64_mpx_linux): Declare new function.
2654 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2655 (x86_64_regmap): Add MPX registers.
2656 (x86_linux_read_description): Add MPX case.
2657 (initialize_low_arch): Initialize MPX targets.
2659 2013-11-18 Tom Tromey <tromey@redhat.com>
2661 * configure: Rebuild.
2662 * configure.ac: Don't check for stdlib.h.
2663 * gdbreplay.c: Unconditionally include stdlib.h.
2665 2013-11-18 Tom Tromey <tromey@redhat.com>
2667 * config.in: Rebuild.
2668 * configure: Rebuild.
2669 * configure.ac: Don't use AC_HEADER_DIRENT.
2671 2013-11-18 Tom Tromey <tromey@redhat.com>
2673 * server.h: Don't check HAVE_STRING_H.
2674 * gdbreplay.c: Don't check HAVE_STRING_H.
2675 * configure: Rebuild.
2677 2013-11-18 Tom Tromey <tromey@redhat.com>
2679 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2682 2013-11-08 Tom Tromey <tromey@redhat.com>
2684 * configure, config.in: Rebuild.
2685 * configure.ac: Remove unused configury.
2687 2013-11-08 Tom Tromey <tromey@redhat.com>
2689 * acinclude.m4: Include common.m4, codeset.m4.
2690 * configure, config.in: Rebuild.
2691 * configure.ac: Use GDB_AC_COMMON.
2693 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2695 * linux-s390-low.c (HWCAP_S390_TE): New define.
2696 (s390_arch_setup): Consider the TE field in the HWCAP for
2697 determining 'have_regset_tdb'.
2699 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2702 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2705 2013-10-02 Pedro Alves <palves@redhat.com>
2707 * server.c (process_serial_event): Don't output "GDBserver
2708 exiting" if GDB is connected through stdio.
2709 * target.c (mywait): Likewise, be silent if GDB is connected
2712 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2714 * lynx-low.c (lynx_add_threads_after_attach): New function.
2715 (lynx_attach): Remove call to add_thread. Add call to
2716 lynx_add_threads_after_attach instead.
2718 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2720 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2721 * config.in, configure: Regenerated.
2723 2013-09-18 Yao Qi <yao@codesourcery.com>
2726 * server.c (start_inferior): Clear 'resume_info'.
2728 2013-09-16 Jiong Wang <jiwang@tilera.com>
2730 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2733 2013-09-16 Jiong Wang <jiwang@tilera.com>
2735 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2736 linux-tile-low.o to srv_tgtobj.
2738 2013-09-16 Will Newton <will.newton@linaro.org>
2740 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2743 2013-09-06 Pedro Alves <palves@redhat.com>
2745 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2746 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2747 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2748 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2749 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2750 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2752 2013-09-06 Pedro Alves <palves@redhat.com>
2754 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2755 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2757 2013-09-06 Pedro Alves <palves@redhat.com>
2759 * linux-amd64-ipa.c: Include tracepoint.h.
2760 * linux-i386-ipa.c: Include tracepoint.h.
2762 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2764 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2765 (ps_get_thread_area): New function.
2767 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2769 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2770 (initialize_low_arch): Call init_registers_crisv32 rather than
2771 init_register_crisv32.
2773 2013-09-05 Pedro Alves <palves@redhat.com>
2775 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2777 * hostio.h: ... this new file.
2778 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2779 win32-low.c: Include hostio.h.
2781 2013-09-05 Pedro Alves <palves@redhat.com>
2783 * server.h (gdb_client_data, handler_func, callback_handler_func)
2784 (delete_file_handler, add_file_handler, append_callback_event)
2785 (delete_callback_event, start_event_loop, initialize_event_loop):
2786 Move to event-loop.h and include it.
2787 * event-loop.h: New file.
2789 2013-09-05 Pedro Alves <palves@redhat.com>
2791 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2792 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2793 (loaded_dll, unloaded_dll): Move to ...
2794 * dll.h: ... this new file.
2795 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2797 2013-09-05 Pedro Alves <palves@redhat.com>
2799 * server.h (current_process, get_thread_process, all_processes)
2800 (add_inferior_to_list, for_each_inferior, current_inferior)
2801 (remove_inferior, add_process, remove_process, find_process_pid)
2802 (have_started_inferiors_p, have_attached_inferiors_p)
2803 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2804 (clear_inferiors, find_inferior, find_inferior_id)
2805 (inferior_target_data, set_inferior_target_data)
2806 (inferior_regcache_data, set_inferior_regcache_data): Move to
2807 inferiors.h, and include it.
2808 * inferiors.h: New file.
2810 2013-09-05 Pedro Alves <palves@redhat.com>
2812 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2816 2013-09-05 Pedro Alves <palves@redhat.com>
2818 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2820 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2821 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2822 (handle_tracepoint_general_set, handle_tracepoint_query)
2823 (tracepoint_finished_step, tracepoint_was_hit)
2824 (release_while_stepping_state_list, current_traceframe)
2825 (in_readonly_region, traceframe_read_mem)
2826 (fetch_traceframe_registers, traceframe_read_sdata)
2827 (traceframe_read_info, struct fast_tpoint_collect_status)
2828 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2829 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2830 (supply_fast_tracepoint_registers)
2831 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2832 (ipa_tdesc, claim_trampoline_space)
2833 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2834 (agent_mem_read, agent_get_trace_state_variable_value)
2835 (agent_set_trace_state_variable_value, agent_tsv_read)
2836 (agent_mem_read_string, get_raw_reg_func_addr)
2837 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2838 * tracepoint.h: ... this new file.
2840 2013-09-05 Pedro Alves <palves@redhat.com>
2842 * server.h (perror_with_name, error, fatal, warning, paddress)
2843 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2845 * utils.h: New file.
2847 2013-09-05 Pedro Alves <palves@redhat.com>
2849 * server.h (remote_debug, noack_mode, transport_is_reliable)
2850 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2851 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2852 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2853 (write_enn, initialize_async_io, enable_async_io)
2854 (disable_async_io, check_remote_input_interrupt_request)
2855 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2856 (dead_thread_notify, prepare_resume_reply)
2857 (decode_address_to_semicolon, decode_address, decode_m_packet)
2858 (decode_M_packet, decode_X_packet, decode_xfer_write)
2859 (decode_search_memory_packet, unhexify, hexify)
2860 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2861 (look_up_one_symbol, relocate_instruction)
2862 (monitor_output): Move to remote-utils.h, and include it.
2863 * remote-utils.h: New file.
2865 2013-09-05 Pedro Alves <palves@redhat.com>
2867 * server.h (_): Delete.
2869 2013-09-02 Pedro Alves <palves@redhat.com>
2871 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2872 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2874 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2876 2013-09-02 Pierre Muller <muller@sourceware.org>
2878 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2879 or WriteProcessMemory complete successfully and handle
2880 ERROR_PARTIAL_COPY error.
2882 2013-09-02 Pedro Alves <palves@redhat.com>
2884 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2885 error instead of EIO.
2887 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2890 * linux-low.c: Include filestuff.h.
2891 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2892 * lynx-low.c: Include filestuff.h.
2893 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2894 * server.c: Include filestuff.h.
2895 (main): Call notice_open_fds.
2896 * spu-low.c: Include filestuff.h.
2897 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2899 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2901 * Makefile.in: Explain why ../target and ../nat are not
2902 listed as include file search paths.
2903 (linux-waitpid.o): New object file rule.
2904 * configure.srv (srv_native_linux_obj): New variable.
2905 Replace all occurrences of linux native object files with
2906 $srv_native_linux_obj.
2907 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2908 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2909 (linux_enable_event_reporting): Remove declaration.
2910 (my_waitpid): Moved to common/linux-waitpid.c.
2911 (linux_wait_for_event): Pass ptid when calling
2912 linux_enable_event_reporting.
2913 (linux_supports_tracefork_flag): Remove.
2914 (linux_enable_event_reporting): Likewise.
2915 (linux_tracefork_grandchild): Remove.
2916 (STACK_SIZE): Moved to common/linux-ptrace.c.
2917 (linux_tracefork_child): Remove.
2918 (linux_test_for_tracefork): Remove.
2919 (linux_look_up_symbols): Call linux_supports_traceclone.
2920 (initialize_low): Remove call to linux_test_for_tracefork.
2921 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2922 common/linux-ptrace.h.
2923 (PTRACE_TYPE_ARG4): Likewise.
2924 Include linux-ptrace.h.
2926 2013-08-21 Pedro Alves <palves@redhat.com>
2928 * config.in: Renegerate.
2930 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2932 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2933 (SFILES): Remove $(srcdir)/common/target-common.c and
2934 add $(srcdir)/target/waitstatus.c.
2935 (OBS): Remove target-common.o and add waitstatus.o.
2936 (server_h): Remove $(srcdir)/../common/target-common.h and
2937 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2938 and $(srcdir)/../target/waitstatus.h.
2939 (target-common.o): Remove.
2940 (waitstatus.o): New target object file.
2941 * target.h: Do not include target-common.h and
2942 include target/resume.h, target/wait.h and
2943 target/waitstatus.h.
2945 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2947 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2948 to PTRACE_TYPE_ARG3.
2949 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2950 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2952 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2953 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2955 2013-07-27 Jie Zhang <jie@codesourcery.com>
2956 Daniel Jacobowitz <dan@codesourcery.com>
2957 Yao Qi <yao@codesourcery.com>
2959 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2960 (mips-linux-watch.o): New rule.
2961 (mips_linux_watch_h): New variable.
2962 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2964 * linux-mips-low.c: Include mips-linux-watch.h.
2965 (struct arch_process_info, struct arch_lwp_info): New.
2966 (update_watch_registers_callback): New function.
2967 (mips_linux_new_process, mips_linux_new_thread) New functions.
2968 (mips_linux_prepare_to_resume, mips_insert_point): New
2970 (mips_remove_point, mips_stopped_by_watchpoint): New
2972 (rsp_bp_type_to_target_hw_bp_type): New function.
2973 (mips_stopped_data_address): New function.
2974 (the_low_target): Add watchpoint support functions.
2976 2013-07-27 Yao Qi <yao@codesourcery.com>
2978 * i386-low.c: Include break-common.h.
2979 (enum target_hw_bp_type): Remove.
2981 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2983 * Makefile.in (SFILES): /common/target-common.c.
2984 (OBS): Add target-common.o.
2985 (server_h): Add $(srcdir)/../common/target-common.h.
2986 (target-common.o): New target.
2987 * server.c (queue_stop_reply_callback): Free
2988 status string after use.
2989 * target.c (target_waitstatus_to_string): Remove.
2990 * target.h: Include target-common.h.
2991 (resume_kind): Likewise.
2992 (target_waitkind): Likewise.
2993 (target_waitstatus): Likewise.
2994 (TARGET_WNOHANG): Likewise.
2996 2013-07-04 Yao Qi <yao@codesourcery.com>
2998 * Makefile.in (host_alias): Use @host_noncanonical@.
2999 (target_alias): Use @target_noncanonical@.
3000 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3001 ACX_NONCANONICAL_HOST.
3002 * configure: Regenerated.
3005 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3007 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3008 * configure: Rebuild.
3009 * Makefile.in (version_host, version_target): Get from configure.
3010 (version.c): Use $(version_host) and $(version_target).
3012 2013-07-03 Pedro Alves <palves@redhat.com>
3014 * Makefile.in (config.status): Depend on development.sh.
3015 * acinclude.m4: Include libmcheck.m4.
3016 * configure: Regenerate.
3018 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3020 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3021 attribute inside the parentheses.
3022 (winapi_DebugSetProcessKillOnExit): Ditto.
3023 (winapi_DebugBreakProcess): Ditto.
3024 (winapi_GenerateConsoleCtrlEvent): Ditto.
3026 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3028 * notif.h (notif_event): Add a dummy member to avoid compiler
3031 2013-07-01 Pedro Alves <palves@redhat.com>
3033 * hostio.c (HOSTIO_PATH_MAX): Define.
3034 (require_filename, handle_open, handle_unlink, handle_readlink):
3037 2013-07-01 Pedro Alves <palves@redhat.com>
3039 * server.h: Include "pathmax.h".
3040 * linux-low.c: Don't include sys/param.h.
3041 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3043 * win32-low.c: Don't include sys/param.h.
3044 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3046 2013-07-01 Pedro Alves <palves@redhat.com>
3048 * event-loop.c: Don't check HAVE_UNISTD_H before including
3050 * gdbreplay.c: Likewise.
3051 * remote-utils.c: Likewise.
3052 * server.c: Likewise.
3053 * configure.ac: Don't check for unistd.h.
3054 * configure: Regenerate.
3056 2013-06-28 Tom Tromey <tromey@redhat.com>
3058 * Makefile.in (version.c): Use version.in, not
3061 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3063 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3064 * configure: Rebuild.
3065 * Makefile.in (version_host, version_target): Get from configure.
3066 (version.c): Use $(version_host) and $(version_target).
3068 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3070 Fix trace-status to output user name without trailing colon.
3071 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3073 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3075 Fix trace-status to output proper start-time and stop-time.
3076 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3077 output start time and stop time in hex as gdb expects.
3079 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3081 * tracepoint.c (build_traceframe_info_xml): Output trace state
3082 variables present in the trace buffer.
3084 2013-06-24 Tom Tromey <tromey@redhat.com>
3086 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3088 (version.o): Remove.
3089 * gdbreplay.c: Include version.h.
3090 (version, host_name): Don't declare.
3091 * server.h: Include version.h.
3092 (version, host_name): Don't declare.
3094 2013-06-12 Pedro Alves <palves@redhat.com>
3096 * linux-x86-low.c (linux_is_elf64): Delete global.
3097 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3098 with local linux_pid_exe_is_elf_64_file use.
3100 2013-06-11 Pedro Alves <palves@redhat.com>
3102 * linux-low.c (regset_disabled, disable_regset): New functions.
3103 (regsets_fetch_inferior_registers)
3104 (regsets_store_inferior_registers): Use them.
3105 (initialize_regsets_info); Don't allocate the disabled_regsets
3107 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3110 2013-06-11 Pedro Alves <palves@redhat.com>
3112 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3115 2013-06-11 Pedro Alves <palves@redhat.com>
3117 * linux-x86-low.c (initialize_low_arch): Call
3118 init_registers_x32_avx_linux.
3120 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3122 Fix compatibility with Android Bionic.
3123 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3126 2013-06-07 Pedro Alves <palves@redhat.com>
3129 * Makefile.in (OBS): Add tdesc.o.
3130 (IPA_OBJS): Add tdesc-ipa.o.
3131 (tdesc-ipa.o): New rule.
3132 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3134 * linux-low.c (new_inferior): Delete.
3135 (disabled_regsets, num_regsets): Delete.
3136 (linux_add_process): Adjust to set the new per-process
3138 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3139 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3140 was a stop. When calling arch_setup, switch the current inferior
3141 to the thread that got an event.
3142 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3143 (regsets_fetch_inferior_registers)
3144 (regsets_store_inferior_registers): New regsets_info parameter.
3146 (linux_register_in_regsets): New regs_info parameter. Adjust to
3148 (register_addr, fetch_register, store_register): New usrregs_info
3149 parameter. Adjust to use it.
3150 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3151 parameter regs_info. Adjust to use it.
3152 (linux_fetch_registers): Get the current inferior's regs_info, and
3154 (linux_store_registers): Ditto.
3155 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3156 (initialize_low): Don't initialize the target_regsets here. Call
3157 initialize_low_arch.
3158 * linux-low.h (target_regsets): Delete declaration.
3159 (struct regsets_info): New.
3160 (struct usrregs_info): New.
3161 (struct regs_info): New.
3162 (struct process_info_private) <new_inferior>: New field.
3163 (struct linux_target_ops): Delete the num_regs, regmap, and
3164 regset_bitmap fields. New field regs_info.
3165 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3166 * i387-fp.c (num_xmm_registers): Delete.
3167 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3168 calls to new interface.
3169 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3170 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3171 Infer the number of xmm registers from the regcache's target
3173 * i387-fp.h (num_xmm_registers): Delete.
3174 * inferiors.c (add_thread): Don't install the thread's regcache
3176 * proc-service.c (gregset_info): Fetch the current inferior's
3177 regs_info. Adjust to use it.
3178 * regcache.c: Include tdesc.h.
3179 (register_bytes, reg_defs, num_registers)
3180 (gdbserver_expedite_regs): Delete.
3181 (get_thread_regcache): If the thread doesn't have a regcache yet,
3182 create one, instead of aborting gdbserver.
3183 (regcache_invalidate_one): Rename to ...
3184 (regcache_invalidate_thread): ... this.
3185 (regcache_invalidate_one): New.
3186 (regcache_invalidate): Only invalidate registers of the current
3188 (init_register_cache): Add target_desc parameter, and use it.
3189 (new_register_cache): Ditto. Assert the target description has a
3190 non zero registers_size.
3191 (regcache_cpy): Add assertions. Adjust.
3192 (realloc_register_cache, set_register_cache): Delete.
3193 (registers_to_string, registers_from_string): Adjust.
3194 (find_register_by_name, find_regno, find_register_by_number)
3195 (register_cache_size): Add target_desc parameter, and use it.
3196 (free_register_cache_thread, free_register_cache_thread_one)
3197 (regcache_release, register_cache_size): New.
3198 (register_size): Add target_desc parameter, and use it.
3199 (register_data, supply_register, supply_register_zeroed)
3200 (supply_regblock, supply_register_by_name, collect_register)
3201 (collect_register_as_string, collect_register_by_name): Adjust.
3202 * regcache.h (struct target_desc): Forward declare.
3203 (struct regcache) <tdesc>: New field.
3204 (init_register_cache, new_register_cache): Add target_desc
3206 (regcache_invalidate_thread): Declare.
3207 (regcache_invalidate_one): Delete declaration.
3208 (regcache_release): Declare.
3209 (find_register_by_number, register_cache_size, register_size)
3210 (find_regno): Add target_desc parameter.
3211 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3213 * remote-utils.c: Include tdesc.h.
3214 (outreg, prepare_resume_reply): Adjust.
3215 * server.c: Include tdesc.h.
3216 (gdbserver_xmltarget): Delete declaration.
3217 (get_features_xml, process_serial_event): Adjust.
3218 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3220 (struct process_info) <tdesc>: New field.
3221 (ipa_tdesc): Declare.
3222 * tdesc.c: New file.
3223 * tdesc.h: New file.
3224 * tracepoint.c: Include tdesc.h.
3225 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3226 (get_context_regcache): Adjust to pass ipa_tdesc down.
3227 (do_action_at_tracepoint): Adjust to get the register cache size
3228 from the context regcache's description.
3229 (traceframe_walk_blocks): Adjust to get the register cache size
3230 from the current trace frame's description.
3231 (traceframe_get_pc): Adjust to get current trace frame's
3232 description and pass it down.
3233 (gdb_collect): Adjust to get the register cache size from the
3235 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3236 (gdbserver_xmltarget): Delete.
3237 (initialize_low_tracepoint): Set the ipa's target description.
3238 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3239 (initialize_low_tracepoint): Set the ipa's target description.
3240 * linux-x86-low.c: Include tdesc.h.
3241 [__x86_64__] (is_64bit_tdesc): New.
3242 (ps_get_thread_area, x86_get_thread_area): Use it.
3243 (i386_cannot_store_register): Rename to ...
3244 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3245 (i386_cannot_fetch_register): Rename to ...
3246 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3247 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3249 (target_regsets): Rename to ...
3250 (x86_regsets): ... this.
3251 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3253 (x86_siginfo_fixup): Use is_64bit_tdesc.
3254 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3255 (tdesc_x32_avx_linux, tdesc_x32_linux)
3256 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3258 (x86_linux_update_xmltarget): Delete.
3259 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3260 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3261 (AMD64_LINUX_USER64_CS): New.
3262 (x86_linux_read_description): New, based on
3263 x86_linux_update_xmltarget.
3264 (same_process_callback): New.
3265 (x86_arch_setup_process_callback): New.
3266 (x86_linux_update_xmltarget): New.
3267 (x86_regsets_info): New.
3268 (amd64_linux_regs_info): New.
3269 (i386_linux_usrregs_info): New.
3270 (i386_linux_regs_info): New.
3271 (x86_linux_regs_info): New.
3272 (x86_arch_setup): Reimplement.
3273 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3274 (x86_emit_ops): Ditto.
3275 (the_low_target): Adjust. Install x86_linux_regs_info,
3276 x86_cannot_fetch_register, and x86_cannot_store_register.
3277 (initialize_low_arch): New.
3278 * linux-ia64-low.c (tdesc_ia64): Declare.
3279 (ia64_fetch_register): Adjust.
3280 (ia64_usrregs_info, regs_info): New globals.
3281 (ia64_regs_info): New function.
3282 (the_low_target): Adjust.
3283 (initialize_low_arch): New function.
3284 * linux-sparc-low.c (tdesc_sparc64): Declare.
3285 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3287 (sparc_arch_setup): New function.
3288 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3289 (the_low_target): Adjust.
3290 (initialize_low_arch): New function.
3291 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3292 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3293 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3294 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3295 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3296 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3297 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3298 (tdesc_powerpc_isa205_vsx64l): Declare.
3299 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3300 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3301 (ppc_set_pc, ppc_get_hwcap): Adjust.
3302 (ppc_usrregs_info): Forward declare.
3303 (!__powerpc64__) ppc_regmap_adjusted: New global.
3304 (ppc_arch_setup): Adjust to the current process'es target
3306 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3307 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3308 (ppc_store_evrregset): Adjust.
3309 (target_regsets): Rename to ...
3310 (ppc_regsets): ... this, and make static.
3311 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3312 (ppc_regs_info): New function.
3313 (the_low_target): Adjust.
3314 (initialize_low_arch): New function.
3315 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3316 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3317 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3318 (tdesc_s390x_linux64v2): Declare.
3319 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3320 (s390_fill_gregset, s390_store_last_break): Adjust.
3321 (target_regsets): Rename to ...
3322 (s390_regsets): ... this, and make static.
3323 (s390_get_pc, s390_set_pc): Adjust.
3324 (s390_get_hwcap): New target_desc parameter, and use it.
3325 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3326 (s390_arch_setup): Adjust to set the current process'es target
3327 description. Don't adjust the regmap.
3328 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3329 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3330 (regs_info_3264): New globals.
3331 (s390_regs_info): New function.
3332 (the_low_target): Adjust.
3333 (initialize_low_arch): New function.
3334 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3335 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3336 [__mips64] (init_registers_mips_linux)
3337 (init_registers_mips_dsp_linux): Delete defines.
3338 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3339 (have_dsp): New global.
3340 (mips_read_description): New, based on mips_arch_setup.
3341 (mips_arch_setup): Reimplement.
3342 (get_usrregs_info): New function.
3343 (mips_cannot_fetch_register, mips_cannot_store_register)
3344 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3345 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3346 (target_regsets): Rename to ...
3347 (mips_regsets): ... this, and make static.
3348 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3349 (dsp_regs_info, regs_info): New globals.
3350 (mips_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3354 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3356 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3357 (arm_read_description): New, with bits factored from
3359 (arm_arch_setup): Reimplement.
3360 (target_regsets): Rename to ...
3361 (arm_regsets): ... this, and make static.
3362 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3363 (arm_regs_info): New function.
3364 (the_low_target): Adjust.
3365 (initialize_low_arch): New function.
3366 * linux-m68k-low.c (tdesc_m68k): Declare.
3367 (target_regsets): Rename to ...
3368 (m68k_regsets): ... this, and make static.
3369 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3370 (m68k_regs_info): New function.
3371 (m68k_arch_setup): New function.
3372 (the_low_target): Adjust.
3373 (initialize_low_arch): New function.
3374 * linux-sh-low.c (tdesc_sharch): Declare.
3375 (target_regsets): Rename to ...
3376 (sh_regsets): ... this, and make static.
3377 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3378 (sh_regs_info, sh_arch_setup): New functions.
3379 (the_low_target): Adjust.
3380 (initialize_low_arch): New function.
3381 * linux-bfin-low.c (tdesc_bfin): Declare.
3382 (bfin_arch_setup): New function.
3383 (bfin_usrregs_info, regs_info): New globals.
3384 (bfin_regs_info): New function.
3385 (the_low_target): Adjust.
3386 (initialize_low_arch): New function.
3387 * linux-cris-low.c (tdesc_cris): Declare.
3388 (cris_arch_setup): New function.
3389 (cris_usrregs_info, regs_info): New globals.
3390 (cris_regs_info): New function.
3391 (the_low_target): Adjust.
3392 (initialize_low_arch): New function.
3393 * linux-cris-low.c (tdesc_crisv32): Declare.
3394 (cris_arch_setup): New function.
3395 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3396 (cris_regs_info): New function.
3397 (the_low_target): Adjust.
3398 (initialize_low_arch): New function.
3399 * linux-m32r-low.c (tdesc_m32r): Declare.
3400 (m32r_arch_setup): New function.
3401 (m32r_usrregs_info, regs_info): New globals.
3402 (m32r_regs_info): Adjust.
3403 (initialize_low_arch): New function.
3404 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3405 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3406 (tic6x_usrregs_info): Forward declare.
3407 (tic6x_read_description): New function, based on ...
3408 (tic6x_arch_setup): ... this. Reimplement.
3409 (target_regsets): Rename to ...
3410 (tic6x_regsets): ... this, and make static.
3411 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3412 (tic6x_regs_info): New function.
3413 (the_low_target): Adjust.
3414 (initialize_low_arch): New function.
3415 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3416 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3417 (target_regsets): Rename to ...
3418 (xtensa_regsets): ... this, and make static.
3419 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3421 (xtensa_arch_setup, xtensa_regs_info): New functions.
3422 (the_low_target): Adjust.
3423 (initialize_low_arch): New function.
3424 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3425 (nios2_arch_setup): Set the current process'es tdesc.
3426 (target_regsets): Rename to ...
3427 (nios2_regsets): ... this.
3428 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3429 (nios2_regs_info): New function.
3430 (the_low_target): Adjust.
3431 (initialize_low_arch): New function.
3432 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3433 (aarch64_arch_setup): Set the current process'es tdesc.
3434 (target_regsets): Rename to ...
3435 (aarch64_regsets): ... this.
3436 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3437 (aarch64_regs_info): New function.
3438 (the_low_target): Adjust.
3439 (initialize_low_arch): New function.
3440 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3442 (target_regsets): Rename to ...
3443 (tile_regsets): ... this.
3444 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3445 (tile_regs_info): New function.
3446 (tile_arch_setup): Set the current process'es tdesc.
3447 (the_low_target): Adjust.
3448 (initialize_low_arch): New function.
3449 * spu-low.c (tdesc_spu): Declare.
3450 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3451 * win32-arm-low.c (tdesc_arm): Declare.
3452 (arm_arch_setup): New function.
3453 (the_low_target): Install arm_arch_setup instead of
3455 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3456 (init_windows_x86): Rename to ...
3457 (i386_arch_setup): ... this. Set `win32_tdesc'.
3458 (the_low_target): Adjust.
3459 * win32-low.c (win32_tdesc): New global.
3460 (child_add_thread): Don't create the thread cache here.
3461 (do_initial_child_stuff): Set the new process'es tdesc.
3462 * win32-low.h (struct target_desc): Forward declare.
3463 (win32_tdesc): Declare.
3464 * lynx-i386-low.c (tdesc_i386): Declare global.
3465 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3466 * lynx-low.c (lynx_tdesc): New global.
3467 (lynx_add_process): Set the new process'es tdesc.
3468 * lynx-low.h (struct target_desc): Forward declare.
3469 (lynx_tdesc): Declare global.
3470 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3471 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3472 * nto-low.c (nto_tdesc): New global.
3473 (do_attach): Set the new process'es tdesc.
3474 * nto-low.h (struct target_desc): Forward declare.
3475 (nto_tdesc): Declare.
3476 * nto-x86-low.c (tdesc_i386): Declare.
3477 (nto_x86_arch_setup): Set `nto_tdesc'.
3479 2013-06-04 Gary Benson <gbenson@redhat.com>
3481 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3482 to qSupported response when appropriate.
3483 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3484 with nonzero-length annex.
3485 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3486 arguments supplied in annex.
3488 2013-05-31 Doug Evans <dje@google.com>
3491 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3492 64 bits in 64-cross-32 environment.
3494 2013-05-28 Pedro Alves <palves@redhat.com>
3496 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3497 (aarch64-without-fpu.c): Delete rule.
3498 * configure.srv (aarch64*-*-linux*): Remove references to
3499 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3500 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3503 2013-05-24 Pedro Alves <palves@redhat.com>
3505 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3506 instead of strchr/decode_address. Error if the range isn't split
3507 with a ','. Don't assume there's be a ':' in the action.
3509 2013-05-23 Yao Qi <yao@codesourcery.com>
3510 Pedro Alves <palves@redhat.com>
3512 * linux-low.c (lwp_in_step_range): New function.
3513 (linux_wait_1): If the thread was range stepping and stopped
3514 outside the stepping range, report the stop to GDB. Otherwise,
3515 continue stepping. Add range stepping debug output.
3516 (linux_set_resume_request): Copy the step range from the resume
3518 (linux_supports_range_stepping): New.
3519 (linux_target_ops) <supports_range_stepping>: Set to
3520 linux_supports_range_stepping.
3521 * linux-low.h (struct linux_target_ops)
3522 <supports_range_stepping>: New field.
3523 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3524 * linux-x86-low.c (x86_supports_range_stepping): New.
3525 (the_low_target) <supports_range_stepping>: Set to
3526 x86_supports_range_stepping.
3527 * server.c (handle_v_cont): Handle 'r' action.
3528 (handle_v_requests): Append ";r" if the target supports range
3530 * target.h (struct thread_resume) <step_range_start,
3531 step_range_end>: New fields.
3532 (struct target_ops) <supports_range_stepping>:
3534 (target_supports_range_stepping): New macro.
3536 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3538 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3539 confusion in comment.
3541 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3543 * lynx-low.c (struct process_info_private): New type.
3544 (lynx_add_process): New function.
3545 (lynx_create_inferior, lynx_attach): Replace calls to
3546 add_process by calls to lynx_add_process.
3547 (lynx_resume): If PTID is null, then try using
3548 current_process()->private->last_wait_event_ptid.
3550 (lynx_clear_inferiors): Delete. The contents of that function
3551 has been inlined in lynx_mourn;
3552 (lynx_wait_1): Save the ptid in the process's private data.
3553 (lynx_mourn): Free the process' private data. Replace call
3554 to lynx_clear_inferiors by call to clear_inferiors.
3556 2013-05-17 Yao Qi <yao@codesourcery.com>
3558 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3561 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3563 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3564 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3565 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3566 PT_TEXT_END_ADDR guards. Update comments.
3567 (linux_target_op) <read_offsets>: Conditionally define to
3568 linux_read_offsets if the target is UCLIBC and if it defines
3569 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3571 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3572 Andrew Jenner <andrew@codesourcery.com>
3574 * Makefile.in (SFILES): Add linux-nios2-low.c.
3575 (clean): Add action to delete nios2-linux.c.
3576 (nios2-linux.c): New rule.
3577 * configure.srv: Add nios2*-*-linux*.
3578 * linux-nios2-low.c: New.
3580 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3582 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3584 2013-04-25 Hui Zhu <hui@codesourcery.com>
3587 * ax.c (ax_printf): Add fflush.
3589 2013-04-22 Tom Tromey <tromey@redhat.com>
3591 * Makefile.in (SFILES): Add filestuff.c.
3592 (OBS): Add filestuff.o.
3593 (filestuff.o): New target.
3594 * config.in, configure: Rebuild.
3595 * configure.ac: Check for fdwalk, pipe2.
3597 2013-04-17 Pedro Alves <palves@redhat.com>
3599 * configure.ac (USE_THREAD_DB): Delete variable.
3600 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3601 Don't AC_SUBST USE_THREAD_DB.
3602 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3603 * config.in, configure: Regenerate.
3605 2013-04-16 Pedro Alves <palves@redhat.com>
3607 * linux-low.h (struct lwp_info) <thread_known>: Move under
3608 the USE_THREAD_DB #ifdef.
3610 2013-04-16 Pedro Alves <palves@redhat.com>
3612 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3613 (linux-low.o): Delete rule.
3614 * linux-low.h: Always include "gdb_thread_db.h" instead of
3615 conditionally including thread_db.h.
3616 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3619 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3621 * Makefile.in (install-only): Fix make install regression.
3623 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3625 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3626 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3628 * gdbserver.1: Remove.
3630 2013-03-22 Pedro Alves <palves@redhat.com>
3632 * linux-low.c (handle_extended_wait): Don't call
3633 linux_enable_event_reporting.
3635 2013-03-15 Tony Theodore <tonyt@logyst.com>
3638 * Makefile.in (SHELL): Use @SHELL@.
3640 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3642 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3645 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3647 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3648 Remove extraneous NULL element.
3650 2013-03-13 Yao Qi <yao@codesourcery.com>
3652 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3653 'V' block in trace frame.
3655 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3657 * target.h (struct target_ops): Add btrace ops.
3658 (target_supports_btrace): New macro.
3659 (target_enable_btrace): New macro.
3660 (target_disable_btrace): New macro.
3661 (target_read_btrace): New macro.
3662 * gdbthread.h (struct thread_info): Add btrace field.
3663 * server.c: Include btrace-common.h.
3664 (handle_btrace_general_set): New function.
3665 (handle_btrace_enable): New function.
3666 (handle_btrace_disable): New function.
3667 (handle_general_set): Call handle_btrace_general_set.
3668 (handle_qxfer_btrace): New function.
3669 (struct qxfer qxfer_packets[]): Add btrace entry.
3670 * inferiors.c (remove_thread): Disable btrace.
3671 * linux-low: Include linux-btrace.h.
3672 (linux_low_enable_btrace): New function.
3673 (linux_low_read_btrace): New function.
3674 (linux_target_ops): Add btrace ops.
3675 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3676 Add srv_linux_btrace=yes.
3677 (x86_64-*-linux*): Add linux-btrace.o.
3678 Add srv_linux_btrace=yes.
3679 * configure.ac: Define HAVE_LINUX_BTRACE.
3680 * config.in: Regenerated.
3681 * configure: Regenerated.
3683 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3685 * server.c (handle_qxfer): Preserve error message if -3 is
3687 (qxfer): Document the -3 return value.
3689 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3691 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3692 (linux_btrace_h): New variable.
3693 (linux-btrace.o): New rule.
3695 2013-03-08 Stan Shebs <stan@codesourcery.com>
3696 Hafiz Abid Qadeer <abidh@codesourcery.com>
3698 * tracepoint.c (trace_buffer_size): New global.
3699 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3700 (init_trace_buffer): Change to one-argument function. Allocate
3701 trace buffer memory.
3702 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3703 handle QTBuffer:size packet.
3704 (cmd_bigqtbuffer_size): New function.
3705 (initialize_tracepoint): Call init_trace_buffer with
3706 DEFAULT_TRACE_BUFFER_SIZE.
3707 * server.c (handle_query): Add QTBuffer:size in the
3710 2013-03-07 Yao Qi <yao@codesourcery.com>
3712 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3713 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3715 (cmd_qtsp): Adjust condition. Do post increment.
3716 Set cur_action and cur_step_action back to 0.
3718 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3721 * linux-low.c (linux_write_memory): Return early success if LEN is
3724 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3726 * configure.srv: Add x86_64-*-cygwin* as target.
3728 2013-02-28 Tom Tromey <tromey@redhat.com>
3730 * configure.ac: Invoke AC_SYS_LARGEFILE.
3731 * configure, config.in: Rebuild.
3733 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3735 * win32-low.c: Throughout, fix format strings and casts of
3736 printf-like functions to avoid type related warnings on all
3738 (get_child_debug_event): Print dwDebugEventCode as hex since
3739 that's how it's usually documented.
3741 2013-02-28 Yao Qi <yao@codesourcery.com>
3743 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3746 2013-02-27 Jiong Wang <jiwang@tilera.com>
3748 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3749 (reg-tilegx32.c): New rule.
3750 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3751 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3752 different register info initializer according to elf class.
3753 (init_registers_tilgx32): New function. The tilegx32 register info
3755 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3756 (tile_store_gregset): Likewise.
3758 2013-02-27 Yao Qi <yao@codesourcery.com>
3760 * server.c (process_point_options): Print debug message when
3761 debug_threads is true.
3763 2013-02-26 Yao Qi <yao@codesourcery.com>
3765 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3767 2013-02-19 Pedro Alves <palves@redhat.com>
3768 Kai Tietz <ktietz@redhat.com>
3772 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3773 instead of strtoul to extract address from packet.
3774 (process_serial_event) <'z'>: Likewise.
3776 2013-02-18 Yao Qi <yao@codesourcery.com>
3778 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3780 2013-02-14 Pedro Alves <palves@redhat.com>
3784 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3785 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3787 2013-02-14 Pedro Alves <palves@redhat.com>
3789 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3791 2013-02-14 Pedro Alves <palves@redhat.com>
3793 * tracepoint.c (save_string): Delete.
3794 (add_tracepoint_action): Use savestring instead of save_string.
3796 2013-02-12 Pedro Alves <palves@redhat.com>
3798 * linux-xtensa-low.c: Ditto.
3799 * xtensa-xtregs.c: Ditto.
3801 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3803 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3806 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3808 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3809 aarch64_num_wp_regs and aarch64_num_bp_regs to
3810 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3812 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3814 * linux-aarch64-low.c (ps_get_thread_area): Replace
3815 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3817 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3818 Marcus Shawcroft <marcus.shawcroft@arm.com>
3819 Nigel Stephens <nigel.stephens@arm.com>
3820 Yufeng Zhang <yufeng.zhang@arm.com>
3822 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3823 (aarch64.c, aarch64-without-fpu.c): New targets.
3824 * configure.srv (aarch64*-*-linux*): New.
3825 * linux-aarch64-low.c: New file.
3827 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3829 * linux-low.c (handle_extended_wait, linux_create_inferior)
3830 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3831 (dequeue_one_deferred_signal, linux_resume_one_thread)
3832 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3833 (linux_tracefork_grandchild, linux_test_for_tracefork)
3834 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3835 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3836 where the argument is 0.
3838 2013-01-25 Yao Qi <yao@codesourcery.com>
3840 * event-loop.c: Include "queue.h".
3841 (gdb_event_p): New typedef.
3842 (struct gdb_event) <next_event>: Remove.
3843 (event_queue): Change to QUEUE(gdb_event_p).
3844 (async_queue_event): Remove.
3845 (gdb_event_xfree): New.
3846 (initialize_event_loop): New.
3847 (process_event): Use API from QUEUE.
3848 (wait_for_event): Likewise.
3849 * server.c (main): Call initialize_event_loop.
3850 * server.h (initialize_event_loop): Declare.
3852 2013-01-18 Yao Qi <yao@codesourcery.com>
3854 * ax.h (struct eval_agent_expr_context): New.
3855 (gdb_eval_agent_expr): Update declaration.
3856 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3857 TFRAME. Add new argument CTX.
3858 * server.h (struct eval_agent_expr_context): Declare.
3859 (agent_mem_read, agent_tsv_read): Update declaration.
3860 (agent_mem_read_string): Likewise.
3861 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3862 (add_traceframe_block): Add new argument TPOINT.
3863 Increase TPOINT->traceframe_usage.
3864 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3865 eval_tracepoint_agent_expr.
3866 (condition_true_at_tracepoint): Likewise.
3867 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3868 (agent_mem_read_string, agent_tsv_read): Likewise.
3870 2013-01-16 Yao Qi <yao@codesourcery.com>
3872 * linux-low.c (linux_resume_one_lwp): Don't check
3873 'lwp->bp_reinsert != 0'.
3875 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3876 Pedro Alves <palves@redhat.com>
3878 * lynx-low.c (ptrace_request_to_str): Define a temporary
3879 macro and use it to simplify this function's implementation.
3881 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3883 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3886 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3888 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3890 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3892 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3894 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3896 * lynx-low.c (lynx_resume): Use the resume_info parameter
3897 to determine the ptid for the lynx_ptrace call, unless
3898 it is equal to minus_one_ptid, in which case we use the
3899 ptid of the current_inferior.
3900 (lynx_wait_1): After having received a thread create/exit
3901 event, resume the inferior's execution using the signaling
3902 thread's ptid, rather than the old ptid.
3904 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3906 * lynx-low.c (lynx_resume): Delete variable ret.
3908 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3910 * gdbreplay.c (gdbreplay_version): Update copyright year.
3911 * server.c (gdbserver_version): Likewise.
3913 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3915 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3918 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3920 * lynx-low.c (ptrace_request_to_str): Add handling for
3923 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3925 * lynx-low.c (lynx_attach): Delete variable new_process.
3927 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3929 * lynx-low.c (lynx_create_inferior): Delete variable
3932 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3934 * lynx-low.c (ptrace_request_to_str): Do not handle
3935 PTRACE_GETTHREADLIST if this macro does not exist.
3937 2012-12-15 Yao Qi <yao@codesourcery.com>
3939 * Makefile.in (OBS): Add notif.o.
3940 * notif.c, notif.h: New.
3941 * server.c: Include "notif.h".
3942 (struct vstop_notif) <next>: Remove.
3944 (queue_stop_reply): Update.
3945 (push_event, send_next_stop_reply): Remove.
3946 (discard_queued_stop_replies): Update.
3947 (notif_stop): New variable.
3948 (handle_v_stopped): Remove.
3949 (handle_v_requests): Don't call handle_v_stopped. Call
3950 handle_ack_notif instead.
3951 (queue_stop_reply_callback): Call notif_event_enque instead
3952 of queue_stop_reply.
3953 (handle_status): Don't call send_next_stop_reply, call
3954 notif_write_event instead.
3955 (kill_inferior_callback): Likewise.
3956 (detach_or_kill_inferior_callback): Likewise.
3957 (main): Call initialize_notif.
3958 (process_serial_event): Call QUEUE_is_empty.
3959 (handle_target_event): Call notif_push instead of push event.
3960 * server.h (push_event): Remove declaration.
3962 2012-12-10 Tom Tromey <tromey@redhat.com>
3964 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3965 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3968 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3969 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3970 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3971 (amd64-linux-ipa.o, ax.o): Rewrite.
3972 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3973 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3974 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3975 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3976 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3977 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3978 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3979 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3980 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3981 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3982 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3983 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3984 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3985 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3986 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3987 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3988 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3989 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3990 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3991 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3992 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3993 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3994 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3995 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3996 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3997 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3998 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3999 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4000 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4001 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4002 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4003 (reg-tilegx.o): Remove.
4004 (all_object_files): New macro.
4005 Include .deps files.
4006 * aclocal.m4, configure: Rebuild.
4007 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4008 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4009 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4011 2012-12-05 Tom Tromey <tromey@redhat.com>
4014 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4016 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4018 * configure.ac: Check for linux/perf_event.h.
4019 * config.in: Regenerated.
4020 * configure: Regenerated.
4022 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4024 * hostio.c (handle_readlink): Decrease buffer size
4025 parameter passed to readlink by one byte.
4027 2012-11-26 Yao Qi <yao@codesourcery.com>
4029 * configure.ac (build_warnings): Append '-Wempty-body'.
4030 * configure: Regenerated.
4031 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4034 2012-11-15 Pierre Muller <muller@sourceware.org>
4036 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4037 * config.in: Regenerate.
4038 * configure: Regenerate.
4039 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4040 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4041 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4042 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4044 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4045 instead of <sys/wait.h> header.
4046 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4048 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4050 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4051 (various make rules): Remove -DGDBSERVER
4053 2012-11-09 Yao Qi <yao@codesourcery.com>
4055 * spu-low.c (current_ptid): Move it to ..
4056 * gdbthread.h: ... here. New.
4057 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4058 * server.c (myresume, process_serial_event): Likewise.
4059 * thread-db.c (thread_db_find_new_threads): Likewise.
4060 * tracepoint.c (run_inferior_command): Likewise.
4062 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4064 * server.c (handle_search_memory_1): Include access length in
4067 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4069 * linux-crisv32-low.c: Fix compile errors.
4071 2012-09-04 Yao Qi <yao@codesourcery.com>
4073 * tracepoint.c (cmd_qtsv): Adjust debug message.
4074 Don't check CUR_TPOINT.
4076 2012-08-28 Yao Qi <yao@codesourcery.com>
4078 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4079 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4080 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4081 Remove declarations of xmalloc, xreallloc, xstrdup and
4083 * Makefile.in (libiberty_h): New.
4084 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4085 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4087 2012-08-23 Yao Qi <yao@codesourcery.com>
4089 * server.h: Remove declaration of 'xsnprintf'.
4091 2012-08-22 Keith Seitz <keiths@redhat.com>
4093 * server.h: Include build-gnulib-gbserver/config.h.
4094 * gdbreplay.c: Likewise.
4096 2012-08-08 Doug Evans <dje@google.com>
4098 * Makefile.in (SFILES): Add gdb_vecs.c.
4099 (OBS): Add gdb_vecs.o.
4100 (gdb_vecs_h, host_defs_h): New variables.
4101 (thread-db.o): Add $(gdb_vecs_h) dependency.
4102 (gdb_vecs.o): New rule.
4103 * thread-db.c: #include "gdb_vecs.h".
4104 (thread_db_load_search): Use a vector to iterate over path elements.
4105 Handle text appearing after "$pdir".
4107 * configure.ac: Add check for strstr.
4108 * config.in: Regenerate.
4109 * configure: Regenerate.
4111 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4113 * hostio.c (handle_pread): If pread fails, fall back to attempting
4115 (handle_pwrite): Likewise for pwrite.
4117 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4119 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4120 between unsupported TYPE and unimplementable ADDR/LEN combination.
4121 (arm_insert_point): Act on new return value.
4123 2012-07-31 Pedro Alves <palves@redhat.com>
4125 * server.c (process_point_options): Only skip tokens if we find
4126 one that is unrecognized. Don't treat 'X' specially while
4127 skipping unrecognized tokens.
4129 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4131 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4132 to 4-byte-align HW breakpoint addresses for Thumb.
4134 2012-07-27 Yao Qi <yao@codesourcery.com>
4138 * server.h: Declare gdb_agent_about_to_close.
4139 * target.c (kill_inferior): Include "agent.h".
4140 New. Send command 'kill'.
4141 * target.h (kill_inferior): Removed macro.
4142 * tracepoint.c (gdb_agent_about_to_close): New.
4143 (gdb_agent_helper_thread): Handle command 'close'.
4144 Wait endlessly until the inferior stops.
4145 Install gdb_agent_remove_socket to atexit hook.
4146 (agent_socket_name): New static variable.
4147 (gdb_agent_socket_init): Replace local variable 'name' with
4148 'agent_socket_name'.
4149 (gdb_agent_remove_socket): New.
4151 2012-07-27 Yao Qi <yao@codesourcery.com>
4153 * server.c (process_point_options): Stop at 'X' when parsing.
4155 2012-07-19 Michael Eager <eager@eagercon.com>
4157 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4159 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4160 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4161 hardware breakpoint.
4163 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4165 * gdbserver/linux-low.c (initialize_low): Call
4166 linux_ptrace_init_warnings.
4168 2012-07-02 Doug Evans <dje@google.com>
4170 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4173 2012-07-02 Stan Shebs <stan@codesourcery.com>
4175 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4176 (ax.o): Add it to build rule.
4178 (OBS): Add format.o.
4179 (IPA_OBS): Add format.o.
4180 * server.c (handle_query): Claim support for breakpoint commands.
4181 (process_point_options): Add command case.
4182 (process_serial_event): Leave running if there are printfs in
4184 * mem-break.h (any_persistent_commands): Declare.
4185 (add_breakpoint_commands): Declare.
4186 (gdb_no_commands_at_breakpoint): Declare.
4187 (run_breakpoint_commands): Declare.
4188 * mem-break.c (struct point_command_list): New struct.
4189 (struct breakpoint): New field command_list.
4190 (any_persistent_commands): New function.
4191 (add_commands_to_breakpoint): New function.
4192 (add_breakpoint_commands): New function.
4193 (gdb_no_commands_at_breakpoint): New function.
4194 (run_breakpoint_commands): New function.
4195 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4197 * ax.c: Include format.h.
4198 (ax_printf): New function.
4199 (gdb_eval_agent_expr): Add printf opcode.
4201 2012-06-13 Yao Qi <yao@codesourcery.com>
4203 * server.c (start_inferior): Remove duplicated writes to fields
4204 'last_resume_kind' and 'last_status' of 'current_inferior'.
4206 2012-06-12 Yao Qi <yao@codesourcery.com>
4207 Pedro Alves <palves@redhat.com>
4209 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4211 * server.c (handle_v_cont): Extend comment.
4213 2012-06-11 Yao Qi <yao@codesourcery.com>
4215 * linux-low.c (linux_attach): Add 'static'.
4217 2012-06-06 Yao Qi <yao@codesourcery.com>
4219 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4221 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4223 Fix gcc -flto compilation warning.
4224 * server.c (main): Make variable multi_mode and attach volatile.
4226 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4228 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4229 if the platform doesn't know about it.
4231 2012-05-30 Jeff Kenton <jkenton@tilera.com>
4233 * Makefile.in (SFILES): Add linux-tile-low.c.
4234 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4235 * configure.srv: Handle tilegx-*-linux*.
4236 * linux-tile-low.c: New file.
4238 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4240 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4242 2012-05-24 Pedro Alves <palves@redhat.com>
4246 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4248 2012-05-24 Pedro Alves <palves@redhat.com>
4252 Replace target_signal with gdb_signal throughout.
4254 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4256 * linux-low.c (linux_store_registers): Avoid the copying sequence
4257 when no data has been retrieved by ptrace.
4259 2012-05-22 Will Deacon <will.deacon@arm.com>
4261 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4262 Include asm/ptrace.h.
4263 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4266 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4268 * linux-low.c (linux_store_registers): Don't re-retrieve data
4269 with ptrace that has already been obtained from /proc. Always
4270 copy any data retrieved with ptrace to the buffer supplied.
4272 2012-05-11 Yao Qi <yao@codesourcery.com>
4273 Pedro Alves <palves@redhat.com>
4275 * linux-low.c (enum stopping_threads_kind): New.
4276 (stopping_threads): Change type to `enum stopping_threads_kind'.
4277 (handle_extended_wait): If stopping and suspending threads, leave
4278 the new_lwp suspended too.
4279 (linux_wait_for_event): Adjust.
4280 (stop_all_lwps): Set `stopping_threads' to
4281 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4282 whether we're suspending threads or just stopping them. Assert no
4285 2012-04-29 Yao Qi <yao@codesourcery.com>
4287 * server.h: Move some code to ...
4288 * gdbthread.h: ... here. New.
4289 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4290 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4291 (nto-low.o, win32-low.o): Likewise.
4292 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4293 * regcache.c, remote-utils.c, server.c: Likewise.
4294 * target.c, tracepoint.c, win32-low.c: Likewise.
4296 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4298 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4299 (PTRACE_ARG4_TYPE): Likewise.
4300 (PTRACE_XFER_TYPE): Likewise.
4301 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4302 ptrace to PTRACE_ARG3_TYPE.
4303 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4304 (PTRACE_ARG4_TYPE): Likewise.
4305 (PTRACE_XFER_TYPE): Likewise.
4306 (linux_detach_one_lwp): Cast fourth argument of
4307 ptrace to long then PTRACE_ARG4_TYPE.
4308 (regsets_fetch_inferior_registers): Cast third argument of
4309 ptrace to long then PTRACE_ARG3_TYPE.
4310 (regsets_store_inferior_registers): Likewise.
4312 2012-04-20 Pedro Alves <palves@redhat.com>
4314 * configure: Regenerate.
4316 2012-04-19 Pedro Alves <palves@redhat.com>
4318 * Makefile.in (GNULIB_BUILDDIR): New.
4319 (LIBGNU, INCGNU, GNULIB_H): Adjust.
4320 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4321 (all, install-only, uninstall, clean-info, all-lib, clean): No
4322 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4323 (maintainer-clean realclean distclean): Use subdir_do.
4325 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4326 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4327 * acinclude.m4: Include acx_configure_dir.m4.
4328 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4329 calls. Call AC_PROG_RANLIB. Configure gnulib using
4332 (GNULIB_STDINT_H): Adjust.
4333 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4334 * gdbreplay.c: Include build-gnulib/config.h.
4335 * server.h: Likewise.
4336 * aclocal.m4: Regenerate.
4337 * config.in: Regenerate.
4338 * configure: Regenerate.
4340 2012-04-19 Pedro Alves <palves@redhat.com>
4342 * Makefile.in (LIBGNU, INCGNU): Adjust.
4343 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4344 (all, install-only, uninstall, clean-info, all-lib, clean)
4345 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4346 * configure.ac: Adjust AC_OUTPUT output.
4347 * aclocal.m4: Regenerate.
4348 * configure: Regenerate.
4350 2012-04-19 Pedro Alves <palves@redhat.com>
4352 * Makefile.in (generated_files): New.
4353 (server_h): Remove the explicit dependency on config.h, and depend
4354 on $generated_files.
4356 2012-04-19 Pedro Alves <palves@redhat.com>
4358 * Makefile.in (INCGNU): Add -Ignulib.
4360 2012-04-19 Pedro Alves <palves@redhat.com>
4362 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4363 (INCGNU): ... this, and spell out -I here.
4364 (GNULIB_LIB): Rename to ...
4366 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4368 2012-04-19 Pedro Alves <palves@redhat.com>
4370 * config.in: Regenerate.
4372 2012-04-19 Pedro Alves <palves@redhat.com>
4374 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4375 * server.h (memmem): Remove declaration.
4376 * config.in: Regenerate.
4377 * configure: Regenerate.
4379 2012-04-19 Yao Qi <yao@codesourcery.com>
4381 * Makefile.in (SFILES): Add common/vec.c.
4385 2012-04-19 Yao Qi <yao@codesourcery.com>
4387 * remote-utils.c (prepare_resume_reply): Replace with macro
4388 target_core_of_thread.
4389 * server.c (handle_qxfer_threads_proper): Likewise.
4390 * target.h (traget_core_of_thread): New macro.
4392 2012-04-18 Pedro Alves <palves@redhat.com>
4394 * aclocal.m4: Regenerate.
4395 * configure: Regenerate.
4397 2012-04-16 Yao Qi <yao@codesourcery.com>
4399 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4400 duplicated on address.
4402 2012-04-16 Yao Qi <yao@codesourcery.com>
4404 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4405 (struct tracepoint_action_ops) <send>: New field.
4406 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4407 (agent_expr_send, x_tracepoint_action_send): New.
4408 (l_tracepoint_action_send): New.
4409 (cmd_qtdp): Download and install tracepoint
4410 according to `use_agent'.
4411 (run_inferior_command): Add one more parameter `len'.
4413 (tracepoint_send_agent): New.
4414 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4416 2012-04-16 Yao Qi <yao@codesourcery.com>
4418 * tracepoint.c (download_tracepoints): Moved to ...
4419 (cmd_qtstart): ... here.
4421 2012-04-14 Yao Qi <yao@codesourcery.com>
4423 * tracepoint.c: Include inttypes.h.
4424 (struct collect_memory_action): Use sized types.
4425 (struct tracepoint): Likewise.
4426 (cmd_qtdp, stop_tracing): Update print specifiers.
4427 (cmd_qtp, response_tracepoint): Likewise.
4428 (collect_data_at_tracepoint): Likewise.
4429 (collect_data_at_step): Likewise.
4431 2012-04-14 Yao Qi <yao@codesourcery.com>
4433 Import gnulib module inttypes.
4434 * aclocal.m4, config.in, configure: Regenerated.
4436 2012-04-14 Yao Qi <yao@codesourcery.com>
4438 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4439 Makefile and config.status at last.
4441 2012-04-13 Yao Qi <yao@codesourcery.com>
4443 * tracepoint.c: Include stdint.h unconditionally.
4445 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4447 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4448 on BFD_HAVE_SYS_PROCFS_TYPE.
4449 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4450 * configure: Regenerate.
4451 * config.in: Likewise.
4453 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4455 * Makefile.in (clean): Also remove x32.c x32-linux.c
4456 x32-avx.c x32-avx-linux.c.
4457 (x32.o): New target.
4459 (x32-linux.o): Likewise.
4460 (x32-linux.c): Likewise.
4461 (x32-avx.o): Likewise.
4462 (x32-avx.c): Likewise.
4463 (x32-avx-linux.o): Likewise.
4464 (x32-avx-linux.c): Likewise.
4466 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4467 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4468 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4469 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4470 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4471 i386/x32-avx-linux.xml.
4473 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4474 (init_registers_x32_avx_linux): Likwise.
4475 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4476 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4478 2012-04-13 Pedro Alves <palves@redhat.com>
4480 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4481 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4482 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4483 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4486 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4488 * linux-x86-low.c (compat_x32_clock_t): New.
4489 (compat_x32_siginfo_t): Likewise.
4490 (compat_x32_siginfo_from_siginfo): Likewise.
4491 (siginfo_from_compat_x32_siginfo): Likewise.
4492 (linux_is_elf64): Likewise.
4493 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4494 and siginfo_from_compat_x32_siginfo for x32.
4495 (x86_arch_setup): Set linux_is_elf64.
4497 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4500 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4502 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4503 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4504 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4505 compatible with process.
4507 2012-04-12 Yao Qi <yao@codesourcery.com>
4509 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4510 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4511 (install-only, install-info, clean): Handle sub dir gnulib.
4512 (all-lib, am--refresh): New targets.
4513 (memmem.o): Remove target.
4514 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4515 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4516 (AC_REPLACE_FUNCS): Remove memmem.
4517 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4518 (AC_OUTPUT): Generate Makefile in gnulib/.
4519 * aclocal.m4, config.in, configure: Regenerated.
4521 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4523 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4525 2012-04-05 Pedro Alves <palves@redhat.com>
4527 -Werror=strict-aliasing
4529 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4532 2012-04-04 Pedro Alves <palves@redhat.com>
4534 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4535 (sparc_store_gregset_from_stack, sparc_store_gregset)
4536 (sparc_breakpoint_at): Fix formatting.
4538 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4540 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4542 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4543 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4544 * config.in: Regenerate.
4545 * configure: Likewise.
4547 2012-03-29 Pedro Alves <palves@redhat.com>
4549 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4550 Correct ptrace arguments.
4552 2012-03-28 Pedro Alves <palves@redhat.com>
4554 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4555 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4556 (IA64_FR1_REGNUM): New defines.
4557 (ia64_fetch_register): New.
4558 (the_low_target): Install it.
4559 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4561 * linux-low.c (linux_fetch_registers): Try the
4562 the_low_target.fetch_register hook first.
4564 * linux-arm-low.c (the_low_target): Adjust.
4565 * linux-bfin-low.c (the_low_target): Adjust.
4566 * linux-cris-low.c (the_low_target): Adjust.
4567 * linux-crisv32-low.c (the_low_target): Adjust.
4568 * linux-m32r-low.c (the_low_target): Adjust.
4569 * linux-m68k-low.c (the_low_target): Adjust.
4570 * linux-mips-low.c (the_low_target): Adjust.
4571 * linux-ppc-low.c (the_low_target): Adjust.
4572 * linux-s390-low.c (the_low_target): Adjust.
4573 * linux-sh-low.c (the_low_target): Adjust.
4574 * linux-sparc-low.c (the_low_target): Adjust.
4575 * linux-tic6x-low.c (the_low_target): Adjust.
4576 * linux-x86-low.c (the_low_target): Adjust.
4577 * linux-xtensa-low.c (the_low_target): Adjust.
4579 2012-03-26 Pedro Alves <palves@redhat.com>
4581 * server.c (handle_qxfer_libraries): Don't bail early if
4582 the_target->qxfer_libraries_svr4 is not NULL.
4584 2012-03-26 Pedro Alves <palves@redhat.com>
4586 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4588 2012-03-23 Pedro Alves <palves@redhat.com>
4590 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4591 "library-list-svr4" element's start tag when the the DSO list is
4594 2012-03-23 Pedro Alves <palves@redhat.com>
4596 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4597 a variable whose type size is the same as the inferior's pointer
4600 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4602 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4604 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4605 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4606 * linux-low.h: Include <signal.h>.
4607 (struct siginfo): Remove forward declaration.
4608 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4611 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4613 * .gitignore: Ignore more files.
4615 2012-03-19 Pedro Alves <palves@redhat.com>
4616 Jan Kratochvil <jan.kratochvil@redhat.com>
4618 * server.c (cont_thread, general_thread): Add describing comments.
4619 (start_inferior): Clear `cont_thread'.
4620 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4623 2012-03-15 Yao Qi <yao@codesourcery.com>
4625 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4627 (cmd_qtdp): ... here.
4629 2012-03-15 Yao Qi <yao@codesourcery.com>
4631 * tracepoint.c (struct tracepoint_action_ops): New.
4632 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4633 (m_tracepoint_action_download): New.
4634 (r_tracepoint_action_download): New.
4635 (x_tracepoint_action_download): New.
4636 (l_tracepoint_action_download): New.
4637 (add_tracepoint_action): Install `action->ops' according type.
4638 (download_tracepoint_1): Move code `download' function pointer
4639 of various tracepoint_action_ops.
4641 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4643 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4644 linux_ptrace_attach_warnings.
4646 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4648 * Makefile.in (linux-ptrace.o): New.
4649 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4650 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4651 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4652 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4653 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4655 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4657 2012-03-08 Yao Qi <yao@codesourcery.com>
4658 Pedro Alves <palves@redhat.com>
4660 Fix PR server/13392.
4661 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4663 * tracepoint.c (remove_tracepoint): New.
4664 (cmd_qtdp): Call remove_tracepoint when failed to install.
4666 2012-03-07 Pedro Alves <palves@redhat.com>
4668 * linux-low.c (get_detach_signal): New.
4669 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4670 Pass on pending signals to PTRACE_DETACH. Check the result of the
4672 * server.c (program_signals, program_signals_p): New.
4673 (handle_general_set): Handle QProgramSignals.
4674 * server.h (program_signals, program_signals_p): Declare.
4676 2012-03-05 Pedro Alves <palves@redhat.com>
4677 Jan Kratochvil <jan.kratochvil@redhat.com>
4679 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4682 2012-03-03 Yao Qi <yao@codesourcery.com>
4684 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4685 agent_look_up_symbols.
4687 2012-03-03 Yao Qi <yao@codesourcery.com>
4689 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4690 (linux-x86-low.o): Likewise.
4691 * server.h: Remove in_process_agent_loaded.
4692 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4696 2012-03-03 Yao Qi <yao@codesourcery.com>
4698 * tracepoint.c (gdb_agent_capability): New global.
4699 (in_process_agent_loaded_ust): Renamed to
4700 `in_process_agent_supports_ust'.
4702 (in_process_agent_supports_ust): Call agent_capability_check.
4703 (clear_installed_tracepoints): Assert that agent supports
4706 2012-03-03 Yao Qi <yao@codesourcery.com>
4708 * linux-low.c (linux_supports_agent): New.
4709 (linux_target_ops): Initialize field `supports_agent' with
4710 linux_supports_agent.
4711 * target.h (struct target_ops) <supports_agent>: New.
4712 (target_supports_agent): New macro.
4713 * server.c (handle_general_set): Handle packet 'QAgent'.
4714 (handle_query): Send `QAgent+'.
4715 * Makefile.in (server.o): Depends on agent.h.
4717 2012-03-03 Yao Qi <yao@codesourcery.com>
4719 * Makefile.in (OBS): Add agent.o.
4720 Add new rule for agent.o.
4721 Track dependence of tracepoint.c on agent.h.
4722 * tracepoint.c (run_inferior_command_1):
4723 (run_inferior_command): Call agent_run_command.
4724 (gdb_ust_connect_sync_socket): Deleted. Move it to
4726 (resume_thread, stop_thread): Likewise.
4727 (gdb_ust_socket_init): Renamed to ...
4728 (gdb_agent_socket_init): ... New.
4729 (gdb_ust_thread): Renamed to ...
4730 (gdb_agent_helper_thread): ... New.
4731 (gdb_ust_init): Move some code to ...
4732 (gdb_agent_init): ... here. New.
4733 [HAVE_UST]: Call gdb_ust_init.
4734 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4735 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4736 * config.in, configure: Regenerated.
4738 2012-03-02 Pedro Alves <palves@redhat.com>
4740 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4741 * linux-low.c (struct simple_pid_list): New.
4742 (stopped_pids): New a struct simple_pid_list pointer.
4743 (add_to_pid_list, pull_pid_from_list): New.
4744 (handle_extended_wait): Don't assume the first signal new children
4745 report is SIGSTOP. Adjust call to pull_pid_from_list.
4746 (linux_wait_for_lwp): Adjust.
4748 2012-03-02 Yao Qi <yao@codesourcery.com>
4750 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4753 2012-03-02 Yao Qi <yao@codesourcery.com>
4755 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4756 `stop_pc' and `tpoint'. Update caller.
4758 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4760 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4761 * linux-low.c (use_linux_regsets): New macro.
4762 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4763 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4764 (linux_register_in_regsets): New function.
4765 (usr_fetch_inferior_registers): Skip registers covered by
4767 (usr_store_inferior_registers): Likewise.
4768 (usr_fetch_inferior_registers): New macro.
4769 (usr_store_inferior_registers): Likewise.
4770 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4771 (linux_store_registers): Likewise.
4772 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4774 (init_registers_mips64_dsp_linux): Likewise.
4775 (init_registers_mips_linux): New macro.
4776 (init_registers_mips_dsp_linux): Likewise.
4777 (mips_dsp_num_regs): Likewise.
4778 (DSP_BASE, DSP_CONTROL): New fallback macros.
4779 (mips_base_regs): New macro.
4780 (mips_regmap): Use it. Fix the size.
4781 (mips_dsp_regmap): New variable.
4782 (mips_dsp_regset_bitmap): Likewise.
4783 (mips_arch_setup): New function.
4784 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4786 (mips_cannot_store_register): Likewise.
4787 (the_low_target): Update .arch_setup, .num_regs and .regmap
4788 initializers. Add .regset_bitmap initializer.
4789 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4791 * linux-bfin-low.c (the_low_target): Likewise.
4792 * linux-cris-low.c (the_low_target): Likewise.
4793 * linux-crisv32-low.c (the_low_target): Likewise.
4794 * linux-ia64-low.c (the_low_target): Likewise.
4795 * linux-m32r-low.c (the_low_target): Likewise.
4796 * linux-m68k-low.c (the_low_target): Likewise.
4797 * linux-ppc-low.c (the_low_target): Likewise.
4798 * linux-s390-low.c (the_low_target): Likewise.
4799 * linux-sh-low.c (the_low_target): Likewise.
4800 * linux-sparc-low.c (the_low_target): Likewise.
4801 * linux-tic6x-low.c (the_low_target): Likewise.
4802 * linux-x86-low.c (the_low_target): Likewise.
4803 * linux-xtensa-low.c (the_low_target): Likewise.
4804 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4805 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4806 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4808 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4809 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4811 2012-02-29 Yao Qi <yao@codesourcery.com>
4812 Pedro Alves <palves@redhat.com>
4814 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4815 `step_over_finished' is true.
4817 2012-02-27 Pedro Alves <palves@redhat.com>
4819 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4820 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4822 2012-02-27 Pedro Alves <palves@redhat.com>
4825 * linux-low.c (pid_is_stopped): New.
4826 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4828 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4830 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4833 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4835 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4837 2012-02-24 Luis Machado <lgustavo@codesourcery>
4839 * server.c (handle_query): Advertise support for target-side
4840 breakpoint condition evaluation.
4841 (process_point_options): New function.
4842 (process_serial_event): When inserting a breakpoint, check for
4843 a target-side condition that should be evaluated.
4845 * mem-break.c: Include regcache.h and ax.h.
4846 (point_cond_list_t): New data structure.
4847 (breakpoint) <cond_list>: New field.
4848 (find_gdb_breakpoint_at): Make non-static.
4849 (delete_gdb_breakpoint_at): Clear any target-side
4851 (clear_gdb_breakpoint_conditions): New function.
4852 (add_condition_to_breakpoint): Likewise.
4853 (add_breakpoint_condition): Likewise.
4854 (gdb_condition_true_at_breakpoint): Likewise.
4855 (gdb_breakpoint_here): Return result directly instead
4856 of going through a local variable.
4858 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4859 (clear_gdb_breakpoint_conditions): Likewise.
4860 (add_breakpoint_condition): Likewise.
4861 (gdb_condition_true_at_breakpoint): Likewise.
4863 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4864 (need_step_over_p): Take target-side breakpoint condition into
4867 2012-02-24 Luis Machado <lgustavo@codesourcery>
4869 * server.h: Include tracepoint.h.
4870 (agent_mem_read, agent_get_trace_state_variable_value,
4871 agent_set_trace_state_variable_value,
4872 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4873 get_set_tsv_func_addr): New prototypes.
4875 * ax.h: New include file.
4876 * ax.c: New source file.
4878 * tracepoint.c: Include ax.h.
4879 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4880 agent_expr, eval_result_type): Move to ax.h.
4881 (parse_agent_expr): Rename to ...
4882 (gdb_parse_agent_expr): ... this, make it non-static and move
4884 (unparse_agent_expr) Rename to ...
4885 (gdb_unparse_agent_expr): ... this, make it non-static and move
4887 (eval_agent_expr): Rename to ...
4888 (eval_tracepoint_agent_expr): ... this.
4889 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4890 forward declarations.
4891 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4892 (agent_get_trace_state_variable_value): New function.
4893 (agent_set_trace_state_variable_value): New function.
4894 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4895 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4896 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4897 (condition_true_at_tracepoint): Likewise.
4898 (parse_agent_expr): Rename to ...
4899 (gdb_parse_agent_expr): ... this and move to ax.c.
4900 (unparse_agent_expr): Rename to ...
4901 (gdb_unparse_agent_expr): ... this and move to ax.c.
4902 (gdb_agent_op_name): Move to ax.c.
4903 (eval_agent_expr): Rename to ...
4904 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4906 (eval_tracepoint_agent_expr): New function.
4907 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4909 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4911 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4912 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4913 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4914 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4915 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4916 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4917 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4918 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4919 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4920 (compile_bytecodes): Remove forward declaration.
4921 (is_goto_target): Move to ax.c.
4922 (compile_bytecodes): Move to ax.c and call
4923 agent_get_trace_state_variable_value (...) and
4924 agent_set_trace_state_variable_value (...).
4926 * Makefile.in: Update ax.c and IPA dependencies.
4928 2012-02-24 Pedro Alves <palves@redhat.com>
4930 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4931 (cmd_bigqtbuffer_circular): ... this. Only handle
4932 'QTBuffer:circular:'.
4933 (handle_tracepoint_general_set): Adjust.
4935 2012-02-16 Yao Qi <yao@codesourcery.com>
4937 * inferiors.c: Move code to ...
4938 * dll.c: .... here. New.
4939 * server.h: Declare clear_dlls.
4940 * Makefile.in (SFILES): Add dll.c.
4944 2012-02-11 Yao Qi <yao@codesourcery.com>
4946 * server.c: (handle_monitor_command): Add a new parameter
4948 (handle_query): Update caller.
4950 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4952 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4953 * configure, config.in: Regenerate.
4954 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4957 2012-02-02 Pedro Alves <palves@redhat.com>
4959 Try SIGKILL first, then PTRACE_KILL.
4960 * linux-low.c (linux_kill_one_lwp): New.
4961 (linux_kill_one_lwp): Rename to ...
4962 (kill_one_lwp_callback): ... this. Use the new
4965 2012-02-02 Pedro Alves <palves@redhat.com>
4967 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4970 2012-01-27 Pedro Alves <palves@redhat.com>
4972 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4973 (elf_64_file_p): Make static.
4974 (linux_pid_exe_is_elf_64_file): New.
4975 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4976 Delete declarations.
4977 (linux_pid_exe_is_elf_64_file): Declare.
4978 * linux-x86-low.c (x86_arch_setup): Use
4979 linux_pid_exe_is_elf_64_file.
4981 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4983 * linux-low.c (linux_wait_for_event_1): Rename to ...
4984 (linux_wait_for_event): ... here and merge it with former
4985 linux_wait_for_event - new variable wait_ptid, use it.
4986 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4988 2012-01-23 Pedro Alves <palves@redhat.com>
4990 * server.c (main): Avoid yet another case of infinite loop while
4991 detaching/killing after a longjmp.
4993 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4996 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4998 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5000 * hostio.c (handle_readlink): New function.
5001 (handle_vFile): Call it to handle "vFile:readlink" packets.
5003 2012-01-20 Pedro Alves <palves@redhat.com>
5004 Ulrich Weigand <ulrich.weigand@linaro.org>
5006 * server.c (handle_v_requests): Only support vAttach and vRun to
5007 start multiple processes when in extended protocol mode.
5009 2012-01-17 Pedro Alves <palves@redhat.com>
5011 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5012 memalign plus mprotect to allocate the scratch buffer.
5014 2012-01-13 Pedro Alves <palves@redhat.com>
5016 * server.c (attach_inferior): Clear `cont_thread'.
5018 2012-01-13 Pedro Alves <palves@redhat.com>
5020 * server.c (main): Avoid infinite loop while detaching/killing
5023 2012-01-09 Doug Evans <dje@google.com>
5025 * server.c (start_inferior): Set last_ptid in --wrapper case.
5027 2012-01-06 Yao Qi <yao@codesourcery.com>
5029 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5031 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5033 2012-01-04 Yao Qi <yao@codesourcery.com>
5035 * tracepoint.c (cmd_qtdp): Print debug message
5036 for static tracepoint.
5038 2012-01-04 Yao Qi <yao@codesourcery.com>
5040 * tracepoint.c (trace_vdebug): Differentiate debug message
5041 between gdbserver and IPA.
5043 2012-01-03 Yao Qi <yao@codesourcery.com>
5045 * tracepoint.c (tracepoint_was_hit): Don't collect for
5048 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5050 * terminal.h: Reformat copyright header.
5052 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5054 * server.c (gdbserver_version): Update copyright year.
5055 * gdbreplay.c (gdbreplay_version): Likewise.
5057 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5059 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5062 2011-12-18 Hui Zhu <teawater@gmail.com>
5063 * linux-low.c (linux_create_inferior): Save return value to ret.
5065 2011-12-18 Hui Zhu <teawater@gmail.com>
5067 * linux-low.c (linux_create_inferior): Save return value to ret.
5069 2011-12-16 Doug Evans <dje@google.com>
5071 * linux-low.c (linux_create_inferior): If stdio connection,
5072 redirect stdin from /dev/null, stdout to stderr.
5073 * remote-utils.c (remote_is_stdio): New static global.
5074 (remote_connection_is_stdio): New function.
5075 (remote_prepare): Handle stdio connection.
5076 (remote_open): Ditto.
5077 (remote_close): Don't close stdin for stdio connections.
5078 (read_prim,write_prim): New functions. Replace all calls to
5079 read/write to these.
5080 * server.c (main): Watch for "-" argument. Move call to
5081 remote_prepare before start_inferior.
5082 * server.h (STDIO_CONNECTION_NAME): New macro.
5083 (remote_connection_is_stdio): Declare.
5085 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5086 in debugging output.
5088 2011-12-15 Yao Qi <yao@codesourcery.com>
5090 * tracepoint.c: Include sys/syscall.h.
5091 (gdb_ust_thread): Remove preprocessor conditional.
5093 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5095 * linux-low.c (linux_detach_one_lwp): Call
5096 the_low_target.prepare_to_resume before detaching.
5098 2011-12-14 Yao Qi <yao@codesourcery.com>
5100 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5103 2011-12-14 Yao Qi <yao@codesourcery.com>
5105 * i386-low.c (i386_low_stopped_data_address): Initialize local
5108 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5112 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5113 DR_CONTROL unless necessary. Extend comments.
5114 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5115 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5117 2011-12-13 Yao Qi <yao@codesourcery.com>
5119 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5121 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5123 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5125 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5126 Print new debug message for such case.
5128 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5130 Fix overlapping memcpy.
5131 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5132 the read_inferior_memory transfer.
5133 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5134 write_inferior_memory transfer.
5135 (set_fast_tracepoint_jump): New variable buf. Use it for the
5136 read_inferior_memory and write_inferior_memory transfers.
5137 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5138 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5139 Use it for the write_inferior_memory transfer.
5140 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5143 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5145 * linux-low.c (fetch_register, store_register): Make code
5146 consistent, fix formatting.
5148 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5150 * linux-low.c (usr_store_inferior_registers): Factor out code
5151 to handle individual registers into...
5152 (store_register): ... this new function.
5154 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5156 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5157 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5158 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5159 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5160 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5161 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5162 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5163 (srv_xmlfiles): Add new XML files.
5165 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5167 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5168 (init_registers_s390_linux32v1): Add prototype.
5169 (init_registers_s390_linux32v2): Likewise.
5170 (init_registers_s390_linux64v1): Likewise.
5171 (init_registers_s390_linux64v2): Likewise.
5172 (init_registers_s390x_linux64v1): Likewise.
5173 (init_registers_s390x_linux64v2): Likewise.
5174 (s390_num_regs): Increment to 52.
5175 (s390_regmap): Add orig_r2 register.
5176 (s390_num_regs_3264): Increment to 68.
5177 (s390_regmap_3264): Add orig_r2 register.
5178 (s390_collect_ptrace_register): Handle orig_r2 register.
5179 (s390_supply_ptrace_register): Likewise.
5180 (s390_fill_last_break): New function.
5181 (s390_store_last_break): Likewise.
5182 (s390_fill_system_call): New function.
5183 (s390_store_system_call): Likewise.
5184 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5186 (s390_check_regset): New function.
5187 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5188 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5189 Update target_regsets for available register sets.
5191 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5192 Jan Kratochvil <jan.kratochvil@redhat.com>
5194 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5195 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5197 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5198 * linux-low.h (struct process_info_private): New member r_debug.
5199 * server.c (handle_qxfer_libraries): Call
5200 the_target->qxfer_libraries_svr4.
5201 (handle_qxfer_libraries_svr4): New function.
5202 (qxfer_packets): New entry "libraries-svr4".
5203 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5204 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5205 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5206 PACKET_qXfer_libraries_svr4.
5208 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5210 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5211 PSW address/mask between 8-byte and 16-byte formats.
5212 (s390_supply_ptrace_register): Likewise.
5213 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5214 basic addressing mode bit.
5216 2011-11-24 Stan Shebs <stan@codesourcery.com>
5218 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5220 2011-11-17 Stan Shebs <stan@codesourcery.com>
5222 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5223 (tracing_start_time): New global.
5224 (tracing_stop_time): New global.
5225 (tracing_user_name): New global.
5226 (tracing_notes): New global.
5227 (tracing_stop_note): New global.
5228 (cmd_qtstart): Set traceframe_usage, start_time.
5229 (stop_tracing): Set stop_time.
5230 (cmd_qtstatus): Report additional status.
5231 (cmd_qtp): New function.
5232 (handle_tracepoint_query): Call it.
5233 (cmd_qtnotes): New function.
5234 (handle_tracepoint_general_set): Call it.
5235 (get_timestamp): Rename from tsv_get_timestamp.
5237 2011-11-14 Stan Shebs <stan@codesourcery.com>
5238 Kwok Cheung Yeung <kcy@codesourcery.com>
5240 * linux-x86-low.c (small_jump_insn): New.
5241 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5242 trampoline and error message, build a trampoline and issue a small
5243 jump instruction to it.
5244 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5245 trampoline and error message.
5246 (x86_get_min_fast_tracepoint_insn_len): New.
5247 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5248 * linux-low.h (struct linux_target_ops): Add arguments to
5249 install_fast_tracepoint_jump_pad operation, add new operation.
5250 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5252 (linux_get_min_fast_tracepoint_insn_len): New function.
5253 (linux_target_op): Add new operation.
5254 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5255 (gdb_trampoline_buffer_end): Ditto.
5256 (gdb_trampoline_buffer_error): Ditto.
5257 (struct ipa_sym_addresses): Add fields for new IPA variables.
5258 (symbol_list): Add entries for new IPA variables.
5259 (struct tracepoint): Add fields to hold the address range of the
5260 trampoline used by the tracepoint.
5261 (trampoline_buffer_head): New static variable.
5262 (trampoline_buffer_tail): Ditto.
5263 (claim_trampoline_space): New function.
5264 (have_fast_tracepoint_trampoline_buffer): New function.
5265 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5267 (install_fast_tracepoint): Ditto, also add error buffer argument.
5268 (cmd_qtminftpilen): New function.
5269 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5270 (fast_tracepoint_from_trampoline_address): New function.
5271 (fast_tracepoint_collecting): Handle trampoline as part of jump
5273 (set_trampoline_buffer_space): New function.
5274 (initialize_tracepoint): Initialize new IPA variables.
5275 * target.h (struct target_ops): Add arguments to
5276 install_fast_tracepoint_jump_pad operation, add new
5277 get_min_fast_tracepoint_insn_len operation.
5278 (target_get_min_fast_tracepoint_insn_len): New.
5279 (install_fast_tracepoint_jump_pad): Add arguments.
5280 * server.h (IPA_BUFSIZ): Define.
5281 * linux-i386-ipa.c: Include extra header files.
5282 (initialize_fast_tracepoint_trampoline_buffer): New function.
5283 (initialize_low_tracepoint): Call it.
5284 * server.h (set_trampoline_buffer_space): Declare.
5285 (claim_trampoline_space): Ditto.
5286 (have_fast_tracepoint_trampoline_buffer): Ditto.
5288 2011-11-14 Yao Qi <yao@codesourcery.com>
5290 * server.c (handle_query): Handle InstallInTrace for qSupported.
5291 * tracepoint.c (add_tracepoint): Sort list.
5292 (install_tracepoint, download_tracepoint): New.
5293 (cmd_qtdp): Call them to install and download tracepoints.
5294 (sort_tracepoints): Removed.
5295 (cmd_qtstart): Update.
5297 2011-11-14 Yao Qi <yao@codesourcery.com>
5299 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5300 * mem-break.h: Declare.
5301 * tracepoint.c (cmd_qtstart): Move some code to ...
5302 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5304 (download_tracepoints): Move some code to ...
5305 (download_tracepoint_1): ... here. New.
5307 2011-11-08 Yao Qi <yao@codesourcery.com>
5309 * remote-utils.c (relocate_instruction): A comment fix.
5311 2011-11-07 Joel Brobecker <brobecker@adacore.com>
5313 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5314 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5315 dr_status_mirror and dr_control_mirror from debug_reg_state.
5316 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5317 (i386_initial_stuff): Remove use of deleted globals.
5318 (i386_get_thread_context, i386_set_thread_context,
5319 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5320 from debug_reg_state.
5322 2011-11-05 Yao Qi <yao@codesourcery.com>
5324 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5325 address as TPOINT's.
5327 2011-11-02 Stan Shebs <stan@codesourcery.com>
5329 * tracepoint.c (agent_mem_read_string): New function.
5330 (eval_agent_expr): Call it for tracenz.
5331 * server.c (handle_query): Report support for tracenz.
5333 2011-11-02 Yao Qi <yao@codesourcery.com>
5335 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5337 2011-11-02 Yao Qi <yao@codesourcery.com>
5339 * target.h: Fix a typo in comment.
5341 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5343 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5344 clobber the breakpoints' shadows with fast tracepoint jumps.
5345 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5346 * target.c (write_inferior_memory): Also pass MYADDR down to
5349 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5351 * configure.ac: Check support for personality routine.
5352 * configure: Regenerate.
5353 * config.in: Likewise.
5354 * linux-low.c: Include <sys/personality.h>.
5355 Define ADDR_NO_RANDOMIZE if necessary.
5356 (linux_create_inferior): Disable address space randomization when
5357 forking inferior, if requested.
5358 (linux_supports_disable_randomization): New function.
5359 (linux_target_ops): Install it.
5360 * server.h (disable_randomization): Declare.
5361 * server.c (disable_randomization): New global variable.
5362 (handle_general_set): Handle QDisableRandomization.
5363 (handle_query): Likewise for qSupported.
5364 (main): Support --disable-randomization and --no-disable-randomization
5365 command line arguments.
5366 * target.h (struct target_ops): Add supports_disable_randomization.
5367 (target_supports_disable_randomization): New macro.
5369 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5371 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5373 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5374 [!PT_GETDSBT] (target_loadmap): New definition.
5375 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5376 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5377 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5378 and PT_GETDSBT to LINUX_LOADMAP.
5379 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5380 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5382 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5384 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5385 (arm_linux_hwbp_cap): New static variable.
5386 (arm_linux_get_hwbp_cap): Replace by ...
5387 (arm_linux_init_hwbp_cap): ... this new function.
5388 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5389 (arm_linux_get_hw_watchpoint_count): Likewise.
5390 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5391 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5392 (arm_prepare_to_resume): Use perror_with_name instead of error.
5394 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5396 * linux-arm-low.c: Include <signal.h>.
5397 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5398 (struct arm_linux_hwbp_cap): New data type.
5399 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5400 (struct arm_linux_hw_breakpoint): New data type.
5401 (MAX_BPTS, MAX_WPTS): Define.
5402 (struct arch_process_info, struct arch_lwp_info): New data types.
5403 (arm_linux_get_hwbp_cap): New function.
5404 (arm_linux_get_hw_breakpoint_count): Likewise.
5405 (arm_linux_get_hw_watchpoint_count): Likewise.
5406 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5407 (arm_hwbp_control_initialize): Likewise.
5408 (arm_hwbp_control_is_enabled): Likewise.
5409 (arm_hwbp_control_is_initialized): Likewise.
5410 (arm_hwbp_control_disable): Likewise.
5411 (arm_linux_hw_breakpoint_equal): Likewise.
5412 (arm_linux_hw_point_initialize): Likewise.
5413 (struct update_registers_data): New data structure.
5414 (update_registers_callback: New function.
5415 (arm_insert_point): Likewise.
5416 (arm_remove_point): Likewise.
5417 (arm_stopped_by_watchpoint): Likewise.
5418 (arm_stopped_data_address): Likewise.
5419 (arm_new_process): Likewise.
5420 (arm_new_thread): Likewise.
5421 (arm_prepare_to_resume): Likewise.
5422 (the_low_target): Register arm_insert_point, arm_remove_point,
5423 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5424 arm_new_thread, and arm_prepare_to_resume.
5426 2011-09-15 Stan Shebs <stan@codesourcery.com>
5428 * server.h (struct emit_ops): Add compare-goto fields.
5429 * tracepoint.c (gdb_agent_op_sizes): New table.
5430 (emit_eq_goto): New function.
5431 (emit_ne_goto): New function.
5432 (emit_lt_goto): New function.
5433 (emit_le_goto): New function.
5434 (emit_gt_goto): New function.
5435 (emit_ge_goto): New function.
5436 (is_goto_target): New function.
5437 (compile_bytecodes): Recognize special cases of compare-goto
5438 combinations and call specialized emitters for them.
5439 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5440 (amd64_emit_ne_goto): New function.
5441 (amd64_emit_lt_goto): New function.
5442 (amd64_emit_le_goto): New function.
5443 (amd64_emit_gt_goto): New function.
5444 (amd64_emit_ge_goto): New function.
5445 (amd64_emit_ops): Add the new functions.
5446 (i386_emit_eq_goto): New function.
5447 (i386_emit_ne_goto): New function.
5448 (i386_emit_lt_goto): New function.
5449 (i386_emit_le_goto): New function.
5450 (i386_emit_gt_goto): New function.
5451 (i386_emit_ge_goto): New function.
5452 (i386_emit_ops): Add the new functions.
5454 2011-09-08 Stan Shebs <stan@codesourcery.com>
5456 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5457 (i386_emit_epilogue): Restore %ebx.
5459 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5461 * server.c (step_thread): Remove definition.
5462 (process_serial_event): Don't handle Hs.
5463 * server.h (step_thread): Remove declaration.
5464 * target.c (set_desired_inferior): Remove use of step_thread.
5466 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5468 * linux-low.c: Include linux-procfs.h.
5469 (linux_attach_lwp_1): Update comments.
5470 (linux_attach): Scan for existing threads when attaching to a
5471 process that is the tgid.
5472 * Makefile.in: Update dependencies.
5474 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5476 * configure.srv: Add linux-procfs.o dependencies.
5478 2011-08-14 Yao Qi <yao@codesourcery.com>
5480 * target.h (struct target_ops): Fix indent.
5481 * win32-low.c (win32_target_ops): Fix comment.
5483 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5484 Yao Qi <yao@codesourcery.com>
5486 * Makefile.in (clean): Remove tic6x-*.c files.
5487 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5488 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5489 (tic6x-c64xp-linux.c): Likewise.
5490 * configure.srv: Add support for tic6x-*-uclinux.
5491 * linux-tic6x-low.c: New.
5492 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5494 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5495 Yao Qi <yao@codesourcery.com>
5497 * target.h (struct target_ops): Add read_loadmap.
5498 * linux-low.c (struct target_loadseg): New type.
5499 (struct target_loadmap): New type.
5500 (linux_read_loadmap): New function.
5501 (linux_target_ops): Add linux_read_loadmap.
5502 * server.c (handle_query): Support qXfer:fdpic:read packet.
5503 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5506 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5508 * win32-low.c: Include <stdint.h>.
5510 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5512 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5513 to the inferior here.
5514 (i386_remove_aligned_watchpoint): Ditto.
5515 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5516 fit part of the watchpoint in the debug registers.
5517 (i386_update_inferior_debug_regs): New.
5518 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5519 registers, and only update the inferior on success.
5520 (i386_low_remove_watchpoint): Ditto.
5522 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5524 * linux-low.c (compare_ints, unique, list_threads, show_process,
5525 linux_core_of_thread): Delete.
5526 (linux_target_ops): Change linux_core_of_thread to
5527 linux_common_core_of_thread.
5528 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5529 * utils.c (malloc_failure): Change type of argument.
5530 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5531 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5532 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5533 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5534 (IPA_OBJS): Add common-utils-ipa.o.
5535 (ptid_h, linux_osdata_h): New macros.
5536 (server_h): Add common/common-utils.h, common/xml-utils.h,
5537 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5539 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5540 ptid.o, buffer.o): New rules.
5541 (linux-low.o): Add common/linux-osdata.h as a dependency.
5542 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5543 * configure.ac: Add AC_HEADER_DIRENT check.
5544 * config.in: Regenerate.
5545 * configure: Regenerate.
5546 * remote-utils.c (xml_escape_text): Delete.
5547 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5548 buffer_xml_printf): Move to common/buffer.c.
5549 * server.c (main): Remove call to initialize_inferiors.
5550 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5551 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5552 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5553 internal_error, gdb_assert, gdb_assert_fail): Delete.
5554 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5555 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5557 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5558 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5559 initialize_inferiors): Delete.
5561 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5563 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5566 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5568 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5570 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5572 2011-05-26 Yao Qi <yao@codesourcery.com>
5574 * Makefile.in (thread-db.o): Track dependence to
5575 common/gdb_thread_db.h.
5576 * thread-db.c: include gdb_thread_db.h from right place.
5578 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5580 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5581 __FILE__ and __LINE__ to internal_error.
5583 2011-05-13 Doug Evans <dje@google.com>
5585 * thread-db.c (try_thread_db_load_from_sdir): New function.
5586 (try_thread_db_load_from_dir): New function.
5587 (thread_db_load_search): Handle $sdir, ignore $pdir.
5588 Remove trying of system directories if search of
5589 libthread-db-search-path fails, that is now done via $sdir.
5591 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5593 * server.c (handle_query): Add EnableDisableTracepoints to the list
5594 of supported features.
5595 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5597 (cmd_qtenable_disable): New.
5598 (cmd_qtstart): Install tracepoints even if disabled.
5599 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5600 receiving a QTEnable or QTDisable packet.
5601 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5602 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5604 (gdb_probe): Skip data collection if static tracepoint is disabled.
5606 2011-05-10 Doug Evans <dje@google.com>
5608 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5610 2011-05-04 Doug Evans <dje@google.com>
5612 * linux-low.c (linux_join): Skip process lookup.
5613 * spu-low.c (spu_join): Ditto.
5614 * server.c (join_inferiors_callback): Delete.
5615 (process_serial_event): For 'D' packet (detach) call join_inferior
5618 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5620 * README: Don't mention xscale*-*-linux*.
5621 * configure.srv (xscale*-*-linux*): Don't handle target.
5623 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5625 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5627 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5628 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5629 (i386_emit_void_call_2): Likewise.
5631 2011-04-26 Yao Qi <yao@codesourcery.com>
5633 * linux-low.c: Move common macros to linux-ptrace.h.
5634 Include linux-ptrace.h.
5635 * Makefile.in (linux_ptrace_h): New.
5636 (linux-low.o): Depends on linux-ptrace.h.
5638 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5640 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5641 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5642 (remote_prepare): New function with most of the TCP code from ...
5643 (remote_open): ... here. Detect PORT here unconditionally. Move also
5644 setting transport_is_reliable.
5645 * server.c (run_once): New variable.
5646 (gdbserver_usage): Document it.
5647 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5648 the first run if RUN_ONCE.
5649 * server.h (run_once, remote_prepare): New declarations.
5651 2011-04-19 Tom Tromey <tromey@redhat.com>
5653 * win32-low.c (handle_load_dll): Remove duplicate "the".
5655 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5657 Remove support for old Cygwin 1.5 versions.
5658 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5659 function to avoid warning.
5660 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5663 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5665 * gdbserver/server.h (Macro _): Define it if not available.
5667 2011-03-14 Michael Snyder <msnyder@vmware.com>
5669 * hostio.c (handle_close): Remove unnecessary null test.
5671 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5673 * Makefile.in (maintainer-clean realclean distclean): Remove
5674 "make ... subdir_do" command.
5676 2011-03-10 Michael Snyder <msnyder@vmware.com>
5678 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5680 * server.c (handle_v_run): Free alloced buffer on early return.
5682 2011-03-09 Yao Qi <yao@codesourcery.com>
5685 2011-03-04 Yao Qi <yao@codesourcery.com>
5687 * Makefile.in: Remove GNU make feature --directory.
5689 2011-03-05 Yao Qi <yao@codesourcery.com>
5691 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5692 (subdir_do): New make target. Copied from gdb/Makefile.
5693 (maintainer-clean, realclean, distclean, clean): Call corresponding
5694 make targets in common/Makefile.
5696 2011-02-11 Yao Qi <yao@codesourcery.com>
5698 * configure.ac: Call AC_PROG_RANLIB.
5699 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5700 * configure: Regenerate.
5702 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5704 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5706 2011-03-06 Yao Qi <yao@codesourcery.com>
5708 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5710 2011-03-05 Yao Qi <yao@codesourcery.com>
5712 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5713 (subdir_do): New make target. Copied from gdb/Makefile.
5714 (maintainer-clean, realclean, distclean, clean): Call corresponding
5715 make targets in common/Makefile.
5717 2011-03-04 Yao Qi <yao@codesourcery.com>
5719 * Makefile.in: Remove GNU make feature --directory.
5721 2011-03-04 Michael Snyder <msnyder@vmware.com>
5723 * server.c (queue_stop_reply): Call xmalloc not malloc.
5725 2011-03-02 Michael Snyder <msnyder@vmware.com>
5727 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5729 2011-02-28 Michael Snyder <msnyder@vmware.com>
5731 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5732 (cmd_qtframe): Ditto.
5733 (cmd_qtbuffer): Ditto.
5734 (cmd_bigqtbuffer): Ditto.
5736 * utils.c (decimal2str): Initialize 'width' to nine, then
5739 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5741 * hostio.c (require_data): Free *data, not data.
5743 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5745 * hostio.c (require_data): Use free, not xfree.
5747 2011-02-27 Michael Snyder <msnyder@vmware.com>
5749 * server.c (handle_query): Discard unused value.
5751 * hostio.c (require_data): Free malloc memory before returning
5754 2011-02-26 Michael Snyder <msnyder@vmware.com>
5756 * linux-low.c (list_threads): Call closedir for dirent.
5758 2011-02-27 Michael Snyder <msnyder@vmware.com>
5760 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5761 a case statement falls through.
5763 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5765 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5768 2011-02-26 Michael Snyder <msnyder@vmware.com>
5770 * utils.c (decimal2str): Eliminate dead code and dead param.
5771 (pulongest): Drop dead param from call to decimal2str.
5774 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5776 Revert the following patch (not approved yet):
5777 2011-02-21 Hui Zhu <teawater@gmail.com>
5778 * tracepoint.c (tp_printf): New function.
5779 (eval_agent_expr): Handle gdb_agent_op_printf.
5781 2011-02-21 Hui Zhu <teawater@gmail.com>
5783 * tracepoint.c (tp_printf): New function.
5784 (eval_agent_expr): Handle gdb_agent_op_printf.
5786 2011-02-18 Tom Tromey <tromey@redhat.com>
5788 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5789 (tracepoint.o): Likewise.
5790 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5791 (gdb_agent_op_names): Likewise.
5793 2011-02-18 Tom Tromey <tromey@redhat.com>
5795 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5796 gdb_agent_op_rot>: New constants.
5797 (gdb_agent_op_names): Add pick and roll.
5798 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5801 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5803 * aclocal.m4: Regenerated with aclocal-1.11.1.
5805 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5807 * server.c (handle_qxfer_traceframe_info): New.
5808 (qxfer_packets): Register "traceframe-info".
5809 (handle_query): Report support for qXfer:traceframe-info:read+.
5810 * tracepoint.c (match_blocktype): New.
5811 (traceframe_find_block_type): Rename to ...
5812 (traceframe_walk_blocks): ... this. Add callback filter argument,
5814 (traceframe_find_block_type): New, reimplemented on top of
5815 traceframe_walk_blocks.
5816 (build_traceframe_info_xml): New.
5817 (traceframe_read_info): New.
5818 * server.h (traceframe_read_info): Declare.
5820 2011-02-11 Yao Qi <yao@codesourcery.com>
5822 * configure.ac: Call AC_PROG_RANLIB.
5823 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5824 * configure: Regenerate.
5826 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5828 * server.c (gdb_read_memory): Change return semantics to allow
5830 (handle_search_memory_1): Adjust.
5831 (process_serial_event) <'m' packet>: Handle partial transfers.
5832 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5834 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5836 * regcache.c (init_register_cache): Initialize
5837 regcache->register_status.
5838 (free_register_cache): Release regcache->register_status.
5839 (regcache_cpy): Copy register_status.
5840 (registers_to_string): Print 'x's for unavailable registers.
5841 (supply_register): Mark the register's status valid or
5842 unavailable, depending on whether a buffer was passed in or not.
5843 (supply_register_zeroed): New.
5844 (supply_regblock): Mark the registers' status valid or
5845 unavailable, depending on whether a buffer was passed in or not.
5846 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5847 (struct regcache): New `register_status' field.
5848 (supply_register_zeroed): Declare.
5849 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5850 supply_register_zeroed, rather than passing a NULL buffer to
5852 * tracepoint.c (fetch_traceframe_registers): Update comment.
5854 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5856 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5859 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5861 * server.h (decode_xfer_write): Change prototype.
5862 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5863 and don't extract the annex here.
5864 * server.c (decode_xfer_read): Remove `annex' parameter,
5865 and don't extract the annex here.
5867 (struct qxfer): New.
5868 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5869 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5870 (handle_qxfer_statictrace): New functions, abstracted out from
5871 handle_query, and made to use the struct qxfer interface.
5872 (handle_threads_qxfer_proper): Rename to ...
5873 (handle_qxfer_threads_proper): ... this.
5874 (handle_threads_qxfer): Rename to ...
5875 (handle_qxfer_threads): ... this. Adjust.
5876 (qxfer_packets): New array.
5877 (handle_qxfer): New function.
5878 (handle_query): Use handle_qxfer.
5880 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5882 * gdbreplay.c: Shorten lines of >= 80 columns.
5883 * linux-low.c: Ditto.
5884 * linux-ppc-low.c: Ditto.
5885 * linux-s390-low.c: Ditto.
5886 * linux-sparc-low.c: Ditto.
5887 * linux-x86-low.c: Ditto.
5888 * linux-xtensa-low.c: Ditto.
5889 * mem-break.c: Ditto.
5891 * regcache.h: Ditto.
5892 * remote-utils.c: Ditto.
5895 * thread-db.c: Ditto.
5896 * tracepoint.c: Ditto.
5898 * win32-low.h: Ditto.
5900 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5902 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5905 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5907 * server.c (gdbserver_version): Update copyright year in version
5909 * gdbreplay.c (gdbreplay_version): Ditto.
5911 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5913 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5914 * linux-bfin-low.c: New file.
5915 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5916 PT_DATA_ADDR for BFIN targets.
5917 * Makefile.in (SFILES): Add linux-bfin-low.c.
5918 (clean): Remove reg-bfin.c.
5919 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5920 * README: Mention supported Blackfin targets.
5922 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5924 * .gitignore: New file.
5926 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5928 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5930 2010-10-22 Jie Zhang <jie@codesourcery.com>
5932 * Makefile.in: Add FLAGS_TO_PASS variable.
5933 (install): Remove dependency of install-only and recursively
5934 invoke make for install-only.
5936 2010-10-04 Doug Evans <dje@google.com>
5938 * Makefile.in (uninstall): Use $(DESTDIR).
5940 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5944 * linux-x86-low.c (compat_siginfo_from_siginfo)
5945 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5946 si_code is < 0. Check for si_code == SI_TIMER before checking for
5949 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5951 * lynx-i386-low.c: New file.
5952 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5954 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5956 * lynx-low.c (ptrace_request_to_str): Remove handling for
5957 request values that have been removed in LynxOS 5.x.
5959 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5961 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5964 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5966 * configure.ac: Add --enable-inprocess-agent option.
5967 * configure: Rebuilt.
5969 2010-09-06 Yao Qi <yao@codesourcery.com>
5971 * linux-low.c (linux_kill): Remove unused variable.
5972 (linux_stabilize_threads): Likewise.
5973 * server.c (start_inferior): Likewise.
5974 (queue_stop_reply_callback): Likewise.
5975 * tracepoint.c (do_action_at_tracepoint): Likewise.
5977 2010-09-06 Yao Qi <yao@codesourcery.com>
5979 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5982 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5984 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5986 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5988 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5991 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5993 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5994 gdbserver/lynx-ppc-low.c: New files.
5995 * Makefile.in (lynx_low_h): New variable.
5996 (lynx-low.o, lynx-ppc-low.o): New rules.
5997 * configure.ac: On LynxOS, link with -lnetinet.
5998 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5999 * configure: regenerate.
6001 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6003 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6004 * configure.ac: Add check for vasprintf and vsnprintf.
6005 * configure, config.in: Regenerate.
6006 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6008 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6010 * gdbreplay.c: Move include of alloca.h up, next to include of
6012 * server.h: Add include of malloc.h.
6013 * mem-break.c: Remove include of malloc.h.
6014 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6016 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6018 * Makefile.in (memmem.o): Build with -Wno-error.
6020 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6022 * utils.c (xsnprintf): Make non-static.
6023 * server.h: Add xsnprintf declaration.
6024 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6025 replace calls to snprintf by calls to xsnprintf throughout.
6027 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6029 * configure.ac: Add configure check for alloca.
6030 * configure, config.in: Regenerate.
6031 * server.h: Include alloca.h if it exists.
6032 * gdbreplay.c: Include alloca.h if it exists.
6034 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6036 * linux-low.c (__SIGRTMIN): Define if not already defined.
6037 (linux_create_inferior): Check for __ANDROID__ rather than
6039 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6040 are already deferred.
6041 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6042 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6043 stopped and already has a pending signal to report.
6044 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6045 a pending signal to report or is moving out of a jump pad.
6046 (linux_init_signals): Check for __ANDROID__ rather than
6049 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6051 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6052 debug_threads check. Avoid a linear search when not doing debug
6055 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6057 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6058 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6059 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6060 (process_event): Change local fd's type to gdb_fildes_t.
6061 (create_file_handler): Adjust prototype.
6062 (delete_file_handler): Adjust prototype.
6063 (handle_file_event): Adjust prototype. Use pfildes.
6064 (create_file_event): Adjsut prototype.
6065 * remote-utils.c (remote_desc, listen_desc): Change type to
6067 * server.h: New gdb_fildes_t typedef.
6068 [USE_WIN32API]: Include winsock2.h.
6069 (delete_file_handler, add_file_handler): Adjust prototypes.
6071 * utils.c (pfildes): New.
6073 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6075 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6076 * configure: Regenerate.
6078 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6080 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6081 (linux_done_accessing_memory): ... this.
6082 (linux_target_ops): Adjust.
6083 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6084 * nto-low.c (nto_target_ops): Adjust comment.
6085 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6086 * spu-low.c (spu_target_ops): Adjust comment.
6087 * target.h (target_ops): Rename unprepare_to_access_memory field
6088 to done_accessing_memory.
6089 (unprepare_to_access_memory): Rename to ...
6090 (done_accessing_memory): ... this.
6092 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6094 * linux-low.c (linux_prepare_to_access_memory): New.
6095 (linux_unprepare_to_access_memory): New.
6096 (linux_target_ops): Install them.
6097 * server.c (read_memory): Rename to ...
6098 (gdb_read_memory): ... this. Use
6099 prepare_to_access_memory/prepare_to_access_memory.
6100 (write_memory): Rename to ...
6101 (gdb_write_memory): ... this. Use
6102 prepare_to_access_memory/prepare_to_access_memory.
6103 (handle_search_memory_1): Adjust.
6104 (process_serial_event): Adjust.
6105 * target.h (struct target_ops): New fields
6106 prepare_to_access_memory and unprepare_to_access_memory.
6107 (prepare_to_access_memory, unprepare_to_access_memory): New.
6108 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6109 prepare_to_access_memory/prepare_to_access_memory.
6110 * nto-low.c (nto_target_ops): Adjust.
6111 * spu-low.c (spu_target_ops): Adjust.
6112 * win32-low.c (win32_target_ops): Adjust.
6114 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6116 * Makefile.in (WARN_CFLAGS): Get it from configure.
6117 (WERROR_CFLAGS): New.
6118 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6119 * configure.ac: Introduce --enable-werror, which adds -Werror to
6120 the compiler command line. Enabled by default. Disable with
6121 --disable-werror. Add -Wdeclaration-after-statement
6122 Wpointer-arith and -Wformat-nonliteral to warning flags.
6123 * configure: Regenerate.
6125 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6127 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6129 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6131 * gdbreplay.c (remote_error): New.
6133 (expect): Use gdbchar. Check for error reading from GDB.
6134 Clarify sync error output.
6135 (play): Check for errors writing to GDB.
6136 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6137 * remote-utils.c (getpkt): Check for errors writing to the remote
6140 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6142 * linux-low.c (linux_wait_1): Move non-debugging code out of
6143 `debug_threads' control.
6145 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6147 * linux-low.c (linux_wait_1): Don't set last_status here.
6148 * server.c (push_event, queue_stop_reply_callback): Assert we're
6149 not pushing a TARGET_WAITKIND_IGNORE event.
6150 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6151 (myresume, handle_target_event): Set the thread's last_resume_kind
6152 and last_status from the target returned status.
6154 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6158 * linux-x86-low.c (update_debug_registers_callback): New.
6159 (i386_dr_low_set_addr): Use it.
6160 (i386_dr_low_get_addr): New.
6161 (i386_dr_low_set_control): Use update_debug_registers_callback.
6162 (i386_dr_low_get_control): New.
6163 (i386_dr_low_get_status): Adjust.
6164 * linux-low.c (linux_stop_lwp): New.
6165 * linux-low.h (linux_stop_lwp): Declare.
6167 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6168 argument instead of a i386_debug_reg_state.
6169 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6170 a i386_debug_reg_state.
6171 (i386_insert_aligned_watchpoint): Adjust.
6172 (i386_remove_aligned_watchpoint): Adjust.
6173 (i386_low_stopped_data_address): Read the debug registers from the
6174 inferior instead of from the mirrors.
6175 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6176 (i386_dr_low_get_addr): Declare.
6177 (i386_dr_low_get_control): Declare.
6178 (i386_dr_low_get_status): Change prototype.
6180 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6181 (i386_dr_low_get_addr): New.
6182 (i386_dr_low_get_control): New.
6183 (i386_dr_low_get_status): Adjust prototype. Return
6185 (i386_initial_stuff): Clear dr_status_mirror and
6187 (i386_get_thread_context): Adjust.
6188 (i386_set_thread_context): Adjust.
6189 (i386_thread_added): Adjust.
6191 2010-08-24 Pedro Alves <pedro@codesourcery.com>
6193 * linux-low.h (linux_thread_area): Delete declaration.
6195 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6197 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6198 after its termination.
6200 2010-08-09 Pedro Alves <pedro@codesourcery.com>
6202 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6203 (gdb_wants_all_stopped): Delete.
6204 (linux_wait_1): Don't call them.
6205 * server.c (handle_v_cont): Tag all threads as want-stopped.
6206 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6207 stopped as "client-wants-stopped".
6209 2010-07-31 Pedro Alves <pedro@codesourcery.com>
6211 * Makefile.in (signals_h): New.
6212 (server_h): Depend on it.
6213 (server.o): Don't depend on $(signals_def).
6214 (signals.o): Depend on $(signals_def).
6216 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6218 * Makefile.in (signals_def): New.
6219 (server_h): Append include/gdb/signals.h and signals_def.
6220 (server.o): Append signals_def.
6222 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6224 * server.c (handle_target_event): Use target_signal_to_host for
6225 resume_info.sig initialization.
6226 * target.h (struct thread_resume) <sig>: New comment.
6228 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6230 * server.c (handle_query): strcpy() the returned string from paddress()
6231 instead of sprintf().
6232 * utils.c (paddress): Return phex_nz().
6234 2010-07-07 Joel Brobecker <brobecker@adacore.com>
6236 * server.c (handle_v_cont): Call mourn_inferior if process
6238 (myresume): Likewise.
6240 2010-07-01 Pedro Alves <pedro@codesourcery.com>
6242 Static tracepoints, and integration with UST.
6244 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6245 * mem-break.c (uninsert_all_breakpoints)
6246 (reinsert_all_breakpoints): New.
6247 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6248 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6249 (gdb_agent_ust_loaded, helper_thread_id)
6250 (gdb_agent_helper_thread_id): New macros.
6251 (struct ipa_sym_addresses): Add addr_ust_loaded,
6252 addr_helper_thread_id, addr_cmd_buf.
6253 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6254 (in_process_agent_loaded_ust): New.
6255 (write_e_ust_not_loaded): New.
6256 (maybe_write_ipa_ust_not_loaded): New.
6257 (struct collect_static_trace_data_action): New.
6258 (enum tracepoint_type) <static_tracepoint>: New.
6259 (struct tracepoint) <handle>: Mention static tracepoints.
6260 (struct static_tracepoint_ctx): New.
6261 (CMD_BUF_SIZE): New.
6262 (add_tracepoint_action): Handle static tracepoint actions.
6263 (unprobe_marker_at): New.
6264 (clear_installed_tracepoints): Handle static tracepoints.
6265 (cmd_qtdp): Handle static tracepoints.
6266 (probe_marker_at): New.
6267 (cmd_qtstart): Handle static tracepoints.
6268 (response_tracepoint): Handle static tracepoints.
6269 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6270 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6271 (get_context_regcache): Handle static tracepoints.
6272 (do_action_at_tracepoint): Handle static tracepoint actions.
6273 (traceframe_find_block_type): Handle static trace data blocks.
6274 (traceframe_read_sdata): New.
6275 (download_tracepoints): Download static tracepoint actions.
6276 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6277 (GDB_PROBE_NAME): New.
6282 (ust_marker_to_static_tracepoint): New.
6284 (collect_ust_data_at_tracepoint): New.
6285 (gdb_ust_probe): New.
6286 (UNIX_PATH_MAX, SOCK_DIR): New.
6287 (gdb_ust_connect_sync_socket): New.
6288 (resume_thread, stop_thread): New.
6289 (run_inferior_command): New.
6290 (init_named_socket): New.
6291 (gdb_ust_socket_init): New.
6292 (cstr_to_hexstr): New.
6294 (first_marker, next_marker): New.
6295 (response_ust_marker): New.
6296 (cmd_qtfstm, cmd_qtsstm): New.
6297 (unprobe_marker_at, probe_marker_at): New.
6298 (cmd_qtstmat, gdb_ust_thread): New.
6299 (gdb_ust_init): New.
6300 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6301 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6303 (x86_64_st_collect_regmap): New.
6304 (X86_64_NUM_ST_COLLECT_GREGS): New.
6305 (AMD64_RIP_REGNUM): New.
6306 (supply_static_tracepoint_registers): New.
6307 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6309 (i386_st_collect_regmap): New.
6310 (i386_NUM_ST_COLLECT_GREGS): New.
6311 (supply_static_tracepoint_registers): New.
6312 * server.c (handle_query): Handle qXfer:statictrace:read.
6313 <qSupported>: Report support for StaticTracepoints, and
6314 qXfer:statictrace:read features.
6315 * server.h (traceframe_read_sdata)
6316 (supply_static_tracepoint_registers): Declare.
6317 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6318 (unpack_varlen_hex): Include in IPA build.
6319 * Makefile.in (ustlibs, ustinc): New.
6320 (IPA_OBJS): Add remote-utils-ipa.o.
6321 ($(IPA_LIB)): Link -ldl and -lpthread.
6323 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6324 * config.in, configure: Regenerate.
6326 2010-06-20 Ian Lance Taylor <iant@google.com>
6327 Pedro Alves <pedro@codesourcery.com>
6329 * linux-x86-low.c (always_true): Delete.
6330 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6331 trying to fool the compiler with always_true.
6333 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6335 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6336 conditions in gdbserver.
6338 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6340 * spu-low.c (spu_read_memory): Wrap around local store limit.
6341 (spu_write_memory): Likewise.
6343 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6345 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6346 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6348 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6350 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6351 uses with LONGEST uses.
6353 2010-06-14 Stan Shebs <stan@codesourcery.com>
6354 Pedro Alves <pedro@codesourcery.com>
6358 * linux-x86-low.c: Include limits.h.
6363 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6364 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6365 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6366 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6367 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6368 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6369 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6370 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6371 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6372 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6373 (amd64_emit_void_call_2): New.
6374 (amd64_emit_ops): New.
6375 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6376 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6377 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6378 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6379 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6380 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6381 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6382 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6383 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6384 (i386_emit_stack_adjust, i386_emit_int_call_1)
6385 (i386_emit_void_call_2): New.
6386 (i386_emit_ops): New.
6387 (x86_emit_ops): New.
6388 (the_low_target): Install x86_emit_ops.
6389 * server.h (struct emit_ops): New.
6390 (get_raw_reg_func_addr): Declare.
6391 (current_insn_ptr, emit_error): Declare.
6392 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6393 (set_trace_state_variable_value): New defines.
6394 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6395 addr_get_trace_state_variable_value and
6396 addr_set_trace_state_variable_value.
6397 (symbol_list): New fields for get_raw_reg,
6398 get_trace_state_variable_value and set_trace_state_variable_value.
6399 (condfn): New typedef.
6400 (struct tracepoint): New field `compiled_cond'.
6401 (do_action_at_tracepoint): Clear compiled_cond.
6402 (get_trace_state_variable_value, set_trace_state_variable_value):
6404 (condition_true_at_tracepoint): If there's a compiled condition,
6406 (current_insn_ptr, emit_error): New globals.
6407 (struct bytecode_address): New.
6408 (get_raw_reg_func_addr): New.
6409 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6410 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6411 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6412 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6413 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6414 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6415 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6416 (compile_tracepoint_condition, compile_bytecodes): New.
6417 * target.h (emit_ops): Forward declare.
6418 (struct target_ops): New field emit_ops.
6419 (target_emit_ops): New.
6420 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6421 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6422 * linux-low.c (linux_emit_ops): New.
6423 (linux_target_ops): Install it.
6424 * linux-low.h (struct linux_target_ops): New field emit_ops.
6426 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6428 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6429 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6431 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6432 Stan Shebs <stan@codesourcery.com>
6434 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6435 (all): Depend on $(extra_libraries).
6436 (install-only): Install the IPA.
6437 (IPA_OBJS, IPA_LIB): New.
6438 (clean): Remove the IPA lib.
6439 (IPAGENT_CFLAGS): New.
6440 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6441 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6442 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6443 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6444 * configure.ac: Check for atomic builtins support in the compiler.
6445 (IPA_DEPFILES, extra_libraries): Define.
6446 * configure.srv (ipa_obj): Add description.
6447 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6448 (i[34567]86-*-linux*): Set ipa_obj.
6449 (x86_64-*-linux*): Set ipa_obj.
6450 * linux-low.c (stabilizing_threads): New.
6451 (supports_fast_tracepoints): New.
6452 (linux_detach): Stabilize threads before detaching.
6453 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6454 the lwp is either not stabilizing, or is moving out of a jump pad.
6455 (linux_fast_tracepoint_collecting): New.
6456 (maybe_move_out_of_jump_pad): New.
6457 (enqueue_one_deferred_signal): New.
6458 (dequeue_one_deferred_signal): New.
6459 (linux_wait_for_event_1): If moving out of a jump pad, defer
6460 pending signals to later.
6461 (linux_stabilize_threads): New.
6462 (linux_wait_1): Check if threads need moving out of jump pads, and
6464 (stuck_in_jump_pad_callback): New.
6465 (move_out_of_jump_pad_callback): New.
6467 (linux_resume_one_lwp): Handle moving out of jump pads.
6468 (linux_set_resume_request): Dequeue deferred signals.
6469 (need_step_over_p): Also step over fast tracepoint jumps.
6470 (start_step_over): Also uninsert fast tracepoint jumps.
6471 (finish_step_over): Also reinsert fast tracepoint jumps.
6472 (linux_install_fast_tracepoint_jump): New.
6473 (linux_target_ops): Install linux_stabilize_threads and
6474 linux_install_fast_tracepoint_jump_pad.
6475 * linux-low.h (linux_target_ops) <get_thread_area,
6476 install_fast_tracepoint_jump_pad>: New fields.
6477 (struct lwp_info) <collecting_fast_tracepoint,
6478 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6479 (linux_get_thread_area): Declare.
6480 * linux-x86-low.c (jump_insn): New.
6481 (x86_get_thread_area): New.
6482 (append_insns): New.
6484 (amd64_install_fast_tracepoint_jump_pad): New.
6485 (i386_install_fast_tracepoint_jump_pad): New.
6486 (x86_install_fast_tracepoint_jump_pad): New.
6487 (the_low_target): Install x86_get_thread_area and
6488 x86_install_fast_tracepoint_jump_pad.
6489 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6490 (struct fast_tracepoint_jump): New.
6491 (fast_tracepoint_jump_insn): New.
6492 (fast_tracepoint_jump_shadow): New.
6493 (find_fast_tracepoint_jump_at): New.
6494 (fast_tracepoint_jump_here): New.
6495 (delete_fast_tracepoint_jump): New.
6496 (set_fast_tracepoint_jump): New.
6497 (uninsert_fast_tracepoint_jumps_at): New.
6498 (reinsert_fast_tracepoint_jumps_at): New.
6499 (set_breakpoint_at): Use write_inferior_memory.
6500 (uninsert_raw_breakpoint): Use write_inferior_memory.
6501 (check_mem_read): Mask out fast tracepoint jumps.
6502 (check_mem_write): Mask out fast tracepoint jumps.
6503 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6504 (set_fast_tracepoint_jump): Declare.
6505 (delete_fast_tracepoint_jump)
6506 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6507 (reinsert_fast_tracepoint_jumps_at): Declare.
6508 * regcache.c: Don't compile many functions when building the
6509 in-process agent library.
6510 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6511 the register buffer in the heap.
6512 (free_register_cache): If the register buffer isn't owned by the
6513 regcache, don't free it.
6514 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6515 pre-existing register caches.
6516 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6518 (convert_ascii_to_int): : Constify `from' parameter type.
6519 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6520 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6521 the needed buffer in-place.
6522 (relocate_instruction): New.
6523 * server.c (handle_query) <qSymbols>: If the target supports
6524 tracepoints, give it a chance of looking up symbols. Report
6525 support for fast tracepoints.
6526 (handle_status): Stabilize threads.
6527 (process_serial_event): Adjust.
6528 * server.h (struct fast_tracepoint_jump): Forward declare.
6529 (struct process_info) <fast_tracepoint_jumps>: New field.
6530 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6531 (decode_X_packet, decode_M_packet): Adjust.
6532 (relocate_instruction): Declare.
6533 (in_process_agent_loaded): Declare.
6534 (tracepoint_look_up_symbols): Declare.
6535 (struct fast_tpoint_collect_status): Declare.
6536 (fast_tracepoint_collecting): Declare.
6537 (force_unlock_trace_buffer): Declare.
6538 (handle_tracepoint_bkpts): Declare.
6539 (initialize_low_tracepoint)
6540 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6541 * target.h (struct target_ops) <stabilize_threads,
6542 install_fast_tracepoint_jump_pad>: New fields.
6543 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6544 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6545 [HAVE_STDINT_H]: Include stdint.h.
6546 (trace_debug_1): Rename to ...
6547 (trace_vdebug): ... this.
6548 (trace_debug): Rename to ...
6549 (trace_debug_1): ... this. Add `level' parameter.
6551 (ATTR_USED, ATTR_NOINLINE): New.
6552 (IP_AGENT_EXPORT): New.
6553 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6554 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6555 (about_to_request_buffer_space, trace_buffer_is_full)
6556 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6557 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6558 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6559 (traceframe_write_count, traceframes_created)
6560 (trace_state_variables)
6561 New renaming defines.
6562 (struct ipa_sym_addresses): New.
6563 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6565 (ipa_sym_addrs): New.
6566 (all_tracepoint_symbols_looked_up): New.
6567 (in_process_agent_loaded): New.
6568 (write_e_ipa_not_loaded): New.
6569 (maybe_write_ipa_not_loaded): New.
6570 (tracepoint_look_up_symbols): New.
6571 (debug_threads) [IN_PROCESS_AGENT]: New.
6572 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6573 (UNKNOWN_SIDE_EFFECTS): New.
6574 (stop_tracing): New.
6575 (flush_trace_buffer): New.
6576 (stop_tracing_bkpt): New.
6577 (flush_trace_buffer_bkpt): New.
6578 (read_inferior_integer): New.
6579 (read_inferior_uinteger): New.
6580 (read_inferior_data_pointer): New.
6581 (write_inferior_data_pointer): New.
6582 (write_inferior_integer): New.
6583 (write_inferior_uinteger): New.
6584 (struct collect_static_trace_data_action): Delete.
6585 (enum tracepoint_type): New.
6586 (struct tracepoint) <type>: New field `type'.
6587 <actions_str, step_actions, step_actions_str>: Only include in
6589 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6590 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6591 (tracepoints): Use IP_AGENT_EXPORT.
6592 (last_tracepoint): Don't include in the IPA.
6593 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6594 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6595 (alloced_trace_state_variables): New.
6596 (trace_state_variables): Use IP_AGENT_EXPORT.
6597 (traceframe_t): Delete unused variable.
6598 (circular_trace_buffer): Don't include in the IPA.
6599 (trace_buffer_start): Delete.
6600 (struct trace_buffer_control): New.
6601 (trace_buffer_free): Delete.
6602 (struct ipa_trace_buffer_control): New.
6603 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6604 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6606 (trace_buffer_ctrl): New.
6607 (TRACE_BUFFER_CTRL_CURR): New.
6608 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6609 Reimplement as macros.
6610 (trace_buffer_wrap): Delete.
6611 (traceframe_write_count, traceframe_read_count)
6612 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6613 (struct tracepoint_hit_ctx) <type>: New field.
6614 (struct fast_tracepoint_ctx): New.
6615 (memory_barrier): New.
6617 (record_tracepoint_error): Update atomically in the IPA.
6618 (clear_inferior_trace_buffer): New.
6619 (about_to_request_buffer_space): New.
6620 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6621 updating the same buffer.
6622 (add_tracepoint): Default the tracepoint's type to trap
6623 tracepoint, and orig_size to -1.
6624 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6626 (create_trace_state_variable): New parameter `gdb'. Handle it.
6627 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6628 (cmd_qtdp): Handle fast tracepoints.
6630 (max_jump_pad_size): New.
6631 (gdb_jump_pad_head): New.
6632 (get_jump_space_head): New.
6633 (claim_jump_space): New.
6634 (sort_tracepoints): New.
6635 (MAX_JUMP_SIZE): New.
6636 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6638 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6639 support. Upload fast traceframes, and delete internal IPA
6641 (stop_tracing_handler): New.
6642 (flush_trace_buffer_handler): New.
6643 (cmd_qtstop): Upload fast tracepoints.
6644 (response_tracepoint): Handle fast tracepoints.
6645 (tracepoint_finished_step): Upload fast traceframes. Set the
6646 tracepoint hit context's tracepoint type.
6647 (handle_tracepoint_bkpts): New.
6648 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6649 type. Add comment about fast tracepoints.
6650 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6651 non-existing action_str field.
6652 (get_context_regcache): Handle fast tracepoints.
6653 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6655 (fast_tracepoint_from_jump_pad_address): New.
6656 (fast_tracepoint_from_ipa_tpoint_address): New.
6657 (collecting_t): New.
6658 (force_unlock_trace_buffer): New.
6659 (fast_tracepoint_collecting): New.
6662 (write_inferior_data_ptr): New.
6663 (target_tp_heap): New.
6664 (target_malloc): New.
6665 (download_agent_expr): New.
6667 (download_tracepoints): New.
6668 (download_trace_state_variables): New.
6669 (upload_fast_traceframes): New.
6670 (IPA_FIRST_TRACEFRAME): New.
6671 (IPA_NEXT_TRACEFRAME_1): New.
6672 (IPA_NEXT_TRACEFRAME): New.
6673 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6674 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6675 (gdb_jump_pad_buffer_end): New.
6676 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6677 (initialize_tracepoint): Adjust.
6678 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6679 buffer. Initialize the low module.
6680 * utils.c (PREFIX, TOOLNAME): New.
6681 (malloc_failure): Use PREFIX.
6682 (error): In the IPA, an error causes an exit.
6683 (fatal, warning): Use PREFIX.
6684 (internal_error): Use TOOLNAME.
6685 (NUMCELLS): Increase to 10.
6686 * configure, config.in: Regenerate.
6688 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6690 * server.c (handle_query) <qSupported>: Do two passes over the
6691 qSupported string to avoid nesting strtok.
6693 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6695 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6697 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6699 * configure: Regenerate.
6700 * proc-service.list: New.
6702 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6704 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6707 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6709 * gdbreplay.c (remote_open): Check error return from socket() call by
6710 its equality to -1 not by it being negative.
6711 * remote-utils.c (remote_open): Likewise.
6713 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6715 * config.h: Regenerate.
6717 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6719 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6720 doesn't provide PTRACE_GET_THREAD_AREA.
6722 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6724 * linux-m68k-low.c: Include <asm/ptrace.h>
6725 (ps_get_thread_area): Implement.
6727 2010-05-03 Doug Evans <dje@google.com>
6729 * event-loop.c (struct callback_event): New struct.
6730 (callback_list): New global.
6731 (append_callback_event, delete_callback_event): New functions.
6732 (process_callback): New function.
6733 (start_event_loop): Call it.
6734 * remote-utils.c (NOT_SCHEDULED): Define.
6735 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6736 moved out of readchar.
6737 (readchar): Rewrite. Call reschedule before returning.
6738 (reset_readchar): New function.
6739 (remote_close): Call it.
6740 (process_remaining, reschedule): New functions.
6741 * server.h (callback_handler_func): New typedef.
6742 (append_callback_event, delete_callback_event): Declare.
6744 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6746 * proc-service.c (ps_pglobal_lookup): Use
6747 thread_db_look_up_one_symbol.
6748 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6749 parameter. Use it instead of all_symbols_looked_up.
6750 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6752 (all_symbols_looked_up): Don't declare.
6753 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6754 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6756 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6757 Set all_symbols_looked_up here.
6758 (thread_db_look_up_one_symbol): New.
6759 (thread_db_get_tls_address): Adjust.
6760 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6761 thread_db object on the heap, and tentatively set it in the
6763 (thread_db_init): Don't set all_symbols_looked_up here.
6764 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6766 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6768 * linux-low.c (linux_kill, linux_detach): Adjust.
6769 (status_pending_p_callback): Remove redundant statement. Check
6770 for !TARGET_WAITIKIND_IGNORE, instead of
6771 TARGET_WAITKIND_STOPPED.
6772 (handle_tracepoints): Make sure LWP is locked. Adjust.
6773 (linux_wait_for_event_1): Adjust.
6774 (linux_cancel_breakpoints): New.
6775 (unsuspend_one_lwp): New.
6776 (unsuspend_all_lwps): New.
6777 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6778 (send_sigstop_callback): Change return type to int, add new
6779 `except' parameter and handle it.
6780 (suspend_and_send_sigstop_callback): New.
6781 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6782 pass them down. If SUSPEND, also increment the lwp's suspend
6784 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6785 (need_step_over_p): Don't consider suspended LWPs.
6786 (start_step_over): Adjust.
6787 (proceed_one_lwp): Change return type to int, add new `except'
6788 parameter and handle it.
6789 (unsuspend_and_proceed_one_lwp): New.
6790 (proceed_all_lwps): Use find_inferior instead of
6792 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6793 also decrement the suspend count of LWPs. Pass `except' down,
6794 instead of hacking its suspend count.
6795 (linux_pause_all): Add `freeze' parameter. Adjust.
6796 (linux_unpause_all): New.
6797 (linux_target_ops): Install linux_unpause_all.
6798 * server.c (handle_status): Adjust.
6799 * target.h (struct target_ops): New fields `unpause_all' and
6800 `cancel_breakpoints'. Add new parameter to `pause_all'.
6801 (pause_all): Add new `freeze' parameter.
6803 (cancel_breakpoints): New.
6804 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6806 (cmd_qtstart): Pause threads.
6807 (stop_tracing): Pause threads, and cancel breakpoints.
6808 * win32-low.c (win32_target_ops): Adjust.
6810 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6812 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6813 the inferior right away from here...
6814 (linux_wait_1): ... to here, and adjust to check the thread's
6815 last_resume_kind instead of the lwp's step or stop_expected flags.
6817 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6819 * README: Use consistent `GDB' and `GDBserver' spellings.
6821 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6823 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6824 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6825 (linux_detach_one_lwp): Assume the lwp is stopped.
6826 (any_thread_of): Delete.
6827 (linux_detach): Stop all lwps here. Don't blindly delete all
6829 (delete_lwp_callback): New.
6830 (linux_mourn): Delete all lwps of the process that is gone.
6831 (linux_wait_1): Don't delete the last lwp of the process here.
6832 * mem-break.h (mark_breakpoints_out): Declare.
6833 * mem-break.c (mark_breakpoints_out): New.
6834 (free_all_breakpoints): Use it.
6835 * server.c (handle_target_event): If the process is gone, mark
6837 * thread-db.c (struct thread_db) <create_bp>: New field.
6838 (thread_db_enable_reporting): Fix prototype. Store a thread event
6839 breakpoint reference in the thread_db struct.
6840 (thread_db_load_search): Clear the thread_db object.
6841 (try_thread_db_load_1): Ditto.
6842 (switch_to_process): New.
6843 (disable_thread_event_reporting): Use it.
6844 (remove_thread_event_breakpoints): New.
6845 (thread_db_detach, thread_db_mourn): Use it.
6847 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6849 * linux-low.c (linux_enable_event_reporting): New.
6850 (linux_wait_for_event_1, handle_extended_wait): Use it.
6852 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6854 * linux-low.c (linux_kill_one_lwp, linux_kill)
6855 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6856 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6857 SIGSTOP even if the LWP is stopped.
6858 (send_sigstop_callback): New.
6859 (stop_all_lwps): Use send_sigstop_callback instead.
6860 (linux_resume_one_thread): Adjust.
6861 (proceed_one_lwp): Still proceed an LWP that the client has
6862 requested to stop, if we haven't reported it as stopped yet. Make
6863 sure that LWPs the client want stopped, have a pending SIGSTOP.
6865 2010-04-26 Doug Evans <dje@google.com>
6867 * server.c (handle_general_set): Make static.
6869 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6870 Print received char after testing for error/eof instead of before.
6871 (input_interrupt): Tweak comment.
6873 2010-04-23 Doug Evans <dje@google.com>
6875 * server.c (start_inferior): Print inferior argv if --debug.
6877 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6879 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6880 * nto-x86-low.c: Include server.h
6882 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6884 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6885 be consistent with other sources of this directory.
6886 (init_registers_amd64): Correct name of source file of this function
6889 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6891 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6894 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6896 * win32-i386-low.c: Add 64-bit support.
6897 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6898 (init_registers_amd64): Declare.
6899 (mappings): Add 64-bit version of array.
6900 (init_windows_x86): New function.
6901 (the_low_target): Change init_arch field to init_windows_x86.
6903 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6905 * win32-low.c: Adapt to support also 64-bit architecture.
6906 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6907 (get_image_name): Use SIZE_T type for local variable `done'.
6908 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6909 (toolhelp_get_dll_name): Idem.
6910 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6911 Use uintptr_t typecast to avoid warning.
6912 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6913 (handle_exception): Use phex_nz to avoid warning.
6914 (win32_wait): Remove unused local variable `process'.
6916 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6918 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6921 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6923 * configure.ac: Use `ws2_32' library for srv_mingw.
6924 * configure: Regenerate.
6925 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6926 * remote-utils.c: Likewise.
6928 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6930 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6931 if __x86_64__ is defined.
6933 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6935 * configure: Regenerate.
6937 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6939 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6940 * target.h (target_ops): New get_tib_address field.
6941 * win32-low.h (win32_thread_info): Add thread_local_base field.
6942 * win32-low.c (child_add_thread): Add tlb argument.
6943 Set thread_local_base field to TLB.
6944 (get_child_debug_event): Adapt to child_add_thread change.
6945 (win32_get_tib_address): New function.
6946 (win32_target_ops): Set get_tib_address field to
6947 win32_get_tib_address.
6948 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6950 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6952 * linux-low.c (linux_mourn): Also remove the process.
6953 * server.c (handle_target_event): Don't remove the process here.
6954 * nto-low.c (nto_mourn): New.
6955 (nto_target_ops): Install it.
6956 * spu-low.c (spu_mourn): New.
6957 (spu_target_ops): Install it.
6958 * win32-low.c (win32_mourn): New.
6959 (win32_target_ops): Install it.
6961 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6963 * server.h (buffer_xml_printf): Remove redundant `;'.
6965 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6967 * regcache.c (set_register_cache): Invalidate regcaches before
6968 changing the register cache layout.
6969 (regcache_invalidate_one): Allow a NULL regcache.
6970 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6971 regcaches before changing the register cache layout or the target
6974 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6976 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6977 variable warning on Linux/x86-64.
6979 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6981 GDBserver disconnected tracing support.
6983 * linux-low.c (linux_remove_process): Delete.
6984 (add_lwp): Don't set last_resume_kind here.
6985 (linux_kill): Use `mourn'.
6986 (linux_detach): Use `thread_db_detach', and `mourn'.
6988 (linux_attach_lwp_1): Adjust comment.
6989 (linux_attach): last_resume_kind moved the thread_info; adjust.
6990 (status_pending_p_callback): Adjust.
6991 (linux_wait_for_event_1): Adjust.
6992 (count_events_callback, select_singlestep_lwp_callback)
6993 (select_event_lwp_callback, cancel_breakpoints_callback)
6994 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6995 (proceed_one_lwp): Adjust.
6996 (linux_async): Add debug output.
6997 (linux_thread_stopped): New.
6998 (linux_pause_all): New.
6999 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7001 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7002 (thread_db_free): Delete declaration.
7003 (thread_db_detach, thread_db_mourn): Declare.
7004 * thread-db.c (thread_db_init): Use thread_db_mourn.
7005 (thread_db_free): Delete, split in two.
7006 (disable_thread_event_reporting): New.
7007 (thread_db_detach): New.
7008 (thread_db_mourn): New.
7010 * server.h (struct thread_info) <last_resume_kind>: New field.
7011 <attached>: Add comment.
7012 <gdb_detached>: New field.
7013 (handler_func): Change return type to int.
7014 (handle_serial_event, handle_target_event): Ditto.
7015 (gdb_connected): Declare.
7017 (disconnected_tracing): Declare.
7018 (stop_tracing): Declare.
7020 * server.c (handle_query) <qSupported>: Report support for
7021 disconnected tracing.
7022 (queue_stop_reply_callback): Account for running threads.
7023 (gdb_wants_thread_stopped): New.
7024 (gdb_wants_all_threads_stopped): New.
7025 (gdb_reattached_process): New.
7026 (handle_status): Clear the `gdb_detached' flag of all processes.
7027 In all-stop, stop all threads.
7028 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7029 (process_serial_event): If the remote connection breaks, or if an
7030 exit was forced with "monitor exit", force an event loop exit.
7031 Handle disconnected tracing on detach.
7032 (handle_serial_event): Adjust.
7033 (handle_target_event): If GDB isn't connected, forward events back
7034 to the inferior, unless the last process exited, in which case,
7035 exit gdbserver. Adjust interface.
7037 * remote-utils.c (remote_open): Don't block in accept. Instead
7038 register an event loop source on the listen socket file
7039 descriptor. Refactor bits into ...
7040 (listen_desc): ... this new global.
7041 (gdb_connected): ... this new function.
7042 (enable_async_notification): ... this new function.
7043 (handle_accept_event): ... this new function.
7044 (remote_close): Clear remote_desc.
7046 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7048 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7050 (mourn_inferior): Define.
7051 (target_process_qsupported): Avoid the dangling else problem.
7052 (thread_stopped): Define.
7053 (pause_all): Define.
7054 (target_waitstatus_to_string): Declare.
7055 * target.c (target_waitstatus_to_string): New.
7057 * tracepoint.c (tracing): Make extern.
7058 (disconnected_tracing): New.
7059 (stop_tracing): Make extern. Handle tracing stops due to GDB
7061 (cmd_qtdisconnected): New.
7062 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7063 (handle_tracepoint_general_set): Handle QTDisconnected.
7065 * event-loop.c (event_handler_func): Change return type to int.
7066 (process_event): Bail out if the event handler wants the event
7068 (handle_file_event): Ditto.
7069 (start_event_loop): Bail out if the event handler wants the event
7072 * nto-low.c (nto_target_ops): Adjust.
7073 * spu-low.c (spu_wait): Don't remove the process here.
7074 (spu_target_ops): Adjust.
7075 * win32-low.c (win32_wait): Don't remove the process here.
7076 (win32_target_ops): Adjust.
7078 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7080 * regcache.c (realloc_register_cache): Invalidate inferior's
7081 regcache before recreating it.
7083 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7085 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7087 2010-04-09 Stan Shebs <stan@codesourcery.com>
7088 Pedro Alves <pedro@codesourcery.com>
7090 * server.h (LONGEST): New.
7091 (struct thread_info) <while_stepping>: New field.
7092 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7094 (initialize_tracepoint, handle_tracepoint_general_set)
7095 (handle_tracepoint_query, tracepoint_finished_step)
7096 (tracepoint_was_hit, release_while_stepping_state_list):
7097 (current_traceframe): Declare.
7098 * server.c (handle_general_set): Handle tracepoint packets.
7100 (write_memory): New.
7101 (handle_search_memory_1): Use read_memory.
7102 (handle_query): Report support for conditional tracepoints, trace
7103 state variables, and tracepoint sources. Handle tracepoint
7105 (main): Initialize the tracepoints module.
7106 (process_serial_event): Handle traceframe reads/writes.
7108 * linux-low.c (handle_tracepoints): New.
7109 (linux_wait_1): Call it.
7110 (linux_resume_one_lwp): Handle while-stepping.
7111 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7112 (linux_target_ops): Install them.
7113 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7115 * linux-x86-low.c (x86_supports_tracepoints): New.
7116 (the_low_target). Install it.
7118 * mem-break.h (delete_breakpoint): Declare.
7119 * mem-break.c (delete_breakpoint): Make external.
7121 * target.h (struct target_ops): Add `supports_tracepoints',
7122 `read_pc', and `write_pc' fields.
7123 (target_supports_tracepoints): Define.
7124 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7127 * regcache.h (struct regcache) <registers_owned>: New field.
7128 (init_register_cache, regcache_cpy): Declare.
7129 (regcache_read_pc, regcache_write_pc): Declare.
7130 (register_cache_size): Declare.
7131 (supply_regblock): Declare.
7132 * regcache.c (init_register_cache): New.
7133 (new_register_cache): Use it.
7134 (regcache_cpy): New.
7135 (register_cache_size): New.
7136 (supply_regblock): New.
7137 (regcache_read_pc, regcache_write_pc): New.
7139 * tracepoint.c: New.
7141 * Makefile.in (OBS): Add tracepoint.o.
7142 (tracepoint.o): New rule.
7144 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7146 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7148 (i386-mmx.c): Likewise.
7149 (i386-mmx-linux.o): Likewise.
7150 (i386-mmx-linux.c): Likewise.
7152 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7153 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7154 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7155 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7157 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7158 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7159 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7161 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7163 * Makefile.in (clean): Updated.
7165 (i386-avx.c): Likewise.
7166 (i386-avx-linux.o): Likewise.
7167 (i386-avx-linux.c): Likewise.
7168 (amd64-avx.o): Likewise.
7169 (amd64-avx.c): Likewise.
7170 (amd64-avx-linux.o): Likewise.
7171 (amd64-avx-linux.c): Likewise.
7173 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7174 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7175 (srv_amd64_regobj): Add amd64-avx.o.
7176 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7177 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7178 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7179 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7180 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7181 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7182 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7184 * i387-fp.c: Include "i386-xstate.h".
7186 (i387_cache_to_xsave): Likewise.
7187 (i387_xsave_to_cache): Likewise.
7188 (x86_xcr0): Likewise.
7190 * i387-fp.h (i387_cache_to_xsave): Likewise.
7191 (i387_xsave_to_cache): Likewise.
7192 (x86_xcr0): Likewise.
7194 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7195 * linux-crisv32-low.c (target_regsets): Likewise.
7196 * linux-m68k-low.c (target_regsets): Likewise.
7197 * linux-mips-low.c (target_regsets): Likewise.
7198 * linux-ppc-low.c (target_regsets): Likewise.
7199 * linux-s390-low.c (target_regsets): Likewise.
7200 * linux-sh-low.c (target_regsets): Likewise.
7201 * linux-sparc-low.c (target_regsets): Likewise.
7202 * linux-xtensa-low.c (target_regsets): Likewise.
7204 * linux-low.c: Include <sys/uio.h>.
7205 (regsets_fetch_inferior_registers): Support nt_type.
7206 (regsets_store_inferior_registers): Likewise.
7207 (linux_process_qsupported): New.
7208 (linux_target_ops): Add linux_process_qsupported.
7210 * linux-low.h (regset_info): Add nt_type.
7211 (linux_target_ops): Add process_qsupported.
7213 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7215 (init_registers_i386_avx_linux): New.
7216 (init_registers_amd64_avx_linux): Likewise.
7217 (xmltarget_i386_linux_no_xml): Likewise.
7218 (xmltarget_amd64_linux_no_xml): Likewise.
7219 (PTRACE_GETREGSET): Likewise.
7220 (PTRACE_SETREGSET): Likewise.
7221 (x86_fill_xstateregset): Likewise.
7222 (x86_store_xstateregset): Likewise.
7223 (use_xml): Likewise.
7224 (x86_linux_update_xmltarget): Likewise.
7225 (x86_linux_process_qsupported): Likewise.
7226 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7227 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7228 init_registers_i386_linux here. Call
7229 x86_linux_update_xmltarget.
7230 (the_low_target): Add x86_linux_process_qsupported.
7232 * server.c (handle_query): Call target_process_qsupported.
7234 * target.h (target_ops): Add process_qsupported.
7235 (target_process_qsupported): New.
7237 2010-04-03 Pedro Alves <pedro@codesourcery.com>
7239 * inferiors.c (add_thread): Set last_status kind to
7240 TARGET_WAITKIND_IGNORE.
7241 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7242 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7243 (linux_wait_1): Move `thread' local definition to block that uses
7244 it. Don't NULL initialize `event_child'.
7245 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7246 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7247 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7249 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7251 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7252 an extended waitstatus, or by a watchpoint.
7253 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7254 thread was stepping or has been stopped by a watchpoint.
7256 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7258 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7259 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7260 of another, then delete the previous, and validate all
7262 (validate_inserted_breakpoint): New.
7263 (delete_disabled_breakpoints): New.
7264 (validate_breakpoints): New.
7265 (check_mem_read): Validate breakpoints before trusting their
7266 shadow. Delete disabled breakpoints.
7267 (check_mem_write): Validate breakpoints before trusting they
7268 should be inserted. Delete disabled breakpoints.
7269 * mem-break.h (validate_breakpoints):
7270 * server.c (handle_query): Validate breakpoints when we see a
7273 2010-04-01 Pedro Alves <pedro@codesourcery.com>
7275 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7276 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7277 if we could tell there's a GDB breakpoint at stop_pc.
7278 (need_step_over_p): Don't do a step over if we find a GDB
7279 breakpoint at the resume PC.
7281 * mem-break.c (struct raw_breakpoint): New.
7282 (enum bkpt_type): New type `gdb_breakpoint'.
7283 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7284 fields. New field `raw'.
7285 (find_raw_breakpoint_at): New.
7286 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7288 (set_breakpoint_at): Adjust.
7289 (delete_raw_breakpoint): New.
7290 (release_breakpoint): New.
7291 (delete_breakpoint): Rename to...
7292 (delete_breakpoint_1): ... this. Add proc parameter. Use
7293 release_breakpoint. Return ENOENT.
7294 (delete_breakpoint): Reimplement.
7295 (find_breakpoint_at): Delete.
7296 (find_gdb_breakpoint_at): New.
7297 (delete_breakpoint_at): Delete.
7298 (set_gdb_breakpoint_at): New.
7299 (delete_gdb_breakpoint_at): New.
7300 (gdb_breakpoint_here): New.
7301 (set_reinsert_breakpoint): Use release_breakpoint.
7302 (uninsert_breakpoint): Rename to ...
7303 (uninsert_raw_breakpoint): ... this.
7304 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7305 (reinsert_raw_breakpoint): Change parameter type to
7307 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7309 (check_breakpoints): Adjust. Use release_breakpoint.
7310 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7311 (breakpoint_inserted_here): Ditto.
7312 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7313 Don't trust the breakpoint's shadow if it is not inserted.
7314 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7315 (delete_all_breakpoints): Adjust.
7316 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7317 use delete_breakpoint_1.
7319 * mem-break.h (breakpoints_supported): Delete declaration.
7320 (set_gdb_breakpoint_at): Declare.
7321 (gdb_breakpoint_here): Declare.
7322 (delete_breakpoint_at): Delete.
7323 (delete_gdb_breakpoint_at): Declare.
7325 * server.h (struct raw_breakpoint): Forward declare.
7326 (struct process_info): New field `raw_breakpoints'.
7328 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7331 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7333 * linux-low.c (status_pending_p_callback): Fix comment.
7334 (linux_wait_for_event_1): Move most of the internal breakpoint
7335 handling from here...
7336 (linux_wait_1): ... to here.
7337 (count_events_callback): New.
7338 (select_singlestep_lwp_callback): New.
7339 (select_event_lwp_callback): New.
7340 (cancel_breakpoints_callback): New.
7341 (select_event_lwp): New.
7342 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7343 priority to all LWPs that have had events that should be reported
7344 to the client. Cancel breakpoints when about to reporting the
7345 event to the client, not while stopping lwps. No longer cancel
7346 finished single-steps here.
7347 (cancel_finished_single_step): Delete.
7348 (cancel_finished_single_steps): Delete.
7350 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7352 * mem-break.c (enum bkpt_type): New.
7353 (struct breakpoint): New field `type'.
7354 (set_breakpoint_at): Change return type to struct breakpoint
7355 pointer. Set type to `other_breakpoint' by default.
7356 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7357 in the breakpoint list.
7358 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7359 (reinsert_breakpoint): Rename to ...
7360 (reinsert_raw_breakpoint): ... this.
7361 (reinsert_breakpoints_at): Adjust.
7362 * mem-break.h (struct breakpoint): Declare.
7363 (set_breakpoint_at): Change return type to struct breakpoint
7366 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7368 * server.c (handle_query): Assign, not compare.
7370 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7372 Teach linux gdbserver to step-over-breakpoints.
7374 * linux-low.c (can_hardware_single_step): New.
7375 (supports_breakpoints): New.
7376 (handle_extended_wait): If stopping threads, read the stop pc of
7379 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7380 low target doesn't support retrieving the PC.
7381 (add_lwp): Set last_resume_kind to resume_continue.
7382 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7383 (linux_attach): Don't clear stop_expected. Set the lwp's
7384 last_resume_kind to resume_stop.
7385 (linux_detach_one_lwp): Don't check for removed breakpoints.
7386 (check_removed_breakpoint): Delete.
7387 (status_pending_p): Rename to ...
7388 (status_pending_p_callback): ... this. Don't check for removed
7389 breakpoints. Don't consider threads that are stopped from GDB's
7391 (linux_wait_for_lwp): Always read the stop_pc here.
7392 (cancel_breakpoint): New.
7393 (step_over_bkpt): New global.
7394 (linux_wait_for_event_1): Implement stepping over breakpoints.
7395 (gdb_wants_lwp_stopped): New.
7396 (gdb_wants_all_stopped): New.
7397 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7398 single-step traps here. Store the thread's last reported target
7400 (send_sigstop): Don't clear stop_expected. Always set it,
7402 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7403 (cancel_finished_single_step): New.
7404 (cancel_finished_single_steps): New.
7405 (wait_for_sigstop): Don't cancel finished single-step traps here.
7406 (linux_resume_one_lwp): Don't check for removed breakpoints.
7407 Don't set `step' on non-hardware step archs.
7408 (linux_set_resume_request): Ignore resume_stop requests if already
7409 stopping or stopped. Set the lwp's last_resume_kind.
7410 (resume_status_pending_p): Don't check for removed breakpoints.
7411 (need_step_over_p): New.
7412 (start_step_over): New.
7413 (finish_step_over): New.
7414 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7415 requests. Clear the thread's last reported target waitstatus.
7416 Don't use the `suspended' flag. Don't consider pending breakpoints.
7417 (linux_resume): Start a step-over if necessary.
7418 (proceed_one_lwp): New.
7419 (proceed_all_lwps): New.
7420 (unstop_all_lwps): New.
7421 * linux-low.h (struct lwp_info): Rewrite comment for the
7422 `suspended' flag. Add the `stop_pc' field. Delete the
7423 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7424 Add `'last_resume_kind' and `need_step_over' fields.
7425 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7426 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7427 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7428 (set_raw_breakpoint_at): New.
7429 (set_breakpoint_at): Rewrite to use it.
7430 (reinsert_breakpoint_handler): Delete.
7431 (set_reinsert_breakpoint): New.
7432 (reinsert_breakpoint_by_bp): Delete.
7433 (delete_reinsert_breakpoints): New.
7434 (uninsert_breakpoint): Rewrite.
7435 (uninsert_breakpoints_at): New.
7436 (reinsert_breakpoint): Rewrite.
7437 (reinsert_breakpoints_at): New.
7438 (check_breakpoints): Rewrite.
7439 (breakpoint_here): New.
7440 (breakpoint_inserted_here): New.
7441 (check_mem_read): Adjust.
7442 * mem-break.h (breakpoints_supported, breakpoint_here)
7443 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7444 (reinsert_breakpoint_by_bp): Delete declaration.
7445 (delete_reinsert_breakpoints): Declare.
7446 (reinsert_breakpoint): Delete declaration.
7447 (reinsert_breakpoints_at): Declare.
7448 (uninsert_breakpoint): Delete declaration.
7449 (uninsert_breakpoints_at): Declare.
7450 (check_breakpoints): Adjust prototype.
7451 * server.h: Adjust include order.
7452 (struct thread_info): Declare here. Add a `last_status' field.
7454 2010-03-23 Michael Snyder <msnyder@vmware.com>
7456 * server.c (crc32): New function.
7457 (handle_query): Add handling for 'qCRC:' request.
7459 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7461 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7462 lwp had been stopped by a watchpoint.
7464 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7466 * server.h (internal_error): Declare.
7467 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7468 * utils.c (internal_error): New function.
7470 2010-03-15 Andreas Schwab <schwab@redhat.com>
7472 * configure.srv: Fix typo setting srv_regobj.
7474 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7476 * linux-low.c (fetch_register): Avoid passing a non string literal
7478 (usr_store_inferior_registers): Ditto.
7480 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7482 * linux-low.c (linux_write_memory): Bail out early if peeking
7485 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7487 * linux-low.h (struct lwp_info): New fields
7488 `stopped_by_watchpoint' and `stopped_data_address'.
7489 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7490 here, and cache them in the lwp object.
7491 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7493 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7495 (linux_stopped_by_watchpoint): Rewrite.
7496 (linux_stopped_data_address): Rewrite.
7498 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7500 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7501 switching the current inferior, not before.
7503 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7505 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7506 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7507 i386-linux.c and amd64-linux.c.
7508 (reg-i386.o): Removed.
7509 (reg-i386.c): Likewise.
7510 (reg-i386-linux.o): Likewise.
7511 (reg-i386-linux.c): Likewise.
7512 (reg-x86-64.o): Likewise.
7513 (reg-x86-64.c): Likewise.
7514 (reg-x86-64-linux.o): Likewise.
7515 (reg-x86-64-linux.c): Likewise.
7518 (i386-linux.o): Likewise.
7519 (i386-linux.c): Likewise.
7520 (amd64.o): Likewise.
7521 (amd64.c): Likewise.
7522 (amd64-linux.o): Likewise.
7523 (amd64-linux.c): Likewise.
7525 * configure.srv (srv_i386_regobj): New.
7526 (srv_i386_linux_regobj): Likewise.
7527 (srv_amd64_regobj): Likewise.
7528 (srv_amd64_linux_regobj): Likewise.
7529 (srv_i386_32bit_xmlfiles): Likewise.
7530 (srv_i386_64bit_xmlfiles): Likewise.
7531 (srv_i386_xmlfiles): Likewise.
7532 (srv_amd64_xmlfiles): Likewise.
7533 (srv_i386_linux_xmlfiles): Likewise.
7534 (srv_amd64_linux_xmlfiles): Likewise.
7535 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7536 srv_xmlfiles to $srv_i386_xmlfiles.
7537 (i[34567]86-*-mingw32ce*): Likewise.
7538 (i[34567]86-*-mingw*): Likewise.
7539 (i[34567]86-*-nto*): Likewise.
7540 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7541 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7542 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7543 (x86_64-*-linux*): Likewise.
7545 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7546 (init_registers_amd64_linux): New.
7547 (x86_arch_setup): Replace init_registers_x86_64_linux with
7548 init_registers_amd64_linux.
7550 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7552 * configure.ac: Check for libdl. If it is not available link against
7553 static libthread_db.
7554 * configure: Regenerate.
7556 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7560 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7561 handing a read watchpoint.
7562 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7564 2010-02-12 Doug Evans <dje@google.com>
7566 * linux-low.c (linux_supports_tracefork_flag): Document.
7567 (linux_look_up_symbols): Add comment.
7569 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7571 * regcache.c (supply_register): Clear regcache if buf is NULL.
7573 2010-02-02 Nicolas Roche <roche@sourceware.org>
7574 Joel Brobecker <brobecker@adacore.com>
7576 * inferiors.c (find_inferior): Add function documentation.
7577 (unloaded_dll): Handle the case where the unloaded dll has not
7578 been previously registered in the dll list.
7580 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7582 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7583 (thumb2_breakpoint): New.
7584 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7586 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7588 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7589 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7592 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7594 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7596 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7598 * linux-s390-low.c (s390_collect_ptrace_register)
7599 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7601 2010-01-21 Doug Evans <dje@google.com>
7603 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7604 (PTRACE_ARG4_TYPE): New macro.
7605 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7606 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7607 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7608 (usr_store_inferior_registers): Ditto.
7609 (linux_read_memory, linux_write_memory): Ditto.
7610 (linux_test_for_tracefork): Ditto.
7612 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7613 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7615 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7617 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7620 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7622 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7623 prototype to take a regcache. Adjust.
7625 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7627 * regcache.h (struct thread_info): Forward declare.
7628 (struct regcache): New.
7629 (new_register_cache): Adjust prototype.
7630 (get_thread_regcache): Declare.
7631 (free_register_cache): Adjust prototype.
7632 (registers_to_string, registers_from_string): Ditto.
7633 (supply_register, supply_register_by_name, collect_register)
7634 (collect_register_as_string, collect_register_by_name): Ditto.
7635 * regcache.c (struct inferior_regcache_data): Delete.
7636 (get_regcache): Rename to ...
7637 (get_thread_regcache): ... this. Adjust. Switch inferior before
7639 (regcache_invalidate_one): Adjust.
7640 (regcache_invalidate): Fix prototype.
7641 (new_register_cache): Return the new register cache.
7642 (free_register_cache): Change prototype.
7643 (realloc_register_cache): Adjust.
7644 (registers_to_string): Change prototype to take a regcache. Adjust.
7645 (registers_from_string): Ditto.
7646 (register_data): Ditto.
7647 (supply_register): Ditto.
7648 (supply_register_by_name): Ditto.
7649 (collect_register): Ditto.
7650 (collect_register_as_string): Ditto.
7651 (collect_register_by_name): Ditto.
7652 * server.c (process_serial_event): Adjust.
7653 * linux-low.h (regset_fill_func, regset_store_func): Change
7655 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7657 * linux-low.c (get_stop_pc): Adjust.
7658 (check_removed_breakpoint): Adjust.
7659 (linux_wait_for_event): Adjust.
7660 (linux_resume_one_lwp): Adjust.
7661 (fetch_register): Add regcache parameter. Adjust.
7662 (usr_store_inferior_registers): Ditto.
7663 (regsets_fetch_inferior_registers): Ditto.
7664 (regsets_store_inferior_registers): Ditto.
7665 (linux_fetch_registers, linux_store_registers): Ditto.
7666 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7668 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7670 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7671 prototype to take a regcache.
7672 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7673 * remote-utils.c (convert_ascii_to_int, outreg)
7674 (prepare_resume_reply): Change prototype to take a regcache.
7676 * target.h (struct target_ops) <fetch_registers, store_registers>:
7677 Change prototype to take a regcache.
7678 (fetch_inferior_registers, store_inferior_registers): Change
7679 prototype to take a regcache. Adjust.
7680 * proc-service.c (ps_lgetregs): Adjust.
7681 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7682 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7683 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7684 take a regcache. Adjust.
7685 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7686 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7687 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7688 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7689 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7690 (cris_cannot_fetch_register):
7691 (cris_breakpoint_at): Change prototype to take a regcache.
7693 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7694 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7695 to take a regcache. Adjust.
7696 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7698 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7699 take a regcache. Adjust.
7700 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7701 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7702 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7703 * linux-mips-low.c (mips_get_pc):
7704 (mips_set_pc): Change prototype to take a regcache. Adjust.
7705 (mips_reinsert_addr): Adjust.
7706 (mips_collect_register): Change prototype to take a regcache.
7708 (mips_supply_register):
7709 (mips_collect_register_32bit, mips_supply_register_32bit)
7710 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7711 (mips_store_fpregset): Ditto.
7712 * linux-ppc-low.c (ppc_supply_ptrace_register)
7713 (ppc_supply_ptrace_register): Ditto.
7714 (parse_spufs_run): Adjust.
7715 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7716 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7717 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7718 take a regcache. Adjust.
7719 * linux-s390-low.c (s390_collect_ptrace_register)
7720 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7721 (s390_set_pc): Change prototype to take a regcache. Adjust.
7722 (s390_arch_setup): Adjust.
7723 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7724 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7725 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7726 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7727 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7729 (sparc_breakpoint_at): Adjust.
7730 * linux-xtensa-low.c (xtensa_fill_gregset):
7731 (xtensa_store_gregset):
7732 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7733 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7734 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7735 prototype to take a regcache. Adjust.
7736 * win32-arm-low.c (arm_fetch_inferior_register)
7737 (arm_store_inferior_register): Change prototype to take a
7739 * win32-i386-low.c (i386_fetch_inferior_register)
7740 (i386_store_inferior_register): Change prototype to take a
7742 * win32-low.c (child_fetch_inferior_registers)
7743 (child_store_inferior_registers): Change prototype to take a
7745 (win32_wait): Adjust.
7746 (win32_fetch_inferior_registers): Change prototype to take a
7748 (win32_store_inferior_registers): Adjust.
7749 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7750 store_inferior_register>: Change prototype to take a regcache.
7752 2010-01-20 Doug Evans <dje@google.com>
7754 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7756 (linux_wait_for_event1, linux_init_signals): Ditto.
7757 (W_STOPCODE): Provide definition if missing.
7759 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7761 * linux-low.c (linux_core_of_thread): New.
7762 (compare_ints, show_process, list_threads): New.
7763 (linux_qxfer_osdata): Report threads and cores.
7764 (linux_target_op): Register linux_core_of_thread.
7765 * remote-utils.c (prepare_resume_reply): Report the core.
7766 (buffer_xml_printf): Support %d specifier.
7767 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7769 (handle_query): Handle qXfer:threads. Announce availability
7771 * target.h (struct target_ops): New field core_of_thread.
7773 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7775 * Makefile.in (clean): Remove new generated files.
7776 (reg-s390.o, reg-s390.c): Remove rules.
7777 (reg-s390x.o, reg-s390x.c): Likewise.
7778 (s390-linux32.o, s390-linux32.c): Add rules.
7779 (s390-linux64.o, s390-linux64.c): Likewise.
7780 (s390x-linux64.o, s390x-linux64.c): Likewise.
7781 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7782 * linux-s390-low.c: Include <elf.h>.
7783 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7784 (init_registers_s390): Remove prototype.
7785 (init_registers_s390x): Likewise.
7786 (init_registers_s390_linux32): Add prototype.
7787 (init_registers_s390_linux64): Likewise.
7788 (init_registers_s390x_linux64): Likewise.
7789 (s390_num_regs_3264): New define.
7790 (s390_regmap_3264): New global variable.
7791 (s390_cannot_fetch_register): Remove obsolete check.
7792 (s390_cannot_store_register): Likewise.
7793 (s390_collect_ptrace_register): Handle upper/lower register halves.
7794 (s390_supply_ptrace_register): Likewise.
7795 (s390_fill_gregset): Update to register number changes.
7796 (s390_get_hwcap): New routine.
7797 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7798 Install appropriate regmap and register set.
7800 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7802 * server.c (gdbserver_version): Update copyright year to 2010.
7803 * gdbreplay.c (gdbreplay_version): Likewise.
7805 2009-12-28 Doug Evans <dje@google.com>
7807 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7808 elf/external.h. Include <elf.h> instead but only if necessary.
7810 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7812 * linux-low.c (linux_remove_process): Remove `detaching'
7813 parameter. Don't release/detach from thread_db here.
7814 (linux_kill): Release/detach from thread_db here, ...
7815 (linux_detach): ... and here, before actually detaching.
7816 (linux_wait_1): ... and here, when a process exits.
7817 * thread-db.c (any_thread_of): New.
7818 (thread_db_free): Switch the current inferior to a thread of the
7821 2009-12-21 Doug Evans <dje@google.com>
7823 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7825 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7826 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7827 warning ifndef __NR_tkill. Move setting of errno there too.
7828 Delete unnecessary resetting of errno after syscall.
7829 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7831 * configure.ac: Check for dladdr.
7832 * config.in: Regenerate.
7833 * configure: Regenerate.
7834 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7835 (try_thread_db_load): Update.
7837 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7839 2009-12-18 Doug Evans <dje@google.com>
7841 * event-loop.c: Include unistd.h if it exists.
7843 * linux-low.c (my_waitpid): Move definition away from being in
7844 between linux_tracefork_child/linux_test_for_tracefork.
7846 * gdb_proc_service.h (psaddr_t): Fix type.
7847 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7848 signature to match glibc.
7850 2009-12-16 Doug Evans <dje@google.com>
7852 * linux-low.c (linux_read_memory): Fix argument to read.
7854 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7856 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7857 events, don't leave current_inferior pointing at null.
7859 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7861 * win32-low.c (LOG): Delete.
7862 (OUTMSG): Output to stderr.
7863 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7864 on compile time LOG macro.
7865 (win32_wait): Fix debug output.
7867 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7869 * win32-low.c (win32_add_one_solib): If the dll name is
7870 "ntdll.dll", prepend the system directory to the dll path.
7872 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7874 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7876 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7877 Vladimir Prus <vladimir@codesourcery.com>
7879 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7880 * configure.ac: Check for __mcoldfire__ and set
7881 gdb_cv_m68k_is_coldfire.
7882 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7883 reg-cf.o and reg-m68k.o.
7884 * configure: Regenerated.
7886 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7888 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7889 Pass it to thread_db_free.
7890 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7891 proper `detaching' argument to linux_remove_process.
7892 * linux-low.h (thread_db_free): Add `detaching' parameter.
7893 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7895 (thread_db_free): Add `detaching' parameter. Only
7896 call td_ta_clear_event if detaching from process.
7898 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7900 * thread-db.c (thread_db_free): Fix typo.
7902 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7905 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7907 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7909 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7910 with an i686 compiler.
7911 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7913 * configure: Rebuilt.
7915 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7919 * server.c (handle_search_memory_1): Correct read_addr initialization
7920 in loop for searching subsequent chunks.
7922 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7924 * configure.ac: New --with-libthread-db option.
7925 * thread-db.c: Allow direct dependence on libthread_db.
7926 (thread_db_free): Adjust.
7927 * config.in: Regenerate.
7928 * configure: Likewise.
7930 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7933 * thread-db.c (attach_thread): New function.
7934 (maybe_attach_thread): Return success/failure.
7935 (find_new_threads_callback): Adjust.
7936 (thread_db_find_new_threads): Loop until no new threads.
7938 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7940 * proc-service.c (ps_lgetregs): Formatting.
7942 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7944 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7945 * configure.ac: Adjust.
7946 * linux-low.h (struct process_info_private): Move members to struct
7948 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7949 * linux-low.c (linux_remove_process): Adjust.
7950 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7951 * server.c (handle_query): Move code ...
7952 (handle_monitor_command): ... here. New function.
7953 * target.h (struct target_ops): New member.
7954 * thread-db.c (struct thread_db): New.
7955 (libthread_db_search_path): New variable.
7956 (thread_db_create_event, thread_db_enable_reporting)
7957 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7958 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7959 (try_thread_db_load_1, dladdr_to_soname): New functions.
7960 (try_thread_db_load, thread_db_load_search): New functions.
7961 (thread_db_init): Search for libthread_db.
7962 (thread_db_free): New function.
7963 (thread_db_handle_monitor_command): Likewise.
7964 * config.in: Regenerate.
7965 * configure: Regenerate.
7967 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7969 * spu-low.c (spu_kill): Wait for inferior to terminate.
7970 Call clear_inferiors.
7971 (spu_detach): Call clear_inferiors.
7973 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7975 * aclocal.m4: Regenerate.
7976 * config.in: Likewise.
7977 * configure: Likewise.
7979 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7981 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7982 (parse_spufs_run): New function.
7983 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7984 (ppc_breakpoint_at): Handle SPU breakpoints.
7986 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7988 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7989 (SPUFS_MAGIC): Define.
7990 (spu_enumerate_spu_ids): New function.
7991 (linux_qxfer_spu): New function.
7992 (linux_target_ops): Install linux_qxfer_spu.
7994 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7996 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7997 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7998 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7999 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8000 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8001 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8002 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8003 (init_registers_powerpc_cell32l): Add prototype.
8004 (init_registers_powerpc_cell64l): Likewise.
8005 (ppc_arch_setup): Detect Cell/B.E. architecture.
8007 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8009 * Makefile.in (datarootdir): New variable.
8011 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8013 * linux-low.c (linux_write_memory): Update debugging output.
8014 * Makefile.in (clean): Add new descriptions.
8015 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8016 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8017 * configure.srv: Add new files for arm*-*-linux*.
8018 * linux-arm-low.c: Add new declarations.
8019 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8020 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8021 (HWCAP_VFPv3D16): New.
8022 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8023 instead of __IWMMXT__.
8024 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8025 (arm_arch_setup): New.
8026 (target_regsets): Remove #ifdef. Add VFP regset.
8027 (the_low_target): Use arm_arch_setup.
8029 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8031 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8032 the main thread again.
8034 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8036 Adding Neutrino gdbserver.
8037 * configure: Regenerated.
8038 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8039 * configure.srv (i[34567]86-*-nto*): New target.
8040 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8041 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8042 (nto_comctrl) [__QNX__]: New function.
8043 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8045 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8047 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8050 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8051 Pedro Alves <pedro@codesourcery.com>
8053 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8054 don't support CONTEXT_EXTENDED_REGISTERS.
8055 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8056 (the_low_target): Install them.
8057 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8058 failing with ERROR_PIPE_NOT_CONNECTED.
8060 2009-06-30 Doug Evans <dje@google.com>
8061 Pierre Muller <muller@ics.u-strasbg.fr>
8063 Add h/w watchpoint support to x86-linux, win32-i386.
8064 * Makefile.in (SFILES): Add i386-low.c
8065 (i386_low_h): Define.
8066 (i386-low.o): Add dependencies.
8067 (linux-x86-low.o): Add i386-low.h dependency.
8068 (win32-i386-low.o): Ditto.
8069 * i386-low.c: New file.
8070 * i386-low.h: New file.
8071 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8072 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8073 * linux-low.c (linux_add_process): Initialize arch_private.
8074 (linux_remove_process): Free arch_private.
8075 (add_lwp): Initialize arch_private.
8076 (delete_lwp): Free arch_private.
8077 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8079 * linux-low.h (process_info_private): New member arch_private.
8080 (lwp_info): New member arch_private.
8081 (linux_target_ops): New members new_process, new_thread,
8083 (ptid_of): New macro.
8084 * linux-x86-low.c: Include stddef.h, i386-low.h.
8085 (arch_process_info): New struct.
8086 (arch_lwp_info): New struct.
8087 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8088 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8089 (i386_dr_low_get_status): New function.
8090 (x86_insert_point, x86_remove_point): New functions.
8091 (x86_stopped_by_watchpoint): New function.
8092 (x86_stopped_data_address): New function.
8093 (x86_linux_new_process, x86_linux_new_thread): New functions.
8094 (x86_linux_prepare_to_resume): New function.
8095 (the_low_target): Add entries for insert_point, remove_point,
8096 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8098 * server.c (debug_hw_points): New global.
8099 (monitor_show_help): Document set debug-hw-points.
8100 (handle_query): Process "set debug-hw-points".
8101 * server.h (debug_hw_points): Declare.
8102 (paddress): Declare.
8103 * utils.c (NUMCELLS, CELLSIZE): New macros.
8104 (get_sell, xsnprintf, paddress): New functions.
8105 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8106 remove_point, stopped_by_watchpoint, stopped_data_address.
8107 * win32-i386-low.c: Include i386-low.h.
8108 (debug_reg_state): Replaces dr.
8109 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8110 (i386_dr_low_get_status): New function.
8111 (i386_insert_point, i386_remove_point): New functions.
8112 (i386_stopped_by_watchpoint): New function.
8113 (i386_stopped_data_address): New function.
8114 (i386_initial_stuff): Update.
8115 (get_thread_context,set_thread_context,i386_thread_added): Update.
8116 (the_low_target): Add entries for insert_point,
8117 remove_point, stopped_by_watchpoint, stopped_data_address.
8118 * win32-low.c (win32_insert_watchpoint): New function.
8119 (win32_remove_watchpoint): New function.
8120 (win32_stopped_by_watchpoint): New function.
8121 (win32_stopped_data_address): New function.
8122 (win32_target_ops): Add entries for insert_watchpoint,
8123 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8124 * win32-low.h (win32_target_ops): New members insert_point,
8125 remove_point, stopped_by_watchpoint, stopped_data_address.
8127 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8129 * server.c (process_serial_event): Re-return unsupported, not
8130 error, if the type isn't recognized. Re-allow supporting only
8131 insert or remove packets. Also call require_running for
8132 breakpoints. Add missing break statement to default case. Tidy.
8133 * target.h (struct target_ops): Rename insert_watchpoint to
8134 insert_point, and remove_watchpoint to remove_point.
8136 * linux-low.h (struct linux_target_ops): Likewise.
8137 * linux-low.c (linux_insert_watchpoint): Rename to ...
8138 (linux_insert_point): ... this. Adjust.
8139 (linux_remove_watchpoint): Rename to ...
8140 (linux_remove_point): ... this. Adjust.
8141 (linux_target_ops): Adjust.
8142 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8143 (cris_insert_point): ... this.
8144 (cris_remove_watchpoint): Rename to ...
8145 (cris_remove_point): ... this.
8146 (the_low_target): Adjust.
8148 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8150 * server.c (handle_v_kill): Pass signal_pid to
8151 kill_inferior if multi_process is zero.
8153 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8155 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8156 * target.h (target_ops): Comment for *_watchpoint to make it clear
8157 the functions can get types '0' and '1'.
8159 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8161 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8162 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8163 * regcache.c (get_regcache): Likewise.
8164 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8165 * win32-low.c (child_fetch_inferior_registers): Remove check for
8168 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8169 Pedro Alves <pedro@codesourcery.com>
8171 * target.h (struct target_ops) <supports_multi_process>: New
8173 (target_supports_multi_process): New.
8174 * server.c (handle_query): Even if GDB reports support, only
8175 enable multi-process if the target also supports it. Report
8176 multi-process support only if the target backend supports it.
8177 * linux-low.c (linux_supports_multi_process): New function.
8178 (linux_target_ops): Install it as target_supports_multi_process
8181 2009-05-24 Doug Evans <dje@google.com>
8183 Global renaming of find_thread_pid to find_thread_ptid.
8184 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8185 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8186 All callers updated.
8188 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8189 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8192 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8193 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8194 (linux_resume_one_lwp): Ditto.
8196 2009-05-23 Doug Evans <dje@google.com>
8198 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8199 from struct inferior_list_entry * to struct lwp_info *.
8200 All callers updated.
8202 2009-05-13 Doug Evans <dje@google.com>
8204 * linux-x86-low.c: Don't include assert.h.
8205 (x86_siginfo_fixup): Use fatal, not assert.
8206 (x86_arch_setup): Fix comment.
8208 2009-05-12 Doug Evans <dje@google.com>
8210 Biarch support for i386/amd64 gdbserver.
8211 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8212 Add linux-x86-low.c.
8213 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8214 (linux-x86-low.o): Add.
8215 * linux-x86-64-low.c: Delete.
8216 * linux-i386-low.c: Delete.
8217 * linux-x86-low.c: New file.
8218 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8220 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8222 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8223 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8224 (linux_child_pid_to_exec_file): New function.
8225 (elf_64_header_p, elf_64_file_p): New functions.
8226 (siginfo_fixup): New function.
8227 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8228 give target a chance to convert layout.
8229 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8230 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8232 2009-05-07 Doug Evans <dje@google.com>
8234 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8235 (regsets_store_inferior_registers): Ditto.
8237 2009-05-06 Pedro Alves <pedro@codesourcery.com>
8241 * linux-low.c (must_set_ptrace_flags): Delete.
8242 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8244 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8245 `lwp->must_set_ptrace_flags' instead.
8246 (linux_wait_for_event_1): Set ptrace options here.
8247 (linux_wait_1): ... not here.
8249 2009-04-30 Doug Evans <dje@google.com>
8251 * inferiors.c (started_inferior_callback): New function.
8252 (attached_inferior_callback): New function.
8253 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8254 * server.c (print_started_pid, print_attached_pid): New functions.
8255 (detach_or_kill_for_exit): New function.
8256 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8257 * server.h (have_started_inferiors_p): Declare.
8258 (have_attached_inferiors_p): Declare.
8260 * inferiors.c (remove_process): Fix memory leak, free process.
8261 * linux-low.c (linux_remove_process): New function.
8262 (linux_kill): Call it instead of remove_process.
8263 (linux_detach, linux_wait_1): Ditto.
8265 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8267 * configure.srv: Add x86 Windows CE target.
8269 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8271 * inferiors.c (get_thread_process): Make global.
8272 * server.h (get_thread_process): Add prototype.
8273 * thread-db.c (find_one_thread): Use get_thread_process
8274 instead of current_process.
8275 (thread_db_get_tls_address): Do not crash if called when
8276 thread layer is not yet initialized.
8278 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8280 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8281 * spu-low.c (current_tid): Rename to ...
8282 (current_ptid): ... this.
8283 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8284 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8285 ptid_get_lwp (current_ptid) instead of current_tid.
8286 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8287 instead of current_tid. Use find_process_pid to verify pid
8288 argument is valid. Pass proper argument to remove_process.
8289 (spu_thread_alive): Compare current_ptid instead of current_tid.
8290 (spu_resume): Likewise.
8292 2009-04-02 Pedro Alves <pedro@codesourcery.com>
8294 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8297 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8299 Implement the multiprocess extensions, and add linux multiprocess
8302 * server.h (ULONGEST): Declare.
8303 (struct ptid, ptid_t): New.
8304 (minus_one_ptid, null_ptid): Declare.
8305 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8306 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8307 (struct inferior_list_entry): Change `id' type from unsigned from
8309 (struct sym_cache, struct breakpoint, struct
8310 process_info_private): Forward declare.
8311 (struct process_info): Declare.
8312 (current_process): Declare.
8313 (all_processes): Declare.
8314 (initialize_inferiors): Declare.
8315 (add_thread): Adjust to use ptid_t.
8316 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8317 (add_process, remove_process, find_thread_pid): Declare.
8318 (find_inferior_id): Adjust to use ptid_t.
8319 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8320 (multi_process): Declare.
8321 (push_event): Adjust to use ptid_t.
8322 (read_ptid, write_ptid): Declare.
8323 (prepare_resume_reply): Adjust to use ptid_t.
8324 (clear_symbol_cache): Declare.
8325 * inferiors.c (all_processes): New.
8326 (null_ptid, minus_one_ptid): New.
8327 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8328 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8329 (add_thread): Change unsigned long to ptid. Remove gdb_id
8331 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8332 (gdb_id_to_thread): Rename to ...
8333 (find_thread_pid): ... this. Change unsigned long to ptid.
8334 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8335 (loaded_dll, pull_pid_from_list): Adjust.
8336 (add_process, remove_process, find_process_pid)
8337 (get_thread_process, current_process, initialize_inferiors): New.
8338 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8339 (struct target_waitstatus) <related_pid>: Ditto.
8340 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8342 (struct target_ops) <join>: Add `pid' argument.
8343 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8344 (struct target_ops) <wait>: Add `ptid' field. Change return type
8346 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8347 (mywait): Add `ptid' argument. Change return type to ptid_t.
8348 (target_pid_to_str): Declare.
8349 * target.c (set_desired_inferior): Adjust to use ptids.
8350 (mywait): Add new `ptid' argument. Adjust.
8351 (target_pid_to_str): New.
8352 * mem-break.h (free_all_breakpoints): Declare.
8353 * mem-break.c (breakpoints): Delelete.
8354 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8355 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8356 to use per-process breakpoint list.
8357 (free_all_breakpoints): New.
8358 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8359 (symbol_cache, all_symbols_looked_up): Delete.
8361 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8363 (prepare_resume_reply): Change ptid argument's type from unsigned
8364 long to ptid_t. Adjust. Implement W;process and X;process.
8365 (free_sym_cache, clear_symbol_cache): New.
8366 (look_up_one_symbol): Adjust to per-process symbol cache. *
8367 * server.c (cont_thread, general_thread, step_thread): Change type
8370 (multi_process): New.
8371 (last_ptid): Change type to ptid_t.
8372 (struct vstop_notif) <ptid>: Change type to ptid_t.
8373 (queue_stop_reply, push_event): Change `ptid' argument's type to
8375 (discard_queued_stop_replies): Add `pid' argument.
8376 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8377 changes. Don't reference the `attached' global.
8378 (attach_inferior): Adjust to mywait interface changes.
8379 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8380 features. Handle and report "multiprocess+". Handle
8382 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8384 (handle_v_kill): New.
8385 (handle_v_stopped): Adjust to use target_pid_to_str.
8386 (handle_v_requests): Allow multiple attaches and runs when
8387 multiprocess extensions are in effect. Handle "vKill".
8388 (myresume): Adjust to use ptids.
8389 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8390 (handle_status): Adjust to discard_queued_stop_replies interface
8392 (first_thread_of, kill_inferior_callback)
8393 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8394 (main): Call initialize_inferiors. Adjust to use ptids, killing
8395 and detaching from all inferiors. Handle multiprocess packet
8397 * linux-low.h: Include gdb_proc_service.h.
8398 (struct process_info_private): New.
8399 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8400 <lwpid_of>: Use ptid_get_lwp.
8401 (get_lwp_thread): Adjust.
8402 (struct lwp_info): Add `dead' member.
8403 (find_lwp_pid): Declare.
8404 * linux-low.c (thread_db_active): Delete.
8405 (new_inferior): Adjust comment.
8406 (inferior_pid): Delete.
8407 (linux_add_process): New.
8408 (handle_extended_wait): Adjust.
8409 (add_lwp): Change unsigned long to ptid.
8410 (linux_create_inferior): Add process to processes table. Adjust
8411 to use ptids. Don't set new_inferior here.
8412 (linux_attach_lwp): Rename to ...
8413 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8414 it. Adjust to use ptids.
8415 (linux_attach_lwp): New.
8416 (linux_attach): Add process to processes table. Don't set
8418 (struct counter): New.
8419 (second_thread_of_pid_p, last_thread_of_process_p): New.
8420 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8422 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8423 processes. Remove process from process table.
8424 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8425 to multiple processes.
8426 (any_thread_of): New.
8427 (linux_detach): Add `pid' argument, and handle it. Remove process
8428 from processes table.
8429 (linux_join): Add `pid' argument. Handle it.
8430 (linux_thread_alive): Change unsighed long argument to ptid_t.
8431 Consider dead lwps as not being alive.
8432 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8433 threads we're not interested in.
8434 (same_lwp, find_lwp_pid): New.
8435 (linux_wait_for_lwp): Change `pid' argument's type from int to
8437 (linux_wait_for_event): Rename to ...
8438 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8439 from int to ptid_t. Adjust.
8440 (linux_wait_for_event): New.
8441 (linux_wait_1): Add `ptid' argument. Change return type to
8442 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8443 that exit from the process table.
8444 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8446 (mark_lwp_dead): New.
8447 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8448 stopping all threads, mark its main lwp as dead.
8449 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8451 (fetch_register, usr_store_inferior_registers)
8452 (regsets_fetch_inferior_registers)
8453 (regsets_store_inferior_registers, linux_read_memory)
8454 (linux_write_memory): Inline `inferior_pid'.
8455 (linux_look_up_symbols): Adjust to use per-process
8457 (linux_request_interrupt): Adjust to use ptids.
8458 (linux_read_auxv): Inline `inferior_pid'.
8459 (initialize_low): Don't reference thread_db_active.
8460 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8461 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8462 (ps_getpid): Return the pid of the current inferior.
8463 * thread-db.c (proc_handle, thread_agent): Delete.
8464 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8466 (find_one_thread): Change argument type to ptid_t. Adjust to
8468 (maybe_attach_thread): Adjust to per-process data and ptids.
8469 (thread_db_find_new_threads): Ditto.
8470 (thread_db_init): Ditto.
8471 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8472 processes table. Adjust to use ptids.
8473 (spu_kill, spu_detach): Adjust interface. Remove process from
8475 (spu_join, spu_thread_alive): Adjust interface.
8476 (spu_wait): Adjust interface. Remove process from processes
8477 table. Adjust to use ptids.
8478 * win32-low.c (current_inferior_tid): Delete.
8479 (current_inferior_ptid): New.
8480 (debug_event_ptid): New.
8481 (thread_rec): Take a ptid. Adjust.
8482 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8483 (child_delete_thread): Ditto.
8484 (do_initial_child_stuff): Add `attached' argument. Add process to
8486 (child_fetch_inferior_registers, child_store_inferior_registers):
8488 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8489 (win32_attach): Pass 1 to do_initial_child_stuff.
8490 (win32_kill): Adjust interface. Remove process from processes
8492 (win32_detach): Ditto.
8493 (win32_join): Adjust interface.
8494 (win32_thread_alive): Take a ptid.
8495 (win32_resume): Adjust to use ptids.
8496 (get_child_debug_event): Ditto.
8497 (win32_wait): Adjust interface. Remove exiting process from
8500 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8502 Non-stop mode support.
8504 * server.h (non_stop): Declare.
8505 (gdb_client_data, handler_func): Declare.
8506 (delete_file_handler, add_file_handler, start_event_loop):
8508 (handle_serial_event, handle_target_event, push_event)
8509 (putpkt_notif): Declare.
8510 * target.h (enum resume_kind): New.
8511 (struct thread_resume): Replace `step' field by `kind' field.
8512 (TARGET_WNOHANG): Define.
8513 (struct target_ops) <wait>: Add `options' argument.
8514 <supports_non_stop, async, start_non_stop>: New fields.
8515 (target_supports_non_stop, target_async): New.
8516 (start_non_stop): Declare.
8517 (mywait): Add `options' argument.
8518 * target.c (mywait): Add `options' argument. Print child exit
8520 (start_non_stop): New.
8521 * server.c (non_stop, own_buf, mem_buf): New globals.
8522 (struct vstop_notif): New.
8523 (notif_queue): New global.
8524 (queue_stop_reply, push_event, discard_queued_stop_replies)
8525 (send_next_stop_reply): New.
8526 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8528 (attach_inferior): In non-stop mode, don't wait for the target
8530 (handle_general_set): Handle QNonStop.
8531 (handle_query): When handling qC, return the current general
8532 thread, instead of the first thread of the list.
8533 (handle_query): If the backend supports non-stop mode, include
8534 QNonStop+ in the qSupported query response.
8535 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8537 (handle_v_attach, handle_v_run): Handle non-stop mode.
8538 (handle_v_stopped): New.
8539 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8540 (myresume): Adjust to use resume_kind. Handle non-stop.
8541 (queue_stop_reply_callback): New.
8542 (handle_status): Handle non-stop mode.
8543 (main): Clear non_stop flag on reconnection. Use the event-loop.
8544 Refactor serial protocol handling from here ...
8545 (process_serial_event): ... to this new function. When GDB
8546 selects any thread, select one here. In non-stop mode, wait until
8547 GDB acks all pending events before exiting.
8548 (handle_serial_event, handle_target_event): New.
8549 * remote-utils.c (remote_open): Install remote_desc in the event
8551 (remote_close): Remove remote_desc from the event loop.
8552 (putpkt_binary): Rename to...
8553 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8554 (putpkt_binary): New as wrapper around putpkt_binary_1.
8555 (putpkt_notif): New.
8556 (prepare_resume_reply): In non-stop mode, don't change the
8558 * event-loop.c: New.
8559 * Makefile.in (OBJ): Add event-loop.o.
8560 (event-loop.o): New rule.
8562 * linux-low.h (pid_of): Moved here.
8564 (get_lwp_thread): Use lwpid_of.
8565 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8566 * linux-low.c (pid_of): Delete.
8567 (inferior_pid): Use lwpid_of.
8568 (linux_event_pipe): New.
8569 (target_is_async_p): New.
8571 (handle_extended_wait): Use lwpid_of.
8572 (add_lwp): Don't set lwpid field.
8573 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8574 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8575 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8576 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8577 first. Adjust to linux_wait_for_event interface changes. Use
8579 (linux_detach): Don't delete the main lwp here.
8580 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8581 (status_pending_p): Don't consider explicitly suspended lwps.
8582 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8583 pointer. Add OPTIONS argument. Change return type to int. Use
8584 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8585 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8586 pointer. Add status pointer argument. Return a pid instead of a
8587 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8588 changes. In non-stop mode, don't switch to a random thread.
8589 (linux_wait): Rename to...
8590 (linux_wait_1): ... this. Add target_options argument, and handle
8591 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8592 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8593 clean exit and signal exit code. Don't stop all threads in
8594 non-stop mode. In all-stop mode, only stop all threads when
8595 reporting a stop to GDB. Handle explicit thread stop requests.
8596 (async_file_flush, async_file_mark): New.
8598 (send_sigstop): Use lwpid_of.
8599 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8600 interface changes. In non-stop mode, don't switch to a random
8602 (linux_resume_one_lwp): Use lwpid_of.
8603 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8604 (linux_resume_one_thread): ... this. Handle resume_stop. In
8605 non-stop mode, don't look for pending flag in all threads.
8606 (resume_status_pending_p): Don't consider explicitly suspended
8608 (my_waitpid): Reimplement. Emulate __WALL.
8609 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8611 (sigchld_handler, linux_supports_non_stop, linux_async)
8612 (linux_start_non_stop): New.
8613 (linux_target_ops): Register linux_supports_non_stop, linux_async
8614 and linux_start_non_stop.
8615 (initialize_low): Install SIGCHLD handler.
8616 * thread-db.c (thread_db_create_event, find_one_thread)
8617 (thread_db_get_tls_address): Use lwpid_of.
8618 * win32-low.c (win32_detach): Adjust to use resume_kind.
8619 (win32_wait): Add `options' argument.
8620 * spu-low.c (spu_resume): Adjust to use resume_kind.
8621 (spu_wait): Add `options' argument.
8623 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8625 Decouple target code from remote protocol.
8627 * target.h (enum target_waitkind): New.
8628 (struct target_waitstatus): New.
8629 (struct target_ops) <wait>: Return an unsigned long. Take a
8630 target_waitstatus pointer instead of a char pointer.
8632 * target.c (mywait): Change prototype to return an unsigned long.
8633 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8634 * server.h (thread_from_wait, old_thread_from_wait): Delete
8636 (prepare_resume_reply): Change prototype to take a
8638 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8639 (last_status, last_ptid): New.
8640 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8641 pid instead of a signal.
8642 (attach_inferior): Remove "status" and "signal" parameters.
8644 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8646 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8647 (handle_v_requests, myresume): Remove "status" and "signal"
8649 (handle_status): New.
8650 (main): Delete local `status'. Adjust.
8651 * remote-utils.c: Include target.h.
8652 (prepare_resume_reply): Change prototype to take a
8653 target_waitstatus. Adjust.
8655 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8657 * spu-low.c (spu_wait): Adjust.
8658 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8660 (win32_wait): Adjust.
8662 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8664 * target.h (struct thread_resume): Delete leave_stopped member.
8665 (struct target_ops): Add a `n' argument to the `resume' callback.
8666 * server.c (start_inferior): Adjust.
8667 (handle_v_cont, myresume): Adjust.
8668 * linux-low.c (check_removed_breakpoint): Adjust to resume
8669 interface change, and to removed leave_stopped field.
8670 (resume_ptr): Delete.
8671 (struct thread_resume_array): New.
8672 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8673 resume interface change.
8674 (linux_continue_one_thread, linux_queue_one_thread)
8675 (resume_status_pending_p): Check if the resume field is NULL
8676 instead of checking the leave_stopped member.
8677 (linux_resume): Adjust to the target resume interface change.
8678 * spu-low.c (spu_resume): Adjust to the target resume interface
8680 * win32-low.c (win32_detach, win32_resume): Ditto.
8682 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8684 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8686 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8688 (linux_continue_one_thread): Only preserve the stepping flag if
8689 there's a pending breakpoint.
8691 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8693 * server.c (main): After the inferior having exited, call
8694 remote_close before exiting gdbserver.
8696 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8698 Fix size of FPSCR in Power 7 processors.
8699 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8700 (PPC_FEATURE_HAS_DFP): New #define.
8701 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8704 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8706 * server.c (handle_query) Whitespace and formatting.
8708 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8710 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8711 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8712 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8713 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8714 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8715 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8716 Makefile.in, configure.ac: Fix whitespace throughout.
8717 * configure: Regenerate.
8719 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8721 * inferiors.c (find_inferior): Make it safe for the callback
8722 function to delete the currently iterated inferior.
8724 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8726 * Makefile.in (linuw_low_h): Move higher.
8727 (thread-db.o): Depend on $(linux_low_h).
8729 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8731 Rename "process" to "lwp" throughout.
8733 * linux-low.c (all_processes): Rename to...
8734 (all_lwps): ... this.
8735 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8736 (add_process): Rename to ...
8737 (add_lwp): ... this. Adjust.
8738 (linux_create_inferior): Adjust.
8739 (linux_attach_lwp): Adjust.
8740 (linux_attach): Adjust.
8741 (linux_kill_one_process): Rename to ...
8742 (linux_kill_one_lwp): ... this. Adjust.
8743 (linux_kill): Adjust.
8744 (linux_detach_one_process): Rename to ...
8745 (linux_detach_one_lwp): ... this. Adjust.
8746 (linux_detach): Adjust.
8747 (check_removed_breakpoint): Adjust.
8748 (status_pending_p): Adjust.
8749 (linux_wait_for_process): Rename to ...
8750 (linux_wait_for_lwp): ... this. Adjust.
8751 (linux_wait_for_event): Adjust.
8752 (send_sigstop): Adjust.
8753 (wait_for_sigstop): Adjust.
8754 (stop_all_processes): Rename to ...
8755 (stop_all_lwps): ... this.
8756 (linux_resume_one_process): Rename to ...
8757 (linux_resume_one_lwp): ... this. Adjust.
8758 (linux_set_resume_request, linux_continue_one_thread)
8759 (linux_queue_one_thread, resume_status_pending_p)
8760 (usr_store_inferior_registers, regsets_store_inferior_registers)
8761 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8763 * linux-low.h (get_process): Rename to ...
8764 (get_lwp): ... this. Adjust.
8765 (get_thread_process): Rename to ...
8766 (get_thread_lwp): ... this. Adjust.
8767 (get_process_thread): Rename to ...
8768 (get_lwp_thread): ... this. Adjust.
8769 (struct process_info): Rename to ...
8770 (struct lwp_info): ... this.
8771 (all_processes): Rename to ...
8772 (all_lwps): ... this.
8773 * proc-service.c (ps_lgetregs): Adjust.
8774 * thread-db.c (thread_db_create_event, find_one_thread)
8775 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8777 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8779 * server.c (handle_query): Handle "qAttached".
8781 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8783 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8784 GPLv3, update license URL.
8786 2009-03-01 Doug Evans <dje@google.com>
8788 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8789 (server_h): Add gdb_signals.h.
8790 (signals.o): Update.
8791 * server.h (target_signal_from_host,target_signal_to_host_p)
8792 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8794 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8796 * remote-utils.c (getpkt): Also generate remote-debug
8797 information if noack_mode is set.
8799 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8801 * server.c (handle_query): Report qXfer:siginfo:read and
8802 qXfer:siginfo:write as supported and handle them.
8803 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8804 * linux-low.c (linux_xfer_siginfo): New.
8805 (linux_target_ops): Set it.
8807 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8809 * server.c (gdbserver_usage): Mention --remote-debug.
8810 (main): Accept '--remote-debug' switch.
8812 2009-01-18 Doug Evans <dje@google.com>
8814 * regcache.c (new_register_cache): No need to check result of xcalloc.
8815 * server.c (handle_search_memory): Back out calls to xmalloc,
8816 result is checked and error is returned to user upon failure.
8817 (handle_query): Ditto. Add more checks for result of malloc.
8818 (handle_v_cont): Check result of malloc, report error back to
8820 (handle_v_run): Ditto. Call freeargv.
8821 * server.h (freeargv): Declare.
8822 * utils.c (freeargv): New fn.
8824 2009-01-15 Doug Evans <dje@google.com>
8826 * gdbreplay.c (perror_with_name): Make arg const char *.
8827 * server.h (target_signal_to_name): Make return type const char *.
8828 * thread-db.c (thread_db_err_str): Make return type const char *.
8829 * utils.c (perror_with_name): Make arg const char *.
8831 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8833 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8834 when handling a EXIT_PROCESS_DEBUG_EVENT.
8836 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8838 * gdbreplay.c (gdbreplay_version): Update copyright year.
8839 * server.c (gdbserver_version): Likewise.
8841 2009-01-05 Doug Evans <dje@google.com>
8843 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8844 (handle_extended_wait): Improve comment.
8846 2008-12-13 Doug Evans <dje@google.com>
8848 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8849 * server.h (ATTR_MALLOC): New macro.
8850 (xmalloc,xcalloc,xstrdup): Declare.
8851 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8852 * inferiors.c: Ditto.
8853 * linux-low.c: Ditto.
8854 * mem-break.c: Ditto.
8855 * regcache.c: Ditto.
8856 * remote-utils.c: Ditto.
8859 * win32-low.c: Ditto.
8861 2008-12-12 Doug Evans <dje@google.com>
8863 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8864 in debugging printf.
8866 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8868 2008-12-09 Doug Evans <dje@google.com>
8870 * linux-low.h (struct process_info): Delete member tid, unused.
8871 * thread-db.c (find_one_thread): Update.
8872 (maybe_attach_thread): Update.
8874 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8876 * target.h (struct target_ops): Add qxfer_osdata member.
8877 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8879 (linux_qxfer_osdata): New functions.
8880 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8882 * server.c (handle_query): Handle "qXfer:osdata:read:".
8883 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8884 (buffer_xml_printf): New functions.
8885 * server.h (struct buffer): New.
8886 (buffer_grow_str, buffer_grow_str0): New macros.
8887 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8888 (buffer_xml_printf): Declare.
8890 2008-11-24 Doug Evans <dje@google.com>
8892 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8894 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8896 * server.c (handle_v_run): Always use the supplied argument list.
8898 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8900 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8901 (xtensa_regmap_table): Add entry for scompare1.
8903 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8905 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8906 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8907 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8908 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8909 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8910 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8911 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8912 XML target descriptions.
8913 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8914 when inferior is running on an ISA 2.05 or later processor. Add
8915 special case to return offset for full 64-bit slot of FPSCR when
8918 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8920 * Makefile.in (SFILES, clean): Added sparc64 files.
8921 (reg-sparc64.o, reg-sparc64.c): New.
8922 * configure.srv (sparc*-*-linux*): New configuration.
8923 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8924 syscall arguments for SPARC.
8925 (regsets_store_inferior_registers): Likewise.
8926 * linux-sparc-low.c: New file.
8928 2008-10-21 Doug Evans <dje@google.com>
8930 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8931 (READLINE_DIR,READLINE_DEP): Delete.
8932 (INTERNAL_CFLAGS): Update.
8933 (LINTFLAGS): Update.
8935 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8937 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8938 whole argv from the last run, not just argv[0].
8940 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8942 * regcache.c (new_register_cache): Return NULL if the register
8943 cache size isn't known yet.
8944 (free_register_cache): Avoid dereferencing a NULL regcache.
8946 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8948 * configure.srv: Merge MIPS and MIPS64.
8950 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8952 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8954 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8956 * Makefile.in: Add required vsx dependencies.
8958 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8959 Declare init_registers_powerpc_vsx32l.
8960 Declare init_registers_powerpc_vsx64l.
8961 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8962 (ppc_arch_setup): Check for VSX in hwcap.
8963 (ppc_fill_vsxregset): New function.
8964 (ppc_store_vsxregset): New function.
8965 Add new VSX entry in regset_info target_regsets.
8967 * configure.srv: Add new VSX dependencies.
8969 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8971 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8972 (remote_open): Set or clear transport_is_reliable.
8973 (putpkt_binary): Don't expect acks in noack mode.
8974 (getpkt): Don't send ack/nac in noack mode.
8975 * server.c (handle_general_set): Handle QStartNoAckMode.
8976 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8978 (main): Reset noack_mode on every connection.
8979 * server.h (noack_mode): Declare.
8981 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8983 * Makefile.in (GDBREPLAY_OBS): New variable.
8984 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8986 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8987 Daniel Jacobowitz <dan@codesourcery.com>
8989 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8990 (usr_store_inferior_registers): Likewise.
8991 (regsets_store_inferior_registers): Likewise.
8993 2008-07-31 Rolf Jansen <rj@surtec.com>
8994 Pedro Alves <pedro@codesourcery.com>
8996 * configure.ac: Check for memmem declaration.
8997 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8998 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8999 (disable_packet_qfThreadInfo): Unconditionally compile.
9000 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9001 * configure, config.in: Regenerate.
9003 2008-07-28 Doug Kwan <dougkwan@google.com>
9005 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9006 (linux_write_memory): Remove declaration of errno.
9008 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9010 * linux-low.c (handle_extended_wait): Do not use "status"
9011 variable uninitialized.
9013 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9015 * server.c (handle_v_attach): Inhibit reporting dll changes.
9017 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9019 * remote-utils.c (prepare_resume_reply): If requested, don't
9020 output "thread:TID" in the T stop reply.
9022 * server.c (disable_packet_vCont, disable_packet_Tthread)
9023 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9024 (handle_query): If requested, disable support for qC, qfThreadInfo
9026 (handle_v_requests): If requested, disable support for vCont.
9027 (gdbserver_show_disableable): New.
9028 (main): Handle --disable-packet and --disable-packet=LIST.
9030 * server.h (disable_packet_vCont, disable_packet_Tthread)
9031 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9033 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9035 * server.c (gdbserver_usage): Mention --version.
9037 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9039 * Makefile.in (gdbreplay.o): New rule.
9041 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9043 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9044 message, not gdbserver.
9046 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9047 Nathan Sidwell <nathan@codesourcery.com>
9048 Joseph Myers <joseph@codesourcery.com>
9050 * acinclude.m4: Include ../../config/acx.m4.
9051 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9052 * configure, config.in: Regenerate.
9053 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9054 * server.c (gdbserver_version): Print PKGVERSION.
9055 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9056 (main): Adjust gdbserver_usage calls.
9057 * gdbreplay.c (version, host_name): Add declarations.
9058 (gdbreplay_version, gdbreplay_usage): New.
9059 (main): Accept --version and --help options.
9061 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9063 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9064 (arm_breakpoint_at): Handle Thumb.
9065 (the_low_target): Add comment.
9067 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9069 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9071 2008-05-09 Doug Evans <dje@google.com>
9073 * server.h (decode_search_memory_packet): Declare.
9074 * remote-utils.c (decode_search_memory_packet): New fn.
9075 * server.c (handle_search_memory_1): New fn.
9076 (handle_search_memory): New fn.
9077 (handle_query): Process qSearch:memory packets.
9079 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9081 * regcache.c (registers_length): Remove.
9082 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9083 full register packet.
9084 * regcache.h (registers_length): Remove prototype.
9085 * server.h (PBUFSIZ): Define to 16384.
9087 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9089 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9090 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9091 powerpc-64l.o, and powerpc-altivec64l.o.
9092 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9093 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9094 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9095 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9096 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9099 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9100 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9101 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9102 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9103 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9104 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9105 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9106 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9107 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9108 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9111 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9112 (init_registers_powerpc_32l): ... this new prototype.
9113 (init_registers_powerpc_32): Remove, replace by ...
9114 (init_registers_powerpc_altivec32l): ... this new prototype.
9115 (init_registers_powerpc_e500): Remove, replace by ...
9116 (init_registers_powerpc_e500l): ... this new prototype.
9117 (init_registers_ppc64): Remove, replace by ...
9118 (init_registers_powerpc_64l): ... this new prototype.
9119 (init_registers_powerpc_64): Remove, replace by ...
9120 (init_registers_powerpc_altivec64l): ... this new prototype.
9121 (ppc_num_regs): Set to 73.
9122 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9123 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9124 (ppc_cannot_store_register): Handle orig_r3 and trap.
9125 (ppc_arch_setup): Update init_registers_... calls.
9126 (ppc_fill_gregset): Handle orig_r3 and trap.
9128 * inferiors.c (clear_inferiors): Reset current_inferior.
9130 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9132 * acinclude.m4: Add override.m4.
9133 * configure: Regenerate.
9135 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9137 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9138 initial call to init_register_ppc64.
9140 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9142 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9143 single powerpc*-*-linux* case.
9144 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9146 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9148 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9149 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9151 * linux-ppc-low.c: Include <elf.h>.
9152 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9153 (ppc_hwcap): New global variable.
9154 (ppc_regmap): Remove __SPE__ #ifdef sections.
9155 (ppc_regmap_e500): New global variable.
9156 (ppc_cannot_store_register): Update __SPE__ special case.
9157 (ppc_get_hwcap): New function.
9158 (ppc_arch_setup): Use it to determine whether inferior supports
9159 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9160 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9161 Do not access registers if target does not support AltiVec.
9162 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9163 Do not access registers if target does not support SPE.
9164 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9166 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9168 * linux-low.c (disabled_regsets, num_regsets): New.
9169 (use_regsets_p): Delete.
9170 (linux_wait_for_process): Clear disabled_regsets.
9171 (regsets_fetch_inferior_registers): Check and set it.
9172 (regsets_store_inferior_registers): Likewise.
9173 (linux_fetch_registers, linux_store_registers): Do not use
9175 (initialize_low): Allocate disabled_regsets.
9177 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9179 * Makefile.in (LIBOBJS): New.
9181 (memmem.o): New rule.
9182 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9183 * configure: Regenerated.
9185 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9187 * server.c (handle_query): Never return "unsupported" for
9188 qXfer:features:read queries.
9190 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9192 * server.c (get_features_xml): Fix inverted condition.
9193 (handle_query): Always support qXfer:feature:read.
9195 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9197 * server.c (wrapper_argv): New.
9198 (start_inferior): Handle wrapper_argv. If set, expect an extra
9200 (gdbserver_usage): Document --wrapper.
9201 (main): Parse --wrapper.
9203 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9205 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9206 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9207 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9208 (ppc_set_pc): Likewise.
9209 (ppc_arch_setup): New function.
9210 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9211 of collect_register.
9212 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9214 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9216 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9217 instead of linux-ppc64-low.o.
9218 * linux-ppc64-low.c: Remove file.
9219 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9220 (linux-ppc64-low.o): Remove rule.
9222 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9223 (init_registers_powerpc_64): Likewise.
9224 (ppc_regmap): Conditionally define depending on __powerpc64__.
9225 (ppc_cannot_store_register): Do not special-case "fpscr" when
9226 compiled on __powerpc64__.
9227 (ppc_collect_ptrace_register): New function.
9228 (ppc_supply_ptrace_register): New function.
9229 (ppc_breakpoint): Change type to "unsigned int".
9230 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9231 (the_low_target): Conditionally provide initializers for the
9232 arch_setup member depending on __powerpc64__. Install
9233 collect_ptrace_register and supply_ptrace_register members.
9235 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9237 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9238 * server.c (gdbserver_xmltarget): Define.
9239 (get_features_xml): Use it to replace "target.xml" and arch_string.
9241 * configure.srv: Remove srv_xmltarget. Add XML files that were
9242 mentioned there to srv_xmlfiles instead. Remove conditional tests
9243 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9244 srv_xmlfiles and srv_regobj to include all possible choices.
9245 * configure.ac (srv_xmltarget): Remove.
9246 (srv_xmlfiles): Do not add "target.xml".
9247 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9248 checks for supplementary target information.
9249 * configure: Regenerate.
9250 * Makefile.in (XML_TARGET): Remove.
9251 (target.xml): Remove rule.
9252 (clean): Do not clean up target.xml.
9253 (.PRECIOUS): Do not mention target.xml.
9255 * target.h (struct target_ops): Remove arch_string member.
9256 * linux-low.c (linux_arch_string): Remove.
9257 (linux_target_ops): Remove arch_string initializer.
9258 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9259 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9260 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9261 * spu-low.c (spu_arch_string): Remove.
9262 (spu_target_ops): Remove arch_string initializer.
9263 * win32-low.c (win32_arch_string): Remove.
9264 (win32_target_ops): Remove arch_string initializer.
9265 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9266 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9267 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9269 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9271 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9272 by collect_ptrace_register and supply_ptrace_register hooks.
9273 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9274 instead of checking for the_low_target.left_pad_xfer.
9275 (usr_store_inferior_registers): Use collect_ptrace_register callback
9276 instead of checking for the_low_target.left_pad_xfer.
9278 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9279 (s390_supply_ptrace_register): Likewise.
9280 (s390_fill_gregset): Call s390_collect_ptrace_register.
9281 (the_low_target): Update.
9283 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9284 (ppc_supply_ptrace_register): Likewise.
9285 (the_low_target): Update.
9287 * linux-i386-low.c (the_low_target): Update.
9288 * linux-x86-64-low.c (the_low_target): Update.
9290 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9292 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9293 reg-s390.o and reg-s390x.o.
9295 * linux-low.c (new_inferior): New global variable.
9296 (linux_create_inferior, linux_attach): Set it.
9297 (linux_wait_for_process): Call the_low_target.arch_setup after the
9298 target has stopped for the first time.
9299 (initialize_low): Do not call the_low_target.arch_setup.
9301 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9302 (s390_set_pc): Likewise.
9303 (s390_arch_setup): New function.
9304 (the_low_target): Use s390_arch_setup as arch_setup routine.
9306 * regcache.c (realloc_register_cache): New function.
9307 (set_register_cache): Call it for each existing regcache.
9309 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9311 * server.h (init_registers): Remove prototype.
9313 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9314 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9315 instead of init_registers ().
9316 * linux-arm-low.c (init_registers_arm): Add prototype.
9317 (init_registers_arm_with_iwmmxt): Likewise.
9318 (the_low_target): Add initializer for arch_setup field.
9319 * linux-cris-low.c (init_registers_cris): Add prototype.
9320 (the_low_target): Add initializer for arch_setup field.
9321 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9322 (the_low_target): Add initializer for arch_setup field.
9323 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9324 (the_low_target): Add initializer for arch_setup field.
9325 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9326 (the_low_target): Add initializer for arch_setup field.
9327 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9328 (the_low_target): Add initializer for arch_setup field.
9329 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9330 (the_low_target): Add initializer for arch_setup field.
9331 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9332 (init_registers_mips64_linux): Likewise.
9333 (the_low_target): Add initializer for arch_setup field.
9334 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9335 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9336 (the_low_target): Add initializer for arch_setup field.
9337 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9338 (init_registers_powerpc_64): Likewise.
9339 (the_low_target): Add initializer for arch_setup field.
9340 * linux-s390-low.c (init_registers_s390): Add prototype.
9341 (init_registers_s390x): Likewise.
9342 (the_low_target): Add initializer for arch_setup field.
9343 * linux-sh-low.c (init_registers_sh): Add prototype.
9344 (the_low_target): Add initializer for arch_setup field.
9345 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9346 (the_low_target): Add initializer for arch_setup field.
9347 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9348 (the_low_target): Add initializer for arch_setup field.
9350 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9351 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9352 instead of init_registers ().
9353 * win32-arm-low.c (init_registers_arm): Add prototype.
9354 (the_low_target): Add initializer for arch_setup field.
9355 * win32-i386-low.c (init_registers_i386): Add prototype.
9356 (the_low_target): Add initializer for arch_setup field.
9358 * spu-low.c (init_registers_spu): Add prototype.
9359 (initialize_low): Call initialie_registers_spu () instead of
9360 initialize_registers ().
9362 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9364 * server.c (handle_v_requests): When handling the vRun and vAttach
9365 packets, if already debugging a process, don't kill it. Return an
9368 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9370 * server.c (handle_query): Correct length check.
9372 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9374 * win32-low.c (do_initial_child_stuff): Add process handle
9375 parameter. Set current_process_handle and current_process_id from the
9376 parameters. Clear globals.
9377 (win32_create_inferior): Don't set current_process_handle and
9378 current_process_id here. Instead pass them on the call to
9379 do_initial_child_stuff.
9380 (win32_attach): Likewise.
9381 (win32_clear_inferiors): New.
9382 (win32_kill): Don't close the current process handle or the
9383 current thread handle here. Instead call win32_clear_inferiors.
9384 (win32_detach): Don't open a new handle to the process. Call
9385 win32_clear_inferiors.
9386 (win32_join): Don't rely on current_process_handle; open a new
9387 handle using the process id.
9388 (win32_wait): Call win32_clear_inferiors when the inferior process
9391 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9393 * server.c (monitor_show_help): Add "exit".
9395 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9397 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9398 (clean): Add reg-xtensa.c.
9399 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9400 * configure.srv (xtensa*-*-linux*) New target.
9401 * linux-xtensa-low.c: New.
9402 * xtensa-xtregs.c: New.
9404 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9406 * hostio.c: Don't include errno.h.
9407 (errno_to_fileio_errno): Move to hostio-errno.
9408 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9409 error number outputting to the target->hostio_last_error callback.
9410 (hostio_packet_error): Use FILEIO_EINVAL directly.
9411 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9412 calls to hostio_error.
9413 * hostio-errno.c: New.
9414 * server.h (hostio_last_error_from_errno): Declare.
9415 * target.h (target_ops): Add hostio_last_error member.
9416 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9417 as hostio_last_error handler.
9418 * spu-low.c (spu_target_ops): Likewise.
9419 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9420 (wince_hostio_last_error): New functions.
9421 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9422 as hostio_last_error handler.
9423 (win32_target_ops) [!_WIN32_WCE]: Register
9424 hostio_last_error_from_errno as hostio_last_error handler.
9425 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9426 (hostio-errno.o): New rule.
9427 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9428 * configure.srv (srv_hostio_err_objs): New variable. Default to
9430 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9431 * configure: Regenerate.
9433 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9435 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9436 (linux_kill, linux_detach): Clean up the process list.
9437 * remote-utils.c (remote_open): Improve port number parsing.
9438 (putpkt_binary, input_interrupt): Only send interrupts if the target
9440 * server.c (extended_protocol): Make static.
9441 (attached): Define earlier.
9442 (exit_requested, response_needed, program_argv): New variables.
9443 (target_running): New.
9444 (start_inferior): Clear attached here.
9445 (attach_inferior): Set attached here.
9446 (require_running): Define.
9447 (handle_query): Use require_running and target_running. Implement
9449 (handle_v_attach, handle_v_run): New.
9450 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9451 (gdbserver_usage): Update.
9452 (main): Redo argument parsing. Handle --debug and --multi. Handle
9453 --attach along with other options or after the port. Save
9454 program_argv. Support no initial program. Resynchronize
9455 communication with GDB after an error. Handle "monitor exit".
9456 Use require_running and target_running. Always allow the extended
9457 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9458 restart in extended mode.
9459 * README: Refer to the GDB manual. Update --attach usage.
9461 2007-12-20 Andreas Schwab <schwab@suse.de>
9463 * linux-low.c (STACK_SIZE): Define.
9464 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9465 (linux_test_for_tracefork): Likewise.
9467 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9469 * linux-low.c (linux_wait_for_event): Update messages. Do not
9470 reinsert auto-delete breakpoints.
9471 * mem-break.c (struct breakpoint): Change return type of handler to
9473 (set_breakpoint_at): Update handler type.
9474 (reinsert_breakpoint_handler): Return 1 instead of calling
9476 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9478 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9479 * mem-break.h (set_breakpoint_at): Update handler type.
9480 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9481 * win32-low.c (auto_delete_breakpoint): New.
9482 (get_child_debug_event): Use it.
9484 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9486 * configure.ac: Check for pread and pwrite.
9487 * hostio.c (handle_pread): Fall back to lseek and read.
9488 (handle_pwrite): Fall back to lseek and write.
9489 * config.in, configure: Regenerated.
9491 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9493 * server.c (myresume): Add own_buf argument.
9494 (main): Update calls.
9496 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9498 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9499 * remote-utils.c (remote_open): Do not call disable_async_io.
9500 (block_async_io): Delete.
9501 (unblock_async_io): Make static.
9502 (initialize_async_io): New.
9503 * server.c (handle_v_cont): Handle async I/O here.
9504 (myresume): Likewise. Move other common resume tasks here...
9505 (main): ... from here. Call initialize_async_io. Disable async
9506 I/O before the main loop.
9507 * server.h (initialize_async_io): Declare.
9508 (block_async_io, unblock_async_io): Delete prototypes.
9509 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9511 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9513 * remote-utils.c (readchar): Allow binary data in received messages.
9515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9517 * win32-low.c (attaching): New global.
9518 (win32_create_inferior): Clear the `attaching' global.
9519 (win32_attach): Set the `attaching' global.
9520 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9521 attaching. Only set a breakpoint at the entry point if not
9524 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9526 * server.c (main): Don't report dll events on the initial
9527 connection on attaches.
9529 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9531 * server.c (main): Relax numerical bases supported for the pid of
9532 the --attach command line argument.
9534 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9536 * win32-low.c (win32_attach): Call OpenProcess before
9537 DebugActiveProcess, not after. Add last error output to error
9540 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9542 * win32-low.c (win32_get_thread_context)
9543 (win32_set_thread_context): New functions.
9544 (thread_rec): Use win32_get_thread_context.
9545 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9546 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9549 2007-12-03 Leo Zayas
9550 Pedro Alves <pedro_alves@portugalmail.pt>
9552 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9554 (child_add_thread): Minor cleanup.
9555 (child_continue): Resume artificially suspended threads before
9556 calling ContinueDebugEvent.
9557 (suspend_one_thread): New.
9558 (fake_breakpoint_event): New.
9559 (get_child_debug_event): Change return type to int. Check here if
9560 gdb sent an interrupt request. If a soft interrupt was requested,
9561 fake a breakpoint event. Return 0 if there is no event to handle,
9563 (win32_wait): Don't check here if gdb sent an interrupt request.
9564 Ensure there is a valid event to handle.
9565 (win32_request_interrupt): Add soft interruption method as last
9568 2007-12-03 Leo Zayas
9569 Pedro Alves <pedro_alves@portugalmail.pt>
9571 * win32-low.h (win32_thread_info): Add descriptions to the
9572 structure members. Replace `suspend_count' counter by a
9574 * win32-low.c (thread_rec): Update condition of when to get the
9575 context from the inferior. Rely on ContextFlags being set if it
9576 has already been retrieved. Only suspend the inferior thread if
9577 we haven't already. Warn if that fails.
9578 (continue_one_thread): s/suspend_count/suspended/. Only call
9579 ResumeThread once. Warn if that fails.
9581 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9583 * win32-low.c (win32_wait): Don't read from the inferior when it
9586 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9588 * Makefile.in (win32_low_h): New variable.
9589 (win32-low.o): Add dependency on $(win32_low_h).
9590 (win32-arm-low.o, win32-i386-low.o): New rules.
9592 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9594 * hostio.c: Correct copyright year.
9596 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9598 * Makefile.in (OBS): Add hostio.o.
9599 (hostio.o): New rule.
9600 * server.h (handle_vFile): Declare.
9601 * hostio.c: New file.
9602 * server.c (handle_v_requests): Take packet_len and new_packet_len
9603 for binary packets. Call handle_vFile.
9604 (main): Update call to handle_v_requests.
9606 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9608 * linux-low.c: Include <sched.h>.
9610 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9612 * linux-low.c (linux_tracefork_grandchild): New.
9613 (linux_tracefork_child): Use clone.
9614 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9616 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9618 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9620 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9622 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9624 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9626 * inferiors.c (change_inferior_id): Delete.
9627 (add_pid_to_list, pull_pid_from_list): New.
9628 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9629 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9630 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9631 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9632 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9633 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9634 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9635 (using_threads): Always set to 1.
9636 (handle_extended_wait): New.
9637 (add_process): Do not set TID.
9638 (linux_create_inferior): Set must_set_ptrace_flags.
9639 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9640 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9641 (linux_thread_alive): Rename TID argument to LWPID.
9642 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9643 (linux_wait_for_event): Do not use TID or check using_threads. Update
9644 call to dead_thread_notify. Call handle_extended_wait.
9645 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9646 (send_sigstop): Delete sigstop_sent.
9647 (wait_for_sigstop): Avoid TID.
9648 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9649 (linux_test_for_tracefork): New.
9650 (linux_lookup_signals): Use thread_db_active and
9651 linux_supports_tracefork_flag.
9652 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9653 * linux-low.h (get_process_thread): Avoid TID.
9654 (struct process_ifo): Move thread_known and tid to the end. Remove
9656 (linux_attach_lwp, thread_db_init): Update prototypes.
9657 * server.h (change_inferior_id): Delete prototype.
9658 (add_pid_to_list, pull_pid_from_list): New prototypes.
9659 * thread-db.c (thread_db_use_events): New.
9660 (find_first_thread): Rename to...
9661 (find_one_thread): ...this. Update callers and messages. Do not
9662 call fatal. Check thread_db_use_events. Do not call
9663 change_inferior_id or new_thread_notify.
9664 (maybe_attach_thread): Update. Do not call new_thread_notify.
9665 (thread_db_init): Set thread_db_use_events. Check use_events.
9666 * utils.c (fatal, warning): Correct message prefix.
9668 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9670 * Makefile.in (clean): Remove new files.
9671 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9672 (powerpc-64.o, powerpc-64.c): New rules.
9673 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9674 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9676 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9678 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9679 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9680 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9681 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9682 (target_regsets): Add AltiVec and SPE register sets.
9683 * configure.ac: Check for AltiVec and SPE.
9684 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9685 (ppc_fill_vrregset, ppc_store_vrregset): New.
9686 (target_regsets): Add AltiVec register set.
9687 * configure: Regenerated.
9689 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9691 * linux-low.c (O_LARGEFILE): Define.
9692 (linux_read_memory): Use /proc/PID/mem.
9693 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9694 * configure, config.in: Regenerated.
9696 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9698 * linux-low.c (linux_wait_for_event): Do not pass signals while
9701 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9703 * win32-low.c (create_process): New.
9704 (win32_create_inferior): Use create_process instead of
9705 CreateProcess. If create_process failed retry appending an ".exe"
9706 suffix. Store the GetLastError result immediatelly after
9707 create_process calls and use it on the call to error.
9709 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9711 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9713 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9715 * configure.ac: Switch license to GPLv3.
9717 2007-08-01 Michael Snyder <msnyder@access-company.com>
9719 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9721 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9723 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9725 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9726 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9727 CloseToolhelp32Snapshot.
9728 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9729 CloseToolhelp32Snapshot.
9731 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9733 * server.c (main): Check for inferior exit before main loop.
9735 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9737 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9738 instead of on tmp_desc.
9740 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9741 Daniel Jacobowitz <dan@codesourcery.com>
9743 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9744 (add_thread): Minor cleanups.
9745 (clear_inferiors): Move lower in the file. Clear the DLL
9747 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9748 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9749 (xml_escape_text): New.
9750 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9752 (handle_v_cont): Report errors.
9753 (gdbserver_version): Update.
9754 (main): Correct size of own_buf. Do not report initial DLL events.
9755 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9756 (unloaded_dll, xml_escape_text): New.
9757 * win32-low.c (enum target_waitkind): Update comments.
9758 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9759 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9760 (win32_EnumProcessModules, win32_GetModuleInformation)
9761 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9762 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9763 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9764 (win32_Module32First, win32_Module32Next, load_toolhelp)
9765 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9766 (get_child_debug_event): Handle DLL events.
9767 (win32_wait): Likewise.
9769 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9771 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9772 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9774 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9776 * win32-low.c (handle_output_debug_string): Ignore event if not
9779 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9781 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9783 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9785 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9787 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9789 * inferiors.c (change_inferior_id): Add comment.
9790 * linux-low.c (check_removed_breakpoint): Add an early
9791 prototype. Improve debug output.
9792 (linux_attach): Doc update.
9793 (linux_detach_one_process, linux_detach): Clean up before releasing
9795 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9796 * linux-low.h (struct process_info): Doc improvement.
9797 * mem-break.c (delete_all_breakpoints): New.
9798 * mem-break.h (delete_all_breakpoints): New prototype.
9799 * thread-db.c (find_first_thread): New.
9800 (thread_db_create_event): Call it instead of
9801 thread_db_find_new_threads. Clean up unused variables.
9802 (maybe_attach_thread): Remove first thread handling.
9803 (thread_db_find_new_threads): Use find_first_thread.
9804 (thread_db_get_tls_address): Likewise.
9806 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9808 * thread-db.c (thread_db_find_new_threads): Add prototype.
9809 (thread_db_create_event): Check for the main thread before adding
9811 (maybe_attach_thread): Only enable event reporting if TID == 0.
9812 (thread_db_get_tls_address): Check for new threads.
9814 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9816 * linux-low.c (linux_create_inferior): Try execv before execvp.
9817 * spu-low.c (spu_create_inferior): Likewise.
9819 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9821 * linux-low.c (linux_create_inferior): Change execv to execvp.
9822 * spu-low.c (spu_create_inferior): Likewies.
9824 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9826 * Makefile.in (clean): Clean new files instead of deleted ones.
9827 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9828 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9830 * configure.srv: Specify XML files and new regformats for MIPS and
9832 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9833 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9834 an entry for the restart register.
9835 (mips_cannot_fetch_register, mips_cannot_store_register)
9836 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9837 register names to match the XML descriptions.
9838 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9839 restart register instead of $0.
9841 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9842 Markus Deuling <deuling@de.ibm.com>
9844 * remote-utils.c (decode_xfer_write): New function.
9845 * server.h (decode_xfer_write): Add prototype.
9846 * server.c (handle_query): Add PACKET_LEN argument. Support
9847 qXfer:spu:read and qXfer:spu:write packets.
9848 (main): Pass packet_len to handle_query.
9849 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9850 * target.h (target_ops): Add qxfer_spu.
9852 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9854 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9855 accessing non-seekable spufs files.
9857 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9859 * server.c (handle_query): Add reply for qC packet.
9861 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9862 Leo Zayas <lerele@champenstudios@com>
9864 * server.h (check_remote_input_interrupt_request): New function.
9865 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9866 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9867 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9868 (check_remote_input_interrupt_request): New function.
9869 * server.h (check_remote_input_interrupt_request): Declare.
9870 * win32-low.c (winapi_DebugBreakProcess,
9871 winapi_GenerateConsoleCtrlEvent): New typedefs.
9872 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9874 (win32_wait): Check for remote interrupt request
9875 with check_remote_input_interrupt_request.
9876 (win32_request_interrupt): New function.
9877 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9879 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9881 * win32-low.c (debug_registers_changed,
9882 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9883 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9884 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9885 (thread_rec): Get context using the low target.
9886 (child_add_thread): Call thread_added on the low target,
9887 which does the same thing.
9889 (do_initial_child_stuff): Remove debug registers references.
9890 Set context using the low target. Resume threads after
9891 setting the contexts.
9892 (child_continue): Remove dead variable. Remove debug
9893 registers references.
9894 (child_fetch_inferior_registers): Go through the low target.
9895 (do_child_store_inferior_registers): Remove.
9896 (child_store_inferior_registers): Go through the low target.
9897 (win32_resume): Remove debug registers references.
9898 Set context using the low target.
9899 (handle_exception): Change return type to void. Don't record
9900 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9901 first chance exception.
9902 (get_child_debug_event): Change return type to void. Remove
9903 goto loop. Always return after waiting for debug event.
9904 (win32_wait): Convert to switch statement. Handle spurious
9907 * win32-i386-low.c (debug_registers_changed,
9908 debug_registers_used): New.
9909 (initial_stuff): Rename to ...
9910 (i386_initial_stuff): ... this. Clear debug registers
9912 (store_debug_registers): Delete.
9913 (i386_get_thread_context): New.
9914 (load_debug_registers): Delete.
9915 (i386_set_thread_context): New.
9916 (i386_thread_added): New.
9917 (single_step): Rename to ...
9918 (i386_single_step): ... this.
9919 (do_fetch_inferior_registers): Rename to ...
9920 (i386_fetch_inferior_register): ... this.
9921 (i386_store_inferior_register): New.
9922 (the_low_target): Adapt to new interface.
9924 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9925 (arm_get_thread_context): New.
9926 (arm_set_thread_context): New.
9928 (do_fetch_inferior_registers): Rename to ...
9929 (arm_fetch_inferior_register): ... this.
9930 (arm_store_inferior_register): New.
9931 (arm_wince_breakpoint): Reimplement as unsigned long.
9932 (arm_wince_breakpoint_len): Define.
9933 (the_low_target): Adapt to new interface.
9935 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9936 load_debug_registers. Add get_thread_context, set_thread_context,
9937 thread_added and store_inferior_register. Rename
9938 fetch_inferior_registers to fetch_inferior_register.
9939 (regptr): Remove declaration.
9941 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9943 * linux-low.c (linux_detach): Change return type to int. Return 0.
9944 * spu-low.c (spu_detach): Likewise.
9946 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9948 * target.h (target_ops): Change return type of detach to int.
9950 (join_inferior): New.
9951 * server.c (main): Don't skip detach support on mingw32.
9952 If the inferior doesn't support detaching return error.
9953 Call join_inferior instead of using waitpid.
9954 * linux-low.c (linux_join): New.
9955 (linux_target_op): Add linux_join.
9956 * spu-low.c (spu_join): New.
9957 (spu_target_ops): Add spu_join.
9958 * win32-low.c (win32_detach): Adapt to new interface.
9959 Reopen current_process_handle before detaching. Issue a child
9960 resume before detaching.
9962 (win32_target_op): Add win32_join.
9964 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9966 * win32-low.c (win32-attach): Fix return value.
9967 * target.h (target_ops): Describe ATTACH return values.
9969 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9971 * win32-low.c (GETPROCADDRESS): Define.
9972 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9973 (winapi_DebugSetProcessKillOnExit): Likewise.
9974 (win32_create_inferior): Force usage of ansi CreateProcessA.
9975 (win32_attach): Use GETPROCADDRESS.
9976 (win32_detach): Likewise.
9978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9980 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9982 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9984 * win32-low.c: Commit leftover changes from 2007-03-29.
9986 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9988 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9989 fields short instead of int. Add explicit padding.
9990 (i387_cache_to_fsave): Remove unnecessary casts.
9991 (i387_fsave_to_cache): Doc fix.
9992 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9994 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9996 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9997 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9999 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10001 * configure.srv (arm*-*-mingw32ce*): Move near the other
10004 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10006 * configure.ac: Add errno checking.
10007 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10008 sys/file.h and malloc.h.
10009 (AC_CHECK_DECLS): Add perror.
10010 (srv_mingwce): Handle.
10011 * configure.srv (i[34567]86-*-cygwin*): Add
10012 win32-i386-low.o to srv_tgtobj.
10013 (i[34567]86-*-mingw*): Likewise.
10014 (arm*-*-mingw32ce*): Add case.
10015 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10016 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10017 [__MINGW32CE__] (strerror): New function.
10018 [__MINGW32CE__] (errno): Define to GetLastError.
10019 [__MINGW32CE__] (COUNTOF): New macro.
10020 (remote_open): Remove extra close call.
10021 * mem-break.c (delete_breakpoint_at): New function.
10022 * mem-break.h (delete_breakpoint_at): Declare.
10023 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10024 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10025 [USE_WIN32API] (read, write): Add char* casts.
10026 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10027 * server.h: Include wincecompat.h on Windows CE.
10028 [HAVE_ERRNO_H]: Check.
10029 (perror): Declare if not declared.
10030 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10031 (perror_with_name): Remove errno declaration.
10032 * wincecompat.h: New.
10033 * wincecompat.c: New.
10034 * win32-low.h: New.
10035 * win32-arm-low.c: New.
10036 * win32-i386-low.c: New.
10037 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10038 (OUTMSG2): Make it safe.
10040 (COUNTOF): New macro.
10041 (NUM_REGS): Get it from the low target.
10042 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10043 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10044 (thread_rec): Let low target handle debug registers.
10045 (child_add_thread): Likewise.
10046 (child_init_thread_list): Likewise.
10047 (continue_one_thread): Likewise.
10049 (do_child_fetch_inferior_registers): Move to ...
10050 * win32-i386-low.c: ... here, and rename to ...
10051 (do_fetch_inferior_registers): ... this.
10052 * win32-low.c (child_fetch_inferior_registers):
10053 Go through the low target.
10054 (do_child_store_inferior_registers): Use regptr.
10055 (strwinerror): New function.
10056 (win32_create_inferior): Handle Windows CE.
10057 Use strwinerror instead of strerror on Windows error
10058 codes. Add program to the error output.
10059 Don't close the main thread handle on Windows CE.
10060 (win32_attach): Use coredll.dll on Windows CE.
10061 (win32_kill): Close current process and current
10063 (win32_detach): Use coredll.dll on Windows CE.
10064 (win32_resume): Let low target handle debug registers, and
10066 (handle_exception): Add/Remove initial breakpoint. Avoid
10067 non-existant WSTOPSIG on Windows CE.
10068 (win32_read_inferior_memory): Cast to remove warning.
10069 (win32_arch_string): Go through the low target.
10070 (initialize_low): Call set_breakpoint_data with the low
10071 target's breakpoint.
10072 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10073 FOP_REGNUM, mappings): Move to ...
10074 * win32-i386-low.c: ... here.
10075 * win32-low.c (win32_thread_info): Move to ...
10076 * win32-low.h: ... here.
10077 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10078 win32-arm-low.c and wincecompat.c.
10079 (all:): Add $EXEEXT.
10080 (install-only:): Likewise.
10081 (gdbserver:): Likewise.
10082 (gdbreplay:): Likewise.
10083 * config.in: Regenerate.
10084 * configure: Regenerate.
10086 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10088 * win32-low.c: Rename typedef thread_info to
10089 win32_thread_info throughout.
10091 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10093 * win32-i386-low.c: Rename to ...
10094 * win32-low.c: ... this.
10095 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10096 * Makefile.in: Likewise.
10098 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10100 * remote-utils.c (monitor_output): Constify msg parameter.
10101 * server.h (monitor_output): Likewise.
10102 * win32-i386-low.c (handle_output_debug_string): New.
10103 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10104 handle_output_debug_string.
10105 (get_child_debug_event): Likewise.
10107 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10109 * server.c (main): Correct strtoul check.
10111 2007-03-27 Jon Ringle <jon@ringle.org>
10113 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10115 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10117 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10119 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10121 * terminal.h: Check HAVE_SGTTY_H.
10123 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10125 * remote-utils.c (remote_open): Print out the assigned port number.
10127 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10129 * remote-utils.c (monitor_output): New function.
10130 * server.c (debug_threads): Define here.
10131 (monitor_show_help): New function.
10132 (handle_query): Handle qRcmd.
10133 (main): Do not handle 'd' packet.
10134 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10135 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10138 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10140 * Makefile.in (EXEEXT): New.
10141 (clean): Use $(EXEEXT).
10143 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10145 * target.h (target_ops): Rename send_signal to request_interrupt,
10146 and remove enum target_signal parameter.
10147 * linux-low.c (linux_request_interrupt): Rename from
10148 linux_send_signal, and always send SIGINT.
10149 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10150 and always send SIGINT.
10151 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10153 (input_interrupt): Likewise.
10155 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10157 * server.c (get_features_xml): Check if target implemented
10159 * win32-i386-low.c (win32_arch_string): New.
10160 (win32_target_ops): Add win32_arch_string as arch_string member.
10162 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10164 * spu-low.c (spu_arch_string): New.
10165 (spu_target_ops): Add spu_arch_string.
10167 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10169 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10170 * configure.ac: Do not check for terminal.h.
10171 * configure, config.in: Regenerated.
10173 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10175 * Makefile.in (OBS): Add $(XML_BUILTIN).
10176 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10178 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10179 (arm-with-iwmmxt.c): New.
10180 * config.in, configure: Regenerate.
10181 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10182 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10183 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10184 (arm*-*-linux*): Add iWMMXt and regset support.
10185 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10186 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10187 (arm_store_wmmxregset, target_regsets): New.
10188 * server.c (get_features_xml): Take annex argument. Check builtin
10190 (handle_query): Handle multiple annexes.
10192 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10194 * remote-utils.c [USE_WIN32API] (read, write): Define.
10195 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10198 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10200 * linux-i386-low.c (the_low_target): Set arch_string.
10201 * linux-x86-64-low.c (the_low_target): Likewise.
10202 * linux-low.c (linux_arch_string): New.
10203 (linux_target_ops): Add it.
10204 * linux-low.h (struct linux_target_ops): Add arch_string.
10205 * server.c (write_qxfer_response): Use const void * for DATA.
10206 (get_features_xml): New.
10207 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10208 * target.h (struct target_ops): Add arch_string method.
10210 2007-01-03 Denis Pilat <denis.pilat@st.com>
10211 Daniel Jacobowitz <dan@codesourcery.com>
10213 * linux-low.c (linux_kill): Handle being called with no threads.
10214 * win32-i386-low.c (win32_kill): Likewise.
10215 (get_child_debug_event): Clear current_process_handle.
10217 2006-12-30 Denis PILAT <denis.pilat@st.com>
10218 Daniel Jacobowitz <dan@codesourcery.com>
10220 * remote-utils.c (remote_open): Check the type of specified
10221 serial port devices before opening them.
10222 * server.c (main): Kill the inferior if an error occurs during
10223 the first remote_open.
10225 2006-12-05 Markus Deuling <deuling@de.ibm.com>
10227 * README: Update supported targets.
10229 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10231 * Makefile.in (clean): Remove reg-mips64.c.
10232 (reg-mips64.c, reg-mips64.o): New rules.
10233 * configure.srv: Handle mips64. Include regset support for mips.
10234 * linux-mips-low.c (union mips_register): New.
10235 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10236 (mips_breakpoint, mips_breakpoint_at): Use int.
10237 (mips_collect_register, mips_supply_register)
10238 (mips_collect_register_32bit, mips_supply_register_32bit)
10239 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10240 (mips_store_fpregset, target_regsets): New.
10241 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10243 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10245 * configure.srv: Add target "spu*-*-*".
10246 * Makefile.in (clean): Remove reg-spu.c.
10247 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10248 * spu-low.c: New file.
10250 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10252 * configure.ac: Correct td_thr_tls_get_addr test.
10253 * configure: Regenerated.
10255 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10257 * linux-low.c (linux_wait_for_event): Reformat. Use the
10258 pass_signals array.
10259 * remote-utils.c (decode_address_to_semicolon): New.
10260 * server.c (pass_signals, handle_general_set): New.
10261 (handle_query): Mention QPassSignals for qSupported.
10262 (main): Call handle_general_set.
10263 * server.h (pass_signals, decode_address_to_semicolon): New.
10265 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10267 * server.c (handle_query): Correct error handling for read_auxv.
10269 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10271 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10272 and srv_linux_thread_db to yes.
10273 * linux-s390-low.c (s390_fill_gregset): New function.
10274 (target_regsets): Define data structure.
10276 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10278 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10279 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10280 * config.in, configure: Regenerated.
10281 * inferiors.c (gdb_id_to_thread): New function.
10282 (gdb_id_to_thread_id): Use it.
10283 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10284 * linux-low.h (struct process_info): Add th member.
10285 (thread_db_get_tls_address): New prototype.
10286 * remote-utils.c (decode_address): Make non-static.
10287 * server.c (handle_query): Handle qGetTLSAddr.
10288 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10289 * target.h (struct target_ops): Add get_tls_address.
10290 * thread-db.c (maybe_attach_thread): Save the thread handle.
10291 (thread_db_get_tls_address): New.
10293 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10295 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10296 (linux_resume_one_process): Take a siginfo_t *. Update all
10297 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10298 (struct pending_signals): Add a siginfo_t.
10299 (linux_wait_for_process): Always set last_status.
10300 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10301 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10302 * linux-low.h (struct process_info): Add last_status.
10304 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10306 * remote-utils.c (try_rle): New function.
10307 (putpkt_binary): Use it.
10309 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10311 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10312 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10313 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10314 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10315 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10318 2006-08-08 Richard Sandiford <richard@codesourcery.com>
10320 * server.c (terminal_fd): New variable.
10321 (old_foreground_pgrp): Likewise.
10322 (restore_old_foreground_pgrp): New function.
10323 (start_inferior): Record the terminal file descriptor in terminal_fd
10324 and its original foreground group in old_foreground_pgrp. Register
10325 restore_old_foreground_pgrp with atexit().
10327 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10329 * server.c (handle_query): Correct qPart to qXfer.
10331 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10333 * configure.ac: Check for more headers which are missing on
10334 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10335 * configure.srv: Add Cygwin and mingw32.
10336 * remote-utils.c: Don't include headers unconditionally which
10337 are missing on mingw32. Include <winsock.h> for mingw32.
10338 (remote_open): Adjust for mingw32 support. Flush
10339 standard error after writing to it.
10340 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10341 (unblock_async_io, enable_async_io, disable_async_io)
10342 (readchar, getpkt): Update for Winsock support.
10343 (prepare_resume_reply): Expect a protocol signal number.
10344 * server.c: Disable <sys/wait.h> on mingw32.
10345 (start_inferior): Adjust for mingw32 support. Flush
10346 standard error after writing to it.
10347 (attach_inferior): Likewise. Use protocol signal
10349 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10351 * win32-i386-low.c: New file.
10352 * Makefile.in (XM_CLIBS): Set.
10353 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10354 (win32-i386-low.o): New dependency rule.
10355 * linux-low.c (linux_wait): Use target signal numbers.
10356 * target.h (struct target_ops): Doc fix.
10357 * server.h (target_signal_to_name): New prototype.
10358 * gdbreplay.c: Don't include headers unconditionally which
10359 are missing on mingw32. Include <winsock.h> for mingw32.
10360 (remote_close, remote_open): Adjust for Winsock support.
10361 * configure, config.in: Regenerated.
10363 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10365 * server.c (decode_xfer_read, write_qxfer_response): New.
10366 (handle_query): Take a packet length argument. Handle
10367 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10368 the qSupported response.
10369 (main): Update call to handle_query.
10371 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10373 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10374 (putpkt_binary): Renamed from putpkt and adjusted for binary
10376 (putpkt): New wrapper for putpkt_binary.
10377 (readchar): Don't mask off the high bit.
10378 (decode_X_packet): New function.
10379 * server.c (main): Call putpkt_binary if a handler sets the packet
10380 length. Save the length of the incoming packet. Handle 'X'.
10381 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10383 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10385 * server.c (handle_query): Handle qSupported.
10387 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10389 * remote-utils.c (all_symbols_looked_up): New variable.
10390 (look_up_one_symbol): Check it.
10391 * server.h (look_up_one_symbol): New declaration.
10392 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10394 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10396 * Makefile.in (linux-arm-low.o): Update dependencies.
10397 * linux-arm-low.c: Include "gdb_proc_service.h".
10398 (PTRACE_GET_THREAD_AREA): Define.
10399 (ps_get_thread_area): New function.
10401 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10403 * configure.srv (m68k*-*-uclinux*): New target.
10404 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10405 (linux_resume_one_process): Remove extraneous cast.
10406 (linux_read_offsets): New.
10407 (linux_target_op): Add linux_read_offsets on mmuless systems.
10408 * server.c (handle_query): Add qOffsets logic.
10409 * target.h (struct target_ops): Add read_offsets.
10411 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10413 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10414 (PTRACE_GET_THREAD_AREA): Define.
10415 (ps_get_thread_area): New function.
10416 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10417 (linux-x86-64-low.o): Update.
10419 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10421 * configure.ac: Remove checks for prfpregset_t.
10422 * gdb_proc_service.h: New file.
10423 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10424 new "gdb_proc_service.h".
10425 * proc-service.c: Likewise.
10426 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10427 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10428 * Makefile.in (gdb_proc_service_h): Updated.
10429 * configure, config.in: Regenerated.
10431 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10433 * remote-utils.c (prepare_resume_reply): Move declaration
10434 of gdb_id_from_wait to the top of the block.
10436 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10438 * linux-low.c (regsets_store_inferior_registers): Read the regset
10439 from the target before filling it.
10441 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10443 * server.c (attach_inferior): Return SIGTRAP for a successful
10446 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10448 * Makefile.in (OBS): Add version.o.
10449 (STAGESTUFF): Delete.
10450 (version.o): Add dependencies.
10451 (version.c): Replace rule.
10452 (clean): Remove version.c.
10453 * server.c (gdbserver_version): New.
10454 (gdbserver_usage): Use printf.
10455 (main): Handle --version and --help.
10456 * server.h (version, host_name): Add declarations.
10458 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10470 * linux-x86-64-low.c:
10472 * linux-s390-low.c:
10473 * linux-ppc64-low.c:
10475 * linux-mips-low.c:
10476 * linux-m68k-low.c:
10477 * linux-m32r-low.c:
10480 * linux-ia64-low.c:
10481 * linux-i386-low.c:
10482 * linux-crisv32-low.c:
10494 * gdbserver.1: Add (C) after Copyright. Update the FSF
10497 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10499 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10500 (arm_breakpoint_at): Recognize both breakpoints.
10501 (the_low_target): Use the correct breakpoint instruction.
10503 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10505 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10506 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10507 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10508 (the_low_target): Update.
10510 2005-10-25 Andreas Schwab <schwab@suse.de>
10512 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10514 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10515 (ia64_num_regs): Reduce to 462.
10517 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10519 * acinclude.m4: Correct quoting.
10520 * aclocal.m4: Regenerated.
10522 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10523 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10524 (thread_db_init): Call thread_db_err_str.
10525 * configure.ac: Check for TD_VERSION.
10526 * config.in, configure: Regenerated.
10528 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10530 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10532 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10534 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10535 is not available. Define HAVE_PTRACE_GETREGS if it is.
10536 * config.in, configure: Regenerated.
10537 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10538 * linux-i386-low.c, linux-m68k-low.c: Update to use
10539 HAVE_PTRACE_GETREGS.
10540 * linux-low.c (regsets_fetch_inferior_registers)
10541 (regsets_store_inferior_registers): Only return 0 if we processed
10543 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10544 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10546 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10548 * inferiors.c (struct thread_info): Add gdb_id.
10549 (add_thread): Add gdb_id argument.
10550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10551 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10552 calls to add_thread.
10553 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10554 * server.c (handle_query): Use thread_to_gdb_id.
10555 (handle_v_cont, main): Use gdb_id_to_thread_id.
10556 * server.h (add_thread): Update prototype.
10557 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10560 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10562 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10563 left-padded registers.
10564 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10565 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10567 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10569 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10570 * configure: Regenerate.
10571 * config.in: Regenerate.
10572 * server.h (NEED_DECLARATION_STRERROR):
10573 Replace with !HAVE_DECL_STRERROR.
10575 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10577 * linux-low.c (linux_wait, linux_send_signal): Don't test
10578 an unsigned long variable for > 0 if it could be MAX_ULONG.
10579 * server.c (myresume): Likewise.
10580 * target.c (set_desired_inferior): Likewise.
10582 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10584 * configure.ac: Simplify and improve check for socklen_t.
10585 * configure, config.in: Regenerate.
10587 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10589 * acconfig.h: Remove.
10590 * configure.ac: Add a test for socklen_t. Use three-argument
10591 AC_DEFINE throughout.
10592 * config.in: Regenerated using autoheader 2.59.
10593 * configure: Regenerated.
10595 * gdbreplay.c (socklen_t): Provide a default.
10596 (remote_open): Use socklen_t.
10597 * remote-utils.c (socklen_t): Provide a default.
10598 (remote_open): Use socklen_t.
10599 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10602 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10604 * linux-low.c (linux_read_memory, linux_write_memory)
10605 (linux_read_auxv): Likewise.
10606 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10607 (check_mem_write): Likewise.
10608 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10610 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10611 (registers_from_string, register_data): Likewise.
10612 * server.c (handle_query, main): Likewise.
10613 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10614 (decode_M_packet): Likewise.
10615 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10616 * target.h (struct target_ops): Update read_memory, write_memory,
10618 (read_inferior_memory, write_inferior_memory): Update.
10619 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10620 to unsigned char *.
10621 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10622 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10623 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10624 linux-s390-low.c, linux-sh-low.c: Update for changes in
10625 read_inferior_memory and the_low_target->breakpoint.
10627 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10629 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10630 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10631 * configure.srv: Add powerpc64-*-linux*.
10632 * linux-ppc64-low.c: New file.
10634 2005-05-23 Orjan Friberg <orjanf@axis.com>
10636 * linux-cris-low.c: New file with support for CRIS.
10637 * linux-crisv32-low.c: Ditto for CRISv32.
10638 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10639 (clean): Add reg-cris.c and reg-crisv32.c.
10640 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10641 reg-crisv32.o, and reg-crisv32.c to make rules.
10642 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10643 recognized targets.
10645 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10647 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10648 of sizeof (PTRACE_XFER_TYPE).
10649 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10651 2005-05-12 Orjan Friberg <orjanf@axis.com>
10653 * target.h (struct target_ops): Add insert_watchpoint,
10654 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10655 pointers for hardware watchpoint support.
10656 * linux-low.h (struct linux_target_ops): Ditto.
10657 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10658 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10659 to linux_target_ops.
10660 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10662 * server.c (main): Recognize 'Z' and 'z' packets.
10664 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10666 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10667 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10668 (the_low_target): Add new members.
10670 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10672 * proc-service.c (ps_lgetregs): Search all_processes instead of
10675 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10677 * server.c (start_inferior): Change return type to int.
10678 (attach_inferior): Change sigptr to int *.
10679 (handle_v_cont, handle_v_requests): Change signal to int *.
10680 (main): Change signal to int.
10682 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10684 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10685 * configure.srv: Add m32r*-*-linux*.
10686 * linux-m32r-low.c: New file.
10688 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10690 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10692 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10694 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10695 Take unsigned long arguments for PIDs.
10696 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10697 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10698 (wait_for_sigstop, linux_resume_one_process)
10699 (regsets_fetch_inferior_registers, linux_send_signal)
10700 (linux_read_auxv): Likewise. Update the types of variables holding
10701 PIDs. Update format string specifiers.
10702 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10703 * remote-utils.c (prepare_resume_reply): Likewise.
10704 * server.c (cont_thread, general_thread, step_thread)
10705 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10707 (handle_query): Update format specifiers.
10708 (handle_v_cont, main): Use strtoul for thread IDs.
10709 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10710 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10711 (general_thread, step_thread, thread_from_wait)
10712 (old_thread_from_wait): Update.
10713 * target.h (struct thread_resume): Use unsigned long for THREAD.
10714 (struct target_ops): Use unsigned long for arguments to attach and
10717 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10719 * acinclude.m4: Include bfd/bfd.m4 directly.
10720 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10721 <agriffis@toolchain.org>.
10722 * aclocal.m4, configure: Regenerated.
10724 2005-01-07 Andrew Cagney <cagney@gnu.org>
10726 * configure.ac: Rename configure.in, require autoconf 2.59.
10727 * configure: Re-generate.
10729 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10731 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10732 LIBS when finished.
10733 * aclocal.m4: Regenerated.
10734 * configure: Regenerated.
10736 2004-11-21 Andreas Schwab <schwab@suse.de>
10738 * linux-m68k-low.c (m68k_num_gregs): Define.
10739 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10740 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10741 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10742 (m68k_breakpoint_at): New. Add to the_low_target.
10744 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10745 srv_linux_thread_db to yes.
10747 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10749 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10750 (ARCH_SET_FS): Likewise.
10751 (ARCH_GET_FS): Likewise.
10752 (ARCH_GET_GS): Likewise.
10754 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10756 * linux-i386-low.c (ps_get_thread_area): New.
10757 * linux-x86-64-low.c (ps_get_thread_area): New.
10758 * linux-low.c: Include <sys/syscall.h>.
10759 (linux_kill_one_process): Don't kill the first thread here.
10760 (linux_kill): Kill the first thread here.
10761 (kill_lwp): New function.
10762 (send_sigstop, linux_send_signal): Use it.
10763 * proc-service.c: Clean up #ifdefs.
10764 (fpregset_info): Delete.
10765 (ps_lgetregs): Update and enable implementation.
10766 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10768 * remote-utils.c (struct sym_cache, symbol_cache): New.
10769 (input_interrupt): Print a clearer message.
10770 (async_io_enabled): New variable.
10771 (enable_async_io, disable_async_io): Use it. Update comments.
10772 (look_up_one_symbol): Use the symbol cache.
10773 * thread-db.c (thread_db_look_up_symbols): New function.
10774 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10776 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10778 * configure.in: Test for -rdynamic.
10779 * configure: Regenerated.
10780 * Makefile (INTERNAL_LDFLAGS): New.
10781 (gdbserver, gdbreplay): Use it.
10783 2004-09-02 Andrew Cagney <cagney@gnu.org>
10785 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10787 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10789 * linux-low.c (linux_wait): Clear all_processes list also.
10791 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10793 * linux-low.c: Include <errno.h>. Remove extern declaration of
10796 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10798 * gdbreplay.c, server.h, utils.c: Update copyright years.
10800 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10802 * server.c (main): Print child status or termination signal from
10803 variable 'signal', not 'sig'.
10805 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10807 * linux-low.c (linux_read_memory): Change return type to
10808 int. Check for and return error from ptrace().
10809 * target.c (read_inferior_memory): Change return type to int. Pass
10810 back return status from the_target->read_memory().
10811 * target.h (struct target_ops): Adapt *read_memory() prototype.
10813 (read_inferior_memory): Adapt prototype.
10814 * server.c (main): Return an error packet if
10815 read_inferior_memory() returns an error.
10817 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10819 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10820 Unify with other clean targets.
10822 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10824 * server.c (handle_v_cont): Call set_desired_inferior.
10826 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10828 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10830 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10832 * linux-low.c (linux_wait): Unblock async I/O.
10833 (linux_resume): Block and enable async I/O.
10834 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10835 * server.h (block_async_io, unblock_async_io): Add prototypes.
10837 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10839 * remote-utils.c (remote_open): Print a status notice after
10840 opening a TCP port.
10841 * server.c (attach_inferior): Print a status notice after
10844 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10846 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10848 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10850 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10852 * server.c, target.h: Update copyright years.
10854 2004-02-25 Roland McGrath <roland@redhat.com>
10856 * target.h (struct target_ops): New member `read_auxv'.
10857 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10858 * linux-low.c (linux_read_auxv): New function.
10859 (linux_target_ops): Initialize `read_auxv' member to that.
10861 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10863 Committed by Jim Blandy <jimb@redhat.com>.
10865 * linux-s390-low.c (s390_num_regs): Update.
10866 (s390_regmap): Remove control registers. Use __s390x__ predefine
10867 instead of GPR_SIZE to distiguish s390 and s390x targets.
10869 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10871 * linux-low.c: Update copyright year.
10872 (check_removed_breakpoint): Clear pending_is_breakpoint.
10873 (linux_set_resume_request, linux_queue_one_thread)
10874 (resume_status_pending_p): New functions.
10875 (linux_continue_one_thread): Use process->resume.
10876 (linux_resume): Only resume threads if there are no pending events.
10877 * linux-low.h (struct process_info): Add resume request
10880 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10882 * regcache.c (new_register_cache): Clear the allocated register
10883 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10885 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10887 * linux-low.c (linux_resume): Take a struct thread_resume *
10889 (linux_wait): Update call.
10890 (resume_ptr): New static variable.
10891 (linux_continue_one_thread): Renamed from
10892 linux_continue_one_process. Use resume_ptr.
10893 (linux_resume): Use linux_continue_one_thread.
10894 * server.c (handle_v_cont, handle_v_requests): New functions.
10895 (myresume): New function.
10896 (main): Handle 'v' case.
10897 * target.h (struct thread_resume): New type.
10898 (struct target_ops): Change argument of "resume" to struct
10900 (myresume): Delete macro.
10902 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10904 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10905 (uninstall): Support DESTDIR.
10907 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10909 * configure.srv: Add xscale*linux copy of arm*linux entry.
10911 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10913 * linux-arm-low.c (arm_reinsert_addr): New function.
10914 (the_low_target): Add arm_reinsert_addr.
10916 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10918 * mem-break.c: Remove whitespace at end of file.
10920 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10922 * configure.in: Check whether we need to prototype strerror.
10923 * server.h: Optionally prototype strerror.
10924 * gdbreplay.c (perror_with_name): Use strerror.
10925 * linux-low.c (linux_attach_lwp): Use strerror.
10926 * utils.c (perror_with_name): Use strerror.
10927 * config.in, configure: Regenerated.
10929 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10931 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10932 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10934 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10936 * Makefile.in (SFILES): Update.
10937 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10938 low-sun3.c: Remove files.
10940 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10942 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10943 (linux_detach_one_process, linux_detach): New functions.
10944 (linux_target_ops): Add linux_detach.
10945 * server.c (main): Handle 'D' packet.
10946 * target.h (struct target_ops): Add "detach" member.
10947 (detach_inferior): Define.
10949 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10951 From Kelley Cook <kelleycook@wideopenwest.com>:
10952 * configure.srv: Accept i[34567]86 variants.
10954 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10956 * linux-low.c (linux_wait_for_event): Correct comment typos.
10957 (linux_resume_one_process): Call check_removed_breakpoint.
10958 (linux_send_signal): New function.
10959 (linux_target_ops): Add linux_send_signal.
10960 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10962 * target.h (struct target_ops): Add send_signal.
10964 2003-05-29 Jim Blandy <jimb@redhat.com>
10966 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10967 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10968 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10969 away part of the register's value.
10971 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10973 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10974 (linux_wait_for_event, linux_init_signals): Likewise.
10976 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10978 * configure.in: Check for stdlib.h.
10979 * configure: Regenerated.
10980 * config.in: Regenerated.
10982 2003-01-04 Andreas Schwab <schwab@suse.de>
10984 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10986 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10988 * Makefile.in: Remove obsolete code.
10990 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10992 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10993 defined(PT_FPR0_HI).
10995 2002-11-17 Stuart Hughes <seh@zee2.com>
10997 * linux-arm-low.c (arm_num_regs): Increase.
10998 (arm_regmap): Include status register.
11000 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11002 * linux-low.c (register_addr): Remove incorrect -1 check.
11004 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11006 * linux-low.c (linux_create_inferior): Call setpgid. Return
11008 (unstopped_p, linux_signal_pid): Remove.
11009 (linux_target_ops): Remove linux_signal_pid.
11010 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11011 global instead of target method.
11012 * target.h (struct target_ops): Remove signal_pid. Update comment
11013 for create_inferior.
11014 * server.c (signal_pid): New variable.
11015 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11016 gdbserver. Set the child to be the foreground process group.
11017 (attach_inferior): Set signal_pid.
11019 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11021 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11023 2002-08-20 Jim Blandy <jimb@redhat.com>
11025 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11028 2002-08-01 Andrew Cagney <cagney@redhat.com>
11030 * Makefile.in: Make chill references obsolete.
11032 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11034 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11035 * configure: Regenerate.
11036 * config.in: Regenerate.
11038 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11040 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11041 (perror_with_name, remote_close, remote_open, expect, play): Static.
11043 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11045 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11046 byte offsets instead of an array of indexes.
11047 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11049 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11051 * regcache.c: Add comment.
11053 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11055 * thread-db.c: New file.
11056 * proc-service.c: New file.
11057 * acinclude.m4: New file.
11058 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11059 proc-service.o, and thread-db.o.
11060 (linux-low.o): Add USE_THREAD_DB.
11061 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11062 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11063 * aclocal.m4: Regenerated.
11064 * config.in: Regenerated.
11065 * configure: Regenerated.
11066 * configure.in: Check for proc_service.h, sys/procfs.h,
11067 thread_db.h, and linux/elf.h headrs.
11068 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11069 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11070 Check for -lthread_db and thread support.
11071 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11072 PowerPC, and SuperH.
11073 * i387-fp.c: Constify arguments.
11074 * i387-fp.h: Likewise.
11075 * inferiors.c: (struct thread_info): Renamed from
11076 `struct inferior_info'. Remove PID member. Use generic inferior
11077 list header. All uses updated.
11078 (inferiors, signal_pid): Removed.
11079 (all_threads): New variable.
11080 (get_thread): Define.
11081 (add_inferior_to_list): New function.
11082 (for_each_inferior): New function.
11083 (change_inferior_id): New function.
11084 (add_inferior): Removed.
11085 (remove_inferior): New function.
11086 (add_thread): New function.
11087 (free_one_thread): New function.
11088 (remove_thread): New function.
11089 (clear_inferiors): Use for_each_inferior and free_one_thread.
11090 (find_inferior): New function.
11091 (find_inferior_id): New function.
11092 (inferior_target_data): Update argument type.
11093 (set_inferior_target_data): Likewise.
11094 (inferior_regcache_data): Likewise.
11095 (set_inferior_regcache_data): Likewise.
11096 * linux-low.c (linux_bp_reinsert): Remove.
11097 (all_processes, stopping_threads, using_thrads)
11098 (struct pending_signals, debug_threads, pid_of): New.
11099 (inferior_pid): Replace with macro.
11100 (struct inferior_linux_data): Remove.
11101 (get_stop_pc, add_process): New functions.
11102 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11103 Use add_process and add_thread.
11104 (linux_attach_lwp): New function, based on old linux_attach. Use
11105 add_process and add_thread. Set stop_expected for new threads.
11106 (linux_attach): New function.
11107 (linux_kill_one_process): New function.
11108 (linux_kill): Kill all LWPs.
11109 (linux_thread_alive): Use find_inferior_id.
11110 (check_removed_breakpoints, status_pending_p): New functions.
11111 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11112 Update. Use WNOHANG. Wait for cloned processes also. Update process
11113 struct for the found process.
11114 (linux_wait_for_event): New function.
11115 (linux_wait): Use it. Support LWPs.
11116 (send_sigstop, wait_for_sigstop, stop_all_processes)
11117 (linux_resume_one_process, linux_continue_one_process): New functions.
11118 (linux_resume): Support LWPs.
11119 (REGISTER_RAW_SIZE): Remove.
11120 (fetch_register): Use register_size instead. Call supply_register.
11121 (usr_store_inferior_registers): Likewise. Call collect_register.
11122 Fix recursive case.
11123 (regsets_fetch_inferior_registers): Improve error message.
11124 (regsets_store_inferior_registers): Add debugging.
11125 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11126 (unstopped_p, linux_signal_pid): New functions.
11127 (linux_target_ops): Add linux_signal_pid.
11128 (linux_init_signals): New function.
11129 (initialize_low): Call it. Initialize using_threads.
11130 * regcache.c (inferior_regcache_data): Add valid
11132 (get_regcache): Fetch registers lazily. Add fetch argument
11133 and update all callers.
11134 (regcache_invalidate_one, regcache_invalidate): New
11136 (new_register_cache): Renamed from create_register_cache.
11137 Return the new regcache.
11138 (free_register_cache): Change argument to a void *.
11139 (registers_to_string, registers_from_string): Call get_regcache
11140 with fetch flag set.
11141 (register_data): Make static. Pass fetch flag to get_regcache.
11142 (supply_register): Call get_regcache with fetch flag clear.
11143 (collect_register): Call get_regcache with fetch flag set.
11144 (collect_register_as_string): New function.
11145 * regcache.h: Update.
11146 * remote-utils.c (putpkt): Flush after debug output and use
11148 Handle input interrupts while waiting for an ACK.
11149 (input_interrupt): Use signal_pid method.
11150 (getpkt): Flush after debug output and use stderr.
11151 (outreg): Use collect_register_as_string.
11152 (new_thread_notify, dead_thread_notify): New functions.
11153 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11154 and general_thread.
11155 (look_up_one_symbol): Flush after debug output.
11156 * server.c (step_thread, server_waiting): New variables.
11157 (start_inferior): Don't use signal_pid. Update call to mywait.
11158 (attach_inferior): Update call to mywait.
11159 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11160 (main): Don't fetch/store registers explicitly. Use
11161 set_desired_inferior. Support proposed ``Hs'' packet. Update
11163 * server.h: Update.
11164 (struct inferior_list, struct_inferior_list_entry): New.
11165 * target.c (set_desired_inferior): New.
11166 (write_inferior_memory): Constify.
11167 (mywait): New function.
11168 * target.h: Update.
11169 (struct target_ops): New signal_pid method.
11170 (mywait): Removed macro, added prototype.
11172 * linux-low.h (regset_func): Removed.
11173 (regset_fill_func, regset_store_func): New.
11174 (enum regset_type): New.
11175 (struct regset_info): Add type field. Use new operation types.
11176 (struct linux_target_ops): stop_pc renamed to get_pc.
11177 Add decr_pc_after_break and breakpoint_at.
11178 (get_process, get_thread_proess, get_process_thread)
11179 (strut process_info, all_processes, linux_attach_lwp)
11180 (thread_db_init): New.
11182 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11183 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11184 (the_low_target): Add new members.
11185 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11186 (i386_store_fpxregset): Constify.
11187 (target_regsets): Add new kind identifier.
11188 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11189 (i386_set_pc): Add debugging.
11190 (i386_breakpoint_at): New function.
11191 (the_low_target): Add new members.
11192 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11193 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11194 (mips_breakpoint_at): New.
11195 (the_low_target): Add new members.
11196 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11197 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11198 (the_low_target): Add new members.
11199 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11200 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11201 (the_low_target): Add new members.
11202 * linux-x86-64-low.c (target_regsets): Add new kind
11205 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
11207 From Martin Pool <mbp@samba.org>:
11208 * server.c (gdbserver_usage): New function.
11211 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
11213 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11214 stop_at -> stop_pc.
11216 2002-05-04 Andrew Cagney <ac131313@redhat.com>
11218 * Makefile.in: Remove obsolete code.
11220 2002-04-24 Michal Ludvig <mludvig@suse.cz>
11222 * linux-low.c (regsets_fetch_inferior_registers),
11223 (regsets_store_inferior_registers): Removed cast to int from
11225 * regcache.h: Added declaration of struct inferior_info.
11227 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11229 * inferiors.c (struct inferior_info): Add regcache_data.
11230 (add_inferior): Call create_register_cache.
11231 (clear_inferiors): Call free_register_cache.
11232 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11233 * regcache.c (struct inferior_regcache_data): New.
11234 (registers): Remove.
11235 (get_regcache): New function.
11236 (create_register_cache, free_register_cache): New functions.
11237 (set_register_cache): Don't initialize the register cache here.
11238 (registers_to_string, registers_from_string, register_data): Call
11240 * regcache.h: Add prototypes.
11241 * server.h: Likewise.
11243 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
11245 * mem-break.c: New file.
11246 * mem-break.h: New file.
11247 * Makefile.in: Add mem-break.o rule; update server.h
11249 * inferiors.c (struct inferior_info): Add target_data
11251 (clear_inferiors): Free target_data member if set.
11252 (inferior_target_data, set_inferior_target_data): New functions.
11253 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11254 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11255 * linux-low.c (linux_bp_reinsert): New variable.
11256 (struct inferior_linux_data): New.
11257 (linux_create_inferior): Use set_inferior_target_data.
11258 (linux_attach): Likewise. Call add_inferior.
11259 (linux_wait_for_one_inferior): New function.
11260 (linux_wait): Call it.
11261 (linux_write_memory): Add const.
11262 (initialize_low): Call set_breakpoint_data.
11263 * linux-low.h (struct linux_target_ops): Add breakpoint
11265 * server.c (attach_inferior): Remove extra add_inferior
11267 * server.h: Include mem-break.h. Update inferior.c
11269 * target.c (read_inferior_memory)
11270 (write_inferior_memory): New functions.
11271 * target.h (read_inferior_memory)
11272 (write_inferior_memory): Change macros to prototypes.
11273 (struct target_ops): Update comments. Add const to write_memory
11276 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
11278 * linux-low.c (usr_store_inferior_registers): Support
11279 registers which are allowed to fail to store.
11280 * linux-low.h (linux_target_ops): Likewise.
11281 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11282 (ppc_cannot_store_register): FPSCR may not be storable.
11284 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11286 * server.h: Include <string.h> if HAVE_STRING_H.
11287 * ChangeLog: Correct paths in last ChangeLog entry.
11289 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11291 * linux-low.h: Remove obsolete prototypes.
11292 (struct linux_target_ops): New.
11293 (extern the_low_target): New.
11294 * linux-low.c (num_regs, regmap): Remove declarations.
11295 (register_addr): Use the_low_target explicitly.
11296 (fetch_register): Likewise.
11297 (usr_fetch_inferior_registers): Likewise.
11298 (usr_store_inferior_registers): Likewise.
11299 * linux-arm-low.c (num_regs): Remove.
11300 (arm_num_regs): Define.
11301 (arm_regmap): Renamed from regmap, made static.
11302 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11304 (arm_cannot_store_register): Renamed from cannot_store_register,
11306 (the_low_target): New.
11307 * linux-i386-low.c (num_regs): Remove.
11308 (i386_num_regs): Define.
11309 (i386_regmap): Renamed from regmap, made static.
11310 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11312 (i386_cannot_store_register): Renamed from cannot_store_register,
11314 (the_low_target): New.
11315 * linux-ia64-low.c (num_regs): Remove.
11316 (ia64_num_regs): Define.
11317 (ia64_regmap): Renamed from regmap, made static.
11318 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11320 (ia64_cannot_store_register): Renamed from cannot_store_register,
11322 (the_low_target): New.
11323 * linux-m68k-low.c (num_regs): Remove.
11324 (m68k_num_regs): Define.
11325 (m68k_regmap): Renamed from regmap, made static.
11326 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11328 (m68k_cannot_store_register): Renamed from cannot_store_register,
11330 (the_low_target): New.
11331 * linux-mips-low.c (num_regs): Remove.
11332 (mips_num_regs): Define.
11333 (mips_regmap): Renamed from regmap, made static.
11334 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11336 (mips_cannot_store_register): Renamed from cannot_store_register,
11338 (the_low_target): New.
11339 * linux-ppc-low.c (num_regs): Remove.
11340 (ppc_num_regs): Define.
11341 (ppc_regmap): Renamed from regmap, made static.
11342 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11344 (ppc_cannot_store_register): Renamed from cannot_store_register,
11346 (the_low_target): New.
11347 * linux-s390-low.c (num_regs): Remove.
11348 (s390_num_regs): Define.
11349 (s390_regmap): Renamed from regmap, made static.
11350 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11352 (s390_cannot_store_register): Renamed from cannot_store_register,
11354 (the_low_target): New.
11355 * linux-sh-low.c (num_regs): Remove.
11356 (sh_num_regs): Define.
11357 (sh_regmap): Renamed from regmap, made static.
11358 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11360 (sh_cannot_store_register): Renamed from cannot_store_register,
11362 (the_low_target): New.
11363 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11364 (the_low_target): New.
11366 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11368 * Makefile.in: Add stamp-h target.
11369 * configure.in: Create stamp-h.
11370 * configure: Regenerated.
11372 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11374 * inferiors.c: New file.
11375 * target.c: New file.
11376 * target.h: New file.
11377 * Makefile.in: Add target.o and inferiors.o. Update
11379 * linux-low.c (inferior_pid): New static variable,
11380 moved from server.c.
11381 (linux_create_inferior): Renamed from create_inferior.
11382 Call add_inferior. Return 0 on success instead of a PID.
11383 (linux_attach): Renamed from myattach.
11384 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11385 (linux_thread_alive): Renamed from mythread_alive.
11386 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11388 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11389 (regsets_store_inferior_registers): Correct error message.
11390 Add missing ``return 0''.
11391 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11392 (linux_store_registers): Renamed from store_inferior_registers.
11393 (linux_read_memory): Renamed from read_inferior_memory.
11394 (linux_write_memory): Renamed from write_inferior_memory.
11395 (linux_target_ops): New structure.
11396 (initialize_low): Call set_target_ops ().
11397 * remote-utils.c (unhexify): New function.
11398 (hexify): New function.
11399 (input_interrupt): Send signals to ``signal_pid''.
11400 * server.c (inferior_pid): Remove.
11401 (start_inferior): Update create_inferior call.
11402 (attach_inferior): Call add_inferior.
11403 (handle_query): New function.
11404 (main): Call handle_query for `q' packets.
11405 * server.h: Include "target.h". Remove obsolete prototypes.
11406 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11408 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11410 * Makefile.in: Add WARN_CFLAGS. Update configury
11412 * configure.in: Check for <string.h>
11413 * configure: Regenerate.
11414 * config.in: Regenerate.
11415 * gdbreplay.c: Include needed system headers.
11416 (remote_open): Remove strchr prototype.
11417 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11418 * regcache.c (supply_register): Change buf argument to const void *.
11419 (supply_register_by_name): Likewise.
11420 (collect_register): Change buf argument to void *.
11421 (collect_register_by_name): Likewise.
11422 * regcache.h: Add missing prototypes.
11423 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11424 * server.c (handle_query): New function.
11425 (attached): New static variable, moved out of main.
11426 (main): Quiet longjmp clobber warnings.
11427 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11428 * utils.c (error): Remove NORETURN.