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 program received signal number AA (a two-digit hexadecimal number). This is equivalent to a ‘T’ response with no n:r pairs.
The program received signal number AA (a two-digit hexadecimal number). This is equivalent to an ‘S’ response, except that the ‘n:r’ pairs can carry values of important registers and other information directly in the stop reply packet, reducing round-trip latency. Single-step and breakpoint traps are reported this way. Each ‘n:r’ pair is interpreted as follows:
The currently defined stop reasons are:
The packet indicates a watchpoint hit, and r is the data address, in hex.
The packet indicates that the loaded libraries have changed. GDB should use ‘qXfer:libraries:read’ to fetch a new list of loaded libraries. The r part is ignored.
The packet indicates that the target cannot continue replaying logged execution events, because it has reached the end (or the beginning when executing backward) of the log. The value of r will be either ‘begin’ or ‘end’. See Reverse Execution, for more information.
The process exited, and AA is the exit status. This is only applicable to certain targets.
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 process terminated with signal AA.
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.
‘XX…’ is hex encoding of ASCII data, to be written as the program’s console output. This can happen at any time while the program is running and the debugger should continue to wait for ‘W’, ‘T’, etc. This reply is not permitted in non-stop mode.
call-id is the identifier which says which host system call should be called. This is just the name of the function. Translation into the correct system call is only applicable as it’s defined in GDB. See File-I/O Remote Protocol Extension, for a list of implemented system calls.
‘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.