GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
octave_call_stack Class Reference

#include "call-stack.h"

Collaboration diagram for octave_call_stack:
Collaboration graph
[legend]

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
 

Static Public Member Functions

static bool all_scripts (void)
 
static octave_map backtrace (size_t nskip=0)
 
static octave_map backtrace (size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn=true)
 
static std::list
< octave_call_stack::stack_frame
backtrace_frames (size_t nskip=0)
 
static std::list
< octave_call_stack::stack_frame
backtrace_frames (size_t nskip, octave_idx_type &curr_user_frame)
 
static octave_functioncaller (void)
 
static octave_user_codecaller_user_code (size_t nskip=0)
 
static int caller_user_code_column (void)
 
static int caller_user_code_line (void)
 
static void clear (void)
 
static void create_instance (void)
 
static octave_functioncurrent (void)
 
static int current_column (void)
 
static symbol_table::context_id current_context (void)
 
static size_t current_frame (void)
 
static int current_line (void)
 
static symbol_table::scope_id current_scope (void)
 
static octave_user_codedebug_user_code (void)
 
static int debug_user_code_column (void)
 
static int debug_user_code_line (void)
 
static octave_functionelement (size_t n)
 
static octave_map empty_backtrace (void)
 
static void goto_base_frame (void)
 
static void goto_caller_frame (void)
 
static bool goto_frame (size_t n=0, bool verbose=false)
 
static bool goto_frame_relative (int n, bool verbose=false)
 
static bool instance_ok (void)
 
static size_t num_user_code_frames (octave_idx_type &curr_user_frame)
 
static void pop (void)
 
static void push (octave_function *f, symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
 
static void push (symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
 
static void restore_frame (size_t n)
 
static void set_column (int c)
 
static void set_line (int l)
 
static void set_location (int l, int c)
 
static size_t size (void)
 

Protected Member Functions

 octave_call_stack (void)
 

Private Member Functions

bool do_all_scripts (void) const
 
octave_map do_backtrace (size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn) const
 
std::list
< octave_call_stack::stack_frame
do_backtrace_frames (size_t nskip, octave_idx_type &curr_user_frame) const
 
octave_functiondo_caller (void) const
 
octave_user_codedo_caller_user_code (size_t nskip) const
 
int do_caller_user_code_column (void) const
 
int do_caller_user_code_line (void) const
 
void do_clear (void)
 
octave_functiondo_current (void) const
 
int do_current_column (void) const
 
symbol_table::context_id do_current_context (void) const
 
size_t do_current_frame (void)
 
int do_current_line (void) const
 
symbol_table::scope_id do_current_scope (void) const
 
octave_user_codedo_debug_user_code (void) const
 
int do_debug_user_code_column (void) const
 
int do_debug_user_code_line (void) const
 
octave_functiondo_element (size_t n)
 
void do_goto_base_frame (void)
 
void do_goto_caller_frame (void)
 
bool do_goto_frame (size_t n, bool verbose)
 
bool do_goto_frame_relative (int n, bool verbose)
 
size_t do_num_user_code_frames (octave_idx_type &curr_user_frame) const
 
void do_pop (void)
 
void do_push (octave_function *fcn, symbol_table::scope_id scope, symbol_table::context_id context)
 
void do_set_column (int c)
 
void do_set_line (int l)
 
void do_set_location (int l, int c)
 
size_t do_size (void)
 

Static Private Member Functions

static void cleanup_instance (void)
 

Private Attributes

std::deque< stack_framecs
 
size_t curr_frame
 

Static Private Attributes

static octave_call_stackinstance = 0
 

Detailed Description

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

Member Typedef Documentation

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

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

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

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

Constructor & Destructor Documentation

octave_call_stack::octave_call_stack ( void  )
inlineprotected

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

Referenced by create_instance().

Member Function Documentation

static bool octave_call_stack::all_scripts ( void  )
inlinestatic

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

References do_all_scripts(), instance, and instance_ok().

Referenced by octave::tree_evaluator::visit_statement().

static octave_map octave_call_stack::backtrace ( size_t  nskip = 0)
inlinestatic

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

References do_backtrace(), instance, and instance_ok().

Referenced by file_editor_tab::exit_debug_and_clear(), and verror().

static octave_map octave_call_stack::backtrace ( size_t  nskip,
octave_idx_type curr_user_frame,
bool  print_subfn = true 
)
inlinestatic

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

References do_backtrace(), instance, and instance_ok().

static std::list<octave_call_stack::stack_frame> octave_call_stack::backtrace_frames ( size_t  nskip = 0)
inlinestatic

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

References do_backtrace_frames(), instance, and instance_ok().

Referenced by pr_where().

static std::list<octave_call_stack::stack_frame> octave_call_stack::backtrace_frames ( size_t  nskip,
octave_idx_type curr_user_frame 
)
inlinestatic

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

References do_backtrace_frames(), instance, and instance_ok().

static octave_function* octave_call_stack::caller ( void  )
inlinestatic

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

References do_caller(), instance, and instance_ok().

Referenced by called_from_builtin(), and do_who().

static octave_user_code* octave_call_stack::caller_user_code ( size_t  nskip = 0)
inlinestatic
static int octave_call_stack::caller_user_code_column ( void  )
inlinestatic

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

References do_caller_user_code_column(), instance, and instance_ok().

static int octave_call_stack::caller_user_code_line ( void  )
inlinestatic

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

References do_caller_user_code_line(), instance, and instance_ok().

Referenced by get_debug_input().

static void octave_call_stack::cleanup_instance ( void  )
inlinestaticprivate

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

References instance.

Referenced by create_instance().

static void octave_call_stack::clear ( void  )
inlinestatic

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

References do_clear(), instance, and instance_ok().

void octave_call_stack::create_instance ( void  )
static
static octave_function* octave_call_stack::current ( void  )
inlinestatic
static int octave_call_stack::current_column ( void  )
inlinestatic
static symbol_table::context_id octave_call_stack::current_context ( void  )
inlinestatic

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

References do_current_context(), instance, and instance_ok().

static size_t octave_call_stack::current_frame ( void  )
inlinestatic
static int octave_call_stack::current_line ( void  )
inlinestatic
static symbol_table::scope_id octave_call_stack::current_scope ( void  )
inlinestatic

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

References do_current_scope(), instance, and instance_ok().

static octave_user_code* octave_call_stack::debug_user_code ( void  )
inlinestatic

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

References do_debug_user_code(), instance, and instance_ok().

Referenced by get_user_code().

static int octave_call_stack::debug_user_code_column ( void  )
inlinestatic

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

References do_debug_user_code_column(), instance, and instance_ok().

static int octave_call_stack::debug_user_code_line ( void  )
inlinestatic

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

References do_debug_user_code_line(), instance, and instance_ok().

bool octave_call_stack::do_all_scripts ( void  ) const
private

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

References cs, f, octave_base_value::is_user_script(), octave_call_stack::stack_frame::m_fcn, p, and retval.

Referenced by all_scripts().

octave_map octave_call_stack::do_backtrace ( size_t  nskip,
octave_idx_type curr_user_frame,
bool  print_subfn 
) const
private
std::list< octave_call_stack::stack_frame > octave_call_stack::do_backtrace_frames ( size_t  nskip,
octave_idx_type curr_user_frame 
) const
private
octave_function* octave_call_stack::do_caller ( void  ) const
inlineprivate

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

Referenced by caller().

octave_user_code * octave_call_stack::do_caller_user_code ( size_t  nskip) const
private
int octave_call_stack::do_caller_user_code_column ( void  ) const
private
int octave_call_stack::do_caller_user_code_line ( void  ) const
private
void octave_call_stack::do_clear ( void  )
inlineprivate

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

Referenced by clear().

octave_function* octave_call_stack::do_current ( void  ) const
inlineprivate

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

References curr_frame, octave_call_stack::stack_frame::m_fcn, and retval.

Referenced by current().

int octave_call_stack::do_current_column ( void  ) const
private

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

References cs, curr_frame, octave_call_stack::stack_frame::m_column, and retval.

Referenced by current_column().

symbol_table::context_id octave_call_stack::do_current_context ( void  ) const
inlineprivate

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

References curr_frame.

Referenced by current_context().

size_t octave_call_stack::do_current_frame ( void  )
inlineprivate

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

References curr_frame.

Referenced by current_frame().

int octave_call_stack::do_current_line ( void  ) const
private

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

References cs, curr_frame, octave_call_stack::stack_frame::m_line, and retval.

Referenced by current_line().

symbol_table::scope_id octave_call_stack::do_current_scope ( void  ) const
inlineprivate

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

References curr_frame.

Referenced by current_scope().

octave_user_code * octave_call_stack::do_debug_user_code ( void  ) const
private
int octave_call_stack::do_debug_user_code_column ( void  ) const
private
int octave_call_stack::do_debug_user_code_line ( void  ) const
private
octave_function* octave_call_stack::do_element ( size_t  n)
inlineprivate

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

References octave_call_stack::stack_frame::m_fcn, and retval.

Referenced by element().

void octave_call_stack::do_goto_base_frame ( void  )
private
void octave_call_stack::do_goto_caller_frame ( void  )
private
bool octave_call_stack::do_goto_frame ( size_t  n,
bool  verbose 
)
private
bool octave_call_stack::do_goto_frame_relative ( int  n,
bool  verbose 
)
private
size_t octave_call_stack::do_num_user_code_frames ( octave_idx_type curr_user_frame) const
private

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

References cs, curr_frame, f, found, octave_base_value::is_user_code(), k, p, and retval.

Referenced by do_backtrace_frames(), and num_user_code_frames().

void octave_call_stack::do_pop ( void  )
inlineprivate
void octave_call_stack::do_push ( octave_function fcn,
symbol_table::scope_id  scope,
symbol_table::context_id  context 
)
inlineprivate

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

References curr_frame, and symbol_table::set_scope_and_context().

Referenced by create_instance(), and push().

void octave_call_stack::do_set_column ( int  c)
inlineprivate

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

References c, and octave_call_stack::stack_frame::m_column.

Referenced by set_column().

void octave_call_stack::do_set_line ( int  l)
inlineprivate

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

References octave_call_stack::stack_frame::m_line.

Referenced by set_line().

void octave_call_stack::do_set_location ( int  l,
int  c 
)
inlineprivate
size_t octave_call_stack::do_size ( void  )
inlineprivate

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

Referenced by size().

static octave_function* octave_call_stack::element ( size_t  n)
inlinestatic

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

References do_element(), instance, and instance_ok().

octave_map octave_call_stack::empty_backtrace ( void  )
static

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

References bt_fields.

Referenced by initialize_last_error_stack().

static void octave_call_stack::goto_base_frame ( void  )
inlinestatic

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

References do_goto_base_frame(), instance, and instance_ok().

Referenced by mexGetVariable(), and mexPutVariable().

static void octave_call_stack::goto_caller_frame ( void  )
inlinestatic

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

References do_goto_caller_frame(), instance, and instance_ok().

static bool octave_call_stack::goto_frame ( size_t  n = 0,
bool  verbose = false 
)
inlinestatic

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

References do_goto_frame(), instance, instance_ok(), and verbose.

Referenced by restore_frame().

static bool octave_call_stack::goto_frame_relative ( int  n,
bool  verbose = false 
)
inlinestatic

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

References do_goto_frame_relative(), instance, instance_ok(), and verbose.

static bool octave_call_stack::instance_ok ( void  )
inlinestatic
static size_t octave_call_stack::num_user_code_frames ( octave_idx_type curr_user_frame)
inlinestatic

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

References do_num_user_code_frames(), instance, and instance_ok().

static void octave_call_stack::pop ( void  )
inlinestatic
static void octave_call_stack::push ( octave_function f,
symbol_table::scope_id  scope = symbol_table::current_scope (),
symbol_table::context_id  context = symbol_table::current_context () 
)
inlinestatic
static void octave_call_stack::push ( symbol_table::scope_id  scope = symbol_table::current_scope (),
symbol_table::context_id  context = symbol_table::current_context () 
)
inlinestatic

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

References context, do_push(), instance, and instance_ok().

static void octave_call_stack::restore_frame ( size_t  n)
inlinestatic

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

References goto_frame().

static void octave_call_stack::set_column ( int  c)
inlinestatic
static void octave_call_stack::set_line ( int  l)
inlinestatic
static void octave_call_stack::set_location ( int  l,
int  c 
)
inlinestatic
static size_t octave_call_stack::size ( void  )
inlinestatic

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

References do_size(), instance, and instance_ok().

Member Data Documentation

std::deque<stack_frame> octave_call_stack::cs
private
size_t octave_call_stack::curr_frame
private
octave_call_stack * octave_call_stack::instance = 0
staticprivate

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