Debugging Core Files Using HP WDB
Table 2 Commonly Used Commands for Core File Debugging (continued)
DescriptionCommand
Debugging
Feature
Displays memory information of a specified address.
The x / x <address> command prints the contents of the
specified memory address in hexadecimal format.
The x / s <address> command prints the contents of the
address of a string.
The x / d <address> command prints the contents of the
address in decimal format.
x /[x|s|d] <address>
Examining
memory
Displays the contents of the registers at the time of core dump.
info registers
Viewing
register
information
Displays information about all the shared libraries that are
loaded at the time of core dump.
info shared
Viewing shared
library
information
The info files and info target commands print the
current target, including the names of the executable and core
dump files currently in use by GDB, and the files from which
the symbols were loaded.
The command help target lists all possible targets rather
than current ones.
info files
info target
help target
Prints the target
that is currently
under the
debugger
Read symbol table information from file <filename>. The
symbol-file command with no argument clears out GDB
information on the symbol table of the program, and causes
GDB to erase the contents of the convenience variables, the
value history, and all breakpoints and auto-display expressions
symbol-file <filename>
Read symbol
information
from a file
Reads additional symbol table information from the file
<filename> (when <filename> is dynamically loaded into
the program that is running.
The <address> is the memory address at which the file is
loaded. (GDB cannot detect this address, unless specified)
You can specify up to three addresses (the addresses of the
text, data, and bss segments respectively).
add-symbol-file <filename>
<address>[-s <section>
<sect-address> -s
<section> <sect-address>]
Read additional
symbol
information
Forces a core dump and creates a core image file for a process
that is running under the debugger.
If the filename is specified, it saves the dumped core file in the
file, <corefile-name> , instead of the default file,
core.<pid> (where pid is the process ID number).
dumpcore <corefile-name>
Forcing a core
dump
Packs the core file along with the relevant executable and
libraries in a single tar file for core file debugging on another
system.
packcore
Packing the
core file along
with the
associated
shared libraries
Unpacks the tar file that is generated by the packcore
command so that the debugger can use the executable and
shared libraries from this bundle, when debugging the core
file on a different system from the one on which the core file
was originally created.
unpackcore
Unpacking the
core file along
with the
associated
shared libraries
Enables you to examine a packcore directory, which was
previously created by unpackcore. It takes one optional
argument, which is the name of the packcore directory.
getcore
<packcore-directory>
Examine a core
file which was
previously
created by
unpackcore
18