Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
Breakpoint deferred until a shared library containing "main" is loaded.
(gdb) r
Once the program has started running, it will hit the breakpoint. In addition, the de-
bugger will then already know about the sources for main, since it gets this information
when the shared library is loaded.
14.23.2 Setting Deferred Breakpoints in Shared Library
On HP-UX, GDB automatically loads symbol definitions from shared libraries when you
use the run command, or when you examine a core file. (Before you issue the run
command, GDB does not understand references to a function in a shared library| unless
you are debugging a core file.)
When you specify a breakpoint using a name that GDB does not recognize, the debugger
warns you with a message that it is setting a deferred breakpoint on the name you
specified. If any shared library is loaded with a matching name, then GDB sets the
breakpoint.
For example, if you type:
`break foo'
the debugger does not know whether foo is a misspelled name or whether it is the name
of a routine that has not yet been loaded from a shared library. The debugger displays
a warning message that it is setting a deferred breakpoint on foo. If any shared library
is loaded that contains a foo, then GDB sets the breakpoint.
If this is not what you want (for example, if the name was mistyped), then you can delete
the breakpoint.
14.23.3 Using catch load
The `catch load <libname>' command causes the debugger to stop when the
particular library is loaded. This gives you a chance to set breakpoints before routines
are executed.
14.23.4 Privately mapping shared libraries
In cases where you attach to a running program and you try to set a breakpoint in a
shared library, GDB may generate the following message:
The shared libraries were not privately mapped; setting a breakpoint
in a shared library will not work until you rerun the program.
GDB generates this message because the debugger sets breakpoints by replacing an
instruction with a BREAK instruction. The debugger cannot set a breakpoint in a shared
library because doing so can affect other processes on the system in addition to the
process being debugged.
212 HP-UX Configuration-Specific Information