about summary refs log tree commit diff
path: root/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/debuginfo/lexical-scope-in-unconditional-loop.rs')
-rw-r--r--src/test/debuginfo/lexical-scope-in-unconditional-loop.rs77
1 files changed, 70 insertions, 7 deletions
diff --git a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
index 48edd7ae12a..3096dfbd2a6 100644
--- a/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
+++ b/src/test/debuginfo/lexical-scope-in-unconditional-loop.rs
@@ -11,6 +11,9 @@
 // ignore-android: FIXME(#10381)
 
 // compile-flags:-g
+
+// === GDB TESTS ===================================================================================
+
 // gdb-command:rbreak zzz
 // gdb-command:run
 
@@ -82,6 +85,66 @@
 // gdb-check:$13 = 2
 // gdb-command:continue
 
+
+// === LLDB TESTS ==================================================================================
+
+// lldb-command:run
+
+// FIRST ITERATION
+// lldb-command:print x
+// lldb-check:[...]$0 = 0
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$1 = 1
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$2 = 101
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$3 = 101
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$4 = -987
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$5 = 101
+// lldb-command:continue
+
+
+// SECOND ITERATION
+// lldb-command:print x
+// lldb-check:[...]$6 = 1
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$7 = 2
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$8 = 102
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$9 = 102
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$10 = -987
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$11 = 102
+// lldb-command:continue
+
+// lldb-command:print x
+// lldb-check:[...]$12 = 2
+// lldb-command:continue
+
 fn main() {
 
     let mut x = 0i;
@@ -91,35 +154,35 @@ fn main() {
             break;
         }
 
-        zzz();
+        zzz(); // #break
         sentinel();
 
         x += 1;
-        zzz();
+        zzz(); // #break
         sentinel();
 
         // Shadow x
         let x = x + 100;
-        zzz();
+        zzz(); // #break
         sentinel();
 
         // open scope within loop's top level scope
         {
-            zzz();
+            zzz(); // #break
             sentinel();
 
             let x = -987i;
 
-            zzz();
+            zzz(); // #break
             sentinel();
         }
 
         // Check that we get the x before the inner scope again
-        zzz();
+        zzz(); // #break
         sentinel();
     }
 
-    zzz();
+    zzz(); // #break
     sentinel();
 }