summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-08-19 08:26:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-08-19 08:26:21 +0000
commit1ec561708aff35ace242a2d0c9b153cb2b219d90 (patch)
treedd9de4629af297f342a1224f592791680a231ffb /sys
parentca0cf0c3b379b813dbe437622ed6062142b315b3 (diff)
Make it possible to enter ddb from the serial console.
ok miod@, deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/macppc/db_interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/macppc/macppc/db_interface.c b/sys/arch/macppc/macppc/db_interface.c
index 6d686390fbb..db288ef2fb9 100644
--- a/sys/arch/macppc/macppc/db_interface.c
+++ b/sys/arch/macppc/macppc/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.7 2003/10/15 17:50:16 drahn Exp $ */
+/* $OpenBSD: db_interface.c,v 1.8 2008/08/19 08:26:20 kettenis Exp $ */
/* $NetBSD: db_interface.c,v 1.12 2001/07/22 11:29:46 wiz Exp $ */
#include <sys/param.h>
@@ -10,6 +10,8 @@
#include <machine/db_machdep.h>
#include <ddb/db_extern.h>
+int db_active = 0;
+
int ddb_trap_glue(struct trapframe *frame); /* called from locore */
void
@@ -31,9 +33,11 @@ ddb_trap_glue(struct trapframe *frame)
DDB_REGS->tf.srr0 = frame->srr0;
DDB_REGS->tf.srr1 = frame->srr1;
+ db_active++;
cnpollc(TRUE);
db_trap(T_BREAKPOINT, 0);
cnpollc(FALSE);
+ db_active--;
bcopy(DDB_REGS->tf.fixreg, frame->fixreg,
32 * sizeof(u_int32_t));