[Lldb-commits] [PATCH] D12634: Fix -data-evaluate-expression for array.

Ilia K via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 4 11:29:59 PDT 2015


ki.stfu requested changes to this revision.
ki.stfu added a comment.
This revision now requires changes to proceed.

Source code looks good but please move the test to TestMiData.py.


================
Comment at: test/tools/lldb-mi/variable/TestMiVar.py:39-42
@@ -38,2 +38,6 @@
         self.expect("\^error,msg=\"Could not evaluate expression\"")
+        
+        # Check 2d array 
+        self.runCmd("-data-evaluate-expression g_blk")
+        self.expect("\^done,value=\"\{\[0\] = \{\[0\] = 1, \[1\] = 2, \[2\] = 3\}, \[1\] = \{\[0\] = 4, \[1\] = 5, \[2\] = 6\}\}\"")
 
----------------
Please move it to a separate @lldmi_test test in data/TestMiData.py

================
Comment at: test/tools/lldb-mi/variable/main.cpp:105-110
@@ -103,2 +104,8 @@
     int a = 10, b = 20;
+    g_blk[0][0] = 1;
+    g_blk[0][1] = 2;
+    g_blk[0][2] = 3;
+    g_blk[1][0] = 4;
+    g_blk[1][1] = 5;
+    g_blk[1][2] = 6;
     s_MyVar = a + b;
----------------
Move it to data/main.cpp and create a separate function for that (data_evaluate_expression_test, for example)


http://reviews.llvm.org/D12634





More information about the lldb-commits mailing list