TrinityCore
WheatyExceptionReport Class Reference

#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 &section, 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< SymbolDetailsymbolDetails
 
static bool alreadyCrashed
 
static std::mutex alreadyCrashedLock
 
static pRtlGetVersion RtlGetVersion
 

Detailed Description

Definition at line 325 of file WheatyExceptionReport.h.

Member Typedef Documentation

◆ pRtlGetVersion

typedef NTSTATUS(NTAPI * WheatyExceptionReport::pRtlGetVersion) (PRTL_OSVERSIONINFOW lpVersionInformation)
private

Definition at line 390 of file WheatyExceptionReport.h.

Constructor & Destructor Documentation

◆ WheatyExceptionReport()

WheatyExceptionReport::WheatyExceptionReport ( )

Definition at line 77 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:

◆ ~WheatyExceptionReport()

WheatyExceptionReport::~WheatyExceptionReport ( )

Definition at line 97 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _GetProcessorName()

BOOL WheatyExceptionReport::_GetProcessorName ( TCHAR *  sProcessorName,
DWORD  maxcount 
)
staticprivate

Definition at line 198 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ _GetWindowsVersion()

BOOL WheatyExceptionReport::_GetWindowsVersion ( TCHAR *  szVersion,
DWORD  cntMax 
)
staticprivate

Definition at line 234 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _GetWindowsVersionFromWMI()

BOOL WheatyExceptionReport::_GetWindowsVersionFromWMI ( TCHAR *  szVersion,
DWORD  cntMax 
)
staticprivate

Definition at line 412 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearSymbols()

void WheatyExceptionReport::ClearSymbols ( )
staticprivate

Definition at line 1853 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ DereferenceUnsafePointer()

DWORD_PTR WheatyExceptionReport::DereferenceUnsafePointer ( DWORD_PTR  address)
staticprivate

Definition at line 1823 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ DumpTypeIndex()

void WheatyExceptionReport::DumpTypeIndex ( DWORD64  modBase,
DWORD  dwTypeIndex,
DWORD_PTR  offset,
bool &  bHandled,
char const *  Name,
char const *  ,
bool  newSymbol,
bool  logChildren 
)
staticprivate

Definition at line 1381 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnumerateSymbolsCallback()

BOOL CALLBACK WheatyExceptionReport::EnumerateSymbolsCallback ( PSYMBOL_INFO  pSymInfo,
ULONG  ,
PVOID  UserContext 
)
staticprivate

Definition at line 1095 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FormatOutputValue()

void WheatyExceptionReport::FormatOutputValue ( char *  pszCurrBuffer,
BasicType  basicType,
DWORD64  length,
PVOID  pAddress,
size_t  bufferSize,
size_t  countOverride = 0 
)
staticprivate

Definition at line 1720 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ FormatSymbolValue()

bool WheatyExceptionReport::FormatSymbolValue ( PSYMBOL_INFO  pSym,
EnumerateSymbolsCallbackContext pCtx 
)
staticprivate

Definition at line 1304 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateExceptionReport()

void WheatyExceptionReport::GenerateExceptionReport ( PEXCEPTION_POINTERS  pExceptionInfo)
staticprivate

Definition at line 643 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBasicType()

BasicType WheatyExceptionReport::GetBasicType ( DWORD  typeIndex,
DWORD64  modBase 
)
staticprivate

Definition at line 1799 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ GetExceptionString()

LPCTSTR WheatyExceptionReport::GetExceptionString ( DWORD  dwCode)
staticprivate

Definition at line 858 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ GetIntegerRegisterValue()

Optional< DWORD_PTR > WheatyExceptionReport::GetIntegerRegisterValue ( PCONTEXT  context,
ULONG  registerId 
)
staticprivate

Definition at line 1114 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ GetLogicalAddress()

BOOL WheatyExceptionReport::GetLogicalAddress ( PVOID  addr,
PTSTR  szModule,
DWORD  len,
DWORD &  section,
DWORD_PTR &  offset 
)
staticprivate

Definition at line 908 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Log()

int __cdecl WheatyExceptionReport::Log ( const TCHAR *  format,
  ... 
)
staticprivate

Definition at line 1839 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ PopSymbolDetail()

void WheatyExceptionReport::PopSymbolDetail ( )
staticprivate

Definition at line 1867 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintSymbolDetail()

void WheatyExceptionReport::PrintSymbolDetail ( )
staticprivate

Definition at line 1873 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintSystemInfo()

void WheatyExceptionReport::PrintSystemInfo ( )
staticprivate

Definition at line 568 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printTracesForAllThreads()

void WheatyExceptionReport::printTracesForAllThreads ( bool  bWriteVariables)
static

Definition at line 592 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PushSymbolDetail()

void WheatyExceptionReport::PushSymbolDetail ( )
staticprivate

Definition at line 1860 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreSymbol()

bool WheatyExceptionReport::StoreSymbol ( DWORD  type,
DWORD_PTR  offset 
)
staticprivate

Definition at line 1848 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ WheatyCrtHandler()

void __cdecl WheatyExceptionReport::WheatyCrtHandler ( wchar_t const *  expression,
wchar_t const *  function,
wchar_t const *  file,
unsigned int  line,
uintptr_t  pReserved 
)
static

Definition at line 193 of file WheatyExceptionReport.cpp.

+ Here is the caller graph for this function:

◆ WheatyUnhandledExceptionFilter()

LONG WINAPI WheatyExceptionReport::WheatyUnhandledExceptionFilter ( PEXCEPTION_POINTERS  pExceptionInfo)
static

Definition at line 109 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WriteStackDetails()

void WheatyExceptionReport::WriteStackDetails ( PCONTEXT  pContext,
bool  bWriteVariables,
HANDLE  pThreadHandle 
)
staticprivate

Definition at line 973 of file WheatyExceptionReport.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ alreadyCrashed

bool WheatyExceptionReport::alreadyCrashed
staticprivate

Definition at line 388 of file WheatyExceptionReport.h.

◆ alreadyCrashedLock

std::mutex WheatyExceptionReport::alreadyCrashedLock
staticprivate

Definition at line 389 of file WheatyExceptionReport.h.

◆ m_hDumpFile

HANDLE WheatyExceptionReport::m_hDumpFile
staticprivate

Definition at line 384 of file WheatyExceptionReport.h.

◆ m_hProcess

HANDLE WheatyExceptionReport::m_hProcess
staticprivate

Definition at line 385 of file WheatyExceptionReport.h.

◆ m_hReportFile

FILE * WheatyExceptionReport::m_hReportFile
staticprivate

Definition at line 383 of file WheatyExceptionReport.h.

◆ m_previousCrtHandler

_invalid_parameter_handler WheatyExceptionReport::m_previousCrtHandler
staticprivate

Definition at line 382 of file WheatyExceptionReport.h.

◆ m_previousFilter

LPTOP_LEVEL_EXCEPTION_FILTER WheatyExceptionReport::m_previousFilter
staticprivate

Definition at line 381 of file WheatyExceptionReport.h.

◆ m_szDumpFileName

TCHAR WheatyExceptionReport::m_szDumpFileName
staticprivate

Definition at line 380 of file WheatyExceptionReport.h.

◆ m_szLogFileName

TCHAR WheatyExceptionReport::m_szLogFileName
staticprivate

Definition at line 379 of file WheatyExceptionReport.h.

◆ RtlGetVersion

WheatyExceptionReport::pRtlGetVersion WheatyExceptionReport::RtlGetVersion
staticprivate

Definition at line 391 of file WheatyExceptionReport.h.

◆ symbolDetails

std::stack< SymbolDetail > WheatyExceptionReport::symbolDetails
staticprivate

Definition at line 387 of file WheatyExceptionReport.h.

◆ symbols

SymbolPairs WheatyExceptionReport::symbols
staticprivate

Definition at line 386 of file WheatyExceptionReport.h.


The documentation for this class was generated from the following files: