* [PATCH] [AArch64] Fix incorrectly-defined SVE macro
@ 2020-08-07 17:00 Luis Machado
2020-08-10 8:52 ` Alan Hayward
0 siblings, 1 reply; 3+ messages in thread
From: Luis Machado @ 2020-08-07 17:00 UTC (permalink / raw)
To: gdb-patches, Alan.Hayward
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.
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use
struct user_sve_header instead of struct sve_context.
---
gdb/nat/aarch64-sve-linux-sigcontext.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-sve-linux-sigcontext.h
index 94fb1eca9c..52c5982608 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.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [AArch64] Fix incorrectly-defined SVE macro
2020-08-07 17:00 [PATCH] [AArch64] Fix incorrectly-defined SVE macro Luis Machado
@ 2020-08-10 8:52 ` Alan Hayward
2020-08-10 14:57 ` Luis Machado
0 siblings, 1 reply; 3+ messages in thread
From: Alan Hayward @ 2020-08-10 8:52 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches, nd
> On 7 Aug 2020, at 18:00, Luis Machado <luis.machado@linaro.org> wrote:
>
> 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.
>
Ouch. Good find.
> YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
>
> * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use
> struct user_sve_header instead of struct sve_context.
> ---
> gdb/nat/aarch64-sve-linux-sigcontext.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-sve-linux-sigcontext.h
> index 94fb1eca9c..52c5982608 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)) \
Matches the Kernel change exactly. So, approved!
> / SVE_VQ_BYTES * SVE_VQ_BYTES)
>
> /*
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [AArch64] Fix incorrectly-defined SVE macro
2020-08-10 8:52 ` Alan Hayward
@ 2020-08-10 14:57 ` Luis Machado
0 siblings, 0 replies; 3+ messages in thread
From: Luis Machado @ 2020-08-10 14:57 UTC (permalink / raw)
To: Alan Hayward; +Cc: gdb-patches, nd
On 8/10/20 5:52 AM, Alan Hayward wrote:
>
>
>> On 7 Aug 2020, at 18:00, Luis Machado <luis.machado@linaro.org> wrote:
>>
>> 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.
>>
>
> Ouch. Good find.
>
>> YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
>>
>> * nat/aarch64-sve-linux-sigcontext.h (SVE_PT_REGS_OFFSET): Use
>> struct user_sve_header instead of struct sve_context.
>> ---
>> gdb/nat/aarch64-sve-linux-sigcontext.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-sve-linux-sigcontext.h
>> index 94fb1eca9c..52c5982608 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)) \
>
> Matches the Kernel change exactly. So, approved!
Thanks. Pushed now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-10 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 17:00 [PATCH] [AArch64] Fix incorrectly-defined SVE macro Luis Machado
2020-08-10 8:52 ` Alan Hayward
2020-08-10 14:57 ` Luis Machado
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox