26 #if ! defined (octave_call_stack_h)
27 #define octave_call_stack_h 1
29 #include "octave-config.h"
50 class symbol_info_list;
78 return current_function (
true);
82 int current_line (
void)
const;
85 int current_column (
void)
const;
89 size_t size (
void)
const {
return m_cs.size (); }
93 return m_cs[m_curr_frame];
98 return m_cs[0]->get_scope ();
104 return (m_curr_frame < m_cs.size ()
110 return current_scope () == top_scope ();
119 if (m_cs.size () >
n)
131 int current_user_code_line (
void)
const;
134 int current_user_code_column (
void)
const;
140 int debug_user_code_line (
void)
const;
143 int debug_user_code_column (
void)
const;
145 std::string get_dispatch_class (
void)
const;
147 void set_dispatch_class (
const std::string& class_name);
149 bool is_class_method_executing (std::string& dispatch_class)
const;
151 bool is_class_constructor_executing (std::string& dispatch_class)
const;
154 bool all_scripts (
void)
const;
159 const std::shared_ptr<stack_frame>& closure_frames = std::shared_ptr<stack_frame> ());
172 std::shared_ptr<stack_frame> elt = m_cs.back ();
183 std::shared_ptr<stack_frame> elt = m_cs.back ();
193 std::shared_ptr<stack_frame> elt = m_cs.back ();
199 bool goto_frame (
size_t n = 0,
bool verbose =
false);
206 size_t find_current_user_frame (
void)
const;
208 std::shared_ptr<stack_frame> current_user_frame (
void)
const;
210 size_t dbupdown (
size_t start,
int n,
bool verbose);
211 size_t dbupdown (
int n = -1,
bool verbose =
false);
213 void goto_caller_frame (
void);
215 void goto_base_frame (
void);
217 std::list<std::shared_ptr<stack_frame>>
222 std::list<std::shared_ptr<stack_frame>> backtrace_frames (
void)
const;
227 std::list<frame_info> backtrace_info (
octave_idx_type& curr_user_frame,
228 bool print_subfn =
true)
const;
230 std::list<frame_info> backtrace_info (
void)
const;
236 bool print_subfn =
true)
const;
248 std::list<std::string> global_variable_names (
void)
const;
250 std::list<std::string> top_level_variable_names (
void)
const;
252 std::list<std::string> variable_names (
void)
const;
254 void clear_global_variable (
const std::string&
name);
256 void clear_global_variable_pattern (
const std::string& pattern);
258 void clear_global_variable_regexp(
const std::string& pattern);
260 void clear_global_variables (
void);
282 void set_top_level_value (
const std::string&
name,
286 bool return_list,
bool verbose =
false);
289 bool return_list,
bool verbose,
290 const std::string& msg =
"");
293 bool have_regexp,
bool return_list,
294 bool verbose,
const std::string& msg =
"");
296 void display (
void)
const;
305 void get_new_frame_index_and_links
306 (
size_t& new_frame_idx, std::shared_ptr<stack_frame>& parent_link,
307 std::shared_ptr<stack_frame>& static_link)
const;
bool at_top_level(void) const
tree_evaluator & m_evaluator
size_t current_frame(void) const
std::deque< std::shared_ptr< stack_frame > > stack_frames
std::map< std::string, octave_value > m_global_values
stack_frames::reverse_iterator reverse_iterator
void restore_frame(size_t n)
void set_location(int l, int c)
octave_function * caller_function(void) const
stack_frames::const_reverse_iterator const_reverse_iterator
symbol_scope top_scope(void) const
stack_frames::iterator iterator
octave_function * element(size_t n)
std::shared_ptr< stack_frame > get_current_stack_frame(void) const
symbol_scope current_scope(void) const
stack_frames::const_iterator const_iterator
std::map< std::string, octave_value > local_vars_map
octave_value::octave_value(const Array< char > &chm, char type) return retval
static octave::unwind_protect * curr_fcn_unwind_protect_frame(void)