[GCC-XML] Offsets of base classes

Petri Rehtonen petri.rehtonen at vega.fi
Mon Mar 27 10:23:41 EST 2006


Hi Brad,

I am solving a problem where I need to know the offset of the subclass
in the class. I have found out that in the function
xml_output_record_type(xml_dump_info_p xdi, tree rt, xml_dump_node_p dn)
the bases of the class are added as sub-elements to the Class and the
offset can be added as an attribute for the Base element. The way I am
currently getting the offset of a base is like this:
tree_low_cst (BINFO_OFFSET (base_binfo), 0) * 8;

Does this seems ok?

I would be glad if this information could also be found from the XML
output of the official GCC-XML and I can provide the changes needed in
xml.c if it is needed.

-- 
Petri Rehtonen



More information about the gccxml mailing list