# HG changeset patch # User John W. Eaton # Date 1575063754 21600 # Node ID 223981108144a8377124b7437a3c84c3ae755560 # Parent 16e83787f9702da9dee2b8737773a92a8b8e3c7d fix stack frame location info when using debugger (bug #57315) * pt-eval.cc (tree_evaluator::visit_statement, tree_evaluator::visit_if_command_list): Set current location in call stack when when in debug repl or when current frame is different from debug frame instead of when m_statement_context is SC_FUNCTION or SC_SCRIPT. diff -r 16e83787f970 -r 223981108144 libinterp/parse-tree/pt-eval.cc --- a/libinterp/parse-tree/pt-eval.cc Sun Dec 01 19:51:35 2019 -0600 +++ b/libinterp/parse-tree/pt-eval.cc Fri Nov 29 15:42:34 2019 -0600 @@ -2562,8 +2562,8 @@ { tree_expression *expr = tic->condition (); - if (m_statement_context == SC_FUNCTION - || m_statement_context == SC_SCRIPT) + if (! (in_debug_repl () + && m_call_stack.current_frame () == m_debug_frame)) m_call_stack.set_location (tic->line (), tic->column ()); if (m_debug_mode && ! tic->is_else_clause ()) @@ -2692,8 +2692,8 @@ if (cmd || expr) { - if (m_statement_context == SC_FUNCTION - || m_statement_context == SC_SCRIPT) + if (! (in_debug_repl () + && m_call_stack.current_frame () == m_debug_frame)) m_call_stack.set_location (stmt.line (), stmt.column ()); try