Debian Codegraph @

debian/patches/0001-Use-__builtin_debuggrap-on-Apple-AARCH64-21.patch

raw
1 From 5dcbe41d2bd4712c8014aa7e843723ad7b40fd74 Mon Sep 17 00:00:00 2001
2 From: Scott Tsai <[email protected]>
3 Date: Fri, 2 Jul 2021 18:30:27 +0800
4 Subject: [PATCH] Use __builtin_debuggrap on Apple AARCH64 (#21)
5
6 Origin: upstream, https://github.com/scottt/debugbreak/commit/5dcbe41d2bd4712c8014aa7e843723ad7b40fd74.patch
7 Forwarded: not-needed
8 ---
9 debugbreak.h | 8 +++++++-
10 1 file changed, 7 insertions(+), 1 deletion(-)
11
12 diff --git a/debugbreak.h b/debugbreak.h
13 index a41d42b..bfb8288 100644
14 --- a/debugbreak.h
15 +++ b/debugbreak.h
16 @@ -91,7 +91,7 @@ __inline__ static void trap_instruction(void)
17 * Same problem and workaround as Thumb mode */
18 }
19 #elif defined(__aarch64__) && defined(__APPLE__)
20 - #define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_TRAP
21 + #define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_BULTIN_DEBUGTRAP
22 #elif defined(__aarch64__)
23 #define DEBUG_BREAK_IMPL DEBUG_BREAK_USE_TRAP_INSTRUCTION
24 __attribute__((always_inline))
25 @@ -142,6 +142,12 @@ __inline__ static void debug_break(void)
26 {
27 trap_instruction();
28 }
29 +#elif DEBUG_BREAK_IMPL == DEBUG_BREAK_USE_BULTIN_DEBUGTRAP
30 +__attribute__((always_inline))
31 +__inline__ static void debug_break(void)
32 +{
33 + __builtin_debugtrap();
34 +}
35 #elif DEBUG_BREAK_IMPL == DEBUG_BREAK_USE_BULTIN_TRAP
36 __attribute__((always_inline))
37 __inline__ static void debug_break(void)
38 --
39 2.51.0
40