# HG changeset patch # User John W. Eaton # Date 1361910207 18000 # Node ID f7eb13f1432008812759a341b1717dbbc63cd550 # Parent 5c885c13bfa3357ba3de19e8402aa12bc21a0853 avoid using unwind_protect::run * input.cc (get_debug_input): Use separate frame to restore global command and symbol table state. diff --git a/libinterp/interpfcn/input.cc b/libinterp/interpfcn/input.cc --- a/libinterp/interpfcn/input.cc +++ b/libinterp/interpfcn/input.cc @@ -684,19 +684,21 @@ while (Vdebugging) { + unwind_protect middle_frame; + reset_error_handler (); curr_lexer->reset_parser (); // Save current value of global_command. - frame.protect_var (global_command); + middle_frame.protect_var (global_command); global_command = 0; // Do this with an unwind-protect cleanup function so that the // forced variables will be unmarked in the event of an interrupt. symbol_table::scope_id scope = symbol_table::top_scope (); - frame.add_fcn (symbol_table::unmark_forced_variables, scope); + middle_frame.add_fcn (symbol_table::unmark_forced_variables, scope); int retval = octave_parse_input (); @@ -716,10 +718,6 @@ octave_completion_matches_called = false; } - // Unmark forced variables. - // Restore previous value of global_command. - frame.run (2); - octave_quit (); } }