[Lldb-commits] [PATCH] D128776: Handle a stop when another thread has hit a breakpoint with a failed condition

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 28 18:15:22 PDT 2022


jingham created this revision.
jingham added a reviewer: JDevlieghere.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Threads which hit a breakpoint but fail the condition are considered
not to be hit.  But another thread might be hit at the same time and
actually stop.  So we have to be sure to switch the first thread's
stop info to eStopReasonNone or we'll report a hit when the condition
failed, which is confusing.

I have a test for this, but it only tests the actual fix on systems that report 
multiple threads hitting breakpoints on a given stop.  Darwin 
behaves this way, and w/o this fix the test fails on the first stop.  But I give it 
20 tries so this is likely to test the condition on systems that report multiple
hits less frequently.  And for a system that serializes all stops, all this code is
moot anyway, and this is just testing breakpoint conditions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128776

Files:
  lldb/source/Target/StopInfo.cpp
  lldb/test/API/functionalities/breakpoint/two_hits_one_actual/Makefile
  lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
  lldb/test/API/functionalities/breakpoint/two_hits_one_actual/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128776.440820.patch
Type: text/x-patch
Size: 8019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220629/d790b1d7/attachment.bin>


More information about the lldb-commits mailing list