GNU Octave  4.0.0
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
Functions
debug.cc File Reference
#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"
Include dependency graph for debug.cc:

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_tget_line_offsets (const std::string &buf)
 
static octave_user_codeget_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)
 

Function Documentation

static octave_value_list do_dbstack ( const octave_value_list args,
int  nargout,
std::ostream &  os 
)
static
void do_dbtype ( std::ostream &  os,
const std::string &  name,
int  start,
int  end 
)

Definition at line 916 of file debug.cc.

References fcn_file_in_path().

Referenced by Fdblist(), and Fdbtype().

static void do_dbupdown ( const octave_value_list args,
const std::string &  who 
)
static
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   
)
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   
)

Definition at line 1405 of file debug.cc.

References do_dbupdown().

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 
)

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 
)
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   
)

Definition at line 1388 of file debug.cc.

References do_dbupdown().

OCTAVE_EXPORT octave_value_list Fdbwhere ( const octave_value_list ,
int   
)
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 std::deque<size_t> get_line_offsets ( const std::string &  buf)
static

Definition at line 99 of file debug.cc.

Referenced by get_file_line().

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

Definition at line 614 of file debug.cc.

References Array< T >::resize().

Referenced by Fdbstatus(), and Fdbstop().

static void parse_dbfunction_params ( const char who,
const octave_value_list args,
std::string &  symbol_name,
bp_table::intmap lines 
)
static
void show_octave_dbstack ( void  )

Definition at line 1299 of file debug.cc.

References do_dbstack().

static std::string snarf_file ( const std::string &  fname)
static

Definition at line 67 of file debug.cc.

References error(), and base_file_stat::size().

Referenced by get_file_line().