show auto-solib-add

Display the current autoloading size threshold,

 

in megabytes.

12.2 Specifying shared library locations

On HP-UX, when the shared libraries your program uses are in a different directory than the path specified in the source or object files, specify the correct files to use with one of two environment variables.

`GDB_SHLIB_PATH'

Set this variable to a colon-separated list of directory path

 

names where the desired shared libraries reside. GDB

 

searches specified list of directories for shared libraries before

 

searching the default system directories.

`GDB_SHLIB_ROOT'

Set this variable to point to the root of the library in which

 

the desired libraries reside.

NOTE: If you set both the `GDB_SHLIB_PATH' and `GDB_SHLIB_ROOT' environment variables, the `GDB_SHLIB_PATH' behavior overrides `GDB_SHLIB_ROOT'.

These environment variables are useful when you are analyzing core files on a system other than the one that produced the core file.

For example, if you want GDB to search for libraries in /home/debugger/lib and /tmp/lib before searching the default system directories for libraries, you can use this setting:

GDB_SHLIB_PATH=/home/debugger/lib:/tmp/lib

With this setting, GDB searches the directories in the order specified until it finds a library with the correct name.

In this example, if GDB encounters a library by the name of /usr/lib/libsubs.sl, GDB searches first for /home/debugger/lib/libsubs.sl and then for /tmp/lib/ libsubs.sl. If neither of these exists, then GDB searches the default system directories and finds /usr/lib/libsubs.sl.

In most cases, GDB_SHLIB_PATH allows more flexibility than GDB_SHLIB_ROOT' because it allows you to specify more than one path. However, there are some cases in which you may want to choose to use GDB_SHLIB_ROOT.

For example, if you have more than one shared library with the same name but different path names, you may want to use GDB_SHLIB_ROOT because GDB searches for libraries based on the full path name.

Note that GDB_SHLIB_PATH may not give you the results you expect because GDB searches for libraries that match only the name, regardless of the path, and always accepts the first library that matches the name.

130 GDB Files