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

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.

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.