Debugging with GDB (September 2007)
118 Debugging with GDB
• Support for debugging large core files (> 2GB)
HP WDB supports debugging of core files with sizes more than 2 GB.
• Support co-variant type
HP WDB can step into a co-variant function. The compiler-generated function called
thunks, which is used internally by the compiler to support co-variant return typ e,
is not shown when you do a backtrace or switch from one frame to another frame.
Similarly, using a finish or return command at a co-variant callee function directly
returns the control back to the caller of thunks.
• New attach command line options and handling (-pid or -p)
HP WDB accepts -pid or -p followed by a process ID to attach a running process to
the debugger.
Note:
HP WDB cannot be attached to a process that is traced by tools which
use ttrace, such as Caliper, adb, and tusc. The debugger displays the
following error message on attempting to attach to such a process:
Attaching to process <pid> failed.
Hint: Check if this process is already being traced by another gdb or
other ttrace tools like caliper and tusc.
Hint: Check whether program is on an NFS-mounted file-system.
If so, you will need to mount the file system with the "nointr" option
with mount(1) or make a local copy of the program to resolve this problem.
14.4 HP-UX targets
On HP-UX systems, GDB has been configured to support debugging of processes running
on the PA-RISC and Itanium architectures. This means that the only possible targets are:
• An executable that has been compiled and linked to run on HP-UX. This includes
binaries that have be en marked as SHMEM_MAGIC.
• A live HP-UX process , either s tarted by WDB (with the run command) or started
outside of WDB and attached to (with the attach command).
• A core file generated by an HP-UX process that previously aborted execution.
GDB on HP-UX has not been configured to support remote debugging, or to support
programs running on other platforms.
WDB can only debug C++ programs compiled with HP aC++, the ANSI-compatible C++
compiler.
14.5 Support for Alternate root
HP WDB supports alternate root functionality, which is helpful when you do not want
to use the system-installed HP WDB or its components.
The environment variable WDB_ROOT specifies the alternate root for HP WDB. You must
specify a structure similar to the default /opt/langtools used for HP WDB. You can use
the environment variable GDB_ROOT to spec ify an alternate root for GDB.