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
The up and the down commands enable you to traverse
(up or down) the call chain in the stack. You can traverse
up to a specific number of frames in the stack if
<number> is specified.
The frame <frame-number> command enables you
to traverse the stack frame to the specified frame number,
<frame-number>. This thread is marked with '>' in the
info thread output, while the current selected thread
is marked with a '*' symbol.
up <number>
down <number>
frame <frame-number>
Traversing the
stack
The info thread command enables you to view the
list of all the threads in the process at the time of core
dump.
The thread <thread-id> command enables you to
switch the thread view under the debugger from one
thread to another. The thread that created the un-handled
signal is the current thread when the core file is loaded
in to the debugger.
The thread apply command allows you to apply a
command to one or more threads. You can specify the
numbers of the threads, where the command must be
applied, with the command argument<thread-id>.
the command argument<thread-id> is the internal
GDB thread number, as shown in the first field of theinfo
threads display. To apply a command to all threads,
use thread apply all args.
The backtrace-other-thread command prints the
backtrace of all stack frames for a thread with stack
pointer SP, and program counter PC. This command is
useful in cases where the debugger does not support a
user thread package fully.
info thread
thread <thread-id>
thread apply
<thread-id>[all]args
backtrace-other-thread
Viewing
thread
information
Displays information about the global and local variables
in the program.
The <expr> is an expression (in the source language).
By default the value of <expr> is printed in a format
appropriate to its data type. To change the display
format, you can use the where </f> option, where f is
a letter specifying the display format,
[x|d|u|o|t|a|c|f].
print </f><expr>Printing global
and local
variables
Prints the description of a data type,<typename>, where
<typename> can be the name of a type, or it can have
the form class class-name, struct <structtag>,
union <union-tag> or enum <enum-tag> in the
case of C code.
ptype <typename>Printing the
description of
a data type
Commands For Core File Debugging 13