LLDB mainline
|
#include <ThreadPlanStack.h>
Public Types | |
using | PlanStack = std::vector< lldb::ThreadPlanSP > |
Private Member Functions | |
lldb::ThreadPlanSP | DiscardPlanNoLock () |
lldb::ThreadPlanSP | GetCurrentPlanNoLock () const |
void | PrintOneStackNoLock (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 |
llvm::sys::RWMutex | m_stack_mutex |
Friends | |
class | lldb_private::Thread |
Definition at line 33 of file ThreadPlanStack.h.
using lldb_private::ThreadPlanStack::PlanStack = std::vector<lldb::ThreadPlanSP> |
Definition at line 40 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 330 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 335 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 324 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 397 of file ThreadPlanStack.cpp.
References m_plans, and m_stack_mutex.
void ThreadPlanStack::DiscardAllPlans | ( | ) |
Definition at line 213 of file ThreadPlanStack.cpp.
References DiscardPlanNoLock(), 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 221 of file ThreadPlanStack.cpp.
References DiscardPlanNoLock(), m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::DiscardThreadPlans().
lldb::ThreadPlanSP ThreadPlanStack::DiscardPlan | ( | ) |
Definition at line 165 of file ThreadPlanStack.cpp.
References DiscardPlanNoLock(), and m_stack_mutex.
Referenced by lldb_private::Thread::DiscardPlan().
|
private |
Definition at line 170 of file ThreadPlanStack.cpp.
References m_discarded_plans, and m_plans.
Referenced by DiscardAllPlans(), DiscardConsultingControllingPlans(), DiscardPlan(), and DiscardPlansUpToPlan().
void ThreadPlanStack::DiscardPlansUpToPlan | ( | ThreadPlan * | up_to_plan_ptr | ) |
Definition at line 185 of file ThreadPlanStack.cpp.
References DiscardPlanNoLock(), GetCurrentPlanNoLock(), 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 PrintOneStackNoLock().
Referenced by lldb_private::ThreadPlanStackMap::DumpPlansForTID().
lldb::ThreadPlanSP ThreadPlanStack::GetCompletedPlan | ( | bool | skip_private = true | ) | const |
Definition at line 265 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 255 of file ThreadPlanStack.cpp.
References GetCurrentPlanNoLock(), and m_stack_mutex.
Referenced by lldb_private::Thread::GetCurrentPlan().
|
private |
Definition at line 260 of file ThreadPlanStack.cpp.
References m_plans.
Referenced by DiscardPlansUpToPlan(), GetCurrentPlan(), and GetPreviousPlan().
lldb::ExpressionVariableSP ThreadPlanStack::GetExpressionVariable | ( | ) | const |
Definition at line 311 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 386 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 282 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 358 of file ThreadPlanStack.cpp.
References GetCurrentPlanNoLock(), m_completed_plans, m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::GetPreviousPlan().
lldb::ValueObjectSP ThreadPlanStack::GetReturnValueObject | ( | ) | const |
Definition at line 297 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 340 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 151 of file ThreadPlanStack.cpp.
References m_completed_plans, m_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::PopPlan().
|
private |
Definition at line 53 of file ThreadPlanStack.cpp.
References lldb_private::Stream::Indent(), 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 349 of file ThreadPlanStack.cpp.
References m_discarded_plans, and m_stack_mutex.
Referenced by lldb_private::Thread::WasThreadPlanDiscarded().
void ThreadPlanStack::WillResume | ( | ) |
Definition at line 403 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 34 of file ThreadPlanStack.h.
|
private |
Definition at line 115 of file ThreadPlanStack.h.
Referenced by CheckpointCompletedPlans().
|
private |
Definition at line 117 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 109 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 112 of file ThreadPlanStack.h.
Referenced by AnyDiscardedPlans(), DiscardPlanNoLock(), DumpThreadPlans(), ThreadDestroyed(), WasPlanDiscarded(), and WillResume().
|
private |
The stack of plans this thread is executing.
Definition at line 108 of file ThreadPlanStack.h.
Referenced by AnyPlans(), ClearThreadCache(), DiscardAllPlans(), DiscardConsultingControllingPlans(), DiscardPlanNoLock(), DiscardPlansUpToPlan(), DumpThreadPlans(), GetCurrentPlanNoLock(), GetInnermostExpression(), GetPlanByIndex(), GetPreviousPlan(), PopPlan(), PushPlan(), ThreadDestroyed(), and ThreadPlanStack().
|
mutableprivate |
Definition at line 118 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(), PushPlan(), RestoreCompletedPlanCheckpoint(), ThreadDestroyed(), WasPlanDiscarded(), and WillResume().