What does the vtable look like?
Mike Stump
mrs@wrs.com
Fri Jun 11 10:44:00 GMT 1999
> From: "Jody Hagins" <jody@atdesk.com>
> Date: Fri, 11 Jun 1999 11:27:55 -0400
> However, the first entry is always null, followed by what appears to
> be the function pointer for type info or dynamic_cast. Then, the
> defined virtual functions, starting with the dtor (from the base
> class).
No, the dtor isn't in any particular spot. It just comes in the
`natural' virtual function place.
> Unfortunately, there does not appear to be a terminator of the list.
> I would think that the null would come at the *end* of the table,
> not the beginning. Or, at least some count, indicating the size of
> the table...
Nope. It is a waste of space. You cannot meaningfully for anything
with the table without knowing how many elements are in the table.
You will have to find that information out some other way. One
thought, is to put more member info into the rtti data, and then you
could use it.
More information about the Gcc
mailing list