[Lldb-commits] [lldb] ea157f9 - Revert "[lldb-server] Use Platform plugin corresponding to the host"

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 27 13:43:35 PDT 2023


Author: Alex Langford
Date: 2023-03-27T13:42:14-07:00
New Revision: ea157f9b3912209cdda4d3acc07245624ed68b6f

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

LOG: Revert "[lldb-server] Use Platform plugin corresponding to the host"

This reverts commit 0c5cee779929f840f4f286c5894a01f583ee7b4a.
As discussed in https://reviews.llvm.org/D146668 we'll find another way
forward.

Added: 
    

Modified: 
    lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
    lldb/tools/lldb-server/CMakeLists.txt
    lldb/tools/lldb-server/SystemInitializerLLGS.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
index 172c00eb59dc2..b63a09d047024 100644
--- a/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -63,9 +63,7 @@ def inferior_crashing(self):
         # The exact stop reason depends on the platform
         if self.platformIsDarwin():
             stop_reason = 'stop reason = EXC_BAD_ACCESS'
-        elif self.getPlatform() == "linux":
-            stop_reason = 'stop reason = signal SIGSEGV: address not mapped to object'
-        elif self.getPlatform() == "freebsd":
+        elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
             stop_reason = 'stop reason = signal SIGSEGV'
         else:
             stop_reason = 'stop reason = invalid address'

diff  --git a/lldb/tools/lldb-server/CMakeLists.txt b/lldb/tools/lldb-server/CMakeLists.txt
index 56da4c8b56807..67103e87a1d4a 100644
--- a/lldb/tools/lldb-server/CMakeLists.txt
+++ b/lldb/tools/lldb-server/CMakeLists.txt
@@ -7,29 +7,20 @@ set(LLDB_PLUGINS)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
   list(APPEND LLDB_PLUGINS lldbPluginProcessLinux)
-  if (CMAKE_SYSTEM_NAME MATCHES "Linux")
-    list(APPEND LLDB_PLUGINS lldbPluginPlatformLinux)
-  else()
-    list(APPEND LLDB_PLUGINS lldbPluginPlatformAndroid)
-  endif()
 endif()
 
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
   list(APPEND LLDB_PLUGINS lldbPluginProcessFreeBSD)
-  list(APPEND LLDB_PLUGINS lldbPluginPlatformFreeBSD)
 endif()
 
 if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
   list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD)
-  list(APPEND LLDB_PLUGINS lldbPluginPlatformNetBSD)
 endif()
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileMachO)
-  list(APPEND LLDB_PLUGINS lldbPluginPlatformMacOSX)
 elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
   list(APPEND LLDB_PLUGINS lldbPluginObjectFilePECOFF)
-  list(APPEND LLDB_PLUGINS lldbPluginPlatformWindows)
 else()
   list(APPEND LLDB_PLUGINS lldbPluginObjectFileELF)
 endif()

diff  --git a/lldb/tools/lldb-server/SystemInitializerLLGS.cpp b/lldb/tools/lldb-server/SystemInitializerLLGS.cpp
index 1909ea4dc7984..4233252a84dfc 100644
--- a/lldb/tools/lldb-server/SystemInitializerLLGS.cpp
+++ b/lldb/tools/lldb-server/SystemInitializerLLGS.cpp
@@ -11,29 +11,12 @@
 #if defined(__APPLE__)
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 using HostObjectFile = ObjectFileMachO;
-#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
-using HostPlatform = lldb_private::PlatformMacOSX;
 #elif defined(_WIN32)
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
 using HostObjectFile = ObjectFilePECOFF;
-#include "Plugins/Platform/Windows/PlatformWindows.h"
-using HostPlatform = lldb_private::PlatformWindows;
 #else
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
 using HostObjectFile = ObjectFileELF;
-#if defined(__ANDROID__)
-#include "Plugins/Platform/Android/PlatformAndroid.h"
-using HostPlatform = lldb_private::platform_android::PlatformAndroid;
-#elif defined(__FreeBSD__)
-#include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
-using HostPlatform = lldb_private::platform_freebsd::PlatformFreeBSD;
-#elif defined(__linux__)
-#include "Plugins/Platform/Linux/PlatformLinux.h"
-using HostPlatform = lldb_private::platform_linux::PlatformLinux;
-#elif defined(__NetBSD__)
-#include "Plugins/Platform/NetBSD/PlatformNetBSD.h"
-using HostPlatform = lldb_private::platform_netbsd::PlatformNetBSD;
-#endif
 #endif
 
 #if defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
@@ -75,7 +58,6 @@ llvm::Error SystemInitializerLLGS::Initialize() {
     return e;
 
   HostObjectFile::Initialize();
-  HostPlatform::Initialize();
 
 #if defined(LLDB_TARGET_ARM) || defined(LLDB_TARGET_ARM64)
   EmulateInstructionARM::Initialize();
@@ -98,7 +80,6 @@ llvm::Error SystemInitializerLLGS::Initialize() {
 
 void SystemInitializerLLGS::Terminate() {
   HostObjectFile::Terminate();
-  HostPlatform::Terminate();
 
 #if defined(LLDB_TARGET_ARM) || defined(LLDB_TARGET_ARM64)
   EmulateInstructionARM::Terminate();


        


More information about the lldb-commits mailing list