Skip to content

Commit

Permalink
types: Expand RE_BREAKPOINT macro to __builtin_debugtrap (baresip#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsimmisch authored Sep 26, 2023
1 parent 863fb69 commit b840130
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/re_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b840130

Please sign in to comment.