# HG changeset patch # User John W. Eaton # Date 1264263586 18000 # Node ID d4f813c3f5ed682fa05bfa364ee75f10c71d8d96 # Parent 1a4074e277fe8387ba39e0f790e6a17cd7a3b25a more debug mode fixes diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-01-23 John W. Eaton + + * sighandlers.cc (user_abort): Also set debug_mode if Vdebugging. + * debug.cc (bp_table::do_add_breakpoint, do_remove_all_breakpoints, + bp_table::do_remove_breakpoint, do_remove_all_breakpoints_in_file): + Also set debug_mode if Vdebugging. + * pt-eval.cc (visit_return_command): Actually call reset_debug_state. + (reset_debug_state): Also set debug_mode if Vdebugging. + 2010-01-22 John W. Eaton * octave.cc (octave_main): Use new names for prog_args member diff --git a/src/debug.cc b/src/debug.cc --- a/src/debug.cc +++ b/src/debug.cc @@ -287,7 +287,7 @@ else error ("add_breakpoint: unable to find the function requested\n"); - tree_evaluator::debug_mode = bp_table::have_breakpoints (); + tree_evaluator::debug_mode = bp_table::have_breakpoints () || Vdebugging; return retval; } @@ -343,7 +343,7 @@ error ("remove_breakpoint: unable to find the function requested\n"); } - tree_evaluator::debug_mode = bp_table::have_breakpoints (); + tree_evaluator::debug_mode = bp_table::have_breakpoints () || Vdebugging; return retval; } @@ -382,7 +382,7 @@ error ("remove_all_breakpoint_in_file: " "unable to find the function requested\n"); - tree_evaluator::debug_mode = bp_table::have_breakpoints (); + tree_evaluator::debug_mode = bp_table::have_breakpoints () || Vdebugging; return retval; } @@ -394,7 +394,7 @@ remove_all_breakpoints_in_file (*it); - tree_evaluator::debug_mode = bp_table::have_breakpoints (); + tree_evaluator::debug_mode = bp_table::have_breakpoints () || Vdebugging; } std::string diff --git a/src/pt-eval.cc b/src/pt-eval.cc --- a/src/pt-eval.cc +++ b/src/pt-eval.cc @@ -119,7 +119,7 @@ void tree_evaluator::reset_debug_state (void) { - debug_mode = bp_table::have_breakpoints (); + debug_mode = bp_table::have_breakpoints () || Vdebugging; dbstep_flag = 0; } @@ -647,7 +647,7 @@ { Vdebugging = false; - reset_debug_state; + reset_debug_state (); } else if (tree_evaluator::in_fcn_or_script_body || tree_evaluator::in_loop_command) diff --git a/src/sighandlers.cc b/src/sighandlers.cc --- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -40,6 +40,7 @@ #include "debug.h" #include "defun.h" #include "error.h" +#include "input.h" #include "load-save.h" #include "oct-map.h" #include "pager.h" @@ -375,7 +376,8 @@ { // Clear the flag and do normal interrupt stuff. - tree_evaluator::debug_mode = bp_table::have_breakpoints (); + tree_evaluator::debug_mode + = bp_table::have_breakpoints () || Vdebugging; octave_debug_on_interrupt_state = false; } }