[Commits] SDL: SDL_assert.h: add inline asm (int $3) as SDL_TriggerBreakpo...

libsdl.org revision control commits-owner at libsdl.org
Fri Aug 18 13:37:32 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/76abc6e1eb4b
changeset: 11316:76abc6e1eb4b
user:      Ozkan Sezer <sezeroz at gmail.com>
date:      Thu Aug 17 21:32:42 2017 -0400
description:
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.

diffstat:

 include/SDL_assert.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 0f1c85713294 -r 76abc6e1eb4b include/SDL_assert.h
--- a/include/SDL_assert.h	Thu Aug 17 21:32:00 2017 -0400
+++ b/include/SDL_assert.h	Thu Aug 17 21:32:42 2017 -0400
@@ -53,7 +53,9 @@
     #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 <signal.h>
     #define SDL_TriggerBreakpoint() raise(SIGTRAP)
 #else


More information about the commits mailing list