LLDB mainline
|
#include <ThreadPlanStack.h>
Public Types | |
using | PlanStack = std::vector< lldb::ThreadPlanSP > |
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, PlanStack > | m_completed_plan_store |
std::recursive_mutex | m_stack_mutex |
Friends | |
class | lldb_private::Thread |
Definition at line 31 of file ThreadPlanStack.h.
using lldb_private::ThreadPlanStack::PlanStack = std::vector<lldb::ThreadPlanSP> |
Definition at line 38 of file ThreadPlanStack.h.
ThreadPlanStack::ThreadPlanStack | ( | const Thread & | thread, |
bool | make_empty = false |
||
) |
Definition at line 30 of file ThreadPlanStack.cpp.
References m_plans.
|
default |
bool ThreadPlanStack::AnyCompletedPlans | ( | ) | const |
Definition at line 320 of file ThreadPlanStack.cpp.
References m_completed_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::CompletedPlanOverridesBreakpoint(), and lldb_private::ThreadPlanStackMap::DumpPlansForTID().
bool ThreadPlanStack::AnyDiscardedPlans | ( | ) | const |
Definition at line 325 of file ThreadPlanStack.cpp.
References m_discarded_plans, and m_stack_mutex.
Referenced by lldb_private::ThreadPlanStackMap::DumpPlansForTID().
bool ThreadPlanStack::AnyPlans | ( | ) | const |
Definition at line 314 of file ThreadPlanStack.cpp.
References m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::AutoCompleteThreadPlans(), and lldb_private::ThreadPlanStackMap::DumpPlansForTID().
size_t ThreadPlanStack::CheckpointCompletedPlans | ( | ) |
Definition at line 84 of file ThreadPlanStack.cpp.
References m_completed_plan_checkpoint, m_completed_plan_store, m_completed_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::CheckpointThreadState().
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.
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().
void ThreadPlanStack::DiscardCompletedPlanCheckpoint | ( | size_t | checkpoint | ) |
Definition at line 101 of file ThreadPlanStack.cpp.
References m_completed_plan_store, and m_stack_mutex.
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().
lldb::ThreadPlanSP ThreadPlanStack::DiscardPlan | ( | ) |
Definition at line 163 of file ThreadPlanStack.cpp.
References m_discarded_plans, m_plans, and m_stack_mutex.
Referenced by DiscardAllPlans(), DiscardConsultingControllingPlans(), lldb_private::Thread::DiscardPlan(), and DiscardPlansUpToPlan().
void ThreadPlanStack::DiscardPlansUpToPlan | ( | ThreadPlan * | up_to_plan_ptr | ) |
Definition at line 179 of file ThreadPlanStack.cpp.
References DiscardPlan(), GetCurrentPlan(), m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::DiscardThreadPlansUpToPlan().
void ThreadPlanStack::DumpThreadPlans | ( | Stream & | s, |
lldb::DescriptionLevel | desc_level, | ||
bool | include_internal | ||
) | const |
Definition at line 39 of file ThreadPlanStack.cpp.
References lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_completed_plans, m_discarded_plans, m_plans, m_stack_mutex, and PrintOneStack().
Referenced by lldb_private::ThreadPlanStackMap::DumpPlansForTID().
lldb::ThreadPlanSP ThreadPlanStack::GetCompletedPlan | ( | bool | skip_private = true | ) | const |
Definition at line 255 of file ThreadPlanStack.cpp.
References m_completed_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::GetCompletedPlan(), lldb_private::Thread::ShouldReportRun(), and lldb_private::Thread::ShouldReportStop().
lldb::ThreadPlanSP ThreadPlanStack::GetCurrentPlan | ( | ) | const |
Definition at line 249 of file ThreadPlanStack.cpp.
References m_plans, and m_stack_mutex.
Referenced by DiscardPlansUpToPlan(), lldb_private::Thread::GetCurrentPlan(), and GetPreviousPlan().
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().
ThreadPlan * ThreadPlanStack::GetInnermostExpression | ( | ) | const |
Definition at line 376 of file ThreadPlanStack.cpp.
References lldb_private::ThreadPlan::eKindCallFunction, GetKind(), m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::UnwindInnermostExpression().
lldb::ThreadPlanSP ThreadPlanStack::GetPlanByIndex | ( | uint32_t | plan_idx, |
bool | skip_private = true |
||
) | const |
Definition at line 272 of file ThreadPlanStack.cpp.
References m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::AutoCompleteThreadPlans(), and lldb_private::Thread::DiscardUserThreadPlansUpToIndex().
ThreadPlan * ThreadPlanStack::GetPreviousPlan | ( | ThreadPlan * | current_plan | ) | const |
Definition at line 348 of file ThreadPlanStack.cpp.
References GetCurrentPlan(), m_completed_plans, m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::GetPreviousPlan().
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().
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().
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().
|
private |
Definition at line 52 of file ThreadPlanStack.cpp.
References lldb_private::Stream::Indent(), m_stack_mutex, and PrintPlanElement().
Referenced by DumpThreadPlans().
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().
void ThreadPlanStack::RestoreCompletedPlanCheckpoint | ( | size_t | checkpoint | ) |
Definition at line 92 of file ThreadPlanStack.cpp.
References m_completed_plan_store, m_completed_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::RestoreThreadStateFromCheckpoint().
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.
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().
void ThreadPlanStack::WillResume | ( | ) |
Definition at line 393 of file ThreadPlanStack.cpp.
References m_completed_plans, m_discarded_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::ShouldResume().
|
friend |
Definition at line 32 of file ThreadPlanStack.h.
|
private |
Definition at line 110 of file ThreadPlanStack.h.
Referenced by CheckpointCompletedPlans().
|
private |
Definition at line 112 of file ThreadPlanStack.h.
Referenced by CheckpointCompletedPlans(), DiscardCompletedPlanCheckpoint(), and RestoreCompletedPlanCheckpoint().
|
private |
Plans that have been completed by this stop.
They get deleted when the thread resumes.
Definition at line 104 of file ThreadPlanStack.h.
Referenced by AnyCompletedPlans(), CheckpointCompletedPlans(), DumpThreadPlans(), GetCompletedPlan(), GetExpressionVariable(), GetPreviousPlan(), GetReturnValueObject(), IsPlanDone(), PopPlan(), RestoreCompletedPlanCheckpoint(), ThreadDestroyed(), and WillResume().
|
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().
|
private |
The stack of plans this thread is executing.
Definition at line 103 of file ThreadPlanStack.h.
Referenced by AnyPlans(), ClearThreadCache(), DiscardAllPlans(), DiscardConsultingControllingPlans(), DiscardPlan(), DiscardPlansUpToPlan(), DumpThreadPlans(), GetCurrentPlan(), GetInnermostExpression(), GetPlanByIndex(), GetPreviousPlan(), PopPlan(), PushPlan(), ThreadDestroyed(), and ThreadPlanStack().
|
mutableprivate |
Definition at line 113 of file ThreadPlanStack.h.
Referenced by AnyCompletedPlans(), AnyDiscardedPlans(), AnyPlans(), CheckpointCompletedPlans(), ClearThreadCache(), DiscardAllPlans(), DiscardCompletedPlanCheckpoint(), DiscardConsultingControllingPlans(), DiscardPlan(), DiscardPlansUpToPlan(), DumpThreadPlans(), GetCompletedPlan(), GetCurrentPlan(), GetExpressionVariable(), GetInnermostExpression(), GetPlanByIndex(), GetPreviousPlan(), GetReturnValueObject(), IsPlanDone(), PopPlan(), PrintOneStack(), PushPlan(), RestoreCompletedPlanCheckpoint(), ThreadDestroyed(), WasPlanDiscarded(), and WillResume().