summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadPlan.cpp')
-rw-r--r--lldb/source/Target/ThreadPlan.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/lldb/source/Target/ThreadPlan.cpp b/lldb/source/Target/ThreadPlan.cpp
index d740879ae1d..bc0ce57f9fc 100644
--- a/lldb/source/Target/ThreadPlan.cpp
+++ b/lldb/source/Target/ThreadPlan.cpp
@@ -36,6 +36,7 @@ ThreadPlan::ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, Vo
m_kind (kind),
m_name (name),
m_plan_complete_mutex (Mutex::eMutexTypeRecursive),
+ m_cached_plan_explains_stop (eLazyBoolCalculate),
m_plan_complete (false),
m_plan_private (false),
m_okay_to_discard (true),
@@ -53,6 +54,21 @@ ThreadPlan::~ThreadPlan()
}
bool
+ThreadPlan::PlanExplainsStop (Event *event_ptr)
+{
+ if (m_cached_plan_explains_stop == eLazyBoolCalculate)
+ {
+ bool actual_value = DoPlanExplainsStop(event_ptr);
+ m_cached_plan_explains_stop = actual_value ? eLazyBoolYes : eLazyBoolNo;
+ return actual_value;
+ }
+ else
+ {
+ return m_cached_plan_explains_stop == eLazyBoolYes;
+ }
+}
+
+bool
ThreadPlan::IsPlanComplete ()
{
Mutex::Locker locker(m_plan_complete_mutex);
@@ -131,6 +147,8 @@ ThreadPlan::SetStopOthers (bool new_value)
bool
ThreadPlan::WillResume (StateType resume_state, bool current_plan)
{
+ m_cached_plan_explains_stop = eLazyBoolCalculate;
+
if (current_plan)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
@@ -154,7 +172,7 @@ ThreadPlan::WillResume (StateType resume_state, bool current_plan)
StopOthers());
}
}
- return true;
+ return DoWillResume (resume_state, current_plan);
}
lldb::user_id_t
OpenPOWER on IntegriCloud