LLDB mainline
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::ThreadPlanStack Class Reference

#include <ThreadPlanStack.h>

Public Types

using PlanStack = std::vector< lldb::ThreadPlanSP >
 

Public Member Functions

 ThreadPlanStack (const Thread &thread, bool make_empty=false)
 
 ~ThreadPlanStack ()=default
 
void DumpThreadPlans (Stream &s, lldb::DescriptionLevel desc_level, bool include_internal) const
 
size_t CheckpointCompletedPlans ()
 
void RestoreCompletedPlanCheckpoint (size_t checkpoint)
 
void DiscardCompletedPlanCheckpoint (size_t checkpoint)
 
void ThreadDestroyed (Thread *thread)
 
void PushPlan (lldb::ThreadPlanSP new_plan_sp)
 
lldb::ThreadPlanSP PopPlan ()
 
lldb::ThreadPlanSP DiscardPlan ()
 
void DiscardPlansUpToPlan (ThreadPlan *up_to_plan_ptr)
 
void DiscardAllPlans ()
 
void DiscardConsultingControllingPlans ()
 
lldb::ThreadPlanSP GetCurrentPlan () const
 
lldb::ThreadPlanSP GetCompletedPlan (bool skip_private=true) const
 
lldb::ThreadPlanSP GetPlanByIndex (uint32_t plan_idx, bool skip_private=true) const
 
lldb::ValueObjectSP GetReturnValueObject () const
 
lldb::ExpressionVariableSP GetExpressionVariable () const
 
bool AnyPlans () const
 
bool AnyCompletedPlans () const
 
bool AnyDiscardedPlans () const
 
bool IsPlanDone (ThreadPlan *plan) const
 
bool WasPlanDiscarded (ThreadPlan *plan) const
 
ThreadPlanGetPreviousPlan (ThreadPlan *current_plan) const
 
ThreadPlanGetInnermostExpression () const
 
void WillResume ()
 
void ClearThreadCache ()
 Clear the Thread* cache that each ThreadPlan contains.
 

Private Member Functions

void PrintOneStack (Stream &s, llvm::StringRef stack_name, const PlanStack &stack, lldb::DescriptionLevel desc_level, bool include_internal) const
 

Private Attributes

PlanStack m_plans
 The stack of plans this thread is executing.
 
PlanStack m_completed_plans
 Plans that have been completed by this stop.
 
PlanStack m_discarded_plans
 Plans that have been discarded by this stop.
 
size_t m_completed_plan_checkpoint = 0
 
std::unordered_map< size_t, PlanStackm_completed_plan_store
 
std::recursive_mutex m_stack_mutex
 

Friends

class lldb_private::Thread
 

Detailed Description

Definition at line 31 of file ThreadPlanStack.h.

Member Typedef Documentation

◆ PlanStack

Definition at line 38 of file ThreadPlanStack.h.

Constructor & Destructor Documentation

◆ ThreadPlanStack()

ThreadPlanStack::ThreadPlanStack ( const Thread thread,
bool  make_empty = false 
)

Definition at line 30 of file ThreadPlanStack.cpp.

References m_plans.

◆ ~ThreadPlanStack()

lldb_private::ThreadPlanStack::~ThreadPlanStack ( )
default

Member Function Documentation

◆ AnyCompletedPlans()

bool ThreadPlanStack::AnyCompletedPlans ( ) const

◆ AnyDiscardedPlans()

bool ThreadPlanStack::AnyDiscardedPlans ( ) const

◆ AnyPlans()

bool ThreadPlanStack::AnyPlans ( ) const

◆ CheckpointCompletedPlans()

size_t ThreadPlanStack::CheckpointCompletedPlans ( )

◆ ClearThreadCache()

void ThreadPlanStack::ClearThreadCache ( )

Clear the Thread* cache that each ThreadPlan contains.

This is useful in situations like when a new Thread list is being generated.

Definition at line 387 of file ThreadPlanStack.cpp.

References m_plans, and m_stack_mutex.

◆ DiscardAllPlans()

void ThreadPlanStack::DiscardAllPlans ( )

Definition at line 207 of file ThreadPlanStack.cpp.

References DiscardPlan(), m_plans, and m_stack_mutex.

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

◆ DiscardCompletedPlanCheckpoint()

void ThreadPlanStack::DiscardCompletedPlanCheckpoint ( size_t  checkpoint)

Definition at line 101 of file ThreadPlanStack.cpp.

References m_completed_plan_store, and m_stack_mutex.

◆ DiscardConsultingControllingPlans()

void ThreadPlanStack::DiscardConsultingControllingPlans ( )

Definition at line 215 of file ThreadPlanStack.cpp.

References DiscardPlan(), m_plans, and m_stack_mutex.

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

◆ DiscardPlan()

lldb::ThreadPlanSP ThreadPlanStack::DiscardPlan ( )

◆ DiscardPlansUpToPlan()

void ThreadPlanStack::DiscardPlansUpToPlan ( ThreadPlan up_to_plan_ptr)

◆ DumpThreadPlans()

void ThreadPlanStack::DumpThreadPlans ( Stream s,
lldb::DescriptionLevel  desc_level,
bool  include_internal 
) const

◆ GetCompletedPlan()

lldb::ThreadPlanSP ThreadPlanStack::GetCompletedPlan ( bool  skip_private = true) const

◆ GetCurrentPlan()

lldb::ThreadPlanSP ThreadPlanStack::GetCurrentPlan ( ) const

◆ GetExpressionVariable()

lldb::ExpressionVariableSP ThreadPlanStack::GetExpressionVariable ( ) const

Definition at line 301 of file ThreadPlanStack.cpp.

References m_completed_plans, and m_stack_mutex.

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

◆ GetInnermostExpression()

ThreadPlan * ThreadPlanStack::GetInnermostExpression ( ) const

◆ GetPlanByIndex()

lldb::ThreadPlanSP ThreadPlanStack::GetPlanByIndex ( uint32_t  plan_idx,
bool  skip_private = true 
) const

◆ GetPreviousPlan()

ThreadPlan * ThreadPlanStack::GetPreviousPlan ( ThreadPlan current_plan) const

◆ GetReturnValueObject()

lldb::ValueObjectSP ThreadPlanStack::GetReturnValueObject ( ) const

Definition at line 287 of file ThreadPlanStack.cpp.

References m_completed_plans, and m_stack_mutex.

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

◆ IsPlanDone()

bool ThreadPlanStack::IsPlanDone ( ThreadPlan plan) const

Definition at line 330 of file ThreadPlanStack.cpp.

References m_completed_plans, and m_stack_mutex.

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

◆ PopPlan()

lldb::ThreadPlanSP ThreadPlanStack::PopPlan ( )

Definition at line 149 of file ThreadPlanStack.cpp.

References m_completed_plans, m_plans, and m_stack_mutex.

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

◆ PrintOneStack()

void ThreadPlanStack::PrintOneStack ( Stream s,
llvm::StringRef  stack_name,
const PlanStack stack,
lldb::DescriptionLevel  desc_level,
bool  include_internal 
) const
private

Definition at line 52 of file ThreadPlanStack.cpp.

References lldb_private::Stream::Indent(), m_stack_mutex, and PrintPlanElement().

Referenced by DumpThreadPlans().

◆ PushPlan()

void ThreadPlanStack::PushPlan ( lldb::ThreadPlanSP  new_plan_sp)

Definition at line 133 of file ThreadPlanStack.cpp.

References m_plans, and m_stack_mutex.

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

◆ RestoreCompletedPlanCheckpoint()

void ThreadPlanStack::RestoreCompletedPlanCheckpoint ( size_t  checkpoint)

◆ ThreadDestroyed()

void ThreadPlanStack::ThreadDestroyed ( Thread thread)

Definition at line 106 of file ThreadPlanStack.cpp.

References m_completed_plans, m_discarded_plans, m_plans, and m_stack_mutex.

◆ WasPlanDiscarded()

bool ThreadPlanStack::WasPlanDiscarded ( ThreadPlan plan) const

Definition at line 339 of file ThreadPlanStack.cpp.

References m_discarded_plans, and m_stack_mutex.

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

◆ WillResume()

void ThreadPlanStack::WillResume ( )

Friends And Related Function Documentation

◆ lldb_private::Thread

friend class lldb_private::Thread
friend

Definition at line 32 of file ThreadPlanStack.h.

Member Data Documentation

◆ m_completed_plan_checkpoint

size_t lldb_private::ThreadPlanStack::m_completed_plan_checkpoint = 0
private

Definition at line 110 of file ThreadPlanStack.h.

Referenced by CheckpointCompletedPlans().

◆ m_completed_plan_store

std::unordered_map<size_t, PlanStack> lldb_private::ThreadPlanStack::m_completed_plan_store
private

◆ m_completed_plans

PlanStack lldb_private::ThreadPlanStack::m_completed_plans
private

◆ m_discarded_plans

PlanStack lldb_private::ThreadPlanStack::m_discarded_plans
private

Plans that have been discarded by this stop.

They get deleted when the thread resumes.

Definition at line 107 of file ThreadPlanStack.h.

Referenced by AnyDiscardedPlans(), DiscardPlan(), DumpThreadPlans(), ThreadDestroyed(), WasPlanDiscarded(), and WillResume().

◆ m_plans

PlanStack lldb_private::ThreadPlanStack::m_plans
private

◆ m_stack_mutex

std::recursive_mutex lldb_private::ThreadPlanStack::m_stack_mutex
mutableprivate

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