HP (Hewlett-Packard) 5992-4701 Computer Hardware User Manual


 
NOTE: Limitations for the enhanced info target command on corefile are as
follows:
The enhanced info target command is not supported when the
expanded_node_host_names kernel parameter is set. It is supported only for the
default utsname.
The heap segment listed in the memory segment does not contain mmapped
memory for the given core file.
14.15.3 Support for the dumpcore command
HP WDB provides the command, dumpcore to generate a core image file for a process
running under the debugger during execution.
The dumpcore command does not require any argument. It saves the core image for
the current process being debugged in the file named core.<pid>, where <pid> is the
process ID number.
To dump the core for a live process, you must pass the following commands:
(gdb) run Starting program: sample Breakpoint 3, main () at sample.c:1010 b
= foo(a); (gdb) dumpcore Dumping core to the core file core.24091(gdb)
When starting from the HP WDB command line:
(gdb) file sample
Reading
symbols from sample...done
(gdb) set live-core 1
(gdb) core-file core.24091
Core was generated by 'sample'.#0 main () at sample.c:1010 b = foo(a);
(gdb) backtrace#0 main () at sample.c:10
(gdb)
When starting from the shell prompt:
% 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.15.3.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.
202 HP-UX Configuration-Specific Information