[Lldb-commits] [PATCH] D146337: Partially fix stepping over watchpoints on "watch triggers before" systems

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 17 16:14:14 PDT 2023


jingham created this revision.
jingham added reviewers: jasonmolenda, JDevlieghere.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

There were (at least) two problems that were causing TestStepOverWatchpoints.py to fail on arm64 Darwin systems.  The first was that the "step over the watch instruction" plan that we pushed so we could report the watch stop when we knew the "old and new" values was a utility plan that wouldn't cause a user stop when it was done, and so instead of reporting the watchpoint we just continued on with the step.

The second one may be specific to Darwin systems, but when you single-step the processor over an instruction that raises the watchpoint, when we stop the stop reason is Trace and not Watchpoint.  That not lldb's interpretation, that what the exception we get from the kernel says.

I don't have a good way to work around the second one yet, but I this patch fixes the first problem, and reworks the test so that we have a case that doesn't end up single-stepping over the instruction that triggers the watchpoint - which now succeeds on Darwin - and one that tests single-stepping over that instruction which still fails.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146337

Files:
  lldb/source/Target/StopInfo.cpp
  lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
  lldb/test/API/commands/watchpoints/step_over_watchpoint/main.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146337.506219.patch
Type: text/x-patch
Size: 5148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230317/37422645/attachment-0001.bin>


More information about the lldb-commits mailing list