This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use uint64_t for SVE VQ
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Mon, 4 Jun 2018 10:02:42 +0000
- Subject: Re: [PATCH] Use uint64_t for SVE VQ
- Nodisclaimer: True
- References: <20180601175331.53523-1-alan.hayward@arm.com> <873a3a3a-0620-d82c-41a2-52d20b8817a4@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
> On 2 Jun 2018, at 11:39, Pedro Alves <palves@redhat.com> wrote:
>
> On 06/01/2018 06:53 PM, Alan Hayward wrote:
>
>> 2018-06-01 Alan Hayward <alan.hayward@arm.com>
>>
>> * aarch64-tdep.c (aarch64_read_description): Use long for VQ.
>
> s/long/uint64_t/.
Oops.
>
>> --- a/gdb/aarch64-tdep.c
>> +++ b/gdb/aarch64-tdep.c
>> @@ -2856,7 +2856,7 @@ aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
>> (It is not possible to set VQ to zero on an SVE system). */
>>
>> const target_desc *
>> -aarch64_read_description (long vq)
>> +aarch64_read_description (uint64_t vq)
>> {
>> if (vq > AARCH64_MAX_SVE_VQ)
>> error (_("VQ is %ld, maximum supported value is %d"), vq,
>
> This %ld needs to be updated to either use PRIu64 or pulongest.
> There may be others, I haven't looked at the code, just the patch.
I’m surprised this didn’t cause a warning build failure.
Fixed up with:
error (_("VQ is %" PRIu64 ", maximum supported value is %d"), vq,
Double checked that there were no other prints of VQ/VG etc that
were added in my committed SVE patches.
> Otherwise OK.
>
Pushed with the changes above.
Thanks!
Alan.