The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
game_logic::formula_debugger Class Reference

#include <debugger.hpp>

Public Member Functions

 formula_debugger ()
 
virtual ~formula_debugger ()
 
void add_debug_info (int arg_number, const std::string &f_name)
 
void call_stack_push (const std::string &str)
 
void call_stack_pop ()
 
void call_stack_set_evaluated (bool evaluated)
 
void call_stack_set_value (const variant &v)
 
void check_breakpoints ()
 
const std::deque< debug_info > & get_call_stack () const
 
const breakpoint_ptr get_current_breakpoint () const
 
const std::deque< debug_info > & get_execution_trace () const
 
variant evaluate_arg_callback (const formula_expression &expression, const formula_callable &variables)
 
variant evaluate_formula_callback (const formula &f, const formula_callable &variables)
 
variant evaluate_formula_callback (const formula &f)
 
void show_gui ()
 
void add_breakpoint_continue_to_end ()
 
void add_breakpoint_step_into ()
 
void add_breakpoint_step_out ()
 
void add_breakpoint_next ()
 

Static Public Member Functions

static formula_debuggeradd_debug_info (formula_debugger *fdb, int arg_number, const std::string &f_name)
 

Private Attributes

std::deque< debug_infocall_stack_
 
int counter_
 
breakpoint_ptr current_breakpoint_
 
std::deque< breakpoint_ptrbreakpoints_
 
std::deque< debug_infoexecution_trace_
 
int arg_number_extra_debug_info
 
std::string f_name_extra_debug_info
 

Detailed Description

Definition at line 76 of file debugger.hpp.

Constructor & Destructor Documentation

game_logic::formula_debugger::formula_debugger ( )

Definition at line 99 of file debugger.cpp.

References add_breakpoint_continue_to_end(), and add_breakpoint_step_into().

game_logic::formula_debugger::~formula_debugger ( )
virtual

Definition at line 107 of file debugger.cpp.

Member Function Documentation

void game_logic::formula_debugger::add_breakpoint_continue_to_end ( )

Definition at line 364 of file debugger.cpp.

References breakpoints_, and LOG_FDB.

Referenced by gui2::tformula_debugger::callback_continue_button(), and formula_debugger().

void game_logic::formula_debugger::add_breakpoint_next ( )

Definition at line 385 of file debugger.cpp.

References breakpoints_, and LOG_FDB.

Referenced by gui2::tformula_debugger::callback_next_button().

void game_logic::formula_debugger::add_breakpoint_step_into ( )

Definition at line 371 of file debugger.cpp.

References breakpoints_, and LOG_FDB.

Referenced by gui2::tformula_debugger::callback_step_button(), and formula_debugger().

void game_logic::formula_debugger::add_breakpoint_step_out ( )

Definition at line 378 of file debugger.cpp.

References breakpoints_, and LOG_FDB.

Referenced by gui2::tformula_debugger::callback_stepout_button().

void game_logic::formula_debugger::add_debug_info ( int  arg_number,
const std::string f_name 
)
static formula_debugger* game_logic::formula_debugger::add_debug_info ( formula_debugger fdb,
int  arg_number,
const std::string f_name 
)
inlinestatic

Definition at line 137 of file debugger.hpp.

References add_debug_info().

void game_logic::formula_debugger::call_stack_pop ( )

Definition at line 179 of file debugger.cpp.

References call_stack_, and execution_trace_.

Referenced by evaluate_arg_callback(), and evaluate_formula_callback().

void game_logic::formula_debugger::call_stack_push ( const std::string str)
void game_logic::formula_debugger::call_stack_set_evaluated ( bool  evaluated)

Definition at line 186 of file debugger.cpp.

References call_stack_.

Referenced by evaluate_arg_callback(), and evaluate_formula_callback().

void game_logic::formula_debugger::call_stack_set_value ( const variant v)

Definition at line 191 of file debugger.cpp.

References call_stack_.

Referenced by evaluate_arg_callback(), and evaluate_formula_callback().

void game_logic::formula_debugger::check_breakpoints ( )

Definition at line 141 of file debugger.cpp.

References breakpoints_, current_breakpoint_, and show_gui().

Referenced by evaluate_arg_callback(), and evaluate_formula_callback().

variant game_logic::formula_debugger::evaluate_arg_callback ( const formula_expression expression,
const formula_callable variables 
)
variant game_logic::formula_debugger::evaluate_formula_callback ( const formula f,
const formula_callable variables 
)
variant game_logic::formula_debugger::evaluate_formula_callback ( const formula f)
const std::deque< debug_info > & game_logic::formula_debugger::get_call_stack ( ) const
const breakpoint_ptr game_logic::formula_debugger::get_current_breakpoint ( ) const

Definition at line 131 of file debugger.cpp.

References current_breakpoint_.

const std::deque< debug_info > & game_logic::formula_debugger::get_execution_trace ( ) const

Definition at line 136 of file debugger.cpp.

References execution_trace_.

void game_logic::formula_debugger::show_gui ( )

Definition at line 156 of file debugger.cpp.

References game_config::debug, resources::screen, gui2::tdialog::show(), and WRN_FDB.

Referenced by check_breakpoints().

Member Data Documentation

int game_logic::formula_debugger::arg_number_extra_debug_info
private

Definition at line 152 of file debugger.hpp.

Referenced by add_debug_info(), and call_stack_push().

std::deque< breakpoint_ptr > game_logic::formula_debugger::breakpoints_
private
std::deque<debug_info> game_logic::formula_debugger::call_stack_
private
int game_logic::formula_debugger::counter_
private

Definition at line 148 of file debugger.hpp.

Referenced by call_stack_push().

breakpoint_ptr game_logic::formula_debugger::current_breakpoint_
private

Definition at line 149 of file debugger.hpp.

Referenced by check_breakpoints(), and get_current_breakpoint().

std::deque<debug_info> game_logic::formula_debugger::execution_trace_
private

Definition at line 151 of file debugger.hpp.

Referenced by call_stack_pop(), call_stack_push(), and get_execution_trace().

std::string game_logic::formula_debugger::f_name_extra_debug_info
private

Definition at line 153 of file debugger.hpp.

Referenced by add_debug_info(), and call_stack_push().


The documentation for this class was generated from the following files: