[LLVMdev] Instrumenting virtual function calls
Robert Zeh
robert.a.zeh at gmail.com
Wed Feb 27 17:16:32 PST 2008
Here is a patch that will do just that.
The patch brings up three questions:
Is it ok for ExecutionEngine::getGlobalValueAtAddress to be virtual?
Did I handle the locking properly in my changes to JITEmitter.
Are there other places that have to be changed for this to work right?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: getGlobalValueForStubs.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080227/2a32909d/attachment.txt>
-------------- next part --------------
On Feb 12, 2008, at 9:11 PM, Mike Stump 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.
>
> You know, I had this lengthy email written to cover all the details
> and I decided not to send it as I wasn't sure if that was what you
> were hitting a stub and I didn't want to confuse the issue if it
> wasn't due to stubs...
>
> :-(
>
> Oh well...
>
>> Is there any way to do the round trip for a stub function?
>
> Not that I know of. I think you're down to template checking (check
> the whole thing for strict equality please).
>
>> Two possible solutions come to mind:
>> 1) Modify getGlobalValueAtAddress to work for pointers to stub
>> functions
>
> I think I like this better. I think others might want to, need to do
> this same thing and I suspect they don't want to learn and they'll
> appreciate it just working.
>
>> 2) Add a getStubAtAddress
> _______________________________________________
> 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