23 #if ! defined (octave_call_stack_h) 24 #define octave_call_stack_h 1 26 #include "octave-config.h" 59 : m_fcn (
fcn), m_line (-1), m_column (-1), m_scope (scope),
60 m_context (
context), m_prev (prev)
64 : m_fcn (elt.m_fcn), m_line (elt.m_line), m_column (elt.m_column),
65 m_scope (elt.m_scope), m_context (elt.m_context), m_prev (elt.m_prev)
68 int line (
void)
const {
return m_line; }
70 int column (
void)
const {
return m_column; }
74 std::string fcn_name (
bool print_subfn =
true)
const;
88 typedef std::deque<stack_frame>::iterator
iterator;
111 int current_line (
void)
const;
114 int current_column (
void)
const;
120 return curr_frame > 1 ?
cs[curr_frame-1].m_fcn :
cs[0].m_fcn;
131 return (curr_frame > 0 && curr_frame <
cs.
size ()
137 return (curr_frame > 0 && curr_frame <
cs.
size ()
138 ?
cs[curr_frame].m_context : 0);
160 int caller_user_code_line (
void)
const;
163 int caller_user_code_column (
void)
const;
169 int debug_user_code_line (
void)
const;
172 int debug_user_code_column (
void)
const;
175 bool all_scripts (
void)
const;
188 push (
nullptr, scope,
context);
222 bool goto_frame (
size_t n = 0,
bool verbose =
false);
229 bool goto_frame_relative (
int n,
bool verbose =
false);
231 void goto_caller_frame (
void);
233 void goto_base_frame (
void);
235 std::list<call_stack::stack_frame>
236 backtrace_frames (
size_t nskip,
octave_idx_type& curr_user_frame)
const;
238 std::list<call_stack::stack_frame>
243 return backtrace_frames (nskip, curr_user_frame);
247 bool print_subfn =
true)
const;
262 std::deque<stack_frame>
cs;
272 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) 274 OCTAVE_DEPRECATED (4.4,
"use 'octave::call_stack' instead")
275 typedef
octave::call_stack octave_call_stack;
symbol_record::context_id current_context(void) const
void set_location(int l, int c)
octave_function * element(size_t n)
stack_frame(octave_function *fcn=nullptr, const symbol_scope &scope=symbol_scope(), symbol_record::context_id context=0, size_t prev=0)
std::deque< stack_frame >::const_reverse_iterator const_reverse_iterator
static llvm::LLVMContext & context
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
std::deque< stack_frame >::iterator iterator
stack_frame(const stack_frame &elt)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function xample nargout(@histc)
std::list< call_stack::stack_frame > backtrace_frames(size_t nskip=0) const
octave_function * caller(void) const
void push(const symbol_scope &scope, symbol_record::context_id context)
std::deque< stack_frame >::const_iterator const_iterator
bool operator==(const dim_vector &a, const dim_vector &b)
symbol_scope current_scope(void) const
octave_function * current(void) const
std::deque< stack_frame > cs
void restore_frame(size_t n)
symbol_record::context_id m_context
std::deque< stack_frame >::reverse_iterator reverse_iterator
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
size_t current_frame(void) const
interpreter & m_interpreter