![]() |
TrinityCore
|
#include <WheatyExceptionReport.h>
Classes | |
| struct | EnumerateSymbolsCallbackContext |
Public Member Functions | |
| WheatyExceptionReport () | |
| ~WheatyExceptionReport () | |
Static Public Member Functions | |
| static LONG WINAPI | WheatyUnhandledExceptionFilter (PEXCEPTION_POINTERS pExceptionInfo) |
| static void __cdecl | WheatyCrtHandler (wchar_t const *expression, wchar_t const *function, wchar_t const *file, unsigned int line, uintptr_t pReserved) |
| static void | printTracesForAllThreads (bool) |
Private Types | |
| typedef NTSTATUS(NTAPI * | pRtlGetVersion) (PRTL_OSVERSIONINFOW lpVersionInformation) |
Static Private Member Functions | |
| static void | GenerateExceptionReport (PEXCEPTION_POINTERS pExceptionInfo) |
| static void | PrintSystemInfo () |
| static BOOL | _GetWindowsVersion (TCHAR *szVersion, DWORD cntMax) |
| static BOOL | _GetWindowsVersionFromWMI (TCHAR *szVersion, DWORD cntMax) |
| static BOOL | _GetProcessorName (TCHAR *sProcessorName, DWORD maxcount) |
| static LPCTSTR | GetExceptionString (DWORD dwCode) |
| static BOOL | GetLogicalAddress (PVOID addr, PTSTR szModule, DWORD len, DWORD §ion, DWORD_PTR &offset) |
| static void | WriteStackDetails (PCONTEXT pContext, bool bWriteVariables, HANDLE pThreadHandle) |
| static BOOL CALLBACK | EnumerateSymbolsCallback (PSYMBOL_INFO, ULONG, PVOID) |
| static bool | FormatSymbolValue (PSYMBOL_INFO, EnumerateSymbolsCallbackContext *) |
| static void | DumpTypeIndex (DWORD64, DWORD, DWORD_PTR, bool &, char const *, char const *, bool, bool) |
| static void | FormatOutputValue (char *pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress, size_t bufferSize, size_t countOverride=0) |
| static BasicType | GetBasicType (DWORD typeIndex, DWORD64 modBase) |
| static DWORD_PTR | DereferenceUnsafePointer (DWORD_PTR address) |
| static int __cdecl | Log (const TCHAR *format,...) |
| static bool | StoreSymbol (DWORD type, DWORD_PTR offset) |
| static void | ClearSymbols () |
| static Optional< DWORD_PTR > | GetIntegerRegisterValue (PCONTEXT context, ULONG registerId) |
| static void | PushSymbolDetail () |
| static void | PopSymbolDetail () |
| static void | PrintSymbolDetail () |
Static Private Attributes | |
| static TCHAR | m_szLogFileName [MAX_PATH] |
| static TCHAR | m_szDumpFileName [MAX_PATH] |
| static LPTOP_LEVEL_EXCEPTION_FILTER | m_previousFilter |
| static _invalid_parameter_handler | m_previousCrtHandler |
| static FILE * | m_hReportFile |
| static HANDLE | m_hDumpFile |
| static HANDLE | m_hProcess |
| static SymbolPairs | symbols |
| static std::stack< SymbolDetail > | symbolDetails |
| static bool | alreadyCrashed |
| static std::mutex | alreadyCrashedLock |
| static pRtlGetVersion | RtlGetVersion |
Definition at line 326 of file WheatyExceptionReport.h.
|
private |
Definition at line 391 of file WheatyExceptionReport.h.
| WheatyExceptionReport::WheatyExceptionReport | ( | ) |
Definition at line 71 of file WheatyExceptionReport.cpp.
References alreadyCrashed, m_hProcess, m_previousCrtHandler, m_previousFilter, RtlGetVersion, WheatyCrtHandler(), and WheatyUnhandledExceptionFilter().
| WheatyExceptionReport::~WheatyExceptionReport | ( | ) |
Definition at line 91 of file WheatyExceptionReport.cpp.
References ClearSymbols(), m_previousCrtHandler, and m_previousFilter.
|
staticprivate |
Definition at line 198 of file WheatyExceptionReport.cpp.
Referenced by PrintSystemInfo().
|
staticprivate |
Definition at line 234 of file WheatyExceptionReport.cpp.
References _GetWindowsVersionFromWMI(), RtlGetVersion, and ToTchar().
Referenced by PrintSystemInfo().
|
staticprivate |
Definition at line 412 of file WheatyExceptionReport.cpp.
References ToTchar().
Referenced by _GetWindowsVersion().
|
staticprivate |
Definition at line 1853 of file WheatyExceptionReport.cpp.
References symbolDetails, and symbols.
Referenced by EnumerateSymbolsCallback(), and ~WheatyExceptionReport().
|
staticprivate |
Definition at line 1823 of file WheatyExceptionReport.cpp.
Referenced by DumpTypeIndex().
|
staticprivate |
Definition at line 1381 of file WheatyExceptionReport.cpp.
References btChar, btNoType, btStdString, btVoid, DataIsGlobal, DataIsStaticLocal, DataIsStaticMember, DereferenceUnsafePointer(), DumpTypeIndex(), FormatOutputValue(), GetBasicType(), m_hProcess, PopSymbolDetail(), PushSymbolDetail(), rgBaseType, StoreSymbol(), symbolDetails, WER_MAX_ARRAY_ELEMENTS_COUNT, WER_MAX_NESTING_LEVEL, and WER_SMALL_BUFFER_SIZE.
Referenced by DumpTypeIndex(), and FormatSymbolValue().
|
staticprivate |
Definition at line 1095 of file WheatyExceptionReport.cpp.
References ClearSymbols(), and FormatSymbolValue().
Referenced by WriteStackDetails().
|
staticprivate |
Definition at line 1720 of file WheatyExceptionReport.cpp.
References btChar, btFloat, btStdString, and bufferSize.
Referenced by DumpTypeIndex(), and FormatSymbolValue().
|
staticprivate |
Definition at line 1304 of file WheatyExceptionReport.cpp.
References WheatyExceptionReport::EnumerateSymbolsCallbackContext::context, CV_ALLREG_VFRAME, DumpTypeIndex(), FormatOutputValue(), GetBasicType(), GetIntegerRegisterValue(), PopSymbolDetail(), PushSymbolDetail(), rgBaseType, WheatyExceptionReport::EnumerateSymbolsCallbackContext::sf, and symbolDetails.
Referenced by EnumerateSymbolsCallback(), and GenerateExceptionReport().
|
staticprivate |
Definition at line 643 of file WheatyExceptionReport.cpp.
References ErrorMessage(), EXCEPTION_ASSERTION_FAILURE, FormatSymbolValue(), GetExceptionString(), GitRevision::GetFullVersion(), GetLogicalAddress(), m_hProcess, PrintSystemInfo(), printTracesForAllThreads(), and WriteStackDetails().
Referenced by WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 1799 of file WheatyExceptionReport.cpp.
References btNoType, and m_hProcess.
Referenced by DumpTypeIndex(), and FormatSymbolValue().
|
staticprivate |
Definition at line 858 of file WheatyExceptionReport.cpp.
References EXCEPTION.
Referenced by GenerateExceptionReport().
|
staticprivate |
Definition at line 1114 of file WheatyExceptionReport.cpp.
References CPU_REG, CV_AMD64_AH, CV_AMD64_AL, CV_AMD64_AX, CV_AMD64_BH, CV_AMD64_BL, CV_AMD64_BP, CV_AMD64_BPL, CV_AMD64_BX, CV_AMD64_CH, CV_AMD64_CL, CV_AMD64_CX, CV_AMD64_DH, CV_AMD64_DI, CV_AMD64_DIL, CV_AMD64_DL, CV_AMD64_DX, CV_AMD64_EAX, CV_AMD64_EBP, CV_AMD64_EBX, CV_AMD64_ECX, CV_AMD64_EDI, CV_AMD64_EDX, CV_AMD64_ESI, CV_AMD64_ESP, CV_AMD64_R10, CV_AMD64_R10B, CV_AMD64_R10D, CV_AMD64_R10W, CV_AMD64_R11, CV_AMD64_R11B, CV_AMD64_R11D, CV_AMD64_R11W, CV_AMD64_R12, CV_AMD64_R12B, CV_AMD64_R12D, CV_AMD64_R12W, CV_AMD64_R13, CV_AMD64_R13B, CV_AMD64_R13D, CV_AMD64_R13W, CV_AMD64_R14, CV_AMD64_R14B, CV_AMD64_R14D, CV_AMD64_R14W, CV_AMD64_R15, CV_AMD64_R15B, CV_AMD64_R15D, CV_AMD64_R15W, CV_AMD64_R8, CV_AMD64_R8B, CV_AMD64_R8D, CV_AMD64_R8W, CV_AMD64_R9, CV_AMD64_R9B, CV_AMD64_R9D, CV_AMD64_R9W, CV_AMD64_RAX, CV_AMD64_RBP, CV_AMD64_RBX, CV_AMD64_RCX, CV_AMD64_RDI, CV_AMD64_RDX, CV_AMD64_RIP, CV_AMD64_RSI, CV_AMD64_RSP, CV_AMD64_SI, CV_AMD64_SIL, CV_AMD64_SP, CV_AMD64_SPL, CV_ARM64_FP, CV_ARM64_IP0, CV_ARM64_IP1, CV_ARM64_LR, CV_ARM64_SP, CV_ARM64_W0, CV_ARM64_W1, CV_ARM64_W10, CV_ARM64_W11, CV_ARM64_W12, CV_ARM64_W13, CV_ARM64_W14, CV_ARM64_W15, CV_ARM64_W16, CV_ARM64_W17, CV_ARM64_W18, CV_ARM64_W19, CV_ARM64_W2, CV_ARM64_W20, CV_ARM64_W21, CV_ARM64_W22, CV_ARM64_W23, CV_ARM64_W24, CV_ARM64_W25, CV_ARM64_W26, CV_ARM64_W27, CV_ARM64_W28, CV_ARM64_W29, CV_ARM64_W3, CV_ARM64_W30, CV_ARM64_W4, CV_ARM64_W5, CV_ARM64_W6, CV_ARM64_W7, CV_ARM64_W8, CV_ARM64_W9, CV_ARM64_WZR, CV_ARM64_X0, CV_ARM64_X1, CV_ARM64_X10, CV_ARM64_X11, CV_ARM64_X12, CV_ARM64_X13, CV_ARM64_X14, CV_ARM64_X15, CV_ARM64_X18, CV_ARM64_X19, CV_ARM64_X2, CV_ARM64_X20, CV_ARM64_X21, CV_ARM64_X22, CV_ARM64_X23, CV_ARM64_X24, CV_ARM64_X25, CV_ARM64_X26, CV_ARM64_X27, CV_ARM64_X28, CV_ARM64_X3, CV_ARM64_X4, CV_ARM64_X5, CV_ARM64_X6, CV_ARM64_X7, CV_ARM64_X8, CV_ARM64_X9, CV_ARM64_ZR, CV_REG_AH, CV_REG_AL, CV_REG_AX, CV_REG_BH, CV_REG_BL, CV_REG_BP, CV_REG_BX, CV_REG_CH, CV_REG_CL, CV_REG_CX, CV_REG_DH, CV_REG_DI, CV_REG_DL, CV_REG_DX, CV_REG_EAX, CV_REG_EBP, CV_REG_EBX, CV_REG_ECX, CV_REG_EDI, CV_REG_EDX, CV_REG_EIP, CV_REG_ESI, CV_REG_ESP, CV_REG_SI, CV_REG_SP, REG_E, REG_H, REG_L, REG_R, and REG_X.
Referenced by FormatSymbolValue().
|
staticprivate |
Definition at line 908 of file WheatyExceptionReport.cpp.
Referenced by GenerateExceptionReport(), and WriteStackDetails().
|
staticprivate |
Definition at line 1839 of file WheatyExceptionReport.cpp.
References m_hReportFile.
|
staticprivate |
Definition at line 1867 of file WheatyExceptionReport.cpp.
References PrintSymbolDetail(), and symbolDetails.
Referenced by DumpTypeIndex(), and FormatSymbolValue().
|
staticprivate |
Definition at line 1873 of file WheatyExceptionReport.cpp.
References symbolDetails.
Referenced by PopSymbolDetail(), and PushSymbolDetail().
|
staticprivate |
Definition at line 568 of file WheatyExceptionReport.cpp.
References _GetProcessorName(), and _GetWindowsVersion().
Referenced by GenerateExceptionReport().
|
static |
Definition at line 592 of file WheatyExceptionReport.cpp.
References m_hProcess, and WriteStackDetails().
Referenced by GenerateExceptionReport().
|
staticprivate |
Definition at line 1860 of file WheatyExceptionReport.cpp.
References PrintSymbolDetail(), and symbolDetails.
Referenced by DumpTypeIndex(), and FormatSymbolValue().
|
staticprivate |
Definition at line 1848 of file WheatyExceptionReport.cpp.
References symbols.
Referenced by DumpTypeIndex().
|
static |
Definition at line 193 of file WheatyExceptionReport.cpp.
Referenced by WheatyExceptionReport().
|
static |
Definition at line 103 of file WheatyExceptionReport.cpp.
References alreadyCrashed, alreadyCrashedLock, CrashFolder, EXCEPTION_ASSERTION_FAILURE, GenerateExceptionReport(), GitRevision::GetHash(), m_hDumpFile, m_hReportFile, m_previousFilter, m_szDumpFileName, m_szLogFileName, and PRSTRc.
Referenced by WheatyExceptionReport().
|
staticprivate |
Definition at line 973 of file WheatyExceptionReport.cpp.
References WheatyExceptionReport::EnumerateSymbolsCallbackContext::context, EnumerateSymbolsCallback(), GetLogicalAddress(), m_hProcess, and WheatyExceptionReport::EnumerateSymbolsCallbackContext::sf.
Referenced by GenerateExceptionReport(), and printTracesForAllThreads().
|
staticprivate |
Definition at line 389 of file WheatyExceptionReport.h.
Referenced by WheatyExceptionReport(), and WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 390 of file WheatyExceptionReport.h.
Referenced by WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 385 of file WheatyExceptionReport.h.
Referenced by WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 386 of file WheatyExceptionReport.h.
Referenced by DumpTypeIndex(), GenerateExceptionReport(), GetBasicType(), printTracesForAllThreads(), WheatyExceptionReport(), and WriteStackDetails().
|
staticprivate |
Definition at line 384 of file WheatyExceptionReport.h.
Referenced by Log(), and WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 383 of file WheatyExceptionReport.h.
Referenced by WheatyExceptionReport(), and ~WheatyExceptionReport().
|
staticprivate |
Definition at line 382 of file WheatyExceptionReport.h.
Referenced by WheatyExceptionReport(), WheatyUnhandledExceptionFilter(), and ~WheatyExceptionReport().
|
staticprivate |
Definition at line 381 of file WheatyExceptionReport.h.
Referenced by WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 380 of file WheatyExceptionReport.h.
Referenced by WheatyUnhandledExceptionFilter().
|
staticprivate |
Definition at line 392 of file WheatyExceptionReport.h.
Referenced by _GetWindowsVersion(), and WheatyExceptionReport().
|
staticprivate |
Definition at line 388 of file WheatyExceptionReport.h.
Referenced by ClearSymbols(), DumpTypeIndex(), FormatSymbolValue(), PopSymbolDetail(), PrintSymbolDetail(), and PushSymbolDetail().
|
staticprivate |
Definition at line 387 of file WheatyExceptionReport.h.
Referenced by ClearSymbols(), and StoreSymbol().