carb::extras::debugBacktrace
Defined in carb/extras/Debugging.h
-
inline size_t carb::extras::debugBacktrace(size_t skipFrames, void **array, size_t count) noexcept
Attempts to capture the callstack for the current thread.
Note
Non-debug code and lack of symbols can cause this function to be unable to capture stack frames. Function inlining and tail-calls may result in functions being absent from the backtrace.
- Parameters
skipFrames – The number of callstack frames to skip from the start (current call point) of the backtrace.
array – The array of pointers that is populated with the backtrace. The caller allocates this array.
count – The number of pointers that
array
can hold; the maximum size of the captured backtrace.
- Returns
The number of backtrace frames captured in
array