[Lldb-commits] [PATCH] D103217: Make ignore counts work as "after stop" modifiers so they play nicely with conditions

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 26 17:24:21 PDT 2021


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

Previously ignore counts were checked when we stopped to do the sync callback in Breakpoint::ShouldStop.  That meant we would do all the ignore count work even when there is also a condition says the breakpoint should not stop.

That's wrong, lldb treats breakpoint hits that fail the thread or condition checks as "not having hit the breakpoint".  So the ignore count check should happen after the condition and thread checks in StopInfoBreakpoint::PerformAction.

The one side-effect of doing this is that if you have a breakpoint with a synchronous callback, it will run the synchronous callback before checking the ignore count.  That is probably a good thing, since this was already true of the condition and thread checks, so this removes an odd asymmetry.  And breakpoints with sync callbacks are all internal lldb breakpoints and there's not a really good reason why you would want one of these to use an ignore count (but not a condition or thread check...)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103217

Files:
  lldb/include/lldb/Breakpoint/Breakpoint.h
  lldb/include/lldb/Breakpoint/BreakpointLocation.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Breakpoint/BreakpointLocation.cpp
  lldb/source/Target/StopInfo.cpp
  lldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
  lldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103217.348132.patch
Type: text/x-patch
Size: 9444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210527/512e2562/attachment-0001.bin>


More information about the lldb-commits mailing list