#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_debugger * | add_debug_info (formula_debugger *fdb, int arg_number, const std::string &f_name) |
Private Attributes | |
std::deque< debug_info > | call_stack_ |
int | counter_ |
breakpoint_ptr | current_breakpoint_ |
std::deque< breakpoint_ptr > | breakpoints_ |
std::deque< debug_info > | execution_trace_ |
int | arg_number_extra_debug_info |
std::string | f_name_extra_debug_info |
Definition at line 76 of file debugger.hpp.
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().
|
virtual |
Definition at line 107 of file debugger.cpp.
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 | ||
) |
Definition at line 118 of file debugger.cpp.
References arg_number_extra_debug_info, and f_name_extra_debug_info.
Referenced by game_logic::add_debug_info(), and add_debug_info().
|
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 | ) |
Definition at line 170 of file debugger.cpp.
References arg_number_extra_debug_info, call_stack_, counter_, execution_trace_, and f_name_extra_debug_info.
Referenced by evaluate_arg_callback(), and evaluate_formula_callback().
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().
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 | ||
) |
Definition at line 196 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), game_logic::formula_expression::execute(), game_logic::msg(), and game_logic::formula_expression::str().
Referenced by game_logic::evaluate_arg_callback().
variant game_logic::formula_debugger::evaluate_formula_callback | ( | const formula & | f, |
const formula_callable & | variables | ||
) |
Definition at line 211 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), game_logic::formula::execute(), game_logic::msg(), and game_logic::formula::str().
Referenced by game_logic::evaluate_formula_callback().
Definition at line 226 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), game_logic::formula::execute(), game_logic::msg(), and game_logic::formula::str().
const std::deque< debug_info > & game_logic::formula_debugger::get_call_stack | ( | ) | const |
Definition at line 125 of file debugger.cpp.
References call_stack_.
Referenced by game_logic::end_breakpoint::is_break_now(), game_logic::step_in_breakpoint::is_break_now(), game_logic::step_out_breakpoint::is_break_now(), and game_logic::next_breakpoint::is_break_now().
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().
|
private |
Definition at line 152 of file debugger.hpp.
Referenced by add_debug_info(), and call_stack_push().
|
private |
Definition at line 150 of file debugger.hpp.
Referenced by add_breakpoint_continue_to_end(), add_breakpoint_next(), add_breakpoint_step_into(), add_breakpoint_step_out(), and check_breakpoints().
|
private |
Definition at line 147 of file debugger.hpp.
Referenced by call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), evaluate_arg_callback(), evaluate_formula_callback(), and get_call_stack().
|
private |
Definition at line 148 of file debugger.hpp.
Referenced by call_stack_push().
|
private |
Definition at line 149 of file debugger.hpp.
Referenced by check_breakpoints(), and get_current_breakpoint().
|
private |
Definition at line 151 of file debugger.hpp.
Referenced by call_stack_pop(), call_stack_push(), and get_execution_trace().
|
private |
Definition at line 153 of file debugger.hpp.
Referenced by add_debug_info(), and call_stack_push().