summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-20 23:03:56 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-07-20 23:03:56 +0000
commitb814ce8068472c8fa6e5bc512077cd5f677d643a (patch)
treed253226975578badb9fee710f49732ea44d34916 /sys
parente8e40f4842c8f136bca1f37e1388fa7f0145e7ad (diff)
Increment `db_active' before entering db_trap() like other archs do.
ok visa@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/m88k/m88k/db_interface.c4
-rw-r--r--sys/arch/powerpc/powerpc/trap.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/m88k/m88k/db_interface.c b/sys/arch/m88k/m88k/db_interface.c
index 72c512d2556..2931e23090b 100644
--- a/sys/arch/m88k/m88k/db_interface.c
+++ b/sys/arch/m88k/m88k/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.22 2017/04/30 16:45:45 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.23 2019/07/20 23:03:55 mpi Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -405,9 +405,11 @@ m88k_db_trap(type, frame)
ddb_regs = frame->tf_regs;
+ db_active++;
cnpollc(TRUE);
db_trap(type, 0);
cnpollc(FALSE);
+ db_active--;
frame->tf_regs = ddb_regs;
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c
index 6b308410f7a..e7b39f3191b 100644
--- a/sys/arch/powerpc/powerpc/trap.c
+++ b/sys/arch/powerpc/powerpc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.109 2019/07/09 23:48:08 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.110 2019/07/20 23:03:55 mpi Exp $ */
/* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */
/*
@@ -569,9 +569,11 @@ for (i = 0; i < errnum; i++) {
/* should check for correct byte here or panic */
#ifdef DDB
db_save_regs(frame);
+ db_active++;
cnpollc(TRUE);
db_trap(T_BREAKPOINT, 0);
cnpollc(FALSE);
+ db_active--;
#else
panic("trap EXC_PGM");
#endif