<div dir="ltr"><div class="gmail_quote">On Mon, Feb 7, 2011 at 2:35 PM, Stefan Seefeld <span dir="ltr"><<a href="mailto:seefeld@sympatico.ca">seefeld@sympatico.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On 2011-02-07 14:03, Ehsan Akhgari wrote:<br>
> Hi all,<br>
><br>
> We're thinking about building a web-based source code cross reference<br>
> tool based on libclang, which uses type information, call graphs,<br>
> etc.  So before we start writing this tool, I wanted to ask you guys<br>
> if you know of any such tool which is already available.  I have not<br>
> been able to find one, but I'm sure that you guys should know about it<br>
> if one exists.<br>
<br>
</div>Hi Ehsan,<br></blockquote><div><br>Hi Stefan,<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have been working on Synopsis (<a href="http://synopsis.fresco.org" target="_blank">http://synopsis.fresco.org</a>), which<br>
started as a source code documentation tool (similar to doxygen), but<br>
with many more features. In particular, at some point we introduced an<br>
"SXR" mode (akin to LXR: <a href="http://lxr.linux.no" target="_blank">http://lxr.linux.no</a>). In contrast to LXR,<br>
however, Synopsis / SXR will use actual type and symbol information for<br>
the cross-referencing, so instead of just looking up via text matching,<br>
Synopsis supports C++ symbol lookup.<br>
<br>
I have been working on a new version of Synopsis that uses libclang as<br>
its CPP/C/C++ parser, and hope to be able to announce a first version<br>
with that new frontend soon after an LLVM version is released that<br>
contains all the required bug fixes and feature additions to CLang that<br>
Synopsis depends on. (I'm right now working off LLVM trunk.)<br>
<br>
I'd be happy to discuss details concerning what features you are<br>
interested in, to see how much of it is already supported, and how hard<br>
it is to implement the remainder.<br></blockquote><div><br>I had actually looked at Synopsis (not the libclang-based version, of course), but looking at the web site, it seemed to me that the project is not maintained any more.  I'm happy to hear that is not the case.  :-)<br>

<br>It would be really interesting for us to see your tool.  It's OK that you're working off of LLVM/clang trunk, that's where we are too!  :-)<br><br>In terms of features, what I think we would need is a class library, a global function library, call graphs (list of callers, callees), type information (what's the type of this variable), macro expansion information (what does the compiler see here?), macro instantiation sites (where in the code is this macro used?), inheritance information, and maybe some other things which I'm forgetting.<br>

<br>There's this tool called dxr that some of the folks here at Mozilla have built on top of Dehydra/gcc <<a href="http://dxr.mozilla.org/">http://dxr.mozilla.org/</a>>, but unfortunately it has a lot of rough edges, not enough documentation (or even people who can guide others through getting started), and it's Mozilla specific.  What we have in mind is replacing it with a tool which is better maintained, and is more fit towards the needs of other projects besides Mozilla as well.<br>

<br>I would love to contribute to SXR if we have the same general picture in our heads.  :-)<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


PS: Unfortunately the Synopsis website is partly broken right now, since<br>
the old server was replaced and I haven't managed to set up and adjust<br>
all the services yet that it relies on.<br></blockquote><div><br>Yes, this is very unfortunate.  I think it would be a really good idea to add a note to the main page saying just that, so that others looking at it don't get the impression that the project is dead.  :-)<br>

<br>Cheers,<br clear="all">--<br>Ehsan<br><<a href="http://ehsanakhgari.org/">http://ehsanakhgari.org/</a>> <br></div></div></div>