From 8a6e300c15df14234e0ada45665d64aa55910b0c Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 20 Nov 2006 23:32:45 +0000 Subject: add MiniDumpFilterMemory flag to MiniDumpWriteDump call, to help reduce amount of provate info in dumps git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@49 4f64403b-2f21-0410-a795-97e2b3489a10 --- attache/DebugTools.cpp | 7 ++++--- attache/options.cpp | 5 +++++ attache/version.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/attache/DebugTools.cpp b/attache/DebugTools.cpp index 752ba03..19c680c 100644 --- a/attache/DebugTools.cpp +++ b/attache/DebugTools.cpp @@ -110,9 +110,9 @@ bool HttpUpload(TCHAR *filename, TCHAR *module_filename, TCHAR *module_filename2 // module signature 2 (filename) if(module_filename2 && module_filename2[0]) settings.AddField(_T("trace_module_signature"), module_filename2); // module version (from pluginInfo) - if(module_version && module_version[0] != 0) settings.AddField(_T("module_version"), module_version); + if(module_version && module_version[0]) settings.AddField(_T("module_version"), module_version); // module version (from pluginInfo) - if(module_version2 && module_version2[0] != 0) settings.AddField(_T("trace_module_version"), module_version2); + if(module_version2 && module_version2[0]) settings.AddField(_T("trace_module_version"), module_version2); // reporter_id if(options.reporter_id[0]) settings.AddField(_T("reporter_id"), options.reporter_id); @@ -391,6 +391,7 @@ LONG CreateMiniDump( EXCEPTION_POINTERS* pep ) { szModuleFileName[0] = 0; szModuleFileName2[0] = 0; szVersion[0] = 0; + szVersion2[0] = 0; PVOID address = pep->ExceptionRecord->ExceptionAddress, address2 = 0; HINSTANCE hInstance; @@ -462,7 +463,7 @@ LONG CreateMiniDump( EXCEPTION_POINTERS* pep ) { mci.CallbackRoutine = (MINIDUMP_CALLBACK_ROUTINE)MyMiniDumpCallback; mci.CallbackParam = 0; - MINIDUMP_TYPE mdt = (MINIDUMP_TYPE)(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory); + MINIDUMP_TYPE mdt = (MINIDUMP_TYPE)(MiniDumpWithIndirectlyReferencedMemory | MiniDumpScanMemory | MiniDumpFilterMemory); if(!MiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), hFile, mdt, (pep != 0) ? &mdei : 0, 0, &mci )) { TCHAR buff[512]; diff --git a/attache/options.cpp b/attache/options.cpp index df97534..ca906e0 100644 --- a/attache/options.cpp +++ b/attache/options.cpp @@ -16,6 +16,11 @@ extern "C" void compressStream ( FILE *stream, FILE *zStream ); Options options; void DoTestUpload() { + if(DBGetContactSettingByte(0, MODULE, "RealCrash", 0)) { + int *i = 0; + *i = 1; + } + // bzip the file char szDumpFileName[MAX_PATH], szBzipFilename[MAX_PATH]; diff --git a/attache/version.h b/attache/version.h index 862d844..c47b036 100644 --- a/attache/version.h +++ b/attache/version.h @@ -6,7 +6,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 3 -#define __BUILD_NUM 2 +#define __BUILD_NUM 4 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3