[RuntimeDyld] Revert r211652 - MachO object GDB registration support.

The registration scheme used in r211652 violated the read-only contract of
MemoryBuffer. This caused crashes in llvm-rtdyld where macho objects were backed
by read-only mmap'd memory.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2014-07-15 19:35:22 +00:00
parent d9ebc5991b
commit 58d03b3e08
4 changed files with 24 additions and 153 deletions

View File

@ -1908,7 +1908,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,
@ -1923,10 +1923,6 @@ 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);