From 141cc3e2714084b35bc1fbf564274019c0b34b9d Mon Sep 17 00:00:00 2001 From: Ralph Campbell Date: Mon, 16 Mar 1992 03:14:14 -0800 Subject: [PATCH] snapshot FP regs on core dump SCCS-vsn: sys/pmax/pmax/vm_machdep.c 7.5 --- usr/src/sys/pmax/pmax/vm_machdep.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr/src/sys/pmax/pmax/vm_machdep.c b/usr/src/sys/pmax/pmax/vm_machdep.c index dad6c77f7d..d8d5c91802 100644 --- a/usr/src/sys/pmax/pmax/vm_machdep.c +++ b/usr/src/sys/pmax/pmax/vm_machdep.c @@ -11,7 +11,7 @@ * * from: Utah $Hdr: vm_machdep.c 1.21 91/04/06$ * - * @(#)vm_machdep.c 7.4 (Berkeley) %G% + * @(#)vm_machdep.c 7.5 (Berkeley) %G% */ #include "param.h" @@ -117,13 +117,20 @@ cpu_exit(p) /* * Dump the machine specific header information at the start of a core dump. - * XXX should snapshot FPU here? */ cpu_coredump(p, vp, cred) struct proc *p; struct vnode *vp; struct ucred *cred; { + extern struct proc *machFPCurProcPtr; + + /* + * Copy floating point state from the FP chip if this process + * has state stored there. + */ + if (p == machFPCurProcPtr) + MachSaveCurFPState(p); return (vn_rdwr(UIO_WRITE, vp, (caddr_t)p->p_addr, ctob(UPAGES), (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, -- 2.20.1