AArch64 SVE: Support changing vector lengths for ptrace
authorAlan Hayward <alan.hayward@arm.com>
Mon, 15 Apr 2019 11:31:21 +0000 (12:31 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Mon, 15 Apr 2019 14:12:44 +0000 (15:12 +0100)
commit48574d91bf1289074f2c88b1f83aa3cd37d524d9
tree8bb9c8cbd7c8c487de165db5fd0fe8914f5036d7
parent4da037ef9dba6c17089250d228efdbe6f7d830c9
AArch64 SVE: Support changing vector lengths for ptrace

When writing registers to the kernel, check if regcache VG has been changed. If
so then update the thread's vector length, then write back the registers.

When reading registers from the kernel, ensure regcache VG register is updated.
The regcache registers should already be of the correct length.

Remove all the checks that error if the vector length has changed.

gdb/ChangeLog:

* aarch64-linux-nat.c (store_sveregs_to_thread): Set vector length.
* nat/aarch64-sve-linux-ptrace.c (aarch64_sve_set_vq): New function.
(aarch64_sve_regs_copy_to_reg_buf): Remove VG checks.
(aarch64_sve_regs_copy_from_reg_buf): Likewise.
* nat/aarch64-sve-linux-ptrace.h (aarch64_sve_set_vq): New declaration.
gdb/ChangeLog
gdb/aarch64-linux-nat.c
gdb/nat/aarch64-sve-linux-ptrace.c
gdb/nat/aarch64-sve-linux-ptrace.h