This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfa/doc] Add section on interrupts to remote protocoldocumentation
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 17 Nov 2005 19:52:24 -0700
- Subject: [rfa/doc] Add section on interrupts to remote protocoldocumentation
The patch below adds a new section about interrupts to the remote protocol
documentation. A discussion on gdb@ may be found starting here:
http://sources.redhat.com/ml/gdb/2005-11/msg00347.html
Okay?
* gdb.texinfo (set remotebreak): Add anchor.
(Remote Protocol): Add new section `Interrupts'.
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.293
diff -u -p -r1.293 gdb.texinfo
--- gdb.texinfo 17 Nov 2005 19:08:38 -0000 1.293
+++ gdb.texinfo 18 Nov 2005 02:44:52 -0000
@@ -12147,6 +12147,7 @@ Show the current speed of the remote con
@item set remotebreak
@cindex interrupt remote programs
@cindex BREAK signal instead of Ctrl-C
+@anchor{set remotebreak}
If set to on, @value{GDBN} sends a @code{BREAK} signal to the remote
when you press the @key{Ctrl-C} key to interrupt the program running
on the remote. If set to off, @value{GDBN} sends the @samp{Ctrl-C}
@@ -22016,6 +22017,7 @@ Show the current setting of the target w
* Stop Reply Packets::
* General Query Packets::
* Register Packet Format::
+* Interrupts::
* Examples::
* File-I/O remote protocol extension::
@end menu
@@ -23063,6 +23065,27 @@ as @code{MIPS32}.
@end table
+@node Interrupts
+@section Interrupts
+
+When a program on the remote target is running, @value{GDBN} may
+attempt to interrupt it by sending a @samp{Ctrl-C} or a @code{BREAK},
+control of which is specified via @value{GDBN}'s @samp{remotebreak}
+setting. @xref{set remotebreak}. The precise meaning of @code{BREAK}
+is defined by the transport mechanism and may, in fact, be undefined.
+@samp{Ctrl-C}, on the other hand, is defined and implemented for all
+transport mechanisms and is represented by sending the single byte
+@code{0x03}. @samp{Ctrl-C} must not be sent as part of a packet as
+defined in the Overview section. @xref{Overview}.
+
+Stubs are not required to recognize these interrupt mechanisms and the
+precise meaning associated with receipt of the interrupt is
+implementation defined. If the stub is successful at interrupting the
+running program, it is expected that it will send one of the Stop
+Reply Packets (@xref{Stop Reply Packets}) to @value{GDBN} as a result
+of successfully stopping the program. Interrupts received while the
+program is stopped will be discarded.
+
@node Examples
@section Examples