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

Table Of Contents
All file-specifying commands allow both absolute and relative file names as arguments.
GDB always converts the file name to an absolute file name and remembers it that way.
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, however ― unless you
are debugging a core file).
On HP-UX, if the program loads a library explicitly, GDB automatically loads the symbols
at the time of the shl_load call. See “Breakpoints” (page 46), for more information.
info share, info
sharedlibrary
Print the names of the shared libraries which are currently
loaded.
sharedlibrary regex, share
regex
Load shared object library symbols for files matching a
Unix regular expression. As with files loaded
automatically, it only loads shared libraries required by
your program for a core file or after typing run. If regex
is omitted all shared libraries required by your program
are loaded.
On HP-UX systems, GDB detects the loading of a shared library and automatically reads
in symbols from the newly loaded library, up to a threshold that is initially set but that
you can modify if you wish.
Beyond that threshold, symbols from shared libraries must be explicitly loaded. To load
these symbols, use the command sharedlibrary filename. The base address of
the shared library is determined automatically by GDB and need not be specified.
To display or set the threshold, use the commands:
set auto-solib-add
threshold
Set the autoloading size threshold, in megabytes.
If threshold is nonzero, symbols from all shared
object libraries will be loaded automatically when
the inferior begins execution or when the dynamic
linker informs GDB that a new library has been
loaded, until the symbol table of the program and
libraries exceeds this threshold. Otherwise,
symbols must be loaded manually, using the
sharedlibrary command. The default threshold
is 100 megabytes.
show auto-solib-add Display the current autoloading size threshold, in
megabytes.
set stop-on-solib-events This command controls whether GDB should give
you control when the dynamic linker notifies it
about some shared library event. The most
common event of interest is loading or unloading
of a new shared library.
122 GDB Files