Modify test cases to use 'target variable' to display global variables.

llvm-svn: 138247
This commit is contained in:
Johnny Chen 2011-08-22 17:58:14 +00:00
parent b49813206b
commit 1dc9a20c16
1 changed files with 7 additions and 9 deletions

View File

@ -57,18 +57,16 @@ class StaticVariableTestCase(TestBase):
substrs = ['stopped', substrs = ['stopped',
'stop reason = breakpoint']) 'stop reason = breakpoint'])
# On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
slist = ['(PointType [2]) g_points', 'A::g_points']
# global variables are no longer displayed with the "frame variable" command. # global variables are no longer displayed with the "frame variable" command.
# add tests for the "target variable" command soon self.expect('target variable A::g_points', VARIABLES_DISPLAYED_CORRECTLY,
# 'frame variable -G' finds and displays global variable(s) by name. substrs = ['(PointType [2]) A::g_points'])
# self.expect('frame variable -G g_points', VARIABLES_DISPLAYED_CORRECTLY, self.expect('target variable g_points', VARIABLES_DISPLAYED_CORRECTLY,
# substrs = slist) substrs = ['(PointType [2]) g_points'])
# On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
# A::g_points is an array of two elements. # A::g_points is an array of two elements.
if sys.platform.startswith("darwin") and self.getCompiler() in ['clang', 'llvm-gcc']: if sys.platform.startswith("darwin") and self.getCompiler() in ['clang', 'llvm-gcc']:
self.expect("frame variable A::g_points[1].x", VARIABLES_DISPLAYED_CORRECTLY, self.expect("target variable A::g_points[1].x", VARIABLES_DISPLAYED_CORRECTLY,
startstr = "(int) A::g_points[1].x = 11") startstr = "(int) A::g_points[1].x = 11")
def static_variable_python(self): def static_variable_python(self):