Debugging Core Files Using HP WDB (5900-1573; WDB 6.2; January 2011)
Table 2 Commonly Used Commands for Core File Debugging (continued)
DescriptionCommand
Debugging
Feature
Enables you to navigate the source code if it has been
compiled with the -g option.
When no arguments are specified, it lists ten lines after
or around the previous listing.
The list - command lists the ten lines before a previous
ten-line listing.
The list <line-number> command lists the source
code around the specified line in the current file. You can
also specify the starting line number and the ending line
number of the source code to be displayed (separated
by a comma).
The list <function> command lists the source code
around the beginning of the specified function.
The list <*address> command lists the source code
around the line containing the specified address.
list [- | <line-number>
|<function> |
<*address> ]
Navigating
the source
code
Disassembles a specified section of the memory. The
default disassembled memory is the function surrounding
the pc of the selected frame.
If an address is specified, the function surrounding the
specified address is disassembled.
If <func-name> is specified, the range of addresses for
that function are disassembled.
If two addresses are specified, the function surrounding
the specified address range is disassembled.
disassemble <address>
disassemble <func-name>
disassemble <address>
- <address>
Disassembling
the core file
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 registersViewing
register
information
Displays information about all the shared libraries that
are loaded at the time of core dump.
info sharedViewing
shared library
information
14