23 #if defined (HAVE_CONFIG_H) 41 {
"file",
"name",
"line",
"column",
"scope",
"context",
nullptr };
59 std::string parent_fcn_name = m_fcn->parent_fcn_name ();
61 if (print_subfn && ! parent_fcn_name.empty ())
62 retval = parent_fcn_name +
'>';
64 if (m_fcn->is_anonymous_function ())
84 else if (this->fcn_name () != rhs.
fcn_name ())
138 size_t k =
cs.size ();
147 if (
f &&
f->is_user_code ())
158 curr_user_frame =
retval - curr_user_frame - 1;
170 while (
p !=
cs.begin ())
176 if (
f &&
f->is_user_code ())
198 while (
p !=
cs.begin ())
204 if (
f &&
f->is_user_code ())
224 while (
p !=
cs.begin ())
230 if (
f &&
f->is_user_code ())
261 if (
f &&
f->is_user_code ())
289 if (
f &&
f->is_user_code ())
320 if (
f &&
f->is_user_code ())
340 while (
p !=
cs.begin ())
346 if (
f && !
f->is_user_script ())
373 error (
"max_stack_depth exceeded");
401 <<
" at line " << elt.
m_line 404 <<
"[context = " << elt.
m_context <<
"])" 428 if ((incr < 0 && xframe == 0) || (incr > 0 && xframe ==
cs.size () - 1))
437 if (xframe == 0 || (
f &&
f->is_user_code ()))
455 std::ostringstream buf;
458 buf <<
"stopped in " << elt.
fcn_name ()
459 <<
" at line " << elt.
m_line 463 buf <<
"at top level" << std::endl;
488 bool skipped =
false;
492 xframe =
cs[xframe].m_prev;
498 if (elt.
m_scope ==
cs[0].m_scope || (
f &&
f->is_user_code ()))
538 std::list<call_stack::stack_frame>
542 std::list<call_stack::stack_frame>
retval;
546 size_t nframes = (nskip <= user_code_frames ? user_code_frames - nskip : 0);
549 curr_user_frame = nframes - curr_user_frame - 1;
559 if (
f &&
f->is_user_code ())
574 bool print_subfn)
const 576 std::list<call_stack::stack_frame> frames
579 size_t nframes = frames.size ();
591 for (
const auto& frm : frames)
594 file(
k) = frm.fcn_file_name ();
595 name(
k) = frm.fcn_name (print_subfn);
596 line(
k) = frm.m_line;
610 return backtrace (nskip, curr_user_frame,
true);
639 "max_stack_depth", 0);
void goto_caller_frame(void)
symbol_scope top_scope(void)
OCTAVE_EXPORT octave_value_list column
For example cd octave end example noindent changes the current working directory to file
is already an absolute the name is checked against the file system instead of Octave s loadpath In this if otherwise an empty string is returned If the first argument is a cell array of search each directory of the loadpath for element of the cell array and return the first that matches If the second optional argument return a cell array containing the list of all files that have the same name in the path If no files are found
static const std::string anonymous
symbol_record::context_id current_context(void) const
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
int debug_user_code_line(void) const
octave_user_code * debug_user_code(void) const
int debug_user_code_column(void) const
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
symbol_scope current_scope(void)
std::string fcn_file_name(void) const
bool all_scripts(void) const
octave_map backtrace(size_t nskip, octave_idx_type &curr_user_frame, bool print_subfn=true) const
octave_map empty_backtrace(void) const
bool goto_frame_relative(int n, bool verbose=false)
void error(const char *fmt,...)
octave_user_code * caller_user_code(size_t nskip=0) const
int caller_user_code_line(void) const
std::deque< stack_frame >::const_reverse_iterator const_reverse_iterator
static llvm::LLVMContext & context
virtual std::string fcn_file_name(void) const
nd deftypefn *std::string name
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)
call_stack(interpreter &interp)
std::deque< stack_frame >::const_iterator const_iterator
bool goto_frame(size_t n=0, bool verbose=false)
static const octave_fields bt_fields(bt_fieldnames)
void set_scope_and_context(const symbol_scope &sid, symbol_record::context_id context)
void goto_base_frame(void)
static const char * bt_fieldnames[]
std::string fcn_name(bool print_subfn=true) const
end deftypefn *return set_internal_variable(Vsvd_driver, args, nargout, "svd_driver", driver_names)
symbol_table & get_symbol_table(void)
octave_value max_stack_depth(const octave_value_list &args, int nargout)
int current_line(void) const
std::list< call_stack::stack_frame > backtrace_frames(size_t nskip, octave_idx_type &curr_user_frame) const
std::deque< stack_frame > cs
int current_column(void) const
symbol_record::context_id m_context
bool operator==(const stack_frame &rhs) const
int caller_user_code_column(void) const
size_t num_user_code_frames(octave_idx_type &curr_user_frame) const
Vector representing the dimensions (size) of an Array.
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
interpreter & m_interpreter