Debugging with GDB

Node:TUI Keys, Next:TUI Commands, Previous:TUI Overview, Up:TUI

### TUI Key Bindings

The TUI installs several key bindings in the readline keymaps (see Command Line Editing). They allow to leave or enter in the TUI mode or they operate directly on the TUI layout and windows. The following key bindings are installed for both TUI mode and the GDB standard mode.

`C-x C-a`
`C-x a`
`C-x A`
  Enter or leave the TUI mode. When the TUI mode is left, the curses window management is left and GDB operates using its standard mode writing on the terminal directly. When the TUI mode is entered, the control is given back to the curses windows. The screen is then refreshed.
`C-x 1`
  Use a TUI layout with only one window. The layout will either be `source` or `assembly`. When the TUI mode is not active, it will switch to the TUI mode.

  Think of this key binding as the Emacs `C-x 1` binding.

`C-x 2`
  Use a TUI layout with at least two windows. When the current layout shows already two windows, a next layout with two windows is used. When a new layout is chosen, one window will always be common to the previous layout and the new one.

  Think of it as the Emacs `C-x 2` binding.

The following key bindings are handled only by the TUI mode:

<PgUp>
  Scroll the active window one page up.
<PgDn>
  Scroll the active window one page down.
<Up>
  Scroll the active window one line up.
<Down>
  Scroll the active window one line down.
<Left>
  Scroll the active window one column left.
<Right>
  Scroll the active window one column right.
<C-L>
  Refresh the screen.

In the TUI mode, the arrow keys are used by the active window for scrolling. This means they are not available for readline. It is necessary to use other readline key bindings such as <C-p>, <C-n>, <C-b> and <C-f>.