|
@@ -26,6 +26,7 @@
|
|
|
#include <linux/kgdb.h>
|
|
|
#include <linux/kdebug.h>
|
|
|
#include <linux/notifier.h>
|
|
|
+#include <linux/kdb.h>
|
|
|
|
|
|
#include <asm/bootinfo.h>
|
|
|
#include <asm/branch.h>
|
|
@@ -185,6 +186,11 @@ void show_stack(struct task_struct *task, unsigned long *sp)
|
|
|
regs.regs[29] = task->thread.reg29;
|
|
|
regs.regs[31] = 0;
|
|
|
regs.cp0_epc = task->thread.reg31;
|
|
|
+#ifdef CONFIG_KGDB_KDB
|
|
|
+ } else if (atomic_read(&kgdb_active) != -1 &&
|
|
|
+ kdb_current_regs) {
|
|
|
+ memcpy(®s, kdb_current_regs, sizeof(regs));
|
|
|
+#endif /* CONFIG_KGDB_KDB */
|
|
|
} else {
|
|
|
prepare_frametrace(®s);
|
|
|
}
|
|
@@ -360,6 +366,8 @@ void __noreturn die(const char * str, struct pt_regs * regs)
|
|
|
unsigned long dvpret = dvpe();
|
|
|
#endif /* CONFIG_MIPS_MT_SMTC */
|
|
|
|
|
|
+ notify_die(DIE_OOPS, str, (struct pt_regs *)regs, SIGSEGV, 0, 0);
|
|
|
+
|
|
|
console_verbose();
|
|
|
spin_lock_irq(&die_lock);
|
|
|
bust_spinlocks(1);
|
|
@@ -704,6 +712,11 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
|
|
|
siginfo_t info;
|
|
|
char b[40];
|
|
|
|
|
|
+#ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
|
|
|
+ if (kgdb_ll_trap(DIE_TRAP, str, regs, code, 0, 0) == NOTIFY_STOP)
|
|
|
+ return;
|
|
|
+#endif /* CONFIG_KGDB_LOW_LEVEL_TRAP */
|
|
|
+
|
|
|
if (notify_die(DIE_TRAP, str, regs, code, 0, 0) == NOTIFY_STOP)
|
|
|
return;
|
|
|
|