[Lldb-commits] [lldb] r156397 - in /lldb/trunk: include/lldb/API/SBValue.h include/lldb/Core/ValueObject.h include/lldb/Core/ValueObjectSyntheticFilter.h source/API/SBValue.cpp source/Core/ValueObject.cpp source/Core/ValueObjectSyntheticFilter.cpp

Enrico Granata egranata at apple.com
Tue May 8 11:47:08 PDT 2012


Author: enrico
Date: Tue May  8 13:47:08 2012
New Revision: 156397

URL: http://llvm.org/viewvc/llvm-project?rev=156397&view=rev
Log:
First part of a fix to make GetNonSyntheticValue() work correctly

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

Modified: lldb/trunk/include/lldb/API/SBValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBValue.h?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBValue.h (original)
+++ lldb/trunk/include/lldb/API/SBValue.h Tue May  8 13:47:08 2012
@@ -26,7 +26,7 @@
 
     lldb::SBValue &
     operator =(const lldb::SBValue &rhs);
-
+    
     ~SBValue ();
 
     bool
@@ -382,6 +382,7 @@
     
 private:
     lldb::ValueObjectSP m_opaque_sp;
+    friend void* _wrap_SBValue_GetNonSyntheticValue(void*,void*);
 };
 
 } // namespace lldb

Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Tue May  8 13:47:08 2012
@@ -832,6 +832,9 @@
     virtual lldb::ValueObjectSP
     GetStaticValue ();
     
+    virtual lldb::ValueObjectSP
+    GetNonSyntheticValue ();
+    
     lldb::ValueObjectSP
     GetSyntheticValue (bool use_synthetic = true);
     

Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Tue May  8 13:47:08 2012
@@ -98,6 +98,9 @@
             return NULL;
     }
     
+    virtual lldb::ValueObjectSP
+    GetNonSyntheticValue ();
+    
 protected:
     virtual bool
     UpdateValue ();

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Tue May  8 13:47:08 2012
@@ -1014,8 +1014,8 @@
                 // deliberately breaking the rules here to optimize the case where we DO NOT want
                 // the synthetic value to be returned to the user - if we did not do this, we would have to tell
                 // the target to suppress the synthetic value, and then return the flag to its original value
-                if (value_sp->GetParent())
-                    sb_value.m_opaque_sp = value_sp->GetParent()->GetSP();
+                if (value_sp->GetNonSyntheticValue())
+                    sb_value.m_opaque_sp = value_sp->GetNonSyntheticValue();
             }
         }
     }

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Tue May  8 13:47:08 2012
@@ -2103,6 +2103,12 @@
     return GetSP();
 }
 
+lldb::ValueObjectSP
+ValueObject::GetNonSyntheticValue ()
+{
+    return GetSP();
+}
+
 ValueObjectSP
 ValueObject::GetSyntheticValue (bool use_synthetic)
 {

Modified: lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp?rev=156397&r1=156396&r2=156397&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp Tue May  8 13:47:08 2012
@@ -174,3 +174,8 @@
     return m_parent->IsInScope();
 }
 
+lldb::ValueObjectSP
+ValueObjectSynthetic::GetNonSyntheticValue ()
+{
+    return m_parent->GetSP();
+}





More information about the lldb-commits mailing list