Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SDL_assert.h: add inline asm (int $3) as SDL_TriggerBreakpoint for Wa…
…tcom/x86

(also disable SIGTRAP case to !watcom, because watcom doesn't have SIGTRAP.)

Partially fixes Bugzilla #3758.
  • Loading branch information
sezero committed Aug 18, 2017
1 parent fbda68e commit bdb7bfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/SDL_assert.h
Expand Up @@ -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 <signal.h>
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
#else
Expand Down

0 comments on commit bdb7bfd

Please sign in to comment.