Mercurial > octave
changeset 21753:be52b94354a3
Restore ability to breakpoint scripts (not functions) (bug #47917).
* debug.cc (bp_table::do_add_breakpoint): Add 'else' clause for scripts.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Tue, 17 May 2016 22:45:07 +1000 |
parents | 949cb46e6bdb |
children | 34a582f2edd7 |
files | libinterp/corefcn/debug.cc |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc Fri May 20 10:47:33 2016 -0400 +++ b/libinterp/corefcn/debug.cc Tue May 17 22:45:07 2016 +1000 @@ -716,10 +716,15 @@ ->ending_line (); if (e >= lineno && e < earliest_end) dbg_fcn = main_fcn; + + if (! dbg_fcn) + dbg_fcn = next_fcn; } - - if (! dbg_fcn) - dbg_fcn = next_fcn; + else + { + if (! dbg_fcn) + dbg_fcn = main_fcn; + } // We've found the right (sub)function. Now insert the breakpoint. // We insert all breakpoints.