[Lldb-commits] [PATCH] D13296: [LLDB] Fix watchpoint ignore feature for architectures with watchpoint_exceptions_received=before

Mohit Bhakkad via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 3 01:07:05 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL251905: [LLDB][Watchpoint] Change ignore_count condition location to fix watchpoint… (authored by mohit.bhakkad).

Changed prior to commit:
  http://reviews.llvm.org/D13296?vs=36119&id=39035#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D13296

Files:
  lldb/trunk/source/Breakpoint/Watchpoint.cpp
  lldb/trunk/source/Target/StopInfo.cpp

Index: lldb/trunk/source/Breakpoint/Watchpoint.cpp
===================================================================
--- lldb/trunk/source/Breakpoint/Watchpoint.cpp
+++ lldb/trunk/source/Breakpoint/Watchpoint.cpp
@@ -183,9 +183,6 @@
     if (!IsEnabled())
         return false;
 
-    if (GetHitCount() <= GetIgnoreCount())
-        return false;
-
     return true;
 }
 
Index: lldb/trunk/source/Target/StopInfo.cpp
===================================================================
--- lldb/trunk/source/Target/StopInfo.cpp
+++ lldb/trunk/source/Target/StopInfo.cpp
@@ -759,6 +759,16 @@
                     }
                 }
 
+                // 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13296.39035.patch
Type: text/x-patch
Size: 1661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151103/42129ca1/attachment.bin>


More information about the lldb-commits mailing list