Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

212 lines
8.5KB

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