binutils-gdb/gdb/doc
Pedro Alves f7e6eed528 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.
2015-03-04 20:41:16 +00:00
..
ChangeLog remote+docs: software/hardware breakpoint traps 2015-03-04 20:41:16 +00:00
Doxyfile-base.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Doxyfile-gdb-api.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Doxyfile-gdb-xref.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Doxyfile-gdbserver.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
Makefile.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
a4rc.sed
agentexpr.texi [gdb/ax] small "setv" fix and documentation's adjustment. 2015-02-19 19:04:16 +04:00
all-cfg.texi Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
annotate.texinfo Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
doxy-index.in Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
fdl.texi
filter-for-doxygen Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
filter-params.pl Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
gdb.texinfo remote+docs: software/hardware breakpoint traps 2015-03-04 20:41:16 +00:00
gpl.texi
guile.texi Improve docs of objfile filename method. 2015-01-27 10:03:15 -08:00
lpsrc.sed
observer.texi Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
psrc.sed
python.texi Add support for inlining scripts into .debug_gdb_scripts. 2015-01-31 12:01:13 -08:00
refcard.tex Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stabs.texinfo Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt