Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
Table 5 File viewing commands
MeaningHP WDB EquivalentXDB Command
Move view location forward or
backward in source file number lines
{+ | -}[ number] (with -tui;
note that a space is
{+ | -}[number]
required between + or - and
the number)
Search source forward for [last] string/[string] (with -xdb),
search regexp, forw regexp
/[string]
Search source backward for [last] string?[string] (with -xdb), rev
regexp
?[string]
Add a directory search path for source
files
D "dir" (with -xdb), dir
pathname
D "dir"
Show current viewing location or
current point of execution
L (with -xdb)L
List source directory search path (list all
directories)
ld (with -xdb), show
directories
ld
List all source fileslf (with -xdb), info sourceslf
List matching filesNo equivalentlf [string]
Repeat previous searchfo or revn
Repeat previous search in opposite
direction
fo or revN
Show one source window forward from
current
v (with -xdb), listv
View source at location in source
window
v location (with -xdb), list
location
v location
View address in disassembly windowva address (with -xdb),
disas address
va address
View label in disassembly window
(label is a location)
va label (with -xdb), disas
label
va label
View label + offset in disassembly
window
va label + offset (with
-xdb), disas label + offset
va label + offset
Source directory mapping commands
Use the D or dir command to add new directories to be searched for source files. See “File viewing
commands” (page 196).
GDB does not provide a source directory mapping capability and therefore does not have any
equivalent of the apm, dpm, and lpm commands.
Data Viewing and modification commands
There are many info commands in addition to those shown here. Use help info to get a list.
The following table lists the XDB and equivalent HP WDB commands for viewing and modifying
the program data:
By-function lists of XDB commands and HP WDB equivalents 197