[GCC-XML] pragmas, preprocessor
Thomas Heller
theller at python.net
Wed Sep 22 14:34:00 EDT 2004
Brad King <brad.king at kitware.com> writes:
> Thomas Heller wrote:
>> Hm, I just found out that '#pragma pack' even seems to work with gcc
>> (Suse linux, gcc 3.3.1) on a C program. Would it be possible (I'd even
>> try to work on a patch) to expose either the current packing for
>> structures, or expose field offsets of structure members in the xml
>> output?
>
> If gcc knows about this pragma then it is probably possible to get at
> it during the xml dump. I do not have time to look at doing this but
> I can get you started. Take a look in the GCC-XML source tree at
> GCC/gcc/tree.h, GCC/gcc/cp/cp-tree.h, and GCC/gcc/cp/xml.c. The
> function xml_output_record_type in xml.c is probably the place to add
> your code. The two header files have plenty of comments to help you
> explore GCC's internal data structures. Also, look at the GCC
> internals documentation here:
>
> http://gcc.gnu.org/onlinedocs/gccint/Trees.html#Trees
Thanks for these great tips - looks like they just are what I need to
get started. But first, I have to get the build going.
> Good luck,
> -Brad
Thomas
More information about the gccxml
mailing list