Very large changes that were needed in order to allow multiple connections
to the debugger from GUI windows. Previously there was one global debugger
instance that could be accessed that had its own command interpreter and
current state (current target/process/thread/frame). When a GUI debugger
was attached, if it opened more than one window that each had a console
window, there were issues where the last one to setup the global debugger
object won and got control of the debugger.

To avoid this we now create instances of the lldb_private::Debugger that each 
has its own state:
- target list for targets the debugger instance owns
- current process/thread/frame
- its own command interpreter
- its own input, output and error file handles to avoid conflicts
- its own input reader stack

So now clients should call:

    SBDebugger::Initialize(); // (static function)

    SBDebugger debugger (SBDebugger::Create());
    // Use which ever file handles you wish
    debugger.SetErrorFileHandle (stderr, false);
    debugger.SetOutputFileHandle (stdout, false);
    debugger.SetInputFileHandle (stdin, true);

    // main loop
    
    SBDebugger::Terminate(); // (static function)
    
SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to
ensure nothing gets destroyed too early when multiple clients might be
attached.

Cleaned up the command interpreter and the CommandObject and all subclasses
to take more appropriate arguments.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106615 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBSymbolContext.cpp b/source/API/SBSymbolContext.cpp
index dec8529..d192569 100644
--- a/source/API/SBSymbolContext.cpp
+++ b/source/API/SBSymbolContext.cpp
@@ -16,22 +16,22 @@
 
 
 SBSymbolContext::SBSymbolContext () :
-    m_lldb_object_ap ()
+    m_opaque_ap ()
 {
 }
 
 SBSymbolContext::SBSymbolContext (const SymbolContext *sc_ptr) :
-    m_lldb_object_ap ()
+    m_opaque_ap ()
 {
     if (sc_ptr)
-        m_lldb_object_ap.reset (new SymbolContext (*sc_ptr));
+        m_opaque_ap.reset (new SymbolContext (*sc_ptr));
 }
 
 SBSymbolContext::SBSymbolContext (const SBSymbolContext& rhs) :
-    m_lldb_object_ap ()
+    m_opaque_ap ()
 {
     if (rhs.IsValid())
-        *m_lldb_object_ap = *rhs.m_lldb_object_ap;
+        *m_opaque_ap = *rhs.m_opaque_ap;
 }
 
 SBSymbolContext::~SBSymbolContext ()
@@ -44,7 +44,7 @@
     if (this != &rhs)
     {
         if (rhs.IsValid())
-            m_lldb_object_ap.reset (new lldb_private::SymbolContext(*rhs.m_lldb_object_ap.get()));
+            m_opaque_ap.reset (new lldb_private::SymbolContext(*rhs.m_opaque_ap.get()));
     }
     return *this;
 }
@@ -54,22 +54,22 @@
 {
     if (sc_ptr)
     {
-        if (m_lldb_object_ap.get())
-            *m_lldb_object_ap = *sc_ptr;
+        if (m_opaque_ap.get())
+            *m_opaque_ap = *sc_ptr;
         else
-            m_lldb_object_ap.reset (new SymbolContext (*sc_ptr));
+            m_opaque_ap.reset (new SymbolContext (*sc_ptr));
     }
     else
     {
-        if (m_lldb_object_ap.get())
-            m_lldb_object_ap->Clear();
+        if (m_opaque_ap.get())
+            m_opaque_ap->Clear();
     }
 }
 
 bool
 SBSymbolContext::IsValid () const
 {
-    return m_lldb_object_ap.get() != NULL;
+    return m_opaque_ap.get() != NULL;
 }
 
 
@@ -78,35 +78,35 @@
 SBSymbolContext::GetModule ()
 {
     SBModule sb_module;
-    if (m_lldb_object_ap.get())
-        sb_module.SetModule(m_lldb_object_ap->module_sp);
+    if (m_opaque_ap.get())
+        sb_module.SetModule(m_opaque_ap->module_sp);
     return sb_module;
 }
 
 SBCompileUnit
 SBSymbolContext::GetCompileUnit ()
 {
-    return SBCompileUnit (m_lldb_object_ap.get() ? m_lldb_object_ap->comp_unit : NULL);
+    return SBCompileUnit (m_opaque_ap.get() ? m_opaque_ap->comp_unit : NULL);
 }
 
 SBFunction
 SBSymbolContext::GetFunction ()
 {
-    return SBFunction (m_lldb_object_ap.get() ? m_lldb_object_ap->function : NULL);
+    return SBFunction (m_opaque_ap.get() ? m_opaque_ap->function : NULL);
 }
 
 SBBlock
 SBSymbolContext::GetBlock ()
 {
-    return SBBlock (m_lldb_object_ap.get() ? m_lldb_object_ap->block : NULL);
+    return SBBlock (m_opaque_ap.get() ? m_opaque_ap->block : NULL);
 }
 
 SBLineEntry
 SBSymbolContext::GetLineEntry ()
 {
     SBLineEntry sb_line_entry;
-    if (m_lldb_object_ap.get())
-        sb_line_entry.SetLineEntry (m_lldb_object_ap->line_entry);
+    if (m_opaque_ap.get())
+        sb_line_entry.SetLineEntry (m_opaque_ap->line_entry);
 
     return sb_line_entry;
 }
@@ -114,19 +114,19 @@
 SBSymbol
 SBSymbolContext::GetSymbol ()
 {
-    return SBSymbol (m_lldb_object_ap.get() ? m_lldb_object_ap->symbol : NULL);
+    return SBSymbol (m_opaque_ap.get() ? m_opaque_ap->symbol : NULL);
 }
 
 lldb_private::SymbolContext*
 SBSymbolContext::operator->() const
 {
-    return m_lldb_object_ap.get();
+    return m_opaque_ap.get();
 }
 
 lldb_private::SymbolContext *
 SBSymbolContext::GetLLDBObjectPtr() const
 {
-    return m_lldb_object_ap.get();
+    return m_opaque_ap.get();
 }