From bdb7bfd79b766e9e3955c47715b7eb8eba96a73b Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 17 Aug 2017 21:32:42 -0400 Subject: [PATCH] SDL_assert.h: add inline asm (int $3) as SDL_TriggerBreakpoint for Watcom/x86 (also disable SIGTRAP case to !watcom, because watcom doesn't have SIGTRAP.) Partially fixes Bugzilla #3758. --- include/SDL_assert.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/SDL_assert.h b/include/SDL_assert.h index e80de78deb4c8..ab6868f084295 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -53,7 +53,9 @@ assert can have unique static variables associated with it. #define SDL_TriggerBreakpoint() __debugbreak() #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) ) #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" ) -#elif defined(HAVE_SIGNAL_H) +#elif defined(__386__) && defined(__WATCOMC__) + #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } +#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__) #include #define SDL_TriggerBreakpoint() raise(SIGTRAP) #else