DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C programmer's productivity tools

The cross-reference file

When cscope is invoked it checks whether a file containing a cross-reference symbol table exists in the current directory. If it does not exist, cscope builds this table and refers to it during subsequent sessions. This table is created in the current directory and is called cscope.out. The next time cscope is invoked, it checks cscope.out for changes. cscope modifies the table if the list of source files has been changed. If the table has been modified, cscope rebuilds only the modified portions. Because copying information is much faster than building it, subsequent calls to cscope should require less start-up time than the initial call.

A cross-reference file other than cscope.out may be specified using the -f option. This is useful for keeping separate symbol cross-reference files in the same directory. You may want to do this if two programs are in the same directory but do not share all the same files. For example:

   $ cscope -f admin.ref admin.c common.c aux.c libs.c
   $ cscope -f delta.ref delta.c common.c aux.c libs.c
In the preceding example, the source for two programs are in the same directory, but the programs involve different files. By specifying two reference files, the cross-reference information for the two programs can be kept separate.

As with cscope.out, if the file specified on the -f option does not exist, cscope will build the cross-reference and leave it in the file specified.

The -d option allows you to prevent updating of the cross-reference table and thereby save time. You should use this option only if you are sure that your source files have not been changed. Because it is usually more important to safeguard against generating erroneous data than to save time, avoid using the -d option unless absolutely necessary. If you specify -d with cscope under the erroneous impression that your source files have not been changed, cscope will give you outdated information.


Next topic: A tutorial example: locating the source of the error message
Previous topic: Running cscope

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003