diff options
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/include/pcb.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/vax/vm_machdep.c | 53 |
2 files changed, 2 insertions, 58 deletions
diff --git a/sys/arch/vax/include/pcb.h b/sys/arch/vax/include/pcb.h index b8732d54d10..bbc96b002b7 100644 --- a/sys/arch/vax/include/pcb.h +++ b/sys/arch/vax/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.8 2013/11/24 22:08:23 miod Exp $ */ +/* $OpenBSD: pcb.h,v 1.9 2015/05/05 02:13:47 guenther Exp $ */ /* $NetBSD: pcb.h,v 1.10 1996/02/02 18:08:26 mycroft Exp $ */ /* @@ -69,10 +69,5 @@ struct pcb { #define AST_MASK 0x07000000 #define AST_PCB 0x04000000 -/* machine-specific core dump; save regs */ -struct md_coredump { - struct reg md_reg; -}; - #endif /* _MACHINE_PCB_H_ */ diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index 7ab91cfa425..a47c00ae0c3 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.42 2014/11/16 12:30:59 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.43 2015/05/05 02:13:47 guenther Exp $ */ /* $NetBSD: vm_machdep.c,v 1.67 2000/06/29 07:14:34 mrg Exp $ */ /* @@ -39,7 +39,6 @@ #include <sys/user.h> #include <sys/exec.h> #include <sys/vnode.h> -#include <sys/core.h> #include <sys/mount.h> #include <sys/device.h> @@ -179,56 +178,6 @@ sys_sysarch(p, v, retval) }; /* - * Dump the machine specific header information at the start of a core dump. - * First put all regs in PCB for debugging purposes. This is not an good - * way to do this, but good for my purposes so far. - */ -int -cpu_coredump(p, vp, cred, chdr) - struct proc *p; - struct vnode *vp; - struct ucred *cred; - struct core *chdr; -{ - struct trapframe *tf; - struct md_coredump state; - struct reg *regs = &state.md_reg; - struct coreseg cseg; - int error; - - tf = p->p_addr->u_pcb.framep; - CORE_SETMAGIC(*chdr, COREMAGIC, MID_MACHINE, 0); - chdr->c_hdrsize = sizeof(struct core); - chdr->c_seghdrsize = sizeof(struct coreseg); - chdr->c_cpusize = sizeof(struct md_coredump); - - bcopy(&tf->r0, ®s->r0, 12 * sizeof(int)); - regs->ap = tf->ap; - regs->fp = tf->fp; - regs->sp = tf->sp; - regs->pc = tf->pc; - regs->psl = tf->psl; - - CORE_SETMAGIC(cseg, CORESEGMAGIC, MID_MACHINE, CORE_CPU); - cseg.c_addr = 0; - cseg.c_size = chdr->c_cpusize; - - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, - (off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_UNIT, cred, NULL, p); - if (error) - return error; - - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&state, sizeof(state), - (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_UNIT, cred, NULL, p); - - if (!error) - chdr->c_nseg++; - - return error; -} - -/* * Map in a bunch of pages read/writeable for the kernel. */ void |