23 #if !defined (octave_toplev_h)
24 #define octave_toplev_h 1
108 std::string
fcn_name (
bool print_subfn =
true)
const;
120 typedef std::deque<stack_frame>::iterator
iterator;
137 ::error (
"unable to create call stack object!");
305 bool print_subfn =
true)
312 static std::list<octave_call_stack::stack_frame>
319 : std::list<octave_call_stack::stack_frame> ();
322 static std::list<octave_call_stack::stack_frame>
327 : std::list<octave_call_stack::stack_frame> ();
347 std::deque<stack_frame>
cs;
365 return curr_frame > 1 ? cs[curr_frame-1].m_fcn : cs[0].m_fcn;
376 return curr_frame > 0 && curr_frame < cs.size ()
382 return curr_frame > 0 && curr_frame < cs.size ()
414 curr_frame = cs.size ();
415 cs.push_back (
stack_frame (fcn, scope, context, prev_frame));
463 std::list<octave_call_stack::stack_frame>
468 bool print_subfn)
const;
496 #define OCTAVE_IGNORE_EXCEPTION(E) \
499 std::cerr << "error: ignoring " #E " while preparing to exit" << std::endl; \
500 recover_from_exception (); \
503 #define OCTAVE_SAFE_CALL(F, ARGS) \
508 unwind_protect frame; \
510 frame.protect_var (Vdebug_on_error); \
511 frame.protect_var (Vdebug_on_warning); \
513 Vdebug_on_error = false; \
514 Vdebug_on_warning = false; \
518 OCTAVE_IGNORE_EXCEPTION (octave_interrupt_exception) \
519 OCTAVE_IGNORE_EXCEPTION (octave_execution_exception) \
520 OCTAVE_IGNORE_EXCEPTION (std::bad_alloc) \
static bool instance_ok(void)
static void restore_frame(size_t n)
size_t do_current_frame(void)
std::string fcn_name(bool print_subfn=true) const
void do_set_location(int l, int c)
OCTINTERP_API bool octave_initialized
static size_t num_user_code_frames(octave_idx_type &curr_user_frame)
void do_push(octave_function *fcn, symbol_table::scope_id scope, symbol_table::context_id context)
OCTINTERP_API bool octave_remove_atexit_function(const std::string &fname)
static void push(symbol_table::scope_id scope=symbol_table::current_scope(), symbol_table::context_id context=symbol_table::current_context())
static bool all_scripts(void)
OCTINTERP_API octave_exit_func octave_exit
int do_caller_user_code_column(void) const
std::list< octave_call_stack::stack_frame > do_backtrace_frames(size_t nskip, octave_idx_type &curr_user_frame) const
void error(const char *fmt,...)
static octave_function * current(void)
bool do_all_scripts(void) const
static bool goto_frame(size_t n=0, bool verbose=false)
std::deque< stack_frame >::iterator iterator
octave_function * do_current(void) const
static void set_location(int l, int c)
std::deque< stack_frame >::reverse_iterator reverse_iterator
static void goto_caller_frame(void)
void do_set_column(int c)
static void create_instance(void)
OCTINTERP_API int exit_status
void(* octave_exit_func)(int)
static context_id current_context(void)
octave_function * do_caller(void) const
static int current_line(void)
std::deque< stack_frame > cs
symbol_table::scope_id do_current_scope(void) const
static octave_user_code * caller_user_code(size_t nskip=0)
static std::string fcn_file_name(const octave_value &fcn)
void do_goto_caller_frame(void)
static std::list< octave_call_stack::stack_frame > backtrace_frames(size_t nskip, octave_idx_type &curr_user_frame)
static octave_function * caller(void)
OCTINTERP_API bool quit_allowed
F77_RET_T const double const double * f
static symbol_table::scope_id current_scope(void)
static size_t current_frame(void)
std::deque< stack_frame >::const_iterator const_iterator
static llvm::LLVMContext & context
int do_current_column(void) const
bool do_goto_frame(size_t n, bool verbose)
octave_function * do_element(size_t n)
int do_caller_user_code_line(void) const
OCTINTERP_API int main_loop(void)
OCTINTERP_API void recover_from_exception(void)
stack_frame(octave_function *fcn=0, symbol_table::scope_id scope=0, symbol_table::context_id context=0, size_t prev=0)
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 goto_base_frame(void)
symbol_table::context_id do_current_context(void) const
octave_map do_backtrace(size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn) const
static void set_column(int c)
symbol_table::scope_id m_scope
size_t do_num_user_code_frames(octave_idx_type &curr_user_frame) const
static int caller_user_code_line(void)
bool do_goto_frame_relative(int n, bool verbose)
OCTINTERP_API void clean_up_and_exit(int status, bool safe_to_return=false)
OCTINTERP_API void octave_add_atexit_function(const std::string &fname)
OCTINTERP_API bool quitting_gracefully
static symbol_table::context_id current_context(void)
static int current_column(void)
static octave_function * element(size_t n)
static int caller_user_code_column(void)
static std::list< octave_call_stack::stack_frame > backtrace_frames(size_t nskip=0)
static void set_line(int l)
static octave_map empty_backtrace(void)
static octave_call_stack * instance
static octave_map backtrace(size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn=true)
int do_current_line(void) const
static bool goto_frame_relative(int n, bool verbose=false)
octave_user_code * do_caller_user_code(size_t nskip) const
OCTINTERP_API bool octave_interpreter_ready
stack_frame(const stack_frame &elt)
std::deque< stack_frame >::const_reverse_iterator const_reverse_iterator
static void cleanup_instance(void)
symbol_table::context_id m_context
static void set_scope_and_context(scope_id scope, context_id context)
void do_goto_base_frame(void)
static scope_id current_scope(void)
static octave_map backtrace(size_t nskip=0)