[LLVMdev] Instrumenting virtual function calls
Chris Lattner
sabre at nondot.org
Tue Feb 12 20:45:13 PST 2008
On Feb 12, 2008, at 5:08 PM, Robert Zeh wrote:
> After hacking away at it for a bit, it looks like the mystery function
> is actually a stub function. The function pointer is coming from a
> vtable, which gets filled in with pointers to stub functions.
>
> Is there any way to do the round trip for a stub function? Two
> possible solutions come to mind:
> 1) Modify getGlobalValueAtAddress to work for pointers to stub
> functions
> 2) Add a getStubAtAddress
>
> Any other suggestions?
Do you care about JIT laziness? You could just call
getPointerToFunction on every function in the module before your code
starts up.
-Chris
More information about the llvm-dev
mailing list