diff options
| author | Jason Molenda <jmolenda@apple.com> | 2013-08-27 02:22:06 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2013-08-27 02:22:06 +0000 |
| commit | b000e4d7581b284ab93fce21585da2ecc2e8d632 (patch) | |
| tree | b7fd0fd522c97e37f9a9e9f797f62d667a04ddf9 /lldb/source/Plugins/ObjectFile | |
| parent | 67c6e5041b595ddc064bcfd767690cdd8848840e (diff) | |
| download | bcm5719-llvm-b000e4d7581b284ab93fce21585da2ecc2e8d632.tar.gz bcm5719-llvm-b000e4d7581b284ab93fce21585da2ecc2e8d632.zip | |
When ObjectFileMachO::GetModuleSpecifications is getting the ArchSpec
out of a binary, if the Mach-O binary is MH_PRELOAD ("standalone"), don't
let the OS be set to "ios" or "macosx" - there will be no dynamic loader
used when debugging this process.
<rdar://problem/9956443>
llvm-svn: 189305
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
| -rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 88213c750e4..9f1d154c5e5 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -523,6 +523,11 @@ ObjectFileMachO::GetModuleSpecifications (const lldb_private::FileSpec& file, spec.GetArchitecture().SetArchitecture(eArchTypeMachO, header.cputype, header.cpusubtype); + if (header.filetype == HeaderFileTypePreloadedExecutable) // 0x5u MH_PRELOAD + { + // Set OS to "unknown" - this is a standalone binary with no dyld et al + spec.GetArchitecture().GetTriple().setOS (llvm::Triple::UnknownOS); + } if (spec.GetArchitecture().IsValid()) { GetUUID (header, data, data_offset, spec.GetUUID()); |

