[Lldb-commits] [lldb] r134915 - in /lldb/trunk/test: expression_command/test/TestExprs.py lang/c/array_types/TestArrayTypes.py lang/c/bitfields/TestBitfields.py lang/cpp/class_static/TestStaticVariables.py python_api/process/TestProcessAPI.py
Johnny Chen
johnny.chen at apple.com
Mon Jul 11 13:06:28 PDT 2011
Author: johnny
Date: Mon Jul 11 15:06:28 2011
New Revision: 134915
URL: http://llvm.org/viewvc/llvm-project?rev=134915&view=rev
Log:
The lldbtest.TestBase.DebugSBValue(self, val) method call now does not need the frame argument.
Only the val (of SBValue type) argument is needed.
Modified:
lldb/trunk/test/expression_command/test/TestExprs.py
lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
lldb/trunk/test/lang/c/bitfields/TestBitfields.py
lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
lldb/trunk/test/python_api/process/TestProcessAPI.py
Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=134915&r1=134914&r2=134915&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Mon Jul 11 15:06:28 2011
@@ -139,27 +139,27 @@
startstr = "2.234")
self.expect(val.GetTypeName(), "2.345 evaluated correctly", exe=False,
startstr = "double")
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
val = frame.EvaluateExpression("argc")
self.expect(val.GetValue(frame), "Argc evaluated correctly", exe=False,
startstr = "4")
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
val = frame.EvaluateExpression("*argv[1]")
self.expect(val.GetValue(frame), "Argv[1] evaluated correctly", exe=False,
startstr = "'X'")
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
val = frame.EvaluateExpression("*argv[2]")
self.expect(val.GetValue(frame), "Argv[2] evaluated correctly", exe=False,
startstr = "'Y'")
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
val = frame.EvaluateExpression("*argv[3]")
self.expect(val.GetValue(frame), "Argv[3] evaluated correctly", exe=False,
startstr = "'Z'")
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
# rdar://problem/8686536
# CommandInterpreter::HandleCommand is stripping \'s from input for WantsRawCommand commands
Modified: lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/array_types/TestArrayTypes.py?rev=134915&r1=134914&r2=134915&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/test/lang/c/array_types/TestArrayTypes.py Mon Jul 11 15:06:28 2011
@@ -155,18 +155,18 @@
var = repr(variable)
self.expect(var, "Variable for 'strings' looks good with correct name", exe=False,
substrs = ["%s" % variable.GetName()])
- self.DebugSBValue(frame, variable)
+ self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 4,
"Variable 'strings' should have 4 children")
child3 = variable.GetChildAtIndex(3)
- self.DebugSBValue(frame, child3)
+ self.DebugSBValue(child3)
self.assertTrue(child3.GetSummary(frame) == '"Guten Tag"',
'strings[3] == "Guten Tag"')
# Lookup the "char_16" char array variable.
variable = frame.FindVariable("char_16")
- self.DebugSBValue(frame, variable)
+ self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 16,
"Variable 'char_16' should have 16 children")
@@ -175,25 +175,25 @@
# base of 0 so that the proper radix is determined based on the contents
# of the string. Same applies to long().
variable = frame.FindVariable("ushort_matrix")
- self.DebugSBValue(frame, variable)
+ self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 2,
"Variable 'ushort_matrix' should have 2 children")
child0 = variable.GetChildAtIndex(0)
- self.DebugSBValue(frame, child0)
+ self.DebugSBValue(child0)
self.assertTrue(child0.GetNumChildren() == 3,
"Variable 'ushort_matrix[0]' should have 3 children")
child0_2 = child0.GetChildAtIndex(2)
- self.DebugSBValue(frame, child0_2)
+ self.DebugSBValue(child0_2)
self.assertTrue(int(child0_2.GetValue(frame), 0) == 3,
"ushort_matrix[0][2] == 3")
# Lookup the "long_6" char array variable.
variable = frame.FindVariable("long_6")
- self.DebugSBValue(frame, variable)
+ self.DebugSBValue(variable)
self.assertTrue(variable.GetNumChildren() == 6,
"Variable 'long_6' should have 6 children")
child5 = variable.GetChildAtIndex(5)
- self.DebugSBValue(frame, child5)
+ self.DebugSBValue(child5)
self.assertTrue(long(child5.GetValue(frame), 0) == 6,
"long_6[5] == 6")
@@ -204,7 +204,7 @@
"Variable 'long_6' should have '%s' value type." %
value_type_to_str(lldb.eValueTypeVariableLocal))
argc = frame.FindVariable("argc")
- self.DebugSBValue(frame, argc)
+ self.DebugSBValue(argc)
self.assertTrue(argc.GetValueType() == lldb.eValueTypeVariableArgument,
"Variable 'argc' should have '%s' value type." %
value_type_to_str(lldb.eValueTypeVariableArgument))
Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=134915&r1=134914&r2=134915&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Mon Jul 11 15:06:28 2011
@@ -110,7 +110,7 @@
# Lookup the "bits" variable which contains 8 bitfields.
frame = thread.GetFrameAtIndex(0)
bits = frame.FindVariable("bits")
- self.DebugSBValue(frame, bits)
+ self.DebugSBValue(bits)
self.assertTrue(bits.GetTypeName() == "Bits" and
bits.GetNumChildren() == 8 and
bits.GetByteSize() == 4,
@@ -120,7 +120,7 @@
# so that the proper radix is determined based on the contents of the
# string.
b1 = bits.GetChildAtIndex(0)
- self.DebugSBValue(frame, b1)
+ self.DebugSBValue(b1)
self.assertTrue(b1.GetName() == "b1" and
b1.GetTypeName() == "uint32_t:1" and
b1.IsInScope(frame) and
@@ -128,7 +128,7 @@
'bits.b1 has type uint32_t:1, is in scope, and == 1')
b7 = bits.GetChildAtIndex(6)
- self.DebugSBValue(frame, b7)
+ self.DebugSBValue(b7)
self.assertTrue(b7.GetName() == "b7" and
b7.GetTypeName() == "uint32_t:7" and
b7.IsInScope(frame) and
@@ -136,7 +136,7 @@
'bits.b7 has type uint32_t:7, is in scope, and == 127')
four = bits.GetChildAtIndex(7)
- self.DebugSBValue(frame, four)
+ self.DebugSBValue(four)
self.assertTrue(four.GetName() == "four" and
four.GetTypeName() == "uint32_t:4" and
four.IsInScope(frame) and
Modified: lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py?rev=134915&r1=134914&r2=134915&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py Mon Jul 11 15:06:28 2011
@@ -102,7 +102,7 @@
valList = frame.GetVariables(False, False, True, False)
for val in valList:
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
self.assertTrue(val.GetValueType() == lldb.eValueTypeVariableGlobal)
name = val.GetName()
self.assertTrue(name in ['g_points', 'A::g_points'])
@@ -112,28 +112,28 @@
# On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
self.assertTrue(val.GetNumChildren() == 2)
child1 = val.GetChildAtIndex(1)
- self.DebugSBValue(frame, child1)
+ self.DebugSBValue(child1)
child1_x = child1.GetChildAtIndex(0)
- self.DebugSBValue(frame, child1_x)
+ self.DebugSBValue(child1_x)
self.assertTrue(child1_x.GetTypeName() == 'int' and
child1_x.GetValue(frame) == '11')
# SBFrame.FindValue() should also work.
val = frame.FindValue("A::g_points", lldb.eValueTypeVariableGlobal)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
self.assertTrue(val.GetName() == 'A::g_points')
# Also exercise the "parameter" and "local" scopes while we are at it.
val = frame.FindValue("argc", lldb.eValueTypeVariableArgument)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
self.assertTrue(val.GetName() == 'argc')
val = frame.FindValue("argv", lldb.eValueTypeVariableArgument)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
self.assertTrue(val.GetName() == 'argv')
val = frame.FindValue("hello_world", lldb.eValueTypeVariableLocal)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
self.assertTrue(val.GetName() == 'hello_world')
Modified: lldb/trunk/test/python_api/process/TestProcessAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/process/TestProcessAPI.py?rev=134915&r1=134914&r2=134915&view=diff
==============================================================================
--- lldb/trunk/test/python_api/process/TestProcessAPI.py (original)
+++ lldb/trunk/test/python_api/process/TestProcessAPI.py Mon Jul 11 15:06:28 2011
@@ -84,7 +84,7 @@
# Get the SBValue for the global variable 'my_char'.
val = frame.FindValue("my_char", lldb.eValueTypeVariableGlobal)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
# If the variable does not have a load address, there's no sense continuing.
if not val.GetLocation(frame).startswith("0x"):
@@ -126,7 +126,7 @@
# Get the SBValue for the global variable 'my_char'.
val = frame.FindValue("my_char", lldb.eValueTypeVariableGlobal)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
# If the variable does not have a load address, there's no sense continuing.
if not val.GetLocation(frame).startswith("0x"):
@@ -177,7 +177,7 @@
# Get the SBValue for the global variable 'my_int'.
val = frame.FindValue("my_int", lldb.eValueTypeVariableGlobal)
- self.DebugSBValue(frame, val)
+ self.DebugSBValue(val)
# If the variable does not have a load address, there's no sense continuing.
if not val.GetLocation(frame).startswith("0x"):
More information about the lldb-commits
mailing list