# get ready to browse your source code.# if you installed cscope, run emacs and work some commands by following.M-x cscope-index-file <RET>
# and then enter your workspace path # or in order to detailedly collect cscope information, separately create cscope.files and cscope.out as below $ rm -rf cscope.files cscope.out
$ find . \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.s' -o -name '*.S' \) -print > cscope.files
$ cscope -b -i cscope.files
M-x cscope-set-initial-directory <RET>
# or run this command to assign your workspace path to itC-c s a
Cscope commands on emacs
# most-usedC-c s dFind global definition.
C-c s cFind functions calling a function.
C-c s CFindcalled functions (list functions called from a function).
C-c s sFindsymbol.
C-c s uReturnthe point from where you jumped.
# other commandsC-c s g Find global definition (alternate binding).
C-c s G Find global definition without prompting.
C-c s t Find text string.
C-c s e Find egrep pattern.
C-c s f Find a file.
C-c s i Find files #including a file.
C-c s a Set initial directory which has a index file (cscope.out).
No comments:
Post a Comment