From 89d47437b4ad592fbd40b1bd7e6c2de041275855 Mon Sep 17 00:00:00 2001 From: janwas Date: Mon, 12 Jul 2004 16:48:10 +0000 Subject: [PATCH] add debug_break and assert2 This was SVN commit r729. --- source/lib/sysdep/sysdep.cpp | 15 +++++++++++++++ source/lib/sysdep/sysdep.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/source/lib/sysdep/sysdep.cpp b/source/lib/sysdep/sysdep.cpp index b0dd07096d..7115931a2d 100755 --- a/source/lib/sysdep/sysdep.cpp +++ b/source/lib/sysdep/sysdep.cpp @@ -41,6 +41,21 @@ void check_heap() #endif // #ifndef _WIN32 + +void debug_break() +{ +#ifndef NDEBUG +# if defined(_WIN32) + win_debug_break(); +# elif defined(_M_IX86) + ia32_debug_break(); +# else +# error "port" +# endif +#endif +} + + #ifdef _MSC_VER double round(double x) diff --git a/source/lib/sysdep/sysdep.h b/source/lib/sysdep/sysdep.h index a212446b65..30bf840286 100755 --- a/source/lib/sysdep/sysdep.h +++ b/source/lib/sysdep/sysdep.h @@ -3,6 +3,7 @@ #ifdef _WIN32 #include "win/win.h" +#include "win/wdbg.h" #endif #include "config.h" @@ -16,6 +17,8 @@ extern void display_msg(const char* caption, const char* msg); extern void wdisplay_msg(const wchar_t* caption, const wchar_t* msg); extern void debug_out(const char* fmt, ...); +extern void debug_break(); + extern void check_heap(); #ifdef _MSC_VER