Add one-shot breakpoints (-o option to "break set") and a tbreak alias for our gdb friends.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165328 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBBreakpoint.cpp b/source/API/SBBreakpoint.cpp
index 8be6704..b0b1e2a 100644
--- a/source/API/SBBreakpoint.cpp
+++ b/source/API/SBBreakpoint.cpp
@@ -234,6 +234,33 @@
         return false;
 }
 
+void
+SBBreakpoint::SetOneShot (bool one_shot)
+{
+    LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+    if (log)
+        log->Printf ("SBBreakpoint(%p)::SetOneShot (one_shot=%i)", m_opaque_sp.get(), one_shot);
+
+    if (m_opaque_sp)
+    {
+        Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+        m_opaque_sp->SetOneShot (one_shot);
+    }
+}
+
+bool
+SBBreakpoint::IsOneShot () const
+{
+    if (m_opaque_sp)
+    {
+        Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
+        return m_opaque_sp->IsOneShot();
+    }
+    else
+        return false;
+}
+
 bool
 SBBreakpoint::IsInternal ()
 {