[Lldb-commits] [lldb] r175563 - ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children

Enrico Granata egranata at apple.com
Tue Feb 19 14:03:00 PST 2013


Author: enrico
Date: Tue Feb 19 16:03:00 2013
New Revision: 175563

URL: http://llvm.org/viewvc/llvm-project?rev=175563&view=rev
Log:
ValueObjectSynthetic could be wrapping a ValueObjectDynamic. In that case, we want to report that the ValueObject is dynamic since synthetic values are supposed to be just their parent with different children

Modified:
    lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
    lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp

Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=175563&r1=175562&r2=175563&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Tue Feb 19 16:03:00 2013
@@ -83,7 +83,19 @@ public:
     virtual bool
     IsDynamic ()
     {
-        return false;
+        if (m_parent)
+            return m_parent->IsDynamic();
+        else
+            return false;
+    }
+    
+    virtual lldb::DynamicValueType
+    GetDynamicValueType ()
+    {
+        if (m_parent)
+            return m_parent->GetDynamicValueType();
+        else
+            return lldb::eNoDynamicValues;
     }
 
     virtual ValueObject *

Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=175563&r1=175562&r2=175563&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Tue Feb 19 16:03:00 2013
@@ -115,9 +115,9 @@ ValueObjectSynthetic::GetDynamicValue (l
 {
     if (!m_parent)
         return lldb::ValueObjectSP();
-    if (m_parent->IsDynamic() && m_parent->GetDynamicValueType() == valueType)
-        return m_parent->GetSP();
-    return ValueObject::GetDynamicValue(valueType);
+    if (IsDynamic() && GetDynamicValueType() == valueType)
+        return GetSP();
+    return m_parent->GetDynamicValue(valueType);
 }
 
 bool





More information about the lldb-commits mailing list