From e93bf2f15bfe0bf1b840e249d203ec3b0f661567 Mon Sep 17 00:00:00 2001 From: thorpej Date: Sun, 16 Mar 1997 10:00:45 +0000 Subject: [PATCH] Garbage-collect hpux_dumpu(). --- sys/arch/hp300/hp300/hpux_machdep.c | 89 +-------------------------- sys/arch/hp300/include/hpux_machdep.h | 3 +- 2 files changed, 2 insertions(+), 90 deletions(-) diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c index b19c02c014b1..ddcdf0283f9e 100644 --- a/sys/arch/hp300/hp300/hpux_machdep.c +++ b/sys/arch/hp300/hp300/hpux_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpux_machdep.c,v 1.8 1997/03/16 09:10:31 thorpej Exp $ */ +/* $NetBSD: hpux_machdep.c,v 1.9 1997/03/16 10:00:45 thorpej Exp $ */ /* * Copyright (c) 1995, 1996, 1997 Jason R. Thorpe. All rights reserved. @@ -417,93 +417,6 @@ hpux_to_bsd_uoff(off, isps, p) return (-1); } -/* - * Kludge up a uarea dump so that HP-UX debuggers can find out - * what they need. IMPORTANT NOTE: we do not EVEN attempt to - * convert the entire user struct. - */ -int -hpux_dumpu(vp, cred) - struct vnode *vp; - struct ucred *cred; -{ - int error = 0; - struct proc *p = curproc; - struct hpux_user *faku; - struct bsdfp *bp; - short *foop; - - /* - * Make sure there is no mistake about this being a real - * user structure. - */ - faku = (struct hpux_user *)malloc((u_long)ctob(1), M_TEMP, M_WAITOK); - bzero((caddr_t)faku, ctob(1)); - - /* Fill in the process sizes. */ - faku->hpuxu_tsize = p->p_vmspace->vm_tsize; - faku->hpuxu_dsize = p->p_vmspace->vm_dsize; - faku->hpuxu_ssize = p->p_vmspace->vm_ssize; - - /* - * Fill in the exec header for CDB. - * This was saved back in exec(). As far as I can tell CDB - * only uses this information to verify that a particular - * core file goes with a particular binary. - */ - bcopy((caddr_t)p->p_addr->u_md.md_exec, - (caddr_t)&faku->hpuxu_exdata, sizeof (struct hpux_exec)); - - /* - * Adjust user's saved registers (on kernel stack) to reflect - * HP-UX order. Note that HP-UX saves the SR as 2 bytes not 4 - * so we have to move it up. - */ - faku->hpuxu_ar0 = p->p_md.md_regs; - foop = (short *) p->p_md.md_regs; - foop[32] = foop[33]; - foop[33] = foop[34]; - foop[34] = foop[35]; - - if (fputype) { - /* - * Copy 68881 registers from our PCB format to HP-UX format - */ - bp = (struct bsdfp *) &p->p_addr->u_pcb.pcb_fpregs; - bcopy((caddr_t)bp->save, (caddr_t)faku->hpuxu_fp.hpfp_save, - sizeof(bp->save)); - bcopy((caddr_t)bp->ctrl, (caddr_t)faku->hpuxu_fp.hpfp_ctrl, - sizeof(bp->ctrl)); - bcopy((caddr_t)bp->reg, (caddr_t)faku->hpuxu_fp.hpfp_reg, - sizeof(bp->reg)); - } - - /* - * Slay the dragon - */ - faku->hpuxu_dragon = -1; - - /* - * Dump this artfully constructed page in place of the - * user struct page. - */ - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)faku, ctob(1), (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); - - /* - * Dump the remaining UPAGES-1 pages normally - * XXX Spot the wild guess. - */ - if (error == 0) - error = vn_rdwr(UIO_WRITE, vp, (caddr_t)p->p_addr + ctob(1), - ctob(UPAGES-1), (off_t)ctob(1), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); - - free((caddr_t)faku, M_TEMP); - - return (error); -} - #define HSS_RTEFRAME 0x01 #define HSS_FPSTATE 0x02 #define HSS_USERREGS 0x04 diff --git a/sys/arch/hp300/include/hpux_machdep.h b/sys/arch/hp300/include/hpux_machdep.h index 3c5bb31f63d3..73fc1d89b5c0 100644 --- a/sys/arch/hp300/include/hpux_machdep.h +++ b/sys/arch/hp300/include/hpux_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpux_machdep.h,v 1.5 1997/03/16 09:14:25 thorpej Exp $ */ +/* $NetBSD: hpux_machdep.h,v 1.6 1997/03/16 10:02:40 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -71,7 +71,6 @@ void hpux_cpu_bsd_to_hpux_stat __P((struct stat *, struct hpux_stat *)); void hpux_cpu_uname __P((struct hpux_utsname *)); int hpux_cpu_sysconf_arch __P((void)); int hpux_to_bsd_uoff __P((int *, int *, struct proc *)); -int hpux_dumpu __P((struct vnode *, struct ucred *)); void hpux_sendsig __P((sig_t, int, int, u_long)); void hpux_setregs __P((struct proc *, struct exec_package *,