diff --git a/include/re_types.h b/include/re_types.h index a3c4dba56..35d9d5992 100644 --- a/include/re_types.h +++ b/include/re_types.h @@ -81,7 +81,13 @@ typedef SSIZE_T ssize_t; /** Defines a soft breakpoint */ #if (defined(__i386__) || defined(__x86_64__)) #define RE_BREAKPOINT __asm__("int $0x03") -#else +#elif defined(__has_builtin) +#if __has_builtin(__builtin_debugtrap) +#define RE_BREAKPOINT __builtin_debugtrap() +#endif +#endif + +#ifndef RE_BREAKPOINT #define RE_BREAKPOINT #endif