ctags和cscope参数

cscope

find . -name "*.h" -o -name "*.c" -o -name "*.cc" >cscope.files

find 绝对路径 -name "*.h" -o -name "*.c" -o -name "*.cc" >cscope.files 这样cscope也会使用绝对路径

cscope -kqu -i cscope.files -P /usr/src/kernel -R .

对于非内核代码可以用bqu参数

ctags

ctags --extra=+fq --c-kinds=+px --c++-kinds=+px  --fields=+afimnKlsSzt -R .

ctags后的路径也可以是绝对的或相对的

也可以只生成特定语言的索引,默认是所有识别的语言

ctags --languages=C,C++ --extra=+fq --c-kinds=+px --c++-kinds=+px  --fields=+afimnKlsSzt -R .

猜你喜欢

转载自haohetao.iteye.com/blog/1279593