Debugging with GDB (February 2008)

Table Of Contents
Chapter 14: HP-UX Configuration-Specific Information 193
n
N Repeat search
% Match braces
[[
]] Skip to the next procedure
:line number
Go to any line number
All these commands require you to escape to vi command mode first. When you
are done, type a for append or i for insert or other vi commands to return to text
insertion mode.
Or you can simply click the Prompt softkey.
14.26.8 Loading source files
Escape to vi command mode and use the :e command to load a source file.
:e filename
When the source files are located in multiple directories, you can simply specify the
base name alone as long as file names are unique and the appropriate dir commands
have been executed.
Pressing the Prompt softkey takes you to the command prompt and also updates the
source window so that the cursor remains where the program is stopped.
14.26.9 Editing source files
To edit a file, kill the process then click the Edit button. If you do not kill the process,
the source file and binaries can get out of sync.
14.26.10 Editing the command line and command-line history
Visual Interface for WDB preserves the entire session’s transactions so you can browse
through these at any time.
To edit the command line, press
h
ESC
i
to enter vi mode and then use vi commands.
You can recall previous commands in history by using [jk^P^N]. Complete command
lines using
h
TAB
i
.
14.26.11 Saving the contents of a debugging session to a file
You can save the contents of the current debugging session, including debugger in-
put/output and program input/output) to a file.
To save a session to a file:
1. Right-click an empty region of the source or debugger pane.