diff options
author | jhb <jhb@FreeBSD.org> | 2017-08-21 17:29:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2017-08-21 17:29:37 +0000 |
commit | fb69609c7af02dccc15e0551e0feba7545f3279f (patch) | |
tree | 4bf3e8136529603bc4e54c62419029187fe73374 /sys/arm64 | |
parent | 6d573278b42b4e6be5518e94c61416c213872aa8 (diff) | |
download | FreeBSD-src-fb69609c7af02dccc15e0551e0feba7545f3279f.zip FreeBSD-src-fb69609c7af02dccc15e0551e0feba7545f3279f.tar.gz |
MFC 322436: Don't panic for PT_GETFPREGS.
Only fetch the VFP state from the CPU if the thread whose registers are
being requested is the current thread. If a stopped thread's registers
are being fetched by a debugger, the saved state in the PCB is already
valid.
Diffstat (limited to 'sys/arm64')
-rw-r--r-- | sys/arm64/arm64/machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 7cc3927..d3ad160 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -213,7 +213,8 @@ fill_fpregs(struct thread *td, struct fpreg *regs) * If we have just been running VFP instructions we will * need to save the state to memcpy it below. */ - vfp_save_state(td, pcb); + if (td == curthread) + vfp_save_state(td, pcb); memcpy(regs->fp_q, pcb->pcb_vfp, sizeof(regs->fp_q)); regs->fp_cr = pcb->pcb_fpcr; |