This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: What does the vtable look like?



> 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?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]