1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-07 08:45:59 +02:00

Added ability to catch llvm errs(), shared crashcatcher object

This commit is contained in:
Brian Fiete 2020-05-28 07:25:25 -07:00
parent 76e29d385b
commit f1eafa8d81
4 changed files with 274 additions and 113 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include "../../BeefySysLib/Common.h"
#include "../util/CritSect.h"
NS_BF_BEGIN
@ -8,6 +9,17 @@ typedef void(*CrashInfoFunc)();
class CrashCatcher
{
public:
Array<CrashInfoFunc> mCrashInfoFuncs;
StringT<0> mCrashInfo;
bool mCrashed;
bool mInitialized;
CritSect mBfpCritSect;
EXCEPTION_POINTERS* mExceptionPointers;
LPTOP_LEVEL_EXCEPTION_FILTER mPreviousFilter;
bool mDebugError;
BfpCrashReportKind mCrashReportKind;
public:
CrashCatcher();
@ -17,7 +29,9 @@ public:
void Test();
void Crash(const StringImpl& str);
void SetCrashReportKind(BfpCrashReportKind crashReportKind);
void SetCrashReportKind(BfpCrashReportKind crashReportKind);
static CrashCatcher* Get();
};
NS_BF_END