Debugging with GDB (September 2007)

170 Debugging with GDB
performed when the breakpoint is reached. These breakpoints work like procedural
breakpoints in the xdb debugger.
The breakpoint commands are rbp and rdp.
rbp: Sets breakpoints at the first executable statement in all the functions that
can be debugged, including any shared libraries that are already loaded. The rbp
command sets breakpoints in all the functions, which c an be debugged, in all the
source files.After you set these breakpoints, you can manage them like any standard
breakpoints. You can delete them, disable them, or make them conditional.Each
time you use the rbp command, HP WDB adds an additional breakpoint at the
beginning of each function that performs the com mands you specify, if any.
rdp: Deletes all the breakpoints set by the rbp command.
This example shows how to set a breakpoint at the start of each procedure that displays
information at the breakpoint:
(gdb) file a.out
Reading symbols from a.out...done.
(gdb) rbp
Breakpoints set from 170 to 211
Type commands to execute when the breakpoint is hit (one command per line).
End with a line saying just "end".
>info break
>end
(gdb)
14.19.5 Support for template breakpoint s
With HP WDB 5.0, you can set breakpoints on all instantiations of the template class
by just specifying the template name with memb e r function name.
For example:
(gdb) break ::
It is not necessary to specify the instantiation typ e.
Setting a breakpoint on a template method with multiple instantiations displays a
menu showing all instantiations and the user can choose to set breakpoints on all or
any one or none.
For example:
(gdb) file test
Reading symbols from test...done.
(gdb) b MyClass::MyMember
[0] cancel
[1] all
[2] MyClass::MyMember(int, int) at test.C:14
[3] MyClass::MyMember(int, float) at test.C:14
[4] MyClass::MyMember(int, double) at test.C:14