summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectChild.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-07-28 01:45:23 +0000
committerEnrico Granata <egranata@apple.com>2015-07-28 01:45:23 +0000
commit2e9f29932d8eba649f21a56c2e15f4c0c19ffd21 (patch)
treefa51225b54358dd11104dab1fe8ad6fc480db9fd /lldb/source/Core/ValueObjectChild.cpp
parent522b1d14efe523b983eea899ab07524b27d14ff7 (diff)
downloadbcm5719-llvm-2e9f29932d8eba649f21a56c2e15f4c0c19ffd21.tar.gz
bcm5719-llvm-2e9f29932d8eba649f21a56c2e15f4c0c19ffd21.zip
Second attempt at the fix for the recursion in ValueObjectChild::CanUpdateWithInvalidExecutionContext()
This one should prevent the previous issues, and be the one true fix for rdar://21949558 llvm-svn: 243367
Diffstat (limited to 'lldb/source/Core/ValueObjectChild.cpp')
-rw-r--r--lldb/source/Core/ValueObjectChild.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp
index c1e45e1f48d..dd7e05715d6 100644
--- a/lldb/source/Core/ValueObjectChild.cpp
+++ b/lldb/source/Core/ValueObjectChild.cpp
@@ -44,7 +44,8 @@ ValueObjectChild::ValueObjectChild
m_bitfield_bit_size (bitfield_bit_size),
m_bitfield_bit_offset (bitfield_bit_offset),
m_is_base_class (is_base_class),
- m_is_deref_of_parent (is_deref_of_parent)
+ m_is_deref_of_parent (is_deref_of_parent),
+ m_can_update_with_invalid_exe_ctx()
{
m_name = name;
SetAddressTypeOfChildren(child_ptr_or_ref_addr_type);
@@ -109,12 +110,20 @@ ValueObjectChild::GetDisplayTypeName()
return display_name;
}
-bool
+LazyBool
ValueObjectChild::CanUpdateWithInvalidExecutionContext ()
{
+ if (m_can_update_with_invalid_exe_ctx.hasValue())
+ return m_can_update_with_invalid_exe_ctx.getValue();
if (m_parent)
- return m_parent->CanUpdateWithInvalidExecutionContext();
- return this->ValueObject::CanUpdateWithInvalidExecutionContext();
+ {
+ ValueObject *opinionated_parent = m_parent->FollowParentChain([] (ValueObject* valobj) -> bool {
+ return (valobj->CanUpdateWithInvalidExecutionContext() == eLazyBoolCalculate);
+ });
+ if (opinionated_parent)
+ return (m_can_update_with_invalid_exe_ctx = opinionated_parent->CanUpdateWithInvalidExecutionContext()).getValue();
+ }
+ return (m_can_update_with_invalid_exe_ctx = this->ValueObject::CanUpdateWithInvalidExecutionContext()).getValue();
}
bool
OpenPOWER on IntegriCloud