[Lldb-commits] [lldb] r219102 - Call SBDebugger::Initialize/Terminate from within Create/Destroy.

Matthew Gardiner mg11 at csr.com
Sun Oct 5 22:22:29 PDT 2014


Author: mg11
Date: Mon Oct  6 00:22:29 2014
New Revision: 219102

URL: http://llvm.org/viewvc/llvm-project?rev=219102&view=rev
Log:
Call SBDebugger::Initialize/Terminate from within Create/Destroy.

The above change permits developers using the lldb C++ API to
code applications in a more logical manner.


Modified:
    lldb/trunk/source/API/SBDebugger.cpp

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=219102&r1=219101&r2=219102&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Mon Oct  6 00:22:29 2014
@@ -159,6 +159,8 @@ SBDebugger::Create(bool source_init_file
 {
     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 &debugge
                      sstr.GetData());
     }
 
+    Terminate();
+
     Debugger::Destroy (debugger.m_opaque_sp);
 
     if (debugger.m_opaque_sp.get() != NULL)





More information about the lldb-commits mailing list