3 <title>Debugging with GDB
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Debugging with GDB">
6 <meta name=
"generator" content=
"makeinfo 4.3">
7 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home">
12 Node:
<a name=
"GDB%2fMI%20Input%20Syntax">GDB/MI Input Syntax
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"GDB-MI-Output-Syntax.html#GDB%2fMI%20Output%20Syntax">GDB/MI Output Syntax
</a>,
14 Up:
<a rel=
"up" accesskey=
"u" href=
"GDB-MI-Command-Syntax.html#GDB%2fMI%20Command%20Syntax">GDB/MI Command Syntax
</a>
18 <h4 class=
"subsection"><small>GDB/MI
</small> Input Syntax
</h4>
21 <dt><code></code><var>command
</var><code> ==
></code>
22 <dd><code></code><var>cli-command
</var><code> |
</code><var>mi-command
</var><code></code>
24 <br><dt><code></code><var>cli-command
</var><code> ==
></code>
25 <dd><code>[
</code><var>token
</var><code> ]
</code><var>cli-command
</var><code> </code><var>nl
</var><code></code>, where
26 <var>cli-command
</var> is any existing GDB CLI command.
28 <br><dt><code></code><var>mi-command
</var><code> ==
></code>
29 <dd><code>[
</code><var>token
</var><code> ]
"-" </code><var>operation
</var><code> (
" " </code><var>option
</var><code> )*
30 [
" --" ] (
" " </code><var>parameter
</var><code> )*
</code><var>nl
</var><code></code>
32 <br><dt><code></code><var>token
</var><code> ==
></code>
33 <dd>"any sequence of digits"
35 <br><dt><code></code><var>option
</var><code> ==
></code>
36 <dd><code>"-" </code><var>parameter
</var><code> [
" " </code><var>parameter
</var><code> ]
</code>
38 <br><dt><code></code><var>parameter
</var><code> ==
></code>
39 <dd><code></code><var>non-blank-sequence
</var><code> |
</code><var>c-string
</var><code></code>
41 <br><dt><code></code><var>operation
</var><code> ==
></code>
42 <dd><em>any of the operations described in this chapter
</em>
44 <br><dt><code></code><var>non-blank-sequence
</var><code> ==
></code>
45 <dd><em>anything, provided it doesn't contain special characters such as
46 "-",
</em><var>nl
</var><em>,
""" and of course " "</em>
48 <br><dt><code></code><var>c-string</var><code> ==></code>
49 <dd><code>""" </code><var>seven-bit-iso-c-string-content
</var><code> """</code>
51 <br><dt><code></code><var>nl</var><code> ==></code>
52 <dd><code>CR | CR-LF</code>
58 <li>The CLI commands are still handled by the <small>MI</small> interpreter; their
59 output is described below.
61 <li>The <code></code><var>token</var><code></code>, when present, is passed back when the command
64 <li>Some <small>MI</small> commands accept optional arguments as part of the parameter
65 list. Each option is identified by a leading <code>-</code> (dash) and may be
66 followed by an optional argument parameter. Options occur first in the
67 parameter list and can be delimited from normal parameters using
68 <code>--</code> (this is useful when some parameters begin with a dash).
74 <li>We want easy access to the existing CLI syntax (for debugging).
76 <li>We want it to be easy to spot a <small>MI</small> operation.