comparison 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
comparison
equal deleted inserted replaced
18439:d5aa615dcf4c 18440:96a495813047
276 } 276 }
277 277
278 static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame) 278 static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame)
279 { 279 {
280 return instance_ok () 280 return instance_ok ()
281 ? instance->do_backtrace (nskip, curr_user_frame) : octave_map (); 281 ? instance->do_backtrace (nskip, curr_user_frame, true)
282 : octave_map ();
283 }
284
285 static octave_map backtrace (size_t nskip, octave_idx_type& curr_user_frame,
286 bool print_subfn)
287 {
288 return instance_ok ()
289 ? instance->do_backtrace (nskip, curr_user_frame, print_subfn)
290 : octave_map ();
282 } 291 }
283 292
284 static octave_map empty_backtrace (void); 293 static octave_map empty_backtrace (void);
285 294
286 static void pop (void) 295 static void pop (void)
412 elt.column = c; 421 elt.column = c;
413 } 422 }
414 } 423 }
415 424
416 octave_map do_backtrace (size_t nskip, 425 octave_map do_backtrace (size_t nskip,
417 octave_idx_type& curr_user_frame) const; 426 octave_idx_type& curr_user_frame,
427 bool print_subfn) const;
418 428
419 bool do_goto_frame (size_t n, bool verbose); 429 bool do_goto_frame (size_t n, bool verbose);
420 430
421 bool do_goto_frame_relative (int n, bool verbose); 431 bool do_goto_frame_relative (int n, bool verbose);
422 432