XII Release 0.1.0
Loading...
Searching...
No Matches
xiiStackTracer Class Reference

Helper class to capture the current stack and print a captured stack. More...

#include <StackTracer.h>

Public Types

using PrintFunc = xiiDelegate<void(const char* szText)>
 Callback-function to print a text somewhere.
 

Static Public Member Functions

static xiiUInt32 GetStackTrace (xiiArrayPtr< void * > &ref_trace, void *pContext=nullptr)
 Captures the current stack trace.
 
static void ResolveStackTrace (const xiiArrayPtr< void * > &trace, PrintFunc printFunc)
 Print a stack trace.
 
static void PrintStackTrace (const xiiArrayPtr< void * > &trace, PrintFunc printFunc)
 Print a stack trace without resolving it.
 

Detailed Description

Helper class to capture the current stack and print a captured stack.

Member Function Documentation

◆ GetStackTrace()

xiiUInt32 xiiStackTracer::GetStackTrace ( xiiArrayPtr< void * > & ref_trace,
void * pContext = nullptr )
static

Captures the current stack trace.

The trace will contain not more than ref_trace.GetCount() entries. [Windows] If called in an exception handler, set pContext to PEXCEPTION_POINTERS::ContextRecord. Returns the actual number of captured entries.


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