Saturday, September 27, 2008

cscope

Wikipedia defines cscope as "A console mode or text-based graphical interface that allows software developers to search source code".
http://en.wikipedia.org/wiki/Cscope

It is often used on very large projects to find source code, functions, declarations, definitions and regular expressions given a text string.

The official site for cscope is http://cscope.sourceforge.net/
cscope can be downloaded from http://cscope.sourceforge.net/#downloads

What it does:

  • Allows searching code for:
  • all references to a symbol
  • global definitions
  • functions called by a function
  • functions calling a function
  • text string
  • regular expression pattern
  • a file
  • files including a file
  • Curses based (text screen)
  • An information database is generated for faster searches and later reference
  • The fuzzy parser supports C, but is flexible enough to be useful for C++ and Java, and for use as a generalized 'grep database' (use it to browse large text documents!)
  • Has a command line mode for inclusion in scripts or as a backend to a GUI/frontend
  • Runs on all flavors of Unix, plus most monopoly-controlled operating systems.
GUI
kscope is a GUI for cscope on KDE Environment.

Tutorial
How to use cscope is a nice tutorial on using cscope. This explains how cscope can be used for java code.

No comments: