summaryrefslogtreecommitdiff
path: root/shared/debug_new.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
commitc32707148292d104c66276b43796d6057c8c7a5d (patch)
treebb83513f4aff24153e21a4ec92e34e4c27651b1f /shared/debug_new.cpp
parent3.9 (diff)
downloadFreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.gz
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.bz2
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.zip
3.10
Diffstat (limited to 'shared/debug_new.cpp')
-rw-r--r--shared/debug_new.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/shared/debug_new.cpp b/shared/debug_new.cpp
index f5cd8368..0c0c8b52 100644
--- a/shared/debug_new.cpp
+++ b/shared/debug_new.cpp
@@ -5,15 +5,14 @@
// **************************************************************************
//
#include "debug_new.h"
-#include <wx/msw/wrapwin.h> //includes "windows.h"
-#include "DbgHelp.h"
-#pragma message("Warning! Include this header for error analysis builds only!")
-#ifndef _MSC_VER
-use in Visual C++ only!
+#ifdef _MSC_VER
+#include <wx/msw/wrapwin.h> //includes "windows.h"
+#include "DbgHelp.h" //available for MSC only
#endif
+#ifdef _MSC_VER
namespace
{
LONG WINAPI writeDumpOnException(EXCEPTION_POINTERS* pExceptionInfo)
@@ -28,8 +27,8 @@ LONG WINAPI writeDumpOnException(EXCEPTION_POINTERS* pExceptionInfo)
MINIDUMP_EXCEPTION_INFORMATION* exceptParam = pExceptionInfo ? &exInfo : NULL;
::MiniDumpWriteDump(
- GetCurrentProcess(), //__in HANDLE hProcess,
- GetCurrentProcessId(), //__in DWORD ProcessId,
+ ::GetCurrentProcess(), //__in HANDLE hProcess,
+ ::GetCurrentProcessId(), //__in DWORD ProcessId,
hFile, //__in HANDLE hFile,
MiniDumpWithDataSegs, //__in MINIDUMP_TYPE DumpType, ->Standard: MiniDumpNormal, Medium: MiniDumpWithDataSegs, Full: MiniDumpWithFullMemory
exceptParam, //__in PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
@@ -49,11 +48,13 @@ struct WriteDumpOnUnhandledException
{
::SetUnhandledExceptionFilter(writeDumpOnException);
}
-} dummy; //ensure that a Dump is written for uncaught exceptions
+} dummy; //ensure that a dump-file is written for uncaught exceptions
}
-void MemoryDump::writeMinidump()
+void mem_check::writeMinidump()
{
writeDumpOnException(NULL);
}
+
+#endif //_MSC_VER
bgstack15