[all-commits] [llvm/llvm-project] 8d024a: Fix a problem with "watchpoint triggers before" wa...

jimingham via All-commits all-commits at lists.llvm.org
Mon Mar 20 15:17:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d024a79ea783ed3fbb5691aeaf186ad3f0a4ae9
      https://github.com/llvm/llvm-project/commit/8d024a79ea783ed3fbb5691aeaf186ad3f0a4ae9
  Author: Jim Ingham <jingham at apple.com>
  Date:   2023-03-20 (Mon, 20 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
    M lldb/source/Target/StopInfo.cpp
    M lldb/source/Target/Thread.cpp
    M lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
    M lldb/test/API/commands/watchpoints/step_over_watchpoint/main.c

  Log Message:
  -----------
  Fix a problem with "watchpoint triggers before" watchpoint handling.

We need to step the watchpoint instruction in these cases, but the
when we queued the ThreadPlanStepOverWatchpoint to do this, we didn't
make it a Controlling plan.  So if you are stepping, this plan returns as
though it were a utility plan, and the stepping plan keeps going.

This only partially fixes the problem on Darwin; there's another bug
with reporting a watchpoint when we're instruction single stepping over
an instruction that triggers a watchpoint.  The kernel reports the
"single step completed" but not the watchpoint hit.  So this commit
also refactors the test into a part that works (at least on Darwin) and
a part that still fails.

We may have to adjust the test result expectations for other systems after
this fix.

Differential Revision: https://reviews.llvm.org/D146337




More information about the All-commits mailing list