diff --git a/lldb/tools/debugserver/debugnub-exports b/lldb/tools/debugserver/debugnub-exports
deleted file mode 100644
--- 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
rename from lldb/tools/debugserver/source/debugserver-entitlements.plist
rename to lldb/tools/debugserver/resources/debugserver-entitlements.plist
diff --git a/lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist b/lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
rename from lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist
rename to lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
--- a/lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist
+++ b/lldb/tools/debugserver/resources/debugserver-macosx-entitlements.plist
@@ -2,9 +2,7 @@
- com.apple.private.logging.diagnostic
-
- com.apple.private.cs.debugger
+ com.apple.security.cs.debugger
diff --git a/lldb/tools/debugserver/source/debugserver-macosx-entitlements.plist b/lldb/tools/debugserver/resources/debugserver-macosx-private-entitlements.plist
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
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -60,7 +60,10 @@
# 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(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
--- a/lldb/tools/debugserver/source/com.apple.debugserver.applist.internal.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver.applist.internal
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
- --applist
-
- AllowByProxy
-
-
-
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
--- a/lldb/tools/debugserver/source/com.apple.debugserver.applist.plist
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver.applist
- UserName
- mobile
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
- --applist
- --launch=frontboard
-
- AllowByProxy
-
-
-
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
--- a/lldb/tools/debugserver/source/com.apple.debugserver.internal.plist
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver.internal
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
-
- AllowByProxy
-
-
-
diff --git a/lldb/tools/debugserver/source/com.apple.debugserver.plist b/lldb/tools/debugserver/source/com.apple.debugserver.plist
deleted file mode 100644
--- a/lldb/tools/debugserver/source/com.apple.debugserver.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver
- UserName
- mobile
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
- --launch=frontboard
-
- AllowByProxy
-
-
-
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
--- a/lldb/tools/debugserver/source/com.apple.debugserver.posix.internal.plist
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver.posix.internal
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
- --launch=posix
-
- AllowByProxy
-
-
-
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
--- a/lldb/tools/debugserver/source/com.apple.debugserver.posix.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- Label
- com.apple.debugserver.posix
- UserName
- mobile
- ProgramArguments
-
- /Developer/usr/bin/debugserver
- --lockdown
- --launch=posix
-
- AllowByProxy
-
-
-
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
--- a/lldb/tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- Label
- com.apple.internal.xpc.remote.debugserver
- RemoteServices
-
- com.apple.internal.debugserver
-
- RequireEntitlement
- AppleInternal
- ExposedToUntrustedDevices
-
-
-
- ProgramArguments
-
- /usr/libexec/remotectl
- trampoline
- -2
- 42
- com.apple.internal.debugserver
- /usr/local/bin/debugserver-nonui
- --fd
- 42
-
- POSIXSpawnType
- Interactive
- EnableTransactions
-
- EnablePressuredExit
-
-
-