Radek Zagorowicz
2014-Nov-20 14:41 UTC
[LLVMdev] Cannot debug objects added with "-extra-object" in lli.
Hi guys. I found a little bug in implementation of MCJIT. I noticed that when I added object file (with all needed debug information) to lli by using -extra-object flag, it's impossible to debug it with gdb. Object file is in ELF format generated by llc. It is properly loaded by mcjit. I noticed that the reason is probably in lack of calling "registerWithDebugger()" after object loading. Adding this registration to the addObjectFile function body causes crash in runtime, probably because the Buffer member in loaded ObjectImage is null. Am I right? Do you have any idea how it can be fixed without reimplementation od loading objects in RuntimeDyld? Regards. rodia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141120/c8913485/attachment.html>
Lang Hames
2014-Nov-20 22:47 UTC
[LLVMdev] Cannot debug objects added with "-extra-object" in lli.
Hi Radek, I'm working on a patch that will fix this right now. It should be committed in the next day or so. Cheers, Lang. On Thu, Nov 20, 2014 at 6:41 AM, Radek Zagorowicz < radek.zagorowicz at gmail.com> wrote:> Hi guys. > > I found a little bug in implementation of MCJIT. > I noticed that when I added object file (with all needed debug > information) to lli by using -extra-object flag, it's impossible to debug > it with gdb. Object file is in ELF format generated by llc. It is properly > loaded by mcjit. > I noticed that the reason is probably in lack of calling > "registerWithDebugger()" after object loading. > Adding this registration to the addObjectFile function body causes crash > in runtime, probably because the Buffer member in loaded ObjectImage is > null. > Am I right? > Do you have any idea how it can be fixed without reimplementation od > loading objects in RuntimeDyld? > > Regards. > rodia > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141120/7004ff73/attachment.html>
Lang Hames
2014-Nov-20 22:49 UTC
[LLVMdev] Cannot debug objects added with "-extra-object" in lli.
This is actually another instance of http://llvm.org/PR20722 . If you CC yourself on that PR you'll be notified when the fix goes in. Cheers, Lang. On Thu, Nov 20, 2014 at 2:47 PM, Lang Hames <lhames at gmail.com> wrote:> Hi Radek, > > I'm working on a patch that will fix this right now. It should be > committed in the next day or so. > > Cheers, > Lang. > > > On Thu, Nov 20, 2014 at 6:41 AM, Radek Zagorowicz < > radek.zagorowicz at gmail.com> wrote: > >> Hi guys. >> >> I found a little bug in implementation of MCJIT. >> I noticed that when I added object file (with all needed debug >> information) to lli by using -extra-object flag, it's impossible to debug >> it with gdb. Object file is in ELF format generated by llc. It is properly >> loaded by mcjit. >> I noticed that the reason is probably in lack of calling >> "registerWithDebugger()" after object loading. >> Adding this registration to the addObjectFile function body causes crash >> in runtime, probably because the Buffer member in loaded ObjectImage is >> null. >> Am I right? >> Do you have any idea how it can be fixed without reimplementation od >> loading objects in RuntimeDyld? >> >> Regards. >> rodia >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141120/be4b996b/attachment.html>
Possibly Parallel Threads
- [LLVMdev] finalizeObject function implemetation in MCJIT is wrong
- [LLVMdev] finalizeObject function implemetation in MCJIT is wrong
- LLVM Developers Meeting JIT BoF -- Request for Topics of Interest
- qemu-kvm
- LLVM Developers Meeting JIT BoF -- Request for Topics of Interest