Change tf_arg to uintptr_t from void * to reflect the fact that
non-pointer values may be passed in it. Add appropriate casts. The interrupt type is now passed in tf_arg instead tf_type.
This commit is contained in:
parent
880a354a4a
commit
cc8b4c0416
@ -57,26 +57,15 @@
|
||||
#define T_IMMU_MISS 0x19
|
||||
#define T_DMMU_MISS 0x1a
|
||||
#define T_DMMU_PROT 0x1b
|
||||
#define T_CLOCK 0x1c
|
||||
#define T_SPILL 0x1d
|
||||
#define T_FILL 0x1e
|
||||
#define T_SPILL 0x1c
|
||||
#define T_FILL 0x1d
|
||||
#define T_FILL_RET 0x1e
|
||||
#define T_BREAKPOINT 0x1f
|
||||
#define T_SYSCALL 0x20
|
||||
#define T_RESTOREWP 0x21
|
||||
#define T_SOFT 0x22
|
||||
#define T_KERNEL 0x40
|
||||
|
||||
#define T_TYPE_SHIFT 0
|
||||
#define T_TYPE_SIZE 7
|
||||
#define T_TYPE_MASK (((1 << T_TYPE_SIZE) - 1) << T_TYPE_SHIFT)
|
||||
#define T_TYPE(type) \
|
||||
(((type) & T_TYPE_MASK) >> T_TYPE_SHIFT)
|
||||
|
||||
#define T_LEVEL_SHIFT T_TYPE_SIZE
|
||||
#define T_LEVEL_SIZE 4
|
||||
#define T_LEVEL_MASK (((1 << T_LEVEL_SIZE) - 1) << T_LEVEL_SHIFT)
|
||||
#define T_LEVEL(type) \
|
||||
(((type) & T_LEVEL_MASK) >> T_LEVEL_SHIFT)
|
||||
|
||||
#ifndef LOCORE
|
||||
extern const char *trap_msg[];
|
||||
#endif
|
||||
|
@ -67,7 +67,7 @@ kdb_trap(struct trapframe *tf)
|
||||
if (db_global_jmpbuf_valid)
|
||||
longjmp(db_global_jmpbuf, 1);
|
||||
ddb_regs = *tf;
|
||||
kf = ddb_regs.tf_arg;
|
||||
kf = (struct kdbframe *)ddb_regs.tf_arg;
|
||||
kf->kf_cfp = kf->kf_fp;
|
||||
setjmp(db_global_jmpbuf);
|
||||
db_global_jmpbuf_valid = TRUE;
|
||||
|
@ -67,7 +67,6 @@ static int db_print_trap(struct trapframe *);
|
||||
|
||||
extern char tl1_trap[];
|
||||
extern char tl0_trap[];
|
||||
extern char tl0_trap_withstack[];
|
||||
extern char _start[];
|
||||
extern char _end[];
|
||||
|
||||
@ -128,7 +127,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
if (count == -1)
|
||||
count = 1024;
|
||||
if (!have_addr) {
|
||||
kfp = DDB_REGS->tf_arg;
|
||||
kfp = (struct kdbframe *)DDB_REGS->tf_arg;
|
||||
fp = (struct frame *)(kfp->kf_cfp + SPOFF);
|
||||
} else
|
||||
fp = (struct frame *)(addr + SPOFF);
|
||||
@ -150,8 +149,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
if (name == NULL)
|
||||
name = "(null)";
|
||||
if (value == (u_long)tl1_trap ||
|
||||
value == (u_long)tl0_trap ||
|
||||
value == (u_long)tl0_trap_withstack) {
|
||||
value == (u_long)tl0_trap) {
|
||||
nfp = db_get_value((db_addr_t)&fp->f_fp,
|
||||
sizeof(u_long), FALSE) + SPOFF;
|
||||
tf = (struct trapframe *)(nfp + sizeof(*fp));
|
||||
@ -203,7 +201,7 @@ DB_COMMAND(down, db_frame_down)
|
||||
u_long cfp;
|
||||
u_long ofp;
|
||||
|
||||
kfp = DDB_REGS->tf_arg;
|
||||
kfp = (struct kdbframe *)DDB_REGS->tf_arg;
|
||||
fp = (struct frame *)(kfp->kf_fp + SPOFF);
|
||||
cfp = kfp->kf_cfp;
|
||||
for (;;) {
|
||||
@ -226,7 +224,7 @@ DB_COMMAND(up, db_frame_up)
|
||||
struct kdbframe *kfp;
|
||||
struct frame *cfp;
|
||||
|
||||
kfp = DDB_REGS->tf_arg;
|
||||
kfp = (struct kdbframe *)DDB_REGS->tf_arg;
|
||||
cfp = (struct frame *)(kfp->kf_cfp + SPOFF);
|
||||
if (!INKERNEL((u_long)cfp)) {
|
||||
db_printf("already at top\n");
|
||||
@ -243,7 +241,7 @@ db_show_ ## name ## num(struct db_variable *dp, db_expr_t *vp, int op) \
|
||||
struct kdbframe *kfp; \
|
||||
struct frame *fp; \
|
||||
\
|
||||
kfp = DDB_REGS->tf_arg; \
|
||||
kfp = (struct kdbframe *)DDB_REGS->tf_arg; \
|
||||
fp = (struct frame *)(kfp->kf_cfp + SPOFF); \
|
||||
if (op == DB_VAR_GET) \
|
||||
*vp = db_get_value((db_addr_t)&fp->f_ ## name ## [num], \
|
||||
|
Loading…
Reference in New Issue
Block a user