1) Open Tui mode
Start a debug using ' gdbtui-q ' or ' gdb-tui-q '
$ gdbtui-q test_struct
(GDB) ....
2) There are 4 windows in TUI mode,
command Commands window. You can type a debug command
Source Code window. Displays information such as current line, breakpoint, etc.
Assembly Assembly Code Window
Register Register window
In addition to the Command window, the other three Windows cannot be displayed simultaneously. It can be selected with the layout command
The window that you need. See ' Help layout '.
Ctrl+x and CTRL + A: Toggle the way GDB is displayed between classic and layout two ways.
3) After starting GDB, the above is the SRC window, the following is the CMD window, the default focus in the SRC window, so that the upper and lower keys and pagedown,pageup are moving the display code, do not display the debug command up and down. To switch focus at this point, simply refer to
Info win View current Focus SRC (lines) down toggle FocusFS SRC Toggle Specify focus Focus set to SRC window. (GDB)
4)
debugging using the GDB text user interface (GDB-TUI)