cscope

 find    /a/b/c(若不写默认为在.下查找)       -name “*.h"

                                                                    -o   -name “*.cc"

                                                                    -o   -name “*.cpp"

                                                                    -o   -name “*.c"                   >cscope.files

生成cscope.files文件


(此处需install cscope)

cscope -Rbkq -i cscope.files

生成cscope.out

        cscope.in.out

        cscope.po.out


-R 级联

-b 只生成索引文件,不进入cscope界面

-k 不搜 /usr/include目录

-q 生成cscope.in.out cscope.po.out加速

-i 若名称有误(即不是cscope.file)时用


:cs add cscope.out








以下出处:http://blog.chinaunix.net/uid-27006331-id-3386646.html



            cscope 常用命令
 1. Ctrl+]将跳到光标所在变量或函数的定义处 Ctrl+T返回
         2. :cs find s ---- 查找C语言符号,即查找函数名、宏、枚举值等出现的地方
            :cs find g ---- 查找函数、宏、枚举等定义的位置,类似ctags所提供的功能
            :cs find d ---- 查找本函数调用的函数
            :cs find c ---- 查找调用本函数的函数
            :cs find t: ---- 查找指定的字符串
            :cs find e ---- 查找egrep模式,相当于egrep功能,但查找速度快多了
            :cs find f ---- 查找并打开文件,类似vim的find功能
            :cs find i ---- 查找包含本文件的文
         3. 2的所以命令也可以且按銉来实现:
               1. Ctrl+\ 再按 s 表示:cs find s命令
               2. 同理实现cs find + g,d,c,t,e,f,i命令







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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值