From b814ce8068472c8fa6e5bc512077cd5f677d643a Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sat, 20 Jul 2019 23:03:56 +0000 Subject: Increment `db_active' before entering db_trap() like other archs do. ok visa@ --- sys/arch/m88k/m88k/db_interface.c | 4 +++- sys/arch/powerpc/powerpc/trap.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3