about summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorWim Looman <wim@nemo157.com>2018-11-07 22:45:21 +0100
committerWim Looman <wim@nemo157.com>2019-02-23 12:13:39 +0100
commit61097bce0dd4d394129ba15d2bbd41ec2dc526ef (patch)
tree88e90499a88781cc033523f2265a088fbd88086b /src/test/debuginfo
parent3e58dabc16b1678da8702c71f70c72644764226c (diff)
downloadrust-61097bce0dd4d394129ba15d2bbd41ec2dc526ef.tar.gz
rust-61097bce0dd4d394129ba15d2bbd41ec2dc526ef.zip
Add debug-info to access variables from generator state
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/generators.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/debuginfo/generators.rs b/src/test/debuginfo/generators.rs
index b56d222e0e0..35a67217f16 100644
--- a/src/test/debuginfo/generators.rs
+++ b/src/test/debuginfo/generators.rs
@@ -7,6 +7,8 @@
 // gdb-command:run
 // gdb-command:print a
 // gdb-check:$1 = 5
+// gdb-command:print d
+// gdb-check:$2 = 6
 
 // === LLDB TESTS ==================================================================================
 
@@ -14,8 +16,11 @@
 // lldb-command:print a
 // lldbg-check:(int) $0 = 5
 // lldbr-check:(int) a = 5
+// lldb-command:print d
+// lldbg-check:(int) $1 = 6
+// lldbr-check:(int) d = 6
 
-#![feature(omit_gdb_pretty_printer_section, generators, generator_trait, pin)]
+#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
 #![omit_gdb_pretty_printer_section]
 
 use std::ops::Generator;
@@ -24,9 +29,10 @@ use std::pin::Pin;
 fn main() {
     let mut a = 5;
     let mut b = || {
+        let d = 6;
         yield;
         _zzz(); // #break
-        a = 6;
+        a = d;
     };
     Pin::new(&mut b).resume();
     Pin::new(&mut b).resume();