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
Enumerations | Functions | Variables
debug.cc File Reference
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <set>
#include <string>
#include "file-stat.h"
#include "singleton-cleanup.h"
#include "call-stack.h"
#include "defun.h"
#include "error.h"
#include "file-ops.h"
#include "help.h"
#include "input.h"
#include "pager.h"
#include "octave-link.h"
#include "ovl.h"
#include "utils.h"
#include "parse.h"
#include "symtab.h"
#include "errwarn.h"
#include "octave-preserve-stream-state.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-exp.h"
#include "pt-stmt.h"
#include "sighandlers.h"
#include "interpreter.h"
#include "unwind-prot.h"
#include "variables.h"
#include "debug.h"
Include dependency graph for debug.cc:

Go to the source code of this file.

Enumerations

enum  dbstop_args { dbstop_in, dbstop_at, dbstop_if, dbstop_none }
 

Functions

when function syntax is the
lines may also be passed as a
single vector 
argument (ode{[ar{line1}, ar{line2}, ots{}]}).ar
 
std::string do_find_bkpt_list (octave_value_list slist, std::string match)
 
is any Octave expression that
can be evaluated in the code
context that exists at the
breakpoint When the breakpoint
is and execution will stop if
for example because it refers
to an undefined an error will
be thrown Expressions with
side 
effects (such as ode{y++ > 1}) will alter variables
 
OCTAVE_EXPORT octave_value_list Fdbstop (const octave_value_list &args, int) If ile
 
static octave_user_codefind_fcn_by_line (octave_user_code *main_fcn, int lineno, int *end_line=0)
 
std::string get_file_line (const std::string &fname, size_t line)
 
static std::deque< size_tget_line_offsets (const std::string &buf)
 
static octave_user_codeget_user_code (const std::string &fname="")
 
static octave_value intmap_to_ov (const bp_table::intmap &line)
 
void parse_dbfunction_params (const char *who, const octave_value_list &args, std::string &symbol_name, bp_table::intmap &lines, std::string &cond)
 
static std::string snarf_file (const std::string &fname)
 

Variables

is any Octave expression that
can be evaluated in the code
context that exists at the
breakpoint When the breakpoint
is 
ar {condition} will be evaluated
 
is any Octave expression that
can be evaluated in the code
context that exists at the
breakpoint When the breakpoint
is 
encountered
 
has a subfunction then a
breakpoint in it defaults to
the first executable line in
the file 
ile {func.m}. Multiple lines can be specified in a single command
 
has a subfunction ode {func2}
 
when function syntax is used
 
is any Octave expression that
can be evaluated in the code
context that exists at the
breakpoint When the breakpoint
is and execution will stop if
for example because it refers
to an undefined 
variable
 

Enumeration Type Documentation

Enumerator
dbstop_in 
dbstop_at 
dbstop_if 
dbstop_none 

Definition at line 216 of file debug.cc.

Function Documentation

when function syntax is the lines may also be passed as a single vector argument ( ode{[ar{line1}, ar{line2}, ots{}]}  )

Definition at line 1099 of file debug.cc.

std::string do_find_bkpt_list ( octave_value_list  slist,
std::string  match 
)

Definition at line 912 of file debug.cc.

References octave_value_list::length(), retval, and string.

Referenced by bp_table::do_get_breakpoint_list().

is any Octave expression that can be evaluated in the code context that exists at the breakpoint When the breakpoint is and execution will stop if for example because it refers to an undefined an error will be thrown Expressions with side effects ( such as ode{y++ > 1}  )
OCTAVE_EXPORT octave_value_list Fdbstop ( const octave_value_list args,
int   
)

Definition at line 1099 of file debug.cc.

Referenced by install_debug_fcns().

static octave_user_code* find_fcn_by_line ( octave_user_code main_fcn,
int  lineno,
int end_line = 0 
)
static
std::string get_file_line ( const std::string fname,
size_t  line 
)

Definition at line 141 of file debug.cc.

References get_line_offsets(), retval, snarf_file(), and string.

Referenced by get_debug_input().

static std::deque<size_t> get_line_offsets ( const std::string buf)
static

Definition at line 108 of file debug.cc.

References c.

Referenced by get_file_line().

static octave_user_code* get_user_code ( const std::string fname = "")
static
static octave_value intmap_to_ov ( const bp_table::intmap line)
static

Definition at line 989 of file debug.cc.

References p, Array< T >::resize(), and retval.

void parse_dbfunction_params ( const char *  who,
const octave_value_list args,
std::string symbol_name,
bp_table::intmap lines,
std::string cond 
)
static std::string snarf_file ( const std::string fname)
static

Definition at line 78 of file debug.cc.

References error(), file, fs, retval, octave::sys::base_file_stat::size(), string, and sz.

Referenced by get_file_line().

Variable Documentation

is any Octave expression that can be evaluated in the code context that exists at the breakpoint When the breakpoint is and execution will stop if ar {condition} will be evaluated

Definition at line 1099 of file debug.cc.

is any Octave expression that can be evaluated in the code context that exists at the breakpoint When the breakpoint is encountered

Definition at line 1099 of file debug.cc.

has a subfunction then a breakpoint in it defaults to the first executable line in the file ile {func.m}. Multiple lines can be specified in a single command

Definition at line 1099 of file debug.cc.

has a subfunction then a breakpoint in ode {func2}

Definition at line 1099 of file debug.cc.

when function syntax is used

Definition at line 1099 of file debug.cc.

Referenced by octave::delimited_stream::getline().

is any Octave expression that can be evaluated in the code context that exists at the breakpoint When the breakpoint is and execution will stop if for example because it refers to an undefined variable

Definition at line 1099 of file debug.cc.