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