beautypg.com

11 displaying source – HP gnu source-level debugger 5992-4701 User Manual

Page 304

background image

is output. Before the stopped annotation, a variety of annotations describe how the
program stopped.

^Z^Zexited exit-status

The program exited, and exit-status is the exit
status (zero for successful exit, otherwise nonzero).

^Z^Zsignalled

The program exited with a signal. After the
^Z^Zsignalled, the annotation continues:

intro-text
^Z^Zsignal-name
name
^Z^Zsignal-name-end
middle-text
^Z^Zsignal-string
string
^Z^Zsignal-string-end
end-text

where name is the name of the signal, such as
SIGILL or SIGSEGV, and string is the explanation
of the signal, such as Illegal Instruction or
Segmentation fault

. intro-text,

middle-text

, and end-text are for the user's

benefit and have no particular format.

^Z^Zsignal

The syntax of this annotation is just like signalled,
but GDB is just saying that the program received
the signal, not that it was terminated with it.

^Z^Zbreakpoint number

The program hit breakpoint number number.

^Z^Zwatchpoint number

The program hit watchpoint number number.

20.11 Displaying source

The following annotation is used instead of displaying source code:

^Z^Zsource filename:line:character:middle:addr

where filename is an absolute file name indicating which source file, line is the line
number within that file (where 1 is the first line in the file), character is the character
position within the file (where 0 is the first character in the file, for most debug formats
this will necessarily point to the beginning of a line), middle is `middle' if addr is in
the middle of the line, or `beg' if addr is at the beginning of the line, and addr is the
address in the target program associated with the source which is being displayed.
addr

is in the form `0x' followed by one or more lowercase hex digits (note that this

does not depend on the language).

304

GDB Annotations