mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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 088a7eef95, 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
This commit is contained in:
parent
088a7eef95
commit
e9bb4ce3d0
1 changed files with 2 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue