xref info

Daniel Berlin dan at www.cgsoftware.com
Mon Mar 5 03:26:16 GMT 2001



On Sun, 4 Mar 2001, Mike Stump wrote:

> > From: "Marc Pawlowsky" <marcpawl at home.com>
> > To: "Mike Stump" <mrs at windriver.com>, <gcc at gcc.gnu.org>
> > Date: Tue, 20 Feb 2001 21:34:49 -0500
> 
> > If I change the format would it break anything that previously exists.
> 
> Good to ask that question here.  My guess is that I don't think so.
> Or put another way, I think other users of that information would
> benefit from imposing some sanity and redesign and updating on it.
> 
> > Or should I add a new flag that specifies a new format.
> 
> No, complete replacement is the best.  We have 1-2 people a year ask
> about it (at most), and I suspect slightly fewer use it.
> 
I've copied the kdevelop list since it's relevant to the code completion
discussion we had a few weeks ago.

Okay, well, if people look back a month or two, you'll notice that
someone already has something that will dump the useful info (IE the same
types of info xref was dumping) to an XML file you specify. I already
know, because i contributed code to make it handle the tree codes for
parts of templates, and integer_cst's
properly (If it runs into a tree code it doesn't support, it outputs an
unsupported tag with the tree code).
This is infinitely more useful than the xref info by itself, and in a more
useful format.

It already works, except for explicit template instantiations. There is a
You get output that looks like this:
(The filename is blank because I did this from typing on stdin)


<?xml version="1.0"?>
<GlobalNamespace>
  <Variable name="a">
    <Location file="" line="1"/>
    <NamedType>
      <QualifiedName name="int"/>
    </NamedType>
  </Variable>
  <Namespace name="__cxxabiv1">
    <Class name="__fundamental_type_info" access="public">
      <Location file="" line="1"/>
      <IncompleteType/>
    </Class>
  </Namespace>
</GlobalNamespace>


(Of course, this is from "int a;").

This is useful enough to do code completion off of.

The patches, which are clean (it's one file, and one diff, with the diff
just adding the file to cp/Makefile.in, and adding the option to use the
xml stuff to the approriate files).

brad.king at kitware.com should be able to point you to the website that has
the info to get the patches from his cvs server, i don't remember the
url offhand.
 --Dan




-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list