Thread.cpp: Added stack trace and register logging to exception filter (#18564)

This commit is contained in:
luci4
2026-04-13 13:47:44 +01:00
committed by GitHub
parent 72fa4098dc
commit bcd9663349
4 changed files with 73 additions and 13 deletions
+10
View File
@@ -2,6 +2,11 @@
#include <util/types.hpp>
#include <util/logs.hpp>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
namespace utils
{
namespace stack_trace
@@ -30,7 +35,12 @@ namespace utils
};
}
#ifdef _WIN32
std::vector<void*> get_backtrace(int max_depth = 255, PCONTEXT ctx = nullptr);
#else
std::vector<void*> get_backtrace(int max_depth = 255);
#endif
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack);
FORCE_INLINE void print_trace(stack_trace::Logger auto& logger, int max_depth = 255)