Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)
What Where the breakpoint is in the
source for your program, as
a file and line number.
If a breakpoint is conditional, info break shows the
condition on the line following the affected breakpoint;
breakpoint commands, if any, are listed after that.
info break with a breakpoint number n as argument lists
only that breakpoint. The convenience variable $_ and the
default examining-address for the x command are set to the
address of the last breakpoint listed (see “Examining memory”
(page 66)).
info break displays a count of the number of times the
breakpoint has been hit. This is especially useful in conjunction
with the ignore command. You can ignore a large number
of breakpoint hits, look at the breakpoint info to see how
many times the breakpoint was hit, and then run again,
ignoring one less than that number. This will get you quickly
to the last hit of that breakpoint.
GDB allows you to set any number of breakpoints at the same place in your program. There is
nothing silly or meaningless about this. When the breakpoints are conditional, this is even useful
(see “Break conditions” (page 45).
GDB itself sometimes sets breakpoints in your program for special purposes, such as proper handling
of longjmp (in C programs). These internal breakpoints are assigned negative numbers, starting
with -1; 'info breakpoints' does not display them.
You can see these breakpoints with the GDB maintenance command 'maint info
breakpoints'.
maint info breakpoints Using the same format as 'info breakpoints', display both
the breakpoints you have set explicitly, and those GDB is using
for internal purposes. Internal breakpoints are shown with
negative breakpoint numbers. The type column identifies what
kind of breakpoint is shown:
breakpoint Normal, explicitly set breakpoint.
watchpoint Normal, explicitly set watchpoint.
longjmp Internal breakpoint, used to handle
correctly stepping through longjmp
calls.
longjmp resume Internal breakpoint at the target of a
longjmp.
until Temporary internal breakpoint used by
the GDB until command.
finish Temporary internal breakpoint used by
the GDB finish command.
shlib events Shared library events.
5.1.2 Setting catchpoints
You can use catchpoints to cause the debugger to stop for certain kinds of program events, such
as C++ exceptions or the loading of a shared library. Use the catch command to set a catchpoint.
catch event Stop when event occurs. event can be any of the following:
throw The throwing of a C++ exception.
42 Stopping and Continuing