GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::call_stack Class Reference

#include "call-stack.h"

Collaboration diagram for octave::call_stack:

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
 

Public Member Functions

 call_stack (interpreter &interp)
 
bool all_scripts (void) const
 
octave_map backtrace (size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn=true) const
 
octave_map backtrace (size_t nskip=0)
 
std::list< call_stack::stack_framebacktrace_frames (size_t nskip, octave_idx_type &curr_user_frame) const
 
std::list< call_stack::stack_framebacktrace_frames (size_t nskip=0) const
 
octave_functioncaller (void) const
 
octave_user_codecaller_user_code (size_t nskip=0) const
 
int caller_user_code_column (void) const
 
int caller_user_code_line (void) const
 
void clear (void)
 
octave_functioncurrent (void) const
 
int current_column (void) const
 
symbol_record::context_id current_context (void) const
 
size_t current_frame (void) const
 
int current_line (void) const
 
symbol_scope current_scope (void) const
 
octave_user_codedebug_user_code (void) const
 
int debug_user_code_column (void) const
 
int debug_user_code_line (void) const
 
octave_functionelement (size_t n)
 
octave_map empty_backtrace (void) const
 
void goto_base_frame (void)
 
void goto_caller_frame (void)
 
bool goto_frame (size_t n=0, bool verbose=false)
 
bool goto_frame_relative (int n, bool verbose=false)
 
octave_value max_stack_depth (const octave_value_list &args, int nargout)
 
size_t num_user_code_frames (octave_idx_type &curr_user_frame) const
 
void pop (void)
 
void push (octave_function *fcn)
 
void push (octave_function *fcn, const symbol_scope &scope, symbol_record::context_id context)
 
void push (void)
 
void push (const symbol_scope &scope, symbol_record::context_id context)
 
void restore_frame (size_t n)
 
void set_column (int c)
 
void set_line (int l)
 
void set_location (int l, int c)
 
size_t size (void) const
 

Private Attributes

std::deque< stack_framecs
 
size_t curr_frame
 
interpreterm_interpreter
 
int m_max_stack_depth
 

Detailed Description

Definition at line 44 of file call-stack.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 89 of file call-stack.h.

◆ const_reverse_iterator

◆ iterator

Definition at line 88 of file call-stack.h.

◆ reverse_iterator

Definition at line 91 of file call-stack.h.

Constructor & Destructor Documentation

◆ call_stack()

octave::call_stack::call_stack ( interpreter interp)

Member Function Documentation

◆ all_scripts()

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.

◆ backtrace() [1/2]

octave_map octave::call_stack::backtrace ( size_t  nskip,
octave_idx_type curr_user_frame,
bool  print_subfn = true 
) const

◆ backtrace() [2/2]

octave_map octave::call_stack::backtrace ( size_t  nskip = 0)

Definition at line 606 of file call-stack.cc.

References backtrace().

◆ backtrace_frames() [1/2]

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().

◆ backtrace_frames() [2/2]

std::list<call_stack::stack_frame> octave::call_stack::backtrace_frames ( size_t  nskip = 0) const
inline

Definition at line 239 of file call-stack.h.

◆ caller()

octave_function* octave::call_stack::caller ( void  ) const
inline

◆ caller_user_code()

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().

◆ caller_user_code_column()

int octave::call_stack::caller_user_code_column ( void  ) const

◆ caller_user_code_line()

int octave::call_stack::caller_user_code_line ( void  ) const

◆ clear()

void octave::call_stack::clear ( void  )
inline

Definition at line 255 of file call-stack.h.

References clear(), and cs.

Referenced by clear().

◆ current()

◆ current_column()

int octave::call_stack::current_column ( void  ) const

◆ current_context()

symbol_record::context_id octave::call_stack::current_context ( void  ) const
inline

Definition at line 135 of file call-stack.h.

References cs, and size().

◆ current_frame()

size_t octave::call_stack::current_frame ( void  ) const
inline

◆ current_line()

int octave::call_stack::current_line ( void  ) const

◆ current_scope()

symbol_scope octave::call_stack::current_scope ( void  ) const
inline

Definition at line 129 of file call-stack.h.

References cs, and size().

◆ debug_user_code()

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().

◆ debug_user_code_column()

int octave::call_stack::debug_user_code_column ( void  ) const

◆ debug_user_code_line()

int octave::call_stack::debug_user_code_line ( void  ) const

◆ element()

octave_function* octave::call_stack::element ( size_t  n)
inline

Definition at line 143 of file call-stack.h.

References cs, octave::call_stack::stack_frame::m_fcn, retval, and size().

◆ empty_backtrace()

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().

◆ goto_base_frame()

void octave::call_stack::goto_base_frame ( void  )

◆ goto_caller_frame()

◆ goto_frame()

◆ goto_frame_relative()

◆ max_stack_depth()

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().

◆ num_user_code_frames()

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().

◆ pop()

◆ push() [1/4]

◆ push() [2/4]

◆ push() [3/4]

void octave::call_stack::push ( void  )
inline

Definition at line 181 of file call-stack.h.

Referenced by call_stack(), and push().

◆ push() [4/4]

void octave::call_stack::push ( const symbol_scope scope,
symbol_record::context_id  context 
)
inline

Definition at line 186 of file call-stack.h.

References octave::context.

◆ restore_frame()

void octave::call_stack::restore_frame ( size_t  n)
inline

Definition at line 224 of file call-stack.h.

◆ set_column()

void octave::call_stack::set_column ( int  c)
inline

◆ set_line()

void octave::call_stack::set_line ( int  l)
inline

◆ set_location()

◆ size()

size_t octave::call_stack::size ( void  ) const
inline

Definition at line 125 of file call-stack.h.

References cs, and size().

Referenced by current_context(), current_scope(), element(), and size().

Member Data Documentation

◆ cs

◆ curr_frame

◆ m_interpreter

interpreter& octave::call_stack::m_interpreter
private

◆ m_max_stack_depth

int octave::call_stack::m_max_stack_depth
private

Definition at line 266 of file call-stack.h.

Referenced by max_stack_depth(), and push().


The documentation for this class was generated from the following files: