diff libinterp/corefcn/toplev.h @ 18440:96a495813047

Don't put parent function in subfunction stack structure name (bug #41506). * debug.cc (do_dbstack): When returning a structure, call octave_call_stack::backtrace with print_subfn set to false. * toplev.h (octave_call_stack::backtrace): Create new 2 argument function signature which calls do_backtrace with print_subfn set to true. Create new 3 argument function signature which passes print_subfn argument through to do_backtrace. * toplev.cc (octave_call_stack::do_backtrace): Change function to accept 3rd argument, print_subfn, which decides whether the parent function should be printed in the name field of the backtrace.
author Rik <rik@octave.org>
date Sat, 08 Feb 2014 14:44:21 -0800
parents bc139ccccef9
children 972abb60c30f
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.h	Sat Feb 08 17:10:01 2014 -0500
+++ b/libinterp/corefcn/toplev.h	Sat Feb 08 14:44:21 2014 -0800
@@ -278,7 +278,16 @@
   static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame)
   {
     return instance_ok ()
-           ? instance->do_backtrace (nskip, curr_user_frame) : octave_map ();
+           ? instance->do_backtrace (nskip, curr_user_frame, true)
+           : octave_map ();
+  }
+
+  static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame,
+                               bool print_subfn)
+  {
+    return instance_ok ()
+           ? instance->do_backtrace (nskip, curr_user_frame, print_subfn)
+           : octave_map ();
   }
 
   static octave_map empty_backtrace (void);
@@ -414,7 +423,8 @@
   }
 
   octave_map do_backtrace (size_t nskip,
-                           octave_idx_type& curr_user_frame) const;
+                           octave_idx_type& curr_user_frame,
+                           bool print_subfn) const;
 
   bool do_goto_frame (size_t n, bool verbose);