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/sparc64 | |
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/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/pcb.h | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/vm_machdep.c | 50 |
2 files changed, 2 insertions, 62 deletions
diff --git a/sys/arch/sparc64/include/pcb.h b/sys/arch/sparc64/include/pcb.h index dc72ecad17a..108f669031c 100644 --- a/sys/arch/sparc64/include/pcb.h +++ b/sys/arch/sparc64/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.9 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: pcb.h,v 1.10 2015/05/05 02:13:47 guenther Exp $ */ /* $NetBSD: pcb.h,v 1.7 2000/12/29 17:12:05 eeh Exp $ */ /* @@ -143,18 +143,6 @@ struct pcb { u_int64_t pcb_rwsp[PCB_MAXWIN]; }; -/* - * The pcb is augmented with machine-dependent additional data for - * core dumps. Note that the trapframe here is a copy of the one - * from the top of the kernel stack (included here so that the kernel - * stack itself need not be dumped). - */ -struct md_coredump { - struct trapframe64 md_tf; - struct fpstate64 md_fpstate; - u_int64_t md_wcookie; -}; - #ifndef _KERNEL /* Let gdb compile. We need fancier macros to make these make sense. */ #define pcb_psr pcb_pstate diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index 61494dd2856..e8484e52a43 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.32 2014/11/16 12:30:59 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.33 2015/05/05 02:13:47 guenther Exp $ */ /* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */ /* @@ -53,7 +53,6 @@ #include <sys/systm.h> #include <sys/proc.h> #include <sys/user.h> -#include <sys/core.h> #include <sys/malloc.h> #include <sys/buf.h> #include <sys/exec.h> @@ -369,50 +368,3 @@ cpu_exit(struct proc *p) pmap_deactivate(p); sched_exit(p); } - -/* - * cpu_coredump is called to write a core dump header. - * (should this be defined elsewhere? machdep.c?) - */ -int -cpu_coredump(p, vp, cred, chdr) - struct proc *p; - struct vnode *vp; - struct ucred *cred; - struct core *chdr; -{ - int error; - struct md_coredump md_core; - struct coreseg cseg; - - 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); - - md_core.md_tf = *p->p_md.md_tf; - md_core.md_wcookie = p->p_addr->u_pcb.pcb_wcookie; - if (p->p_md.md_fpstate) { - fpusave_proc(p, 1); - md_core.md_fpstate = *p->p_md.md_fpstate; - } else - bzero((caddr_t)&md_core.md_fpstate, - sizeof(md_core.md_fpstate)); - - 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) - chdr->c_nseg++; - - return error; -} - |