[all-commits] [llvm/llvm-project] 5778ad: Make hit point counts reliable for architectures t...

jimingham via All-commits all-commits at lists.llvm.org
Mon Jul 18 14:41:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5778ada8e54edb2bc2869505b88a959d1915c02f
      https://github.com/llvm/llvm-project/commit/5778ada8e54edb2bc2869505b88a959d1915c02f
  Author: Jim Ingham <jingham at apple.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M lldb/include/lldb/Breakpoint/Watchpoint.h
    M lldb/include/lldb/Target/StopInfo.h
    M lldb/source/Target/StopInfo.cpp
    M lldb/test/API/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
    M lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py

  Log Message:
  -----------
  Make hit point counts reliable for architectures that stop before evaluation.

Since we want to present the "new & old" values for watchpoint hits, on architectures,
including the ARM family, that stop before the triggering instruction is run, we need
to single step over the instruction before stopping for realz.  This was incorrectly
done directly in the StopInfoWatchpoint::ShouldStop.  That causes problems if more than
one thread stops "for a reason" at the same time as the watchpoint, since the other actions
didn't expect the process to make progress in this part of the execution control machinery.

The correct way to do this is to schedule the step over using ThreadPlans, and then to restore
the stop info after that plan stops, so that the rest of the stop info actions can happen when
all the other threads have handled their immediate actions as well.

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




More information about the All-commits mailing list