[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following table provides a complete list of all currently defined commands and their corresponding response data.
!
-- extended mode
Enable extended mode. In extended mode, the remote server is made persistent. The `R' packet is used to restart the program being debugged.
Reply:
?
-- last signal
Indicate the reason the target halted. The reply is the same as for step and continue.
Reply: See section D.3 Stop Reply Packets, for the reply specifications.
a
-- reserved
Reserved for future use.
A
arglen,
argnum,
arg,...
-- set program arguments (reserved)
Initialized `argv[]' array passed into program. arglen
specifies the number of bytes in the hex encoded byte stream arg.
See gdbserver
for more details.
Reply:
b
baud -- set baud (deprecated)
Change the serial line speed to baud.
JTC: When does the transport layer state change? When it's received, or after the ACK is transmitted. In either case, there are problems if the command or the acknowledgment packet is dropped.
Stan: If people really wanted to add something like this, and get it working for the first time, they ought to modify ser-unix.c to send some kind of out-of-band message to a specially-setup stub and have the switch happen "in between" packets, so that from remote protocol's point of view, nothing actually happened.
B
addr,mode -- set breakpoint (deprecated)
Set (mode is `S') or clear (mode is `C') a breakpoint at addr. This has been replaced by the `Z' and `z' packets.
c
addr -- continue
addr is address to resume. If addr is omitted, resume at current address.
Reply: See section D.3 Stop Reply Packets, for the reply specifications.
C
sig;
addr -- continue with signal
Continue with signal sig (hex signal number). If
;
addr is omitted, resume at same address.
Reply: See section D.3 Stop Reply Packets, for the reply specifications.
d
-- toggle debug (deprecated)
Toggle debug flag.
D
-- detach
Detach GDB from the remote system. Sent to the remote target before GDB disconnects.
Reply:
e
-- reserved
Reserved for future use.
E
-- reserved
Reserved for future use.
f
-- reserved
Reserved for future use.
F
-- reserved
Reserved for future use.
g
-- read registers
Read general registers.
Reply:
g
packets is specified below.
G
XX... -- write regs
See read registers packet, for a description of the XX... data.
Reply:
h
-- reserved
Reserved for future use.
H
ct... -- set thread
Set thread for subsequent operations (`m', `M', `g', `G', et.al.). c depends on the operation to be performed: it should be `c' for step and continue operations, `g' for other operations. The thread designator t... may be -1, meaning all the threads, a thread number, or zero which means pick any thread.
Reply:
i
addr,
nnn -- cycle step (draft)
Step the remote target by a single clock cycle. If ,
nnn is
present, cycle step nnn cycles. If addr is present, cycle
step starting at that address.
I
-- signal then cycle step (reserved)
See step with signal packet. See cycle step packet.
j
-- reserved
Reserved for future use.
J
-- reserved
Reserved for future use.
k
-- kill request
FIXME: There is no description of how to operate when a specific thread context has been selected (i.e. does 'k' kill only that thread?).
K
-- reserved
Reserved for future use.
l
-- reserved
Reserved for future use.
L
-- reserved
Reserved for future use.
m
addr,
length -- read memory
Read length bytes of memory starting at address addr. Neither GDB nor the stub assume that sized memory transfers are assumed using word alligned accesses. FIXME: A word aligned memory transfer mechanism is needed.
Reply:
M
addr,length:
XX... -- write mem
Write length bytes of memory starting at address addr. XX... is the data.
Reply:
n
-- reserved
Reserved for future use.
N
-- reserved
Reserved for future use.
o
-- reserved
Reserved for future use.
O
-- reserved
Reserved for future use.
p
n... -- read reg (reserved)
Reply:
P
n...=
r... -- write register
Write register n... with value r..., which contains two hex digits for each byte in the register (target byte order).
Reply:
q
query -- general query
Request info about query. In general GDB queries have a leading upper case letter. Custom vendor queries should use a company prefix (in lower case) ex: `qfsf.var'. query may optionally be followed by a `,' or `;' separated list. Stubs must ensure that they match the full query name.
Reply:
Q
var=
val -- general set
Set value of var to val.
See general query packet, for a discussion of naming conventions.
r
-- reset (deprecated)
Reset the entire system.
R
XX -- remote restart
Restart the program being debugged. XX, while needed, is ignored. This packet is only available in extended mode.
Reply:
s
addr -- step
addr is address to resume. If addr is omitted, resume at same address.
Reply: See section D.3 Stop Reply Packets, for the reply specifications.
S
sig;
addr -- step with signal
Like `C' but step not continue.
Reply: See section D.3 Stop Reply Packets, for the reply specifications.
t
addr:
PP,
MM -- search
Search backwards starting at address addr for a match with pattern PP and mask MM. PP and MM are 4 bytes. addr must be at least 3 digits.
T
XX -- thread alive
Find out if the thread XX is alive.
Reply:
u
-- reserved
Reserved for future use.
U
-- reserved
Reserved for future use.
v
-- reserved
Reserved for future use.
V
-- reserved
Reserved for future use.
w
-- reserved
Reserved for future use.
W
-- reserved
Reserved for future use.
x
-- reserved
Reserved for future use.
X
addr,
length:XX... -- write mem (binary)
addr is address, length is number of bytes, XX...
is binary data. The characters $
, #
, and 0x7d
are
escaped using 0x7d
.
Reply:
y
-- reserved
Reserved for future use.
Y
reserved
Reserved for future use.
z
t,
addr,
length -- remove break or watchpoint (draft)
See insert breakpoint or watchpoint packet.
Z
t,
addr,
length -- insert break or watchpoint (draft)
t is type: `0' - software breakpoint, `1' - hardware breakpoint, `2' -- write watchpoint, `3' - read watchpoint, `4' - access watchpoint; addr is address; length is in bytes. For a software breakpoint, length specifies the size of the instruction to be patched. For hardware breakpoints and watchpoints length specifies the memory region to be monitored. To avoid potential problems with duplicate packets, the operations should be implemented in an idempotent way.
Reply:
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |