Debugging with GDB (February 2008)

Table Of Contents
174 Debugging with GDB
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 breakpoints
With HP WDB 5.0, you can set breakpoints on all instantiations of the template class
by just specifying the template name with member function name.
For example:
(gdb) break ::
It is not necessary to specify the instantiation type.
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
14.20 Debugging support for shared libraries
On HP-UX, shared libraries are special. Until the library is loaded, GDB does not
know the names of symbols. However, GDB gives you two ways to set breakpoints in
shared libraries:
deferred breakpoints
catch load command
14.20.1 Using shared library as main program
If the main program is in a shared library and you try to load it as follows: