[Lldb-commits] [PATCH] D19511: Fix TestGetVariables.py.

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


chaoren created this revision.
chaoren added reviewers: sivachandra, clayborg.
chaoren added a subscriber: lldb-commits.

http://reviews.llvm.org/D19511

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

Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
===================================================================
--- packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
+++ packages/Python/lldbsuite/test/python_api/frame/get-variables/main.c
@@ -12,8 +12,9 @@
 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)
     {
Index: packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
===================================================================
--- packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -79,7 +79,7 @@
         
         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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19511.54940.patch
Type: text/x-patch
Size: 1335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160425/9d911bfc/attachment.bin>


More information about the lldb-commits mailing list