[GCC-XML]Extraction of function body code

Brad King brad.king at kitware.com
Mon Dec 23 12:25:57 EST 2002


Hi Rob,

> Being a newcomer to gcc-xml, I'm still a but uncertain of its
> capabilities. I've managed to analyse some simple VC6 programs, but have
> failed with more complex examples that involve comdef.h etc.

GCC-XML attempts to parse the windows (MSVC) header files using GCC's
parser.  Since some of the headers contain code using MSVC-specific
extensions, GCC complains that the code is invalid.  When GCC-XML
installs, it copies some headers and patches them to make them readable by
GCC.  There are many headers, and we have had only enough time to create
patches for those included by <windows.h> and the standard headers (like
iostream).

> My main query, at this stage, is whether or not it is possible to
> extract function body code from the source files, or if not, can it be
> derived, in any way, from a combination of XML file and original source
> file.

No, function bodies are not supported.  This is a commonly requested
feature, but it is not yet available.  The primary reason is that the
original funding source for the project did not need them.  At one time,
someone posted a patch that enabled it, but the core of GCC-XML has
changed too much for the patch to work.

-Brad




More information about the gccxml mailing list