diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-05-05 02:13:48 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-05-05 02:13:48 +0000 |
commit | 40b409238afa7889605830c063f16b4d731eaec2 (patch) | |
tree | 07026cd7c5b72f5fe0c6ee04fa46812bcb5229c4 /sys/arch/amd64 | |
parent | 8b8ca5671214b412eb81645a853cca97bd0c4963 (diff) |
emul_native is only used for kernel threads which can't dump core, so
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump,
and various #includes that are superfluous.
This leaves compat_linux processes without a coredump callback. If that
ability is desired, someone should update it to use coredump_elf32() and
verify the results...
ok kettenis@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/hibernate_machdep.c | 3 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/vm_machdep.c | 53 | ||||
-rw-r--r-- | sys/arch/amd64/include/pcb.h | 10 |
3 files changed, 3 insertions, 63 deletions
diff --git a/sys/arch/amd64/amd64/hibernate_machdep.c b/sys/arch/amd64/amd64/hibernate_machdep.c index 4921343b70d..37b57d8ec8c 100644 --- a/sys/arch/amd64/amd64/hibernate_machdep.c +++ b/sys/arch/amd64/amd64/hibernate_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hibernate_machdep.c,v 1.36 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: hibernate_machdep.c,v 1.37 2015/05/05 02:13:46 guenther Exp $ */ /* * Copyright (c) 2012 Mike Larkin <mlarkin@openbsd.org> @@ -35,7 +35,6 @@ #include <machine/cpu.h> #include <machine/hibernate_var.h> -#include <machine/kcore.h> #include <machine/pte.h> #include <machine/pmap.h> diff --git a/sys/arch/amd64/amd64/vm_machdep.c b/sys/arch/amd64/amd64/vm_machdep.c index eb609a4a987..52d0c5037f1 100644 --- a/sys/arch/amd64/amd64/vm_machdep.c +++ b/sys/arch/amd64/amd64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.30 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.31 2015/05/05 02:13:46 guenther Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 2003/04/26 18:39:33 fvdl Exp $ */ /*- @@ -49,7 +49,6 @@ #include <sys/vnode.h> #include <sys/buf.h> #include <sys/user.h> -#include <sys/core.h> #include <sys/exec.h> #include <sys/ptrace.h> #include <sys/signalvar.h> @@ -153,56 +152,6 @@ cpu_exit(struct proc *p) } /* - * Dump the machine specific segment at the start of a core dump. - */ -struct md_core { - struct reg intreg; - struct fpreg freg; -}; - -int -cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, - struct core *chdr) -{ - struct md_core md_core; - struct coreseg cseg; - int error; - - CORE_SETMAGIC(*chdr, COREMAGIC, MID_MACHINE, 0); - chdr->c_hdrsize = ALIGN(sizeof(*chdr)); - chdr->c_seghdrsize = ALIGN(sizeof(cseg)); - chdr->c_cpusize = sizeof(md_core); - - /* Save integer registers. */ - error = process_read_regs(p, &md_core.intreg); - if (error) - return error; - - /* Save floating point registers. */ - error = process_read_fpregs(p, &md_core.freg); - if (error) - return error; - - 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)&md_core, sizeof(md_core), - (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_UNIT, cred, NULL, p); - if (error) - return error; - - chdr->c_nseg++; - return 0; -} - -/* * Set a red zone in the kernel stack after the u. area. */ void diff --git a/sys/arch/amd64/include/pcb.h b/sys/arch/amd64/include/pcb.h index 5bf1ab856f0..85efc564252 100644 --- a/sys/arch/amd64/include/pcb.h +++ b/sys/arch/amd64/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.12 2011/07/10 18:12:03 deraadt Exp $ */ +/* $OpenBSD: pcb.h,v 1.13 2015/05/05 02:13:46 guenther Exp $ */ /* $NetBSD: pcb.h,v 1.1 2003/04/26 18:39:45 fvdl Exp $ */ /*- @@ -89,12 +89,4 @@ struct pcb { int pcb_cr0; /* saved image of CR0 */ }; -/* - * The pcb is augmented with machine-dependent additional data for - * core dumps. For the i386, there is nothing to add. - */ -struct md_coredump { - long md_pad[8]; -}; - #endif /* _MACHINE_PCB_H_ */ |