[Lldb-commits] [lldb] 6e30fd0 - [lldb/Plugins] Move DynamicLoaderMacOS into DynamicLoaderMacOSXDYLD (NFCI)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 12 13:44:51 PST 2020
Author: Jonas Devlieghere
Date: 2020-02-12T13:44:20-08:00
New Revision: 6e30fd05c92dff39cc196fadaa0489b907b29be8
URL: https://github.com/llvm/llvm-project/commit/6e30fd05c92dff39cc196fadaa0489b907b29be8
DIFF: https://github.com/llvm/llvm-project/commit/6e30fd05c92dff39cc196fadaa0489b907b29be8.diff
LOG: [lldb/Plugins] Move DynamicLoaderMacOS into DynamicLoaderMacOSXDYLD (NFCI)
Move the logic for initialization and termination for DynamicLoaderMacOS
into DynamicLoaderMacOSXDYLD so that there's one initializer for the
DynamicLoaderMacOSXDYLD plugin.
Added:
Modified:
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
lldb/tools/lldb-test/SystemInitializerTest.cpp
Removed:
################################################################################
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index bf8ace9d9280..888a7579f84d 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -110,7 +110,6 @@ LLDB_PLUGIN_DECLARE(StructuredDataDarwinLog)
LLDB_PLUGIN_DECLARE(PlatformRemoteGDBServer)
LLDB_PLUGIN_DECLARE(ProcessGDBRemote)
LLDB_PLUGIN_DECLARE(DynamicLoaderMacOSXDYLD)
-LLDB_PLUGIN_DECLARE(DynamicLoaderMacOS)
LLDB_PLUGIN_DECLARE(DynamicLoaderPOSIXDYLD)
LLDB_PLUGIN_DECLARE(DynamicLoaderStatic)
LLDB_PLUGIN_DECLARE(DynamicLoaderWindowsDYLD)
@@ -259,7 +258,6 @@ llvm::Error SystemInitializerFull::Initialize() {
LLDB_PLUGIN_INITIALIZE(ProcessGDBRemote);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOSXDYLD);
- LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOS);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderPOSIXDYLD);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderStatic);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWindowsDYLD);
@@ -347,7 +345,6 @@ void SystemInitializerFull::Terminate() {
LLDB_PLUGIN_TERMINATE(StructuredDataDarwinLog);
LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOSXDYLD);
- LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOS);
LLDB_PLUGIN_TERMINATE(DynamicLoaderPOSIXDYLD);
LLDB_PLUGIN_TERMINATE(DynamicLoaderStatic);
LLDB_PLUGIN_TERMINATE(DynamicLoaderWindowsDYLD);
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
index 2ebac49f31aa..7bc14061ffe0 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
@@ -28,8 +28,6 @@
using namespace lldb;
using namespace lldb_private;
-LLDB_PLUGIN(DynamicLoaderMacOS)
-
// Create an instance of this class. This function is filled into the plugin
// info class that gets handed out by the plugin factory and allows the lldb to
// instantiate an instance of this class.
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 53f1bd09b6c1..9cb6d1fcb612 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#include "DynamicLoaderMacOSXDYLD.h"
+#include "DynamicLoaderDarwin.h"
+#include "DynamicLoaderMacOS.h"
+#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
+#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Breakpoint/StoppointCallbackContext.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
@@ -25,12 +30,6 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
-#include "DynamicLoaderDarwin.h"
-#include "DynamicLoaderMacOSXDYLD.h"
-
-#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
-#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
-
//#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN
#ifdef ENABLE_DEBUG_PRINTF
#include <stdio.h>
@@ -1123,9 +1122,11 @@ bool DynamicLoaderMacOSXDYLD::GetSharedCacheInformation(
void DynamicLoaderMacOSXDYLD::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance);
+ DynamicLoaderMacOS::Initialize();
}
void DynamicLoaderMacOSXDYLD::Terminate() {
+ DynamicLoaderMacOS::Terminate();
PluginManager::UnregisterPlugin(CreateInstance);
}
diff --git a/lldb/tools/lldb-test/SystemInitializerTest.cpp b/lldb/tools/lldb-test/SystemInitializerTest.cpp
index 6835bda6ebdb..3e82b8cbf1b0 100644
--- a/lldb/tools/lldb-test/SystemInitializerTest.cpp
+++ b/lldb/tools/lldb-test/SystemInitializerTest.cpp
@@ -96,7 +96,6 @@ LLDB_PLUGIN_DECLARE(StructuredDataDarwinLog)
LLDB_PLUGIN_DECLARE(PlatformRemoteGDBServer)
LLDB_PLUGIN_DECLARE(ProcessGDBRemote)
LLDB_PLUGIN_DECLARE(DynamicLoaderMacOSXDYLD)
-LLDB_PLUGIN_DECLARE(DynamicLoaderMacOS)
LLDB_PLUGIN_DECLARE(DynamicLoaderPOSIXDYLD)
LLDB_PLUGIN_DECLARE(DynamicLoaderStatic)
LLDB_PLUGIN_DECLARE(DynamicLoaderWindowsDYLD)
@@ -234,7 +233,6 @@ llvm::Error SystemInitializerTest::Initialize() {
LLDB_PLUGIN_INITIALIZE(ProcessGDBRemote);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOSXDYLD);
- LLDB_PLUGIN_INITIALIZE(DynamicLoaderMacOS);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderPOSIXDYLD);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderStatic);
LLDB_PLUGIN_INITIALIZE(DynamicLoaderWindowsDYLD);
@@ -322,7 +320,6 @@ void SystemInitializerTest::Terminate() {
LLDB_PLUGIN_TERMINATE(StructuredDataDarwinLog);
LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOSXDYLD);
- LLDB_PLUGIN_TERMINATE(DynamicLoaderMacOS);
LLDB_PLUGIN_TERMINATE(DynamicLoaderPOSIXDYLD);
LLDB_PLUGIN_TERMINATE(DynamicLoaderStatic);
LLDB_PLUGIN_TERMINATE(DynamicLoaderWindowsDYLD);
More information about the lldb-commits
mailing list