#include "bp-table.h"
Public Types | |
typedef std::set< int > | bp_lines |
typedef bp_lines::iterator | bp_lines_iterator |
typedef bp_lines::const_iterator | const_bp_lines_iterator |
typedef fname_bp_map::const_iterator | const_fname_bp_map_iterator |
typedef fname_line_map::const_iterator | const_fname_line_map_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, bp_lines > | fname_line_map |
typedef fname_line_map::iterator | fname_line_map_iterator |
Public Member Functions | |
bp_table (tree_evaluator &tw) | |
~bp_table (void)=default | |
int | add_breakpoint_in_file (const std::string &file="", int line=1, const std::string &condition="") |
int | add_breakpoint_in_function (const std::string &fname="", const std::string &class_name="", int line=1, const std::string &condition="") |
bp_lines | add_breakpoints_in_file (const std::string &file="", const bp_lines &lines=bp_lines(), const std::string &condition="") |
bp_lines | add_breakpoints_in_function (const std::string &fname="", const std::string &class_name="", const bp_lines &lines=bp_lines(), 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 &fcn_name, std::string &class_name, bp_table::bp_lines &lines, std::string &cond) |
void | remove_all_breakpoints (void) |
bp_lines | remove_all_breakpoints_from_file (const std::string &file, bool silent=false) |
bp_lines | remove_all_breakpoints_from_function (const std::string &fname, bool silent=false) |
int | remove_breakpoint_from_file (const std::string &file="", int line=1) |
int | remove_breakpoint_from_function (const std::string &fname="", int line=1) |
int | remove_breakpoints_from_file (const std::string &file="", const bp_lines &lines=bp_lines()) |
int | remove_breakpoints_from_function (const std::string &fname="", const bp_lines &lines=bp_lines()) |
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 bp_lines &line, const std::string &condition, bp_lines &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) |
bp_lines | 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 bp_lines &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 56 of file bp-table.h.
typedef std::set<int> bp_table::bp_lines |
Definition at line 68 of file bp-table.h.
typedef bp_lines::iterator bp_table::bp_lines_iterator |
Definition at line 71 of file bp-table.h.
|
private |
Definition at line 221 of file bp-table.h.
typedef bp_lines::const_iterator bp_table::const_bp_lines_iterator |
Definition at line 70 of file bp-table.h.
|
private |
Definition at line 220 of file bp-table.h.
typedef fname_bp_map::const_iterator bp_table::const_fname_bp_map_iterator |
Definition at line 79 of file bp-table.h.
typedef fname_line_map::const_iterator bp_table::const_fname_line_map_iterator |
Definition at line 75 of file bp-table.h.
typedef std::map<std::string, std::list<bp_type> > bp_table::fname_bp_map |
Definition at line 78 of file bp-table.h.
typedef fname_bp_map::iterator bp_table::fname_bp_map_iterator |
Definition at line 80 of file bp-table.h.
typedef std::map<std::string, bp_lines> bp_table::fname_line_map |
Definition at line 73 of file bp-table.h.
typedef fname_line_map::iterator bp_table::fname_line_map_iterator |
Definition at line 76 of file bp-table.h.
|
inline |
Definition at line 60 of file bp-table.h.
|
default |
|
private |
Definition at line 232 of file bp-table.cc.
References tree_statement_list::add_breakpoint(), octave_user_code::body(), octave_user_code::fcn_file_name(), interpreter::get_event_manager(), tree_evaluator::get_interpreter(), m_bp_set, and m_evaluator.
Referenced by add_breakpoints_in_function().
int bp_table::add_breakpoint_in_file | ( | const std::string & | file = "" , |
int | line = 1 , |
||
const std::string & | condition = "" |
||
) |
Definition at line 730 of file bp-table.cc.
References add_breakpoint_in_function(), bp_file_info::class_name(), bp_file_info::fcn(), m_evaluator, and bp_file_info::ok().
Referenced by file_editor_tab::add_breakpoint_event().
int bp_table::add_breakpoint_in_function | ( | const std::string & | fname = "" , |
const std::string & | class_name = "" , |
||
int | line = 1 , |
||
const std::string & | condition = "" |
||
) |
Definition at line 671 of file bp-table.cc.
References add_breakpoints_in_function().
Referenced by add_breakpoint_in_file().
bp_table::bp_lines bp_table::add_breakpoints_in_file | ( | const std::string & | file = "" , |
const bp_lines & | lines = bp_lines () , |
||
const std::string & | condition = "" |
||
) |
Definition at line 747 of file bp-table.cc.
References add_breakpoints_in_function(), bp_file_info::class_name(), bp_file_info::fcn(), m_evaluator, and bp_file_info::ok().
bp_table::bp_lines bp_table::add_breakpoints_in_function | ( | const std::string & | fname = "" , |
const std::string & | class_name = "" , |
||
const bp_lines & | lines = bp_lines () , |
||
const std::string & | condition = "" |
||
) |
Definition at line 688 of file bp-table.cc.
References add_breakpoint_1(), condition_valid(), error(), find_fcn_by_line(), tree_evaluator::get_user_code(), m_evaluator, and tree_evaluator::reset_debug_state().
Referenced by add_breakpoint_in_function(), and add_breakpoints_in_file().
bool bp_table::condition_valid | ( | const std::string & | cond | ) |
Definition at line 279 of file bp-table.cc.
References error(), tree_statement::expression(), tree_evaluator::get_interpreter(), tree_expression::is_assignment_expression(), tree_statement::is_expression(), m_evaluator, base_parser::reset(), parser::run(), and base_parser::statement_list().
Referenced by add_breakpoints_in_function().
void bp_table::dbclear_all_signals | ( | void | ) |
Definition at line 117 of file bp-table.cc.
References error_system::debug_on_caught(), error_system::debug_on_error(), error_system::debug_on_warning(), interpreter::get_error_system(), tree_evaluator::get_interpreter(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, and Vdebug_on_interrupt.
void bp_table::dbstop_process_map_args | ( | const octave_map & | mv | ) |
Definition at line 137 of file bp-table.cc.
References octave_map::contents(), error_system::debug_on_caught(), error_system::debug_on_error(), error_system::debug_on_warning(), error(), interpreter::get_error_system(), tree_evaluator::get_interpreter(), Cell::index(), Array< T, Alloc >::isempty(), octave_map::isfield(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, Array< T, Alloc >::numel(), V, and Vdebug_on_interrupt.
|
inline |
Definition at line 192 of file bp-table.h.
Referenced by tree_evaluator::visit_statement().
|
inline |
Definition at line 186 of file bp-table.h.
Referenced by tree_evaluator::visit_statement().
|
inline |
Definition at line 198 of file bp-table.h.
Referenced by error_system::vwarning().
bp_table::fname_bp_map bp_table::get_breakpoint_list | ( | const octave_value_list & | fname_list | ) |
Definition at line 976 of file bp-table.cc.
References octave_user_code::body(), tree_statement_list::breakpoints_and_conds(), octave_value_list::empty(), find_bkpt_list(), tree_evaluator::get_user_code(), m_bp_set, m_evaluator, octave_function::name(), octave_function::subfunction_names(), octave_user_code::subfunctions(), and octave_base_value::user_code_value().
|
inline |
Definition at line 183 of file bp-table.h.
Referenced by tree_evaluator::reset_debug_state().
void bp_table::parse_dbfunction_params | ( | const char * | who, |
const octave_value_list & | args, | ||
std::string & | fcn_name, | ||
std::string & | class_name, | ||
bp_table::bp_lines & | lines, | ||
std::string & | cond | ||
) |
Definition at line 339 of file bp-table.cc.
References octave_value_list::array_value(), dbstop_at, dbstop_if, dbstop_in, dbstop_none, Array< T, Alloc >::elem(), error(), tree_evaluator::get_user_code(), tree_evaluator::in_debug_repl(), Array< T, Alloc >::insert(), octave_value_list::length(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, Array< T, Alloc >::numel(), print_usage(), process_id_list(), octave_function::profiler_name(), strcmp(), Vdebug_on_interrupt, and warning().
|
private |
Definition at line 568 of file bp-table.cc.
References error(), set_stop_flag(), and Vdebug_on_interrupt.
Referenced by parse_dbfunction_params().
void bp_table::remove_all_breakpoints | ( | void | ) |
Definition at line 944 of file bp-table.cc.
References m_bp_set, m_evaluator, remove_all_breakpoints_from_function(), and tree_evaluator::reset_debug_state().
bp_table::bp_lines bp_table::remove_all_breakpoints_from_file | ( | const std::string & | file, |
bool | silent = false |
||
) |
Definition at line 930 of file bp-table.cc.
References bp_file_info::fcn(), m_evaluator, bp_file_info::ok(), and remove_all_breakpoints_from_function().
Referenced by file_editor_tab::remove_all_breakpoints().
bp_table::bp_lines bp_table::remove_all_breakpoints_from_function | ( | const std::string & | fname, |
bool | silent = false |
||
) |
Definition at line 865 of file bp-table.cc.
References octave_user_code::body(), error(), octave_user_code::fcn_file_name(), interpreter::get_event_manager(), tree_evaluator::get_interpreter(), tree_evaluator::get_user_code(), m_bp_set, m_evaluator, tree_statement_list::remove_all_breakpoints(), and tree_evaluator::reset_debug_state().
Referenced by out_of_date_check(), remove_all_breakpoints(), remove_all_breakpoints_from_file(), and remove_breakpoints_from_function().
|
private |
|
private |
Definition at line 763 of file bp-table.cc.
References octave_user_code::body(), tree_statement_list::delete_breakpoint(), octave_value_list::empty(), octave_user_code::fcn_file_name(), interpreter::get_event_manager(), tree_evaluator::get_interpreter(), octave_value_list::length(), tree_statement_list::list_breakpoints(), m_bp_set, m_evaluator, and event_manager::update_breakpoint().
Referenced by remove_breakpoints_from_function().
int bp_table::remove_breakpoint_from_file | ( | const std::string & | file = "" , |
int | line = 1 |
||
) |
Definition at line 901 of file bp-table.cc.
References bp_file_info::fcn(), m_evaluator, bp_file_info::ok(), and remove_breakpoint_from_function().
Referenced by file_editor_tab::handle_request_remove_breakpoint().
int bp_table::remove_breakpoint_from_function | ( | const std::string & | fname = "" , |
int | line = 1 |
||
) |
Definition at line 807 of file bp-table.cc.
References remove_breakpoints_from_function().
Referenced by remove_breakpoint_from_file().
int bp_table::remove_breakpoints_from_file | ( | const std::string & | file = "" , |
const bp_lines & | lines = bp_lines () |
||
) |
Definition at line 915 of file bp-table.cc.
References bp_file_info::fcn(), m_evaluator, bp_file_info::ok(), and remove_breakpoints_from_function().
int bp_table::remove_breakpoints_from_function | ( | const std::string & | fname = "" , |
const bp_lines & | lines = bp_lines () |
||
) |
Definition at line 816 of file bp-table.cc.
References error(), tree_evaluator::get_user_code(), m_evaluator, remove_all_breakpoints_from_function(), remove_breakpoint_1(), tree_evaluator::reset_debug_state(), octave_function::subfunction_names(), octave_user_code::subfunctions(), and octave_base_value::user_code_value().
Referenced by remove_breakpoint_from_function(), and remove_breakpoints_from_file().
|
private |
Definition at line 552 of file bp-table.cc.
References error_system::debug_on_caught(), error_system::debug_on_error(), error_system::debug_on_warning(), error(), interpreter::get_error_system(), tree_evaluator::get_interpreter(), and m_evaluator.
Referenced by process_id_list().
octave_map bp_table::stop_on_err_warn_status | ( | bool | to_screen | ) |
Definition at line 1051 of file bp-table.cc.
References octave_map::assign(), error_system::debug_on_caught(), error_system::debug_on_error(), error_system::debug_on_warning(), interpreter::get_error_system(), tree_evaluator::get_interpreter(), m_caught_that_stop, m_errors_that_stop, m_evaluator, m_warnings_that_stop, octave_stdout, Vdebug_on_interrupt, and Faddeeva::w().
|
private |
Definition at line 226 of file bp-table.h.
Referenced by add_breakpoint_1(), get_breakpoint_list(), remove_all_breakpoints(), remove_all_breakpoints_from_function(), and remove_breakpoint_1().
|
private |
Definition at line 232 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 231 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 223 of file bp-table.h.
Referenced by add_breakpoint_1(), add_breakpoint_in_file(), add_breakpoints_in_file(), add_breakpoints_in_function(), condition_valid(), dbclear_all_signals(), dbstop_process_map_args(), get_breakpoint_list(), parse_dbfunction_params(), remove_all_breakpoints(), remove_all_breakpoints_from_file(), remove_all_breakpoints_from_function(), remove_breakpoint_1(), remove_breakpoint_from_file(), remove_breakpoints_from_file(), remove_breakpoints_from_function(), set_stop_flag(), and stop_on_err_warn_status().
|
private |
Definition at line 233 of file bp-table.h.
Referenced by dbclear_all_signals(), dbstop_process_map_args(), parse_dbfunction_params(), and stop_on_err_warn_status().