[Lldb-commits] [lldb] r248316 - On second thought, amend the previous patch to pass itself the ValueObject& for the static value instead of just its type

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 22 12:58:02 PDT 2015


Author: enrico
Date: Tue Sep 22 14:58:02 2015
New Revision: 248316

URL: http://llvm.org/viewvc/llvm-project?rev=248316&view=rev
Log:
On second thought, amend the previous patch to pass itself the ValueObject& for the static value instead of just its type


Modified:
    lldb/trunk/include/lldb/Target/LanguageRuntime.h
    lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h

Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Tue Sep 22 14:58:02 2015
@@ -65,8 +65,8 @@ public:
     // Derived, not Derived*. The job of this API is to correct this misalignment between the
     // static type and the discovered dynamic type
     virtual TypeAndOrName
-    FixUpDynamicType(const TypeAndOrName& type_and_or_name,
-                     const CompilerType& static_type) = 0;
+    FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                      ValueObject& static_value) = 0;
 
     virtual void
     SetExceptionBreakpoints ()

Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Tue Sep 22 14:58:02 2015
@@ -211,7 +211,7 @@ ValueObjectDynamicValue::UpdateValue ()
         if (class_type_or_name.HasType())
         {
             m_type_impl = TypeImpl(m_parent->GetCompilerType(),
-                                   runtime->FixUpDynamicType(class_type_or_name, m_parent->GetCompilerType()).GetCompilerType());
+                                   runtime->FixUpDynamicType(class_type_or_name, *m_parent).GetCompilerType());
         }
         else
         {
@@ -271,7 +271,7 @@ ValueObjectDynamicValue::UpdateValue ()
     }
 
     if (runtime)
-        m_dynamic_type_info = runtime->FixUpDynamicType(m_dynamic_type_info, m_parent->GetCompilerType());
+        m_dynamic_type_info = runtime->FixUpDynamicType(m_dynamic_type_info, *m_parent);
 
     //m_value.SetContext (Value::eContextTypeClangType, corrected_type);
     m_value.SetCompilerType (m_dynamic_type_info.GetCompilerType());

Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Tue Sep 22 14:58:02 2015
@@ -271,8 +271,10 @@ ItaniumABILanguageRuntime::GetDynamicTyp
 }
 
 TypeAndOrName
-ItaniumABILanguageRuntime::FixUpDynamicType(const TypeAndOrName& type_and_or_name, const CompilerType& static_type)
+ItaniumABILanguageRuntime::FixUpDynamicType(const TypeAndOrName& type_and_or_name,
+                                            ValueObject& static_value)
 {
+    CompilerType static_type(static_value.GetCompilerType());
     Flags static_type_flags(static_type.GetTypeInfo());
     
     TypeAndOrName ret(type_and_or_name);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h Tue Sep 22 14:58:02 2015
@@ -42,8 +42,8 @@ namespace lldb_private {
                                   Value::ValueType &value_type);
         
         virtual TypeAndOrName
-        FixUpDynamicType(const TypeAndOrName& type_and_or_name,
-                         const CompilerType& static_type);
+        FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                          ValueObject& static_value);
         
         virtual bool
         CouldHaveDynamicValue (ValueObject &in_value);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Tue Sep 22 14:58:02 2015
@@ -270,8 +270,10 @@ AppleObjCRuntime::GetDynamicTypeAndAddre
 }
 
 TypeAndOrName
-AppleObjCRuntime::FixUpDynamicType(const TypeAndOrName& type_and_or_name, const CompilerType& static_type)
+AppleObjCRuntime::FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                                    ValueObject& static_value)
 {
+    CompilerType static_type(static_value.GetCompilerType());
     Flags static_type_flags(static_type.GetTypeInfo());
     
     TypeAndOrName ret(type_and_or_name);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h Tue Sep 22 14:58:02 2015
@@ -50,8 +50,8 @@ public:
                               Value::ValueType &value_type) override;
 
     TypeAndOrName
-    FixUpDynamicType(const TypeAndOrName& type_and_or_name,
-                     const CompilerType& static_type) override;
+    FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                      ValueObject& static_value) override;
     
     // These are the ObjC specific functions.
     

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Tue Sep 22 14:58:02 2015
@@ -314,8 +314,8 @@ RenderScriptRuntime::GetDynamicTypeAndAd
 }
 
 TypeAndOrName
-RenderScriptRuntime::FixUpDynamicType(const TypeAndOrName& type_and_or_name,
-                                      const CompilerType& static_type)
+RenderScriptRuntime::FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                                       ValueObject& static_value)
 {
     return type_and_or_name;
 }

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h?rev=248316&r1=248315&r2=248316&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h Tue Sep 22 14:58:02 2015
@@ -185,8 +185,8 @@ class RenderScriptRuntime : public lldb_
                                           Value::ValueType &value_type);
     
     virtual TypeAndOrName
-    FixUpDynamicType(const TypeAndOrName& type_and_or_name,
-                     const CompilerType& static_type);
+    FixUpDynamicType (const TypeAndOrName& type_and_or_name,
+                      ValueObject& static_value);
 
     virtual bool CouldHaveDynamicValue(ValueObject &in_value);
 




More information about the lldb-commits mailing list