HP (Hewlett-Packard) 5992-4701 Computer Hardware User Manual


 
15 The HP-UX Terminal User Interface
By default, GDB runs in line mode. For users who prefer an interface similar (though
not identical) to that of the XDB debugger, HP provides a terminal user interface (TUI),
which appears when you invoke the gdb command with the -tui option.
Use the -xdb option to enable the use of a number of XDB commands. See the “XDB
to WDB Transition Guide” (page 253).
15.1 Starting the TUI
Invoke the debugger using a command like the following:
gdb -xdb -tui a.out
These examples use the default terminal screen size of 24 by 80 characters. Following
is a sample terminal screen window:
|----------------------------------------------------------------------|
|30 { |
|31 /* Try two test cases. */ |
|32 print_average (my_list, first, last); |
|33 print_average (my_list, first, last - 3); |
|34 } |
|35 |
|36 |
|37 |
|38 |
|39 |
|40 |
|41 |
|42 |
|----------------------------------------------------------------------|
File: average.c Procedure: ?? Line: ?? pc: ??
Wildebeest is free software, covered by the GNU General Public License, and
you are welcome to change it and/or distribute copies of it under certain
conditions. Type "show copying" to see the conditions. There is
absolutely no warranty for Wildebeest. Type "show warranty" for details.
---Type <return> to continue, or q <return> to quit---
Wildebeest was built for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
..
(gdb)
The terminal window is divided into two panes: a Source pane at the top and a
Command pane at the bottom. In the middle is a locator bar that shows the current
file, procedure, line, and program counter (PC) address, when they are known to the
debugger.
When you set a breakpoint on the main program by issuing the command
b main
an asterisk (*) appears opposite the first executable line of the program.
15.1 Starting the TUI 243