#include "bp-table.h"
Public Types | |
typedef fname_bp_map::const_iterator | const_fname_bp_map_iterator |
typedef fname_line_map::const_iterator | const_fname_line_map_iterator |
typedef intmap::const_iterator | const_intmap_iterator |
typedef std::map< std::string, std::list< bp_type > > | fname_bp_map |
typedef fname_bp_map::iterator | fname_bp_map_iterator |
typedef std::map< std::string, intmap > | fname_line_map |
typedef fname_line_map::iterator | fname_line_map_iterator |
typedef std::map< int, int > | intmap |
typedef intmap::iterator | intmap_iterator |
Public Member Functions | |
bp_table (void) | |
~bp_table (void)=default | |
intmap | add_breakpoint (const std::string &fname="", const intmap &lines=intmap(), const std::string &condition="") |
bool | condition_valid (const std::string &cond) |
void | dbclear_all_signals (void) |
void | dbstop_process_map_args (const octave_map &mv) |
bool | debug_on_caught (const std::string &id) |
bool | debug_on_err (const std::string &id) |
bool | debug_on_warn (const std::string &id) |
fname_bp_map | get_breakpoint_list (const octave_value_list &fname_list) |
bool | have_breakpoints (void) |
void | parse_dbfunction_params (const char *, const octave_value_list &, std::string &, bp_table::intmap &, std::string &) |
void | remove_all_breakpoints (void) |
intmap | remove_all_breakpoints_in_file (const std::string &fname, bool silent=false) |
int | remove_breakpoint (const std::string &fname="", const intmap &lines=intmap()) |
octave_map | stop_on_err_warn_status (bool to_screen) |
Private Types | |
typedef std::set< std::string >::iterator | bp_set_iterator |
typedef std::set< std::string >::const_iterator | const_bp_set_iterator |
Private Member Functions | |
bool | add_breakpoint_1 (octave_user_code *fcn, const std::string &fname, const intmap &line, const std::string &condition, intmap &retval) |
intmap | remove_all_breakpoints_in_file_1 (octave_user_code *fcn, const std::string &fname) |
int | remove_breakpoint_1 (octave_user_code *fcn, const std::string &, const intmap &lines) |
Private Attributes | |
std::set< std::string > | m_bp_set |
std::set< std::string > | m_caught_that_stop |
std::set< std::string > | m_errors_that_stop |
std::set< std::string > | m_warnings_that_stop |
Definition at line 48 of file bp-table.h.
|
private |
Definition at line 129 of file bp-table.h.
|
private |
Definition at line 128 of file bp-table.h.
typedef fname_bp_map::const_iterator octave::bp_table::const_fname_bp_map_iterator |
Definition at line 71 of file bp-table.h.
typedef fname_line_map::const_iterator octave::bp_table::const_fname_line_map_iterator |
Definition at line 67 of file bp-table.h.
typedef intmap::const_iterator octave::bp_table::const_intmap_iterator |
Definition at line 62 of file bp-table.h.
Definition at line 70 of file bp-table.h.
typedef fname_bp_map::iterator octave::bp_table::fname_bp_map_iterator |
Definition at line 72 of file bp-table.h.
Definition at line 65 of file bp-table.h.
typedef fname_line_map::iterator octave::bp_table::fname_line_map_iterator |
Definition at line 68 of file bp-table.h.
typedef std::map<int, int> octave::bp_table::intmap |
Definition at line 60 of file bp-table.h.
typedef intmap::iterator octave::bp_table::intmap_iterator |
Definition at line 63 of file bp-table.h.
|
inline |
Definition at line 52 of file bp-table.h.
|
default |
bp_table::intmap octave::bp_table::add_breakpoint | ( | const std::string & | fname = "" , |
const intmap & | lines = intmap () , |
||
const std::string & | condition = "" |
||
) |
Definition at line 554 of file bp-table.cc.
References add_breakpoint_1(), condition_valid(), octave::tree_evaluator::debug_mode, error(), octave::find_fcn_by_line(), fname, octave::get_user_code(), have_breakpoints(), i, retval, and Vdebugging.
Referenced by octave::file_editor_tab::add_breakpoint_callback().
|
private |
Definition at line 168 of file bp-table.cc.
References octave::tree_statement_list::add_breakpoint(), fcn, octave_function::fcn_file_name(), file, fname, found, m_bp_set, retval, s, and string.
Referenced by add_breakpoint().
bool octave::bp_table::condition_valid | ( | const std::string & | cond | ) |
Definition at line 211 of file bp-table.cc.
References error(), octave::tree_statement::expression(), octave::base_list< elt_type >::front(), octave::tree_expression::is_assignment_expression(), octave::tree_statement::is_expression(), octave::base_list< elt_type >::length(), octave::base_parser::m_stmt_list, octave::base_parser::reset(), and octave::parser::run().
Referenced by add_breakpoint(), and octave::file_editor_tab::handle_context_menu_break_condition().
void octave::bp_table::dbclear_all_signals | ( | void | ) |
Definition at line 62 of file bp-table.cc.
References m_caught_that_stop, m_errors_that_stop, m_warnings_that_stop, Vdebug_on_caught, Vdebug_on_error, octave::Vdebug_on_interrupt, and Vdebug_on_warning.
void octave::bp_table::dbstop_process_map_args | ( | const octave_map & | mv | ) |
Definition at line 79 of file bp-table.cc.
References octave_map::contents(), error(), i, Cell::index(), Array< T >::isempty(), octave_map::isfield(), m_caught_that_stop, m_errors_that_stop, m_warnings_that_stop, Array< T >::numel(), V, Vdebug_on_caught, Vdebug_on_error, octave::Vdebug_on_interrupt, and Vdebug_on_warning.
|
inline |
Definition at line 103 of file bp-table.h.
Referenced by maybe_enter_debugger().
|
inline |
Definition at line 97 of file bp-table.h.
Referenced by maybe_enter_debugger().
|
inline |
Definition at line 109 of file bp-table.h.
Referenced by warning_1().
bp_table::fname_bp_map octave::bp_table::get_breakpoint_list | ( | const octave_value_list & | fname_list | ) |
Definition at line 759 of file bp-table.cc.
References octave_user_code::body(), octave::tree_statement_list::breakpoints_and_conds(), octave_value_list::empty(), octave::find_bkpt_list(), octave::get_user_code(), m_bp_set, octave_function::name(), retval, string, octave_function::subfunction_names(), octave_user_code::subfunctions(), and octave_base_value::user_code_value().
|
inline |
Definition at line 94 of file bp-table.h.
Referenced by add_breakpoint(), octave::tree_jit::enabled(), remove_all_breakpoints(), remove_all_breakpoints_in_file(), remove_breakpoint(), and octave::tree_evaluator::reset_debug_state().
void octave::bp_table::parse_dbfunction_params | ( | const char * | who, |
const octave_value_list & | args, | ||
std::string & | symbol_name, | ||
bp_table::intmap & | lines, | ||
std::string & | cond | ||
) |
Definition at line 260 of file bp-table.cc.
References arg, octave_value_list::array_value(), octave::dbstop_at, octave::dbstop_if, octave::dbstop_in, octave::dbstop_none, error(), octave::get_user_code(), isnumeric, octave_value_list::length(), m_caught_that_stop, m_errors_that_stop, m_warnings_that_stop, octave_value::numel(), print_usage(), octave_function::profiler_name(), octave::string::strcmp(), string, Vdebug_on_caught, Vdebug_on_error, octave::Vdebug_on_interrupt, Vdebug_on_warning, Vdebugging, and warning().
void octave::bp_table::remove_all_breakpoints | ( | void | ) |
Definition at line 727 of file bp-table.cc.
References octave::tree_evaluator::debug_mode, have_breakpoints(), m_bp_set, remove_all_breakpoints_in_file(), and Vdebugging.
bp_table::intmap octave::bp_table::remove_all_breakpoints_in_file | ( | const std::string & | fname, |
bool | silent = false |
||
) |
Definition at line 695 of file bp-table.cc.
References octave_user_code::body(), octave::tree_evaluator::debug_mode, error(), octave_function::fcn_file_name(), file, fname, octave::get_user_code(), have_breakpoints(), m_bp_set, octave::tree_statement_list::remove_all_breakpoints(), retval, string, and Vdebugging.
Referenced by octave::out_of_date_check(), remove_all_breakpoints(), octave::file_editor_tab::remove_all_breakpoints_callback(), and remove_breakpoint().
|
private |
int octave::bp_table::remove_breakpoint | ( | const std::string & | fname = "" , |
const intmap & | lines = intmap () |
||
) |
Definition at line 643 of file bp-table.cc.
References octave::tree_evaluator::debug_mode, error(), fname, octave::get_user_code(), have_breakpoints(), remove_all_breakpoints_in_file(), remove_breakpoint_1(), retval, octave_value::size(), octave_function::subfunction_names(), octave_user_code::subfunctions(), octave_base_value::user_code_value(), and Vdebugging.
Referenced by octave::file_editor_tab::remove_breakpoint_callback().
|
private |
Definition at line 595 of file bp-table.cc.
References octave::tree_statement_list::delete_breakpoint(), octave_value_list::empty(), fcn, octave_function::fcn_file_name(), file, fname, i, octave_value_list::length(), octave::tree_statement_list::list_breakpoints(), m_bp_set, p, retval, string, and octave_link::update_breakpoint().
Referenced by remove_breakpoint().
octave_map octave::bp_table::stop_on_err_warn_status | ( | bool | to_screen | ) |
Definition at line 834 of file bp-table.cc.
References octave_value::assign(), e, i, m_caught_that_stop, m_errors_that_stop, m_warnings_that_stop, octave_stdout, octave_value(), retval, Vdebug_on_caught, Vdebug_on_error, octave::Vdebug_on_interrupt, Vdebug_on_warning, and Faddeeva::w().
|
private |
Definition at line 132 of file bp-table.h.
Referenced by add_breakpoint_1(), get_breakpoint_list(), remove_all_breakpoints(), remove_all_breakpoints_in_file(), and remove_breakpoint_1().
|
private |
Definition at line 138 of file bp-table.h.
Referenced by dbclear_all_signals(), dbstop_process_map_args(), parse_dbfunction_params(), and stop_on_err_warn_status().
|
private |
Definition at line 137 of file bp-table.h.
Referenced by dbclear_all_signals(), dbstop_process_map_args(), parse_dbfunction_params(), and stop_on_err_warn_status().
|
private |
Definition at line 139 of file bp-table.h.
Referenced by dbclear_all_signals(), dbstop_process_map_args(), parse_dbfunction_params(), and stop_on_err_warn_status().