PStack  2.0
Stack trace printer for MSVC and GCC binaries
anonymous_namespace{pstack.cpp} Namespace Reference

Functions that are local to this compilation unit. More...

Functions

template<typename SymbolEngine >
void output_stack_frame (SymbolEngine &symbol_eng, psystem::module_address_map const &modules, psystem::stack_frame const &frame)
 Prints a single stack from a stack trace to the console. More...
 
template<typename SymbolEngine >
void output_stack_trace (SymbolEngine &symbol_eng, psystem::process_info *const proc, psystem::thread_info *const thrd)
 Prints one thread's call stack to the screen. More...
 

Detailed Description

Functions that are local to this compilation unit.

Function Documentation

template<typename SymbolEngine >
void anonymous_namespace{pstack.cpp}::output_stack_frame ( SymbolEngine &  symbol_eng,
psystem::module_address_map const &  modules,
psystem::stack_frame const &  frame 
)

Prints a single stack from a stack trace to the console.

Template Parameters
SymbolEngineThis method can be configured to use different "engines" for resolving function names. psystem::dbghelp_symbol_engine is one such example.
Parameters
[in]symbol_engUsed to map addresses to function symbol names.
[in]modulesCatalog of loaded modules to search for information.
[in]frameThe stack frame that we are examining.
Todo:
msvc_generated
Todo:
Source-code line information unimplemented.
template<typename SymbolEngine >
void anonymous_namespace{pstack.cpp}::output_stack_trace ( SymbolEngine &  symbol_eng,
psystem::process_info *const  proc,
psystem::thread_info *const  thrd 
)

Prints one thread's call stack to the screen.

Template Parameters
SymbolEngineThis method can be configured to use different "engines" for resolving function names. psystem::dbghelp_symbol_engine is one such example.
Parameters
[in]symbol_engUsed to map addresses to function symbol names.
[in]procThe process that we are examining.
[in]thrdThe thread that we are examining.