From 78b29b360adb82bf57ae77d083833d0135482f96 Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Sat, 26 Nov 2016 19:13:22 -0800 Subject: [PATCH] Dump return value when returning. --- src/interpreter/terminator/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interpreter/terminator/mod.rs b/src/interpreter/terminator/mod.rs index 7696b0e0fc1..8f58105de4b 100644 --- a/src/interpreter/terminator/mod.rs +++ b/src/interpreter/terminator/mod.rs @@ -29,7 +29,10 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> { ) -> EvalResult<'tcx, ()> { use rustc::mir::TerminatorKind::*; match terminator.kind { - Return => self.pop_stack_frame()?, + Return => { + self.dump_local(self.frame().return_lvalue); + self.pop_stack_frame()? + } Goto { target } => self.goto_block(target),