The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e9bb4ce3d0e714d35b12ffdc7ecb56cade01f4a0
commit e9bb4ce3d0e714d35b12ffdc7ecb56cade01f4a0 Author: mhorne <mho...@freebsd.org> AuthorDate: 2020-12-18 18:43:52 +0000 Commit: Mitchell Horne <mho...@freebsd.org> CommitDate: 2021-01-08 18:53:20 +0000 arm64: don't pass user trapframe to kdb_trap() This effectively undoes the changes made in r321571. While useful, it is inconsistent with how other architectures pass trapframes to kdb. This change is also required to get a working gdb(4) stub on arm64, as otherwise the backtrace will begin too early. As of 088a7eef95b1, this information can still be obtained via "show registers/u". Reviewed by: jhb (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Pull Request: https://reviews.freebsd.org/D27719 --- sys/arm64/arm64/trap.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 1330838148d2..12d10ff1d261 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -360,7 +360,6 @@ print_registers(struct trapframe *frame) void do_el1h_sync(struct thread *td, struct trapframe *frame) { - struct trapframe *oframe; uint32_t exception; uint64_t esr, far; int dfsc; @@ -378,18 +377,6 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", td, esr, frame->tf_elr, frame); - oframe = td->td_frame; - - switch (exception) { - case EXCP_BRK: - case EXCP_WATCHPT_EL1: - case EXCP_SOFTSTP_EL1: - break; - default: - td->td_frame = frame; - break; - } - switch (exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: @@ -429,18 +416,15 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) } #endif #ifdef KDB - kdb_trap(exception, 0, - (td->td_frame != NULL) ? td->td_frame : frame); + kdb_trap(exception, 0, frame); #else panic("No debugger in kernel.\n"); #endif - frame->tf_elr += 4; break; case EXCP_WATCHPT_EL1: case EXCP_SOFTSTP_EL1: #ifdef KDB - kdb_trap(exception, 0, - (td->td_frame != NULL) ? td->td_frame : frame); + kdb_trap(exception, 0, frame); #else panic("No debugger in kernel.\n"); #endif @@ -455,8 +439,6 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) panic("Unknown kernel exception %x esr_el1 %lx\n", exception, esr); } - - td->td_frame = oframe; } void _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"