MCPcopy Create free account
hub / github.com/FastLED/FastLED / print_stacktrace_windows

Method print_stacktrace_windows

tests/crash_handler_win.h:340–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 void print_stacktrace_windows() {
341 init_symbols();
342
343 void* stack[100];
344 WORD numberOfFrames = CaptureStackBackTrace(0, 100, stack, nullptr);
345
346 printf("Stack trace (Windows):\n");
347 printf("Captured %d frames:\n\n", numberOfFrames);
348
349 for (WORD i = 0; i < numberOfFrames; i++) {
350 DWORD64 address = (DWORD64)(stack[i]);
351 printf("#%-2d 0x%016llx", i, address);
352 print_symbol_for_address(address);
353 printf("\n");
354 }
355
356 printf("\nDebug Information:\n");
357 printf("- Symbol handler initialized: %s\n", symbols_initialized ? "Yes" : "No");
358 printf("- Process ID: %lu\n", GetCurrentProcessId());
359 printf("- Thread ID: %lu\n", GetCurrentThreadId());
360
361 print_loaded_modules();
362 }
363
364 void print_stacktrace_from_context(CONTEXT* ctx) {
365 HANDLE process = GetCurrentProcess();

Callers 2

print_stacktraceFunction · 0.80

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected