Thread.cpp: Added stack trace and register logging to exception filter (#18564)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user