Author: enrico
Date: Wed May 18 18:59:24 2016
New Revision: 270004
URL: http://llvm.org/viewvc/llvm-project?rev=270004&view=rev
Log:
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
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=270004&r1=270003&r2=270004&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Wed May 18
18:59:24 2016
@@ -2275,9 +2275,9 @@ MachProcess::GetGenealogyImageInfo (size
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
if (patch)
*patch = vers.patchVersion;
- success = true;
-
[pool drain];
+
+ return true;
#endif
-
- return success;
}
// Do the process specific setup for attach. If this returns NULL, then
there's no
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits