[Lldb-commits] [lldb] [lldb] Fix scripted frame provider cross-thread re-entrant deadlock (PR #208242)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 19 09:54:20 PDT 2026
================
@@ -37,6 +37,12 @@ class ScriptedInterface {
return m_scripted_metadata;
}
+ /// Whether the user can invoke this extension directly, the way a scripted
+ /// command can. Those never introduce the target's API mutex bypass, so at
+ /// top level they serialize like any other command; nested inside an
+ /// already-bypassed callback every extension inherits the ambient policy.
+ virtual bool UserCanRunDirectly() const { return false; }
----------------
medismailben wrote:
I originally implemented this "inverted" (`InternalCallback` and defaulting to true) but I felt like `UserCanRunDirectly` was easier to reason about. We've discussed this briefly with @jimingham offline and long term we might have to resolve what dynamically using the current execution context, but for now since we only have a single case of opt-out this seemed fine and we have other plugins that does something similar.
> can we extract the logic into a hermetic function that does both
Not sure what you mean by this ? Are you suggesting adding a method that perform the check AND push the policy if needed, and call that function from the various python entry-points ?
https://github.com/llvm/llvm-project/pull/208242
More information about the lldb-commits
mailing list