[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.
This commit is contained in:
Jonas Devlieghere 2020-02-12 11:01:43 -08:00
parent 90a94c02fb
commit 654086cbf5
4 changed files with 2 additions and 8 deletions

View File

@ -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);

View File

@ -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();
}

View File

@ -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

View File

@ -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);