102 lines
4.7 KiB
HTML
102 lines
4.7 KiB
HTML
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>GDB/MI Input Syntax - Debugging with GDB</title>
|
||
|
<meta http-equiv="Content-Type" content="text/html">
|
||
|
<meta name="description" content="Debugging with GDB">
|
||
|
<meta name="generator" content="makeinfo 4.13">
|
||
|
<link title="Top" rel="start" href="index.html#Top">
|
||
|
<link rel="up" href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax" title="GDB/MI Command Syntax">
|
||
|
<link rel="next" href="GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax" title="GDB/MI Output Syntax">
|
||
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||
|
<!--
|
||
|
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||
|
|
||
|
Permission is granted to copy, distribute and/or modify this document
|
||
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||
|
any later version published by the Free Software Foundation; with the
|
||
|
Invariant Sections being ``Free Software'' and ``Free Software Needs
|
||
|
Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
|
||
|
and with the Back-Cover Texts as in (a) below.
|
||
|
|
||
|
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
|
||
|
this GNU Manual. Buying copies from GNU Press supports the FSF in
|
||
|
developing GNU and promoting software freedom.''
|
||
|
-->
|
||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||
|
<style type="text/css"><!--
|
||
|
pre.display { font-family:inherit }
|
||
|
pre.format { font-family:inherit }
|
||
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
||
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
||
|
pre.smallexample { font-size:smaller }
|
||
|
pre.smalllisp { font-size:smaller }
|
||
|
span.sc { font-variant:small-caps }
|
||
|
span.roman { font-family:serif; font-weight:normal; }
|
||
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="node">
|
||
|
<a name="GDB%2fMI-Input-Syntax"></a>
|
||
|
<a name="GDB_002fMI-Input-Syntax"></a>
|
||
|
<p>
|
||
|
Next: <a rel="next" accesskey="n" href="GDB_002fMI-Output-Syntax.html#GDB_002fMI-Output-Syntax">GDB/MI Output Syntax</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="GDB_002fMI-Command-Syntax.html#GDB_002fMI-Command-Syntax">GDB/MI Command Syntax</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h4 class="subsection">27.2.1 <span class="sc">gdb/mi</span> Input Syntax</h4>
|
||
|
|
||
|
<p><a name="index-input-syntax-for-_0040sc_007bgdb_002fmi_007d-2953"></a><a name="index-g_t_0040sc_007bgdb_002fmi_007d_002c-input-syntax-2954"></a>
|
||
|
<dl>
|
||
|
<dt><var>command</var><code> ==></code><dd><var>cli-command</var><code> | </code><var>mi-command</var>
|
||
|
|
||
|
<br><dt><var>cli-command</var><code> ==></code><dd><code>[ </code><var>token</var><code> ] </code><var>cli-command</var> <var>nl</var>, where
|
||
|
<var>cli-command</var> is any existing <span class="sc">gdb</span> CLI command.
|
||
|
|
||
|
<br><dt><var>mi-command</var><code> ==></code><dd><code>[ </code><var>token</var><code> ] "-" </code><var>operation</var><code> ( " " </code><var>option</var><code> )*
|
||
|
[ " --" ] ( " " </code><var>parameter</var><code> )* </code><var>nl</var>
|
||
|
|
||
|
<br><dt><var>token</var><code> ==></code><dd>"any sequence of digits"
|
||
|
|
||
|
<br><dt><var>option</var><code> ==></code><dd><code>"-" </code><var>parameter</var><code> [ " " </code><var>parameter</var><code> ]</code>
|
||
|
|
||
|
<br><dt><var>parameter</var><code> ==></code><dd><var>non-blank-sequence</var><code> | </code><var>c-string</var>
|
||
|
|
||
|
<br><dt><var>operation</var><code> ==></code><dd><em>any of the operations described in this chapter</em>
|
||
|
|
||
|
<br><dt><var>non-blank-sequence</var><code> ==></code><dd><em>anything, provided it doesn't contain special characters such as
|
||
|
"-", </em><var>nl</var><em>, """ and of course " "</em>
|
||
|
|
||
|
<br><dt><var>c-string</var><code> ==></code><dd><code>""" </code><var>seven-bit-iso-c-string-content</var><code> """</code>
|
||
|
|
||
|
<br><dt><var>nl</var><code> ==></code><dd><code>CR | CR-LF</code>
|
||
|
</dl>
|
||
|
|
||
|
<p class="noindent">Notes:
|
||
|
|
||
|
<ul>
|
||
|
<li>The CLI commands are still handled by the <span class="sc">mi</span> interpreter; their
|
||
|
output is described below.
|
||
|
|
||
|
<li>The <var>token</var>, when present, is passed back when the command
|
||
|
finishes.
|
||
|
|
||
|
<li>Some <span class="sc">mi</span> commands accept optional arguments as part of the parameter
|
||
|
list. Each option is identified by a leading ‘<samp><span class="samp">-</span></samp>’ (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
|
||
|
‘<samp><span class="samp">--</span></samp>’ (this is useful when some parameters begin with a dash).
|
||
|
</ul>
|
||
|
|
||
|
<p>Pragmatics:
|
||
|
|
||
|
<ul>
|
||
|
<li>We want easy access to the existing CLI syntax (for debugging).
|
||
|
|
||
|
<li>We want it to be easy to spot a <span class="sc">mi</span> operation.
|
||
|
</ul>
|
||
|
|
||
|
</body></html>
|
||
|
|