diff options
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 17eb92469ab..f93da0eb5cd 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -38,6 +38,7 @@ #include "lldb/Host/HostInfo.h" #include "lldb/Host/Terminal.h" #include "lldb/Host/ThreadLauncher.h" +#include "lldb/Initialization/InitializeLLDB.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/OptionValueProperties.h" #include "lldb/Interpreter/OptionValueSInt64.h" @@ -185,7 +186,7 @@ enum ePropertyEscapeNonPrintables }; -Debugger::LoadPluginCallbackType Debugger::g_load_plugin_callback = NULL; +LoadPluginCallbackType Debugger::g_load_plugin_callback = NULL; Error Debugger::SetPropertyValue (const ExecutionContext *exe_ctx, @@ -412,27 +413,16 @@ Debugger::TestDebuggerRefCount () return g_shared_debugger_refcount; } -static bool lldb_initialized_for_llgs = false; -void -Debugger::InitializeForLLGS (LoadPluginCallbackType load_plugin_callback) -{ - lldb_initialized_for_llgs = true; - g_shared_debugger_refcount++; - g_load_plugin_callback = load_plugin_callback; - lldb_private::InitializeForLLGS(); -} - static bool lldb_initialized = true; void -Debugger::Initialize (LoadPluginCallbackType load_plugin_callback) +Debugger::Initialize(LoadPluginCallbackType load_plugin_callback) { lldb_initialized = true; g_shared_debugger_refcount++; g_load_plugin_callback = load_plugin_callback; - lldb_private::Initialize(); } -void +int Debugger::Terminate () { if (g_shared_debugger_refcount > 0) @@ -440,21 +430,12 @@ Debugger::Terminate () g_shared_debugger_refcount--; if (g_shared_debugger_refcount == 0) { - lldb_private::WillTerminate(); - if (lldb_initialized_for_llgs) { - lldb_initialized_for_llgs = false; - lldb_private::TerminateLLGS(); - } - if (lldb_initialized) { - lldb_initialized = false; - lldb_private::Terminate(); - } - // Clear our master list of debugger objects Mutex::Locker locker (GetDebuggerListMutex ()); GetDebuggerList().clear(); } } + return g_shared_debugger_refcount; } void |