cscope 安装和使用

来源:互联网 发布:财务指标分析软件 编辑:程序博客网 时间:2024/05/01 20:23

1、安装cscope:

sudo apt-get install cscope

2、在工程目录project下运行:

find `pwd` -name *.h -o -name *.c -o -name *.cpp > cscope.filescscope -Rbqk -i cscope.files

生成cscope.files cscope.in.out cscope.out cscope.po.out

3、在工程目录下的任意目录内编辑任意文件vi file.c运行:

:cs add ..pathto../cscope.out

加载cscope数据库文件

4、

cscope 命令:add  : 添加一个新的数据库             (Usage: add file|dir [pre-path] [flags])find : 查询一个模式                   (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 this text stringhelp : 显示此信息                     (Usage: help)kill : 结束一个连接                   (Usage: kill #)reset: 重置所有连接                   (Usage: reset)show : 显示连接                       (Usage: show)

0 0
原创粉丝点击