[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
22.1 TUI overview 22.2 TUI Key Bindings TUI key bindings 22.3 TUI Single Key Mode TUI single key mode 22.4 TUI specific commands 22.5 TUI configuration variables
The GDB Text User Interface, TUI in short,
is a terminal interface which uses the curses
library
to show the source file, the assembly output, the program registers
and GDB commands in separate text windows.
The TUI is available only when GDB is configured
with the --enable-tui
configure option (see section B.3 configure
options).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI has two display modes that can be switched while GDB runs:
In the TUI mode, GDB can display several text window on the terminal:
The source and assembly windows show the current program position by highlighting the current line and marking them with the `>' marker. Breakpoints are also indicated with two markers. A first one indicates the breakpoint type:
B
b
H
h
The second marker indicates whether the breakpoint is enabled or not:
+
-
The source, assembly and register windows are attached to the thread and the frame position. They are updated when the current thread changes, when the frame changes or when the program counter changes. These three windows are arranged by the TUI according to several layouts. The layout defines which of these three windows are visible. The following layouts are available:
On top of the command window a status line gives various information concerning the current process begin debugged. The status line is updated when the information it shows changes. The following fields are displayed:
No process
.
??
is displayed.
??
is displayed.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI installs several key bindings in the readline keymaps (see section 27. Command Line Editing). They allow to leave or enter in the TUI mode or they operate directly on the TUI layout and windows. The TUI also provides a SingleKey keymap which binds several keys directly to GDB commands. The following key bindings are installed for both TUI mode and the GDB standard mode.
Think of this key binding as the Emacs C-x 1 binding.
Think of it as the Emacs C-x 2 binding.
Think of it as the Emacs C-x o binding.
The following key bindings are handled only by the TUI mode:
In the TUI mode, the arrow keys are used by the active window for scrolling. This means they are available for readline when the active window is the command window. When the command window does not have the focus, it is necessary to use other readline key bindings such as C-p, C-n, C-b and C-f.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI provides a SingleKey mode in which it installs a particular key binding in the readline keymaps to connect single keys to some gdb commands.
Other keys temporarily switch to the GDB command prompt. The key that was pressed is inserted in the editing buffer so that it is possible to type most GDB commands without interaction with the TUI SingleKey mode. Once the command is entered the TUI SingleKey mode is restored. The only way to permanently leave this mode is by hitting q or `C-x s'.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI has specific commands to control the text windows. These commands are always available, that is they do not depend on the current terminal mode in which GDB runs. When GDB is in the standard mode, using these commands will automatically switch in the TUI mode.
info win
layout next
layout prev
layout src
layout asm
layout split
layout regs
focus next | prev | src | asm | regs | split
refresh
update
winheight name +count
winheight name -count
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI has several configuration variables that control the appearance of windows on the terminal.
set tui border-kind kind
space
ascii
acs
set tui active-border-mode mode
normal
, standout
, reverse
,
half
, half-standout
, bold
and bold-standout
.
set tui border-mode mode
normal
standout
reverse
half
half-standout
bold
bold-standout
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.
These pages are maintained by the GDB developers.
Copyright Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
This document was generated by GDB Administrator on August, 10 2003 using texi2html