*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / doc / annotate.texinfo
CommitLineData
e6f672d2
AC
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
3@setfilename annotate.info
afe157ca
EZ
4
5@c This is a dir.info fragment to support semi-automated addition of
6@c manuals to an info tree.
03727ca6 7@dircategory Software development
afe157ca
EZ
8@direntry
9* Annotate: (annotate). The obsolete annotation interface.
10@end direntry
11
e6f672d2
AC
12@c
13@include gdb-cfg.texi
14@c
15@settitle @value{GDBN}'s Obsolete Annotations
16@setchapternewpage off
17@c %**end of header
18
19@set EDITION 1.0
20@set DATE July 2003
21
22@c NOTE: cagney/2003-07-28:
d3e8051b 23@c Don't make this migration document an appendix of GDB's user guide.
e6f672d2
AC
24@c By keeping this separate, the size of the user guide is contained. If
25@c the user guide to get much bigger it would need to switch to a larger,
26@c more expensive, form factor and would drive up the manuals publication
27@c cost. Having a smaller cheaper manual helps the GNU Press with its sales.
28
29@ifinfo
30This file documents @value{GDBN}'s obsolete annotations.
31
c02a867d 32Copyright (C) 1994, 1995, 2000, 2001, 2003 Free Software Foundation, Inc.
e6f672d2
AC
33
34Permission is granted to copy, distribute and/or modify this document
35under the terms of the GNU Free Documentation License, Version 1.1 or
36any later version published by the Free Software Foundation; with no
37Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
38Texts. A copy of the license is included in the section entitled ``GNU
39Free Documentation License''.
40
41@end ifinfo
42
43@titlepage
44@title @value{GDBN}'s Obsolete Annotations
45@subtitle Edition @value{EDITION}
46@subtitle @value{DATE}
47@author Free Software Foundation
48@page
49@vskip 0pt plus 1filll
50Copyright @copyright{} 1994, 1995, 2000, 2001, 2003 Free Software
51Foundation, Inc.
52
53Permission is granted to copy, distribute and/or modify this document
54under the terms of the GNU Free Documentation License, Version 1.1 or
55any later version published by the Free Software Foundation; with no
56Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
57Texts. A copy of the license is included in the section entitled ``GNU
58Free Documentation License''.
59@end titlepage
60
61@ifinfo
62@node Top
63@top GDB Annotations
64
65This document describes the obsolete level two annotation interface
66implemented in older @value{GDBN} versions.
c906108c 67
d700128c 68@ignore
c906108c 69This is Edition @value{EDITION}, @value{DATE}.
d700128c 70@end ignore
e6f672d2 71@end ifinfo
c906108c
SS
72
73@menu
d700128c 74* Annotations Overview:: What annotations are; the general syntax.
e6f672d2
AC
75* Limitations:: Limitations of the annotation interface.
76* Migrating to GDB/MI:: Migrating to GDB/MI
d700128c
EZ
77* Server Prefix:: Issuing a command without affecting user state.
78* Value Annotations:: Values are marked as such.
79* Frame Annotations:: Stack frames are annotated.
80* Displays:: @value{GDBN} can be told to display something periodically.
81* Prompting:: Annotations marking @value{GDBN}'s need for input.
c906108c
SS
82* Errors:: Annotations for error messages.
83* Breakpoint Info:: Information on breakpoints.
84* Invalidation:: Some annotations describe things now invalid.
d700128c
EZ
85* Annotations for Running::
86 Whether the program is running, how it stopped, etc.
87* Source Annotations:: Annotations describing source code.
17314269 88* Multi-threaded Apps:: An annotation that reports multi-threadedness.
e6f672d2
AC
89
90* GNU Free Documentation License::
c906108c 91@end menu
c906108c 92
e6f672d2
AC
93@contents
94
d700128c 95@node Annotations Overview
e6f672d2 96@chapter What is an Annotation?
d700128c 97@cindex annotations
c906108c 98
e6f672d2
AC
99To produce obsolete level two annotations, start @value{GDBN} with the
100@code{--annotate=2} option.
c906108c
SS
101
102Annotations start with a newline character, two @samp{control-z}
103characters, and the name of the annotation. If there is no additional
104information associated with this annotation, the name of the annotation
105is followed immediately by a newline. If there is additional
106information, the name of the annotation is followed by a space, the
107additional information, and a newline. The additional information
108cannot contain newline characters.
109
110Any output not beginning with a newline and two @samp{control-z}
6d2ebf8b
SS
111characters denotes literal output from @value{GDBN}. Currently there is
112no need for @value{GDBN} to output a newline followed by two
113@samp{control-z} characters, but if there was such a need, the
114annotations could be extended with an @samp{escape} annotation which
115means those three characters as output.
c906108c 116
d700128c 117A simple example of starting up @value{GDBN} with annotations is:
c906108c 118
d700128c 119@smallexample
c906108c 120$ gdb --annotate=2
d700128c
EZ
121GNU GDB 5.0
122Copyright 2000 Free Software Foundation, Inc.
6d2ebf8b
SS
123GDB is free software, covered by the GNU General Public License,
124and you are welcome to change it and/or distribute copies of it
125under certain conditions.
d700128c 126Type "show copying" to see the conditions.
6d2ebf8b
SS
127There is absolutely no warranty for GDB. Type "show warranty"
128for details.
d700128c 129This GDB was configured as "sparc-sun-sunos4.1.3"
c906108c
SS
130
131^Z^Zpre-prompt
132(gdb)
133^Z^Zprompt
134quit
135
136^Z^Zpost-prompt
137$
d700128c 138@end smallexample
c906108c 139
6d2ebf8b
SS
140Here @samp{quit} is input to @value{GDBN}; the rest is output from
141@value{GDBN}. The three lines beginning @samp{^Z^Z} (where @samp{^Z}
142denotes a @samp{control-z} character) are annotations; the rest is
143output from @value{GDBN}.
c906108c 144
e6f672d2
AC
145@node Limitations
146@chapter Limitations of the Annotation Interface
147
148The level two annotations mechanism is known to have a number of
149technical and architectural limitations. As a consequence, in 2001,
150with the release of @value{GDBN} 5.1 and the addition of @sc{gdb/mi},
151the annotation interface was marked as deprecated.
152
153This chapter discusses the known problems.
154
155@section Dependant on @sc{cli} output
156
157The annotation interface works by interspersing markups with
ce2826aa 158@value{GDBN} normal command-line interpreter output. Unfortunately, this
e6f672d2
AC
159makes the annotation client dependant on not just the annotations, but
160also the @sc{cli} output. This is because the client is forced to
161assume that specific @value{GDBN} commands provide specific information.
162Any change to @value{GDBN}'s @sc{cli} output modifies or removes that
163information and, consequently, likely breaks the client.
164
d3e8051b 165Since the @sc{gdb/mi} output is independent of the @sc{cli}, it does not
e6f672d2
AC
166have this problem.
167
168@section Scalability
169
170The annotation interface relies on value annotations (@pxref{Value
171Annotations}) and the display mechanism as a way of obtaining up-to-date
172value information. These mechanisms are not scalable.
173
174In a graphical environment, where many values can be displayed
175simultaneously, a serious performance problem occurs when the client
176tries to first extract from @value{GDBN}, and then re-display, all those
177values. The client should instead only request and update the values
178that changed.
179
180The @sc{gdb/mi} Variable Objects provide just that mechanism.
181
182@section Correctness
183
184The annotation interface assumes that a variable's value can only be
185changed when the target is running. This assumption is not correct. A
186single assignment to a single variable can result in the entire target,
187and all displayed values, needing an update.
188
189The @sc{gdb/mi} Variable Objects include a mechanism for efficiently
190reporting such changes.
191
192@section Reliability
193
194The @sc{gdb/mi} interface includes a dedicated test directory
195(@file{gdb/gdb.mi}), and any addition or fix to @sc{gdb/mi} must include
196testsuite changes.
197
198@section Maintainability
199
200The annotation mechanism was implemented by interspersing @sc{cli} print
201statements with various annotations. As a consequence, any @sc{cli}
202output change can alter the annotation output.
203
d3e8051b
EZ
204Since the @sc{gdb/mi} output is independent of the @sc{cli}, and the
205@sc{gdb/mi} is increasingly implemented independent of the @sc{cli}
e6f672d2
AC
206code, its long term maintenance is much easier.
207
208@node Migrating to GDB/MI
209@chapter Migrating to @sc{gdb/mi}
210
211By using the @samp{interp mi} command, it is possible for annotation
212clients to invoke @sc{gdb/mi} commands, and hence access the
213@sc{gdb/mi}. By doing this, existing annotation clients have a
214migration path from this obsolete interface to @sc{gdb/mi}.
215
d700128c 216@node Server Prefix
e6f672d2 217@chapter The Server Prefix
d700128c 218@cindex server prefix for annotations
c906108c 219
6d2ebf8b
SS
220To issue a command to @value{GDBN} without affecting certain aspects of
221the state which is seen by users, prefix it with @samp{server }. This
222means that this command will not affect the command history, nor will it
223affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
224pressed on a line by itself.
c906108c
SS
225
226The server prefix does not affect the recording of values into the value
227history; to print a value without recording it into the value history,
228use the @code{output} command instead of the @code{print} command.
229
d700128c 230@node Value Annotations
e6f672d2
AC
231@chapter Values
232
233@emph{Value Annotations have been removed. @sc{gdb/mi} instead provides
234Variable Objects.}
c906108c 235
d700128c 236@cindex annotations for values
6d2ebf8b
SS
237When a value is printed in various contexts, @value{GDBN} uses
238annotations to delimit the value from the surrounding text.
c906108c
SS
239
240@findex value-history-begin
241@findex value-history-value
242@findex value-history-end
243If a value is printed using @code{print} and added to the value history,
244the annotation looks like
245
6d2ebf8b 246@smallexample
c906108c
SS
247^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
248@var{history-string}
249^Z^Zvalue-history-value
250@var{the-value}
251^Z^Zvalue-history-end
6d2ebf8b 252@end smallexample
c906108c 253
cb51c4e0 254@noindent
c906108c
SS
255where @var{history-number} is the number it is getting in the value
256history, @var{history-string} is a string, such as @samp{$5 = }, which
257introduces the value to the user, @var{the-value} is the output
258corresponding to the value itself, and @var{value-flags} is @samp{*} for
259a value which can be dereferenced and @samp{-} for a value which cannot.
260
261@findex value-begin
262@findex value-end
263If the value is not added to the value history (it is an invalid float
264or it is printed with the @code{output} command), the annotation is similar:
265
6d2ebf8b 266@smallexample
c906108c
SS
267^Z^Zvalue-begin @var{value-flags}
268@var{the-value}
269^Z^Zvalue-end
6d2ebf8b 270@end smallexample
c906108c
SS
271
272@findex arg-begin
273@findex arg-name-end
274@findex arg-value
275@findex arg-end
d700128c 276When @value{GDBN} prints an argument to a function (for example, in the output
c906108c
SS
277from the @code{backtrace} command), it annotates it as follows:
278
6d2ebf8b 279@smallexample
c906108c
SS
280^Z^Zarg-begin
281@var{argument-name}
282^Z^Zarg-name-end
283@var{separator-string}
284^Z^Zarg-value @var{value-flags}
285@var{the-value}
286^Z^Zarg-end
6d2ebf8b 287@end smallexample
c906108c 288
cb51c4e0 289@noindent
c906108c
SS
290where @var{argument-name} is the name of the argument,
291@var{separator-string} is text which separates the name from the value
292for the user's benefit (such as @samp{=}), and @var{value-flags} and
293@var{the-value} have the same meanings as in a
294@code{value-history-begin} annotation.
295
296@findex field-begin
297@findex field-name-end
298@findex field-value
299@findex field-end
d700128c 300When printing a structure, @value{GDBN} annotates it as follows:
c906108c 301
6d2ebf8b 302@smallexample
c906108c
SS
303^Z^Zfield-begin @var{value-flags}
304@var{field-name}
305^Z^Zfield-name-end
306@var{separator-string}
307^Z^Zfield-value
308@var{the-value}
309^Z^Zfield-end
6d2ebf8b 310@end smallexample
c906108c 311
cb51c4e0 312@noindent
c906108c
SS
313where @var{field-name} is the name of the field, @var{separator-string}
314is text which separates the name from the value for the user's benefit
315(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
316same meanings as in a @code{value-history-begin} annotation.
317
d700128c 318When printing an array, @value{GDBN} annotates it as follows:
c906108c 319
6d2ebf8b 320@smallexample
c906108c 321^Z^Zarray-section-begin @var{array-index} @var{value-flags}
6d2ebf8b 322@end smallexample
c906108c 323
cb51c4e0 324@noindent
c906108c
SS
325where @var{array-index} is the index of the first element being
326annotated and @var{value-flags} has the same meaning as in a
327@code{value-history-begin} annotation. This is followed by any number
328of elements, where is element can be either a single element:
329
330@findex elt
6d2ebf8b 331@smallexample
c906108c
SS
332@samp{,} @var{whitespace} ; @r{omitted for the first element}
333@var{the-value}
334^Z^Zelt
6d2ebf8b 335@end smallexample
c906108c
SS
336
337or a repeated element
338
339@findex elt-rep
340@findex elt-rep-end
6d2ebf8b 341@smallexample
c906108c
SS
342@samp{,} @var{whitespace} ; @r{omitted for the first element}
343@var{the-value}
f821f325 344^Z^Zelt-rep @var{number-of-repetitions}
c906108c
SS
345@var{repetition-string}
346^Z^Zelt-rep-end
6d2ebf8b 347@end smallexample
c906108c
SS
348
349In both cases, @var{the-value} is the output for the value of the
350element and @var{whitespace} can contain spaces, tabs, and newlines. In
f821f325 351the repeated case, @var{number-of-repetitions} is the number of
c906108c
SS
352consecutive array elements which contain that value, and
353@var{repetition-string} is a string which is designed to convey to the
f821f325 354user that repetition is being depicted.
c906108c
SS
355
356@findex array-section-end
357Once all the array elements have been output, the array annotation is
358ended with
359
6d2ebf8b 360@smallexample
c906108c 361^Z^Zarray-section-end
6d2ebf8b 362@end smallexample
c906108c 363
d700128c 364@node Frame Annotations
e6f672d2
AC
365@chapter Frames
366
367@emph{Value Annotations have been removed. @sc{gdb/mi} instead provides
368a number of frame commands.}
369
370@emph{Frame annotations are no longer available. The @sc{gdb/mi}
371provides @samp{-stack-list-arguments}, @samp{-stack-list-locals}, and
372@samp{-stack-list-frames} commands.}
c906108c 373
d700128c
EZ
374@cindex annotations for frames
375Whenever @value{GDBN} prints a frame, it annotates it. For example, this applies
376to frames printed when @value{GDBN} stops, output from commands such as
c906108c
SS
377@code{backtrace} or @code{up}, etc.
378
379@findex frame-begin
380The frame annotation begins with
381
6d2ebf8b 382@smallexample
c906108c
SS
383^Z^Zframe-begin @var{level} @var{address}
384@var{level-string}
6d2ebf8b 385@end smallexample
c906108c 386
cb51c4e0 387@noindent
c906108c
SS
388where @var{level} is the number of the frame (0 is the innermost frame,
389and other frames have positive numbers), @var{address} is the address of
390the code executing in that frame, and @var{level-string} is a string
391designed to convey the level to the user. @var{address} is in the form
392@samp{0x} followed by one or more lowercase hex digits (note that this
393does not depend on the language). The frame ends with
394
395@findex frame-end
6d2ebf8b 396@smallexample
c906108c 397^Z^Zframe-end
6d2ebf8b 398@end smallexample
c906108c
SS
399
400Between these annotations is the main body of the frame, which can
401consist of
402
403@itemize @bullet
404@item
405@findex function-call
6d2ebf8b 406@smallexample
c906108c
SS
407^Z^Zfunction-call
408@var{function-call-string}
6d2ebf8b 409@end smallexample
c906108c
SS
410
411where @var{function-call-string} is text designed to convey to the user
d700128c 412that this frame is associated with a function call made by @value{GDBN} to a
c906108c
SS
413function in the program being debugged.
414
415@item
416@findex signal-handler-caller
6d2ebf8b 417@smallexample
c906108c
SS
418^Z^Zsignal-handler-caller
419@var{signal-handler-caller-string}
6d2ebf8b 420@end smallexample
c906108c
SS
421
422where @var{signal-handler-caller-string} is text designed to convey to
423the user that this frame is associated with whatever mechanism is used
424by this operating system to call a signal handler (it is the frame which
425calls the signal handler, not the frame for the signal handler itself).
426
427@item
428A normal frame.
429
430@findex frame-address
431@findex frame-address-end
432This can optionally (depending on whether this is thought of as
433interesting information for the user to see) begin with
434
6d2ebf8b 435@smallexample
c906108c
SS
436^Z^Zframe-address
437@var{address}
438^Z^Zframe-address-end
439@var{separator-string}
6d2ebf8b 440@end smallexample
c906108c
SS
441
442where @var{address} is the address executing in the frame (the same
443address as in the @code{frame-begin} annotation, but printed in a form
444which is intended for user consumption---in particular, the syntax varies
445depending on the language), and @var{separator-string} is a string
446intended to separate this address from what follows for the user's
447benefit.
448
449@findex frame-function-name
450@findex frame-args
451Then comes
452
6d2ebf8b 453@smallexample
c906108c
SS
454^Z^Zframe-function-name
455@var{function-name}
456^Z^Zframe-args
457@var{arguments}
6d2ebf8b 458@end smallexample
c906108c
SS
459
460where @var{function-name} is the name of the function executing in the
461frame, or @samp{??} if not known, and @var{arguments} are the arguments
462to the frame, with parentheses around them (each argument is annotated
d700128c 463individually as well, @pxref{Value Annotations}).
c906108c
SS
464
465@findex frame-source-begin
466@findex frame-source-file
467@findex frame-source-file-end
468@findex frame-source-line
469@findex frame-source-end
470If source information is available, a reference to it is then printed:
471
6d2ebf8b 472@smallexample
c906108c
SS
473^Z^Zframe-source-begin
474@var{source-intro-string}
475^Z^Zframe-source-file
476@var{filename}
477^Z^Zframe-source-file-end
478:
479^Z^Zframe-source-line
480@var{line-number}
481^Z^Zframe-source-end
6d2ebf8b 482@end smallexample
c906108c
SS
483
484where @var{source-intro-string} separates for the user's benefit the
485reference from the text which precedes it, @var{filename} is the name of
486the source file, and @var{line-number} is the line number within that
487file (the first line is line 1).
488
489@findex frame-where
d700128c 490If @value{GDBN} prints some information about where the frame is from (which
c906108c
SS
491library, which load segment, etc.; currently only done on the RS/6000),
492it is annotated with
493
6d2ebf8b 494@smallexample
c906108c
SS
495^Z^Zframe-where
496@var{information}
6d2ebf8b 497@end smallexample
c906108c
SS
498
499Then, if source is to actually be displayed for this frame (for example,
500this is not true for output from the @code{backtrace} command), then a
a984817e
EZ
501@code{source} annotation (@pxref{Source Annotations}) is displayed. Unlike
502most annotations, this is output instead of the normal text which would be
c906108c
SS
503output, not in addition.
504@end itemize
505
506@node Displays
e6f672d2
AC
507@chapter Displays
508
509@emph{Display Annotations have been removed. @sc{gdb/mi} instead
510provides Variable Objects.}
c906108c
SS
511
512@findex display-begin
513@findex display-number-end
514@findex display-format
515@findex display-expression
516@findex display-expression-end
517@findex display-value
518@findex display-end
d700128c
EZ
519@cindex annotations for display
520When @value{GDBN} is told to display something using the @code{display} command,
c906108c
SS
521the results of the display are annotated:
522
6d2ebf8b 523@smallexample
c906108c
SS
524^Z^Zdisplay-begin
525@var{number}
526^Z^Zdisplay-number-end
527@var{number-separator}
528^Z^Zdisplay-format
529@var{format}
530^Z^Zdisplay-expression
531@var{expression}
532^Z^Zdisplay-expression-end
533@var{expression-separator}
534^Z^Zdisplay-value
535@var{value}
536^Z^Zdisplay-end
6d2ebf8b 537@end smallexample
c906108c 538
cb51c4e0 539@noindent
c906108c
SS
540where @var{number} is the number of the display, @var{number-separator}
541is intended to separate the number from what follows for the user,
542@var{format} includes information such as the size, format, or other
543information about how the value is being displayed, @var{expression} is
544the expression being displayed, @var{expression-separator} is intended
545to separate the expression from the text that follows for the user,
546and @var{value} is the actual value being displayed.
547
548@node Prompting
e6f672d2 549@chapter Annotation for @value{GDBN} Input
c906108c 550
d700128c
EZ
551@cindex annotations for prompts
552When @value{GDBN} prompts for input, it annotates this fact so it is possible
c906108c
SS
553to know when to send output, when the output from a given command is
554over, etc.
555
556Different kinds of input each have a different @dfn{input type}. Each
557input type has three annotations: a @code{pre-} annotation, which
558denotes the beginning of any prompt which is being output, a plain
559annotation, which denotes the end of the prompt, and then a @code{post-}
560annotation which denotes the end of any echo which may (or may not) be
561associated with the input. For example, the @code{prompt} input type
562features the following annotations:
563
6d2ebf8b 564@smallexample
c906108c
SS
565^Z^Zpre-prompt
566^Z^Zprompt
567^Z^Zpost-prompt
6d2ebf8b 568@end smallexample
c906108c
SS
569
570The input types are
571
572@table @code
573@findex pre-prompt
574@findex prompt
575@findex post-prompt
576@item prompt
d700128c 577When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
c906108c
SS
578
579@findex pre-commands
580@findex commands
581@findex post-commands
582@item commands
d700128c 583When @value{GDBN} prompts for a set of commands, like in the @code{commands}
c906108c
SS
584command. The annotations are repeated for each command which is input.
585
586@findex pre-overload-choice
587@findex overload-choice
588@findex post-overload-choice
589@item overload-choice
d700128c 590When @value{GDBN} wants the user to select between various overloaded functions.
c906108c
SS
591
592@findex pre-query
593@findex query
594@findex post-query
595@item query
d700128c 596When @value{GDBN} wants the user to confirm a potentially dangerous operation.
c906108c
SS
597
598@findex pre-prompt-for-continue
599@findex prompt-for-continue
600@findex post-prompt-for-continue
601@item prompt-for-continue
d700128c 602When @value{GDBN} is asking the user to press return to continue. Note: Don't
c906108c
SS
603expect this to work well; instead use @code{set height 0} to disable
604prompting. This is because the counting of lines is buggy in the
605presence of annotations.
606@end table
607
608@node Errors
e6f672d2 609@chapter Errors
d700128c 610@cindex annotations for errors, warnings and interrupts
c906108c
SS
611
612@findex quit
6d2ebf8b 613@smallexample
c906108c 614^Z^Zquit
6d2ebf8b 615@end smallexample
c906108c 616
d700128c 617This annotation occurs right before @value{GDBN} responds to an interrupt.
c906108c
SS
618
619@findex error
6d2ebf8b 620@smallexample
c906108c 621^Z^Zerror
6d2ebf8b 622@end smallexample
c906108c 623
d700128c 624This annotation occurs right before @value{GDBN} responds to an error.
c906108c 625
d700128c 626Quit and error annotations indicate that any annotations which @value{GDBN} was
c906108c
SS
627in the middle of may end abruptly. For example, if a
628@code{value-history-begin} annotation is followed by a @code{error}, one
629cannot expect to receive the matching @code{value-history-end}. One
630cannot expect not to receive it either, however; an error annotation
d700128c 631does not necessarily mean that @value{GDBN} is immediately returning all the way
c906108c
SS
632to the top level.
633
634@findex error-begin
635A quit or error annotation may be preceded by
636
6d2ebf8b 637@smallexample
c906108c 638^Z^Zerror-begin
6d2ebf8b 639@end smallexample
c906108c
SS
640
641Any output between that and the quit or error annotation is the error
642message.
643
644Warning messages are not yet annotated.
645@c If we want to change that, need to fix warning(), type_error(),
646@c range_error(), and possibly other places.
647
648@node Breakpoint Info
e6f672d2
AC
649@chapter Information on Breakpoints
650
651@emph{Breakpoint Annotations have been removed. @sc{gdb/mi} instead
652provides breakpoint commands.}
c906108c 653
d700128c 654@cindex annotations for breakpoints
c906108c
SS
655The output from the @code{info breakpoints} command is annotated as follows:
656
657@findex breakpoints-headers
658@findex breakpoints-table
6d2ebf8b 659@smallexample
c906108c
SS
660^Z^Zbreakpoints-headers
661@var{header-entry}
662^Z^Zbreakpoints-table
6d2ebf8b 663@end smallexample
c906108c 664
cb51c4e0 665@noindent
c906108c
SS
666where @var{header-entry} has the same syntax as an entry (see below) but
667instead of containing data, it contains strings which are intended to
668convey the meaning of each field to the user. This is followed by any
669number of entries. If a field does not apply for this entry, it is
670omitted. Fields may contain trailing whitespace. Each entry consists
671of:
672
673@findex record
674@findex field
6d2ebf8b 675@smallexample
c906108c
SS
676^Z^Zrecord
677^Z^Zfield 0
678@var{number}
679^Z^Zfield 1
680@var{type}
681^Z^Zfield 2
682@var{disposition}
683^Z^Zfield 3
684@var{enable}
685^Z^Zfield 4
686@var{address}
687^Z^Zfield 5
688@var{what}
689^Z^Zfield 6
690@var{frame}
691^Z^Zfield 7
692@var{condition}
693^Z^Zfield 8
694@var{ignore-count}
695^Z^Zfield 9
696@var{commands}
6d2ebf8b 697@end smallexample
c906108c
SS
698
699Note that @var{address} is intended for user consumption---the syntax
700varies depending on the language.
701
702The output ends with
703
704@findex breakpoints-table-end
6d2ebf8b 705@smallexample
c906108c 706^Z^Zbreakpoints-table-end
6d2ebf8b 707@end smallexample
c906108c
SS
708
709@node Invalidation
e6f672d2 710@chapter Invalidation Notices
c906108c 711
d700128c 712@cindex annotations for invalidation messages
c906108c
SS
713The following annotations say that certain pieces of state may have
714changed.
715
716@table @code
717@findex frames-invalid
718@item ^Z^Zframes-invalid
719
720The frames (for example, output from the @code{backtrace} command) may
721have changed.
722
723@findex breakpoints-invalid
724@item ^Z^Zbreakpoints-invalid
725
726The breakpoints may have changed. For example, the user just added or
727deleted a breakpoint.
728@end table
729
d700128c 730@node Annotations for Running
e6f672d2 731@chapter Running the Program
d700128c 732@cindex annotations for running programs
c906108c
SS
733
734@findex starting
735@findex stopping
d700128c 736When the program starts executing due to a @value{GDBN} command such as
c906108c
SS
737@code{step} or @code{continue},
738
6d2ebf8b 739@smallexample
c906108c 740^Z^Zstarting
6d2ebf8b 741@end smallexample
c906108c
SS
742
743is output. When the program stops,
744
6d2ebf8b 745@smallexample
c906108c 746^Z^Zstopped
6d2ebf8b 747@end smallexample
c906108c
SS
748
749is output. Before the @code{stopped} annotation, a variety of
750annotations describe how the program stopped.
751
752@table @code
753@findex exited
754@item ^Z^Zexited @var{exit-status}
755The program exited, and @var{exit-status} is the exit status (zero for
756successful exit, otherwise nonzero).
757
758@findex signalled
759@findex signal-name
760@findex signal-name-end
761@findex signal-string
762@findex signal-string-end
763@item ^Z^Zsignalled
764The program exited with a signal. After the @code{^Z^Zsignalled}, the
765annotation continues:
766
6d2ebf8b 767@smallexample
c906108c
SS
768@var{intro-text}
769^Z^Zsignal-name
770@var{name}
771^Z^Zsignal-name-end
772@var{middle-text}
773^Z^Zsignal-string
774@var{string}
775^Z^Zsignal-string-end
776@var{end-text}
6d2ebf8b 777@end smallexample
c906108c 778
cb51c4e0 779@noindent
c906108c
SS
780where @var{name} is the name of the signal, such as @code{SIGILL} or
781@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
782as @code{Illegal Instruction} or @code{Segmentation fault}.
783@var{intro-text}, @var{middle-text}, and @var{end-text} are for the
784user's benefit and have no particular format.
785
786@findex signal
787@item ^Z^Zsignal
d700128c 788The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
c906108c
SS
789just saying that the program received the signal, not that it was
790terminated with it.
791
792@findex breakpoint
793@item ^Z^Zbreakpoint @var{number}
794The program hit breakpoint number @var{number}.
795
796@findex watchpoint
797@item ^Z^Zwatchpoint @var{number}
798The program hit watchpoint number @var{number}.
799@end table
800
d700128c 801@node Source Annotations
e6f672d2 802@chapter Displaying Source
d700128c 803@cindex annotations for source display
c906108c
SS
804
805@findex source
806The following annotation is used instead of displaying source code:
807
6d2ebf8b 808@smallexample
c906108c 809^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
6d2ebf8b 810@end smallexample
c906108c
SS
811
812where @var{filename} is an absolute file name indicating which source
813file, @var{line} is the line number within that file (where 1 is the
814first line in the file), @var{character} is the character position
815within the file (where 0 is the first character in the file) (for most
816debug formats this will necessarily point to the beginning of a line),
817@var{middle} is @samp{middle} if @var{addr} is in the middle of the
818line, or @samp{beg} if @var{addr} is at the beginning of the line, and
819@var{addr} is the address in the target program associated with the
820source which is being displayed. @var{addr} is in the form @samp{0x}
821followed by one or more lowercase hex digits (note that this does not
822depend on the language).
823
17314269
NR
824@node Multi-threaded Apps
825@chapter Multi-threaded Applications
826@cindex annotations for multi-threaded apps
827
aeac2181 828The following annotations report thread related changes of state.
17314269 829
aeac2181
NR
830@table @code
831@findex new-thread@r{, annotation}
832@item ^Z^Znew-thread
17314269
NR
833
834This annotation is issued once for each thread that is created apart from
835the main thread, which is not reported.
836
aeac2181
NR
837@findex thread-changed@r{, annotation}
838@item ^Z^Zthread-changed
839
840The selected thread has changed. This may occur at the request of the
841user with the @code{thread} command, or as a result of execution,
842e.g., another thread hits a breakpoint.
843
844@end table
845
2154891a 846@raisesections
e6f672d2 847@include fdl.texi
2154891a 848@lowersections
c906108c 849
d700128c 850@ignore
c906108c
SS
851@node Index
852@unnumbered Index
853
854@printindex fn
d700128c 855@end ignore
c906108c 856
e6f672d2 857@bye
This page took 0.569243 seconds and 4 git commands to generate.