size_t GetFileLineFromStack(size_t skip, char* fileName, size_t size, size_t* lineNumber, size_t* offsetBytes) { void* address = NULL; GetStackFrames(skip + 1, &address, 1); if (address) { return GetFileLineFromAddress(address, fileName, size, lineNumber, offsetBytes); } return 0; }
size_t GetModuleNameFromStack(size_t skip, char* moduleName, size_t size) { void* address = NULL; GetStackFrames(skip + 1, &address, 1); if (address) { return GetModuleNameFromAddress(address, moduleName, size); } return 0; }
size_t GetSymbolNameFromStack(size_t skip, char* symbolName, size_t size, size_t* offsetBytes) { void* address = NULL; GetStackFrames(skip + 1, &address, 1); if (address) { return GetSymbolNameFromAddress(address, symbolName, size, offsetBytes); } return 0; }
int backtrace(void* addresses[], int count) { return GetStackFrames(1, addresses, count); }