Mac OS X Yosemite 10.10.2使用cgdb初步

5 篇文章 0 订阅

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) 安装依赖
brew update
brew install help2man
brew install readline


(2) 下载cgdb源码,然后编译安装
下载地址: http://cgdb.github.io/
./configure --prefix='/Users/gerryyang/LAMP/cgdb/install/cgdb-0.6.8' --with-readline='/usr/local/Cellar/readline/6.3.8'

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.


Refer:

cgdb
http://cgdb.github.io/
https://github.com/cgdb/cgdb

readline
http://tiswww.case.edu/php/chet/readline/rltop.html



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值