아래 순서대로 입력하면서 진행함.
sudo apt-get install cscope
vi mkcscope.sh
########## vi 에디터에서 아래 내용 입력 ###########
!/bin/sh
rm -rf cscope.files cscope.files
find . \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.s' -o -name '*.S' \) -print > cscope.filescscope -i cscope.files
########## vi 에디터 저장하고 종료 (:wq) ###########
$ chmod 755 mkcscope.sh
$ mv mkcscope.sh /usr/bin
$ cd /usr/src/linux
$ ./mkcscope.sh 실행
종료시 ctrl+d 로 종료
vi ~/.vimrc
########## vi 에디터에서 아래 내용 입력 ###########
set csprg=/usr/bin/cscope
set csto=0set cstset nocsverb
if filereadable("./cscope.out")
cs add cscope.out
else
cs add /usr/src/linux/cscope.outendif
set csverb
########## vi 에디터 저장하고 종료 (:wq) ###########
-----사용하기 -----
:cs find {종류} {심벌}
예) cs find s start_kernel 종류)0(s)
댓글 쓰기