cscope

If you look for lightweight environment for browsing big “C” source code trees ( eg : kernel ) then cscope is right tool for you.
For exmaple,if you already made local repository of linux kernel with

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux.kernel.upstream

then after clonig kernel tree,you can using cscope in linux.kernel.upstream ( or any other directory where you cloned kernel ) to start easy search for particular kernel code using below command
# cscope -R
it will show menu as one below

Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
Find all function definitions:
Find all symbol assignments:

from here you can enter value you would like to search for.Note that there are multiple options,for example you can search functions which call particular function,and vice-versa,and much more.

Happy cscoping!

Advertisements

#linux-kernel-cscope