Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha Just access the trapframe directly for DDB re...



details:   https://anonhg.NetBSD.org/src/rev/81eca94c7402
branches:  trunk
changeset: 499538:81eca94c7402
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Nov 22 02:25:52 2000 +0000

description:
Just access the trapframe directly for DDB registers.

diffstat:

 sys/arch/alpha/alpha/db_interface.c |  11 +++++++----
 sys/arch/alpha/include/db_machdep.h |   6 +++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (66 lines):

diff -r e0fb793b8628 -r 81eca94c7402 sys/arch/alpha/alpha/db_interface.c
--- a/sys/arch/alpha/alpha/db_interface.c       Wed Nov 22 02:03:48 2000 +0000
+++ b/sys/arch/alpha/alpha/db_interface.c       Wed Nov 22 02:25:52 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.10 2000/11/22 02:03:48 thorpej Exp $ */
+/* $NetBSD: db_interface.c,v 1.11 2000/11/22 02:25:52 thorpej Exp $ */
 
 /* 
  * Mach Operating System
@@ -51,7 +51,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.10 2000/11/22 02:03:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.11 2000/11/22 02:25:52 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -86,6 +86,8 @@
 
 int    db_active = 0;
 
+db_regs_t *ddb_regp;
+
 void   db_mach_halt __P((db_expr_t, int, db_expr_t, char *));
 void   db_mach_reboot __P((db_expr_t, int, db_expr_t, char *));
 
@@ -187,7 +189,8 @@
         * alpha_debug() switches us to the debugger stack.
         */
 
-       ddb_regs = *regs;
+       /* Our register state is simply the trapframe. */
+       ddb_regp = regs;
 
        s = splhigh();
 
@@ -201,7 +204,7 @@
 
        splx(s);
 
-       *regs = ddb_regs;
+       ddb_regp = NULL;
 
        /*
         * Tell caller "We HAVE handled the trap."
diff -r e0fb793b8628 -r 81eca94c7402 sys/arch/alpha/include/db_machdep.h
--- a/sys/arch/alpha/include/db_machdep.h       Wed Nov 22 02:03:48 2000 +0000
+++ b/sys/arch/alpha/include/db_machdep.h       Wed Nov 22 02:25:52 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.h,v 1.11 2000/06/29 09:02:57 mrg Exp $ */
+/* $NetBSD: db_machdep.h,v 1.12 2000/11/22 02:25:52 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -42,8 +42,8 @@
 typedef        long            db_expr_t;      /* expression - signed */
 
 typedef struct trapframe db_regs_t;
-db_regs_t              ddb_regs;       /* register state */
-#define        DDB_REGS        (&ddb_regs)
+extern db_regs_t       *ddb_regp;      /* pointer to current register state */
+#define        DDB_REGS        (ddb_regp)
 
 #define        PC_REGS(regs)   ((db_addr_t)(regs)->tf_regs[FRAME_PC])
 



Home | Main Index | Thread Index | Old Index