#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::list< debug_info > & | get_call_stack () const |
const breakpoint_ptr | get_current_breakpoint () const |
const std::list< 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::list< debug_info > | call_stack_ |
int | counter_ |
breakpoint_ptr | current_breakpoint_ |
std::list< breakpoint_ptr > | breakpoints_ |
std::list< debug_info > | execution_trace_ |
int | arg_number_extra_debug_info |
std::string | f_name_extra_debug_info |
Definition at line 74 of file debugger.hpp.
wfl::formula_debugger::formula_debugger | ( | ) |
Definition at line 96 of file debugger.cpp.
References add_breakpoint_continue_to_end(), and add_breakpoint_step_into().
|
virtual |
Definition at line 104 of file debugger.cpp.
void wfl::formula_debugger::add_breakpoint_continue_to_end | ( | ) |
Definition at line 360 of file debugger.cpp.
References breakpoints_, and LOG_FDB.
Referenced by gui2::dialogs::formula_debugger::callback_continue_button(), and formula_debugger().
void wfl::formula_debugger::add_breakpoint_next | ( | ) |
Definition at line 381 of file debugger.cpp.
References breakpoints_, and LOG_FDB.
Referenced by gui2::dialogs::formula_debugger::callback_next_button().
void wfl::formula_debugger::add_breakpoint_step_into | ( | ) |
Definition at line 367 of file debugger.cpp.
References breakpoints_, and LOG_FDB.
Referenced by gui2::dialogs::formula_debugger::callback_step_button(), and formula_debugger().
void wfl::formula_debugger::add_breakpoint_step_out | ( | ) |
Definition at line 374 of file debugger.cpp.
References breakpoints_, and LOG_FDB.
Referenced by gui2::dialogs::formula_debugger::callback_stepout_button().
|
inlinestatic |
Definition at line 135 of file debugger.hpp.
References add_debug_info().
void wfl::formula_debugger::add_debug_info | ( | int | arg_number, |
const std::string & | f_name | ||
) |
Definition at line 115 of file debugger.cpp.
References arg_number_extra_debug_info, and f_name_extra_debug_info.
Referenced by add_debug_info(), and wfl::add_debug_info().
void wfl::formula_debugger::call_stack_pop | ( | ) |
Definition at line 175 of file debugger.cpp.
References call_stack_, and execution_trace_.
Referenced by evaluate_arg_callback(), and evaluate_formula_callback().
void wfl::formula_debugger::call_stack_push | ( | const std::string & | str | ) |
Definition at line 166 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 wfl::formula_debugger::call_stack_set_evaluated | ( | bool | evaluated | ) |
Definition at line 182 of file debugger.cpp.
References call_stack_.
Referenced by evaluate_arg_callback(), and evaluate_formula_callback().
void wfl::formula_debugger::call_stack_set_value | ( | const variant & | v | ) |
Definition at line 187 of file debugger.cpp.
References call_stack_.
Referenced by evaluate_arg_callback(), and evaluate_formula_callback().
void wfl::formula_debugger::check_breakpoints | ( | ) |
Definition at line 138 of file debugger.cpp.
References b, breakpoints_, current_breakpoint_, and show_gui().
Referenced by evaluate_arg_callback(), and evaluate_formula_callback().
variant wfl::formula_debugger::evaluate_arg_callback | ( | const formula_expression & | expression, |
const formula_callable & | variables | ||
) |
Definition at line 192 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), wfl::formula_expression::execute(), wfl::msg(), wfl::formula_expression::str(), and wfl::variant::to_debug_string().
Referenced by wfl::evaluate_arg_callback().
Definition at line 222 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), f, wfl::msg(), and wfl::variant::to_debug_string().
variant wfl::formula_debugger::evaluate_formula_callback | ( | const formula & | f, |
const formula_callable & | variables | ||
) |
Definition at line 207 of file debugger.cpp.
References call_stack_, call_stack_pop(), call_stack_push(), call_stack_set_evaluated(), call_stack_set_value(), check_breakpoints(), f, wfl::msg(), and wfl::variant::to_debug_string().
Referenced by wfl::evaluate_formula_callback().
const std::list< debug_info > & wfl::formula_debugger::get_call_stack | ( | ) | const |
Definition at line 122 of file debugger.cpp.
References call_stack_.
Referenced by wfl::end_breakpoint::is_break_now(), wfl::step_in_breakpoint::is_break_now(), wfl::step_out_breakpoint::is_break_now(), and wfl::next_breakpoint::is_break_now().
const breakpoint_ptr wfl::formula_debugger::get_current_breakpoint | ( | ) | const |
Definition at line 128 of file debugger.cpp.
References current_breakpoint_.
const std::list< debug_info > & wfl::formula_debugger::get_execution_trace | ( | ) | const |
Definition at line 133 of file debugger.cpp.
References execution_trace_.
void wfl::formula_debugger::show_gui | ( | ) |
Definition at line 153 of file debugger.cpp.
References game_config::debug, game_display::get_singleton(), and WRN_FDB.
Referenced by check_breakpoints().
|
private |
Definition at line 150 of file debugger.hpp.
Referenced by add_debug_info(), and call_stack_push().
|
private |
Definition at line 148 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 145 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 146 of file debugger.hpp.
Referenced by call_stack_push().
|
private |
Definition at line 147 of file debugger.hpp.
Referenced by check_breakpoints(), and get_current_breakpoint().
|
private |
Definition at line 149 of file debugger.hpp.
Referenced by call_stack_pop(), call_stack_push(), and get_execution_trace().
|
private |
Definition at line 151 of file debugger.hpp.
Referenced by add_debug_info(), and call_stack_push().