Next: General Query Packets, Previous: Packets, Up: Remote Protocol
The ‘C’, ‘c’, ‘S’, ‘s’, ‘vCont’, ‘vAttach’, ‘vRun’, ‘vStopped’, and ‘?’ packets can receive any of the below as a reply. Except for ‘?’ and ‘vStopped’, that reply is only returned when the target halts. In the below the exact meaning of signal number is defined by the header include/gdb/signals.h in the gdb source code.
As in the description of request packets, we include spaces in the reply templates for clarity; these are not part of the reply packet's syntax. No gdb stop reply packet uses spaces to separate its components.
The currently defined stop reasons are:
On some architectures, such as x86, at the architecture level, when a breakpoint instruction executes the program counter points at the breakpoint address plus an offset. On such targets, the stub is responsible for adjusting the PC to point back at the breakpoint address.
This packet should not be sent by default; older gdb versions did not support it. gdb requests it, by supplying an appropriate ‘qSupported’ feature (see qSupported). The remote stub must also supply the appropriate ‘qSupported’ feature indicating support.
This packet is required for correct non-stop mode operation.
The same remarks about ‘qSupported’ and non-stop mode above apply.
fork
was called, and r
is the thread ID of the new child process. Refer to
thread-id syntax for the format of the thread-id
field. This packet is only applicable to targets that support
fork events.
This packet should not be sent by default; older gdb versions did not support it. gdb requests it, by supplying an appropriate ‘qSupported’ feature (see qSupported). The remote stub must also supply the appropriate ‘qSupported’ feature indicating support.
vfork
was called, and r
is the thread ID of the new child process. Refer to
thread-id syntax for the format of the thread-id
field. This packet is only applicable to targets that support
vfork events.
This packet should not be sent by default; older gdb versions did not support it. gdb requests it, by supplying an appropriate ‘qSupported’ feature (see qSupported). The remote stub must also supply the appropriate ‘qSupported’ feature indicating support.
exec
or terminated, so that the
address spaces of the parent and child process are no longer
shared. The r part is ignored. This packet is only
applicable to targets that support vforkdone events.
This packet should not be sent by default; older gdb versions did not support it. gdb requests it, by supplying an appropriate ‘qSupported’ feature (see qSupported). The remote stub must also supply the appropriate ‘qSupported’ feature indicating support.
The second form of the response, including the process ID of the exited
process, can be used only when gdb has reported support for
multiprocess protocol extensions; see multiprocess extensions.
The pid is formatted as a big-endian hex string.
The second form of the response, including the process ID of the
terminated process, can be used only when gdb has reported
support for multiprocess protocol extensions; see multiprocess extensions. The pid is formatted as a big-endian hex string.
‘parameter...’ is a list of parameters as defined for this very system call.
The target replies with this packet when it expects gdb to call a host system call on behalf of the target. gdb replies with an appropriate ‘F’ packet and keeps up waiting for the next reply packet from the target. The latest ‘C’, ‘c’, ‘S’ or ‘s’ action is expected to be continued. See File-I/O Remote Protocol Extension, for more details.