diff --git a/lldb/include/lldb/Breakpoint/Watchpoint.h b/lldb/include/lldb/Breakpoint/Watchpoint.h --- a/lldb/include/lldb/Breakpoint/Watchpoint.h +++ b/lldb/include/lldb/Breakpoint/Watchpoint.h @@ -63,8 +63,6 @@ ~Watchpoint() override; - void IncrementFalseAlarmsAndReviseHitCount(); - bool IsEnabled() const; // This doesn't really enable/disable the watchpoint. It is currently just @@ -214,12 +212,8 @@ // again, we check the count, if it is more than 1, it means the user- // supplied actions actually want the watchpoint to be disabled! uint32_t m_watch_read : 1, // 1 if we stop when the watched data is read from - m_watch_write : 1, // 1 if we stop when the watched data is written to - m_watch_was_read : 1, // Set to 1 when watchpoint is hit for a read access - m_watch_was_written : 1; // Set to 1 when watchpoint is hit for a write - // access + m_watch_write : 1; // 1 if we stop when the watched data is written to uint32_t m_ignore_count; // Number of times to ignore this watchpoint - uint32_t m_false_alarms; // Number of false alarms. std::string m_decl_str; // Declaration information, if any. std::string m_watch_spec_str; // Spec for the watchpoint. lldb::ValueObjectSP m_old_value_sp; diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp --- a/lldb/source/Breakpoint/Watchpoint.cpp +++ b/lldb/source/Breakpoint/Watchpoint.cpp @@ -29,8 +29,7 @@ : StoppointSite(0, addr, size, hardware), m_target(target), m_enabled(false), m_is_hardware(hardware), m_is_watch_variable(false), m_is_ephemeral(false), m_disabled_count(0), m_watch_read(0), - m_watch_write(0), m_watch_was_read(0), m_watch_was_written(0), - m_ignore_count(0), m_false_alarms(0), m_being_created(true) { + m_watch_write(0), m_ignore_count(0), m_being_created(true) { if (type && type->IsValid()) m_type = *type; @@ -212,19 +211,6 @@ return (m_new_value_sp && m_new_value_sp->GetError().Success()); } -void Watchpoint::IncrementFalseAlarmsAndReviseHitCount() { - ++m_false_alarms; - if (m_false_alarms) { - if (m_hit_counter.GetValue() >= m_false_alarms) { - m_hit_counter.Decrement(m_false_alarms); - m_false_alarms = 0; - } else { - m_false_alarms -= m_hit_counter.GetValue(); - m_hit_counter.Reset(); - } - } -} - // RETURNS - true if we should stop at this breakpoint, false if we // should continue. diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -894,7 +894,7 @@ if (m_silently_skip_wp) { m_should_stop = false; - wp_sp->IncrementFalseAlarmsAndReviseHitCount(); + wp_sp->UndoHitCount(); } if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount()) {