# HG changeset patch # User Petter T. # Date 1695155304 -7200 # Tue Sep 19 22:28:24 2023 +0200 # Node ID b4b015238ebc5f3056c96283af3f951efdfa8561 # Parent 228e7b6332d5ca8e575e9a1c7f78d1a90b055632 VM Collect script frames properly for e.g. who who() printed all script frames instead of only the outer for bytecode frames. * libinterp/corefcn/stack-frame.cc: Limit collection. diff -r 228e7b6332d5 -r b4b015238ebc libinterp/corefcn/stack-frame.cc --- a/libinterp/corefcn/stack-frame.cc Tue Sep 19 15:16:14 2023 -0400 +++ b/libinterp/corefcn/stack-frame.cc Tue Sep 19 22:28:24 2023 +0200 @@ -1422,6 +1422,8 @@ return *m_lazy_data; } + bool is_script_frame () { return m_unwind_data->m_is_script; } + lazy_data_struct *m_lazy_data = nullptr; private: @@ -2343,7 +2345,9 @@ void visit_bytecode_fcn_stack_frame (bytecode_fcn_stack_frame& frame) { - append_list (frame); + // For scripts, only collect symbol info in the outer most frame + if (!frame.is_script_frame ()) + append_list (frame); std::shared_ptr alink = frame.access_link ();