From be84f91cf4bf126f72771271e5ff462837d1bbd6 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 28 Nov 2017 11:04:47 +0000 Subject: [PATCH] When we exit the kernel debugger having entered because of a breakpoint instruction we need to jump over the instruction. Without this we will execute the same instruction again and enter into the debugger again. PR: 223917 Reported by: emaste MFC after: 1 week Sponsored by: DARPA, AFRL --- sys/arm64/arm64/trap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index b706f97852cf..482b9764fd02 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -323,7 +323,10 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) break; } #endif - /* FALLTHROUGH */ + kdb_trap(exception, 0, + (td->td_frame != NULL) ? td->td_frame : frame); + frame->tf_elr -= 4; + break; case EXCP_WATCHPT_EL1: case EXCP_SOFTSTP_EL1: #ifdef KDB