LLVM 20.0.0git
|
The current implementation of ELFDebugObject replicates the approach used in RuntimeDyld: It patches executable and data section headers in the given object buffer with load-addresses of their corresponding sections in target memory. More...
Public Member Functions | |
void | reportSectionTargetMemoryRange (StringRef Name, SectionRange TargetMem) override |
StringRef | getBuffer () const |
Public Member Functions inherited from llvm::orc::DebugObject | |
DebugObject (JITLinkMemoryManager &MemMgr, const JITLinkDylib *JD, ExecutionSession &ES) | |
bool | hasFlags (DebugObjectFlags F) const |
void | setFlags (DebugObjectFlags F) |
void | clearFlags (DebugObjectFlags F) |
void | finalizeAsync (FinalizeContinuation OnFinalize) |
virtual | ~DebugObject () |
virtual void | reportSectionTargetMemoryRange (StringRef Name, SectionRange TargetMem) |
Static Public Member Functions | |
static Expected< std::unique_ptr< DebugObject > > | Create (MemoryBufferRef Buffer, JITLinkContext &Ctx, ExecutionSession &ES) |
Protected Member Functions | |
Expected< SimpleSegmentAlloc > | finalizeWorkingMemory () override |
template<typename ELFT > | |
Error | recordSection (StringRef Name, std::unique_ptr< ELFDebugObjectSection< ELFT > > Section) |
DebugObjectSection * | getSection (StringRef Name) |
virtual Expected< SimpleSegmentAlloc > | finalizeWorkingMemory ()=0 |
Additional Inherited Members | |
Public Types inherited from llvm::orc::DebugObject | |
using | FinalizeContinuation = std::function< void(Expected< ExecutorAddrRange >)> |
Protected Types inherited from llvm::orc::DebugObject | |
using | InFlightAlloc = JITLinkMemoryManager::InFlightAlloc |
using | FinalizedAlloc = JITLinkMemoryManager::FinalizedAlloc |
Protected Attributes inherited from llvm::orc::DebugObject | |
JITLinkMemoryManager & | MemMgr |
const JITLinkDylib * | JD = nullptr |
The current implementation of ELFDebugObject replicates the approach used in RuntimeDyld: It patches executable and data section headers in the given object buffer with load-addresses of their corresponding sections in target memory.
Definition at line 188 of file DebugObjectManagerPlugin.cpp.
|
static |
Definition at line 297 of file DebugObjectManagerPlugin.cpp.
References llvm::ELF::ELFCLASS32, llvm::ELF::ELFCLASS64, llvm::ELF::ELFDATA2LSB, llvm::ELF::ELFDATA2MSB, Endian, llvm::MemoryBufferRef::getBuffer(), llvm::object::getElfArchType(), llvm::jitlink::JITLinkContext::getJITLinkDylib(), and llvm::jitlink::JITLinkContext::getMemoryManager().
Referenced by llvm::orc::createDebugObjectFromBuffer().
|
overrideprotectedvirtual |
Implements llvm::orc::DebugObject.
Definition at line 323 of file DebugObjectManagerPlugin.cpp.
References llvm::jitlink::SimpleSegmentAlloc::Create(), llvm::dbgs(), llvm::MemoryBufferRef::getBufferIdentifier(), llvm::MemoryBufferRef::getBufferSize(), llvm::MemoryBufferRef::getBufferStart(), llvm::sys::Process::getPageSizeEstimate(), llvm::orc::DebugObject::JD, LLVM_DEBUG, llvm::orc::DebugObject::MemMgr, PageSize, llvm::orc::Read, and Size.
|
inline |
Definition at line 196 of file DebugObjectManagerPlugin.cpp.
References llvm::MemoryBufferRef::getBuffer().
|
protected |
Definition at line 368 of file DebugObjectManagerPlugin.cpp.
References Name.
Referenced by reportSectionTargetMemoryRange().
|
protected |
Definition at line 356 of file DebugObjectManagerPlugin.cpp.
References llvm::dbgs(), llvm::MemoryBufferRef::getBufferIdentifier(), LLVM_DEBUG, Name, and llvm::Error::success().
|
overridevirtual |
Reimplemented from llvm::orc::DebugObject.
Definition at line 349 of file DebugObjectManagerPlugin.cpp.
References getSection(), and Name.