Fix an issue where debugserver would not properly vend OS version information on iOS devices
The __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED macro is only defined on OS X, so the check as written compiled the code out for iOS The right thing to do is compile the code out for older OSX versions, but leave iOS alone rdar://26333564 llvm-svn: 270004
This commit is contained in:
parent
e006202a4d
commit
109dd2e2a2
|
@ -2275,9 +2275,9 @@ MachProcess::GetGenealogyImageInfo (size_t idx)
|
|||
bool
|
||||
MachProcess::GetOSVersionNumbers (uint64_t *major, uint64_t *minor, uint64_t *patch)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
|
||||
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000)
|
||||
return false;
|
||||
#else
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
|
@ -2288,12 +2288,10 @@ MachProcess::GetOSVersionNumbers (uint64_t *major, uint64_t *minor, uint64_t *pa
|
|||
if (patch)
|
||||
*patch = vers.patchVersion;
|
||||
|
||||
success = true;
|
||||
|
||||
[pool drain];
|
||||
#endif
|
||||
|
||||
return success;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Do the process specific setup for attach. If this returns NULL, then there's no
|
||||
|
|
Loading…
Reference in New Issue