What does the vtable look like?
Jody Hagins
jody@atdesk.com
Fri Jun 11 08:28:00 GMT 1999
> For egcs, what does the virtual table pointer point to? Is it a table of
> pointers, structures, a linked list of pointers? What is it?
OK. It looks like it points into a table of function pointers (surprise
:-)...
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). 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...
Anyone?
More information about the Gcc
mailing list