diff options
author | Pedro Alves <palves@redhat.com> | 2015-03-04 20:41:16 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-03-04 20:41:16 +0000 |
commit | f7e6eed5283bb5c8a3598dd986dc922b9a794f58 (patch) | |
tree | a7343d12474798fc7be6fdc479527d52190bbedc /gdb/NEWS | |
parent | 9e8915c6cee5c37637521b424d723e990e06d597 (diff) | |
download | fsf-binutils-gdb-f7e6eed5283bb5c8a3598dd986dc922b9a794f58.zip fsf-binutils-gdb-f7e6eed5283bb5c8a3598dd986dc922b9a794f58.tar.gz fsf-binutils-gdb-f7e6eed5283bb5c8a3598dd986dc922b9a794f58.tar.bz2 |
remote+docs: software/hardware breakpoint traps
This adjusts target remote to tell the core whether a trap was caused
by a breakpoint.
To that end, the patch teaches GDB about new RSP stop reasons "T05
swbreak" and "T05 hwbreak", that remote targets report back to GDB,
similarly to how "T05 watch" indicates a stop caused by a watchpoint.
Because targets that can report these events are expected to
themselves adjust the PC after a software breakpoint, these new stop
reasons must only be reported if the stub is talking to a GDB that
understands them. Because of that, the use of the new stop reasons
needs to be handshaked on initial connection, using the qSupported
mechanism. GDB simply sends "swbreak+" in its qSupports query, and
the stub reports back "swbreak+" too.
Because these new stop reasons are required to fix a fundamental
non-stop mode problem, this commit extends the remote non-stop intro
section in the manual, documenting the events as required.
To be clear, GDB will still cope with remote targets that don't
support these new stop reasons; it will behave just like today.
Tested on x86-64 Fedora 20, native and gdbserver.
gdb/ChangeLog:
2015-03-04 Pedro Alves <palves@redhat.com>
* NEWS: Mention the new "swbreak" and "hwbreak" stop reasons.
* remote.c (struct remote_state) <remote_stopped_by_watchpoint_p>:
Delete field.
<stop_reason>: New field.
(PACKET_swbreak_feature, PACKET_hwbreak_feature): New enum values.
(packet_set_cmd_state): New function.
(remote_protocol_features): Register the "swbreak" and "hwbreak"
features.
(remote_query_supported): If not disabled with the corresponding
"set remote foo-packet" command, report support for the swbreak
and hwbreak features.
(struct stop_reply) <remote_stopped_by_watchpoint_p>: Delete
field.
<stop_reason>: New field.
(remote_parse_stop_reply): Handle "swbreak" and "hwbreak".
(remote_wait_as): Adjust.
(remote_stopped_by_sw_breakpoint)
(remote_supports_stopped_by_sw_breakpoint)
(remote_stopped_by_hw_breakpoint)
(remote_supports_stopped_by_hw_breakpoint): New functions.
(remote_stopped_by_watchpoint): New function.
(init_remote_ops): Install them.
(_initialize_remote): Register new "set/show remote
swbreak-feature-packet" and "set/show remote
swbreak-feature-packet" commands.
gdb/doc/ChangeLog:
2015-03-04 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Remote Configuration): Document the "set/show
remote swbreak-feature-packet" and "set/show remote
hwbreak-feature-packet" commands.
(Packets) <Z0>: Add cross link to the "swbreak" stop reason's
decription.
(Stop Reply Packets): Document the swbreak and hwbreak stop
reasons.
(General Query Packets): Document the swbreak and hwbreak
qSupported features.
(Remote Non-Stop): Explain that swbreak and hwbreak are required.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -63,6 +63,16 @@ qXfer:btrace-conf:read Qbtrace-conf:bts:size Set the requested ring buffer size for branch tracing in BTS format. +swbreak stop reason + Indicates a memory breakpoint instruction was executed, irrespective + of whether it was GDB that planted the breakpoint or the breakpoint + is hardcoded in the program. This is required for correct non-stop + mode operation. + +hwbreak stop reason + Indicates the target stopped for a hardware breakpoint. This is + required for correct non-stop mode operation. + * The info record command now shows the recording format and the branch tracing configuration for the current thread when using the btrace record target. |