summary refs log tree commit diff
path: root/src/test/debug-info
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@gmail>2013-09-03 18:23:59 +0200
committerMichael Woerister <michaelwoerister@gmail>2013-09-04 18:38:46 +0200
commitc49eb075dbb8b1921b3056e0fb1cb87fc0397e15 (patch)
tree4209787541f255b56e418d25b13f60056e8fd9b1 /src/test/debug-info
parente0b63b0e2a83e9c5dca884ddaf1c745e49a597f7 (diff)
downloadrust-c49eb075dbb8b1921b3056e0fb1cb87fc0397e15.tar.gz
rust-c49eb075dbb8b1921b3056e0fb1cb87fc0397e15.zip
debuginfo: Much improved handling of captured variables and by-value arguments.
Diffstat (limited to 'src/test/debug-info')
-rw-r--r--src/test/debug-info/var-captured-in-nested-closure.rs23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/test/debug-info/var-captured-in-nested-closure.rs b/src/test/debug-info/var-captured-in-nested-closure.rs
index 60ad2a3544a..cd20209ddfd 100644
--- a/src/test/debug-info/var-captured-in-nested-closure.rs
+++ b/src/test/debug-info/var-captured-in-nested-closure.rs
@@ -29,6 +29,23 @@
 // check:$7 = 8
 // debugger:continue
 
+// debugger:finish
+// debugger:print variable
+// check:$8 = 1
+// debugger:print constant
+// check:$9 = 2
+// debugger:print a_struct
+// check:$10 = {a = -3, b = 4.5, c = 5}
+// debugger:print *struct_ref
+// check:$11 = {a = -3, b = 4.5, c = 5}
+// debugger:print *owned
+// check:$12 = 6
+// debugger:print managed->val
+// check:$13 = 7
+// debugger:print closure_local
+// check:$14 = 8
+// debugger:continue
+
 #[allow(unused_variable)];
 
 struct Struct {
@@ -59,11 +76,7 @@ fn main() {
             variable = constant + a_struct.a + struct_ref.a + *owned + *managed + closure_local;
         };
 
-        // breaking here will yield a wrong value for 'constant'. In particular, GDB will
-        // read the value of the register that supposedly contains the pointer to 'constant'
-        // and try derefence it. The register, however, already contains the actual value, and
-        // not a pointer to it. -mw
-        // zzz();
+        zzz();
 
         nested_closure();
     };