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/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp
index 5de137b..60679c9 100644
--- a/source/Breakpoint/BreakpointOptions.cpp
+++ b/source/Breakpoint/BreakpointOptions.cpp
@@ -39,6 +39,7 @@
     m_callback_baton_sp (),
     m_callback_is_synchronous (false),
     m_enabled (true),
+    m_one_shot (false),
     m_ignore_count (0),
     m_thread_spec_ap (NULL),
     m_condition_ap()
@@ -53,6 +54,7 @@
     m_callback_baton_sp (rhs.m_callback_baton_sp),
     m_callback_is_synchronous (rhs.m_callback_is_synchronous),
     m_enabled (rhs.m_enabled),
+    m_one_shot (rhs.m_one_shot),
     m_ignore_count (rhs.m_ignore_count),
     m_thread_spec_ap (NULL),
     m_condition_ap (NULL)
@@ -73,6 +75,7 @@
     m_callback_baton_sp = rhs.m_callback_baton_sp;
     m_callback_is_synchronous = rhs.m_callback_is_synchronous;
     m_enabled = rhs.m_enabled;
+    m_one_shot = rhs.m_one_shot;
     m_ignore_count = rhs.m_ignore_count;
     if (rhs.m_thread_spec_ap.get() != NULL)
         m_thread_spec_ap.reset(new ThreadSpec(*rhs.m_thread_spec_ap.get()));
@@ -179,33 +182,6 @@
         return NULL;
 }
 
-//------------------------------------------------------------------
-// Enabled/Ignore Count
-//------------------------------------------------------------------
-bool
-BreakpointOptions::IsEnabled () const
-{
-    return m_enabled;
-}
-
-void
-BreakpointOptions::SetEnabled (bool enabled)
-{
-    m_enabled = enabled;
-}
-
-uint32_t
-BreakpointOptions::GetIgnoreCount () const
-{
-    return m_ignore_count;
-}
-
-void
-BreakpointOptions::SetIgnoreCount (uint32_t n)
-{
-    m_ignore_count = n;
-}
-
 const ThreadSpec *
 BreakpointOptions::GetThreadSpecNoCreate () const
 {
@@ -234,7 +210,7 @@
     // Figure out if there are any options not at their default value, and only print 
     // anything if there are:
     
-    if (m_ignore_count != 0 || !m_enabled || (GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ()))
+    if (m_ignore_count != 0 || !m_enabled || m_one_shot || (GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ()))
     {
         if (level == lldb::eDescriptionLevelVerbose)
         {
@@ -252,6 +228,9 @@
             s->Printf("ignore: %d ", m_ignore_count);
         s->Printf("%sabled ", m_enabled ? "en" : "dis");
         
+        if (m_one_shot)
+            s->Printf ("one-shot ");
+        
         if (m_thread_spec_ap.get())
             m_thread_spec_ap->GetDescription (s, level);
         else if (level == eDescriptionLevelBrief)