GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include "file-stat.h"
#include "singleton-cleanup.h"
#include "defun.h"
#include "error.h"
#include "help.h"
#include "input.h"
#include "pager.h"
#include "octave-link.h"
#include "oct-obj.h"
#include "utils.h"
#include "parse.h"
#include "symtab.h"
#include "gripes.h"
#include "ov.h"
#include "ov-usr-fcn.h"
#include "ov-fcn.h"
#include "ov-struct.h"
#include "pt-pr-code.h"
#include "pt-bp.h"
#include "pt-eval.h"
#include "pt-stmt.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "variables.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
static octave_value_list | do_dbstack (const octave_value_list &args, int nargout, std::ostream &os) |
void | do_dbtype (std::ostream &os, const std::string &name, int start, int end) |
static void | do_dbupdown (const octave_value_list &args, const std::string &who) |
std::string | do_find_bkpt_list (octave_value_list slist, std::string match) |
OCTAVE_EXPORT octave_value_list | F__db_next_breakpoint_quiet__ (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbclear (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbcont (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbdown (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdblist (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbquit (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbstack (const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fdbstatus (const octave_value_list &args, int nargout) |
OCTAVE_EXPORT octave_value_list | Fdbstep (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbstop (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbtype (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbup (const octave_value_list &args, int) |
OCTAVE_EXPORT octave_value_list | Fdbwhere (const octave_value_list &, int) |
OCTAVE_EXPORT octave_value_list | Fisdebugmode (const octave_value_list &args, int) |
std::string | get_file_line (const std::string &fname, size_t line) |
static std::deque< size_t > | get_line_offsets (const std::string &buf) |
static octave_user_code * | get_user_code (const std::string &fname=std::string()) |
static octave_value | intmap_to_ov (const bp_table::intmap &line) |
static void | parse_dbfunction_params (const char *who, const octave_value_list &args, std::string &symbol_name, bp_table::intmap &lines) |
void | show_octave_dbstack (void) |
static std::string | snarf_file (const std::string &fname) |
|
static |
Definition at line 1185 of file debug.cc.
References arg(), octave_call_stack::backtrace(), octave_map::contents(), error(), error_state, octave_value::int_value(), octave_value::is_string(), octave_value_list::length(), max(), names(), octave_map::numel(), print_usage(), and octave_value::string_value().
Referenced by Fdbstack(), and show_octave_dbstack().
Definition at line 916 of file debug.cc.
References fcn_file_in_path().
|
static |
Definition at line 1352 of file debug.cc.
References arg(), error(), error_state, octave_call_stack::goto_frame_relative(), octave_value::is_string(), octave_value_list::length(), and octave_value::string_value().
std::string do_find_bkpt_list | ( | octave_value_list | slist, |
std::string | match | ||
) |
Definition at line 554 of file debug.cc.
References octave_value_list::length(), and match().
Referenced by bp_table::do_get_breakpoint_list().
OCTAVE_EXPORT octave_value_list F__db_next_breakpoint_quiet__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1568 of file debug.cc.
References error_state, gripe_wrong_type_arg(), octave_value::length(), print_usage(), tree_evaluator::quiet_breakpoint_flag, and state.
Referenced by main_window::execute_debug_callback().
OCTAVE_EXPORT octave_value_list Fdbclear | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 721 of file debug.cc.
References error_state, octave_value::length(), parse_dbfunction_params(), bp_table::remove_all_breakpoints(), and bp_table::remove_breakpoint().
OCTAVE_EXPORT octave_value_list Fdbcont | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1498 of file debug.cc.
References error(), octave_value_list::octave_value_list(), print_usage(), tree_evaluator::reset_debug_state(), and Vdebugging.
Referenced by main_window::execute_debug_callback().
OCTAVE_EXPORT octave_value_list Fdbdown | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1405 of file debug.cc.
References do_dbupdown().
OCTAVE_EXPORT octave_value_list Fdblist | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1118 of file debug.cc.
References arg(), octave_call_stack::caller_user_code_line(), do_dbtype(), error(), octave_function::fcn_file_name(), get_file_line(), get_user_code(), octave_value::is_string(), max(), octave_function::name(), octave_stdout, and octave_value::string_value().
OCTAVE_EXPORT octave_value_list Fdbquit | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1523 of file debug.cc.
References error(), octave_throw_interrupt_exception(), octave_value_list::octave_value_list(), print_usage(), tree_evaluator::reset_debug_state(), and Vdebugging.
Referenced by main_window::execute_debug_callback().
OCTAVE_EXPORT octave_value_list Fdbstack | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 1346 of file debug.cc.
References do_dbstack(), and octave_stdout.
OCTAVE_EXPORT octave_value_list Fdbstatus | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 774 of file debug.cc.
References octave_map::assign(), do_which(), error(), bp_table::get_breakpoint_list(), get_user_code(), gripe_wrong_type_arg(), intmap_to_ov(), octave_map::length(), octave_function::name(), names(), octave_stdout, octave_value(), and Vdebugging.
OCTAVE_EXPORT octave_value_list Fdbstep | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1435 of file debug.cc.
References arg(), tree_evaluator::dbstep_flag, error(), octave_value_list::octave_value_list(), print_usage(), and Vdebugging.
Referenced by main_window::execute_debug_callback().
OCTAVE_EXPORT octave_value_list Fdbstop | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 669 of file debug.cc.
References bp_table::add_breakpoint(), error_state, intmap_to_ov(), and parse_dbfunction_params().
OCTAVE_EXPORT octave_value_list Fdbtype | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 968 of file debug.cc.
References arg(), do_dbtype(), error(), error_state, octave_function::fcn_file_name(), Array< T >::find(), get_user_code(), max(), min(), and octave_stdout.
OCTAVE_EXPORT octave_value_list Fdbup | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1388 of file debug.cc.
References do_dbupdown().
OCTAVE_EXPORT octave_value_list Fdbwhere | ( | const octave_value_list & | , |
int | |||
) |
Definition at line 871 of file debug.cc.
References octave_call_stack::caller_user_code_line(), error(), octave_function::fcn_file_name(), get_file_line(), get_user_code(), octave_function::name(), and octave_stdout.
OCTAVE_EXPORT octave_value_list Fisdebugmode | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1549 of file debug.cc.
References print_usage(), and Vdebugging.
std::string get_file_line | ( | const std::string & | fname, |
size_t | line | ||
) |
Definition at line 132 of file debug.cc.
References get_line_offsets(), and snarf_file().
Referenced by Fdblist(), Fdbwhere(), and get_debug_input().
|
static |
Definition at line 99 of file debug.cc.
Referenced by get_file_line().
|
static |
Definition at line 171 of file debug.cc.
References octave_call_stack::caller_user_code(), symbol_table::find_function(), octave_value::is_defined(), octave_value::is_user_code(), and octave_value::user_code_value().
Referenced by bp_table::do_add_breakpoint(), bp_table::do_get_breakpoint_list(), bp_table::do_remove_all_breakpoints_in_file(), bp_table::do_remove_breakpoint(), Fdblist(), Fdbstatus(), Fdbtype(), Fdbwhere(), and parse_dbfunction_params().
|
static |
Definition at line 614 of file debug.cc.
References Array< T >::resize().
Referenced by Fdbstatus(), and Fdbstop().
|
static |
Definition at line 196 of file debug.cc.
References arg(), octave_value_list::array_value(), Array< T >::elem(), error(), error_state, get_user_code(), octave_value_list::length(), octave_function::name(), Array< T >::nelem(), octave_stdout, and Vdebugging.
Referenced by Fdbclear(), and Fdbstop().
void show_octave_dbstack | ( | void | ) |
Definition at line 1299 of file debug.cc.
References do_dbstack().
|
static |
Definition at line 67 of file debug.cc.
References error(), and base_file_stat::size().
Referenced by get_file_line().