Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Annotations-Overview.html
blob12759e1a5b470c318ad612c3bd2d1972859da1bf
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="Annotations%20Overview">Annotations Overview</a>,
13 Next:<a rel="next" accesskey="n" href="Server-Prefix.html#Server%20Prefix">Server Prefix</a>,
14 Up:<a rel="up" accesskey="u" href="Annotations.html#Annotations">Annotations</a>
15 <hr><br>
16 </div>
18 <h3 class="section">What is an Annotation?</h3>
20 <p>To produce annotations, start GDB with the <code>--annotate=2</code> option.
22 <p>Annotations start with a newline character, two <code>control-z</code>
23 characters, and the name of the annotation. If there is no additional
24 information associated with this annotation, the name of the annotation
25 is followed immediately by a newline. If there is additional
26 information, the name of the annotation is followed by a space, the
27 additional information, and a newline. The additional information
28 cannot contain newline characters.
30 <p>Any output not beginning with a newline and two <code>control-z</code>
31 characters denotes literal output from GDB. Currently there is
32 no need for GDB to output a newline followed by two
33 <code>control-z</code> characters, but if there was such a need, the
34 annotations could be extended with an <code>escape</code> annotation which
35 means those three characters as output.
37 <p>A simple example of starting up GDB with annotations is:
39 <pre class="smallexample"> $ gdb --annotate=2
40 GNU GDB 5.0
41 Copyright 2000 Free Software Foundation, Inc.
42 GDB is free software, covered by the GNU General Public License,
43 and you are welcome to change it and/or distribute copies of it
44 under certain conditions.
45 Type "show copying" to see the conditions.
46 There is absolutely no warranty for GDB. Type "show warranty"
47 for details.
48 This GDB was configured as "sparc-sun-sunos4.1.3"
50 ^Z^Zpre-prompt
51 (gdb)
52 ^Z^Zprompt
53 quit
55 ^Z^Zpost-prompt
57 </pre>
59 <p>Here <code>quit</code> is input to GDB; the rest is output from
60 GDB. The three lines beginning <code>^Z^Z</code> (where <code>^Z</code>
61 denotes a <code>control-z</code> character) are annotations; the rest is
62 output from GDB.
64 </body></html>