This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Debugging missing vtables
- From: Ian Lance Taylor <ian at airs dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 23 Jul 2005 08:07:09 -0700
- Subject: Re: Debugging missing vtables
- References: <87br4tvqw3.fsf@deneb.enyo.de>
Florian Weimer <fw@deneb.enyo.de> writes:
> On some large application (not written by me), GCC 4.0 does not emit
> some vtables, and link errors are the result.
>
> If I understand things correctly, a certain member is deemed the
> controlling member, and the vtable is emitted in the translation unit
> which contains this member.
>
> Is there a way to cause GCC to print this member? I think this would
> help me to debug this issue. (It's probably a bug in the application,
> but I'm not completely sure.)
>From the documentation:
C++ virtual functions are implemented in most compilers using a lookup
table, known as a vtable. The vtable contains pointers to the virtual
functions provided by a class, and each object of the class contains a
pointer to its vtable (or vtables, in some multiple-inheritance
situations). If the class declares any non-inline, non-pure virtual
functions, the first one is chosen as the ``key method'' for the class,
and the vtable is only emitted in the translation unit where the key
method is defined.
I don't know of any way to print the member.
Ian