Debugging with GDB (September 2007)

266 Debugging with GDB
operation
7→
any of the op e rations describe d in this chapter
non-blank-sequence
7→
anything, provided it doesn’t contain special characters such as "-", nl, """ and
of course " "
c-string
7→
""" seven-bit-iso-c-string-content """
nl
7→
CR | CR-LF
Notes:
The CLI commands are still handled by the mi interpreter; their output is des cribe d
below.
The token , when present, is passed back when the command finishes.
Some mi commands accept optional arguments as part of the parameter list. Each
option is identified by a leading - (dash) and may be followed by an optional argument
parameter. Options occur first in the parameter list and can be delimited from normal
parameters using -- (this is useful when some parameters begin with a dash).
Pragmatics:
We want easy access to the existing CLI syntax (for debugging).
We want it to be easy to spot a mi operation.
21.1.2 gdb/mi Output syntax
The output from gdb/mi consists of zero or more out-of-band records followed, option-
ally, by a single result record. This result record is for the most recent command. The
sequence of output records is terminated by (gdb)’.
If an input command was prefixed with a token then the corresponding output for that
command will also be prefixed by that same token.
output
7→
( out-of-band-record )* [ result-record ] "(gdb)" nl
result-record
7→
[ token ] "^" result-class ( "," result )* nl
out-of-band-record
7→
async-record | stream-record
async-record
7→
exec-async-output | status-async-output | notify-async-output
exec-async-output
7→
[ token ] "*" async-output
status-async-output
7→
[ token ] "+" async-output
notify-async-output
7→
[ token ] "=" async-output