This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to find code in the gcc source tree


Recent postings show that some readers have difficulty finding code in
the gcc source tree, which is not surprising, given that the
gcc-4.2-20061007 release has 12,327 source files in C and C++, 5870
files in Java, and 2,223,569 + 1,306,107 lines of code in those files
for C/C++ + Java.  There are several hundred thousand lines of Ada,
Fortran, and likely other languages as well.

One free tool that I've found particularly helpful in dealing with
this problem is cscope:

	http://cscope.sourceforge.net/

cscope runs in a simple text window: no GUI is required, or desired.

cscope builds a database (a simple top-level file called cscope.out)
on the first run that it can use to quickly find points of reference
and of definition, of functions and macros.  It has an incremental
update capability, so it is easy to keep the database up to date as
you modify source code.

Sun SunOS and Solaris systems have had cscope since 1992 (from dates
embedded in /opt/SUNWspro/bin/cscope), and cscope's Web page traces
its heritage back to the PDP-11 in the early 1980s:

	http://cscope.sourceforge.net/history.html

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]