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