From cc308722fba3741a26993afe029078571604c2bd Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Mon, 10 Aug 2020 11:50:53 -0300 Subject: [PATCH] [AArch64] Fix incorrectly-defined SVE macro The kernel has fixed this here: https://lore.kernel.org/patchwork/patch/1029011/ We should do the same for GDB, which is still carrying an incorrect definition of the macro. As stated in the kernel patch thread, this doesn't actually change things because, luckily, the structs are of the same size. gdb/ChangeLog: 2020-08-10 Luis Machado * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use struct user_sve_header instead of struct sve_context. --- gdb/ChangeLog | 5 +++++ gdb/nat/aarch64-sve-linux-sigcontext.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e875b44cb1d..463847f328b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-08-10 Luis Machado + + * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use + struct user_sve_header instead of struct sve_context. + 2020-08-09 Simon Marchi * read.h (dwarf2_fetch_die_loc_sect_off, diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-sve-linux-sigcontext.h index 94fb1eca9cd..52c59826082 100644 --- a/gdb/nat/aarch64-sve-linux-sigcontext.h +++ b/gdb/nat/aarch64-sve-linux-sigcontext.h @@ -166,7 +166,7 @@ struct user_sve_header { /* Offset from the start of struct user_sve_header to the register data */ #define SVE_PT_REGS_OFFSET \ - ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ + ((sizeof(struct user_sve_header) + (SVE_VQ_BYTES - 1)) \ / SVE_VQ_BYTES * SVE_VQ_BYTES) /* -- 2.30.2