|
LLDB mainline
|
Describes what view of the process a thread should see and what operations it is allowed to perform. More...
#include <Policy.h>
Classes | |
| struct | Capabilities |
| What operations this thread is allowed to perform. More... | |
Public Types | |
| enum class | View { Public , Private } |
| What view of the process this thread sees. More... | |
Public Member Functions | |
| void | Dump (Stream &s) const |
Static Public Member Functions | |
| static Policy | PublicState () |
| static Policy | PrivateState () |
| static Policy | PublicStateRunningExpression () |
Public Attributes | |
| View | view = View::Public |
| Capabilities | capabilities |
Describes what view of the process a thread should see and what operations it is allowed to perform.
This replaces ad-hoc checks like CurrentThreadIsPrivateStateThread() with a unified, composable mechanism. Code consults the current policy on the per-thread PolicyStack instead of comparing host thread identities.
One motivating case is frame providers, which layer a public illusion on top of the private unwinder stack. The private state thread must see the raw unwinder frames, while public clients see the augmented view. Rather than checking thread identity at every callsite, the private state thread pushes Policy::PrivateState() and the rest follows from the policy.
|
strong |
| void Policy::Dump | ( | Stream & | s | ) | const |
Definition at line 27 of file Policy.cpp.
References capabilities, Public, and view.
Referenced by lldb_private::PolicyStack::Current().
|
inlinestatic |
Definition at line 59 of file Policy.h.
References lldb_private::Policy::Capabilities::can_load_frame_providers, lldb_private::Policy::Capabilities::can_run_frame_recognizers, capabilities, Private, and view.
Referenced by lldb_private::Process::RunPrivateStateThread(), lldb_private::Process::RunThreadPlan(), lldb_private::StopInfoBreakpoint::ShouldStopSynchronous(), and lldb_private::StopInfoWatchpoint::ShouldStopSynchronous().
|
inlinestatic |
Definition at line 67 of file Policy.h.
References lldb_private::Policy::Capabilities::can_run_breakpoint_actions, and capabilities.
| Capabilities lldb_private::Policy::capabilities |
Definition at line 55 of file Policy.h.
Referenced by Dump(), lldb_private::StopInfoBreakpoint::PerformAction(), lldb_private::StopInfoWatchpoint::PerformAction(), PrivateState(), and PublicStateRunningExpression().
| View lldb_private::Policy::view = View::Public |
Definition at line 54 of file Policy.h.
Referenced by Dump(), lldb_private::Target::GetAPIMutex(), lldb_private::Process::PrivateStateThread::GetRunLock(), lldb_private::Thread::GetStackFrameList(), lldb_private::Process::GetState(), PrivateState(), and lldb_private::StackFrameList::SelectMostRelevantFrame().