Debugging with GDB (September 2007)

162 Debugging with GDB
0x40172b29: (61) R3body rlen=33
0x40172b2b: (81) B1label_state label=1
0x40172b2c: (c0) B2epilogue t=44
0x40172b2e: (00) R1prologue rlen=0
0x40172b2f: (00) R1prologue rlen=0
14.13.4 Printing CFM and PFS register s
On Integrity systems, HP WDB prints Current Frame Marker (CFM) and Previous
Frame State (PFS) ar64 registers in two different formats:
raw values
special formats identifying the size of rotating registe rs, frame and locals.
For example,
ar64: 0xc00000000000050c (sor:0, sol:10, sof:12)
cfm: 0x800000000000450a (sor:1, sol:10, sof:10)
14.14 De bugging Core Files
14.14.1 Generating core files with packcore
/unpackcore/getcore
The contents of a core file can be viewed only on a system which has all the shared
libraries that were in use on the system on which the core file was ge nerated. If you
want to view the content of the core file on a system which does not have the shared
libraries, you have to set the environment variables GDB_SHLIB_PATH or GDB_SHLIB_
ROOT to make it search for the desired libraries. The commands packcore, unpackcore,
and core simplify the process of examining the contents of a core file on a system other
than the one in which it was generated.
The packcore command is used on the system which generated the core file. When
you are examining the core file on the original system, you can execute packcore to
make a packcore.tar.Z file. This is a compressed tar file which contains the core
file, the executable, and all the shared libraries that were used by the program when it
generated the core file.The core file is removed after it is added to the packcore.tar.Z
file.
The packcore command has one optional argument, basename, which can be used
instead of packcore to make packcore.tar.Z.
The packcore.tar.Z file can be copied to a different system and the gdb command
unpackcore unpacks the packcore.tar.Z file in the current directory, creating a
new packcore directory. After unpacking the packcore file, the unpackcore command
invokes getcore to load the executable and the core file from the packcore directory,
and sets GDB_SHLIB_PATH to the modules directory in the packcore directory. The
modules directory holds all of the shared libraries that were used when the core file
was generated.