[RuntimeDyld] Adds the necessary hooks to MCJIT to be able to debug generated

MachO files using the GDB JIT debugging interface.

Patch by Keno Fischer. Thanks Keno!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2014-06-25 00:20:53 +00:00
parent 49b52b35d4
commit 7ede4b96de
4 changed files with 133 additions and 12 deletions

View File

@ -1797,7 +1797,7 @@ StringRef MachOObjectFile::getStringTableData() const {
bool MachOObjectFile::is64Bit() const {
return getType() == getMachOType(false, true) ||
getType() == getMachOType(true, true);
getType() == getMachOType(true, true);
}
void MachOObjectFile::ReadULEB128s(uint64_t Index,
@ -1812,6 +1812,10 @@ void MachOObjectFile::ReadULEB128s(uint64_t Index,
}
}
const char *MachOObjectFile::getSectionPointer(DataRefImpl Rel) const {
return Sections[Rel.d.a];
}
ErrorOr<ObjectFile *>
ObjectFile::createMachOObjectFile(std::unique_ptr<MemoryBuffer> &Buffer) {
StringRef Magic = Buffer->getBuffer().slice(0, 4);