#include "call-stack.h"
Classes | |
class | stack_frame |
Public Types | |
typedef std::deque< stack_frame >::const_iterator | const_iterator |
typedef std::deque< stack_frame >::const_reverse_iterator | const_reverse_iterator |
typedef std::deque< stack_frame >::iterator | iterator |
typedef std::deque< stack_frame >::reverse_iterator | reverse_iterator |
Private Attributes | |
std::deque< stack_frame > | cs |
size_t | curr_frame |
interpreter & | m_interpreter |
int | m_max_stack_depth |
Definition at line 44 of file call-stack.h.
typedef std::deque<stack_frame>::const_iterator octave::call_stack::const_iterator |
Definition at line 89 of file call-stack.h.
typedef std::deque<stack_frame>::const_reverse_iterator octave::call_stack::const_reverse_iterator |
Definition at line 92 of file call-stack.h.
typedef std::deque<stack_frame>::iterator octave::call_stack::iterator |
Definition at line 88 of file call-stack.h.
typedef std::deque<stack_frame>::reverse_iterator octave::call_stack::reverse_iterator |
Definition at line 91 of file call-stack.h.
octave::call_stack::call_stack | ( | interpreter & | interp | ) |
Definition at line 90 of file call-stack.cc.
References octave::interpreter::get_symbol_table(), m_interpreter, push(), and octave::symbol_table::top_scope().
bool octave::call_stack::all_scripts | ( | void | ) | const |
Definition at line 334 of file call-stack.cc.
References cs, f, octave::call_stack::stack_frame::m_fcn, p, and retval.
octave_map octave::call_stack::backtrace | ( | size_t | nskip, |
octave_idx_type & | curr_user_frame, | ||
bool | print_subfn = true |
||
) | const |
Definition at line 573 of file call-stack.cc.
References backtrace_frames(), bt_fields, column, octave::context, file, k, name, and retval.
Referenced by backtrace(), octave::file_editor_tab::exit_debug_and_clear(), and verror().
octave_map octave::call_stack::backtrace | ( | size_t | nskip = 0 | ) |
Definition at line 606 of file call-stack.cc.
References backtrace().
std::list< call_stack::stack_frame > octave::call_stack::backtrace_frames | ( | size_t | nskip, |
octave_idx_type & | curr_user_frame | ||
) | const |
Definition at line 539 of file call-stack.cc.
References cs, f, octave::call_stack::stack_frame::m_fcn, num_user_code_frames(), p, and retval.
Referenced by backtrace(), and pr_where().
|
inline |
Definition at line 239 of file call-stack.h.
|
inline |
Definition at line 118 of file call-stack.h.
References cs.
Referenced by called_from_builtin(), do_who(), octave::tree_evaluator::maybe_push_echo_state_cleanup(), and octave::tree_evaluator::maybe_set_echo_state().
octave_user_code * octave::call_stack::caller_user_code | ( | size_t | nskip = 0 | ) | const |
Definition at line 164 of file call-stack.cc.
References cs, f, octave::call_stack::stack_frame::m_fcn, p, and retval.
Referenced by error_1(), maybe_enter_debugger(), verror(), and warning_1().
int octave::call_stack::caller_user_code_column | ( | void | ) | const |
Definition at line 218 of file call-stack.cc.
References cs, f, octave::call_stack::stack_frame::m_column, octave::call_stack::stack_frame::m_fcn, p, and retval.
int octave::call_stack::caller_user_code_line | ( | void | ) | const |
Definition at line 192 of file call-stack.cc.
References cs, f, octave::call_stack::stack_frame::m_fcn, octave::call_stack::stack_frame::m_line, p, and retval.
|
inline |
|
inline |
Definition at line 97 of file call-stack.h.
References cs, octave::call_stack::stack_frame::m_fcn, and retval.
Referenced by octave::tree_evaluator::echo_code(), mex::function_name(), get_class_context(), octave_class::get_current_method_class(), get_current_shlib(), octave_class::in_class_method(), is_method_executing(), octave_fcn_inline::octave_fcn_inline(), print_usage(), verror(), and octave::tree_evaluator::visit_anon_fcn_handle().
int octave::call_stack::current_column | ( | void | ) | const |
Definition at line 113 of file call-stack.cc.
References cs, curr_frame, octave::call_stack::stack_frame::m_column, and retval.
Referenced by octave::tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 135 of file call-stack.h.
|
inline |
Definition at line 123 of file call-stack.h.
Referenced by octave::tree_evaluator::do_breakpoint(), maybe_enter_debugger(), octave::tree_evaluator::visit_return_command(), and warning_1().
int octave::call_stack::current_line | ( | void | ) | const |
Definition at line 99 of file call-stack.cc.
References cs, curr_frame, octave::call_stack::stack_frame::m_line, and retval.
Referenced by octave::tree_evaluator::do_unwind_protect_cleanup_code(), and octave::tree_evaluator::maybe_set_echo_state().
|
inline |
Definition at line 129 of file call-stack.h.
octave_user_code * octave::call_stack::debug_user_code | ( | void | ) | const |
Definition at line 244 of file call-stack.cc.
References cs, curr_frame, f, i, octave::call_stack::stack_frame::m_fcn, and retval.
Referenced by octave::get_user_code().
int octave::call_stack::debug_user_code_column | ( | void | ) | const |
Definition at line 303 of file call-stack.cc.
References cs, curr_frame, f, i, octave::call_stack::stack_frame::m_column, octave::call_stack::stack_frame::m_fcn, and retval.
int octave::call_stack::debug_user_code_line | ( | void | ) | const |
Definition at line 272 of file call-stack.cc.
References cs, curr_frame, f, i, octave::call_stack::stack_frame::m_fcn, octave::call_stack::stack_frame::m_line, and retval.
|
inline |
Definition at line 143 of file call-stack.h.
References cs, octave::call_stack::stack_frame::m_fcn, retval, and size().
octave_map octave::call_stack::empty_backtrace | ( | void | ) | const |
Definition at line 614 of file call-stack.cc.
References bt_fields.
Referenced by initialize_last_error_stack().
void octave::call_stack::goto_base_frame | ( | void | ) |
Definition at line 524 of file call-stack.cc.
References cs, curr_frame, octave::interpreter::get_symbol_table(), m_interpreter, octave::symbol_table::set_scope_and_context(), and tmp.
Referenced by mexGetVariable(), and mexPutVariable().
void octave::call_stack::goto_caller_frame | ( | void | ) |
Definition at line 484 of file call-stack.cc.
References cs, curr_frame, f, octave::interpreter::get_symbol_table(), octave::call_stack::stack_frame::m_fcn, m_interpreter, octave::call_stack::stack_frame::m_scope, octave::symbol_table::set_scope_and_context(), and tmp.
Definition at line 383 of file call-stack.cc.
References cs, curr_frame, octave::call_stack::stack_frame::fcn_file_name(), octave::call_stack::stack_frame::fcn_name(), octave::interpreter::get_symbol_table(), octave::call_stack::stack_frame::m_column, octave::call_stack::stack_frame::m_context, m_interpreter, octave::call_stack::stack_frame::m_line, octave::call_stack::stack_frame::m_scope, octave_stdout, retval, octave::symbol_table::set_scope_and_context(), and verbose.
Definition at line 412 of file call-stack.cc.
References cs, curr_frame, f, octave::call_stack::stack_frame::fcn_file_name(), octave::call_stack::stack_frame::fcn_name(), octave::interpreter::get_symbol_table(), octave::call_stack::stack_frame::m_context, octave::call_stack::stack_frame::m_fcn, m_interpreter, octave::call_stack::stack_frame::m_line, octave::call_stack::stack_frame::m_scope, octave_stdout, retval, octave::symbol_table::set_scope_and_context(), and verbose.
octave_value octave::call_stack::max_stack_depth | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 636 of file call-stack.cc.
References m_max_stack_depth, nargout(), and set_internal_variable().
size_t octave::call_stack::num_user_code_frames | ( | octave_idx_type & | curr_user_frame | ) | const |
Definition at line 127 of file call-stack.cc.
References cs, curr_frame, f, found, k, p, and retval.
Referenced by backtrace_frames().
void octave::call_stack::pop | ( | void | ) |
Definition at line 620 of file call-stack.cc.
References cs, curr_frame, octave::interpreter::get_symbol_table(), octave::call_stack::stack_frame::m_context, m_interpreter, octave::call_stack::stack_frame::m_prev, octave::call_stack::stack_frame::m_scope, and octave::symbol_table::set_scope_and_context().
Referenced by octave_mex_function::call(), octave_builtin::call(), octave_user_script::call(), octave_user_function::call(), do_who(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), octave_fcn_handle::load_hdf5(), mexGetVariable(), mexPutVariable(), and read_mat5_binary_element().
void octave::call_stack::push | ( | octave_function * | fcn | ) |
Definition at line 357 of file call-stack.cc.
References octave::symbol_table::current_context(), octave::symbol_table::current_scope(), fcn, octave::interpreter::get_symbol_table(), m_interpreter, and push().
Referenced by octave_mex_function::call(), octave_builtin::call(), octave_user_script::call(), octave_user_function::call(), do_who(), octave_fcn_handle::load_ascii(), octave_fcn_handle::load_binary(), octave_fcn_handle::load_hdf5(), and read_mat5_binary_element().
void octave::call_stack::push | ( | octave_function * | fcn, |
const symbol_scope & | scope, | ||
symbol_record::context_id | context | ||
) |
Definition at line 365 of file call-stack.cc.
References octave::context, cs, curr_frame, error(), fcn, octave::interpreter::get_symbol_table(), m_interpreter, m_max_stack_depth, and octave::symbol_table::set_scope_and_context().
|
inline |
Definition at line 181 of file call-stack.h.
Referenced by call_stack(), and push().
|
inline |
Definition at line 186 of file call-stack.h.
References octave::context.
|
inline |
Definition at line 224 of file call-stack.h.
|
inline |
Definition at line 212 of file call-stack.h.
References c, cs, and octave::call_stack::stack_frame::m_column.
Referenced by octave::tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 202 of file call-stack.h.
References cs, and octave::call_stack::stack_frame::m_line.
Referenced by octave::tree_evaluator::do_unwind_protect_cleanup_code().
|
inline |
Definition at line 191 of file call-stack.h.
References c, cs, octave::call_stack::stack_frame::m_column, and octave::call_stack::stack_frame::m_line.
Referenced by octave_user_function::call(), octave::tree_evaluator::visit_do_until_command(), octave::tree_evaluator::visit_if_command_list(), and octave::tree_evaluator::visit_statement().
|
inline |
Definition at line 125 of file call-stack.h.
Referenced by current_context(), current_scope(), element(), and size().
|
private |
Definition at line 262 of file call-stack.h.
Referenced by all_scripts(), backtrace_frames(), caller_user_code(), caller_user_code_column(), caller_user_code_line(), current_column(), current_line(), debug_user_code(), debug_user_code_column(), debug_user_code_line(), goto_base_frame(), goto_caller_frame(), goto_frame(), goto_frame_relative(), num_user_code_frames(), pop(), and push().
|
private |
Definition at line 264 of file call-stack.h.
Referenced by current_column(), current_line(), debug_user_code(), debug_user_code_column(), debug_user_code_line(), goto_base_frame(), goto_caller_frame(), goto_frame(), goto_frame_relative(), num_user_code_frames(), pop(), and push().
|
private |
Definition at line 268 of file call-stack.h.
Referenced by call_stack(), goto_base_frame(), goto_caller_frame(), goto_frame(), goto_frame_relative(), pop(), and push().
|
private |
Definition at line 266 of file call-stack.h.
Referenced by max_stack_depth(), and push().