diff -r 4929d0dd97d4 libinterp/corefcn/debug.cc --- a/libinterp/corefcn/debug.cc Mon Dec 21 12:53:18 2015 +1100 +++ b/libinterp/corefcn/debug.cc Mon Dec 21 21:16:42 2015 +1100 @@ -820,12 +820,18 @@ bp_table::do_get_breakpoint_list (const { fname_bp_map retval; - for (bp_set_iterator it = bp_set.begin (); it != bp_set.end (); it++) + bp_set_iterator it; + do + { + bp_set_iterator begin = bp_set.begin (); + for (it = bp_set.begin (); it != bp_set.end (); it++) { if (fname_list.length () == 0 || do_find_bkpt_list (fname_list, *it) != "") { octave_user_code *f = get_user_code (*it); + if (begin != bp_set.begin ()) + break; if (f) { @@ -878,6 +884,7 @@ bp_table::do_get_breakpoint_list (const } } } + } while (it != bp_set.end ()); return retval; }