From e969264bab4d0f30d0c4ee0d1bb410a078fe230b Mon Sep 17 00:00:00 2001 From: jhibbits Date: Fri, 23 Mar 2018 00:40:08 +0000 Subject: [PATCH] Debug interrupts aren't instruction traps The EXC_DEBUG type is akin to the MPC74xx "Instruction Breakpoint" trap. Don't treat it as a trap instruction. --- sys/powerpc/powerpc/trap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index 62030edeb9d4..609dd0090ade 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -189,7 +189,7 @@ frame_is_trap_inst(struct trapframe *frame) #ifdef AIM return (frame->exc == EXC_PGM && frame->srr1 & EXC_PGM_TRAP); #else - return (frame->exc == EXC_DEBUG || frame->cpu.booke.esr & ESR_PTR); + return ((frame->cpu.booke.esr & ESR_PTR) != 0); #endif } @@ -895,6 +895,7 @@ db_trap_glue(struct trapframe *frame) && (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC || frame_is_trap_inst(frame) || frame->exc == EXC_BPT + || frame->exc == EXC_DEBUG || frame->exc == EXC_DSI)) { int type = frame->exc;