From af71510cca017f7765558b9d879621f6e33da73a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 16 Jul 2020 04:43:08 -0400 Subject: [PATCH] assert: Implement SDL_TriggerBreakpoint for Apple ARM hardware. --- include/SDL_assert.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/SDL_assert.h b/include/SDL_assert.h index 21bdad998..f8a368ec1 100644 --- a/include/SDL_assert.h +++ b/include/SDL_assert.h @@ -53,6 +53,8 @@ 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(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */ + #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" ) #elif defined(__386__) && defined(__WATCOMC__) #define SDL_TriggerBreakpoint() { _asm { int 0x03 } } #elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)