diff options
author | Lang Hames <lhames@gmail.com> | 2014-06-25 00:20:53 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-06-25 00:20:53 +0000 |
commit | 41b192f35f7d81c94c71de6daca4a747d93dbb1a (patch) | |
tree | da030c5288dd5a07a73802dc79a810c6c171ff35 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 49bbfd026a190cbd9af4ca5e13b36ee9c38cffbe (diff) | |
download | bcm5719-llvm-41b192f35f7d81c94c71de6daca4a747d93dbb1a.tar.gz bcm5719-llvm-41b192f35f7d81c94c71de6daca4a747d93dbb1a.zip |
[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!
llvm-svn: 211652
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 09c842c4a0d..dbfc07270a6 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -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); |