gdbs:protocol
This is an old revision of the document!
Table of Contents
gdb server protocol
The gdb server protocol is used in a debug setup between gdb and the gdbserver. The gdbserver is the driver/software interface of the JATG/SWD probe. This allows the user to use an(optional) IDE with gdb to debug firmware running on a MCU.
+------------------+ | User | +------------------+ | +------------------+ | IDE | +------------------+ | +------------------+ | gdb | +------------------+ | | <-- gdb server protocol is used here | +------------------+ | gdb server | +------------------+ | +------------------+ | JTAG / SWD probe | +------------------+ | +------------------+ | MCU | +------------------+
The remote protocol is specified in Appendix E of the gdb documentation. Wherever appropriate large parts of that documentation have been copied here.
The protocol is used over a serial byte data stream. Examples are a serial port (UART/COM Port) or a TCP port. The data is exchanged over this channel in packets. In this communication the gdb sends commands and the gdb server sends replies.
commands
- '?' question mark
- 'A' A
- 'b' set baur rate don't use
- 'B' set or clear breakpoint don't use
- 'bc' backward continue
- 'bs' backward single step
- 'c' continue
- 'd' toggle debug flag don't use
- 'D' detach
- 'F' file i/o
- 'H' select thread
- 'k' kill
- 'm' read memory
- 'M' write memory
- 'p' read register
- 'P' write register
- 'QAgent' agent on/off
- 'QAllow' allow operations
- 'qCRC' CRC of memory region
- 'QDisableRandomization' disable randomization of virtual addresses
- 'QStartupWithShell' use shell
- 'QEnvironmentHexEncoded' environment variables
- 'QEnvironmentUnset' unset environment variable
- 'QEnvironmentReset' reset environment
- 'QSetWorkingDir' set working directory
- 'qfThreadInfo' get active theads
- 'qsThreadInfo' get active theads
- 'qGetTLSAddr' get address of thread local storage
- 'qGetTIBAddr' get the Windows OS specific thread information block
- 'qMemTags' get memory tags
- 'qIsAddressTagged' check if address is tagged
- 'QMemTags' store memory tags
- 'qOffsets' get section offsets
- 'qP' read thread id don't use
- 'QNonStop' switch non stop mode
- 'QCatchSyscalls' switch catching syscalls
- 'QPassSignals' which signals to pass
- 'QProgramSignals' signals to target
- 'QThreadEvents' switch reporting of thread events
- 'QThreadOptions' apply options
- 'qRcmd' run command
- 'qSearch' search memory
- 'QStartNoAckMode' stop sending acks
- 'qSupported' tell gdbserver which features gdb supports
- 'qTBuffer' trace
- 'QTBuffer' trace
- 'QTDisconnected' trace
- 'QTDP' trace
- 'QTDPsrc' trace
- 'QTDV' trace
- 'qTfP' trace
- 'qTfV' trace
- 'QTFrame' trace
- 'qTMinFTPILen' trace
- 'qThreadExtraInfo' os decription for thread
- ‘QTNotes’ trace
- 'qTP' trace
- 'QTSave' trace
- 'qTsP' trace
- 'qTsV' trace
- 'QTStart' trace
- 'QTStop' trace
- 'QTEnable' trace
- 'QTDisable' trace
- 'QTinit' trace
- 'QTro' trace
- 'qTStatus' trace
- 'qTV' trace
- 'qTfSTM' trace
- 'qTsSTM' trace
- 'qTSTMat' trace
- 'qXfer' read special area
- 'qAttached' is attached?
- 'Qbtrace' enable branch tracing
- 'Qbtrace-conf' configure branch trace
- 'r' reset don't use
- 's' single step
- 't' search backwards
- 'T' is thread alive
- 'vAttach' attach to a new process
- 'vCont' continue trhead
- 'vCont?' request supported actions of 'vCont'
- 'vCtrlC' interrupt remote target
- 'vFlashErase' erase flash
- 'vFlashWrite' write flash
- 'vFlashDone' flash operations done
- 'vKill' kill process
- 'vMustReplyEmpty' test unknown command reply
- 'vRun' run program
- 'vStopped' stopped
- 'x' read memory
replies
dictionary
Word / Abbreviation | Explanation |
---|---|
IDE | Integrated Development environment |
MCU | Micro Controller Unit |
gdbs/protocol.1748395741.txt.gz · Last modified: by lars