Mercurial > hg > octave-jordi
changeset 15400:2b8d9eac2c2e
provide debug functions
* debug.h, debug.cc (debug_continue, debug_step, debug_quit):
New functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 17 Sep 2012 22:37:58 -0400 |
parents | 66e17621f99a |
children | 4d0ed64a6d19 |
files | libinterp/interpfcn/debug.cc libinterp/interpfcn/debug.h |
diffstat | 2 files changed, 30 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/debug.cc +++ b/libinterp/interpfcn/debug.cc @@ -1201,6 +1201,17 @@ DEFALIAS (dbnext, dbstep); +void +debug_step (const std::string& what) +{ + octave_value_list args; + + if (! what.empty ()) + args(0) = what; + + Fdbstep (args); +} + DEFUN (dbcont, args, , "-*- texinfo -*-\n\ @deftypefn {Command} {} dbcont\n\ @@ -1225,6 +1236,12 @@ return octave_value_list (); } +void +debug_continue (void) +{ + Fdbcont (); +} + DEFUN (dbquit, args, , "-*- texinfo -*-\n\ @deftypefn {Command} {} dbquit\n\ @@ -1252,6 +1269,12 @@ return octave_value_list (); } +void +debug_quit (void) +{ + Fdbquit (); +} + DEFUN (isdebugmode, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isdebugmode ()\n\
--- a/libinterp/interpfcn/debug.h +++ b/libinterp/interpfcn/debug.h @@ -129,6 +129,12 @@ bool do_have_breakpoints (void) { return (! bp_set.empty ()); } }; -std::string get_file_line (const std::string& fname, size_t line); +extern std::string get_file_line (const std::string& fname, size_t line); + +extern void OCTINTERP_API debug_continue (void); + +extern void OCTINTERP_API debug_step (const std::string& what = std::string ()); + +extern void OCTINTERP_API debug_quit (void); #endif