SDL_assert.h: add inline asm (int $3) as SDL_TriggerBreakpoint for Watcom/x86
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 17 Aug 2017 21:32:42 -0400
changeset 1131676abc6e1eb4b
parent 11315 0f1c85713294
child 11317 f57e81db97b5
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
     1.1 --- a/include/SDL_assert.h	Thu Aug 17 21:32:00 2017 -0400
     1.2 +++ b/include/SDL_assert.h	Thu Aug 17 21:32:42 2017 -0400
     1.3 @@ -53,7 +53,9 @@
     1.4      #define SDL_TriggerBreakpoint() __debugbreak()
     1.5  #elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
     1.6      #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
     1.7 -#elif defined(HAVE_SIGNAL_H)
     1.8 +#elif defined(__386__) && defined(__WATCOMC__)
     1.9 +    #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
    1.10 +#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
    1.11      #include <signal.h>
    1.12      #define SDL_TriggerBreakpoint() raise(SIGTRAP)
    1.13  #else