Chinaunix首页 | 论坛 | 博客
  • 博客访问: 518991
  • 博文数量: 137
  • 博客积分: 3170
  • 博客等级: 中校
  • 技术积分: 1455
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-17 11:47
文章分类

全部博文(137)

文章存档

2015年(2)

2013年(1)

2012年(6)

2011年(5)

2010年(62)

2009年(61)

我的朋友

分类: LINUX

2009-06-05 17:10:31


1.cscope用法
1.1 添加一个文件tst.cpp至svn后,这时候用cscope是搜索不到tst.cpp中的信息的,这时候需要更新cscope的cscope Database。
需要进一步研究。!!只是入门。
C-c s L 更新cscope.file时,注意其更新目录的设置和选择,若确定是否正确加入搜索,可以C-c s E查看csope.file.
    注意在源代码的每个目录下都有
csope.file文件!!!

;; These pertain to setting and unsetting the variable,

;; `cscope-initial-directory', (location searched for the cscope database

;;  directory):

;;

;;      C-c s a         Set initial directory. 如果emacs搜索路径不完全,可以使用

;;      C-c s A         Unset initial directory.

;;

;; These pertain to cscope database maintenance:

;;

;;      C-c s L         Create list of files to index.

;;      C-c s I         Create list and index.

;;      C-c s E         Edit list of files to index.


2.cscope的安装
2.1安装源码包,以前总以为cscope不用安装,直接拷贝xcsope.el到加载路径即可,否也,需要make make install
,呵呵。l
2.2 拷贝xcsope.el到加载路径

(require 'xcscope)

2.3 为了能够执行cscope-indexer脚本,需要将它放到PATH变量指向的文件夹下,如/usr/bin,并确认该脚本具有执行权限!!!
2.4
在源码根目录下,利用cscope-indexer脚本生成文件列表和数据库,方法是执行

cscope-indexer -r,当然也可以使用命令C-c s L。


2.5
cscope编译不过
有时候,非常烦人,呵呵,cscope可能会装不上,这时候我们可以自己拷贝
cscope-indexer和cscope到usr/bin或usr/local/bin下面,这要依据copy from的路径,呵呵。

阅读(1375) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~