<div dir="ltr">Hi Illia,<div><br></div><div>This appears to have broken Linux i386 gcc 4.9.2</div><div><br></div><div><a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2419">http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2419</a><br></div><div><br></div><div>Is it a quick fix?</div><div><br></div><div>If not, can you roll back?</div><div><br></div><div>Thanks,</div><div><br></div><div>Vince</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 9:13 AM, Ilia K <span dir="ltr"><<a href="mailto:ki.stfu@gmail.com" target="_blank">ki.stfu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ki.stfu<br>
Date: Fri May 15 11:13:51 2015<br>
New Revision: 237454<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=237454&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=237454&view=rev</a><br>
Log:<br>
Improve the MiVarTestCase.test_lldbmi_var_list_children test (MI)<br>
<br>
Modified:<br>
    lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py<br>
    lldb/trunk/test/tools/lldb-mi/variable/main.cpp<br>
<br>
Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237454&r1=237453&r2=237454&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237454&r1=237453&r2=237454&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)<br>
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15 11:13:51 2015<br>
@@ -239,8 +239,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe<br>
         self.runCmd("-file-exec-and-symbols %s" % self.myexe)<br>
         self.expect("\^done")<br>
<br>
-        # Run to BP_var_list_children<br>
-        line = line_number('main.cpp', '// BP_var_list_children')<br>
+        # Run to BP_var_list_children_test<br>
+        line = line_number('main.cpp', '// BP_var_list_children_test')<br>
         self.runCmd("-break-insert main.cpp:%d" % line)<br>
         self.expect("\^done,bkpt={number=\"1\"")<br>
         self.runCmd("-exec-run")<br>
@@ -252,6 +252,8 @@ class MiVarTestCase(lldbmi_testcase.MiTe<br>
         self.expect("\^done,name=\"var_complx\",numchild=\"3\",value=\"\{\.\.\.\}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"")<br>
         self.runCmd("-var-create var_complx_array * complx_array")<br>
         self.expect("\^done,name=\"var_complx_array\",numchild=\"2\",value=\"\[2\]\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")<br>
+        self.runCmd("-var-create var_pcomplx * pcomplx")<br>
+        self.expect("\^done,name=\"var_pcomplx\",numchild=\"2\",value=\"\{\.\.\.\}\",type=\"pcomplex_type\",thread-id=\"1\",has_more=\"0\"")<br>
<br>
         # Test that -var-list-children lists empty children if range is empty<br>
         # (and that print-values is optional)<br>
@@ -268,24 +270,38 @@ class MiVarTestCase(lldbmi_testcase.MiTe<br>
         self.expect("\^done,numchild=\"3\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",value=\"3\",has_more=\"0\"\},child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\},child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",value=\"0x[0-9a-f]+\",has_more=\"0\"\}\],has_more=\"0\"")<br>
         self.runCmd("-var-list-children --simple-values var_complx_array")<br>
         self.expect("\^done,numchild=\"2\",children=\[child=\{name=\"var_complx_array\.\[0\]\",exp=\"\[0\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\},child=\{name=\"var_complx_array\.\[1\]\",exp=\"\[1\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
+        self.runCmd("-var-list-children 0 var_pcomplx")<br>
+        self.expect("\^done,numchild=\"2\",children=\[child=\{name=\"var_pcomplx\.complex_type\",exp=\"complex_type\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\},child={name=\"var_pcomplx\.complx\",exp=\"complx\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
<br>
         # Test that -var-list-children lists children without values<br>
         self.runCmd("-var-list-children 0 var_complx 0 1")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
         self.runCmd("-var-list-children --no-values var_complx 0 1")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
+        self.runCmd("-var-list-children --no-values var_complx_array 0 1")<br>
+        self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx_array\.\[0\]\",exp=\"\[0\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
+        self.runCmd("-var-list-children --no-values var_pcomplx 0 1")<br>
+        self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_pcomplx\.complex_type\",exp=\"complex_type\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
<br>
         # Test that -var-list-children lists children with all values<br>
         self.runCmd("-var-list-children 1 var_complx 1 2")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")<br>
         self.runCmd("-var-list-children --all-values var_complx 1 2")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")<br>
+        self.runCmd("-var-list-children --all-values var_complx_array 1 2")<br>
+        self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx_array\.\[1\]\",exp=\"\[1\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"0\"")<br>
+        self.runCmd("-var-list-children --all-values var_pcomplx 1 2")<br>
+        self.expect("\^done,numchild=\"1\",children=\[child={name=\"var_pcomplx\.complx\",exp=\"complx\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"0\"")<br>
<br>
         # Test that -var-list-children lists children with simple values<br>
         self.runCmd("-var-list-children 2 var_complx 2 4")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
         self.runCmd("-var-list-children --simple-values var_complx 2 4")<br>
         self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
+        self.runCmd("-var-list-children --simple-values var_complx_array 2 4")<br>
+        self.expect("\^done,numchild=\"0\",has_more=\"0\"")<br>
+        self.runCmd("-var-list-children --simple-values var_pcomplx 2 4")<br>
+        self.expect("\^done,numchild=\"0\",has_more=\"0\"")<br>
<br>
         # Test that an invalid from is handled<br>
         # FIXME: -1 is treated as unsigned int<br>
<br>
Modified: lldb/trunk/test/tools/lldb-mi/variable/main.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/main.cpp?rev=237454&r1=237453&r2=237454&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/main.cpp?rev=237454&r1=237453&r2=237454&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/test/tools/lldb-mi/variable/main.cpp (original)<br>
+++ lldb/trunk/test/tools/lldb-mi/variable/main.cpp Fri May 15 11:13:51 2015<br>
@@ -16,6 +16,16 @@ struct complex_type<br>
     complex_type *complex_ptr;<br>
 };<br>
<br>
+struct pcomplex_type : complex_type<br>
+{<br>
+    pcomplex_type(const complex_type &complx_base, const complex_type &complx_member)<br>
+        : complex_type(complx_base), complx(complx_member) { }<br>
+    complex_type complx;<br>
+    static int si;<br>
+};<br>
+<br>
+int pcomplex_type::si;<br>
+<br>
 void<br>
 var_update_test(void)<br>
 {<br>
@@ -35,15 +45,15 @@ var_update_test(void)<br>
 }<br>
<br>
 void<br>
-var_list_children(void)<br>
+var_list_children_test(void)<br>
 {<br>
     complex_type complx = { 3, { 3L }, &complx };<br>
     complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } };<br>
+    pcomplex_type pcomplx({ 6, { 6L }, &pcomplx}, { 7, { 7L }, &pcomplx});<br>
<br>
-    // BP_var_list_children<br>
+    // BP_var_list_children_test<br>
 }<br>
<br>
-<br>
 void<br>
 gdb_set_show_print_char_array_as_string_test(void)<br>
 {<br>
@@ -84,7 +94,7 @@ main(int argc, char const *argv[])<br>
     int a = 10, b = 20;<br>
     s_MyVar = a + b;<br>
     var_update_test();<br>
-    var_list_children();<br>
+    var_list_children_test();<br>
     gdb_set_show_print_char_array_as_string_test();<br>
     gdb_set_show_print_expand_aggregates();<br>
     gdb_set_show_print_aggregate_field_names();<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br></div>