gdb: bump to 8.3.1
[oweals/openwrt.git] / package / devel / gdb / patches / 010-aarch64-headers.patch
1 The signal definitions of musl and gdb collide
2
3 The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc 
4 defines it in signal.h which collides. 
5 Kernel 4.14 misses the definitions of struct user_sve_header so we still 
6 have to use the aarch64-sve-linux-sigcontext.h header file which also 
7 provides that and make sure aarch64-sve-linux-sigcontext.h does not 
8 provide the same headers as the kernel or musl.
9
10 --- a/gdb/nat/aarch64-sve-linux-ptrace.h
11 +++ b/gdb/nat/aarch64-sve-linux-ptrace.h
12 @@ -25,7 +25,7 @@
13  #include <sys/ptrace.h>
14  #include <asm/ptrace.h>
15  
16 -#ifndef SVE_SIG_ZREGS_SIZE
17 +#ifndef SVE_PT_REGS_SVE
18  #include "aarch64-sve-linux-sigcontext.h"
19  #endif
20  
21 --- a/gdb/nat/aarch64-sve-linux-sigcontext.h
22 +++ b/gdb/nat/aarch64-sve-linux-sigcontext.h
23 @@ -19,6 +19,7 @@
24  #ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
25  #define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
26  
27 +#ifndef SVE_MAGIC
28  #define SVE_MAGIC      0x53564501
29  
30  struct sve_context {
31 @@ -128,6 +129,7 @@ struct sve_context {
32         (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET)
33  
34  #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq))
35 +#endif
36  
37  /* SVE/FP/SIMD state (NT_ARM_SVE) */
38