CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
Stack Traces

Platform-specific stack trace capture for debugging and crash analysis.

Provides the ability to capture the current call stack as an array of instruction pointer addresses. These addresses can be symbolicated offline or using platform-specific debugging APIs to obtain human-readable function names, file names, and line numbers.

Usage example:

uintptr_t frames[32];
int count = dbgStackTrace(0, 32, frames);
// frames[] now contains instruction pointers
// Use debugging tools or APIs to symbolicate these addresses
for (int i = 0; i < count; i++) {
printf("Frame %d: 0x%p\n", i, (void*)frames[i]);
}

Platform implementations:

Stack traces are automatically captured by the Crash Handler system and included in crash reports.