生成cscope和ctags的数据库,这里加上了C++和汇编文件:
cscope_ctags_env_linux.sh
#!/bin/sh
find . -name "*.h" -o -name "*.c"-o -name "*.cc" -name "*.S"> cscope.files
cscope -bkq -i cscope.files
ctags -R
配置环境变量
source_DB_env_kernel.sh
#!/bin/sh
export CSCOPE_DB_KERNEL=$PWD/cscope.out
export CTAGS_DB_KERNEL=$PWD/tags
最好在顶层目录打开文件,否则有时会找不到数据库。
如果遇到ctags报错,则升级一下ctags
#ctags -R
ctags: no input files specified.
Try `ctags --help' for a complete list of options.
升级ctags:
#sudo apt-get install ctags