2015-06-02 wcdj
cgdb is a lightweight curses (terminal-based) interface to the GNU Debugger(GDB). In addition to the standard gdb console, cgdb provides a split screenview that displays the source code as it executes. The keyboard interface is modeled after vim, so vim users should feel at home using cgdb.
0 安装
1 使用
可以参考 官方的manual。这里总结一些常用的方法:
(1) 启动和退出cgdb
- type ‘cgdb’ to start CGDB.
- type quit or C-d in the GDB window to exit.
- type :quit in the source window to exit. This even works if GDB is currently hanging, or operating a long command.
(2) cgdb的主要设计思想
The CGDB user interface currently consists of two windows and a status bar. The source window is currently on the top and the GDB window is on the bottom. The status bar currently separates the two windows.
The interface has several modes depending on which window is focused. CGDB mode is when the source window is focused, GDB mode is when the GDB window is focused and TTY mode is when the TTY window is focused.
在window间切换的方法:
When CGDB is invoked, the interface is in GDB mode. A ‘ *’ at the right of the status bar indicates that input will be passed to GDB. To changethe focus to the source window, hit the ESC key. The cgdb mode key is the key that is responsible for switching the userinto CGDB mode from a different mode. The cgdb mode key is defaulted to the ESC key. To change this value, look at the configuration options for CGDB. See Configuring CGDB.
https://github.com/cgdb/cgdb