Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)
$GDB_SERVERGDB_ROOT/opt/langtools/binDefined Variable
n/an/a/opt/langtools/libWDB Location
LIBRTC_SERVER$GDB_ROOT/binWDB_ROOTGDB location
n/a/opt/langtools/bin$WDB_ROOT/binlibrtc.sl location
n/aGDB_SERVER$WDB_ROOT/binNone
$LIBRTC_SERVERn/a$WDB_ROOT/lib/opt/langtools/bin
NOTE: If you define WDB_ROOT or GDB_ROOT but do not create the correct directory structure
below it, the debugger may fail.
14.6 Specifying object file directories
GDB enables automatic loading of debug information from object modules when an application
is compiled with the +objdebug option.
GDB uses the full path name to the object module files and searches the same directories for source
files.
Although this behavior is transparent, you can control when and how object files are loaded with
three commands:
objectdir path Specifies a colon (:) separated list of directories in which GDB
searches for object files. These directories are added to the beginning
of the existing objectdir path. If you specify a directory that is
already in the objectdir path, the specified directory is moved up
in the objectdir path so that it is searched earlier.
GDB recognizes two special directory names: $cdir, which refers
to the compilation directory (if available) and $cwd, which tracks
GDB's current working directory.
objectload file.c Causes GDB to load the debug information for file.c immediately.
The default is to load debug information from object modules on
demand.
objectretry file.c Adds directories provided as argument to the list of directories
searched for object files. Then forces GDB to retry loading an object
file if GDB encounters a file error while reading an object module.
File errors that might cause this include incorrect permissions, file not
found, or if the objectdir path changes. By default, GDB does not
try to read an object file after an error.
show objectdir Display the current search path for finding object files. By default it
is $cdir:$cwd. Where the variables $cwd and $cdir have
following information:
$cwd contains the path of Current Working Directory. $cdir contains
the path of the Compilation Directory of the source file.
pathmap Enables you to define a list of substitution rules to be applied to path
names to identify object files and the corresponding source files. The
pathmap command, however, may not find source files if the object
files are not available.
This minimizes or eliminates the need to specify multiple objectdir
commands when object files are moved from the compilation
directories or when compilation directories are mounted over NFS.
To use this feature, the program must be compiled with the
+objdebug option. For information on how pathmap works type
help pathmap at the HP WDB prompt.
110 HP-UX Configuration-Specific Information