diff options
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointOptions.cpp')
-rw-r--r-- | lldb/source/Breakpoint/BreakpointOptions.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp index 5de137bf153..60679c94a76 100644 --- a/lldb/source/Breakpoint/BreakpointOptions.cpp +++ b/lldb/source/Breakpoint/BreakpointOptions.cpp @@ -39,6 +39,7 @@ BreakpointOptions::BreakpointOptions() : 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 @@ BreakpointOptions::BreakpointOptions(const BreakpointOptions& rhs) : 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 @@ BreakpointOptions::operator=(const BreakpointOptions& rhs) 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 @@ BreakpointOptions::GetConditionText () const 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 @@ BreakpointOptions::GetDescription (Stream *s, lldb::DescriptionLevel level) cons // 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 @@ BreakpointOptions::GetDescription (Stream *s, lldb::DescriptionLevel level) cons 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) |