Adding "-n", "-p" and "-w" flags to the lldb command-line tool to
allow attaching from the command line.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139665 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index d068726..acb69fa 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -166,6 +166,15 @@
         m_opaque_sp->SetAsyncExecution(b);
 }
 
+bool
+SBDebugger::GetAsync ()
+{
+    if (m_opaque_sp)
+        return m_opaque_sp->GetAsyncExecution();
+    else
+        return false;
+}
+
 void
 SBDebugger::SkipLLDBInitFiles (bool b)
 {
@@ -642,6 +651,24 @@
 }
 
 void
+SBDebugger::SetSelectedTarget (SBTarget &sb_target)
+{
+    LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+    if (m_opaque_sp)
+    {
+        m_opaque_sp->GetTargetList().SetSelectedTarget (sb_target.get());
+    }
+    if (log)
+    {
+        SBStream sstr;
+        sb_target.GetDescription (sstr, eDescriptionLevelBrief);
+        log->Printf ("SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s", m_opaque_sp.get(),
+                     sb_target.get(), sstr.GetData());
+    }
+}
+
+void
 SBDebugger::DispatchInput (void *baton, const void *data, size_t data_len)
 {
     LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));