[LLVMdev] debugging LLVM-JITted code
Eli Bendersky
eliben at gmail.com
Tue Sep 13 21:46:38 PDT 2011
> lib/ExecutionEngine/MCJIT and lib/ExecutionEngine/RuntimeDyld. The old JIT
> (lib/ExecutionEngine/JIT) probably has some bits in it for telling the
> debugger where the debug info lives that could be repurposed, or at minimum
> would be good reading for general "what's involved" sort of information
> gathering.
>
> If there's debug information in the input IR, the backend should generate
> the appropriate debug info sections in the MCJIT'ed object file (in memory),
> just like a normal object file would. The loader and dynamic linker will
> need to be taught what to do with them.
>
> One thing to keep in mind, though, is that unlike the old JIT, the MCJIT
> explicitly supports environments where the compilation address space is not
> the same as the execution address space. For example, a debugger inserting
> code into a target process, possibly on a remote target. This is why, for
> example, there's some extra copying going on and why addresses are
> explicitly assigned rather than just using the addresses in-place from the
> compiled object file.
>
Jim, thanks for your answers. I will start looking in the directions you
suggested, and will consult the list if/when technical doubts arise.
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110914/6a185039/attachment.html>
More information about the llvm-dev
mailing list