From Seo Wiki - Search Engine Optimization and Programming Languages
|This article may need to be wikified to meet Wikipedia's quality standards. Please help by adding relevant internal links, or by improving the article's layout. (August 2008)|
|Stable release||15.7 / February 2, 2009|
|Operating system||UNIX, Linux|
|Type||C and C++ programming tool|
cscope is a console mode or text-based graphical interface that allows software engineers or developers to search source code. It is often used on very large projects to find source code, functions, declarations, definitions and regular expressions given a text string. cscope is free and available under a BSD License. The original developer of cscope is Joe Steffen.
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 gui-based editors). The functionality within cscope is available to varying degrees in modern graphical source editors.
Mode of use
cscope is used in two phases. First a developer builds the cscope database. The developer can often use
find or other unix tools to get the list of filenames that they need to index into a file called
cscope.files. The developer then builds a database using the command
cscope -b -q -k. Second, the developer can now search those files using the command
cscope -d. Often an index needs to be re-built whenever changes are made to files.
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. 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. This has the disadvantages that macros and duplicate symbol names can generate an unclear graph. There are other programs that can extract this information by parsing the source code or looking at the generated object files.
|File:LampFlowchart.svg||This computer programming-related article is a stub. You can help Wikipedia by expanding it.|