home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 21 / SOLOPROG21.iso / utillnux / info-htm / annotate.000 < prev    next >
Encoding:
Text File  |  1996-04-02  |  23.1 KB  |  746 lines

  1. <HTML>
  2. <HEAD>
  3. <!-- This HTML file has been created by TEXI.HTM 1.31
  4.      from /usr/src/devel/gdb-4.14/gdb/doc/annotate.texi on 9 June 1995 -->
  5.  
  6. <TITLE>GDB Annotations</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <H1>GDB Annotations</H1>
  10. <P>
  11. Permission is granted to make and distribute verbatim copies of
  12. this manual provided the copyright notice and this permission notice
  13. are preserved on all copies.
  14. <P>
  15. Copyright (C) 1994 Free Software Foundation
  16. <P>
  17. <H1><A NAME="SEC1" HREF="ANNOTATE.HTM#SEC1">What is an Annotation?</A></H1>
  18. <P>
  19. To produce annotations, start GDB with the <CODE>--annotate=2</CODE> option.
  20. <P>
  21. Annotations start with a newline character, two <SAMP>`control-z'</SAMP>
  22. characters, and the name of the annotation.  If there is no additional
  23. information associated with this annotation, the name of the annotation
  24. is followed immediately by a newline.  If there is additional
  25. information, the name of the annotation is followed by a space, the
  26. additional information, and a newline.  The additional information
  27. cannot contain newline characters.
  28. <P>
  29. Any output not beginning with a newline and two <SAMP>`control-z'</SAMP>
  30. characters denotes literal output from GDB.  Currently there is no need
  31. for GDB to output a newline followed by two <SAMP>`control-z'</SAMP> characters,
  32. but if there was such a need, the annotations could be extended with an
  33. <SAMP>`escape'</SAMP> annotation which means those three characters as output.
  34. <P>
  35. A simple example of starting up GDB with annotations is:
  36. <P>
  37. <PRE>
  38. $ gdb --annotate=2
  39. GDB is free software and you are welcome to distribute copies of it
  40.  under certain conditions; type "show copying" to see the conditions.
  41. There is absolutely no warranty for GDB; type "show warranty" for details.
  42. GDB 4.12.3 (sparc-sun-sunos4.1.3), 
  43. Copyright 1994 Free Software Foundation, Inc.
  44.  
  45. ^Z^Zpre-prompt
  46. (gdb) 
  47. ^Z^Zprompt
  48. quit
  49.  
  50. ^Z^Zpost-prompt
  51. </PRE>
  52. <P>
  53. Here <SAMP>`quit'</SAMP> is input to GDB; the rest is output from GDB.  The three
  54. lines beginning <SAMP>`^Z^Z'</SAMP> (where <SAMP>`^Z'</SAMP> denotes a <SAMP>`control-z'</SAMP>
  55. character) are annotations; the rest is output from GDB.
  56. <P>
  57. <H1><A NAME="SEC2" HREF="ANNOTATE.HTM#SEC2">The Server Prefix</A></H1>
  58. <P>
  59. To issue a command to GDB without affecting certain aspects of the state
  60. which is seen by users, prefix it with <SAMP>`server '</SAMP>.  This means that
  61. this command will not affect the command history, nor will it affect
  62. GDB's notion of which command to repeat if <KBD>RET</KBD> is pressed on a
  63. line by itself.
  64. <P>
  65. The server prefix does not affect the recording of values into the value
  66. history; to print a value without recording it into the value history,
  67. use the <CODE>output</CODE> command instead of the <CODE>print</CODE> command.
  68. <P>
  69. <H1><A NAME="SEC3" HREF="ANNOTATE.HTM#SEC3">Values</A></H1>
  70. <P>
  71. When a value is printed in various contexts, GDB uses annotations to
  72. delimit the value from the surrounding text.
  73. <A NAME="IDX1"></A>
  74. <A NAME="IDX2"></A>
  75. <A NAME="IDX3"></A>
  76. <P>
  77. If a value is printed using <CODE>print</CODE> and added to the value history,
  78. the annotation looks like
  79. <P>
  80. <PRE>
  81. ^Z^Zvalue-history-begin <VAR>history-number</VAR> <VAR>value-flags</VAR>
  82. <VAR>history-string</VAR>
  83. ^Z^Zvalue-history-value
  84. <VAR>the-value</VAR>
  85. ^Z^Zvalue-history-end
  86. </PRE>
  87. <P>
  88. where <VAR>history-number</VAR> is the number it is getting in the value
  89. history, <VAR>history-string</VAR> is a string, such as <SAMP>`$5 = '</SAMP>, which
  90. introduces the value to the user, <VAR>the-value</VAR> is the output
  91. corresponding to the value itself, and <VAR>value-flags</VAR> is <SAMP>`*'</SAMP> for
  92. a value which can be dereferenced and <SAMP>`-'</SAMP> for a value which cannot.
  93. <A NAME="IDX4"></A>
  94. <A NAME="IDX5"></A>
  95. <P>
  96. If the value is not added to the value history (it is an invalid float
  97. or it is printed with the <CODE>output</CODE> command), the annotation is similar:
  98. <P>
  99. <PRE>
  100. ^Z^Zvalue-begin <VAR>value-flags</VAR>
  101. <VAR>the-value</VAR>
  102. ^Z^Zvalue-end
  103. </PRE>
  104. <A NAME="IDX6"></A>
  105. <A NAME="IDX7"></A>
  106. <A NAME="IDX8"></A>
  107. <A NAME="IDX9"></A>
  108. <P>
  109. When GDB prints an argument to a function (for example, in the output
  110. from the <CODE>backtrace</CODE> command), it annotates it as follows:
  111. <P>
  112. <PRE>
  113. ^Z^Zarg-begin
  114. <VAR>argument-name</VAR>
  115. ^Z^Zarg-name-end
  116. <VAR>separator-string</VAR>
  117. ^Z^Zarg-value <VAR>value-flags</VAR>
  118. <VAR>the-value</VAR>
  119. ^Z^Zarg-end
  120. </PRE>
  121. <P>
  122. where <VAR>argument-name</VAR> is the name of the argument,
  123. <VAR>separator-string</VAR> is text which separates the name from the value
  124. for the user's benefit (such as <SAMP>`='</SAMP>), and <VAR>value-flags</VAR> and
  125. <VAR>the-value</VAR> have the same meanings as in a
  126. <CODE>value-history-begin</CODE> annotation.
  127. <A NAME="IDX10"></A>
  128. <A NAME="IDX11"></A>
  129. <A NAME="IDX12"></A>
  130. <A NAME="IDX13"></A>
  131. <P>
  132. When printing a structure, GDB annotates it as follows:
  133. <P>
  134. <PRE>
  135. ^Z^Zfield-begin <VAR>value-flags</VAR>
  136. <VAR>field-name</VAR>
  137. ^Z^Zfield-name-end
  138. <VAR>separator-string</VAR>
  139. ^Z^Zfield-value
  140. <VAR>the-value</VAR>
  141. ^Z^Zfield-end
  142. </PRE>
  143. <P>
  144. where <VAR>field-name</VAR> is the name of the field, <VAR>separator-string</VAR>
  145. is text which separates the name from the value for the user's benefit
  146. (such as <SAMP>`='</SAMP>), and <VAR>value-flags</VAR> and <VAR>the-value</VAR> have the
  147. same meanings as in a <CODE>value-history-begin</CODE> annotation.
  148. <P>
  149. When printing an array, GDB annotates it as follows:
  150. <P>
  151. <PRE>
  152. ^Z^Zarray-section-begin <VAR>array-index</VAR> <VAR>value-flags</VAR>
  153. </PRE>
  154. <P>
  155. where <VAR>array-index</VAR> is the index of the first element being
  156. annotated and <VAR>value-flags</VAR> has the same meaning as in a
  157. <CODE>value-history-begin</CODE> annotation.  This is followed by any number
  158. of elements, where is element can be either a single element:
  159. <A NAME="IDX14"></A>
  160. <P>
  161. <PRE>
  162. <SAMP>`,'</SAMP> <VAR>whitespace</VAR>         ; omitted for the first element
  163. <VAR>the-value</VAR>
  164. ^Z^Zelt
  165. </PRE>
  166. <P>
  167. or a repeated element
  168. <A NAME="IDX15"></A>
  169. <A NAME="IDX16"></A>
  170. <P>
  171. <PRE>
  172. <SAMP>`,'</SAMP> <VAR>whitespace</VAR>         ; omitted for the first element
  173. <VAR>the-value</VAR>
  174. ^Z^Zelt-rep <VAR>number-of-repititions</VAR>
  175. <VAR>repetition-string</VAR>
  176. ^Z^Zelt-rep-end
  177. </PRE>
  178. <P>
  179. In both cases, <VAR>the-value</VAR> is the output for the value of the
  180. element and <VAR>whitespace</VAR> can contain spaces, tabs, and newlines.  In
  181. the repeated case, <VAR>number-of-repititons</VAR> is the number of
  182. consecutive array elements which contain that value, and
  183. <VAR>repetition-string</VAR> is a string which is designed to convey to the
  184. user that repitition is being depicted.
  185. <A NAME="IDX17"></A>
  186. <P>
  187. Once all the array elements have been output, the array annotation is
  188. ended with
  189. <P>
  190. <PRE>
  191. ^Z^Zarray-section-end
  192. </PRE>
  193. <P>
  194. <H1><A NAME="SEC4" HREF="ANNOTATE.HTM#SEC4">Frames</A></H1>
  195. <P>
  196. Whenever GDB prints a frame, it annotates it.  For example, this applies
  197. to frames printed when GDB stops, output from commands such as
  198. <CODE>backtrace</CODE> or <CODE>up</CODE>, etc.
  199. <A NAME="IDX18"></A>
  200. <P>
  201. The frame annotation begins with
  202. <P>
  203. <PRE>
  204. ^Z^Zframe-begin <VAR>level</VAR> <VAR>address</VAR>
  205. <VAR>level-string</VAR>
  206. </PRE>
  207. <P>
  208. where <VAR>level</VAR> is the number of the frame (0 is the innermost frame,
  209. and other frames have positive numbers), <VAR>address</VAR> is the address of
  210. the code executing in that frame, and <VAR>level-string</VAR> is a string
  211. designed to convey the level to the user.  The frame ends with
  212. <A NAME="IDX19"></A>
  213. <P>
  214. <PRE>
  215. ^Z^Zframe-end
  216. </PRE>
  217. <P>
  218. Between these annotations is the main body of the frame, which can
  219. consist of
  220. <P>
  221. <UL>
  222. <A NAME="IDX20"></A>
  223. <LI>
  224. <PRE>
  225. ^Z^Zfunction-call
  226. <VAR>function-call-string</VAR>
  227. </PRE>
  228.  
  229. where <VAR>function-call-string</VAR> is text designed to convey to the user
  230. that this frame is associated with a function call made by GDB to a
  231. function in the program being debugged.
  232.  
  233. <A NAME="IDX21"></A>
  234. <LI>
  235. <PRE>
  236. ^Z^Zsignal-handler-caller
  237. <VAR>signal-handler-caller-string</VAR>
  238. </PRE>
  239.  
  240. where <VAR>signal-handler-caller-string</VAR> is text designed to convey to
  241. the user that this frame is associated with whatever mechanism is used
  242. by this operating system to call a signal handler (it is the frame which
  243. calls the signal handler, not the frame for the signal handler itself).
  244.  
  245. <LI>
  246. A normal frame.
  247.  
  248. <A NAME="IDX23"></A>
  249. <A NAME="IDX22"></A>
  250. This can optionally (depending on whether this is thought of as
  251. interesting information for the user to see) begin with
  252.  
  253. <PRE>
  254. ^Z^Zframe-address
  255. <VAR>address</VAR>
  256. ^Z^Zframe-address-end
  257. <VAR>separator-string</VAR>
  258. </PRE>
  259.  
  260. where <VAR>address</VAR> is the address executing in the frame (the same
  261. address as in the <CODE>frame-begin</CODE> annotation), and
  262. <VAR>separator-string</VAR> is a string intended to separate this address
  263. from what follows for the user's benefit.
  264.  
  265. <A NAME="IDX25"></A>
  266. <A NAME="IDX24"></A>
  267. Then comes
  268.  
  269. <PRE>
  270. ^Z^Zframe-function-name
  271. <VAR>function-name</VAR>
  272. ^Z^Zframe-args
  273. <VAR>arguments</VAR>
  274. </PRE>
  275.  
  276. where <VAR>function-name</VAR> is the name of the function executing in the
  277. frame, or <SAMP>`??'</SAMP> if not known, and <VAR>arguments</VAR> are the arguments
  278. to the frame, with parentheses around them (each argument is annotated
  279. individually as well see section <A HREF="ANNOTATE.000#SEC3">Values</A>).
  280.  
  281. <A NAME="IDX27"></A>
  282. <A NAME="IDX28"></A>
  283. <A NAME="IDX29"></A>
  284. <A NAME="IDX30"></A>
  285. <A NAME="IDX26"></A>
  286. If source information is available, a reference to it is then printed:
  287.  
  288. <PRE>
  289. ^Z^Zframe-source-begin
  290. <VAR>source-intro-string</VAR>
  291. ^Z^Zframe-source-file
  292. <VAR>filename</VAR>
  293. ^Z^Zframe-source-file-end
  294. :
  295. ^Z^Zframe-source-line
  296. <VAR>line-number</VAR>
  297. ^Z^Zframe-source-end
  298. </PRE>
  299.  
  300. where <VAR>source-intro-string</VAR> separates for the user's benefit the
  301. reference from the text which precedes it, <VAR>filename</VAR> is the name of
  302. the source file, and <VAR>line-number</VAR> is the line number within that
  303. file (the first line is line 1).
  304.  
  305. <A NAME="IDX31"></A>
  306. If GDB prints some information about where the frame is from (which
  307. library, which load segment, etc.; currently only done on the RS/6000),
  308. it is annotated with
  309.  
  310. <PRE>
  311. ^Z^Zframe-where
  312. <VAR>information</VAR>
  313. </PRE>
  314.  
  315. Then, if source is to actually be displayed for this frame (for example,
  316. this is not true for output from the <CODE>backtrace</CODE> command), then a
  317. <CODE>source</CODE> annotation (see section <A HREF="ANNOTATE.000#SEC11">Displaying Source</A>) is displayed.  Unlike most
  318. annotations, this is output instead of the normal text which would be
  319. output, not in addition.
  320. </UL>
  321. <P>
  322. <H1><A NAME="SEC5" HREF="ANNOTATE.HTM#SEC5">Displays</A></H1>
  323. <A NAME="IDX32"></A>
  324. <A NAME="IDX33"></A>
  325. <A NAME="IDX34"></A>
  326. <A NAME="IDX35"></A>
  327. <A NAME="IDX36"></A>
  328. <A NAME="IDX37"></A>
  329. <A NAME="IDX38"></A>
  330. <P>
  331. When GDB is told to display something using the <CODE>display</CODE> command,
  332. the results of the display are annotated:
  333. <P>
  334. <PRE>
  335. ^Z^Zdisplay-begin
  336. <VAR>number</VAR>
  337. ^Z^Zdisplay-number-end
  338. <VAR>number-separator</VAR>
  339. ^Z^Zdisplay-format
  340. <VAR>format</VAR>
  341. ^Z^Zdisplay-expression
  342. <VAR>expression</VAR>
  343. ^Z^Zdisplay-expression-end
  344. <VAR>expression-separator</VAR>
  345. ^Z^Zdisplay-value
  346. <VAR>value</VAR>
  347. ^Z^Zdisplay-end
  348. </PRE>
  349. <P>
  350. where <VAR>number</VAR> is the number of the display, <VAR>number-separator</VAR>
  351. is intended to separate the number from what follows for the user,
  352. <VAR>format</VAR> includes information such as the size, format, or other
  353. information about how the value is being displayed, <VAR>expression</VAR> is
  354. the expression being displayed, <VAR>expression-separator</VAR> is intended
  355. to separate the expression from the text that follows for the user,
  356. and <VAR>value</VAR> is the actual value being displayed.
  357. <P>
  358. <H1><A NAME="SEC6" HREF="ANNOTATE.HTM#SEC6">Annotation for GDB Input</A></H1>
  359. <P>
  360. When GDB prompts for input, it annotates this fact so it is possible
  361. to know when to send output, when the output from a given command is
  362. over, etc.
  363. <P>
  364. Different kinds of input each have a different <DFN>input type</DFN>.  Each
  365. input type has three annotations: a <CODE>pre-</CODE> annotation, which
  366. denotes the beginning of any prompt which is being output, a plain
  367. annotation, which denotes the end of the prompt, and then a <CODE>post-</CODE>
  368. annotation which denotes the end of any echo which may (or may not) be
  369. associated with the input.  For example, the <CODE>prompt</CODE> input type
  370. features the following annotations:
  371. <P>
  372. <PRE>
  373. ^Z^Zpre-prompt
  374. ^Z^Zprompt
  375. ^Z^Zpost-prompt
  376. </PRE>
  377. <P>
  378. The input types are
  379. <P>
  380. <A NAME="IDX39"></A>
  381. <A NAME="IDX40"></A>
  382. <A NAME="IDX41"></A>
  383. <DL COMPACT>
  384. <DT><CODE>prompt</CODE>
  385. <DD>When GDB is prompting for a command (the main GDB prompt).
  386.  
  387. <A NAME="IDX43"></A>
  388. <A NAME="IDX44"></A>
  389. <A NAME="IDX42"></A>
  390. <DT><CODE>commands</CODE>
  391. <DD>When GDB prompts for a set of commands, like in the <CODE>commands</CODE>
  392. command.  The annotations are repeated for each command which is input.
  393.  
  394. <A NAME="IDX46"></A>
  395. <A NAME="IDX47"></A>
  396. <A NAME="IDX45"></A>
  397. <DT><CODE>overload-choice</CODE>
  398. <DD>When GDB wants the user to select between various overloaded functions.
  399.  
  400. <A NAME="IDX49"></A>
  401. <A NAME="IDX50"></A>
  402. <A NAME="IDX48"></A>
  403. <DT><CODE>query</CODE>
  404. <DD>When GDB wants the user to confirm a potentially dangerous operation.
  405.  
  406. <A NAME="IDX52"></A>
  407. <A NAME="IDX53"></A>
  408. <A NAME="IDX51"></A>
  409. <DT><CODE>prompt-for-continue</CODE>
  410. <DD>When GDB is asking the user to press return to continue.  Note: Don't
  411. expect this to work well; instead use <CODE>set height 0</CODE> to disable
  412. prompting.  This is because the counting of lines is buggy in the
  413. presence of annotations.
  414. </DL>
  415. <P>
  416. <H1><A NAME="SEC7" HREF="ANNOTATE.HTM#SEC7">Errors</A></H1>
  417. <A NAME="IDX54"></A>
  418. <P>
  419. <PRE>
  420. ^Z^Zquit
  421. </PRE>
  422. <P>
  423. This annotation occurs right before GDB responds to an interrupt.
  424. <A NAME="IDX55"></A>
  425. <P>
  426. <PRE>
  427. ^Z^Zerror
  428. </PRE>
  429. <P>
  430. This annotation occurs right before GDB responds to an error.
  431. <P>
  432. Quit and error annotations indicate that any annotations which GDB was
  433. in the middle of may end abruptly.  For example, if a
  434. <CODE>value-history-begin</CODE> annotation is followed by a <CODE>error</CODE>, one
  435. cannot expect to receive the matching <CODE>value-history-end</CODE>.  One
  436. cannot expect not to receive it either, however; an error annotation
  437. does not necessarily mean that GDB is immediately returning all the way
  438. to the top level.
  439. <A NAME="IDX56"></A>
  440. <P>
  441. A quit or error annotation may be preceded by
  442. <P>
  443. <PRE>
  444. ^Z^Zerror-begin
  445. </PRE>
  446. <P>
  447. Any output between that and the quit or error annotation is the error
  448. message.
  449. <P>
  450. Warning messages are not yet annotated.
  451. <P>
  452. <H1><A NAME="SEC8" HREF="ANNOTATE.HTM#SEC8">Information on Breakpoints</A></H1>
  453. <P>
  454. The output from the <CODE>info breakpoints</CODE> command is annotated as follows:
  455. <A NAME="IDX57"></A>
  456. <A NAME="IDX58"></A>
  457. <P>
  458. <PRE>
  459. ^Z^Zbreakpoints-headers
  460. <VAR>header-entry</VAR>
  461. ^Z^Zbreakpoints-table
  462. </PRE>
  463. <P>
  464. where <VAR>header-entry</VAR> has the same syntax as an entry (see below) but
  465. instead of containing data, it contains strings which are intended to
  466. convey the meaning of each field to the user.  This is followed by any
  467. number of entries.  If a field does not apply for this entry, it is
  468. omitted.  Fields may contain trailing whitespace.  Each entry consists
  469. of:
  470. <A NAME="IDX59"></A>
  471. <A NAME="IDX60"></A>
  472. <P>
  473. <PRE>
  474. ^Z^Zrecord
  475. ^Z^Zfield 0
  476. <VAR>number</VAR>
  477. ^Z^Zfield 1
  478. <VAR>type</VAR>
  479. ^Z^Zfield 2
  480. <VAR>disposition</VAR>
  481. ^Z^Zfield 3
  482. <VAR>enable</VAR>
  483. ^Z^Zfield 4
  484. <VAR>address</VAR>
  485. ^Z^Zfield 5
  486. <VAR>what</VAR>
  487. ^Z^Zfield 6
  488. <VAR>frame</VAR>
  489. ^Z^Zfield 7
  490. <VAR>condition</VAR>
  491. ^Z^Zfield 8
  492. <VAR>ignore-count</VAR>
  493. ^Z^Zfield 9
  494. <VAR>commands</VAR>
  495. </PRE>
  496. <P>
  497. The output ends with
  498. <A NAME="IDX61"></A>
  499. <P>
  500. <PRE>
  501. ^Z^Zbreakpoints-table-end
  502. </PRE>
  503. <P>
  504. <H1><A NAME="SEC9" HREF="ANNOTATE.HTM#SEC9">Invalidation Notices</A></H1>
  505. <P>
  506. The following annotations say that certain pieces of state may have
  507. changed.
  508. <P>
  509. <A NAME="IDX62"></A>
  510. <DL COMPACT>
  511. <DT><CODE>^Z^Zframes-invalid</CODE>
  512. <DD>
  513. The frames (for example, output from the <CODE>backtrace</CODE> command) may
  514. have changed.
  515.  
  516. <A NAME="IDX63"></A>
  517. <DT><CODE>^Z^Zbreakpoints-invalid</CODE>
  518. <DD>
  519. The breakpoints may have changed.  For example, the user just added or
  520. deleted a breakpoint.
  521. </DL>
  522. <P>
  523. <H1><A NAME="SEC10" HREF="ANNOTATE.HTM#SEC10">Running the Program</A></H1>
  524. <A NAME="IDX64"></A>
  525. <A NAME="IDX65"></A>
  526. <P>
  527. When the program starts executing due to a GDB command such as
  528. <CODE>step</CODE> or <CODE>continue</CODE>, 
  529. <P>
  530. <PRE>
  531. ^Z^Zstarting
  532. </PRE>
  533. <P>
  534. is output.  When the program stops, 
  535. <P>
  536. <PRE>
  537. ^Z^Zstopped
  538. </PRE>
  539. <P>
  540. is output.  Before the <CODE>stopped</CODE> annotation, a variety of
  541. annotations describe how the program stopped.
  542. <P>
  543. <A NAME="IDX66"></A>
  544. <DL COMPACT>
  545. <DT><CODE>^Z^Zexited <VAR>exit-status</VAR></CODE>
  546. <DD>The program exited, and <VAR>exit-status</VAR> is the exit status (zero for
  547. successful exit, otherwise nonzero).
  548.  
  549. <A NAME="IDX68"></A>
  550. <A NAME="IDX69"></A>
  551. <A NAME="IDX70"></A>
  552. <A NAME="IDX71"></A>
  553. <A NAME="IDX67"></A>
  554. <DT><CODE>^Z^Zsignalled</CODE>
  555. <DD>The program exited with a signal.  After the <CODE>^Z^Zsignalled</CODE>, the
  556. annotation continues:
  557.  
  558. <PRE>
  559. <VAR>intro-text</VAR>
  560. ^Z^Zsignal-name
  561. <VAR>name</VAR>
  562. ^Z^Zsignal-name-end
  563. <VAR>middle-text</VAR>
  564. ^Z^Zsignal-string
  565. <VAR>string</VAR>
  566. ^Z^Zsignal-string-end
  567. <VAR>end-text</VAR>
  568. </PRE>
  569.  
  570. where <VAR>name</VAR> is the name of the signal, such as <CODE>SIGILL</CODE> or
  571. <CODE>SIGSEGV</CODE>, and <VAR>string</VAR> is the explanation of the signal, such
  572. as <CODE>Illegal Instruction</CODE> or <CODE>Segmentation fault</CODE>.
  573. <VAR>intro-text</VAR>, <VAR>middle-text</VAR>, and <VAR>end-text</VAR> are for the
  574. user's benefit and have no particular format.
  575.  
  576. <A NAME="IDX72"></A>
  577. <DT><CODE>^Z^Zsignal</CODE>
  578. <DD>The syntax of this annotation is just like <CODE>signalled</CODE>, but GDB is
  579. just saying that the program received the signal, not that it was
  580. terminated with it.
  581.  
  582. <A NAME="IDX73"></A>
  583. <DT><CODE>^Z^Zbreakpoint <VAR>number</VAR></CODE>
  584. <DD>The program hit breakpoint number <VAR>number</VAR>.
  585.  
  586. <A NAME="IDX74"></A>
  587. <DT><CODE>^Z^Zwatchpoint <VAR>number</VAR></CODE>
  588. <DD>The program hit watchpoint number <VAR>number</VAR>.
  589. </DL>
  590. <P>
  591. <H1><A NAME="SEC11" HREF="ANNOTATE.HTM#SEC11">Displaying Source</A></H1>
  592. <A NAME="IDX75"></A>
  593. <P>
  594. The following annotation is used instead of displaying source code:
  595. <P>
  596. <PRE>
  597. ^Z^Zsource <VAR>filename</VAR>:<VAR>line</VAR>:<VAR>character</VAR>:<VAR>middle</VAR>:<VAR>addr</VAR>
  598. </PRE>
  599. <P>
  600. where <VAR>filename</VAR> is an absolute file name indicating which source
  601. file, <VAR>line</VAR> is the line number within that file (where 1 is the
  602. first line in the file), <VAR>character</VAR> is the character position
  603. within the file (where 0 is the first character in the file) (for most
  604. debug formats this will necessarily point to the beginning of a line),
  605. <VAR>middle</VAR> is <SAMP>`middle'</SAMP> if <VAR>addr</VAR> is in the middle of the
  606. line, or <SAMP>`beg'</SAMP> if <VAR>addr</VAR> is at the beginning of the line, and
  607. <VAR>addr</VAR> is the address in the target program associated with the
  608. source which is being displayed.
  609. <P>
  610. <H1><A NAME="SEC12" HREF="ANNOTATE.HTM#SEC12">Annotations We Might Want in the Future</A></H1>
  611. <P>
  612. <PRE>
  613.     - target-invalid
  614.       the target might have changed (registers, heap contents, or
  615.       execution status).  For performance, we might eventually want
  616.       to hit `registers-invalid' and `all-registers-invalid' with
  617.       greater precision
  618.  
  619.     - systematic annotation for set/show parameters (including
  620.       invalidation notices).
  621.  
  622.     - similarly, `info' returns a list of candidates for invalidation
  623.       notices.
  624. </PRE>
  625. <P>
  626. <H1><A NAME="SEC13" HREF="ANNOTATE.HTM#SEC13">Index</A></H1>
  627. <P>
  628. <H2>a</H2>
  629. <DIR>
  630. <LI><A HREF="ANNOTATE.000#IDX6">arg-begin</A>
  631. <LI><A HREF="ANNOTATE.000#IDX9">arg-end</A>
  632. <LI><A HREF="ANNOTATE.000#IDX7">arg-name-end</A>
  633. <LI><A HREF="ANNOTATE.000#IDX8">arg-value</A>
  634. <LI><A HREF="ANNOTATE.000#IDX17">array-section-end</A>
  635. </DIR>
  636. <H2>b</H2>
  637. <DIR>
  638. <LI><A HREF="ANNOTATE.000#IDX73">breakpoint</A>
  639. <LI><A HREF="ANNOTATE.000#IDX57">breakpoints-headers</A>
  640. <LI><A HREF="ANNOTATE.000#IDX63">breakpoints-invalid</A>
  641. <LI><A HREF="ANNOTATE.000#IDX58">breakpoints-table</A>
  642. <LI><A HREF="ANNOTATE.000#IDX61">breakpoints-table-end</A>
  643. </DIR>
  644. <H2>c</H2>
  645. <DIR>
  646. <LI><A HREF="ANNOTATE.000#IDX43">commands</A>
  647. </DIR>
  648. <H2>d</H2>
  649. <DIR>
  650. <LI><A HREF="ANNOTATE.000#IDX32">display-begin</A>
  651. <LI><A HREF="ANNOTATE.000#IDX38">display-end</A>
  652. <LI><A HREF="ANNOTATE.000#IDX35">display-expression</A>
  653. <LI><A HREF="ANNOTATE.000#IDX36">display-expression-end</A>
  654. <LI><A HREF="ANNOTATE.000#IDX34">display-format</A>
  655. <LI><A HREF="ANNOTATE.000#IDX33">display-number-end</A>
  656. <LI><A HREF="ANNOTATE.000#IDX37">display-value</A>
  657. </DIR>
  658. <H2>e</H2>
  659. <DIR>
  660. <LI><A HREF="ANNOTATE.000#IDX14">elt</A>
  661. <LI><A HREF="ANNOTATE.000#IDX15">elt-rep</A>
  662. <LI><A HREF="ANNOTATE.000#IDX16">elt-rep-end</A>
  663. <LI><A HREF="ANNOTATE.000#IDX55">error</A>
  664. <LI><A HREF="ANNOTATE.000#IDX56">error-begin</A>
  665. <LI><A HREF="ANNOTATE.000#IDX66">exited</A>
  666. </DIR>
  667. <H2>f</H2>
  668. <DIR>
  669. <LI><A HREF="ANNOTATE.000#IDX60">field</A>
  670. <LI><A HREF="ANNOTATE.000#IDX10">field-begin</A>
  671. <LI><A HREF="ANNOTATE.000#IDX13">field-end</A>
  672. <LI><A HREF="ANNOTATE.000#IDX11">field-name-end</A>
  673. <LI><A HREF="ANNOTATE.000#IDX12">field-value</A>
  674. <LI><A HREF="ANNOTATE.000#IDX22">frame-address</A>
  675. <LI><A HREF="ANNOTATE.000#IDX23">frame-address-end</A>
  676. <LI><A HREF="ANNOTATE.000#IDX25">frame-args</A>
  677. <LI><A HREF="ANNOTATE.000#IDX18">frame-begin</A>
  678. <LI><A HREF="ANNOTATE.000#IDX19">frame-end</A>
  679. <LI><A HREF="ANNOTATE.000#IDX24">frame-function-name</A>
  680. <LI><A HREF="ANNOTATE.000#IDX26">frame-source-begin</A>
  681. <LI><A HREF="ANNOTATE.000#IDX30">frame-source-end</A>
  682. <LI><A HREF="ANNOTATE.000#IDX27">frame-source-file</A>
  683. <LI><A HREF="ANNOTATE.000#IDX28">frame-source-file-end</A>
  684. <LI><A HREF="ANNOTATE.000#IDX29">frame-source-line</A>
  685. <LI><A HREF="ANNOTATE.000#IDX31">frame-where</A>
  686. <LI><A HREF="ANNOTATE.000#IDX62">frames-invalid</A>
  687. <LI><A HREF="ANNOTATE.000#IDX20">function-call</A>
  688. </DIR>
  689. <H2>o</H2>
  690. <DIR>
  691. <LI><A HREF="ANNOTATE.000#IDX46">overload-choice</A>
  692. </DIR>
  693. <H2>p</H2>
  694. <DIR>
  695. <LI><A HREF="ANNOTATE.000#IDX44">post-commands</A>
  696. <LI><A HREF="ANNOTATE.000#IDX47">post-overload-choice</A>
  697. <LI><A HREF="ANNOTATE.000#IDX41">post-prompt</A>
  698. <LI><A HREF="ANNOTATE.000#IDX53">post-prompt-for-continue</A>
  699. <LI><A HREF="ANNOTATE.000#IDX50">post-query</A>
  700. <LI><A HREF="ANNOTATE.000#IDX42">pre-commands</A>
  701. <LI><A HREF="ANNOTATE.000#IDX45">pre-overload-choice</A>
  702. <LI><A HREF="ANNOTATE.000#IDX39">pre-prompt</A>
  703. <LI><A HREF="ANNOTATE.000#IDX51">pre-prompt-for-continue</A>
  704. <LI><A HREF="ANNOTATE.000#IDX48">pre-query</A>
  705. <LI><A HREF="ANNOTATE.000#IDX40">prompt</A>
  706. <LI><A HREF="ANNOTATE.000#IDX52">prompt-for-continue</A>
  707. </DIR>
  708. <H2>q</H2>
  709. <DIR>
  710. <LI><A HREF="ANNOTATE.000#IDX49">query</A>
  711. <LI><A HREF="ANNOTATE.000#IDX54">quit</A>
  712. </DIR>
  713. <H2>r</H2>
  714. <DIR>
  715. <LI><A HREF="ANNOTATE.000#IDX59">record</A>
  716. </DIR>
  717. <H2>s</H2>
  718. <DIR>
  719. <LI><A HREF="ANNOTATE.000#IDX72">signal</A>
  720. <LI><A HREF="ANNOTATE.000#IDX21">signal-handler-caller</A>
  721. <LI><A HREF="ANNOTATE.000#IDX68">signal-name</A>
  722. <LI><A HREF="ANNOTATE.000#IDX69">signal-name-end</A>
  723. <LI><A HREF="ANNOTATE.000#IDX70">signal-string</A>
  724. <LI><A HREF="ANNOTATE.000#IDX71">signal-string-end</A>
  725. <LI><A HREF="ANNOTATE.000#IDX67">signalled</A>
  726. <LI><A HREF="ANNOTATE.000#IDX75">source</A>
  727. <LI><A HREF="ANNOTATE.000#IDX64">starting</A>
  728. <LI><A HREF="ANNOTATE.000#IDX65">stopping</A>
  729. </DIR>
  730. <H2>v</H2>
  731. <DIR>
  732. <LI><A HREF="ANNOTATE.000#IDX4">value-begin</A>
  733. <LI><A HREF="ANNOTATE.000#IDX5">value-end</A>
  734. <LI><A HREF="ANNOTATE.000#IDX1">value-history-begin</A>
  735. <LI><A HREF="ANNOTATE.000#IDX3">value-history-end</A>
  736. <LI><A HREF="ANNOTATE.000#IDX2">value-history-value</A>
  737. </DIR>
  738. <H2>w</H2>
  739. <DIR>
  740. <LI><A HREF="ANNOTATE.000#IDX74">watchpoint</A>
  741. </DIR>
  742. <P>
  743. </BODY>
  744. </HTML>
  745.