diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index b53dec2a21d6..cd6a96c023ca 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -159,6 +159,8 @@ SBDebugger::Create(bool source_init_files, lldb::LogOutputCallback callback, voi { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); + Initialize(); + SBDebugger debugger; // Currently we have issues if this function is called simultaneously on two different @@ -210,6 +212,8 @@ SBDebugger::Destroy (SBDebugger &debugger) sstr.GetData()); } + Terminate(); + Debugger::Destroy (debugger.m_opaque_sp); if (debugger.m_opaque_sp.get() != NULL)