diff options
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 95 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/trap.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/include/cpu.h | 3 |
3 files changed, 5 insertions, 97 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index cf565a16e5f..58a34f441ab 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.59 2001/08/23 14:01:03 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.60 2001/08/25 11:37:26 espie Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -1175,7 +1175,7 @@ parityerror(fp) printf("WARNING: kernel parity error ignored\n"); #endif } else { - regdump(fp, 128); + regdump(&(fp->F_t), 128); panic("kernel parity error"); } return(1); @@ -1244,97 +1244,6 @@ done: return(found); } -void -regdump(fp, sbytes) - struct frame *fp; /* must not be register */ - int sbytes; -{ - static int doingdump = 0; - register int i; - int s; - - if (doingdump) - return; - s = splhigh(); - doingdump = 1; - printf("pid = %d, pc = %s, ", - curproc ? curproc->p_pid : -1, hexstr(fp->f_pc, 8)); - printf("ps = %s, ", hexstr(fp->f_sr, 4)); - printf("sfc = %s, ", hexstr(getsfc(), 4)); - printf("dfc = %s\n", hexstr(getdfc(), 4)); - printf("Registers:\n "); - for (i = 0; i < 8; i++) - printf(" %d", i); - printf("\ndreg:"); - for (i = 0; i < 8; i++) - printf(" %s", hexstr(fp->f_regs[i], 8)); - printf("\nareg:"); - for (i = 0; i < 8; i++) - printf(" %s", hexstr(fp->f_regs[i+8], 8)); - if (sbytes > 0) { - if (fp->f_sr & PSL_S) { - printf("\n\nKernel stack (%s):", - hexstr((int)(((int *)&fp)-1), 8)); - dumpmem(((int *)&fp)-1, sbytes, 0); - } else { - printf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8)); - dumpmem((int *)fp->f_regs[SP], sbytes, 1); - } - } - doingdump = 0; - splx(s); -} - -#define KSADDR ((int *)((u_int)curproc->p_addr + USPACE - NBPG)) - -void -dumpmem(ptr, sz, ustack) - register int *ptr; - int sz, ustack; -{ - register int i, val; - - for (i = 0; i < sz; i++) { - if ((i & 7) == 0) - printf("\n%s: ", hexstr((int)ptr, 6)); - else - printf(" "); - if (ustack == 1) { - if ((val = fuword(ptr++)) == -1) - break; - } else { - if (ustack == 0 && - (ptr < KSADDR || ptr > KSADDR+(NBPG/4-1))) - break; - val = *ptr++; - } - printf("%s", hexstr(val, 8)); - } - printf("\n"); -} - -char * -hexstr(val, len) - register int val; - int len; -{ - static char nbuf[9]; - register int x, i; - - if (len > 8) - return(""); - nbuf[len] = '\0'; - for (i = len-1; i >= 0; --i) { - x = val & 0xF; - if (x > 9) - nbuf[i] = x - 10 + 'A'; - else - nbuf[i] = x + '0'; - val >>= 4; - } - return(nbuf); -} - /* * cpu_exec_aout_makecmds(): * cpu-dependent a.out format hook for execve(). diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index 309bf31cf7c..47765be5339 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.25 2001/07/25 13:25:31 art Exp $ */ +/* $OpenBSD: trap.c,v 1.26 2001/08/25 11:37:26 espie Exp $ */ /* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */ /* @@ -355,7 +355,7 @@ trap(type, code, v, frame) printf("(press a key)\n"); (void)cngetc(); #endif } - regdump(&frame, 128); + regdump(&(frame.F_t), 128); type &= ~T_USER; if ((u_int)type < trap_types) panic(trap_type[type]); diff --git a/sys/arch/hp300/include/cpu.h b/sys/arch/hp300/include/cpu.h index ae4b0bb0b58..4e4ff631e12 100644 --- a/sys/arch/hp300/include/cpu.h +++ b/sys/arch/hp300/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.14 2001/08/20 19:49:03 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.15 2001/08/25 11:37:26 espie Exp $ */ /* $NetBSD: cpu.h,v 1.28 1998/02/13 07:41:51 scottr Exp $ */ /* @@ -182,7 +182,6 @@ void hp300_calibrate_delay __P((void)); /* machdep.c functions */ int badaddr __P((caddr_t)); int badbaddr __P((caddr_t)); -void regdump __P((struct frame *, int)); void dumpconf __P((void)); /* pmap.c functions */ |