[llvm-branch-commits] [lldb] 2723551 - [debugserver] Various plist changes

Jonas Devlieghere via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 8 18:59:55 PST 2021


Author: Jonas Devlieghere
Date: 2021-01-08T18:53:08-08:00
New Revision: 272355128f48089a959215472b645628a48659f2

URL: https://github.com/llvm/llvm-project/commit/272355128f48089a959215472b645628a48659f2
DIFF: https://github.com/llvm/llvm-project/commit/272355128f48089a959215472b645628a48659f2.diff

LOG: [debugserver] Various plist changes

 - Remove unused plists that were referenced (but unused) by Xcode.
 - Move all debugserver plists unders tools/debugserver/resources.
 - Add the ability to distinguish between com.apple.security.cs.debugger
   and com.apple.private.cs.debugger.

rdar://66082043

Differential revision: https://reviews.llvm.org/D94320

Added: 
    lldb/tools/debugserver/resources/debugserver-entitlements.plist
    lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
    lldb/tools/debugserver/resources/debugserver-macosx-private-entitlements.plist

Modified: 
    lldb/tools/debugserver/source/CMakeLists.txt

Removed: 
    lldb/tools/debugserver/debugnub-exports
    lldb/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
    lldb/tools/debugserver/source/com.apple.debugserver.applist.plist
    lldb/tools/debugserver/source/com.apple.debugserver.internal.plist
    lldb/tools/debugserver/source/com.apple.debugserver.plist
    lldb/tools/debugserver/source/com.apple.debugserver.posix.internal.plist
    lldb/tools/debugserver/source/com.apple.debugserver.posix.plist
    lldb/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist
    lldb/tools/debugserver/source/debugserver-entitlements.plist
    lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist


################################################################################
diff  --git a/lldb/tools/debugserver/debugnub-exports b/lldb/tools/debugserver/debugnub-exports
deleted file mode 100644
index 662bf9308a6f..000000000000
--- a/lldb/tools/debugserver/debugnub-exports
+++ /dev/null
@@ -1,2 +0,0 @@
-_DNB*
-__DNB*

diff  --git a/lldb/tools/debugserver/source/debugserver-entitlements.plist b/lldb/tools/debugserver/resources/debugserver-entitlements.plist
similarity index 100%
rename from lldb/tools/debugserver/source/debugserver-entitlements.plist
rename to lldb/tools/debugserver/resources/debugserver-entitlements.plist

diff  --git a/lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist b/lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
new file mode 100644
index 000000000000..3d60e8bd0b94
--- /dev/null
+++ b/lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
@@ -0,0 +1,8 @@
+<?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>com.apple.security.cs.debugger</key>
+    <true/>
+</dict>
+</plist>

diff  --git a/lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist b/lldb/tools/debugserver/resources/debugserver-macosx-private-entitlements.plist
similarity index 100%
rename from lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist
rename to lldb/tools/debugserver/resources/debugserver-macosx-private-entitlements.plist

diff  --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index 6977fe734381..0318d5051c1f 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -60,7 +60,10 @@ endfunction()
 # llvm dependencies in the current scope to the empty set.
 set(LLVM_COMMON_DEPENDS)
 
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/../resources/lldb-debugserver-Info.plist")
+set(DEBUGSERVER_RESOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../resources")
+set(DEBUGSERVER_INFO_PLIST "${DEBUGSERVER_RESOURCE_DIR}/lldb-debugserver-Info.plist")
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,${DEBUGSERVER_INFO_PLIST}")
 
 check_cxx_compiler_flag("-Wno-gnu-zero-variadic-macro-arguments"
                         CXX_SUPPORTS_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS)
@@ -128,8 +131,11 @@ if(LLDB_USE_ENTITLEMENTS)
   if(APPLE_EMBEDDED)
     set(entitlements ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
   else()
-    # Same entitlements file as used for lldb-server
-    set(entitlements ${LLDB_SOURCE_DIR}/resources/debugserver-macosx-entitlements.plist)
+    if (LLDB_USE_PRIVATE_ENTITLEMENTS)
+      set(entitlements ${DEBUGSERVER_RESOURCE_DIR}/debugserver-macosx-entitlements.plist)
+    else()
+      set(entitlements ${DEBUGSERVER_RESOURCE_DIR}/debugserver-macosx-private-entitlements.plist)
+    endif()
   endif()
 endif()
 

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.applist.internal.plist b/lldb/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
deleted file mode 100644
index e9a74bd0bf79..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-<?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.debugserver.applist.internal</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-		<string>--applist</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.applist.plist b/lldb/tools/debugserver/source/com.apple.debugserver.applist.plist
deleted file mode 100644
index 002e90d98d13..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.applist.plist
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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.debugserver.applist</string>
-	<key>UserName</key>
-	<string>mobile</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-        <string>--applist</string>
-        <string>--launch=frontboard</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.internal.plist b/lldb/tools/debugserver/source/com.apple.debugserver.internal.plist
deleted file mode 100644
index b9f57f731232..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.internal.plist
+++ /dev/null
@@ -1,15 +0,0 @@
-<?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.debugserver.internal</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.plist b/lldb/tools/debugserver/source/com.apple.debugserver.plist
deleted file mode 100644
index c07466e27cd2..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.debugserver</string>
-	<key>UserName</key>
-	<string>mobile</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-        <string>--launch=frontboard</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.posix.internal.plist b/lldb/tools/debugserver/source/com.apple.debugserver.posix.internal.plist
deleted file mode 100644
index 0ca9f5be68e2..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.posix.internal.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-<?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.debugserver.posix.internal</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-		<string>--launch=posix</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.debugserver.posix.plist b/lldb/tools/debugserver/source/com.apple.debugserver.posix.plist
deleted file mode 100644
index 4083f8a75c67..000000000000
--- a/lldb/tools/debugserver/source/com.apple.debugserver.posix.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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.debugserver.posix</string>
-	<key>UserName</key>
-	<string>mobile</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>/Developer/usr/bin/debugserver</string>
-		<string>--lockdown</string>
-		<string>--launch=posix</string>
-	</array>
-    <key>AllowByProxy</key>
-    <true/>
-</dict>
-</plist>

diff  --git a/lldb/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist b/lldb/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist
deleted file mode 100644
index 837ebe7b59ad..000000000000
--- a/lldb/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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>


        


More information about the llvm-branch-commits mailing list