Debugging Core Files Using HP WDB
Debugging Core Files From a Different System
When debugging a core file, the debugger requires the exact versions of shared libraries and the
executable that are associated with the core file.
Debugging a core file on a system other than the one on which it was originally produced is
supported only under the following condition:
The correct system and user shared libraries are copied with the executable and core file to the
other system, and the location of the shared libraries is defined by setting GDB_SHLIB_PATH
or GDB_SHLIB_ROOT before debugging the core file.
For more information about these variables, see the Debugging with GDB manual available at:
http://www.hp.com/go/wdb
Table 3 lists the supported systems for debugging PA-RISC core files.
Core files produced by Integrity systems can be debugged on any Integrity system with an HP-UX
version greater than or equal to the HP-UX version on the system where the core file was
produced.
Table 3 Supported Systems for PA-RISC Core File Debugging
Supported systems for debuggingType of core files produced
Any PA-RISC 1.1 or PA-RISC 2.0 system with an HP-UX
version greater than or equal to the HP-UX version on
the system where the core file was produced.
Core files produced by 32–bit executables
Other PA-RISC 2.0 systems with HP-UX versions greater
than or equal to the HP-UX version on the system where
the core file was produced.
Core files produced by 64–bit executables
Table 4 lists the commands for debugging a core file from a different system.
Table 4 Commands for Debugging a Core File From a Different System
DescriptionCommand
Packs the core file along with the relevant executable and
libraries in a single .tar file.
packcore
Unpacks the .tar file generated by the packcore
command. The debugger can use the executable and
shared libraries from this bundle while debugging the
core file on a system, which is different from the one on
which the core file was originally created.
unpackcore
Enables you to examine a packcore directory, which
was previously created by unpackcore. It takes one
optional argument, which is the name of thepackcore
directory.
getcore
To debug core files from a different system than the one on which the core file was created,
complete the following steps:
1. Invoke WDB on the core file on the system where the core file was created.
2. Enter the packcore command to package the .tar file with the core file, the relevant
libraries, and the relevant binaries.
3. Transfer the .tar file to the required system.
4. Enter the unpackcore command to unpack the .tar file on this system.
5. Start debugging the core file on this system.
6. If you exit from the debugging session, and must debug the same core file again, you can
use the getcore command to examine the packcore directory, which was previously
28