Hi,
if I have some struct thing like
My question: Is there any chance for figuring out the memory address of `foo` in `foo_method` (which has been called from/as member of `foo`)?Code:struct Foo { void (*method)(); } void foo_method() {} // and later, in to-be-runned-code struct Foo foo; foo.method = &foo_method; foo.method();
I've highlighted "any" to emphasize that I'm not scared about "ugly" methods to do this, not about code execution right before the call, not by Assembler code execution and so on.
Thanks! :-)
P.S.: I'm not interested in using such hacks in productive code... it's just academic interest ;-)