Apply (query-replace "frame variable" "frame variable -t") and fix a comment about 'expr var',
not 'frame variable var'. llvm-svn: 116419
This commit is contained in:
parent
b6e8cf9663
commit
456c9c343e
|
@ -66,7 +66,7 @@ class ArrayTypesTestCase(TestBase):
|
|||
|
||||
# Issue 'variable list' command on several array-type variables.
|
||||
|
||||
self.expect("frame variable strings", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t strings", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = '(char *[4])',
|
||||
substrs = ['(char *) strings[0]',
|
||||
'(char *) strings[1]',
|
||||
|
@ -77,14 +77,14 @@ class ArrayTypesTestCase(TestBase):
|
|||
'Bonjour',
|
||||
'Guten Tag'])
|
||||
|
||||
self.expect("frame variable char_16", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t char_16", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['(char) char_16[0]',
|
||||
'(char) char_16[15]'])
|
||||
|
||||
self.expect("frame variable ushort_matrix", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t ushort_matrix", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = '(unsigned short [2][3])')
|
||||
|
||||
self.expect("frame variable long_6", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t long_6", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = '(long [6])')
|
||||
|
||||
def array_types_python(self):
|
||||
|
|
|
@ -59,7 +59,7 @@ class BitfieldsTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# This should display correctly.
|
||||
self.expect("frame variable bits", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t bits", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['(uint32_t:1) b1 = 1,',
|
||||
'(uint32_t:2) b2 = 3,',
|
||||
'(uint32_t:3) b3 = 7,',
|
||||
|
@ -71,7 +71,7 @@ class BitfieldsTestCase(TestBase):
|
|||
|
||||
# And so should this.
|
||||
# rdar://problem/8348251
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['(uint32_t:1) b1 = 1,',
|
||||
'(uint32_t:2) b2 = 3,',
|
||||
'(uint32_t:3) b3 = 7,',
|
||||
|
|
|
@ -47,7 +47,7 @@ class BreakpointCommandTestCase(TestBase):
|
|||
self.line)
|
||||
|
||||
# Now add callbacks for the breakpoints just created.
|
||||
self.runCmd("breakpoint command add -c -o 'frame variable -s' 1")
|
||||
self.runCmd("breakpoint command add -c -o 'frame variable -t -s' 1")
|
||||
self.runCmd("breakpoint command add -p -o 'here = open(\"output.txt\", \"w\"); print >> here, \"lldb\"; here.close()' 2")
|
||||
|
||||
# Check that the breakpoint commands are correctly set.
|
||||
|
@ -61,7 +61,7 @@ class BreakpointCommandTestCase(TestBase):
|
|||
|
||||
self.expect("breakpoint command list 1", "Breakpoint 1 command ok",
|
||||
substrs = ["Breakpoint commands:",
|
||||
"frame variable -s"])
|
||||
"frame variable -t -s"])
|
||||
self.expect("breakpoint command list 2", "Breakpoint 2 command ok",
|
||||
substrs = ["Breakpoint commands:",
|
||||
"here = open",
|
||||
|
|
|
@ -81,7 +81,7 @@ class ClassTypesTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# We should be stopped on the ctor function of class C.
|
||||
self.expect("frame variable this", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t this", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['C *',
|
||||
' this = '])
|
||||
|
||||
|
@ -170,8 +170,8 @@ class ClassTypesTestCase(TestBase):
|
|||
# Continue on inside the ctor() body...
|
||||
self.runCmd("thread step-over")
|
||||
|
||||
# Verify that frame variable this->m_c_int behaves correctly.
|
||||
self.expect("frame variable this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
# Verify that frame variable -t this->m_c_int behaves correctly.
|
||||
self.expect("frame variable -t this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = '(int) this->m_c_int = 66')
|
||||
|
||||
# rdar://problem/8430916
|
||||
|
|
|
@ -45,7 +45,7 @@ class ForwardDeclarationTestCase(TestBase):
|
|||
|
||||
# This should display correctly.
|
||||
# Note that the member fields of a = 1 and b = 2 is by design.
|
||||
self.expect("frame variable *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['(struct bar *) bar_ptr = ',
|
||||
'(int) a = 1',
|
||||
'(int) b = 2'])
|
||||
|
|
|
@ -116,7 +116,7 @@ class FoundationTestCase(TestBase):
|
|||
'NSString * str;',
|
||||
'NSDate * date;'])
|
||||
|
||||
self.expect("frame variable -s", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t -s", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ["ARG: (MyString *) self"],
|
||||
patterns = ["ARG: \(.*\) _cmd",
|
||||
"(struct objc_selector *)|(SEL)"])
|
||||
|
@ -124,16 +124,16 @@ class FoundationTestCase(TestBase):
|
|||
# rdar://problem/8492646
|
||||
# test/foundation fails after updating to tot r115023
|
||||
# self->str displays nothing as output
|
||||
self.expect("frame variable self->str", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t self->str", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(NSString *) self->str")
|
||||
|
||||
# rdar://problem/8447030
|
||||
# 'frame variable self->date' displays the wrong data member
|
||||
self.expect("frame variable self->date", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t self->date", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(NSDate *) self->date")
|
||||
|
||||
# This should display the str and date member fields as well.
|
||||
self.expect("frame variable *self", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t *self", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ["(MyString *) self",
|
||||
"(NSString *) str",
|
||||
"(NSDate *) date"])
|
||||
|
|
|
@ -48,7 +48,7 @@ class FunctionTypesTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# Check that the 'callback' variable display properly.
|
||||
self.expect("frame variable callback", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t callback", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = '(int (*)(const char *)) callback =')
|
||||
|
||||
# And that we can break on the callback function.
|
||||
|
|
|
@ -48,7 +48,7 @@ class GlobalVariablesTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# Check that GLOBAL scopes are indicated for the variables.
|
||||
self.expect("frame variable -s -g -a", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t -s -g -a", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs = ['GLOBAL: (int) g_file_global_int = 42',
|
||||
'GLOBAL: (const char *) g_file_global_cstr',
|
||||
'"g_file_global_cstr"',
|
||||
|
|
|
@ -72,8 +72,8 @@ class SetValuesTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# main.c:15
|
||||
# Check that 'frame variable' displays the correct data type and value.
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
# Check that 'frame variable -t' displays the correct data type and value.
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(char) i = 'a'")
|
||||
|
||||
# TODO:
|
||||
|
@ -82,8 +82,8 @@ class SetValuesTestCase(TestBase):
|
|||
self.runCmd("continue")
|
||||
|
||||
# main.c:36
|
||||
# Check that 'frame variable' displays the correct data type and value.
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
# Check that 'frame variable -t' displays the correct data type and value.
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
patterns = ["\((short unsigned int|unsigned short)\) i = 33"])
|
||||
|
||||
# TODO:
|
||||
|
@ -92,8 +92,8 @@ class SetValuesTestCase(TestBase):
|
|||
self.runCmd("continue")
|
||||
|
||||
# main.c:57
|
||||
# Check that 'frame variable' displays the correct data type and value.
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
# Check that 'frame variable -t' displays the correct data type and value.
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(long int) i = 33")
|
||||
|
||||
# TODO:
|
||||
|
@ -102,8 +102,8 @@ class SetValuesTestCase(TestBase):
|
|||
self.runCmd("continue")
|
||||
|
||||
# main.c:78
|
||||
# Check that 'frame variable' displays the correct data type and value.
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
# Check that 'frame variable -t' displays the correct data type and value.
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(double) i = 3.14159")
|
||||
|
||||
# TODO:
|
||||
|
@ -112,10 +112,10 @@ class SetValuesTestCase(TestBase):
|
|||
self.runCmd("continue")
|
||||
|
||||
# main.c:85
|
||||
# Check that 'frame variable' displays the correct data type and value.
|
||||
# Check that 'frame variable -t' displays the correct data type and value.
|
||||
# rdar://problem/8422727
|
||||
# set_values test directory: 'frame variable' shows only (long double) i =
|
||||
self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(long double) i = 3.14159")
|
||||
|
||||
# TODO:
|
||||
|
|
|
@ -8,7 +8,7 @@ import lldb
|
|||
from lldbtest import *
|
||||
|
||||
def Msg(var, val):
|
||||
return "'frame variable %s' matches the output (from compiled code): %s" % (var, val)
|
||||
return "'frame variable -t %s' matches the output (from compiled code): %s" % (var, val)
|
||||
|
||||
class GenericTester(TestBase):
|
||||
|
||||
|
@ -70,14 +70,14 @@ class GenericTester(TestBase):
|
|||
# Now iterate through the golden list, comparing against the output from
|
||||
# 'frame variable var'.
|
||||
for var, val in gl:
|
||||
self.runCmd("frame variable %s" % var)
|
||||
self.runCmd("frame variable -t %s" % var)
|
||||
output = self.res.GetOutput()
|
||||
|
||||
# The input type is in a canonical form as a set named atoms.
|
||||
# The display type string must conatin each and every element.
|
||||
#
|
||||
# Example:
|
||||
# runCmd: frame variable a_array_bounded[0]
|
||||
# runCmd: frame variable -t a_array_bounded[0]
|
||||
# output: (char) a_array_bounded[0] = 'a'
|
||||
#
|
||||
try:
|
||||
|
@ -128,7 +128,7 @@ class GenericTester(TestBase):
|
|||
#self.runCmd("frame variable")
|
||||
|
||||
# Now iterate through the golden list, comparing against the output from
|
||||
# 'frame variable var'.
|
||||
# 'expr var'.
|
||||
for var, val in gl:
|
||||
self.runCmd("expr %s" % var)
|
||||
output = self.res.GetOutput()
|
||||
|
|
|
@ -50,7 +50,7 @@ class UnsignedTypesTestCase(TestBase):
|
|||
substrs = [' resolved, hit count = 1'])
|
||||
|
||||
# Test that unsigned types display correctly.
|
||||
self.expect("frame variable -a", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
self.expect("frame variable -t -a", VARIABLES_DISPLAYED_CORRECTLY,
|
||||
startstr = "(unsigned char) the_unsigned_char = 'c'",
|
||||
patterns = ["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"],
|
||||
substrs = ["(unsigned int) the_unsigned_int = 99",
|
||||
|
|
Loading…
Reference in New Issue