From 41c6d30ad899676a4362bc1a18fca3d7c3eb3c49 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 31 Mar 2007 13:49:21 +0000 Subject: [PATCH] Describe cscope. --- doc/devel.texi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/devel.texi b/doc/devel.texi index 48ed58d..d5439ed 100644 --- a/doc/devel.texi +++ b/doc/devel.texi @@ -5,6 +5,7 @@ Here are some tools that you might find useful while developing code. @menu * Tags:: +* cscope:: * CVS:: * SourceForge:: * VNC:: @@ -26,6 +27,33 @@ the default target. If a tag name has multiple definitions, @kbd{M-0 M-.} jumps to the next one. To jump back to where you were before you followed the last tag, use @kbd{M-*}. +@node cscope +@section cscope + +The @command{cscope} program also provides an index to functions and +variables declared in a program. It has some features that tag +facilities lack. Most notably, it can find all the points in a +program at which a given function is called. + +The @file{Makefile} in @file{pintos/src} produces @command{cscope} +indexes when it is invoked as @code{make cscope}. Once the index has +been generated, run @command{cscope} from a shell command line; no +command-line arguments are normally necessary. Then use the arrow +keys to choose one of the search criteria listed near the bottom of +the terminal, type in an identifier, and hit @key{Enter}. +@command{cscope} will then display the matches in the upper part of +the terminal. You may use the arrow keys to choose a particular +match; if you then hit @key{Enter}, @command{cscope} will invoke the +default system editor@footnote{This is typically @command{vi}. To +exit @command{vi}, type @kbd{: q @key{Enter}}.} and position the +cursor on that match. To start a new search, type @key{Tab}. To exit +@command{cscope}, type @kbd{Ctrl-d}. + +Emacs and some versions of @command{vi} have their own interfaces to +@command{cscope}. For information on how to use these interface, +visit @url{http://cscope.sourceforge.net, the @command{cscope} home +page}. + @node CVS @section CVS -- 2.30.2