Author: andrew
Date: Tue Aug 25 16:49:10 2015
New Revision: 287134
URL: https://svnweb.freebsd.org/changeset/base/287134
Log:
Call into kdb on a data abort when it's enabled. This is needed to
correctly handle trying to access an invalid address in the debugger.
While here document that the breakpoint handler is supposed to fall
through to the following case.
Sponsored by: ABT Systems Ltd
Modified:
head/sys/arm64/arm64/trap.c
Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c Tue Aug 25 16:43:32 2015 (r287133)
+++ head/sys/arm64/arm64/trap.c Tue Aug 25 16:49:10 2015 (r287134)
@@ -155,6 +155,13 @@ data_abort(struct trapframe *frame, uint
uint64_t far;
int error, sig, ucode;
+#ifdef KDB
+ if (kdb_active) {
+ kdb_reenter();
+ return;
+ }
+#endif
+
td = curthread;
pcb = td->td_pcb;
@@ -221,6 +228,11 @@ data_abort(struct trapframe *frame, uint
frame->tf_elr = pcb->pcb_onfault;
return;
}
+#ifdef KDB
+ if (debugger_on_panic || kdb_active)
+ if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame))
+ return;
+#endif
panic("vm_fault failed: %lx", frame->tf_elr);
}
}
@@ -293,6 +305,7 @@ do_el1h_sync(struct trapframe *frame)
break;
}
#endif
+ /* FALLTHROUGH */
case EXCP_WATCHPT_EL1:
case EXCP_SOFTSTP_EL1:
#ifdef KDB
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"