diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-04-15 12:29:40 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-04-15 15:12:43 +0100 |
commit | 4da037ef9dba6c17089250d228efdbe6f7d830c9 (patch) | |
tree | d255e2f1b678fe4c1bef688cac9d5c4e1d6a6307 /gdb/gnulib | |
parent | ccb8d7e8194b848a6c4aa43272540eec0f4f21f2 (diff) | |
download | gdb-4da037ef9dba6c17089250d228efdbe6f7d830c9.zip gdb-4da037ef9dba6c17089250d228efdbe6f7d830c9.tar.gz gdb-4da037ef9dba6c17089250d228efdbe6f7d830c9.tar.bz2 |
AArch64 SVE: Check for vector length change when getting gdbarch
Override the thread_architecture method, similar to SPU. If the vector
length has changed, then find the arch using info, making sure the vector
length is passed down to the init routine.
In the init routine, ensure the arch has the correct vector length.
Example output. Program is stopped in thread 2, just before it calls prctl
to change the vector length
(gdb) info threads
Id Target Id Frame
1 Thread 0xffffbf6f4000 (LWP 3188) "sve_change" 0x0000ffffbf6ae130 in pthread_join ()
* 2 Thread 0xffffbf55e200 (LWP 3189) "sve_change" thread1 (arg=0xfeedface) at sve_change_size.c:28
(gdb) print $vg
$1 = 8
(gdb) print $z0.s.u
$2 = {623191333, 623191333, 623191333, 623191333, 0 <repeats 12 times>}
(gdb) n
29 int ret = prctl(PR_SVE_SET_VL, vl/2);
(gdb) n
30 printf ("Changed: ret\n", ret);
(gdb) print $vg
$4 = 4
(gdb) print $z0.s.u
$5 = {623191333, 623191333, 623191333, 623191333, 0, 0, 0, 0}
(gdb) thr 1
[Switching to thread 1 (Thread 0xffffbf6f4000 (LWP 3181))]
(gdb) print $vg
$6 = 8
(gdb) print $z0.s.u
$7 = {623191333, 623191333, 623191333, 623191333, 0 <repeats 12 times>}
gdb/ChangeLog:
* aarch64-linux-nat.c
(aarch64_linux_nat_target::thread_architecture): Add override.
* aarch64-tdep.c (aarch64_gdbarch_init): Ensure different tdesc for
each VQ.
Diffstat (limited to 'gdb/gnulib')
0 files changed, 0 insertions, 0 deletions