summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r--lldb/source/Core/ValueObject.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 503b9dfd66f..1d40eab25a0 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -198,7 +198,7 @@ ValueObject::UpdateValueIfNeeded (bool update_format)
bool first_update = IsChecksumEmpty();
- if (m_update_point.NeedsUpdating())
+ if (NeedsUpdating())
{
m_update_point.SetUpdated();
@@ -3952,9 +3952,8 @@ ValueObject::EvaluationPoint::~EvaluationPoint ()
// exe_scope will be set to the current execution context scope.
bool
-ValueObject::EvaluationPoint::SyncWithProcessState()
+ValueObject::EvaluationPoint::SyncWithProcessState(bool accept_invalid_exe_ctx)
{
-
// Start with the target, if it is NULL, then we're obviously not going to get any further:
const bool thread_and_frame_only_if_stopped = true;
ExecutionContext exe_ctx(m_exe_ctx_ref.Lock(thread_and_frame_only_if_stopped));
@@ -3997,30 +3996,33 @@ ValueObject::EvaluationPoint::SyncWithProcessState()
// That way we'll be sure to return a valid exe_scope.
// If we used to have a thread or a frame but can't find it anymore, then mark ourselves as invalid.
- if (m_exe_ctx_ref.HasThreadRef())
+ if (!accept_invalid_exe_ctx)
{
- ThreadSP thread_sp (m_exe_ctx_ref.GetThreadSP());
- if (thread_sp)
+ if (m_exe_ctx_ref.HasThreadRef())
{
- if (m_exe_ctx_ref.HasFrameRef())
+ ThreadSP thread_sp (m_exe_ctx_ref.GetThreadSP());
+ if (thread_sp)
{
- StackFrameSP frame_sp (m_exe_ctx_ref.GetFrameSP());
- if (!frame_sp)
+ if (m_exe_ctx_ref.HasFrameRef())
{
- // We used to have a frame, but now it is gone
- SetInvalid();
- changed = was_valid;
+ StackFrameSP frame_sp (m_exe_ctx_ref.GetFrameSP());
+ if (!frame_sp)
+ {
+ // We used to have a frame, but now it is gone
+ SetInvalid();
+ changed = was_valid;
+ }
}
}
+ else
+ {
+ // We used to have a thread, but now it is gone
+ SetInvalid();
+ changed = was_valid;
+ }
}
- else
- {
- // We used to have a thread, but now it is gone
- SetInvalid();
- changed = was_valid;
- }
-
}
+
return changed;
}
OpenPOWER on IntegriCloud