changeset 18374:12eb4eb90486

Fix dbtype problems when used in subfunctions. * debug.cc (Fdbtype): Use fcn_file_name() rather than name() when passing argument to do_dbtype.
author Rik <rik@octave.org>
date Fri, 24 Jan 2014 12:20:47 -0800
parents 73f81a7509a2
children e33f706468bc
files libinterp/corefcn/debug.cc
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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<int>::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<int>::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");
             }