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