[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@bennani.ma>