[Lldb-commits] [lldb] r121782 - in /lldb/trunk/test: array_types/TestArrayTypes.py bitfields/TestBitfields.py breakpoint_conditions/TestBreakpointConditions.py class_static/TestStaticVariables.py conditional_break/TestConditionalBreak.py objc-stepping/TestObjCStepping.py

Johnny Chen johnny.chen at apple.com
Tue Dec 14 10:59:15 PST 2010


Author: johnny
Date: Tue Dec 14 12:59:15 2010
New Revision: 121782

URL: http://llvm.org/viewvc/llvm-project?rev=121782&view=rev
Log:
Modify test cases to accomodate Python API change:

o SBFrame.LookupVar -> FindVariable
o SBFrame.LookupVarInScope -> FindValue


Modified:
    lldb/trunk/test/array_types/TestArrayTypes.py
    lldb/trunk/test/bitfields/TestBitfields.py
    lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py
    lldb/trunk/test/class_static/TestStaticVariables.py
    lldb/trunk/test/conditional_break/TestConditionalBreak.py
    lldb/trunk/test/objc-stepping/TestObjCStepping.py

Modified: lldb/trunk/test/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/TestArrayTypes.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/array_types/TestArrayTypes.py Tue Dec 14 12:59:15 2010
@@ -153,7 +153,7 @@
 
         # Lookup the "strings" string array variable and sanity check its print
         # representation.
-        variable = frame.LookupVar("strings")
+        variable = frame.FindVariable("strings")
         var = repr(variable)
         self.expect(var, "Variable for 'strings' looks good with correct name", exe=False,
             substrs = ["name: '%s'" % variable.GetName()])
@@ -167,7 +167,7 @@
                         'strings[3] == "Guten Tag"')
 
         # Lookup the "char_16" char array variable.
-        variable = frame.LookupVar("char_16")
+        variable = frame.FindVariable("char_16")
         self.DebugSBValue(frame, variable)
         self.assertTrue(variable.GetNumChildren() == 16,
                         "Variable 'char_16' should have 16 children")
@@ -176,7 +176,7 @@
         # Notice the pattern of int(child0_2.GetValue(frame), 0).  We pass a
         # base of 0 so that the proper radix is determined based on the contents
         # of the string.  Same applies to long().
-        variable = frame.LookupVar("ushort_matrix")
+        variable = frame.FindVariable("ushort_matrix")
         self.DebugSBValue(frame, variable)
         self.assertTrue(variable.GetNumChildren() == 2,
                         "Variable 'ushort_matrix' should have 2 children")
@@ -190,7 +190,7 @@
                         "ushort_matrix[0][2] == 3")
 
         # Lookup the "long_6" char array variable.
-        variable = frame.LookupVar("long_6")
+        variable = frame.FindVariable("long_6")
         self.DebugSBValue(frame, variable)
         self.assertTrue(variable.GetNumChildren() == 6,
                         "Variable 'long_6' should have 6 children")
@@ -205,7 +205,7 @@
         self.assertTrue(variable.GetValueType() == lldb.eValueTypeVariableLocal,
                         "Variable 'long_6' should have '%s' value type." %
                         ValueTypeString(lldb.eValueTypeVariableLocal))
-        argc = frame.LookupVar("argc")
+        argc = frame.FindVariable("argc")
         self.DebugSBValue(frame, argc)
         self.assertTrue(argc.GetValueType() == lldb.eValueTypeVariableArgument,
                         "Variable 'argc' should have '%s' value type." %

Modified: lldb/trunk/test/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/bitfields/TestBitfields.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/bitfields/TestBitfields.py Tue Dec 14 12:59:15 2010
@@ -109,7 +109,7 @@
 
         # Lookup the "bits" variable which contains 8 bitfields.
         frame = thread.GetFrameAtIndex(0)
-        bits = frame.LookupVar("bits")
+        bits = frame.FindVariable("bits")
         self.DebugSBValue(frame, bits)
         self.assertTrue(bits.GetTypeName() == "Bits" and
                         bits.GetNumChildren() == 8 and

Modified: lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py (original)
+++ lldb/trunk/test/breakpoint_conditions/TestBreakpointConditions.py Tue Dec 14 12:59:15 2010
@@ -133,7 +133,7 @@
 
         # Frame #0 should be on self.line1 and the break condition should hold.
         frame0 = self.process.GetThreadAtIndex(0).GetFrameAtIndex(0)
-        var = frame0.LookupVarInScope('val', 'parameter')
+        var = frame0.FindValue('val', lldb.eValueTypeVariableArgument)
         self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
                         var.GetValue(frame0) == '3')
 

Modified: lldb/trunk/test/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_static/TestStaticVariables.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/class_static/TestStaticVariables.py Tue Dec 14 12:59:15 2010
@@ -119,21 +119,21 @@
                 self.assertTrue(child1_x.GetTypeName() == 'int' and
                                 child1_x.GetValue(frame) == '11')
 
-        # SBFrame.LookupVarInScope() should also work.
-        val = frame.LookupVarInScope("A::g_points", "global")
+        # SBFrame.FindValue() should also work.
+        val = frame.FindValue("A::g_points", lldb.eValueTypeVariableGlobal)
         self.DebugSBValue(frame, val)
         self.assertTrue(val.GetName() == 'A::g_points')
 
         # Also exercise the "parameter" and "local" scopes while we are at it.
-        val = frame.LookupVarInScope("argc", "parameter")
+        val = frame.FindValue("argc", lldb.eValueTypeVariableArgument)
         self.DebugSBValue(frame, val)
         self.assertTrue(val.GetName() == 'argc')
 
-        val = frame.LookupVarInScope("argv", "parameter")
+        val = frame.FindValue("argv", lldb.eValueTypeVariableArgument)
         self.DebugSBValue(frame, val)
         self.assertTrue(val.GetName() == 'argv')
 
-        val = frame.LookupVarInScope("hello_world", "local")
+        val = frame.FindValue("hello_world", lldb.eValueTypeVariableLocal)
         self.DebugSBValue(frame, val)
         self.assertTrue(val.GetName() == 'hello_world')
 

Modified: lldb/trunk/test/conditional_break/TestConditionalBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/conditional_break/TestConditionalBreak.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/conditional_break/TestConditionalBreak.py (original)
+++ lldb/trunk/test/conditional_break/TestConditionalBreak.py Tue Dec 14 12:59:15 2010
@@ -89,7 +89,7 @@
                                     "Immediate caller a() at main.c:%d" % line)
 
                     # And the local variable 'val' should have a value of (int) 3.
-                    val = frame1.LookupVar("val")
+                    val = frame1.FindVariable("val")
                     self.assertTrue(val.GetTypeName() == "int", "'val' has int type")
                     self.assertTrue(val.GetValue(frame1) == "3", "'val' has a value of 3")
                     break

Modified: lldb/trunk/test/objc-stepping/TestObjCStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/objc-stepping/TestObjCStepping.py?rev=121782&r1=121781&r2=121782&view=diff
==============================================================================
--- lldb/trunk/test/objc-stepping/TestObjCStepping.py (original)
+++ lldb/trunk/test/objc-stepping/TestObjCStepping.py Tue Dec 14 12:59:15 2010
@@ -80,7 +80,7 @@
         line_number = thread.GetFrameAtIndex(0).GetLineEntry().GetLine()
         self.assertTrue (line_number == self.line1, "Hit the first breakpoint.")
 
-        mySource = thread.GetFrameAtIndex(0).LookupVar("mySource")
+        mySource = thread.GetFrameAtIndex(0).FindVariable("mySource")
         self.assertTrue(mySource.IsValid(), "Found mySource local variable.")
         mySource_isa = mySource.GetChildMemberWithName ("isa")
         self.assertTrue(mySource_isa.IsValid(), "Found mySource->isa local variable.")





More information about the lldb-commits mailing list