Add the ios-mini target to the top-level xcodeproj, which builds
the debugserver-mini target in debugserver.  Add a new plist
which needs to be installed for debugserver-mini.
<rdar://problem/36751222> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@327915 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lldb.xcodeproj/project.pbxproj b/lldb.xcodeproj/project.pbxproj
index b269840..c1fd963 100644
--- a/lldb.xcodeproj/project.pbxproj
+++ b/lldb.xcodeproj/project.pbxproj
@@ -50,6 +50,18 @@
 			name = ios;
 			productName = ios;
 		};
+		AFA9B71120606A13008E86C6 /* ios-mini */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = AFA9B71F20606A13008E86C6 /* Build configuration list for PBXAggregateTarget "ios-mini" */;
+			buildPhases = (
+				AFA9B71820606A13008E86C6 /* CopyFiles */,
+			);
+			dependencies = (
+				AFA9B71220606A13008E86C6 /* PBXTargetDependency */,
+			);
+			name = "ios-mini";
+			productName = ios;
+		};
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
@@ -1003,6 +1015,7 @@
 		AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */; };
 		AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; };
 		AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; };
+		AFA9B72820606A5F008E86C6 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFA9B72720606A5F008E86C6 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist */; };
 		AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */; };
 		AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */; };
 		AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */; };
@@ -1194,6 +1207,13 @@
 			remoteGlobalIDString = 26DC6A0F1337FE6900FF7998;
 			remoteInfo = "lldb-server";
 		};
+		AFA9B71320606A13008E86C6 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 456F67431AD46CE9002850C2;
+			remoteInfo = "debugserver-mini";
+		};
 		AFCA21D11D18E556004386B8 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
@@ -1253,6 +1273,16 @@
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 		};
+		AFA9B71820606A13008E86C6 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 8;
+			dstPath = /AppleInternal/Library/LaunchDaemons;
+			dstSubfolderSpec = 0;
+			files = (
+				AFA9B72820606A5F008E86C6 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+		};
 		AFF87C85150FF5CC000E1742 /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
 			buildActionMask = 8;
@@ -3122,6 +3152,7 @@
 		AF9B8F32182DB52900DA866F /* SystemRuntimeMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemRuntimeMacOSX.h; sourceTree = "<group>"; };
 		AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree = "<group>"; };
 		AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree = "<group>"; };
+		AFA9B72720606A5F008E86C6 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = remotectl_com.apple.internal.xpc.remote.debugserver.plist; path = tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist; sourceTree = "<group>"; };
 		AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleCacheTest.cpp; path = Target/ModuleCacheTest.cpp; sourceTree = "<group>"; };
 		AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdGdbShow.cpp; path = "tools/lldb-mi/MICmdCmdGdbShow.cpp"; sourceTree = SOURCE_ROOT; };
 		AFB3D27F1AC262AB003B4B30 /* MICmdCmdGdbShow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdGdbShow.h; path = "tools/lldb-mi/MICmdCmdGdbShow.h"; sourceTree = SOURCE_ROOT; };
@@ -3297,6 +3328,7 @@
 		08FB7794FE84155DC02AAC07 /* lldb */ = {
 			isa = PBXGroup;
 			children = (
+				AFA9B72720606A5F008E86C6 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist */,
 				239481851C59EBDD00DF7168 /* libncurses.dylib */,
 				2326CF4E1BDD687800A5CEAC /* libpanel.dylib */,
 				2326CF4C1BDD684B00A5CEAC /* libedit.dylib */,
@@ -7099,6 +7131,7 @@
 				26CEF3B114FD592B007286B2 /* desktop */,
 				26CEF3A914FD58BF007286B2 /* desktop_no_xpc */,
 				26CEF3BC14FD596A007286B2 /* ios */,
+				AFA9B71120606A13008E86C6 /* ios-mini */,
 				26F5C26910F3D9A4009D5894 /* lldb-tool */,
 				26680206115FD0ED008E1FE4 /* LLDB */,
 				239504D31BDD451400963CEA /* lldb-gtest */,
@@ -8303,6 +8336,11 @@
 			target = 26DC6A0F1337FE6900FF7998 /* lldb-server */;
 			targetProxy = 94E829C8152D33B4006F96A3 /* PBXContainerItemProxy */;
 		};
+		AFA9B71220606A13008E86C6 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = "debugserver-mini";
+			targetProxy = AFA9B71320606A13008E86C6 /* PBXContainerItemProxy */;
+		};
 		AFCA21D21D18E556004386B8 /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			name = "debugserver-mini";
@@ -10722,6 +10760,38 @@
 			};
 			name = BuildAndIntegration;
 		};
+		AFA9B72020606A13008E86C6 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		AFA9B72120606A13008E86C6 /* DebugClang */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = DebugClang;
+		};
+		AFA9B72220606A13008E86C6 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+		AFA9B72320606A13008E86C6 /* BuildAndIntegration */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = BuildAndIntegration;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -10890,6 +10960,17 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = BuildAndIntegration;
 		};
+		AFA9B71F20606A13008E86C6 /* Build configuration list for PBXAggregateTarget "ios-mini" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				AFA9B72020606A13008E86C6 /* Debug */,
+				AFA9B72120606A13008E86C6 /* DebugClang */,
+				AFA9B72220606A13008E86C6 /* Release */,
+				AFA9B72320606A13008E86C6 /* BuildAndIntegration */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = BuildAndIntegration;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
diff --git a/tools/debugserver/debugserver.xcodeproj/project.pbxproj b/tools/debugserver/debugserver.xcodeproj/project.pbxproj
index 873613c..3d4e8e1 100644
--- a/tools/debugserver/debugserver.xcodeproj/project.pbxproj
+++ b/tools/debugserver/debugserver.xcodeproj/project.pbxproj
@@ -97,6 +97,8 @@
 		456F67691AD46CE9002850C2 /* DNBArchImplARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */; };
 		456F676B1AD46CE9002850C2 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26ACA3340D3E956300A2120B /* CoreFoundation.framework */; settings = {ATTRIBUTES = (Required, ); }; };
 		49D404621E39260F00570CDC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* Foundation.framework */; };
+		AF3467C220606B9400824E84 /* SocketAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF3467C120606B9400824E84 /* SocketAddress.cpp */; };
+		AF3467C320606B9400824E84 /* SocketAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF3467C120606B9400824E84 /* SocketAddress.cpp */; };
 		AF48558C1D75126800D19C07 /* StdStringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */; };
 		AF48558D1D75127500D19C07 /* StdStringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */; };
 		AFA3FCA11E39984900218D5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49D404611E39260F00570CDC /* Foundation.framework */; };
@@ -215,10 +217,12 @@
 		9457ECF61419864100DFE7D8 /* stack_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = stack_logging.h; sourceTree = "<group>"; };
 		AF0934BA18E12B92005A11FD /* Genealogy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Genealogy.h; sourceTree = "<group>"; };
 		AF0934BB18E12B92005A11FD /* GenealogySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenealogySPI.h; sourceTree = "<group>"; };
+		AF3467C120606B9400824E84 /* SocketAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SocketAddress.cpp; path = ../../../source/Host/common/SocketAddress.cpp; sourceTree = "<group>"; };
 		AF48558B1D75126800D19C07 /* StdStringExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StdStringExtractor.cpp; sourceTree = "<group>"; };
 		AF61C60418F75ABC00B48D9D /* debugserver-macosx-entitlements.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "debugserver-macosx-entitlements.plist"; sourceTree = "<group>"; };
 		AF67ABFF0D34604D0022D128 /* PseudoTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PseudoTerminal.cpp; sourceTree = "<group>"; };
 		AF67AC000D34604D0022D128 /* PseudoTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PseudoTerminal.h; sourceTree = "<group>"; };
+		AF949ED620605DC2002A91F9 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = remotectl_com.apple.internal.xpc.remote.debugserver.plist; sourceTree = "<group>"; };
 		AFEC3363194A8B0B00FF05C6 /* Genealogy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Genealogy.cpp; sourceTree = "<group>"; };
 		D6631CA81E848FE9006A7B11 /* SocketAddress.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SocketAddress.cpp; path = ../../source/Host/common/SocketAddress.cpp; sourceTree = "<group>"; };
 		EF88788B0D9C7558001831DA /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.debugserver.applist.plist; sourceTree = "<group>"; };
@@ -318,6 +322,7 @@
 		26A028FE114AB6A60029C479 /* Resources */ = {
 			isa = PBXGroup;
 			children = (
+				AF949ED620605DC2002A91F9 /* remotectl_com.apple.internal.xpc.remote.debugserver.plist */,
 				269E8DF8164B2ED200AD65F6 /* com.apple.debugserver.posix.plist */,
 				26203D1C1641EFB200A662F7 /* com.apple.debugserver.applist.internal.plist */,
 				26203D1D1641EFB200A662F7 /* com.apple.debugserver.internal.plist */,
@@ -333,6 +338,7 @@
 		26A028FF114AB6BB0029C479 /* libdebugnub */ = {
 			isa = PBXGroup;
 			children = (
+				AF3467C120606B9400824E84 /* SocketAddress.cpp */,
 				26C637E60C71334A0024798E /* MacOSX */,
 				260828DE0CBAF7F400F95054 /* DNBRuntimeAction.h */,
 				26A8FE1E0D11A77B00203048 /* DNBTimer.h */,
@@ -609,6 +615,7 @@
 				26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp in Sources */,
 				26CE05BC115C36420022F371 /* PThreadEvent.cpp in Sources */,
 				26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */,
+				AF3467C220606B9400824E84 /* SocketAddress.cpp in Sources */,
 				26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */,
 				23AE72E41D25DECF00945BCE /* DarwinLogCollector.cpp in Sources */,
 				26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */,
@@ -648,6 +655,7 @@
 				456F67531AD46CE9002850C2 /* MachVMRegion.cpp in Sources */,
 				23562ED71D342A5A00AB2BD4 /* ActivityStore.cpp in Sources */,
 				456F67541AD46CE9002850C2 /* MachTask.mm in Sources */,
+				AF3467C320606B9400824E84 /* SocketAddress.cpp in Sources */,
 				456F67551AD46CE9002850C2 /* DNB.cpp in Sources */,
 				456F67561AD46CE9002850C2 /* Genealogy.cpp in Sources */,
 				456F67571AD46CE9002850C2 /* DNBBreakpoint.cpp in Sources */,
diff --git a/tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist b/tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist
new file mode 100644
index 0000000..837ebe7
--- /dev/null
+++ b/tools/debugserver/source/remotectl_com.apple.internal.xpc.remote.debugserver.plist
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>Label</key>
+	<string>com.apple.internal.xpc.remote.debugserver</string>
+	<key>RemoteServices</key>
+	<dict>
+		<key>com.apple.internal.debugserver</key>
+		<dict>
+			<key>RequireEntitlement</key>
+			<string>AppleInternal</string>
+			<key>ExposedToUntrustedDevices</key>
+			<true/>
+		</dict>
+	</dict>
+	<key>ProgramArguments</key>
+	<array>
+		<string>/usr/libexec/remotectl</string>
+		<string>trampoline</string>
+		<string>-2</string>
+		<string>42</string>
+		<string>com.apple.internal.debugserver</string>
+		<string>/usr/local/bin/debugserver-nonui</string>
+		<string>--fd</string>
+		<string>42</string>
+	</array>
+	<key>POSIXSpawnType</key>
+	<string>Interactive</string>
+	<key>EnableTransactions</key>
+	<true/>
+	<key>EnablePressuredExit</key>
+	<true/>
+</dict>
+</plist>