forked from OSchip/llvm-project
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
This commit is contained in:
parent
67c6e5041b
commit
b000e4d758
|
@ -523,6 +523,11 @@ ObjectFileMachO::GetModuleSpecifications (const lldb_private::FileSpec& file,
|
||||||
spec.GetArchitecture().SetArchitecture(eArchTypeMachO,
|
spec.GetArchitecture().SetArchitecture(eArchTypeMachO,
|
||||||
header.cputype,
|
header.cputype,
|
||||||
header.cpusubtype);
|
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())
|
if (spec.GetArchitecture().IsValid())
|
||||||
{
|
{
|
||||||
GetUUID (header, data, data_offset, spec.GetUUID());
|
GetUUID (header, data, data_offset, spec.GetUUID());
|
||||||
|
|
Loading…
Reference in New Issue