Author: mohit.bhakkad Date: Tue Nov 3 03:04:33 2015 New Revision: 251905 URL: http://llvm.org/viewvc/llvm-project?rev=251905&view=rev Log: [LLDB][Watchpoint] Change ignore_count condition location to fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before
Reviewers: jingham. Subscribers: clayborg, jaydeep, bhushan, sagar, nitesh.jain, lldb-commits. Differential Revision: http://reviews.llvm.org/D13296 Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp lldb/trunk/source/Target/StopInfo.cpp Modified: lldb/trunk/source/Breakpoint/Watchpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Watchpoint.cpp?rev=251905&r1=251904&r2=251905&view=diff ============================================================================== --- lldb/trunk/source/Breakpoint/Watchpoint.cpp (original) +++ lldb/trunk/source/Breakpoint/Watchpoint.cpp Tue Nov 3 03:04:33 2015 @@ -183,9 +183,6 @@ Watchpoint::ShouldStop (StoppointCallbac if (!IsEnabled()) return false; - if (GetHitCount() <= GetIgnoreCount()) - return false; - return true; } Modified: lldb/trunk/source/Target/StopInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StopInfo.cpp?rev=251905&r1=251904&r2=251905&view=diff ============================================================================== --- lldb/trunk/source/Target/StopInfo.cpp (original) +++ lldb/trunk/source/Target/StopInfo.cpp Tue Nov 3 03:04:33 2015 @@ -759,6 +759,16 @@ protected: } } + // TODO: This condition should be checked in the synchronous part of the watchpoint code + // (Watchpoint::ShouldStop), so that we avoid pulling an event even if the watchpoint fails + // the ignore count condition. It is moved here temporarily, because for archs with + // watchpoint_exceptions_received=before, the code in the previous lines takes care of moving + // the inferior to next PC. We have to check the ignore count condition after this is done, + // otherwise we will hit same watchpoint multiple times until we pass ignore condition, but we + // won't actually be ignoring them. + if (wp_sp->GetHitCount() <= wp_sp->GetIgnoreCount()) + m_should_stop = false; + if (m_should_stop && wp_sp->GetConditionText() != NULL) { // We need to make sure the user sees any parse errors in their condition, so we'll hook the _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits