Debugging with GDB (February 2008)

Table Of Contents
Chapter 14: HP-UX Configuration-Specific Information 167
% gdb --lcore a.out core.<pid>
For example:
% ./gdb --lcore sample core.24091
HP gdb...
Type "show warranty" for warranty/support....
Core was generated by ’sample’.#0 main () at sample.c:10
(gdb)
14.14.2.1 Enhancements to the dumpcore command
HP WDB provides an option for the dumpcore command, to specify a <core-
filename>, to generate a core image file of a process running under the debugger in
the middle of execution and saves it in the file named <core-filename>.
The dumpcore command with no arguments saves the core image for the current process
being debugged in the file named core.<pid>, where pid is the process ID number.
To analyze this core file with HP WDB on HP-UX 11i version 2, you must do the
following:
When starting from HP WDB command line:
(gdb) core-file [core.pid | core-filename]
When starting from shell prompt:
$ gdb -core a.out [core.pid | core-filename]
14.14.3 Support for display of run time type information
HP WDB enables you to view the run time type information for C++ polymorphic
object.
info rtti address This command displays run time type information for C++ poly-
morphic object. The input to this command is address of the C++ polymorphic object.
GDB displays the de-mangled type name as output.
Note:
This command is supported only on Integrity systems.
Sample output:
(gdb) info rtti <address>
RTTI: <run time type/class name>
14.15 Printing the Execution Path Entries for the
Current Frame or Thread
HP WDB 5.7 and later versions of the debugger enable you to print the execution path
entries in the current frame, or the current thread for programs running on Integrity
systems. This feature enables the display of the execution path taken across branched