This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/3] Detect SVE when reading aarch64 core files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]