Make it easier to use DwarfContext with MCJIT
authorKeno Fischer <kfischer@college.harvard.edu>
Thu, 21 May 2015 21:24:32 +0000 (21:24 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Thu, 21 May 2015 21:24:32 +0000 (21:24 +0000)
commitb6976af3cd6650da1e46127fc890fa256d0add31
tree709fbf12ebbcf09f659f6de947b850791a68a1b5
parent6777be34467c88d1a5fa3ac1ebdf220f5a3206e9
Make it easier to use DwarfContext with MCJIT

Summary:
This supersedes http://reviews.llvm.org/D4010, hopefully properly
dealing with the JIT case and also adds an actual test case.
DwarfContext was basically already usable for the JIT (and back when
we were overwriting ELF files it actually worked out of the box by
accident), but in order to resolve relocations correctly it needs
to know the load address of the section.
Rather than trying to get this out of the ObjectFile or requiring
the user to create a new ObjectFile just to get some debug info,
this adds the capability to pass in that info directly.
As part of this I separated out part of the LoadedObjectInfo struct
from RuntimeDyld, since it is now required at a higher layer.

Reviewers: lhames, echristo

Reviewed By: echristo

Subscribers: vtjnash, friss, rafael, llvm-commits

Differential Revision: http://reviews.llvm.org/D6961

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237961 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/DWARF/DWARFContext.h
include/llvm/ExecutionEngine/RuntimeDyld.h
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
lib/Object/COFFObjectFile.cpp
lib/Object/MachOObjectFile.cpp
test/DebugInfo/debuglineinfo.test
tools/llvm-objdump/MachODump.cpp
tools/llvm-rtdyld/llvm-rtdyld.cpp