Frame-Annotations.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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-2019 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 5.2, http://www.gnu.org/software/texinfo/ -->
  11. <head>
  12. <title>GDB&rsquo;s Obsolete Annotations: Frame Annotations</title>
  13. <meta name="description" content="GDB&rsquo;s Obsolete Annotations: Frame Annotations">
  14. <meta name="keywords" content="GDB&rsquo;s Obsolete Annotations: Frame Annotations">
  15. <meta name="resource-type" content="document">
  16. <meta name="distribution" content="global">
  17. <meta name="Generator" content="makeinfo">
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  19. <link href="index.html#Top" rel="start" title="Top">
  20. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  21. <link href="index.html#Top" rel="up" title="Top">
  22. <link href="Displays.html#Displays" rel="next" title="Displays">
  23. <link href="Value-Annotations.html#Value-Annotations" rel="prev" title="Value Annotations">
  24. <style type="text/css">
  25. <!--
  26. a.summary-letter {text-decoration: none}
  27. blockquote.smallquotation {font-size: smaller}
  28. div.display {margin-left: 3.2em}
  29. div.example {margin-left: 3.2em}
  30. div.indentedblock {margin-left: 3.2em}
  31. div.lisp {margin-left: 3.2em}
  32. div.smalldisplay {margin-left: 3.2em}
  33. div.smallexample {margin-left: 3.2em}
  34. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  35. div.smalllisp {margin-left: 3.2em}
  36. kbd {font-style:oblique}
  37. pre.display {font-family: inherit}
  38. pre.format {font-family: inherit}
  39. pre.menu-comment {font-family: serif}
  40. pre.menu-preformatted {font-family: serif}
  41. pre.smalldisplay {font-family: inherit; font-size: smaller}
  42. pre.smallexample {font-size: smaller}
  43. pre.smallformat {font-family: inherit; font-size: smaller}
  44. pre.smalllisp {font-size: smaller}
  45. span.nocodebreak {white-space:nowrap}
  46. span.nolinebreak {white-space:nowrap}
  47. span.roman {font-family:serif; font-weight:normal}
  48. span.sansserif {font-family:sans-serif; font-weight:normal}
  49. ul.no-bullet {list-style: none}
  50. -->
  51. </style>
  52. </head>
  53. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  54. <a name="Frame-Annotations"></a>
  55. <div class="header">
  56. <p>
  57. Next: <a href="Displays.html#Displays" accesskey="n" rel="next">Displays</a>, Previous: <a href="Value-Annotations.html#Value-Annotations" accesskey="p" rel="prev">Value Annotations</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  58. </div>
  59. <hr>
  60. <a name="Frames"></a>
  61. <h2 class="chapter">6 Frames</h2>
  62. <p><em>Value Annotations have been removed. <small>GDB/MI</small> instead provides
  63. a number of frame commands.</em>
  64. </p>
  65. <p><em>Frame annotations are no longer available. The <small>GDB/MI</small>
  66. provides &lsquo;<samp>-stack-list-arguments</samp>&rsquo;, &lsquo;<samp>-stack-list-locals</samp>&rsquo;, and
  67. &lsquo;<samp>-stack-list-frames</samp>&rsquo; commands.</em>
  68. </p>
  69. <a name="index-annotations-for-frames"></a>
  70. <p>Whenever <small>GDB</small> prints a frame, it annotates it. For example, this applies
  71. to frames printed when <small>GDB</small> stops, output from commands such as
  72. <code>backtrace</code> or <code>up</code>, etc.
  73. </p>
  74. <a name="index-frame_002dbegin"></a>
  75. <p>The frame annotation begins with
  76. </p>
  77. <div class="smallexample">
  78. <pre class="smallexample">^Z^Zframe-begin <var>level</var> <var>address</var>
  79. <var>level-string</var>
  80. </pre></div>
  81. <p>where <var>level</var> is the number of the frame (0 is the innermost frame,
  82. and other frames have positive numbers), <var>address</var> is the address of
  83. the code executing in that frame, and <var>level-string</var> is a string
  84. designed to convey the level to the user. <var>address</var> is in the form
  85. &lsquo;<samp>0x</samp>&rsquo; followed by one or more lowercase hex digits (note that this
  86. does not depend on the language). The frame ends with
  87. </p>
  88. <a name="index-frame_002dend"></a>
  89. <div class="smallexample">
  90. <pre class="smallexample">^Z^Zframe-end
  91. </pre></div>
  92. <p>Between these annotations is the main body of the frame, which can
  93. consist of
  94. </p>
  95. <ul>
  96. <li> <a name="index-function_002dcall"></a>
  97. <div class="smallexample">
  98. <pre class="smallexample">^Z^Zfunction-call
  99. <var>function-call-string</var>
  100. </pre></div>
  101. where <var>function-call-string</var> is text designed to convey to the user
  102. that this frame is associated with a function call made by <small>GDB</small> to a
  103. function in the program being debugged.
  104. </li><li> <a name="index-signal_002dhandler_002dcaller"></a>
  105. <div class="smallexample">
  106. <pre class="smallexample">^Z^Zsignal-handler-caller
  107. <var>signal-handler-caller-string</var>
  108. </pre></div>
  109. where <var>signal-handler-caller-string</var> is text designed to convey to
  110. the user that this frame is associated with whatever mechanism is used
  111. by this operating system to call a signal handler (it is the frame which
  112. calls the signal handler, not the frame for the signal handler itself).
  113. </li><li> A normal frame.
  114. <a name="index-frame_002daddress"></a>
  115. <a name="index-frame_002daddress_002dend"></a>
  116. <p>This can optionally (depending on whether this is thought of as
  117. interesting information for the user to see) begin with
  118. </p>
  119. <div class="smallexample">
  120. <pre class="smallexample">^Z^Zframe-address
  121. <var>address</var>
  122. ^Z^Zframe-address-end
  123. <var>separator-string</var>
  124. </pre></div>
  125. <p>where <var>address</var> is the address executing in the frame (the same
  126. address as in the <code>frame-begin</code> annotation, but printed in a form
  127. which is intended for user consumption&mdash;in particular, the syntax varies
  128. depending on the language), and <var>separator-string</var> is a string
  129. intended to separate this address from what follows for the user&rsquo;s
  130. benefit.
  131. </p>
  132. <a name="index-frame_002dfunction_002dname"></a>
  133. <a name="index-frame_002dargs"></a>
  134. <p>Then comes
  135. </p>
  136. <div class="smallexample">
  137. <pre class="smallexample">^Z^Zframe-function-name
  138. <var>function-name</var>
  139. ^Z^Zframe-args
  140. <var>arguments</var>
  141. </pre></div>
  142. <p>where <var>function-name</var> is the name of the function executing in the
  143. frame, or &lsquo;<samp>??</samp>&rsquo; if not known, and <var>arguments</var> are the arguments
  144. to the frame, with parentheses around them (each argument is annotated
  145. individually as well, see <a href="Value-Annotations.html#Value-Annotations">Value Annotations</a>).
  146. </p>
  147. <a name="index-frame_002dsource_002dbegin"></a>
  148. <a name="index-frame_002dsource_002dfile"></a>
  149. <a name="index-frame_002dsource_002dfile_002dend"></a>
  150. <a name="index-frame_002dsource_002dline"></a>
  151. <a name="index-frame_002dsource_002dend"></a>
  152. <p>If source information is available, a reference to it is then printed:
  153. </p>
  154. <div class="smallexample">
  155. <pre class="smallexample">^Z^Zframe-source-begin
  156. <var>source-intro-string</var>
  157. ^Z^Zframe-source-file
  158. <var>filename</var>
  159. ^Z^Zframe-source-file-end
  160. :
  161. ^Z^Zframe-source-line
  162. <var>line-number</var>
  163. ^Z^Zframe-source-end
  164. </pre></div>
  165. <p>where <var>source-intro-string</var> separates for the user&rsquo;s benefit the
  166. reference from the text which precedes it, <var>filename</var> is the name of
  167. the source file, and <var>line-number</var> is the line number within that
  168. file (the first line is line 1).
  169. </p>
  170. <a name="index-frame_002dwhere"></a>
  171. <p>If <small>GDB</small> prints some information about where the frame is from (which
  172. library, which load segment, etc.; currently only done on the RS/6000),
  173. it is annotated with
  174. </p>
  175. <div class="smallexample">
  176. <pre class="smallexample">^Z^Zframe-where
  177. <var>information</var>
  178. </pre></div>
  179. <p>Then, if source is to actually be displayed for this frame (for example,
  180. this is not true for output from the <code>backtrace</code> command), then a
  181. <code>source</code> annotation (see <a href="Source-Annotations.html#Source-Annotations">Source Annotations</a>) is displayed. Unlike
  182. most annotations, this is output instead of the normal text which would be
  183. output, not in addition.
  184. </p></li></ul>
  185. <hr>
  186. <div class="header">
  187. <p>
  188. Next: <a href="Displays.html#Displays" accesskey="n" rel="next">Displays</a>, Previous: <a href="Value-Annotations.html#Value-Annotations" accesskey="p" rel="prev">Value Annotations</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  189. </div>
  190. </body>
  191. </html>