Add support for PLATFORM_*SIMULATOR
The toolchain in Xcode 10 uses a new LC_BUILD_VERSION entry to identify
simulator binaries. Add support for reading those to debugserver.
The exisitng test testing that code is currently failling when run
with Xcode 10, no need for a new test.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@334784 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/debugserver/source/MacOSX/MachProcess.mm b/tools/debugserver/source/MacOSX/MachProcess.mm
index 2703271..4ddc5f8 100644
--- a/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -607,6 +607,11 @@
}
}
#if defined (LC_BUILD_VERSION)
+#ifndef PLATFORM_IOSSIMULATOR
+#define PLATFORM_IOSSIMULATOR 7
+#define PLATFORM_TVOSSIMULATOR 8
+#define PLATFORM_WATCHOSSIMULATOR 9
+#endif
if (cmd == LC_BUILD_VERSION) {
struct build_version_command build_vers;
if (ReadMemory(load_command_address, sizeof(struct build_version_command),
@@ -621,10 +626,13 @@
case PLATFORM_MACOS:
return "macosx";
case PLATFORM_IOS:
+ case PLATFORM_IOSSIMULATOR:
return "ios";
case PLATFORM_TVOS:
+ case PLATFORM_TVOSSIMULATOR:
return "tvos";
case PLATFORM_WATCHOS:
+ case PLATFORM_WATCHOSSIMULATOR:
return "watchos";
case PLATFORM_BRIDGEOS:
return "bridgeos";