Next: Examples, Previous: Host I/O Packets, Up: Remote Protocol
When a program on the remote target is running, gdb may
attempt to interrupt it by sending a `Ctrl-C' or a BREAK
,
control of which is specified via gdb's `remotebreak'
setting (see set remotebreak).
The precise meaning of BREAK
is defined by the transport
mechanism and may, in fact, be undefined. gdb does
not currently define a BREAK
mechanism for any of the network
interfaces.
`Ctrl-C', on the other hand, is defined and implemented for all
transport mechanisms. It is represented by sending the single byte
0x03
without any of the usual packet overhead described in
the Overview section (see Overview). When a 0x03
byte is
transmitted as part of a packet, it is considered to be packet data
and does not represent an interrupt. E.g., an `X' packet
(see X packet), used for binary downloads, may include an unescaped
0x03
as part of its packet.
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 (see Stop Reply Packets) to gdb as a result of successfully stopping the program. Interrupts received while the program is stopped will be discarded.