summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2018-06-14 21:17:59 +0000
committerFrederic Riss <friss@apple.com>2018-06-14 21:17:59 +0000
commit2153c42358ac1b30d3b9ca97c38b747b9a819585 (patch)
tree9c027c01ee0d9e9bf884d4a6aa637d59a6e4db0d
parent5d6c509944fc2a5873d0a70410c82a6ebd4ae31c (diff)
downloadbcm5719-llvm-2153c42358ac1b30d3b9ca97c38b747b9a819585.tar.gz
bcm5719-llvm-2153c42358ac1b30d3b9ca97c38b747b9a819585.zip
Add an entitlement to debugserver
On macOS 10.14, debugserver needs to have an entitlement do be allowed to debug processes. Adding this to both the Xcode and cmake build system. This shouldn't have any impact on previous OSs. llvm-svn: 334772
-rw-r--r--lldb/lldb.xcodeproj/project.pbxproj2
-rw-r--r--lldb/resources/debugserver-macosx-entitlements.plist8
-rw-r--r--lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj2
-rw-r--r--lldb/tools/debugserver/source/CMakeLists.txt5
4 files changed, 12 insertions, 5 deletions
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj
index 0d7d0791ca2..4ff550f959c 100644
--- a/lldb/lldb.xcodeproj/project.pbxproj
+++ b/lldb/lldb.xcodeproj/project.pbxproj
@@ -7335,7 +7335,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ \"${DEBUGSERVER_USE_FROM_SYSTEM}\" == \"\" ]\n then\n if [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\n fi\nfi\n";
+ shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ \"${DEBUGSERVER_USE_FROM_SYSTEM}\" == \"\" ]\n then\n if [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign --entitlements ${SRCROOT}/resources/debugserver-macosx-entitlements.plist \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\n fi\nfi\n";
};
940B04E21A89871F0045D5F7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
diff --git a/lldb/resources/debugserver-macosx-entitlements.plist b/lldb/resources/debugserver-macosx-entitlements.plist
new file mode 100644
index 00000000000..3d60e8bd0b9
--- /dev/null
+++ b/lldb/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/debugserver.xcodeproj/project.pbxproj b/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
index 55e2eb9cb45..810aa845d4f 100644
--- a/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
+++ b/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
@@ -570,7 +570,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/bin/sh -x";
- shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ -n \"${DEBUGSERVER_USE_FROM_SYSTEM}\" ]\n then\n\t\tditto \"${DEVELOPER_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver\" \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n elif [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\nfi\n";
+ shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n if [ -n \"${DEBUGSERVER_USE_FROM_SYSTEM}\" ]\n then\n\t\tditto \"${DEVELOPER_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver\" \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n elif [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n then\n codesign -f -s lldb_codesign --entitlements ${SRCROOT}/../../resources/debugserver-macosx-entitlements.plist \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n fi\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index dd5895adc29..b763c7cfa4d 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -209,12 +209,11 @@ endif()
set(entitlements_xml ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-macosx-entitlements.plist)
if(IOS)
set(entitlements_xml ${CMAKE_CURRENT_SOURCE_DIR}/debugserver-entitlements.plist)
+else()
+ set(entitlements_xml ${CMAKE_CURRENT_SOURCE_DIR}/../../../resources/debugserver-macosx-entitlements.plist)
endif()
set(LLDB_USE_ENTITLEMENTS_Default On)
-if("${LLDB_CODESIGN_IDENTITY}" STREQUAL "lldb_codesign")
- set(LLDB_USE_ENTITLEMENTS_Default Off)
-endif()
option(LLDB_USE_ENTITLEMENTS "Use entitlements when codesigning (Defaults Off when using lldb_codesign identity, otherwise On)" ${LLDB_USE_ENTITLEMENTS_Default})
if (SKIP_DEBUGSERVER)
OpenPOWER on IntegriCloud