Annotations-Overview.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1994-2023 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with no
  7. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  8. Texts. A copy of the license is included in the section entitled "GNU
  9. Free Documentation License". -->
  10. <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>Annotations Overview (GDB&rsquo;s Obsolete Annotations)</title>
  14. <meta name="description" content="Annotations Overview (GDB&rsquo;s Obsolete Annotations)">
  15. <meta name="keywords" content="Annotations Overview (GDB&rsquo;s Obsolete Annotations)">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="makeinfo">
  19. <link href="index.html" rel="start" title="Top">
  20. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  21. <link href="index.html" rel="up" title="Top">
  22. <link href="Limitations.html" rel="next" title="Limitations">
  23. <link href="index.html" rel="prev" title="Top">
  24. <style type="text/css">
  25. <!--
  26. a.summary-letter {text-decoration: none}
  27. blockquote.indentedblock {margin-right: 0em}
  28. div.display {margin-left: 3.2em}
  29. div.example {margin-left: 3.2em}
  30. div.lisp {margin-left: 3.2em}
  31. kbd {font-style: oblique}
  32. pre.display {font-family: inherit}
  33. pre.format {font-family: inherit}
  34. pre.menu-comment {font-family: serif}
  35. pre.menu-preformatted {font-family: serif}
  36. span.nolinebreak {white-space: nowrap}
  37. span.roman {font-family: initial; font-weight: normal}
  38. span.sansserif {font-family: sans-serif; font-weight: normal}
  39. ul.no-bullet {list-style: none}
  40. -->
  41. </style>
  42. </head>
  43. <body lang="en">
  44. <span id="Annotations-Overview"></span><div class="header">
  45. <p>
  46. Next: <a href="Limitations.html" accesskey="n" rel="next">Limitations</a>, Previous: <a href="index.html" accesskey="p" rel="prev">Top</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  47. </div>
  48. <hr>
  49. <span id="What-is-an-Annotation_003f"></span><h2 class="chapter">1 What is an Annotation?</h2>
  50. <span id="index-annotations"></span>
  51. <p>To produce obsolete level two annotations, start <small>GDB</small> with the
  52. <code>--annotate=2</code> option.
  53. </p>
  54. <p>Annotations start with a newline character, two &lsquo;<samp>control-z</samp>&rsquo;
  55. characters, and the name of the annotation. If there is no additional
  56. information associated with this annotation, the name of the annotation
  57. is followed immediately by a newline. If there is additional
  58. information, the name of the annotation is followed by a space, the
  59. additional information, and a newline. The additional information
  60. cannot contain newline characters.
  61. </p>
  62. <p>Any output not beginning with a newline and two &lsquo;<samp>control-z</samp>&rsquo;
  63. characters denotes literal output from <small>GDB</small>. Currently there is
  64. no need for <small>GDB</small> to output a newline followed by two
  65. &lsquo;<samp>control-z</samp>&rsquo; characters, but if there was such a need, the
  66. annotations could be extended with an &lsquo;<samp>escape</samp>&rsquo; annotation which
  67. means those three characters as output.
  68. </p>
  69. <p>A simple example of starting up <small>GDB</small> with annotations is:
  70. </p>
  71. <div class="example">
  72. <pre class="example">$ gdb --annotate=2
  73. GNU GDB 5.0
  74. Copyright 2000 Free Software Foundation, Inc.
  75. GDB is free software, covered by the GNU General Public License,
  76. and you are welcome to change it and/or distribute copies of it
  77. under certain conditions.
  78. Type &quot;show copying&quot; to see the conditions.
  79. There is absolutely no warranty for GDB. Type &quot;show warranty&quot;
  80. for details.
  81. This GDB was configured as &quot;sparc-sun-sunos4.1.3&quot;
  82. ^Z^Zpre-prompt
  83. (gdb)
  84. ^Z^Zprompt
  85. quit
  86. ^Z^Zpost-prompt
  87. $
  88. </pre></div>
  89. <p>Here &lsquo;<samp>quit</samp>&rsquo; is input to <small>GDB</small>; the rest is output from
  90. <small>GDB</small>. The three lines beginning &lsquo;<samp>^Z^Z</samp>&rsquo; (where &lsquo;<samp>^Z</samp>&rsquo;
  91. denotes a &lsquo;<samp>control-z</samp>&rsquo; character) are annotations; the rest is
  92. output from <small>GDB</small>.
  93. </p>
  94. </body>
  95. </html>