[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
22.1 TUI Overview 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 TUI-specific commands 22.5 TUI Configuration Variables TUI configuration variables
The GDB Text User Interface (TUI) 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 mode is supported only
on platforms where a suitable version of the curses
library
is available.
The TUI mode is enabled by default when you invoke GDB as either `gdbtui' or `gdb -tui'. You can also switch in and out of TUI mode while GDB runs by using various TUI commands and key bindings, such as C-x C-a. See section TUI Key Bindings.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In TUI mode, GDB can display several text windows:
The source and assembly windows show the current program position by highlighting the current line and marking it with a `>' marker. Breakpoints are indicated with two markers. The first marker 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 updated when the current thread changes, when the frame changes, or when the program counter changes.
These windows are not all visible at the same time. The command window is always visible. The others can be arranged in several layouts:
A status line above the command window shows the following information:
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). 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 only work in the TUI mode:
Because the arrow keys scroll the active window in the TUI mode, they are not available for their normal use by readline unless the command window has the focus. When another window is active, you must use other readline key bindings such as C-p, C-n, C-b and C-f to control the command window.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI also provides a SingleKey mode, which binds several frequently used GDB commands to single keys. Type C-x s to switch into this mode, where the following key bindings are used:
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 typing q or C-x s.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The TUI has specific commands to control the text windows. These commands are always available, even when GDB is not in the TUI mode. When GDB is in the standard mode, most of these commands will automatically switch to the TUI mode.
info win
layout next
layout prev
layout src
layout asm
layout split
layout regs
focus next
focus prev
focus src
focus asm
focus regs
focus cmd
refresh
tui reg float
tui reg general
tui reg next
general
, float
, system
, vector
,
all
, save
, restore
.
tui reg system
update
winheight name +count
winheight name -count
tabset nchars
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Several configuration variables control the appearance of TUI windows.
set tui border-kind kind
space
ascii
acs
set tui border-mode mode
set tui active-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 March, 27 2008 using texi2html