diff --git a/lldb/include/lldb/Breakpoint/StoppointLocation.h b/lldb/include/lldb/Breakpoint/StoppointLocation.h index dbc4f961f877..7007d342960d 100644 --- a/lldb/include/lldb/Breakpoint/StoppointLocation.h +++ b/lldb/include/lldb/Breakpoint/StoppointLocation.h @@ -70,7 +70,10 @@ public: } void - IncrementHitCount (); + IncrementHitCount () + { + ++m_hit_count; + } uint32_t GetHardwareIndex () const diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp index 6693c469cc64..5d7206e28461 100644 --- a/lldb/source/Breakpoint/BreakpointLocation.cpp +++ b/lldb/source/Breakpoint/BreakpointLocation.cpp @@ -212,12 +212,12 @@ BreakpointLocation::ShouldStop (StoppointCallbackContext *context) bool should_stop = true; LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS); - m_hit_count++; + IncrementHitCount(); if (!IsEnabled()) return false; - if (m_hit_count <= GetIgnoreCount()) + if (GetHitCount() <= GetIgnoreCount()) return false; // We only run synchronous callbacks in ShouldStop: diff --git a/lldb/source/Breakpoint/BreakpointSite.cpp b/lldb/source/Breakpoint/BreakpointSite.cpp index 40489c86ab85..962117c27dfa 100644 --- a/lldb/source/Breakpoint/BreakpointSite.cpp +++ b/lldb/source/Breakpoint/BreakpointSite.cpp @@ -61,7 +61,7 @@ BreakpointSite::GetNextID() bool BreakpointSite::ShouldStop (StoppointCallbackContext *context) { - m_hit_count++; + IncrementHitCount(); return m_owners.ShouldStop (context); } diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp index e9b314b24aca..f33ec72f962d 100644 --- a/lldb/source/Breakpoint/Watchpoint.cpp +++ b/lldb/source/Breakpoint/Watchpoint.cpp @@ -66,7 +66,8 @@ Watchpoint::SetDeclInfo (std::string &str) return; } - +// Override default impl of StoppointLocation::IsHardware() since m_is_hardware +// member field is more accurate. bool Watchpoint::IsHardware () const { @@ -79,12 +80,12 @@ Watchpoint::IsHardware () const bool Watchpoint::ShouldStop (StoppointCallbackContext *context) { - ++m_hit_count; + IncrementHitCount(); if (!IsEnabled()) return false; - if (m_hit_count <= GetIgnoreCount()) + if (GetHitCount() <= GetIgnoreCount()) return false; return true;