From 9205142009c2ba2adda38626c92bc71f5d444a97 Mon Sep 17 00:00:00 2001 From: Gabriel Kerneis Date: Mon, 9 Jun 2014 15:02:13 +0100 Subject: Add "continuation" command in interpreter This displays the full continuation of the current breakpoint, which is basically the closest that we have from the "context" requested by Peter. Especially using it after the "execute" breakpoint shows the code of the instruction to be executed. --- src/lem_interp/run_interp.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/lem_interp/run_interp.ml b/src/lem_interp/run_interp.ml index 16ec976a..38336b4d 100644 --- a/src/lem_interp/run_interp.ml +++ b/src/lem_interp/run_interp.ml @@ -264,6 +264,7 @@ let run next go to next break point [default] run complete current execution, stack print call stack + cont print continuation of the top stack frame env print content of environment mem print content of memory quit exit interpreter" in @@ -281,6 +282,10 @@ let run | "s" | "stack" -> List.iter print_exp (compact_stack stack); interact env stack + | "c" | "cont" | "continuation" -> + (* print not-compacted continuation *) + print_exp (top_frame_exp stack); + interact env stack | "show_casts" -> Pretty_interp.ignore_casts := false; interact env stack -- cgit v1.2.3