This is the mail archive of the
mailing list for the GCC project.
Re: GCC/UML/XMI extraction (was gcc front end )
- From: Richard Stallman <rms at gnu dot org>
- To: p dot sarathy at usa-tcs dot com
- Cc: mdupont777 at yahoo dot com, gcc at gcc dot gnu dot org, introspector-developers at lists dot sourceforge dot net
- Date: Sun, 12 May 2002 10:34:18 -0600 (MDT)
- Subject: Re: GCC/UML/XMI extraction (was gcc front end )
- References: <email@example.com>
- Reply-to: rms at gnu dot org
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