[MCJIT][DebugInfo] [PATCH] Remove object-ownership from RuntimeDyld.

Eric Christopher echristo at gmail.com
Wed Nov 5 16:58:00 PST 2014


>
>
> General feedback and style comments welcome. I could also particularly use
> feedback from debugger experts (Dave, Eric, Adrian) on the changes to
> DIContext/DWARFContext. I think they're sane, but I'm not intimately
> familiar with the DebugInfo library.
>
>
I don't think you need to deal with the address lookup the way you are for
DWARFContext. Basically that aspect of it is only needed for knowing how
and where relocations are going to be applied, you've already applied all
the relocations so those should point to the correct addresses already yes?
At which point you don't need to do any symbol lookup. In fact, I'd be
surprised if the Sym->getAddress was getting called at all right now on the
object files produced by MCJIT. If it is then we need some adjustments
anyhow to skip the relocation processing - check for 0 relocations or
something.

If you go a step further and remove the dependency on object files in
general from the JIT then I think you'll want to define an object like
interface for MCJIT and pass that down to the constructor for a new
DWARFContext that just asks for the various sections and stores them in the
same DIContext that we're currently using.

Make sense?

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141106/c4b9d92c/attachment.html>


More information about the llvm-commits mailing list