Mercurial > hg > octave-nkf
diff src/debug.cc @ 4748:7b145222fea3
[project @ 2004-02-07 06:27:27 by jwe]
author | jwe |
---|---|
date | Sat, 07 Feb 2004 06:27:28 +0000 |
parents | 7b957b442818 |
children | 4c8a2e4e0717 |
line wrap: on
line diff
--- a/src/debug.cc +++ b/src/debug.cc @@ -73,8 +73,8 @@ } } } - else if (curr_function) - dbg_fcn = curr_function; + else if (curr_function && curr_function->is_user_function ()) + dbg_fcn = dynamic_cast<octave_user_function *> (curr_function); return dbg_fcn; } @@ -282,11 +282,14 @@ { octave_value retval; - octave_user_function *dbg_fcn = curr_function; + octave_user_function *dbg_fcn = 0; + + if (curr_function && curr_function->is_user_function ()) + dbg_fcn = dynamic_cast<octave_user_function *> (curr_function); if (dbg_fcn) { - std::string name = dbg_fcn->function_name (); + std::string name = dbg_fcn->name (); octave_stdout << name << ":"; @@ -369,7 +372,7 @@ dbg_fcn = get_user_function (); if (dbg_fcn) - do_dbtype (octave_stdout, dbg_fcn->function_name (), 0, INT_MAX); + do_dbtype (octave_stdout, dbg_fcn->name (), 0, INT_MAX); else error ("dbtype: must be in a user function to give no arguments to dbtype\n"); break; @@ -378,7 +381,7 @@ dbg_fcn = get_user_function (argv[1]); if (dbg_fcn) - do_dbtype (octave_stdout, dbg_fcn->function_name (), 0, INT_MAX); + do_dbtype (octave_stdout, dbg_fcn->name (), 0, INT_MAX); else { dbg_fcn = get_user_function (""); @@ -399,7 +402,7 @@ if (start < end) do_dbtype (octave_stdout, - dbg_fcn->function_name (), start, end); + dbg_fcn->name (), start, end); else error ("dbtype: the start line must be less than the end line\n"); } @@ -428,7 +431,7 @@ if (start < end) do_dbtype (octave_stdout, - dbg_fcn->function_name (), start, end); + dbg_fcn->name (), start, end); else error ("dbtype: the start line must be less than the end line\n"); }