“hidden” src make(1) targets
There are some make targets in our src tree not many people aware of. One of it is “make gdbinit” in the kernel compile directory (mine is /usr/obj/usr/src/sys/SONNIE). Basically it generates .gdbinit which defines some handy gdb(1) macros for remote debugging and sources gdbinit.kernel and gdbinit.machine parts. See sources of these files for complete documentation
The second is “make cscope” in /usr/src/sys. At the first run it generates cscope(1) cross-reference database and run cscope then. Cscope itself is a C source navigation tool. You can learn more about cscope there http://cscope.sourceforge.net/
Hope this help someone.