aboutsummaryrefslogtreecommitdiffstats
path: root/package/devel/gdb/patches/010-aarch64-headers.patch
blob: 8f057382986d452e4577140d977c174992302457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
The signal definitions of musl and gdb collide

The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc 
defines it in signal.h which collides. 
Kernel 4.14 misses the definitions of struct user_sve_header so we still 
have to use the aarch64-sve-linux-sigcontext.h header file which also 
provides that and make sure aarch64-sve-linux-sigcontext.h does not 
provide the same headers as the kernel or musl.

--- a/gdb/nat/aarch64-sve-linux-ptrace.h
+++ b/gdb/nat/aarch64-sve-linux-ptrace.h
@@ -25,7 +25,7 @@
 #include <sys/ptrace.h>
 #include <asm/ptrace.h>
 
-#ifndef SVE_SIG_ZREGS_SIZE
+#ifndef SVE_PT_REGS_SVE
 #include "aarch64-sve-linux-sigcontext.h"
 #endif
 
--- a/gdb/nat/aarch64-sve-linux-sigcontext.h
+++ b/gdb/nat/aarch64-sve-linux-sigcontext.h
@@ -19,6 +19,7 @@
 #ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
 #define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
 
+#ifndef SVE_MAGIC
 #define SVE_MAGIC	0x53564501
 
 struct sve_context {
@@ -128,6 +129,7 @@ struct sve_context {
 	(SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
 
 #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
+#endif
 
 /* SVE/FP/SIMD state (NT_ARM_SVE) */