summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-01-04 21:14:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-01-04 21:14:36 +0000
commit9a39dbad38eec14f35f541cef78cd71d69ad695b (patch)
treec20955122c54aa90a95b9cdf468c6170329ace31
parenta489d26f9c81ec1e2b32444e6a158a7dc63fe84b (diff)
SET_PC_REGS, arches tested between me and miod.
-rw-r--r--sys/arch/alpha/include/db_machdep.h3
-rw-r--r--sys/arch/i386/include/db_machdep.h3
-rw-r--r--sys/arch/m68k/include/db_machdep.h3
-rw-r--r--sys/arch/mips64/include/db_machdep.h3
-rw-r--r--sys/arch/powerpc/include/db_machdep.h3
-rw-r--r--sys/arch/sparc/include/db_machdep.h7
-rw-r--r--sys/arch/sparc64/include/db_machdep.h7
-rw-r--r--sys/arch/vax/include/db_machdep.h3
8 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/alpha/include/db_machdep.h b/sys/arch/alpha/include/db_machdep.h
index 783bdd2e225..41ed3499b84 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.17 2004/01/22 17:47:03 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.18 2005/01/04 21:14:35 espie Exp $ */
/*
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
@@ -52,6 +52,7 @@ extern db_regs_t ddb_regs;
#define DDB_REGS (&ddb_regs)
#define PC_REGS(regs) ((db_addr_t)(regs)->tf_regs[FRAME_PC])
+#define SET_PC_REGS(regs, value) (regs)->tf_regs[FRAME_PC] = (unsigned long)(value)
/* Breakpoint related definitions */
#define BKPT_INST 0x00000080 /* call_pal bpt */
diff --git a/sys/arch/i386/include/db_machdep.h b/sys/arch/i386/include/db_machdep.h
index ef3996305a1..ac49fe52e91 100644
--- a/sys/arch/i386/include/db_machdep.h
+++ b/sys/arch/i386/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.13 2004/07/20 20:18:53 art Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.14 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.9 1996/05/03 19:23:59 christos Exp $ */
/*
@@ -46,6 +46,7 @@ db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
#define PC_REGS(regs) ((db_addr_t)(regs)->tf_eip)
+#define SET_PC_REGS(regs, value) (regs)->tf_eip = (int)(value)
#define BKPT_INST 0xcc /* breakpoint instruction */
#define BKPT_SIZE (1) /* size of breakpoint inst */
diff --git a/sys/arch/m68k/include/db_machdep.h b/sys/arch/m68k/include/db_machdep.h
index 3fc5355776d..5412577b53d 100644
--- a/sys/arch/m68k/include/db_machdep.h
+++ b/sys/arch/m68k/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.8 2002/03/14 01:26:34 millert Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.9 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.20 1997/06/26 01:26:58 thorpej Exp $ */
/*
@@ -53,6 +53,7 @@ extern db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
#define PC_REGS(regs) ((db_addr_t)(regs)->tf_pc)
+#define SET_PC_REGS(regs, value) (regs)->tf_pc = (unsigned int)(value)
#define BKPT_INST 0x4e4f /* breakpoint instruction */
#define BKPT_SIZE (2) /* size of breakpoint inst */
diff --git a/sys/arch/mips64/include/db_machdep.h b/sys/arch/mips64/include/db_machdep.h
index 54272538909..1c2885237ce 100644
--- a/sys/arch/mips64/include/db_machdep.h
+++ b/sys/arch/mips64/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.5 2004/09/21 05:51:13 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.6 2005/01/04 21:14:35 espie Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
@@ -54,6 +54,7 @@ db_addr_t next_instr_address __P((db_addr_t, boolean_t));
#define IS_WATCHPOINT_TRAP(type, code) (0) /* XXX mips3 watchpoint */
#define PC_REGS(regs) ((db_addr_t)(regs)->pc)
+#define SET_PC_REGS(regs, value) (regs)->pc = (register_t)(value)
#define DDB_REGS (&ddb_regs)
/*
diff --git a/sys/arch/powerpc/include/db_machdep.h b/sys/arch/powerpc/include/db_machdep.h
index f99cb963fe3..9b491d237bc 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.19 2003/12/21 15:17:30 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.20 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
@@ -53,6 +53,7 @@ extern db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
#define PC_REGS(regs) ((regs)->tf.srr0)
+#define SET_PC_REGS(regs, value) PC_REGS(regs) = (value)
#define BKPT_INST 0x7C810808 /* breakpoint instruction */
diff --git a/sys/arch/sparc/include/db_machdep.h b/sys/arch/sparc/include/db_machdep.h
index a9e63ac0bc5..06be774a2a7 100644
--- a/sys/arch/sparc/include/db_machdep.h
+++ b/sys/arch/sparc/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.10 2003/05/13 22:25:33 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.11 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.10 1997/08/31 21:23:40 pk Exp $ */
/*
@@ -56,11 +56,8 @@ extern db_regs_t ddb_regs; /* register state */
#define DDB_TF (&ddb_regs.db_tf)
#define DDB_FR (&ddb_regs.db_fr)
-#if defined(lint)
-#define PC_REGS(regs) ((regs)->db_tf.tf_pc)
-#else
#define PC_REGS(regs) ((db_addr_t)(regs)->db_tf.tf_pc)
-#endif
+#define SET_PC_REGS(regs, value) (regs)->db_tf.tf_pc = (int)(value)
#define PC_ADVANCE(regs) do { \
int n = (regs)->db_tf.tf_npc; \
(regs)->db_tf.tf_pc = n; \
diff --git a/sys/arch/sparc64/include/db_machdep.h b/sys/arch/sparc64/include/db_machdep.h
index 7fd7b4fab77..f0da0f7d7de 100644
--- a/sys/arch/sparc64/include/db_machdep.h
+++ b/sys/arch/sparc64/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.8 2003/02/12 06:32:59 jason Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.9 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.12 2001/07/07 15:16:13 eeh Exp $ */
/*
@@ -86,11 +86,8 @@ extern db_regs_t ddb_regs; /* register state */
#define DDB_FR (&ddb_regs.ddb_fr)
#define DDB_FP (&ddb_regs.ddb_fpstate)
-#if defined(lint)
-#define PC_REGS(regs) ((regs)->ddb_tf.tf_pc)
-#else
#define PC_REGS(regs) ((db_addr_t)(regs)->ddb_tf.tf_pc)
-#endif
+#define SET_PC_REGS(regs, value) (regs)->ddb_tf.tf_pc = (int32_t)(value)
#define PC_ADVANCE(regs) do { \
vaddr_t n = (regs)->ddb_tf.tf_npc; \
(regs)->ddb_tf.tf_pc = n; \
diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h
index aec47bb74d5..6ac6e275d12 100644
--- a/sys/arch/vax/include/db_machdep.h
+++ b/sys/arch/vax/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.9 2002/03/14 01:26:48 millert Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.10 2005/01/04 21:14:35 espie Exp $ */
/* $NetBSD: db_machdep.h,v 1.6 1998/08/10 14:33:33 ragge Exp $ */
/*
@@ -48,6 +48,7 @@ db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
#define PC_REGS(regs) ((db_addr_t)(regs)->pc)
+#define SET_PC_REGS(regs, value) (regs)->pc = (long)(value)
#define BKPT_INST 0x03 /* breakpoint instruction */
#define BKPT_SIZE (1) /* size of breakpoint inst */