# HG changeset patch # User Rik # Date 1390594847 28800 # Node ID 12eb4eb90486e646da1908648f3be97ccde8c66e # Parent 73f81a7509a29665cf99fecd9fbb7348aa1b170a Fix dbtype problems when used in subfunctions. * debug.cc (Fdbtype): Use fcn_file_name() rather than name() when passing argument to do_dbtype. diff -r 73f81a7509a2 -r 12eb4eb90486 libinterp/corefcn/debug.cc --- a/libinterp/corefcn/debug.cc Fri Jan 24 11:46:00 2014 -0800 +++ b/libinterp/corefcn/debug.cc Fri Jan 24 12:20:47 2014 -0800 @@ -946,7 +946,7 @@ dbg_fcn = get_user_code (); if (dbg_fcn) - do_dbtype (octave_stdout, dbg_fcn->name (), 0, + do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (), 0, std::numeric_limits::max ()); else error ("dbtype: must be inside a user function to give no arguments to dbtype\n"); @@ -978,7 +978,8 @@ error ("dbtype: start and end lines must be >= 1\n"); if (start <= end) - do_dbtype (octave_stdout, dbg_fcn->name (), start, end); + do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (), + start, end); else error ("dbtype: start line must be less than end line\n"); } @@ -988,7 +989,7 @@ dbg_fcn = get_user_code (arg); if (dbg_fcn) - do_dbtype (octave_stdout, dbg_fcn->name (), 0, + do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (), 0, std::numeric_limits::max ()); else error ("dbtype: function <%s> not found\n", arg.c_str ()); @@ -1026,7 +1027,7 @@ error ("dbtype: start and end lines must be >= 1\n"); if (start <= end) - do_dbtype (octave_stdout, dbg_fcn->name (), start, end); + do_dbtype (octave_stdout, dbg_fcn->fcn_file_name (), start, end); else error ("dbtype: start line must be less than end line\n"); }