Table of Contents

Cscope and Tags

Cscope is a developer's tool for browsing source code. Cscope and tags can be a particularly useful tools to wade into a large code base like the Linux kernel. You can save yourself a lot of time by being able to do fast, targeted searches rather than randomly grepping through the source files by hand.

Cscope

Cscope has an long Unix pedigree, having been originally developed at Bell Labs back in the days of the PDP-11. Cscope was part of the official AT&T Unix distribution for many years, and has been used to manage projects, including the Linux kernel.

Cscope is:

Cscope allows searching code for:

To learn how to use Cscope look at the man page. The Linux kernel has a support for cscope build in

rgetz@imhotep:~/uClinux-dist/linux-2.6.x> make cscope
  FILELST cscope.files
  MAKE    cscope.out
rgetz@imhotep:~/uClinux-dist/linux-2.6.x> cscope

Tags

Ctags also generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

It is capable of generating tags for all types of C/C++ language tags, including all of the following: