Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 1999 12:40:52 -0400
From:      clark@pharlap.com (Clark Jarvis)
To:        Mohit Aron <aron@cs.rice.edu>, freebsd-net@freebsd.org
Subject:   Re: Search a symbol in the source tree
Message-ID:  <19991014163644223.AAA270@sugar.pharlap.com@clark>
In-Reply-To: <199910122012.PAA23666@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In <199910122012.PAA23666@cs.rice.edu>, on 10/12/99 
   at 03:12 PM, Mohit Aron <aron@cs.rice.edu> said:

>> Can anyone suggest me a way of searching symbols in the entire /usr/src
>> tree? I normally use grep */*.  But grep does not work recursively, right? 
>> Something like a small shell script may do this. Thanks a lot.

>Rather than using something equivalent to a recursive grep (which is
>slow), I prefer to use etags. This gives me the flexibility of searching
>for symbols from within emacs where emacs directly takes me to the
>section of code that defines the symbol.

[tags creation code deleted]

I use a combination of tags and an unzipped tar file of the source tree,
providing your text editor can handle large files and binary characters
with some success.  Just load up the tar file and search.  Inside the tar
file, the filespec for each file is stored in a block at the beginning of
each file, so it only takes a little reverse searching to figure out where
the file lives in the source tree.

Tags are great, but they don't find where/how symbols are used, just where
they are defined.  And realizing that this is an old, ingrained behavior -
etags may be able to do more than I'm aware of.

-- 
Clark



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991014163644223.AAA270>