This section documents the configuration options available when debugging remote programs. For the options related to the File I/O extensions of the remote protocol, see system-call-allowed.
set remoteaddresssize
bitsshow remoteaddresssize
set remotebaud
nshow remotebaud
set remotebreak
BREAK
signal to the remote
when you type Ctrl-c to interrupt the program running
on the remote. If set to off, gdb sends the ‘Ctrl-C’
character instead. The default is off, since most remote systems
expect to see ‘Ctrl-C’ as the interrupt signal.
show remotebreak
BREAK
or ‘Ctrl-C’ to
interrupt the remote program.
set remoteflow on
set remoteflow off
RTS
/CTS
)
on the serial port used to communicate to the remote target.
show remoteflow
set remotelogbase
baseascii
, octal
, and hex
. The default is
ascii
.
show remotelogbase
set remotelogfile
fileshow remotelogfile.
set remotetimeout
numshow remotetimeout
set remote hardware-watchpoint-limit
limitset remote hardware-breakpoint-limit
limitset remote hardware-watchpoint-length-limit
limitshow remote hardware-watchpoint-length-limit
set remote exec-file
filenameshow remote exec-file
run
with target
extended-remote
. This should be set to a filename valid on the
target system. If it is not set, the target will use a default
filename (e.g. the last program run).
set remote interrupt-sequence
BREAK
or
‘BREAK-g’ as the
sequence to the remote target in order to interrupt the execution.
‘Ctrl-C’ is a default. Some system prefers BREAK
which
is high level of serial line for some certain time.
Linux kernel prefers ‘BREAK-g’, a.k.a Magic SysRq g.
It is BREAK
signal followed by character g
.
show interrupt-sequence
BREAK
or BREAK-g
is sent by gdb to interrupt the remote program.
BREAK-g
is BREAK signal followed by g
and
also known as Magic SysRq g.
set remote interrupt-on-connect
BREAK
followed by g
which is known as Magic SysRq g in order to connect gdb.
show interrupt-on-connect
set tcp auto-retry on
set tcp connect-timeout
.
set tcp auto-retry off
show tcp auto-retry
set tcp connect-timeout
secondsset tcp connect-timeout unlimited
set tcp auto-retry on
) and waiting for connections
that are merely slow to complete, and represents an approximate cumulative
value. If seconds is unlimited
, there is no timeout and
gdb will keep attempting to establish a connection forever,
unless interrupted with Ctrl-c. The default is 15 seconds.
show tcp connect-timeout
The gdb remote protocol autodetects the packets supported by your debugging stub. If you need to override the autodetection, you can use these commands to enable or disable individual packets. Each packet can be set to ‘on’ (the remote target supports this packet), ‘off’ (the remote target does not support this packet), or ‘auto’ (detect remote target support for this packet). They all default to ‘auto’. For more information about each packet, see Remote Protocol.
During normal use, you should not have to use any of these commands. If you do, that may be a bug in your remote debugging stub, or a bug in gdb. You may want to report the problem to the gdb developers.
For each packet name, the command to enable or disable the
packet is set remote
name-packet
. The available settings
are:
Command Name | Remote Packet | Related Features
|
fetch-register
| p
| info registers
|
set-register
| P
| set
|
binary-download
| X
| load , set
|
read-aux-vector
| qXfer:auxv:read
| info auxv
|
symbol-lookup
| qSymbol
| Detecting multiple threads
|
attach
| vAttach
| attach
|
verbose-resume
| vCont
| Stepping or resuming multiple threads
|
run
| vRun
| run
|
software-breakpoint
| Z0
| break
|
hardware-breakpoint
| Z1
| hbreak
|
write-watchpoint
| Z2
| watch
|
read-watchpoint
| Z3
| rwatch
|
access-watchpoint
| Z4
| awatch
|
target-features
| qXfer:features:read
| set architecture
|
library-info
| qXfer:libraries:read
| info sharedlibrary
|
memory-map
| qXfer:memory-map:read
| info mem
|
read-sdata-object
| qXfer:sdata:read
| print $_sdata
|
read-spu-object
| qXfer:spu:read
| info spu
|
write-spu-object
| qXfer:spu:write
| info spu
|
read-siginfo-object
| qXfer:siginfo:read
| print $_siginfo
|
write-siginfo-object
| qXfer:siginfo:write
| set $_siginfo
|
threads
| qXfer:threads:read
| info threads
|
get-thread-local-
| qGetTLSAddr
| Displaying __thread variables
|
get-thread-information-block-address
| qGetTIBAddr
| Display MS-Windows Thread Information Block.
|
search-memory
| qSearch:memory
| find
|
supported-packets
| qSupported
| Remote communications parameters
|
pass-signals
| QPassSignals
| handle signal
|
program-signals
| QProgramSignals
| handle signal
|
hostio-close-packet
| vFile:close
| remote get , remote put
|
hostio-open-packet
| vFile:open
| remote get , remote put
|
hostio-pread-packet
| vFile:pread
| remote get , remote put
|
hostio-pwrite-packet
| vFile:pwrite
| remote get , remote put
|
hostio-unlink-packet
| vFile:unlink
| remote delete
|
hostio-readlink-packet
| vFile:readlink
| Host I/O
|
noack-packet
| QStartNoAckMode
| Packet acknowledgment
|
osdata
| qXfer:osdata:read
| info os
|
query-attached
| qAttached
| Querying remote process attach state.
|
trace-buffer-size
| QTBuffer:size
| set trace-buffer-size
|
trace-status
| qTStatus
| tstatus
|
traceframe-info
| qXfer:traceframe-info:read
| Traceframe info
|
install-in-trace
| InstallInTrace
| Install tracepoint in tracing
|
disable-randomization
| QDisableRandomization
| set disable-randomization
|
conditional-breakpoints-packet
| Z0 and Z1
| Support for target-side breakpoint condition evaluation
|