Skip to content

Commit

Permalink
assert: Try using __builtin_trap() for SDL_TriggerBreakpoint().
Browse files Browse the repository at this point in the history
This was necessary on an arm64 install of Raspberry Pi OS.
  • Loading branch information
icculus committed Jan 20, 2025
1 parent c4c0bfd commit b809da5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/SDL3/SDL_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ extern "C" {
#define SDL_TriggerBreakpoint() assert(0)
#elif SDL_HAS_BUILTIN(__builtin_debugtrap)
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
#elif SDL_HAS_BUILTIN(__builtin_trap)
#define SDL_TriggerBreakpoint() __builtin_trap()
#elif (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
Expand Down

0 comments on commit b809da5

Please sign in to comment.