The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
wfl::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::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_debuggeradd_debug_info (formula_debugger *fdb, int arg_number, const std::string &f_name)
 

Private Attributes

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

Detailed Description

Definition at line 74 of file debugger.hpp.

Constructor & Destructor Documentation

◆ formula_debugger()

wfl::formula_debugger::formula_debugger ( )

Definition at line 96 of file debugger.cpp.

References add_breakpoint_continue_to_end(), and add_breakpoint_step_into().

◆ ~formula_debugger()

wfl::formula_debugger::~formula_debugger ( )
virtual

Definition at line 104 of file debugger.cpp.

Member Function Documentation

◆ add_breakpoint_continue_to_end()

void wfl::formula_debugger::add_breakpoint_continue_to_end ( )

◆ add_breakpoint_next()

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

◆ add_breakpoint_step_into()

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

◆ add_breakpoint_step_out()

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

◆ add_debug_info() [1/2]

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

Definition at line 135 of file debugger.hpp.

References add_debug_info().

◆ add_debug_info() [2/2]

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

◆ call_stack_pop()

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

◆ call_stack_push()

void wfl::formula_debugger::call_stack_push ( const std::string &  str)

◆ call_stack_set_evaluated()

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

◆ call_stack_set_value()

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

◆ check_breakpoints()

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

◆ evaluate_arg_callback()

variant wfl::formula_debugger::evaluate_arg_callback ( const formula_expression expression,
const formula_callable variables 
)

◆ evaluate_formula_callback() [1/2]

variant wfl::formula_debugger::evaluate_formula_callback ( const formula f)

◆ evaluate_formula_callback() [2/2]

variant wfl::formula_debugger::evaluate_formula_callback ( const formula f,
const formula_callable variables 
)

◆ get_call_stack()

const std::list< debug_info > & wfl::formula_debugger::get_call_stack ( ) const

◆ get_current_breakpoint()

const breakpoint_ptr wfl::formula_debugger::get_current_breakpoint ( ) const

Definition at line 128 of file debugger.cpp.

References current_breakpoint_.

◆ get_execution_trace()

const std::list< debug_info > & wfl::formula_debugger::get_execution_trace ( ) const

Definition at line 133 of file debugger.cpp.

References execution_trace_.

◆ show_gui()

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

Member Data Documentation

◆ arg_number_extra_debug_info

int wfl::formula_debugger::arg_number_extra_debug_info
private

Definition at line 150 of file debugger.hpp.

Referenced by add_debug_info(), and call_stack_push().

◆ breakpoints_

std::list< breakpoint_ptr > wfl::formula_debugger::breakpoints_
private

◆ call_stack_

std::list<debug_info> wfl::formula_debugger::call_stack_
private

◆ counter_

int wfl::formula_debugger::counter_
private

Definition at line 146 of file debugger.hpp.

Referenced by call_stack_push().

◆ current_breakpoint_

breakpoint_ptr wfl::formula_debugger::current_breakpoint_
private

Definition at line 147 of file debugger.hpp.

Referenced by check_breakpoints(), and get_current_breakpoint().

◆ execution_trace_

std::list<debug_info> wfl::formula_debugger::execution_trace_
private

Definition at line 149 of file debugger.hpp.

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

◆ f_name_extra_debug_info

std::string wfl::formula_debugger::f_name_extra_debug_info
private

Definition at line 151 of file debugger.hpp.

Referenced by add_debug_info(), and call_stack_push().


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