aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/logging/crashhandler.h
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2023-12-28 14:51:45 +0000
committerGitHub <noreply@github.com>2023-12-28 14:51:45 +0000
commit3b63cf5c83b9f68952195e62e202dd557f7ca6af (patch)
treebd977e3f566a635ab4c734f2c12621614d44ce83 /NorthstarDLL/logging/crashhandler.h
parent0b507aa3eb55c2d06f314a46998cf9415f6a064a (diff)
parentf5ab6fb5e8be7b73e6003d4145081d5e0c0ce287 (diff)
downloadNorthstarLauncher-3b63cf5c83b9f68952195e62e202dd557f7ca6af.tar.gz
NorthstarLauncher-3b63cf5c83b9f68952195e62e202dd557f7ca6af.zip
Merge branch 'main' into cmake-format
Diffstat (limited to 'NorthstarDLL/logging/crashhandler.h')
-rw-r--r--NorthstarDLL/logging/crashhandler.h97
1 files changed, 0 insertions, 97 deletions
diff --git a/NorthstarDLL/logging/crashhandler.h b/NorthstarDLL/logging/crashhandler.h
deleted file mode 100644
index e18de948..00000000
--- a/NorthstarDLL/logging/crashhandler.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#pragma once
-
-#include <mutex>
-
-//-----------------------------------------------------------------------------
-// Purpose: Exception handling
-//-----------------------------------------------------------------------------
-class CCrashHandler
-{
- public:
- CCrashHandler();
- ~CCrashHandler();
-
- void Init();
- void Shutdown();
-
- void Lock()
- {
- m_Mutex.lock();
- }
-
- void Unlock()
- {
- m_Mutex.unlock();
- }
-
- void SetState(bool bState)
- {
- m_bState = bState;
- }
-
- bool GetState() const
- {
- return m_bState;
- }
-
- void SetAllFatal(bool bState)
- {
- m_bAllExceptionsFatal = bState;
- }
-
- bool GetAllFatal() const
- {
- return m_bAllExceptionsFatal;
- }
-
- //-----------------------------------------------------------------------------
- // Exception helpers
- //-----------------------------------------------------------------------------
- void SetExceptionInfos(EXCEPTION_POINTERS* pExceptionPointers);
-
- void SetCrashedModule();
-
- const CHAR* GetExceptionString() const;
- const CHAR* GetExceptionString(DWORD dwExceptionCode) const;
-
- bool IsExceptionFatal() const;
- bool IsExceptionFatal(DWORD dwExceptionCode) const;
-
- //-----------------------------------------------------------------------------
- // Formatting
- //-----------------------------------------------------------------------------
- void ShowPopUpMessage();
-
- void FormatException();
- void FormatCallstack();
- void FormatFlags(const CHAR* pszRegister, DWORD nValue);
- void FormatIntReg(const CHAR* pszRegister, DWORD64 nValue);
- void FormatFloatReg(const CHAR* pszRegister, M128A nValue);
- void FormatRegisters();
- void FormatLoadedMods();
- void FormatLoadedPlugins();
- void FormatModules();
-
- //-----------------------------------------------------------------------------
- // Minidump
- //-----------------------------------------------------------------------------
- void WriteMinidump();
-
- private:
- PVOID m_hExceptionFilter;
- EXCEPTION_POINTERS* m_pExceptionInfos;
-
- bool m_bHasSetConsolehandler;
- bool m_bAllExceptionsFatal;
- bool m_bHasShownCrashMsg;
- bool m_bState;
-
- std::string m_svCrashedModule;
- std::string m_svCrashedOffset;
-
- std::string m_svError;
-
- std::mutex m_Mutex;
-};
-
-extern CCrashHandler* g_pCrashHandler;