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]
Other format: [Raw text]

Re: Interface Method Table


Matt Davis <mattdavis9@gmail.com> writes:

> For a Go program being compiled in gcc, from the middle end, is there a way to
> figure-out which routines make up the interface-method-table?  I could check the
> mangled name of the method table, but is there another way to deduce what
> methods compose it from the middle-end?

The type of the table is a struct.  The second element of the struct is
a pointer to a table of pointers.  The pointers in that table are the
methods.  Each one is cast to void*, but if you undo that case you
should find the actual function pointer.

Ian


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