Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/powerpc Add a db_active variable that indic...



details:   https://anonhg.NetBSD.org/src/rev/f9325c3426cb
branches:  trunk
changeset: 511598:f9325c3426cb
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Jun 22 11:40:41 2001 +0000

description:
Add a db_active variable that indicates if a call to the debugger is
active.  Seems to be required by the MI com driver nowadays.

diffstat:

 sys/arch/powerpc/powerpc/db_interface.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r 6420e8ad9dbb -r f9325c3426cb sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c   Fri Jun 22 11:37:49 2001 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c   Fri Jun 22 11:40:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.c,v 1.10 2001/06/13 06:01:50 simonb Exp $ */
+/*     $NetBSD: db_interface.c,v 1.11 2001/06/22 11:40:41 simonb Exp $ */
 /*     $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
 
 #define USERACC
@@ -10,6 +10,8 @@
 #include <sys/proc.h>
 #include <sys/systm.h>
 
+#include <dev/cons.h>
+
 #include <machine/db_machdep.h>
 #include <machine/frame.h>
 #ifdef PPC_IBM4XX
@@ -25,6 +27,8 @@
 #include <ddb/db_output.h>
 #include <ddb/ddbvar.h>
 
+int    db_active = 0;
+
 extern label_t *db_recover;
 
 void ddb_trap(void);                           /* Call into trap_subr.S */
@@ -104,7 +108,11 @@
        DDB_REGS->pid = frame->pid;
 #endif
 
+       db_active++;
+       cnpollc(1);
        db_trap(T_BREAKPOINT, 0);
+       cnpollc(0);
+       db_active--;
 
        bcopy(DDB_REGS->r, frame->fixreg, 32 * sizeof(u_int32_t));
        frame->srr0 = DDB_REGS->iar;



Home | Main Index | Thread Index | Old Index