From 701c0f0058d872a85a36204ee0e1539c48fac5f7 Mon Sep 17 00:00:00 2001 From: mycroft Date: Sun, 9 Oct 1994 13:27:07 +0000 Subject: [PATCH] Eliminate i386_saved_state. --- sys/arch/i386/i386/db_interface.c | 10 +++++----- sys/arch/i386/i386/db_trace.c | 8 ++++---- sys/arch/i386/include/db_machdep.h | 9 +++------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/sys/arch/i386/i386/db_interface.c b/sys/arch/i386/i386/db_interface.c index 647f15719c6b..1c8562082f0f 100644 --- a/sys/arch/i386/i386/db_interface.c +++ b/sys/arch/i386/i386/db_interface.c @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * From: db_interface.c,v 2.4 1991/02/05 17:11:13 mrt (CMU) - * $Id: db_interface.c,v 1.11 1994/10/09 13:09:11 mycroft Exp $ + * $Id: db_interface.c,v 1.12 1994/10/09 13:27:07 mycroft Exp $ */ /* @@ -49,7 +49,7 @@ int db_active = 0; * Received keyboard interrupt sequence. */ kdb_kbd_trap(regs) - struct i386_saved_state *regs; + db_regs_t *regs; { if (db_active == 0 && (boothowto & RB_KDB)) { printf("\n\nkernel: keyboard interrupt\n"); @@ -61,8 +61,8 @@ kdb_kbd_trap(regs) * kdb_trap - field a TRACE or BPT trap */ kdb_trap(type, code, regs) - int type, code; - register struct i386_saved_state *regs; + int type, code; + register db_regs_t *regs; { int s; @@ -138,7 +138,7 @@ extern int trap_types; * Print trap reason. */ kdbprinttrap(type, code) - int type, code; + int type, code; { printf("kernel: "); if (type >= trap_types || type < 0) diff --git a/sys/arch/i386/i386/db_trace.c b/sys/arch/i386/i386/db_trace.c index e18927904e3c..5fdf6f9bff08 100644 --- a/sys/arch/i386/i386/db_trace.c +++ b/sys/arch/i386/i386/db_trace.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_trace.c,v 1.8 1994/10/09 12:57:13 mycroft Exp $ + * $Id: db_trace.c,v 1.9 1994/10/09 13:27:09 mycroft Exp $ */ #include @@ -134,7 +134,7 @@ db_nextframe(fp, ip, argp, is_trap) int *argp; /* in */ int is_trap; /* in */ { - struct i386_saved_state *saved_regs; + db_regs_t *saved_regs; switch (is_trap) { case 0: @@ -150,10 +150,10 @@ db_nextframe(fp, ip, argp, is_trap) * it is an (int *). */ #if 0 - saved_regs = (struct i386_saved_state *) + saved_regs = (db_regs_t *) db_get_value((int)argp, 4, FALSE); #endif - saved_regs = (struct i386_saved_state *)argp; + saved_regs = (db_regs_t *)argp; db_printf("--- trap (number %d) ---\n", saved_regs->tf_trapno & 0xffff); db_printsym(saved_regs->tf_eip, DB_STGY_XTRN); diff --git a/sys/arch/i386/include/db_machdep.h b/sys/arch/i386/include/db_machdep.h index 415416e04363..9d157dc101e7 100644 --- a/sys/arch/i386/include/db_machdep.h +++ b/sys/arch/i386/include/db_machdep.h @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. * - * $Id: db_machdep.h,v 1.5 1994/04/03 22:31:01 mycroft Exp $ + * $Id: db_machdep.h,v 1.6 1994/10/09 13:29:11 mycroft Exp $ */ #ifndef _I386_DB_MACHDEP_H_ @@ -37,13 +37,10 @@ #include #include -#define i386_saved_state trapframe -/* end of mangling */ - typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef int db_expr_t; /* expression - signed */ -typedef struct i386_saved_state db_regs_t; +typedef struct trapframe db_regs_t; db_regs_t ddb_regs; /* register state */ #define DDB_REGS (&ddb_regs) @@ -53,7 +50,7 @@ db_regs_t ddb_regs; /* register state */ #define BKPT_SIZE (1) /* size of breakpoint inst */ #define BKPT_SET(inst) (BKPT_INST) -#define FIXUP_PC_AFTER_BREAK ddb_regs.tf_eip -= 1; +#define FIXUP_PC_AFTER_BREAK (ddb_regs.tf_eip -= BKPT_SIZE) #define db_clear_single_step(regs) ((regs)->tf_eflags &= ~PSL_T) #define db_set_single_step(regs) ((regs)->tf_eflags |= PSL_T)