How to build cscope database for AOSP source?

337 views Asked by At

I am using cscope -b -R command from AOSP root directory to build its database. I kept cscope running for more than 9 hours but its database is not created. There is no cscope.out file there. Is it stuck somewhere ?

1

There are 1 answers

0
Lakindu On BEST ANSWER

Check this blog post : https://nativeguru.wordpress.com/2015/02/10/aosp-code-navigation-with-cscope/

You can first create the cscope.files file that contains all the file paths that contain the code you want to navigate, then use cscope command as below.

$ cd <aosp_root_dir>
$ find . -type f \( -name "*.java" -o -name "*.c" -o -name "*.cpp" -o -name "*.h" \) -and -not \( -path "./out/*" -o -path "./prebuilts/*" -o -path "./external/*" -o -path "./dalvik/*"  -o -path "./ndk/*"  \) > cscope.files
$ cscope -b -q -k