[LLVMdev] Instrumenting virtual function calls
Robert Zeh
robert.a.zeh at gmail.com
Wed Feb 13 17:32:56 PST 2008
I thought about it --- that's actually how I figured out that I was
getting the stub functions --- but the laziness is nice for my
application. The bitcode module I'm working with is about 3.8
megabytes. I've been assuming it would take a while to compile each
function, a chunk of which I probably won't need (but won't be able to
tell until I get my input.)
Robert
On Feb 12, 2008, at 10:45 PM, Chris Lattner wrote:
>
> 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
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list