[Lldb-commits] [lldb] 654086c - [lldb/Plugins] Move SymbolFileDWARFDebugMap into SymbolFileDWARF (NFCI)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 12 11:30:24 PST 2020
Author: Jonas Devlieghere
Date: 2020-02-12T11:30:17-08:00
New Revision: 654086cbf548c8571affcb24f4a4a1cf54988756
URL: https://github.com/llvm/llvm-project/commit/654086cbf548c8571affcb24f4a4a1cf54988756
DIFF: https://github.com/llvm/llvm-project/commit/654086cbf548c8571affcb24f4a4a1cf54988756.diff
LOG: [lldb/Plugins] Move SymbolFileDWARFDebugMap into SymbolFileDWARF (NFCI)
Move the logic for initialization and termination for
SymbolFileDWARFDebugMap into SymbolFileDWARF so that there's one
initializer for the SymbolFileDWARF plugin.
Added:
Modified:
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/tools/lldb-test/SystemInitializerTest.cpp
Removed:
################################################################################
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index 4290d9ef6f2e..bf8ace9d9280 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -88,7 +88,6 @@ LLDB_PLUGIN_DECLARE(EmulateInstructionARM64)
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS)
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS64)
LLDB_PLUGIN_DECLARE(EmulateInstructionPPC64)
-LLDB_PLUGIN_DECLARE(SymbolFileDWARFDebugMap)
LLDB_PLUGIN_DECLARE(ItaniumABILanguageRuntime)
LLDB_PLUGIN_DECLARE(AppleObjCRuntime)
LLDB_PLUGIN_DECLARE(SystemRuntimeMacOSX)
@@ -230,7 +229,6 @@ llvm::Error SystemInitializerFull::Initialize() {
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS64);
LLDB_PLUGIN_INITIALIZE(EmulateInstructionPPC64);
- LLDB_PLUGIN_INITIALIZE(SymbolFileDWARFDebugMap);
LLDB_PLUGIN_INITIALIZE(ItaniumABILanguageRuntime);
LLDB_PLUGIN_INITIALIZE(AppleObjCRuntime);
LLDB_PLUGIN_INITIALIZE(SystemRuntimeMacOSX);
@@ -324,7 +322,6 @@ void SystemInitializerFull::Terminate() {
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS64);
LLDB_PLUGIN_TERMINATE(EmulateInstructionPPC64);
- LLDB_PLUGIN_TERMINATE(SymbolFileDWARFDebugMap);
LLDB_PLUGIN_TERMINATE(ItaniumABILanguageRuntime);
LLDB_PLUGIN_TERMINATE(AppleObjCRuntime);
LLDB_PLUGIN_TERMINATE(SystemRuntimeMacOSX);
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 98cd34936522..39484f0a198b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -226,6 +226,7 @@ void SymbolFileDWARF::Initialize() {
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(), CreateInstance,
DebuggerInitialize);
+ SymbolFileDWARFDebugMap::Initialize();
}
void SymbolFileDWARF::DebuggerInitialize(Debugger &debugger) {
@@ -240,6 +241,7 @@ void SymbolFileDWARF::DebuggerInitialize(Debugger &debugger) {
}
void SymbolFileDWARF::Terminate() {
+ SymbolFileDWARFDebugMap::Terminate();
PluginManager::UnregisterPlugin(CreateInstance);
LogChannelDWARF::Terminate();
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 218aadc82169..01e50efdcb5f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -39,8 +39,6 @@
using namespace lldb;
using namespace lldb_private;
-LLDB_PLUGIN(SymbolFileDWARFDebugMap)
-
char SymbolFileDWARFDebugMap::ID;
// Subclass lldb_private::Module so we can intercept the
diff --git a/lldb/tools/lldb-test/SystemInitializerTest.cpp b/lldb/tools/lldb-test/SystemInitializerTest.cpp
index 46ef4d11566c..6835bda6ebdb 100644
--- a/lldb/tools/lldb-test/SystemInitializerTest.cpp
+++ b/lldb/tools/lldb-test/SystemInitializerTest.cpp
@@ -74,7 +74,6 @@ LLDB_PLUGIN_DECLARE(EmulateInstructionARM64)
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS)
LLDB_PLUGIN_DECLARE(EmulateInstructionMIPS64)
LLDB_PLUGIN_DECLARE(EmulateInstructionPPC64)
-LLDB_PLUGIN_DECLARE(SymbolFileDWARFDebugMap)
LLDB_PLUGIN_DECLARE(ItaniumABILanguageRuntime)
LLDB_PLUGIN_DECLARE(AppleObjCRuntime)
LLDB_PLUGIN_DECLARE(SystemRuntimeMacOSX)
@@ -205,7 +204,6 @@ llvm::Error SystemInitializerTest::Initialize() {
LLDB_PLUGIN_INITIALIZE(EmulateInstructionMIPS64);
LLDB_PLUGIN_INITIALIZE(EmulateInstructionPPC64);
- LLDB_PLUGIN_INITIALIZE(SymbolFileDWARFDebugMap);
LLDB_PLUGIN_INITIALIZE(ItaniumABILanguageRuntime);
LLDB_PLUGIN_INITIALIZE(AppleObjCRuntime);
LLDB_PLUGIN_INITIALIZE(SystemRuntimeMacOSX);
@@ -299,7 +297,6 @@ void SystemInitializerTest::Terminate() {
LLDB_PLUGIN_TERMINATE(EmulateInstructionMIPS64);
LLDB_PLUGIN_TERMINATE(EmulateInstructionPPC64);
- LLDB_PLUGIN_TERMINATE(SymbolFileDWARFDebugMap);
LLDB_PLUGIN_TERMINATE(ItaniumABILanguageRuntime);
LLDB_PLUGIN_TERMINATE(AppleObjCRuntime);
LLDB_PLUGIN_TERMINATE(SystemRuntimeMacOSX);
More information about the lldb-commits
mailing list