#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 (tree_evaluator &tw) | |
~bp_table (void)=default | |
intmap | add_breakpoint (const std::string &fname="", const std::string &class_name="", 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 *who, const octave_value_list &args, std::string &func_name, std::string &class_name, bp_table::intmap &lines, std::string &cond) |
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) |
void | process_id_list (const char *who, const std::string &condition, const octave_value_list &args, int nargin, int &pos, bool on_off, std::set< std::string > &id_list) |
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) |
void | set_stop_flag (const char *who, const std::string &condition, bool on_off) |
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 |
tree_evaluator & | m_evaluator |
std::set< std::string > | m_warnings_that_stop |
Definition at line 53 of file bp-table.h.
|
private |
Definition at line 135 of file bp-table.h.
|
private |
Definition at line 134 of file bp-table.h.
typedef fname_bp_map::const_iterator octave::bp_table::const_fname_bp_map_iterator |
Definition at line 76 of file bp-table.h.
typedef fname_line_map::const_iterator octave::bp_table::const_fname_line_map_iterator |
Definition at line 72 of file bp-table.h.
typedef intmap::const_iterator octave::bp_table::const_intmap_iterator |
Definition at line 67 of file bp-table.h.
typedef std::map<std::string, std::list<bp_type> > octave::bp_table::fname_bp_map |
Definition at line 75 of file bp-table.h.
typedef fname_bp_map::iterator octave::bp_table::fname_bp_map_iterator |
Definition at line 77 of file bp-table.h.
typedef std::map<std::string, intmap> octave::bp_table::fname_line_map |
Definition at line 70 of file bp-table.h.
typedef fname_line_map::iterator octave::bp_table::fname_line_map_iterator |
Definition at line 73 of file bp-table.h.
typedef std::map<int, int> octave::bp_table::intmap |
Definition at line 65 of file bp-table.h.
typedef intmap::iterator octave::bp_table::intmap_iterator |
Definition at line 68 of file bp-table.h.
|
inline |
Definition at line 57 of file bp-table.h.
|
default |
bp_table::intmap octave::bp_table::add_breakpoint | ( | const std::string & | fname = "" , |
const std::string & | class_name = "" , |
||
const intmap & | lines = intmap () , |
||
const std::string & | condition = "" |
||
) |
Definition at line 615 of file bp-table.cc.
References add_breakpoint_1(), condition_valid(), error(), octave::find_fcn_by_line(), octave::tree_evaluator::get_user_code(), Array< T >::insert(), len, m, m_evaluator, octave::tree_evaluator::reset_debug_state(), and retval.
Referenced by Fdbstop().
|
private |
Definition at line 175 of file bp-table.cc.
References octave::tree_statement_list::add_breakpoint(), octave_user_code::body(), octave_user_code::fcn_file_name(), octave::interpreter::get_event_manager(), octave::tree_evaluator::get_interpreter(), m_bp_set, m_evaluator, and retval.
Referenced by add_breakpoint().
bool octave::bp_table::condition_valid | ( | const std::string & | cond | ) |
Definition at line 222 of file bp-table.cc.
References error(), octave::tree_statement::expression(), octave::tree_evaluator::get_interpreter(), octave::tree_expression::is_assignment_expression(), octave::tree_statement::is_expression(), m_evaluator, octave::base_parser::reset(), octave::parser::run(), and octave::base_parser::statement_list().
Referenced by add_breakpoint(), and octave::file_editor_tab::handle_dbstop_if().
void octave::bp_table::dbclear_all_signals | ( | void | ) |
Definition at line 60 of file bp-table.cc.
References octave::error_system::debug_on_caught(), octave::error_system::debug_on_error(), octave::error_system::debug_on_warning(), octave::interpreter::get_error_system(), octave::tree_evaluator::get_interpreter(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, and octave::Vdebug_on_interrupt.
Referenced by Fdbclear().
void octave::bp_table::dbstop_process_map_args | ( | const octave_map & | mv | ) |
Definition at line 80 of file bp-table.cc.
References octave_map::contents(), octave::error_system::debug_on_caught(), octave::error_system::debug_on_error(), octave::error_system::debug_on_warning(), error(), octave::interpreter::get_error_system(), octave::tree_evaluator::get_interpreter(), Cell::index(), Array< T >::isempty(), octave_map::isfield(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, Array< T >::numel(), V, and octave::Vdebug_on_interrupt.
Referenced by Fdbstop().
|
inline |
Definition at line 109 of file bp-table.h.
Referenced by octave::tree_evaluator::visit_statement().
|
inline |
Definition at line 103 of file bp-table.h.
Referenced by octave::tree_evaluator::visit_statement().
|
inline |
Definition at line 115 of file bp-table.h.
Referenced by octave::error_system::vwarning().
bp_table::fname_bp_map octave::bp_table::get_breakpoint_list | ( | const octave_value_list & | fname_list | ) |
Definition at line 826 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::tree_evaluator::get_user_code(), m_bp_set, m_evaluator, octave_function::name(), retval, octave_function::subfunction_names(), octave_user_code::subfunctions(), and octave_base_value::user_code_value().
Referenced by Fdbstatus().
|
inline |
Definition at line 100 of file bp-table.h.
Referenced by octave::tree_jit::enabled(), and octave::tree_evaluator::reset_debug_state().
void octave::bp_table::parse_dbfunction_params | ( | const char * | who, |
const octave_value_list & | args, | ||
std::string & | func_name, | ||
std::string & | class_name, | ||
bp_table::intmap & | lines, | ||
std::string & | cond | ||
) |
Definition at line 282 of file bp-table.cc.
References octave_value_list::array_value(), octave::dbstop_at, octave::dbstop_if, octave::dbstop_in, octave::dbstop_none, Array< T >::elem(), error(), octave::tree_evaluator::get_user_code(), octave::tree_evaluator::in_debug_repl(), octave_value_list::length(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, Array< T >::numel(), print_usage(), process_id_list(), octave_function::profiler_name(), octave::string::strcmp(), octave::Vdebug_on_interrupt, and warning().
Referenced by Fdbclear(), and Fdbstop().
|
private |
Definition at line 512 of file bp-table.cc.
References error(), set_stop_flag(), and octave::Vdebug_on_interrupt.
Referenced by parse_dbfunction_params().
void octave::bp_table::remove_all_breakpoints | ( | void | ) |
Definition at line 794 of file bp-table.cc.
References m_bp_set, m_evaluator, remove_all_breakpoints_in_file(), and octave::tree_evaluator::reset_debug_state().
Referenced by Fdbclear().
bp_table::intmap octave::bp_table::remove_all_breakpoints_in_file | ( | const std::string & | fname, |
bool | silent = false |
||
) |
Definition at line 759 of file bp-table.cc.
References octave_user_code::body(), error(), octave_user_code::fcn_file_name(), octave::interpreter::get_event_manager(), octave::tree_evaluator::get_interpreter(), octave::tree_evaluator::get_user_code(), m_bp_set, m_evaluator, octave::tree_statement_list::remove_all_breakpoints(), octave::tree_evaluator::reset_debug_state(), and retval.
Referenced by octave::out_of_date_check(), remove_all_breakpoints(), and remove_breakpoint().
|
private |
int octave::bp_table::remove_breakpoint | ( | const std::string & | fname = "" , |
const intmap & | lines = intmap () |
||
) |
Definition at line 708 of file bp-table.cc.
References error(), octave::tree_evaluator::get_user_code(), len, m_evaluator, remove_all_breakpoints_in_file(), remove_breakpoint_1(), octave::tree_evaluator::reset_debug_state(), retval, Array< T >::size(), octave_function::subfunction_names(), octave_user_code::subfunctions(), and octave_base_value::user_code_value().
Referenced by Fdbclear().
|
private |
Definition at line 656 of file bp-table.cc.
References octave_user_code::body(), octave::tree_statement_list::delete_breakpoint(), octave_value_list::empty(), octave_user_code::fcn_file_name(), octave::interpreter::get_event_manager(), octave::tree_evaluator::get_interpreter(), len, octave_value_list::length(), octave::tree_statement_list::list_breakpoints(), m_bp_set, m_evaluator, retval, and octave::event_manager::update_breakpoint().
Referenced by remove_breakpoint().
|
private |
Definition at line 496 of file bp-table.cc.
References octave::error_system::debug_on_caught(), octave::error_system::debug_on_error(), octave::error_system::debug_on_warning(), error(), octave::interpreter::get_error_system(), octave::tree_evaluator::get_interpreter(), and m_evaluator.
Referenced by process_id_list().
octave_map octave::bp_table::stop_on_err_warn_status | ( | bool | to_screen | ) |
Definition at line 901 of file bp-table.cc.
References Array< T >::assign(), octave::error_system::debug_on_caught(), octave::error_system::debug_on_error(), octave::error_system::debug_on_warning(), octave::interpreter::get_error_system(), octave::tree_evaluator::get_interpreter(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, octave_stdout, octave_value(), retval, octave::Vdebug_on_interrupt, and Faddeeva::w().
Referenced by Fdbstatus().
|
private |
Definition at line 140 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 146 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 145 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 add_breakpoint(), add_breakpoint_1(), condition_valid(), dbclear_all_signals(), dbstop_process_map_args(), get_breakpoint_list(), parse_dbfunction_params(), remove_all_breakpoints(), remove_all_breakpoints_in_file(), remove_breakpoint(), remove_breakpoint_1(), set_stop_flag(), and stop_on_err_warn_status().
|
private |
Definition at line 147 of file bp-table.h.
Referenced by dbclear_all_signals(), dbstop_process_map_args(), parse_dbfunction_params(), and stop_on_err_warn_status().