[Lldb-commits] [lldb] r332997 - Enable ProcessMachCore plugin on non-apple platforms
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue May 22 09:33:43 PDT 2018
Author: labath
Date: Tue May 22 09:33:43 2018
New Revision: 332997
URL: http://llvm.org/viewvc/llvm-project?rev=332997&view=rev
Log:
Enable ProcessMachCore plugin on non-apple platforms
Summary:
The plugin already builds fine on other platforms (linux, at least). All
that was necessary was to revitalize the hack in PlatformDarwinKernel
(not a very pretty hack, but it gets us going at least).
I haven't done a thorough investigation of the state of the plugin on
other platforms, but at least the two core file tests we have seem to
pass, so I enable them.
Reviewers: JDevlieghere, jasonmolenda
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D47133
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py
lldb/trunk/source/API/SystemInitializerFull.cpp
lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt
lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
lldb/trunk/source/Plugins/Process/CMakeLists.txt
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py Tue May 22 09:33:43 2018
@@ -26,7 +26,6 @@ class MachCoreTestCase(TestBase):
lldb.DBG.SetSelectedPlatform(self._initial_platform)
super(MachCoreTestCase, self).tearDown()
- @skipUnlessDarwin
def test_selected_thread(self):
"""Test that the right thread is selected after a core is loaded."""
# Create core form YAML.
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/source-map/TestTargetSourceMap.py Tue May 22 09:33:43 2018
@@ -7,7 +7,6 @@ class TestTargetSourceMap(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@no_debug_info_test
def test_source_map(self):
"""Test target.source-map' functionality."""
Modified: lldb/trunk/source/API/SystemInitializerFull.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SystemInitializerFull.cpp?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/source/API/SystemInitializerFull.cpp (original)
+++ lldb/trunk/source/API/SystemInitializerFull.cpp Tue May 22 09:33:43 2018
@@ -84,6 +84,7 @@
#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
#include "Plugins/Process/elf-core/ProcessElfCore.h"
#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
+#include "Plugins/Process/mach-core/ProcessMachCore.h"
#include "Plugins/Process/minidump/ProcessMinidump.h"
#include "Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h"
#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
@@ -104,7 +105,6 @@
#include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h"
#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
#include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
-#include "Plugins/Process/mach-core/ProcessMachCore.h"
#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
#endif
#include "Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.h"
@@ -313,6 +313,7 @@ void SystemInitializerFull::Initialize()
JITLoaderGDB::Initialize();
ProcessElfCore::Initialize();
+ ProcessMachCore::Initialize();
minidump::ProcessMinidump::Initialize();
MemoryHistoryASan::Initialize();
AddressSanitizerRuntime::Initialize();
@@ -353,7 +354,6 @@ void SystemInitializerFull::Initialize()
#if defined(__APPLE__)
SymbolVendorMacOSX::Initialize();
ProcessKDP::Initialize();
- ProcessMachCore::Initialize();
PlatformAppleTVSimulator::Initialize();
PlatformAppleWatchSimulator::Initialize();
PlatformRemoteAppleTV::Initialize();
@@ -440,6 +440,7 @@ void SystemInitializerFull::Terminate()
JITLoaderGDB::Terminate();
ProcessElfCore::Terminate();
+ ProcessMachCore::Terminate();
minidump::ProcessMinidump::Terminate();
MemoryHistoryASan::Terminate();
AddressSanitizerRuntime::Terminate();
@@ -471,7 +472,6 @@ void SystemInitializerFull::Terminate()
#if defined(__APPLE__)
DynamicLoaderDarwinKernel::Terminate();
- ProcessMachCore::Terminate();
ProcessKDP::Terminate();
SymbolVendorMacOSX::Terminate();
PlatformAppleTVSimulator::Terminate();
Modified: lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/CMakeLists.txt Tue May 22 09:33:43 2018
@@ -1,9 +1,6 @@
+add_subdirectory(Darwin-Kernel)
add_subdirectory(MacOSX-DYLD)
add_subdirectory(POSIX-DYLD)
add_subdirectory(Static)
add_subdirectory(Hexagon-DYLD)
add_subdirectory(Windows-DYLD)
-
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
- add_subdirectory(Darwin-Kernel)
-endif()
Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h Tue May 22 09:33:43 2018
@@ -201,6 +201,7 @@ public:
// source/Host/macosx/cfcpp utilities.
class PlatformDarwinKernel {
+public:
static lldb_private::ConstString GetPluginNameStatic();
};
Modified: lldb/trunk/source/Plugins/Process/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/CMakeLists.txt?rev=332997&r1=332996&r2=332997&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Process/CMakeLists.txt Tue May 22 09:33:43 2018
@@ -11,9 +11,9 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Windo
add_subdirectory(Windows/Common)
elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(MacOSX-Kernel)
- add_subdirectory(mach-core)
endif()
add_subdirectory(gdb-remote)
add_subdirectory(Utility)
add_subdirectory(elf-core)
+add_subdirectory(mach-core)
add_subdirectory(minidump)
More information about the lldb-commits
mailing list