Date: Mon, 21 Aug 2017 17:29:38 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r322760 - stable/11/sys/arm64/arm64 Message-ID: <201708211729.v7LHTcV8019557@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Aug 21 17:29:37 2017 New Revision: 322760 URL: https://svnweb.freebsd.org/changeset/base/322760 Log: 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. Modified: stable/11/sys/arm64/arm64/machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm64/arm64/machdep.c ============================================================================== --- stable/11/sys/arm64/arm64/machdep.c Mon Aug 21 17:20:31 2017 (r322759) +++ stable/11/sys/arm64/arm64/machdep.c Mon Aug 21 17:29:37 2017 (r322760) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708211729.v7LHTcV8019557>