Add support for MINGW32 debugger

This commit is contained in:
Malcolm Noyes 2012-05-10 21:29:50 +01:00
parent aec1e5ed86
commit 9e17c807bc

View File

@ -95,6 +95,14 @@
{ {
return IsDebuggerPresent() != 0; return IsDebuggerPresent() != 0;
} }
#elif defined(__MINGW32__)
extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();
extern "C" __declspec(dllimport) void __stdcall DebugBreak();
#define BreakIntoDebugger() if (IsDebuggerPresent() ) { DebugBreak(); }
inline bool isDebuggerActive()
{
return IsDebuggerPresent() != 0;
}
#else #else
inline void BreakIntoDebugger(){} inline void BreakIntoDebugger(){}
inline bool isDebuggerActive() { return false; } inline bool isDebuggerActive() { return false; }