Frame-Annotations.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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>Frame Annotations (GDB&rsquo;s Obsolete Annotations)</title>
  14. <meta name="description" content="Frame Annotations (GDB&rsquo;s Obsolete Annotations)">
  15. <meta name="keywords" content="Frame Annotations (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="Displays.html" rel="next" title="Displays">
  23. <link href="Value-Annotations.html" rel="prev" title="Value Annotations">
  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="Frame-Annotations"></span><div class="header">
  45. <p>
  46. Next: <a href="Displays.html" accesskey="n" rel="next">Displays</a>, Previous: <a href="Value-Annotations.html" accesskey="p" rel="prev">Value Annotations</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="Frames"></span><h2 class="chapter">6 Frames</h2>
  50. <p><em>Value Annotations have been removed. <small>GDB/MI</small> instead provides
  51. a number of frame commands.</em>
  52. </p>
  53. <p><em>Frame annotations are no longer available. The <small>GDB/MI</small>
  54. provides &lsquo;<samp>-stack-list-arguments</samp>&rsquo;, &lsquo;<samp>-stack-list-locals</samp>&rsquo;, and
  55. &lsquo;<samp>-stack-list-frames</samp>&rsquo; commands.</em>
  56. </p>
  57. <span id="index-annotations-for-frames"></span>
  58. <p>Whenever <small>GDB</small> prints a frame, it annotates it. For example, this applies
  59. to frames printed when <small>GDB</small> stops, output from commands such as
  60. <code>backtrace</code> or <code>up</code>, etc.
  61. </p>
  62. <span id="index-frame_002dbegin"></span>
  63. <p>The frame annotation begins with
  64. </p>
  65. <div class="example">
  66. <pre class="example">^Z^Zframe-begin <var>level</var> <var>address</var>
  67. <var>level-string</var>
  68. </pre></div>
  69. <p>where <var>level</var> is the number of the frame (0 is the innermost frame,
  70. and other frames have positive numbers), <var>address</var> is the address of
  71. the code executing in that frame, and <var>level-string</var> is a string
  72. designed to convey the level to the user. <var>address</var> is in the form
  73. &lsquo;<samp>0x</samp>&rsquo; followed by one or more lowercase hex digits (note that this
  74. does not depend on the language). The frame ends with
  75. </p>
  76. <span id="index-frame_002dend"></span>
  77. <div class="example">
  78. <pre class="example">^Z^Zframe-end
  79. </pre></div>
  80. <p>Between these annotations is the main body of the frame, which can
  81. consist of
  82. </p>
  83. <ul>
  84. <li> <span id="index-function_002dcall"></span>
  85. <div class="example">
  86. <pre class="example">^Z^Zfunction-call
  87. <var>function-call-string</var>
  88. </pre></div>
  89. where <var>function-call-string</var> is text designed to convey to the user
  90. that this frame is associated with a function call made by <small>GDB</small> to a
  91. function in the program being debugged.
  92. </li><li> <span id="index-signal_002dhandler_002dcaller"></span>
  93. <div class="example">
  94. <pre class="example">^Z^Zsignal-handler-caller
  95. <var>signal-handler-caller-string</var>
  96. </pre></div>
  97. where <var>signal-handler-caller-string</var> is text designed to convey to
  98. the user that this frame is associated with whatever mechanism is used
  99. by this operating system to call a signal handler (it is the frame which
  100. calls the signal handler, not the frame for the signal handler itself).
  101. </li><li> A normal frame.
  102. <span id="index-frame_002daddress"></span>
  103. <span id="index-frame_002daddress_002dend"></span>
  104. <p>This can optionally (depending on whether this is thought of as
  105. interesting information for the user to see) begin with
  106. </p>
  107. <div class="example">
  108. <pre class="example">^Z^Zframe-address
  109. <var>address</var>
  110. ^Z^Zframe-address-end
  111. <var>separator-string</var>
  112. </pre></div>
  113. <p>where <var>address</var> is the address executing in the frame (the same
  114. address as in the <code>frame-begin</code> annotation, but printed in a form
  115. which is intended for user consumption&mdash;in particular, the syntax varies
  116. depending on the language), and <var>separator-string</var> is a string
  117. intended to separate this address from what follows for the user&rsquo;s
  118. benefit.
  119. </p>
  120. <span id="index-frame_002dfunction_002dname"></span>
  121. <span id="index-frame_002dargs"></span>
  122. <p>Then comes
  123. </p>
  124. <div class="example">
  125. <pre class="example">^Z^Zframe-function-name
  126. <var>function-name</var>
  127. ^Z^Zframe-args
  128. <var>arguments</var>
  129. </pre></div>
  130. <p>where <var>function-name</var> is the name of the function executing in the
  131. frame, or &lsquo;<samp>??</samp>&rsquo; if not known, and <var>arguments</var> are the arguments
  132. to the frame, with parentheses around them (each argument is annotated
  133. individually as well, see <a href="Value-Annotations.html">Value Annotations</a>).
  134. </p>
  135. <span id="index-frame_002dsource_002dbegin"></span>
  136. <span id="index-frame_002dsource_002dfile"></span>
  137. <span id="index-frame_002dsource_002dfile_002dend"></span>
  138. <span id="index-frame_002dsource_002dline"></span>
  139. <span id="index-frame_002dsource_002dend"></span>
  140. <p>If source information is available, a reference to it is then printed:
  141. </p>
  142. <div class="example">
  143. <pre class="example">^Z^Zframe-source-begin
  144. <var>source-intro-string</var>
  145. ^Z^Zframe-source-file
  146. <var>filename</var>
  147. ^Z^Zframe-source-file-end
  148. :
  149. ^Z^Zframe-source-line
  150. <var>line-number</var>
  151. ^Z^Zframe-source-end
  152. </pre></div>
  153. <p>where <var>source-intro-string</var> separates for the user&rsquo;s benefit the
  154. reference from the text which precedes it, <var>filename</var> is the name of
  155. the source file, and <var>line-number</var> is the line number within that
  156. file (the first line is line 1).
  157. </p>
  158. <span id="index-frame_002dwhere"></span>
  159. <p>If <small>GDB</small> prints some information about where the frame is from (which
  160. library, which load segment, etc.; currently only done on the RS/6000),
  161. it is annotated with
  162. </p>
  163. <div class="example">
  164. <pre class="example">^Z^Zframe-where
  165. <var>information</var>
  166. </pre></div>
  167. <p>Then, if source is to actually be displayed for this frame (for example,
  168. this is not true for output from the <code>backtrace</code> command), then a
  169. <code>source</code> annotation (see <a href="Source-Annotations.html">Source Annotations</a>) is displayed. Unlike
  170. most annotations, this is output instead of the normal text which would be
  171. output, not in addition.
  172. </p></li></ul>
  173. <hr>
  174. <div class="header">
  175. <p>
  176. Next: <a href="Displays.html" accesskey="n" rel="next">Displays</a>, Previous: <a href="Value-Annotations.html" accesskey="p" rel="prev">Value Annotations</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>
  177. </div>
  178. </body>
  179. </html>