25 #ifdef BUGSPLAT_EXPORTS 26 #define MDS_EXPORT __declspec(dllexport) 28 #define MDS_EXPORT __declspec(dllimport) 40 typedef bool (__cdecl *MiniDmpSenderCallback)(UINT nCode, LPVOID lVal1, LPVOID lVal2);
55 __wchar_t
const *szApp,
56 __wchar_t
const *szVersion,
57 __wchar_t
const *szAppIdentifier = NULL,
64 bool enableExceptionFilter(
bool enable =
true);
67 bool isExceptionFilterEnabled()
const;
70 typedef enum _BS_MINIDUMP_TYPE {
71 MiniDumpNormal = 0x00000000,
72 MiniDumpWithDataSegs = 0x00000001,
73 MiniDumpWithFullMemory = 0x00000002,
74 MiniDumpWithHandleData = 0x00000004,
75 MiniDumpFilterMemory = 0x00000008,
76 MiniDumpScanMemory = 0x00000010,
77 MiniDumpWithUnloadedModules = 0x00000020,
78 MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
79 MiniDumpFilterModulePaths = 0x00000080,
80 MiniDumpWithProcessThreadData = 0x00000100,
81 MiniDumpWithPrivateReadWriteMemory = 0x00000200,
82 MiniDumpWithoutOptionalData = 0x00000400,
83 MiniDumpWithFullMemoryInfo = 0x00000800,
84 MiniDumpWithThreadInfo = 0x00001000,
85 MiniDumpWithCodeSegs = 0x00002000,
86 MiniDumpWithoutAuxiliaryState = 0x00004000,
87 MiniDumpWithFullAuxiliaryState = 0x00008000,
88 MiniDumpWithPrivateWriteCopyMemory = 0x00010000,
89 MiniDumpIgnoreInaccessibleMemory = 0x00020000,
90 MiniDumpWithTokenInformation = 0x00040000,
91 MiniDumpWithModuleHeaders = 0x00080000,
92 MiniDumpFilterTriage = 0x00100000,
93 MiniDumpWithAvxXStateContext = 0x00200000,
94 MiniDumpValidTypeFlags = 0x003fffff,
98 MiniDmpSender::BS_MINIDUMP_TYPE getMiniDumpType()
const;
102 void setMiniDumpType(MiniDmpSender::BS_MINIDUMP_TYPE eType);
106 bool disableNetworkAccess(
bool enable =
true);
108 bool isNetworkAccessDisabled()
const;
111 bool setFlags( DWORD dwFlags );
113 DWORD getFlags()
const;
116 void resetVersionString(
const __wchar_t * wszVersion);
119 void resetAppIdentifier(
const __wchar_t * wszDescription);
122 void setNotes(
const __wchar_t* wszNotes);
125 void sendAdditionalFile(
const __wchar_t * wszPath);
128 bool removeAdditionalFile(
const __wchar_t * wszPath);
131 void setLogFilePath(
const __wchar_t * wszPath);
134 void setUserZipPath(
const __wchar_t * wszPath);
137 void setResourceDllPath(
const __wchar_t * wszPath);
140 void setDefaultUserName(
const __wchar_t * wszName);
143 void setDefaultUserEmail(
const __wchar_t * wszEmail);
146 void setDefaultUserDescription(
const __wchar_t * wszDescription);
150 void createReport(EXCEPTION_POINTERS * pExcepInfo);
153 void createAsanReport(
const char* asanMessage);
158 void createReport(
const __wchar_t * wszXmlReport);
164 LONG unhandledExceptionHandler( PEXCEPTION_POINTERS pExceptionInfo );
167 void setCallback(MiniDmpSenderCallback fnCallback);
170 void getMinidumpPath(__wchar_t * buffer,
size_t len);
173 int setGuardByteBufferSize(
int nbytes);
179 MiniDumper * m_pMiniDumper;
188 #define MDSF_NONINTERACTIVE 0x0001 192 #define MDSF_FORCEEXIT 0x0002 198 #define MDSF_PREVENTHIJACKING 0x0004 205 #define MDSF_DETECTHANGS 0x0008 210 #define MDSF_USEGUARDMEMORY 0x0010 216 #define MDSF_CUSTOMEXCEPTIONFILTER 0x0020 223 #define MDSF_SUSPENDALLTHREADS 0x0800 228 #define MDSF_LOGCONSOLE 0x1000 229 #define MDSF_LOGFILE 0x2000 230 #define MDSF_LOG_VERBOSE 0x4000 237 #define MDSCB_EXCEPTIONCODE 0x0050 242 inline void terminator() {
int*z = 0; *z = 13; }
243 inline void signal_handler(
int) { terminator(); }
244 inline void __cdecl invalid_parameter_handler(
const wchar_t *,
const wchar_t *,
const wchar_t *,
unsigned int, uintptr_t)
248 inline int memory_depleted(
size_t)
255 inline void SetGlobalCRTExceptionBehavior()
261 set_terminate(&terminator);
266 _set_purecall_handler(&terminator);
270 _set_invalid_parameter_handler(&invalid_parameter_handler);
276 _set_new_handler(&memory_depleted);
282 inline void SetPerThreadCRTExceptionBehavior()
285 signal(SIGABRT, signal_handler);
286 _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
293 set_unexpected(&terminator);
void createReportAndExit()
Use to send a report and exit.
Definition: BugSplat.h:161
The MiniDmpSender class is used to add BugSplat crash reporting to your app.
Definition: BugSplat.h:46