[Lldb-commits] [lldb] r128685 - in /lldb/trunk: include/lldb/Target/ source/Core/ source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/ source/Target/ test/python_api/frame/

Jim Ingham jingham at apple.com
Thu Mar 31 16:01:22 PDT 2011


Author: jingham
Date: Thu Mar 31 18:01:21 2011
New Revision: 128685

URL: http://llvm.org/viewvc/llvm-project?rev=128685&view=rev
Log:
Remove unneeded ExecutionContextScope variables.

Modified:
    lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
    lldb/trunk/include/lldb/Target/LanguageRuntime.h
    lldb/trunk/source/Core/ValueObject.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/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
    lldb/trunk/source/Target/CPPLanguageRuntime.cpp
    lldb/trunk/test/python_api/frame/TestFrames.py

Modified: lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h Thu Mar 31 18:01:21 2011
@@ -37,7 +37,7 @@
     IsVTableName (const char *name) = 0;
     
     virtual bool
-    GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope);
+    GetObjectDescription (Stream &str, ValueObject &object);
     
     virtual bool
     GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope);

Modified: lldb/trunk/include/lldb/Target/LanguageRuntime.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/LanguageRuntime.h?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/LanguageRuntime.h (original)
+++ lldb/trunk/include/lldb/Target/LanguageRuntime.h Thu Mar 31 18:01:21 2011
@@ -37,13 +37,13 @@
     GetLanguageType () const = 0;
     
     virtual bool
-    GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope) = 0;
+    GetObjectDescription (Stream &str, ValueObject &object) = 0;
     
     virtual bool
     GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope) = 0;
     
     virtual lldb::ValueObjectSP
-    GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope) = 0;
+    GetDynamicValue (lldb::ValueObjectSP in_value) = 0;
     
     virtual void
     SetExceptionBreakpoints ()

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Thu Mar 31 18:01:21 2011
@@ -625,7 +625,7 @@
         }
     }
     
-    if (runtime && runtime->GetObjectDescription(s, *this, exe_scope))
+    if (runtime && runtime->GetObjectDescription(s, *this))
     {
         m_object_desc_str.append (s.GetData());
     }

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=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp Thu Mar 31 18:01:21 2011
@@ -32,7 +32,7 @@
 static const char *pluginShort = "language.itanium";
 
 lldb::ValueObjectSP
-ItaniumABILanguageRuntime::GetDynamicValue (ValueObjectSP in_value, ExecutionContextScope *exe_scope)
+ItaniumABILanguageRuntime::GetDynamicValue (ValueObjectSP in_value)
 {
     ValueObjectSP ret_sp;
     return ret_sp;

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=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h Thu Mar 31 18:01:21 2011
@@ -31,7 +31,7 @@
         IsVTableName (const char *name);
         
         virtual lldb::ValueObjectSP
-        GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope);
+        GetDynamicValue (lldb::ValueObjectSP in_value);
 
         //------------------------------------------------------------------
         // Static Functions

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=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp Thu Mar 31 18:01:21 2011
@@ -39,7 +39,7 @@
 using namespace lldb_private;
 
 bool
-AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope)
+AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &object)
 {
     bool is_signed;
     // ObjC objects can only be pointers, but we extend this to integer types because an expression might just
@@ -60,7 +60,7 @@
         return NULL;
                         
     Value val(scalar);                   
-    return GetObjectDescription(str, val, exe_scope);
+    return GetObjectDescription(str, val, object.GetExecutionContextScope());
                    
 }
 bool
@@ -192,7 +192,7 @@
 }
 
 lldb::ValueObjectSP
-AppleObjCRuntime::GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope)
+AppleObjCRuntime::GetDynamicValue (lldb::ValueObjectSP in_value)
 {
     lldb::ValueObjectSP ret_sp;
     return ret_sp;

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=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h Thu Mar 31 18:01:21 2011
@@ -35,10 +35,10 @@
     GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope);
     
     virtual bool
-    GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope);
+    GetObjectDescription (Stream &str, ValueObject &object);
     
     virtual lldb::ValueObjectSP
-    GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope);
+    GetDynamicValue (lldb::ValueObjectSP in_value);
 
     // These are the ObjC specific functions.
     

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Thu Mar 31 18:01:21 2011
@@ -41,7 +41,7 @@
 static const char *pluginShort = "language.apple.objc.v1";
 
 lldb::ValueObjectSP
-AppleObjCRuntimeV1::GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope)
+AppleObjCRuntimeV1::GetDynamicValue (lldb::ValueObjectSP in_value)
 {
     lldb::ValueObjectSP ret_sp;
     return ret_sp;

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h Thu Mar 31 18:01:21 2011
@@ -32,7 +32,7 @@
     
     // These are generic runtime functions:
     virtual lldb::ValueObjectSP
-    GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope);
+    GetDynamicValue (lldb::ValueObjectSP in_value);
 
     virtual ClangUtilityFunction *
     CreateObjectChecker (const char *);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Thu Mar 31 18:01:21 2011
@@ -47,7 +47,7 @@
 }
 
 lldb::ValueObjectSP
-AppleObjCRuntimeV2::GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope)
+AppleObjCRuntimeV2::GetDynamicValue (lldb::ValueObjectSP in_value)
 {
     lldb::ValueObjectSP ret_sp;
     return ret_sp;

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h Thu Mar 31 18:01:21 2011
@@ -32,7 +32,7 @@
     
     // These are generic runtime functions:
     virtual lldb::ValueObjectSP
-    GetDynamicValue (lldb::ValueObjectSP in_value, ExecutionContextScope *exe_scope);
+    GetDynamicValue (lldb::ValueObjectSP in_value);
     
     virtual ClangUtilityFunction *
     CreateObjectChecker (const char *);

Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Thu Mar 31 18:01:21 2011
@@ -28,7 +28,7 @@
 }
 
 bool
-CPPLanguageRuntime::GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope)
+CPPLanguageRuntime::GetObjectDescription (Stream &str, ValueObject &object)
 {
     // C++ has no generic way to do this.
     return false;

Modified: lldb/trunk/test/python_api/frame/TestFrames.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/frame/TestFrames.py?rev=128685&r1=128684&r2=128685&view=diff
==============================================================================
--- lldb/trunk/test/python_api/frame/TestFrames.py (original)
+++ lldb/trunk/test/python_api/frame/TestFrames.py Thu Mar 31 18:01:21 2011
@@ -87,6 +87,18 @@
                                                   val.GetName(),
                                                   val.GetValue(frame)))
                 print >> session, "%s(%s)" % (name, ", ".join(argList))
+                
+                # Also check the generic pc & stack pointer.  We can't test their absolute values,
+                # but they should be valid.  
+                # It is kind of goofy that the register set is a value, and then we just have 
+                # to magically know that element 0 is the GPR set...
+                gpr_reg_set = frame.GetRegisters().GetValueAtIndex(0)
+                pc_value = gpr_reg_set.GetChildMemberWithName("pc")
+                self.assertTrue (pc_value.IsValid(), "We should have a valid PC.")
+                self.assertTrue (int(pc_value.GetValue(frame), 0) == frame.GetPC(), "PC gotten as a value should equal frame's GetPC")
+                sp_value = gpr_reg_set.GetChildMemberWithName("sp")
+                self.assertTrue (sp_value.IsValid(), "We should have a valid Stack Pointer.")
+                self.assertTrue (int(sp_value.GetValue(frame), 0) == frame.GetSP(), "SP gotten as a value should equal frame's GetSP")
 
             print >> session, "---"
             process.Continue()





More information about the lldb-commits mailing list