Debugging with GDB Manual HP WDB v6.3 (5900-2180, August 2012)

16.1.1 Invocation commands
By default, HP WDB runs in line mode. To run it with a terminal user interface similar to that of
XDB, use the -tui option.
The following table lists the XDB and the equivalent HP WDB commands for invoking the terminal
user interface:
Table 3 Invocation commands
MeaningHP WDB EquivalentXDB Command
Debug programgdb -xdb program, gdb -xdb
-tui program
xdb program
Debug core filegdb -xdb program -c corefilexdb program corefile
Specify alternate directory to search for
source files
gdb -xdb -d dirxdb -d dir
Attach to running pro- gram at
invocation
gdb -xdb program pidxdb -P pid program
Specify input to target program(after starting) run < filexdb -i
Specify output from target program(after starting) run > filexdb -o
16.1.2 Window mode commands
The following commands are TUI mode or XDB compatibility mode commands. They are available
when you invoke HP WDB by using the -tui or -xdb or both options.
Table 4 Window mode commands
MeaningHP WDB EquivalentXDB Command
Scroll floating-point registers forward
or backward (src, cmd, and asm are
also valid window names)
{+ | -}r (with -xdb -tui),
{+ | -} data (with -tui), gdb
-xdb -tui program
{+ | -}r
Display floating-point registersfr (with -xdb -tui), display
$fregs (with -tui)
fr
Display general registersgr (with -xdb -tui), display
$regs (with -tui)
gr
Display special registerssr (with -xdb -tui), display
$sregs (with -tui)
sr
Toggle disassembly modetd (with -xdb -tui)td
Toggle float register display precisiontf (with -xdb -tui), toggle
$fregs (with -tui)
tf
Toggle split-screen modets (with -xdb -tui)ts
Update screen to current execution
point
u (with -xdb -tui), update
(with -tui)
u
Refresh all windowsU (with -xdb -tui), refresh
(with -tui)
V
Set size of source windoww number (with -xdb -tui),
winheight src number (with
-tui)
w number
16.1.3 File viewing commands
The following table lists the XDB and the equivalent HP WDB commands for viewing source files:
204 XDB to HP WDB Transition Guide