Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
Most of Visual Interface for HP WDB functionality is also available for emacs users. Visual Interface
for HP WDB does not require knowledge of vi commands.
Visual Interface for HP WDB identifies you as an emacs user by looking at the environment variable
`$EDITOR'. If this variable has a value that matches emacs, or gmacs, or xemacs, then Visual
Interface for HP WDB starts in emacs mode automatically.
NOTE: If the program expects unbuffered input or uses curses, termcap, or terminfo, or otherwise
transmits escape or control sequences to the terminal, you must use one of the following methods
to run Visual Interface for HP WDB:
• Start the process in one terminal and attach to it with Visual Interface for HP WDB.
• Use the tty command at the debugger prompt so the program's input and output are directed
to another terminal.
NOTE: If the underlying GDB terminates abnormally when you are using Visual Interface for HP
WDB, do not close the Visual Interface for HP WDB window. Wait for a minute or two. Visual
Interface for HP WDB captures the stack trace and the debugging session details and sends you
an email. You can then forward this to HP when you report the problem. This is helpful to HP in
reconstructing the crash scenario.
Starting and stopping Visual Interface for HP WDB
You can use Visual Interface for HP WDB in either of two modes:
• X-window-based graphical interface: Supports mouse and keyboard commands.
• Terminal interface: Supports keyboard commands only.
Visual Interface for HP WDB accepts the same command line arguments as GDB so you can add
options to the startup command. See the man page for GDB for the list of arguments.
• To start Visual Interface for HP WDB in graphical mode with mouse support, run Visual Interface
for HP WDB with the command:
/opt/langtools/bin/vdb
• To start Visual Interface for HP WDB in terminal user interface mode, run Visual Interface for
HP WDB with the command:
/opt/langtools/bin/vdb -tui
• To stop Visual Interface for HP WDB, type quit on the HP WDB command line:
(wdb) quit
Navigating the Visual Interface for HP WDB display
The Visual Interface for HP WDB window consists of two areas:
• Source pane at the top
• Debugger pane at the bottom
You can use the arrow and pagination keys on the keyboard to move the cursor:
• Pagination keys move the cursor in the source window, at the top, above the status line.
• Holding the shift key down while using the pagination keys moves the cursor in the debugger
window.
• The up and down arrow keys move the cursor in the source window.
• Holding the shift key down while using the up and down arrow keys move the cursor in the
debugger window.
Visual Interface for HP WDB 177