summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/db_machdep.h4
-rw-r--r--sys/arch/i386/include/db_machdep.h2
-rw-r--r--sys/arch/pc532/include/db_machdep.h2
-rw-r--r--sys/arch/powerpc/include/db_machdep.h4
-rw-r--r--sys/arch/vax/include/db_machdep.h2
-rw-r--r--sys/ddb/db_run.c4
6 files changed, 8 insertions, 10 deletions
diff --git a/sys/arch/alpha/include/db_machdep.h b/sys/arch/alpha/include/db_machdep.h
index 7a5aadc64b6..d3eaf612c83 100644
--- a/sys/arch/alpha/include/db_machdep.h
+++ b/sys/arch/alpha/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.3 1996/10/30 22:38:58 niklas Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.4 1997/03/21 00:48:43 niklas Exp $ */
/* $NetBSD: db_machdep.h,v 1.2 1996/07/11 05:31:31 cgd Exp $ */
/*
@@ -52,6 +52,6 @@ db_regs_t ddb_regs; /* register state */
#define BKPT_SIZE (4) /* size of breakpoint inst */
#define BKPT_SET(inst) (BKPT_INST)
-#define FIXUP_PC_AFTER_BREAK ddb_regs.tf_regs[FRAME_PC] -= BKPT_SIZE;
+#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf_regs[FRAME_PC] -= BKPT_SIZE)
#endif /* _ALPHA_DB_MACHDEP_H_ */
diff --git a/sys/arch/i386/include/db_machdep.h b/sys/arch/i386/include/db_machdep.h
index a2d26ded1f0..e14392d5309 100644
--- a/sys/arch/i386/include/db_machdep.h
+++ b/sys/arch/i386/include/db_machdep.h
@@ -50,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 -= BKPT_SIZE;
+#define FIXUP_PC_AFTER_BREAK(regs) ((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)
diff --git a/sys/arch/pc532/include/db_machdep.h b/sys/arch/pc532/include/db_machdep.h
index a20ea5465d0..cfff2199bf5 100644
--- a/sys/arch/pc532/include/db_machdep.h
+++ b/sys/arch/pc532/include/db_machdep.h
@@ -72,8 +72,6 @@ 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.pc -= 1; */
-
#define db_clear_single_step(regs) ((regs)->psr &= ~PSR_T)
#define db_set_single_step(regs) ((regs)->psr |= PSR_T)
diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h
index da7ae99fab6..ffa033ee78d 100644
--- a/sys/arch/powerpc/include/db_machdep.h
+++ b/sys/arch/powerpc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.1 1996/12/28 06:09:17 rahnds Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.2 1997/03/21 00:48:48 niklas Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -89,7 +89,7 @@ db_regs_t ddb_regs; /* register state */
#define BKPT_SIZE (4) /* size of breakpoint inst */
#define BKPT_SET(inst) (BKPT_INST)
-#define FIXUP_PC_AFTER_BREAK ddb_regs.iar -= 4;
+#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->iar -= 4)
#define SR_SINGLESTEP 0x8000
#define db_clear_single_step(regs) ((regs)->msr &= ~SR_SINGLESTEP)
diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h
index 1cbaa2c5d43..d69f9a4874a 100644
--- a/sys/arch/vax/include/db_machdep.h
+++ b/sys/arch/vax/include/db_machdep.h
@@ -51,7 +51,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.pc -= BKPT_SIZE;
+#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->pc -= BKPT_SIZE)
#define db_clear_single_step(regs) ((regs)->psl &= ~PSL_T)
#define db_set_single_step(regs) ((regs)->psl |= PSL_T)
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c
index c6fc8817abf..dadb804dbbf 100644
--- a/sys/ddb/db_run.c
+++ b/sys/ddb/db_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_run.c,v 1.4 1996/04/21 22:19:10 deraadt Exp $ */
+/* $OpenBSD: db_run.c,v 1.5 1997/03/21 00:48:41 niklas Exp $ */
/* $NetBSD: db_run.c,v 1.8 1996/02/05 01:57:12 christos Exp $ */
/*
@@ -79,7 +79,7 @@ db_stop_at_pc(regs, is_breakpoint)
* Breakpoint trap. Fix up the PC if the
* machine requires it.
*/
- FIXUP_PC_AFTER_BREAK
+ FIXUP_PC_AFTER_BREAK(regs);
pc = PC_REGS(regs);
}
#endif