2 #include <winpr/debug.h>
4 int TestBacktrace(
int argc,
char* argv[])
9 void* stack = winpr_backtrace(20);
16 (void)fprintf(stderr,
"winpr_backtrace failed!\n");
20 msg = winpr_backtrace_symbols(stack, &used);
24 for (
size_t x = 0; x < used; x++)
25 printf(
"%" PRIuz
": %s\n", x, msg[x]);
30 winpr_backtrace_symbols_fd(stack, fileno(stdout));
31 winpr_backtrace_free(stack);