Take a whack at allowing sN, sp and gp to be set from DDB, too.

This commit is contained in:
mycroft 2000-02-18 00:02:43 +00:00
parent 3ade108e4b
commit 9e77fba716
2 changed files with 29 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.24 2000/02/17 23:52:23 mycroft Exp $ */
/* $NetBSD: db_interface.c,v 1.25 2000/02/18 00:02:43 mycroft Exp $ */
/*
* Mach Operating System
@ -204,6 +204,17 @@ kdb_trap(type, tfp)
tfp[19] = f->f_regs[MULLO];
tfp[20] = f->f_regs[MULHI];
tfp[21] = f->f_regs[PC];
kdbaux[0] = f->f_regs[S0];
kdbaux[1] = f->f_regs[S1];
kdbaux[2] = f->f_regs[S2];
kdbaux[3] = f->f_regs[S3];
kdbaux[4] = f->f_regs[S4];
kdbaux[5] = f->f_regs[S5];
kdbaux[6] = f->f_regs[S6];
kdbaux[7] = f->f_regs[S7];
kdbaux[8] = f->f_regs[SP];
kdbaux[9] = f->f_regs[S8];
kdbaux[10] = f->f_regs[GP];
}
return (1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore_mips3.S,v 1.14 1999/12/22 05:54:18 tsubai Exp $ */
/* $NetBSD: locore_mips3.S,v 1.15 2000/02/18 00:02:43 mycroft Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@ -362,10 +362,8 @@ mips3_SlowFault:
NESTED_NOPROFILE(mips3_KernGenException, KERNFRAME_SIZ, ra)
.set noat
.mask 0x80000000, -4
subu sp, sp, KERNFRAME_SIZ
#ifdef DDB
la k0, _C_LABEL(kdbaux)
addu k1, sp, KERNFRAME_SIZ # Avoid violating conventions
REG_S s0, SF_REG_S0(k0)
REG_S s1, SF_REG_S1(k0)
REG_S s2, SF_REG_S2(k0)
@ -374,7 +372,7 @@ NESTED_NOPROFILE(mips3_KernGenException, KERNFRAME_SIZ, ra)
REG_S s5, SF_REG_S5(k0)
REG_S s6, SF_REG_S6(k0)
REG_S s7, SF_REG_S7(k0)
REG_S k1, SF_REG_SP(k0)
REG_S sp, SF_REG_SP(k0)
REG_S s8, SF_REG_S8(k0)
REG_S gp, SF_REG_RA(k0)
#endif
@ -383,6 +381,7 @@ NESTED_NOPROFILE(mips3_KernGenException, KERNFRAME_SIZ, ra)
* We don't need to save s0 - s8, sp and gp because
* the compiler does it for us.
*/
subu sp, sp, KERNFRAME_SIZ
REG_S AT, TF_BASE+TF_REG_AST(sp)
REG_S v0, TF_BASE+TF_REG_V0(sp)
REG_S v1, TF_BASE+TF_REG_V1(sp)
@ -461,6 +460,20 @@ NESTED_NOPROFILE(mips3_KernGenException, KERNFRAME_SIZ, ra)
REG_L t9, TF_BASE+TF_REG_T9(sp)
REG_L ra, TF_BASE+TF_REG_RA(sp)
addu sp, sp, KERNFRAME_SIZ
#ifdef DDB
la k0, _C_LABEL(kdbaux)
REG_L s0, SF_REG_S0(k0)
REG_L s1, SF_REG_S1(k0)
REG_L s2, SF_REG_S2(k0)
REG_L s3, SF_REG_S3(k0)
REG_L s4, SF_REG_S4(k0)
REG_L s5, SF_REG_S5(k0)
REG_L s6, SF_REG_S6(k0)
REG_L s7, SF_REG_S7(k0)
REG_L sp, SF_REG_SP(k0)
REG_L s8, SF_REG_S8(k0)
REG_L gp, SF_REG_RA(k0)
#endif
eret # return to interrupted point
.set at
END(mips3_KernGenException)