[all-commits] [llvm/llvm-project] cc27a2: [lldb] Push ExpressionEvaluation policy and remove...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Tue Jul 7 17:56:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc27a240be812f854801c24aefbea1243c5efde8
      https://github.com/llvm/llvm-project/commit/cc27a240be812f854801c24aefbea1243c5efde8
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2026-07-08 (Wed, 08 Jul 2026)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/Utility/Policy.h
    M lldb/source/Expression/FunctionCaller.cpp
    M lldb/source/Expression/IRInterpreter.cpp
    M lldb/source/Expression/LLVMUserExpression.cpp
    M lldb/source/Target/Process.cpp
    M lldb/source/Target/StackFrameList.cpp
    M lldb/source/Target/StopInfo.cpp
    M lldb/source/Target/Target.cpp
    M lldb/source/Target/Thread.cpp
    M lldb/source/Utility/Policy.cpp
    M lldb/unittests/Utility/PolicyTest.cpp

  Log Message:
  -----------
  [lldb] Push ExpressionEvaluation policy and remove identity check fallbacks (#195775)

Push `PolicyStack::Get().PushPublicStateRunningExpression()` at all
three expression evaluation entry points
(`LLVMUserExpression::DoExecute`, `FunctionCaller::ExecuteFunction`,
`IRInterpreter`). This policy sets `can_run_breakpoint_actions=false`,
preventing recursive breakpoint callback execution during expression
eval.

Push `PolicyStack::Get().PushPrivateState()` unconditionally for all
PSTs in `RunPrivateStateThread` (not just overrides), giving every PST
the private view while keeping frame providers and recognizers enabled
for normal stop processing. Override PSTs use
`PushPrivateStateRunningExpression()` which additionally disables
providers and recognizers.

With all PSTs and expression eval sites now covered by the policy,
remove all host thread identity check fallbacks:
  - `CurrentThreadPosesAsPrivateStateThread()` in `Process::GetState()`
  - `CurrentThreadIsPrivateStateThread()` in `Target::GetAPIMutex()`
  - `IsOnThread()` in `PrivateStateThread::GetRunLock()`
- `CurrentThreadPosesAsPrivateStateThread()` in
`SelectMostRelevantFrame()`
  - `IsRunningExpression()` in `StopInfoBreakpoint::PerformAction()`

`SelectMostRelevantFrame` now checks `!can_run_frame_recognizers`
instead of `View::Private`, so recognizers run during normal PST stop
processing but are skipped during expression evaluation.

----

The following PRs are related to the Policy feature:
- #195762
- #195771
- #198897
- #195774
- #195775

rdar://176223894

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list