Author: jhb
Date: Sat Aug 12 18:38:18 2017
New Revision: 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
  Reviewed by:  andrew
  MFC after:    1 week


Modified: head/sys/arm64/arm64/machdep.c
--- head/sys/arm64/arm64/machdep.c      Sat Aug 12 18:28:02 2017        
+++ head/sys/arm64/arm64/machdep.c      Sat Aug 12 18:38:18 2017        
@@ -222,7 +222,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);
                KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate,
                    ("Called fill_fpregs while the kernel is using the VFP"));
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to