GDB调试器的文本用户界面 GDB TUI

GDB的TUI(Text User Interface)提供了一个终端界面,通过ncurses库展示源文件、汇编输出、程序寄存器和GDB命令。TUI模式默认在gdbtui或gdb -tui启动时启用,允许用户在不同窗口布局间切换,如源代码、汇编和寄存器视图,并有特定的键绑定和单键模式以提高调试效率。
摘要由CSDN通过智能技术生成

新进转入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.

 

source
 -------->src
The source window shows the source file of the program. The current line and active breakpoints are displayed in this window.

 

assembly -------->asm
The assembly window shows the disassembly output of the program.

 

register  -------->regs
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

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值