新进转入linux阵营,在使用gdb时极为怀念VS2005的一些优异多窗口界面功能,偶然无意键入win命令,发现了TUI功能,个人觉得TUI对提高gdb调试效率大有助益,但是好像有些使用gdb经年的人也没注意到这功能,可能是因为不是每个人都有空通读gdb手册,此处摘录手册TUI段,源自http://sourceware.org/gdb/onlinedocs/gdb_23.html,加上本人注
22. GDB Text User Interface
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] | [ ? ] |
22.1 TUI Overview
In TUI mode, GDB can display several text windows:
-
command -------->
kuike: window's name in command is cmd
-
This window is the GDB command window with the GDB prompt and the GDB output. The GDB input is still managed using readline.
- -------->src
-
The source window shows the source file of the program. The current line and active breakpoints are displayed in this window.
-
The assembly window shows the disassembly output of the program.
- This window shows the processor registers. Registers are highlighted when their values change.
The source and assembly windows show the current program position by highlighting the current line and mark