LLDB mainline
lldb_private::PrivateStateThreadGuard Struct Reference

RAII guard that marks the current thread as a private state thread. More...

#include <Process.h>

Public Member Functions

 PrivateStateThreadGuard ()
 ~PrivateStateThreadGuard ()
 PrivateStateThreadGuard (const PrivateStateThreadGuard &)=delete
PrivateStateThreadGuardoperator= (const PrivateStateThreadGuard &)=delete

Static Public Member Functions

static bool IsPrivateStateThread ()

Static Private Attributes

static thread_local bool g_is_private_state_thread = false

Detailed Description

RAII guard that marks the current thread as a private state thread.

When RunThreadPlan detects it is running on the private state thread, it spins up an override thread and reassigns m_current_private_state_thread_sp to it. The original PST continues processing events via DoOnRemoval callbacks, but CurrentThreadIsPrivateStateThread() no longer recognizes it. This guard sets a thread_local flag so that GetStackFrameList can identify the original PST and return parent frames instead of provider-augmented frames.

Definition at line 3673 of file Process.h.

Constructor & Destructor Documentation

◆ PrivateStateThreadGuard() [1/2]

lldb_private::PrivateStateThreadGuard::PrivateStateThreadGuard ( )
inline

Definition at line 3674 of file Process.h.

References g_is_private_state_thread.

Referenced by operator=(), and PrivateStateThreadGuard().

◆ ~PrivateStateThreadGuard()

lldb_private::PrivateStateThreadGuard::~PrivateStateThreadGuard ( )
inline

Definition at line 3675 of file Process.h.

References g_is_private_state_thread.

◆ PrivateStateThreadGuard() [2/2]

lldb_private::PrivateStateThreadGuard::PrivateStateThreadGuard ( const PrivateStateThreadGuard & )
delete

Member Function Documentation

◆ IsPrivateStateThread()

bool lldb_private::PrivateStateThreadGuard::IsPrivateStateThread ( )
inlinestatic

Definition at line 3676 of file Process.h.

References g_is_private_state_thread.

Referenced by lldb_private::Thread::GetStackFrameList().

◆ operator=()

PrivateStateThreadGuard & lldb_private::PrivateStateThreadGuard::operator= ( const PrivateStateThreadGuard & )
delete

Member Data Documentation

◆ g_is_private_state_thread

thread_local bool PrivateStateThreadGuard::g_is_private_state_thread = false
staticprivate

The documentation for this struct was generated from the following files: