[Lldb-commits] [lldb] r372786 - [CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVER

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 24 15:39:05 PDT 2019


Author: jdevlieghere
Date: Tue Sep 24 15:39:04 2019
New Revision: 372786

URL: http://llvm.org/viewvc/llvm-project?rev=372786&view=rev
Log:
[CMake] Copy over the system debugserver when using LLDB_USE_SYSTEM_DEBUGSERVER

r366433 broke support for the system debugserver. Although the change
was well-intended, it (presumably) unintentionally removed the logic to
copy over the debugserver. As a result, even with
LLDB_USE_SYSTEM_DEBUGSERVER enabled, we ended up building, signing and
using the just-built debugserver.

This patch partially recovers the old behavior: when
LLDB_USE_SYSTEM_DEBUGSERVER is set we don't build debugserver and just
copy over the system one.

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

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
    lldb/trunk/test/CMakeLists.txt
    lldb/trunk/tools/CMakeLists.txt
    lldb/trunk/tools/debugserver/source/CMakeLists.txt

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py Tue Sep 24 15:39:04 2019
@@ -15,6 +15,7 @@ class ConcurrentManyBreakpoints(Concurre
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
     @expectedFailureNetBSD
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 breakpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py Tue Sep 24 15:39:04 2019
@@ -15,6 +15,7 @@ class ConcurrentManyCrash(ConcurrentEven
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
     @expectedFailureNetBSD
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 threads that cause a segfault."""
         self.build(dictionary=self.getBuildFlags())

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py Tue Sep 24 15:39:04 2019
@@ -17,6 +17,7 @@ class ConcurrentManySignals(ConcurrentEv
     # This test is flaky on Darwin.
     @skipIfDarwin
     @expectedFailureNetBSD
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 signals from 100 threads."""
         self.build(dictionary=self.getBuildFlags())

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py Tue Sep 24 15:39:04 2019
@@ -16,6 +16,7 @@ class ConcurrentManyWatchpoints(Concurre
     @skipIf(triple='^mips')
     @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 watchpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())

Modified: lldb/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/CMakeLists.txt?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/test/CMakeLists.txt (original)
+++ lldb/trunk/test/CMakeLists.txt Tue Sep 24 15:39:04 2019
@@ -97,6 +97,10 @@ if(CMAKE_HOST_APPLE)
 
   if(LLDB_USE_SYSTEM_DEBUGSERVER)
     lldb_find_system_debugserver(system_debugserver_path)
+    add_custom_target(debugserver
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different
+      ${system_debugserver_path} ${LLVM_RUNTIME_OUTPUT_INTDIR}
+      COMMENT "Copying the system debugserver to LLDB's binaries directory for testing.")
     message(STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path}")
     list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver)
   elseif(TARGET debugserver)

Modified: lldb/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/tools/CMakeLists.txt (original)
+++ lldb/trunk/tools/CMakeLists.txt Tue Sep 24 15:39:04 2019
@@ -12,7 +12,9 @@ add_lldb_tool_subdirectory(lldb-vscode)
 
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_lldb_tool_subdirectory(darwin-debug)
-  add_lldb_tool_subdirectory(debugserver)
+  if(NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+    add_lldb_tool_subdirectory(debugserver)
+  endif()
 endif()
 
 if (LLDB_CAN_USE_LLDB_SERVER)

Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=372786&r1=372785&r2=372786&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original)
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Tue Sep 24 15:39:04 2019
@@ -28,7 +28,7 @@ function(get_debugserver_codesign_identi
   if(LLDB_CODESIGN_IDENTITY)
     set(${result} ${LLDB_CODESIGN_IDENTITY} PARENT_SCOPE)
     check_certificate(${LLDB_CODESIGN_IDENTITY} available)
-    if(NOT available AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+    if(NOT available)
       message(WARNING "LLDB_CODESIGN_IDENTITY not found: '${LLDB_CODESIGN_IDENTITY}' ${not_found_help}")
     endif()
     return()
@@ -41,9 +41,7 @@ function(get_debugserver_codesign_identi
     return()
   endif()
 
-  if(NOT LLDB_USE_SYSTEM_DEBUGSERVER)
-    message(WARNING "Development code sign identiy not found: 'lldb_codesign' ${not_found_help}")
-  endif()
+  message(WARNING "Development code sign identiy not found: 'lldb_codesign' ${not_found_help}")
 
   # LLVM pendant: fallback if available
   if(LLVM_CODESIGNING_IDENTITY)




More information about the lldb-commits mailing list