libcmutils 0.6.5
Multi-platform C99 utility library
Loading...
Searching...
No Matches
CMUTIL_StackWalker Struct Reference

Stack walker object. More...

Data Fields

CMUTIL_StringArray *(* GetStack )(const CMUTIL_StackWalker *walker, int skipdepth)
 Get the current call stack as a string array.
 
void(* PrintStack )(const CMUTIL_StackWalker *walker, CMUTIL_String *outbuf, int skipdepth)
 Print the current call stack to a string buffer.
 
void(* Destroy )(CMUTIL_StackWalker *walker)
 Destroy the stack walker and free its resources.
 

Detailed Description

Stack walker object.

Field Documentation

◆ GetStack

CMUTIL_StringArray *(* CMUTIL_StackWalker::GetStack) (const CMUTIL_StackWalker *walker, int skipdepth)

Get the current call stack as a string array.

This method retrieves the current call stack, skipping a specified number of frames from the top.

Parameters
walkerThe stack walker object.
skipdepthThe number of frames to skip from the top of the stack.
Returns
A pointer to a CMUTIL_StringArray containing the call stack.

◆ PrintStack

void(* CMUTIL_StackWalker::PrintStack) (const CMUTIL_StackWalker *walker, CMUTIL_String *outbuf, int skipdepth)

Print the current call stack to a string buffer.

This method prints the current call stack into the provided string buffer, skipping a specified number of frames from the top.

Parameters
walkerThe stack walker object.
outbufThe string buffer to store the printed stack trace.
skipdepthThe number of frames to skip from the top of the stack.

◆ Destroy

void(* CMUTIL_StackWalker::Destroy) (CMUTIL_StackWalker *walker)

Destroy the stack walker and free its resources.

This method releases all resources associated with the stack walker and frees any allocated memory.

Parameters
walkerA pointer to the CMUTIL_StackWalker object to be destroyed.

The documentation for this struct was generated from the following file: