[cfe-dev] Source code cross reference tool based on libclang
seefeld at sympatico.ca
Mon Feb 7 12:05:14 PST 2011
On 2011-02-07 14:50, Ehsan Akhgari wrote:
> 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. :-)
I'll take a note to restore the server ASAP, to make it clear that the
project is still alive. Sorry for that.
> 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! :-)
Fine. I'll take another note to check my work in and give you enough
information to try it out. Let me follow-up offline, unless anyone else
here is interested in this.
> 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.
I believe all of the above but call graphs are already supported. (You
can already ask where a symbol is used, and it will give you the source
location. It won't generate a call graph though, and tell you what
symbols are used in a given scope. But, that's a natural thing to add,
and I'd be happy to see Synopsis grow support for this.
> There's this tool called dxr that some of the folks here at Mozilla
> have built on top of Dehydra/gcc <http://dxr.mozilla.org/>, 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.
> I would love to contribute to SXR if we have the same general picture
> in our heads. :-)
Great. Let's talk a little more about that picture to see whether we can
converge on something useful. What you are saying sounds exactly like
the kind of tool I had been aiming for right from the start.
> PS: Unfortunately the Synopsis website is partly broken right now,
> the old server was replaced and I haven't managed to set up and adjust
> all the services yet that it relies on.
> 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. :-)
OK. I'll do that if I can't fix it quickly.
I'll follow up in a private mail to send you some code, so you have
something to look at while I'm fixing the website.
...ich hab' noch einen Koffer in Berlin...
More information about the cfe-dev