[GCC-XML]Adding function body information

Thomas Kuhn t_kuhn at gmx.de
Thu Oct 4 18:35:46 EDT 2001


Hi

I just found the gcc-xml extension. I applied the patches and started to code 
an extension that allows me to dump also parts of function bodies to xml. 
Unfortuneally this is only working for inline functions. When I use 
DECL_SAVED_TREE on a non inline function it returns always 0, regardless if 
the funtion is defined or not in the translation unit. For inline functions I 
get the COMPOUND_STATEMENT for that I'm looking for. 

Is global_namespace the wrong tree to get the bodies ? I noticed there are a 
lot of trees declared in decl.c etc but most of them seem to be very special. 
Are the function bodies pherhaps already removed from the trees when the xml 
extension is invoked (translated into something else) ?

Ah, I have an additional question :

Can I get the collumn in the source file - not only the line - for a node ? 
I'd be interested in method calls, variable declarations etc. Is there a way 
to hack this support into gcc (I'm relatively new to gcc hacking...) ?

Regards - Thomas 



More information about the gccxml mailing list