Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Command-Syntax.html
blob5b9ef29ff26eb33cdd59e04747835498a63aace0
1 <html lang="en">
2 <head>
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">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Command%20Syntax">Command Syntax</a>,
13 Next:<a rel="next" accesskey="n" href="Completion.html#Completion">Completion</a>,
14 Up:<a rel="up" accesskey="u" href="Commands.html#Commands">Commands</a>
15 <hr><br>
16 </div>
18 <h3 class="section">Command syntax</h3>
20 <p>A GDB command is a single line of input. There is no limit on
21 how long it can be. It starts with a command name, which is followed by
22 arguments whose meaning depends on the command name. For example, the
23 command <code>step</code> accepts an argument which is the number of times to
24 step, as in <code>step 5</code>. You can also use the <code>step</code> command
25 with no arguments. Some commands do not allow any arguments.
27 GDB command names may always be truncated if that abbreviation is
28 unambiguous. Other possible command abbreviations are listed in the
29 documentation for individual commands. In some cases, even ambiguous
30 abbreviations are allowed; for example, <code>s</code> is specially defined as
31 equivalent to <code>step</code> even though there are other commands whose
32 names start with <code>s</code>. You can test abbreviations by using them as
33 arguments to the <code>help</code> command.
35 <p>A blank line as input to GDB (typing just &lt;RET&gt;) means to
36 repeat the previous command. Certain commands (for example, <code>run</code>)
37 will not repeat this way; these are commands whose unintentional
38 repetition might cause trouble and which you are unlikely to want to
39 repeat.
41 <p>The <code>list</code> and <code>x</code> commands, when you repeat them with
42 &lt;RET&gt;, construct new arguments rather than repeating
43 exactly as typed. This permits easy scanning of source or memory.
45 GDB can also use &lt;RET&gt; in another way: to partition lengthy
46 output, in a way similar to the common utility <code>more</code>
47 (see <a href="Screen-Size.html#Screen%20Size">Screen size</a>). Since it is easy to press one
48 &lt;RET&gt; too many in this situation, GDB disables command
49 repetition after any command that generates this sort of display.
51 <p>Any text from a <kbd>#</kbd> to the end of the line is a comment; it does
52 nothing. This is useful mainly in command files (see <a href="Command-Files.html#Command%20Files">Command files</a>).
54 <p>The <kbd>C-o</kbd> binding is useful for repeating a complex sequence of
55 commands. This command accepts the current line, like <kbd>RET</kbd>, and
56 then fetches the next line relative to the current line from the history
57 for editing.
59 </body></html>