[Lldb-commits] [lldb] r334772 - Add an entitlement to debugserver
Frederic Riss via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 14 14:17:59 PDT 2018
Author: friss
Date: Thu Jun 14 14:17:59 2018
New Revision: 334772
URL: http://llvm.org/viewvc/llvm-project?rev=334772&view=rev
Log:
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.
Added:
lldb/trunk/resources/debugserver-macosx-entitlements.plist
Modified:
lldb/trunk/lldb.xcodeproj/project.pbxproj
lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
lldb/trunk/tools/debugserver/source/CMakeLists.txt
Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=334772&r1=334771&r2=334772&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Jun 14 14:17:59 2018
@@ -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;
Added: lldb/trunk/resources/debugserver-macosx-entitlements.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/resources/debugserver-macosx-entitlements.plist?rev=334772&view=auto
==============================================================================
--- lldb/trunk/resources/debugserver-macosx-entitlements.plist (added)
+++ lldb/trunk/resources/debugserver-macosx-entitlements.plist Thu Jun 14 14:17:59 2018
@@ -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>
Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=334772&r1=334771&r2=334772&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Thu Jun 14 14:17:59 2018
@@ -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 */
Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=334772&r1=334771&r2=334772&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Thu Jun 14 14:17:59 2018
@@ -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)
More information about the lldb-commits
mailing list