[GCC-XML]Virtual tables with 0.6.0

Brad King brad.king at kitware.com
Mon Feb 23 09:05:07 EST 2004

Pere Mato Vila wrote:
> Hello,
>   I am trying to move from 0.4.0 to 0.6.0 and I am having a problem
> detecting if a class has a virtual table or not. In version 0.4.0 I was
> using the existence of a <Variable/> with a name starting with "_ZTV"
> for a class to get this information, and it was very simple and quick. I
> see that in the new version these variables do not appear any more in
> the output file. Do I have any other possibility than just recursively
> inspecting if it exists at least one virtual method in the class and all
> of its base classes?

The set of symbols dumped that are not explicitly declared in the source 
  files is specific to the version of GCC that is used as the parser. 
Version 0.4 used GCC 3.0, and version 0.6 uses GCC 3.3.  GCC 3.3 may not 
be including this symbol in the representation that GCC-XML dumps.

I think you may want to take the recursive search approach anyway 
because figuring out to which class the _ZTV symbol represents may be 
difficult when the class is a template instantiation and has a strange name.


More information about the gccxml mailing list