summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-01-07 16:22:19 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-01-07 16:22:19 +0000
commit4b61e05ca52398a28eb03b42d1e349308ed2c5c6 (patch)
tree092914a1e5ac13b6729c0aabeb9d74e46421f017
parenta61e5fcf128d43d039e5539272ef4b405648790a (diff)
Remove duplicate definitions with MI ddb headers, and fix db_stack_trace_print
prototype in the process.
-rw-r--r--sys/arch/mvme88k/ddb/db_interface.c8
-rw-r--r--sys/arch/mvme88k/ddb/db_trace.c22
-rw-r--r--sys/arch/mvme88k/include/db_machdep.h3
3 files changed, 12 insertions, 21 deletions
diff --git a/sys/arch/mvme88k/ddb/db_interface.c b/sys/arch/mvme88k/ddb/db_interface.c
index fc725af659e..64e20996811 100644
--- a/sys/arch/mvme88k/ddb/db_interface.c
+++ b/sys/arch/mvme88k/ddb/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.34 2004/01/02 17:08:55 miod Exp $ */
+/* $OpenBSD: db_interface.c,v 1.35 2004/01/07 16:22:17 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -54,7 +54,6 @@
#include <ddb/db_sym.h>
extern label_t *db_recover;
-extern unsigned int db_maxoff;
extern unsigned db_trace_get_val(vaddr_t, unsigned *);
extern int frame_is_sane(db_regs_t *);
extern void cnpollc(int);
@@ -81,9 +80,8 @@ void m88k_db_translate(db_expr_t, int, db_expr_t, char *);
void m88k_db_cmmucfg(db_expr_t, int, db_expr_t, char *);
void m88k_db_prom_cmd(db_expr_t, int, db_expr_t, char *);
-int db_active = 0;
-int db_noisy = 0;
-int quiet_db_read_bytes = 0;
+int db_active;
+int db_noisy;
db_regs_t ddb_regs;
diff --git a/sys/arch/mvme88k/ddb/db_trace.c b/sys/arch/mvme88k/ddb/db_trace.c
index 925b883ac43..d70d5c31cb1 100644
--- a/sys/arch/mvme88k/ddb/db_trace.c
+++ b/sys/arch/mvme88k/ddb/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.21 2003/12/21 13:23:32 miod Exp $ */
+/* $OpenBSD: db_trace.c,v 1.22 2004/01/07 16:22:17 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -29,7 +29,7 @@
#include <sys/param.h>
#include <sys/systm.h>
-#include <machine/db_machdep.h> /* lots of stuff */
+#include <machine/db_machdep.h>
#include <machine/locore.h>
#include <ddb/db_variables.h> /* db_variable, DB_VAR_GET, etc. */
@@ -37,6 +37,7 @@
#include <ddb/db_sym.h> /* DB_STGY_PROC, etc. */
#include <ddb/db_command.h> /* db_recover */
#include <ddb/db_access.h>
+#include <ddb/db_interface.h>
union instruction {
unsigned rawbits;
@@ -99,8 +100,6 @@ static inline unsigned br_dest(unsigned addr, union instruction inst)
int frame_is_sane(db_regs_t *regs);
char *m88k_exception_name(unsigned vector);
unsigned db_trace_get_val(vaddr_t addr, unsigned *ptr);
-void db_stack_trace_print(db_regs_t *addr, int have_addr,
- db_expr_t count, char *modif, int (*pr)(const char *, ...));
/*
* Some macros to tell if the given text is the instruction.
@@ -139,7 +138,7 @@ static int trace_flags = 0;
#endif
extern label_t *db_recover;
-extern int quiet_db_read_bytes;
+
/*
* m88k trace/register state interface for ddb.
*/
@@ -372,23 +371,17 @@ db_trace_get_val(vaddr_t addr, unsigned *ptr)
{
label_t db_jmpbuf;
label_t *prev = db_recover;
- boolean_t old_quiet_db_read_bytes = quiet_db_read_bytes;
-
- quiet_db_read_bytes = 1;
if (setjmp((db_recover = &db_jmpbuf)) != 0) {
db_recover = prev;
- quiet_db_read_bytes = old_quiet_db_read_bytes;
return 0;
} else {
db_read_bytes(addr, 4, (char *)ptr);
db_recover = prev;
- quiet_db_read_bytes = old_quiet_db_read_bytes;
return 1;
}
}
-
#define FIRST_CALLPRESERVED_REG 14
#define LAST_CALLPRESERVED_REG 29
#define FIRST_ARG_REG 2
@@ -1005,7 +998,7 @@ db_stack_trace_cmd2(db_regs_t *regs, int (*pr)(const char *, ...))
* printed.
*/
void
-db_stack_trace_print(db_regs_t *addr,
+db_stack_trace_print(db_expr_t addr,
int have_addr,
db_expr_t count,
char *modif,
@@ -1018,9 +1011,10 @@ db_stack_trace_print(db_regs_t *addr,
db_regs_t *regs;
union {
db_regs_t *frame;
- unsigned num;
+ db_expr_t num;
} arg;
- arg.frame = addr;
+
+ arg.num = addr;
trace_flags = 0; /* flags will be set via modifers */
diff --git a/sys/arch/mvme88k/include/db_machdep.h b/sys/arch/mvme88k/include/db_machdep.h
index 38e5996f31d..b8a56442e40 100644
--- a/sys/arch/mvme88k/include/db_machdep.h
+++ b/sys/arch/mvme88k/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.25 2003/12/21 13:23:34 miod Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.26 2004/01/07 16:22:18 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -90,7 +90,6 @@ extern db_regs_t ddb_regs; /* register state */
#define DDB_REGS (&ddb_regs)
extern int db_noisy;
-extern int quiet_db_read_bytes;
unsigned inst_load(unsigned);
unsigned inst_store(unsigned);