Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMalcolm Noyes2012-05-10 21:29:50 +0100
committerMalcolm Noyes2012-05-10 21:29:50 +0100
commit9e17c807bca49bef99dd23598b4a6cc413784a00 (patch)
tree9a24ae902a340ed1e30f2faca03561261ee595bb /include
parentaec1e5ed86bbc778949da4c83c36537aadef38df (diff)
downloadcatch3-9e17c807bca49bef99dd23598b4a6cc413784a00.tar.gz
Add support for MINGW32 debugger
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_debugger.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/internal/catch_debugger.hpp b/include/internal/catch_debugger.hpp
index 64383b46..25eeafe6 100644
--- a/include/internal/catch_debugger.hpp
+++ b/include/internal/catch_debugger.hpp
@@ -95,6 +95,14 @@
{
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
inline void BreakIntoDebugger(){}
inline bool isDebuggerActive() { return false; }