This is the mail archive of the
mailing list for the GCC project.
Re: GCC/UML/XMI extraction (was gcc front end )
All I wanted was to get the class structure.
I had not explored other available tools which give out class info. and hence my (premature) e-mail.
My plans were never ambitious , and require only header file info.
and I'll certainly Never abuse gpl.
your mails have been most helpful.
----- Original Message -----
From: "Richard Stallman" <email@example.com>
Cc: <firstname.lastname@example.org>; <email@example.com>; <firstname.lastname@example.org>
Sent: Sunday, May 12, 2002 11:34 AM
Subject: Re: GCC/UML/XMI extraction (was gcc front end )
You would like to extract the class structures of a
given program into UML, maybe into a XMI like data
Praveen, could you tell me more precisely what job you want to do?
Do you want to record just the class structure, or something more?
I see no problem of abuse in making cc1 record information on the
class structure. The question is purely a technical one, as long
as that is as far as the feature goes.
In general, using output from GCC's parse phase to record
cross-reference information is a flawed technique because it does not
understand preprocessor conditionals. If your code says
#if defined (__gnu__) || defined (__unix__)
then a cross reference meant to help a human understand the program
should say that foo calls both foo_1 and foo_2. However, a cross
reference generated in the straightforward way from inside a compiler
would mention only one of them.
This issue arises for call graphs in C code. C++ class structure is a
different issue. Perhaps people rarely use preprocessor conditionals
in ways that affect the class structure. If so, this issue would not
arise for that specific application.
However, the Emacs OOBR already has the ability to analyze the class
structure of a program and then browse it. Does it already do what