From b1287da5d8e63146aac5f97bf6ec3d851afb34f9 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 19 Aug 2008 08:26:20 +0000 Subject: [PATCH] Make it possible to enter ddb from the serial console. ok miod@, deraadt@ --- sys/arch/macppc/macppc/db_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 @@ -10,6 +10,8 @@ #include #include +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)); -- 2.20.1