[Lldb-commits] [lldb] r138247 - /lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py

Johnny Chen johnny.chen at apple.com
Mon Aug 22 10:58:15 PDT 2011


Author: johnny
Date: Mon Aug 22 12:58:14 2011
New Revision: 138247

URL: http://llvm.org/viewvc/llvm-project?rev=138247&view=rev
Log:
Modify test cases to use 'target variable' to display global variables.

Modified:
    lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py

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=138247&r1=138246&r2=138247&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/test/lang/cpp/class_static/TestStaticVariables.py Mon Aug 22 12:58:14 2011
@@ -57,18 +57,16 @@
             substrs = ['stopped',
                        '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. 
-# add tests for the "target variable" command soon
-        # 'frame variable -G' finds and displays global variable(s) by name.
-        # self.expect('frame variable -G g_points', VARIABLES_DISPLAYED_CORRECTLY,
-        #     substrs = slist)
+        # global variables are no longer displayed with the "frame variable" command. 
+        self.expect('target variable A::g_points', VARIABLES_DISPLAYED_CORRECTLY,
+            substrs = ['(PointType [2]) A::g_points'])
+        self.expect('target variable g_points', VARIABLES_DISPLAYED_CORRECTLY,
+            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.
         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")
 
     def static_variable_python(self):





More information about the lldb-commits mailing list