[Lldb-commits] [lldb] r267492 - Fix TestGetVariables.py.

Chaoren Lin via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 25 16:29:53 PDT 2016


Author: chaoren
Date: Mon Apr 25 18:29:53 2016
New Revision: 267492

URL: http://llvm.org/viewvc/llvm-project?rev=267492&view=rev
Log:
Fix TestGetVariables.py.

Reviewers: sivachandra, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D19511

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
    lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c

Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py?rev=267492&r1=267491&r2=267492&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py Mon Apr 25 18:29:53 2016
@@ -79,7 +79,7 @@ class TestGetVariables(TestBase):
         
         arg_names = ['argc', 'argv']   
         local_names = ['i', 'j', 'k']
-        static_names = ['static_var', 'g_global_var', 'static_var']
+        static_names = ['static_var', 'g_global_var', 'g_static_var']
         breakpoint1_locals = ['i']
         breakpoint1_statics = ['static_var']
         num_args = len(arg_names)

Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c?rev=267492&r1=267491&r2=267492&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c Mon Apr 25 18:29:53 2016
@@ -12,8 +12,9 @@ int g_global_var = 123;
 static int g_static_var = 123;
 
 int main (int argc, char const *argv[])
-{                            
+{
     static int static_var = 123;
+    g_static_var = 123; // clang bug. Need to touch this variable, otherwise it disappears.
     int i = 0;                                  // breakpoint 1
     for (i=0; i<1; ++i)
     {




More information about the lldb-commits mailing list