Skip to content

Commit

Permalink
MN10300: Make the kernel jump into gdbstub on a BUG
Browse files Browse the repository at this point in the history
Make the kernel jump into gdbstub (if configured) on a BUG with the register
set from the BUG rather than interpolating another illegal instruction and
leaving gdbstub's idea of the process counter in unsupported_syscall() where
the original BUG was detected.

With this patch, gdbstub reports a SIGABRT to the compiler and reports the
program counter at the original BUG, allowing the execution state at the time
of the BUG to be examined with GDB.

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and Linus Torvalds committed Feb 19, 2008
1 parent 5efe92c commit aa409e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mn10300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static asmlinkage void unsupported_syscall(struct pt_regs *regs,
if (code == EXCEP_SYSCALL15 && !user_mode(regs)) {
if (report_bug(regs->pc, regs) == BUG_TRAP_TYPE_BUG) {
#ifdef CONFIG_GDBSTUB
__gdbstub_bug_trap();
gdbstub_intercept(regs, code);
#endif
}
}
Expand Down

0 comments on commit aa409e0

Please sign in to comment.