From: Simon Marchi <simon.marchi@ericsson.com>
To: Alan Hayward <alan.hayward@arm.com>, <gdb-patches@sourceware.org>
Cc: <nd@arm.com>
Subject: Re: [PATCH v3 2/3] Detect SVE when reading aarch64 core files
Date: Fri, 10 Aug 2018 19:08:00 -0000 [thread overview]
Message-ID: <d429f159-42bf-6bf5-8421-71f1cb9137da@ericsson.com> (raw)
In-Reply-To: <20180810160849.68985-3-alan.hayward@arm.com>
Hi Alan,
LGTM with a nit/suggestion.
> + uint64_t vl = extract_unsigned_integer (header + SVE_HEADER_VL_OFFSET,
> + SVE_HEADER_VL_LENGTH, byte_order);
> + uint64_t vq = sve_vq_from_vl (vl);
> +
> + if (vq > AARCH64_MAX_SVE_VQ || vq == 0)
> + {
> + warning (_("sve header invalid in "
> + "'.reg-aarch-sve' section in core file."));
> + return 0;
> + }
If higher vq/vl values are expected to be supported in the future (the definition
of AARCH64_MAX_SVE_VQ says "Increase if required"), it might be good to provide a
more specific error message in that case. Something that says "this value of vq/vl
(32) is not supported by this GDB" (but in user-friendly). Otherwise, a user might
think that the core file is corrupted, when actually they have an old GDB that did
not support that vector size.
It's just a suggestion, I leave that up to you. The patch is good either way.
Simon
next prev parent reply other threads:[~2018-08-10 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 16:09 [PATCH v3 0/3] " Alan Hayward
2018-08-10 16:09 ` [PATCH v3 3/3] Parse SVE registers in aarch64 core file reading/writing Alan Hayward
2018-08-10 19:25 ` Simon Marchi
2018-08-10 16:09 ` [PATCH v3 2/3] Detect SVE when reading aarch64 core files Alan Hayward
2018-08-10 19:08 ` Simon Marchi [this message]
2018-08-10 16:09 ` [PATCH v3 1/3] Split size in regset section iterators Alan Hayward
2018-08-10 18:57 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d429f159-42bf-6bf5-8421-71f1cb9137da@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=alan.hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox