

This has the disadvantages that macros and duplicate symbol names can generate an unclear graph. cscope can find the callers and callees of functions, but it is not a compiler and it does that by searching the text for keywords. In software development it is often very useful to be able to find the callers of a function because this is the way to understand how code works and what other parts of the program expect from a function. Often an index must be rebuilt whenever changes are made to files. Second, the developer can now search those files using the command cscope -d. The k flag is intended to build a database for an operating system or C library source code. The developer then builds a database using the command cscope -b -q -k. 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. First a developer builds the cscope database. The functions in cscope are available to varying degrees in modern graphical source editors.Ĭscope is used in two phases. The history of the tool goes back to the days of the PDP-11, but it is still used by developers who are accustomed to using the vi or Vim editor or other text-based editors, instead of editors based on graphical user interfaces (GUI)s.
