Joe Steffen began writing cscope in 1980, as an aid to his programming word on a PDP-11.1 The tool became very popular within Bell Labs, as fellow employees requested more features and improvements. The tool was later made part of the AT&T Unix distribution. It is still used by developers today, some of whom are most accustomed to using vi or other text-based editors, instead of GUI editors. The functions in cscope are available to varying degrees in modern graphical text editors.
cscope is used in two phases. First, a developer builds the cscope database of the source code. The developer can often use find or other Unix tools to get the list of filenames needed to index into a file called cscope.files. The developer then builds a database using the command cscope -b -q -k. The k flag is intended to build a database for an operating system or C library source code. It will not look in /usr/include. Second, the developer can now search those files using the command cscope -d. An index must be rebuilt whenever changes are made to indexed files.
cscope was created to search content within C code, but it can also be used (with some caveats) for C++ and Java code.2
"The History of Cscope". cscope.sourceforge.net. Retrieved 2023-09-06. https://cscope.sourceforge.net/history.html ↩
CScope home page: "The fuzzy parser supports C, but is flexible enough to be useful for C++ and Java[...]" http://cscope.sourceforge.net/ ↩
KScope homepage http://kscope.sourceforge.net/ ↩
Seascope homepage https://code.google.com/p/seascope/ ↩
Gscope homepage https://github.com/tefletch/gscope/wiki ↩
"CCTree - C Call-Tree Explorer -- Cscope based source-code browser; code flow analyzer : Vim online". http://www.vim.org/scripts/script.php?script_id=2368 ↩
Csope homepage https://github.com/agvxov/csope ↩