[PATCH 8/8] Ptrace support for Aarch64 SVE
Simon Marchi
simon.marchi@ericsson.com
Thu May 31 20:17:00 GMT 2018
On 2018-05-11 06:52 AM, Alan Hayward wrote:
> diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
> index 1270b7e0c0..bc570ade6d 100644
> --- a/gdb/aarch64-linux-nat.c
> +++ b/gdb/aarch64-linux-nat.c
> @@ -388,19 +388,65 @@ store_fpregs_to_thread (const struct regcache *regcache)
> }
> }
>
> +/* Fill GDB's register array with the sve register values
> + from the current thread. */
> +
> +static void
> +fetch_sveregs_from_thread (struct regcache *regcache)
> +{
> + gdb_byte *base = aarch64_sve_get_sveregs (ptid_get_lwp (inferior_ptid));
> + aarch64_sve_regs_copy_to_regcache (regcache, base);
> + xfree (base);
> +}
> +
> +/* Store to the current thread the valid sve register
> + values in the GDB's register array. */
> +
> +static void
> +store_sveregs_to_thread (struct regcache *regcache)
> +{
> + gdb_byte *base;
> + int ret, tid;
> + struct iovec iovec;
> +
> + tid = ptid_get_lwp (inferior_ptid);
I've just noticed these two uses of inferior_ptid. I think we should get the ptid
from the regcache instead.
Simon
More information about the Gdb-patches
mailing list