[Lldb-commits] [PATCH] D14472: Fix TestThreadSpecificBreakpoint.py on Linux after rL252355.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 6 18:07:14 PST 2015


chaoren created this revision.
chaoren added reviewers: sivachandra, jingham.
chaoren added a subscriber: lldb-commits.

On Linux, if a thread-specific conditional breakpoint was hit, it
won't necessarily be the thread that hit the breakpoint itself that
evaluates the conditional expression, so the thread that hit the
breakpoint could still be asked to stop, even though it hasn't been
allowed to run since the previous stop.

http://reviews.llvm.org/D14472

Files:
  source/Target/ThreadList.cpp

Index: source/Target/ThreadList.cpp
===================================================================
--- source/Target/ThreadList.cpp
+++ source/Target/ThreadList.cpp
@@ -262,7 +262,11 @@
             // This is an optimization...  If we didn't let a thread run in between the previous stop and this
             // one, we shouldn't have to consult it for ShouldStop.  So just leave it off the list we are going to
             // inspect.
-            if (thread_sp->GetTemporaryResumeState () != eStateSuspended)
+            // On Linux, if a thread-specific conditional breakpoint was hit, it won't necessarily be the thread
+            // that hit the breakpoint itself that evaluates the conditional expression, so the thread that hit
+            // the breakpoint could still be asked to stop, even though it hasn't been allowed to run since the
+            // previous stop.
+            if (thread_sp->GetTemporaryResumeState () != eStateSuspended || thread_sp->IsStillAtLastBreakpointHit())
                 threads_copy.push_back(thread_sp);
         }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14472.39615.patch
Type: text/x-patch
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151107/ded3d8a8/attachment.bin>


More information about the lldb-commits mailing list