]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When XSAVE support was added on amd64, the FPU save area was moved
authorjhb <jhb@FreeBSD.org>
Tue, 29 Sep 2015 15:47:42 +0000 (15:47 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 29 Sep 2015 15:47:42 +0000 (15:47 +0000)
commiteba92cd9052b7330c05411fe4c937afcb71f12bb
treeeb807ca95b0383164de45931722c3c728b79454c
parent00e9f99f769be6937cece44e2a45afe2835ffa41
When XSAVE support was added on amd64, the FPU save area was moved
out of 'struct pcb' and into a variable-sized region after the
structure. The kgdb code currently only reads the pcb. It does not
read in the FPU save area but instead passes stack garbage as the
FPU's saved context. Fixing this would mean determining the proper
size of the area and fetching it. However, this state is not saved
for running CPUs in stoppcbs[], so the callback would also have to
know to ignore those pcbs. Instead, just remove the call since it is
of limited usefulness. It results in kgdb reporting the state of the
FPU/SIMD registers in userland, not their current values in the kernel.
In particular, it does not report the correct state for any code in
the kernel which does use the FPU and would report incorrect values
in that case.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3743
gnu/usr.bin/gdb/kgdb/trgt_amd64.c