DragonFly Cross Reference Service

Robert Watson rwatson at FreeBSD.org
Fri Oct 31 11:32:33 PST 2003

On Fri, 31 Oct 2003, Matthew Dillon wrote:

>     This is great stuff!
>     I have a suggestion... lets say you were digging into the source
> code
>     somewhere and wanted to know whether the same function existed in
> other
>     distributions. 
>     e.g. so for example when you push into a source file and click on the
>     hotlink representing a function, instead of it just telling you who
>     references that function within a single distribution it would also
>     tell you who references that function, and the location of the function,
>     in other distributions.
>     e.g.
>     Referenced (in 1 files total) in:
> 	* kern/kern_event.c
> 	    o line 94
> 	    o line 108
> 	    o line 192
>     Function also found in:
> 	* FreeBSD-4.x kern/kern_event.c line blah [hotlink] [diff]
> 	* FreeBSD-current kern/kern_event.c line blah [hotlink] [diff]

Sounds like a good idea to me.  If I find time this weekend, I'll try
updating the identifier search to automatically cross-reference between
source trees.  Similar behavior would be very useful for me also.  One
particularly annoying nit with the LXR software is that it assumes that
the trees have entirely parallel structures (since it was designed for
linux trees of various versions).  This makes it difficult to diff
OpenDarwin against the rest of the trees, so will require some tweaking to
the LXR code either to tell it where to find things, or to allow it to
tell the user "Hey, I couldn't find kern/kern_prot.c in the OPENDARWIN
source, perhaps you want bsd/kern/kern_prot.c", for example.

>     And, just to be absolutely insane about things, it would be cool to be
>     able to diff a function between distributions.  Obviously it wouldn't
>     be able to follow the history of a function that got renamed, but it
>     would still be very cool.

That would be very cool, but probably out of scope for the time I have
available right now :-).  I'll put it on a TODO list and we'll see if I
get to it.  I'm gradually coming up with a fairly modified version of lxr
0.3.1, so maybe I should put that source online also so I can accept

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at xxxxxxxxxxxxxxxxx      Network Associates Laboratories

More information about the Kernel mailing list