aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2021-01-02 23:07:04 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2021-01-02 23:07:04 +0000
commit65d1a4cfda73201e34768d881a0b9206d00d4a71 (patch)
tree6b92fb7d872d872d8ef874319e33bcae4dd1a78e /sys/mips
parenta3479cfd2217d133d49aa7159ea23faf901dc586 (diff)
downloadsrc-65d1a4cfda73201e34768d881a0b9206d00d4a71.tar.gz
src-65d1a4cfda73201e34768d881a0b9206d00d4a71.zip
Handle KDB_WHY_TRAP return on arm and mips
Upon exit from the debugger, checking the return code of kdb_trap() allows one to retry the fatal page fault. This matches what is done on all other architectures. Reviewed by: jhb (earlier version) Differential Revision: https://reviews.freebsd.org/D27535
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/mips/trap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c
index 78e7c0ed8113..96a2de4ee817 100644
--- a/sys/mips/mips/trap.c
+++ b/sys/mips/mips/trap.c
@@ -524,6 +524,9 @@ trap(struct trapframe *trapframe)
register_t pc;
int cop, error;
register_t *frame_regs;
+#ifdef KDB
+ bool handled;
+#endif
trapdebug_enter(trapframe, 0);
#ifdef KDB
@@ -1091,8 +1094,10 @@ err:
#ifdef KDB
if (debugger_on_trap) {
kdb_why = KDB_WHY_TRAP;
- kdb_trap(type, 0, trapframe);
+ handled = kdb_trap(type, 0, trapframe);
kdb_why = KDB_WHY_UNSET;
+ if (handled)
+ return (trapframe->pc);
}
#endif
panic("trap");