26 #if ! defined (octave_call_stack_h)
27 #define octave_call_stack_h 1
29 #include "octave-config.h"
78 return current_function (
true);
82 int current_line (
void)
const;
85 int current_column (
void)
const;
89 std::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)
120 retval = m_cs[
n]->function ();
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> ());
163 const std::shared_ptr<stack_frame>& closure_frames = std::shared_ptr<stack_frame> ());
173 std::shared_ptr<stack_frame> elt = m_cs.back ();
184 std::shared_ptr<stack_frame> elt = m_cs.back ();
194 std::shared_ptr<stack_frame> elt = m_cs.back ();
200 bool goto_frame (std::size_t
n = 0,
bool verbose =
false);
207 std::size_t find_current_user_frame (
void)
const;
209 std::shared_ptr<stack_frame> current_user_frame (
void)
const;
211 std::size_t dbupdown (std::size_t start,
int n,
bool verbose);
212 std::size_t dbupdown (
int n = -1,
bool verbose =
false);
214 void goto_caller_frame (
void);
216 void goto_base_frame (
void);
218 std::list<std::shared_ptr<stack_frame>>
223 std::list<std::shared_ptr<stack_frame>> backtrace_frames (
void)
const;
228 std::list<frame_info> backtrace_info (
octave_idx_type& curr_user_frame,
229 bool print_subfn =
true)
const;
231 std::list<frame_info> backtrace_info (
void)
const;
237 bool print_subfn =
true)
const;
249 std::list<std::string> global_variable_names (
void)
const;
251 std::list<std::string> top_level_variable_names (
void)
const;
253 std::list<std::string> variable_names (
void)
const;
255 void clear_global_variable (
const std::string& name);
257 void clear_global_variable_pattern (
const std::string& pattern);
259 void clear_global_variable_regexp(
const std::string& pattern);
261 void clear_global_variables (
void);
277 octave_value global_varval (
const std::string& name)
const;
281 octave_value get_top_level_value (
const std::string& name)
const;
283 void set_top_level_value (
const std::string& name,
287 bool return_list,
bool verbose =
false);
290 bool return_list,
bool verbose,
291 const std::string& msg =
"");
294 bool have_regexp,
bool return_list,
295 bool verbose,
const std::string& msg =
"");
297 void display (
void)
const;
306 void get_new_frame_index_and_links
307 (std::size_t& new_frame_idx, std::shared_ptr<stack_frame>& parent_link,
308 std::shared_ptr<stack_frame>& static_link)
const;
std::map< std::string, octave_value > m_global_values
stack_frames::const_reverse_iterator const_reverse_iterator
std::shared_ptr< stack_frame > get_current_stack_frame(void) const
symbol_scope current_scope(void) const
stack_frames::iterator iterator
octave_function * element(std::size_t n)
void restore_frame(std::size_t n)
std::size_t current_frame(void) const
void set_location(int l, int c)
tree_evaluator & m_evaluator
octave_function * caller_function(void) const
std::deque< std::shared_ptr< stack_frame > > stack_frames
stack_frames::const_iterator const_iterator
stack_frames::reverse_iterator reverse_iterator
bool at_top_level(void) const
std::size_t size(void) const
symbol_scope top_scope(void) const
std::map< std::string, octave_value > local_vars_map
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
static octave::unwind_protect * curr_fcn_unwind_protect_frame(void)