Chinaunix首页 | 论坛 | 博客
  • 博客访问: 114730
  • 博文数量: 31
  • 博客积分: 781
  • 博客等级: 军士长
  • 技术积分: 350
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-30 16:52
文章分类

全部博文(31)

文章存档

2014年(1)

2012年(9)

2011年(21)

分类: C/C++

2012-08-13 12:04:27

在源码目录下,运行
$ctags -R
在要搜索函数名处按ctrl+],跳转到函数定义代码部分
再点击ctrl+t返回函数调用处
生成cscope索引文件
$cscope -Rbkq
使vi关联cscope数据库
:cs add cscope.out
:cs show  //查看关联数据库名
:cs add //添加一个新的数据库
add  : Add a new database             (Usage: add file|dir [pre-path] [flags])
find : Query for a pattern            (Usage: find c|d|e|f|g|i|s|t name)
       c: Find functions calling this function
       d: Find functions called by this function
       e: Find this egrep pattern
       f: Find this file
       g: Find this definition
       i: Find files #including this file
       s: Find this C symbol
       t: Find assignments to
help : Show this message              (Usage: help)
kill : Kill a connection              (Usage: kill #)
reset: Reinit all connections         (Usage: reset)
show : Show connections               (Usage: show)
查找工程中的main函数
:cstag main
阅读(1731) | 评论(0) | 转发(0) |
0

上一篇:GNU make使用入门

下一篇:IDE开发环境Eclipse

给主人留下些什么吧!~~