MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getCallStack

Function getCallStack

Source/3rdParty/bx/src/debug.cpp:255–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253
254#if BX_CONFIG_CALLSTACK_USE_LIB_BACKTRACE
255 uint32_t getCallStack(uint32_t _skip, uint32_t _max, uintptr_t* _outStack)
256 {
257 const uint32_t max = _skip+_max+1;
258 void** tmp = (void**)BX_STACK_ALLOC(sizeof(uintptr_t)*max);
259
260 const uint32_t numFull = backtrace(tmp, max);
261 const uint32_t skip = min(_skip + 1 /* skip self */, numFull);
262 const uint32_t num = numFull - skip;
263
264 memCopy(_outStack, tmp + skip, sizeof(uintptr_t)*num);
265
266 return num;
267 }
268
269 struct StackTraceContext
270 {

Callers 2

debugOutputCallstackFunction · 0.85
defaultAssertHandlerFunction · 0.85

Calls 2

memCopyFunction · 0.85
minFunction · 0.50

Tested by

no test coverage detected