aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/traps.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-19 13:58:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-19 18:51:36 -0500
commitaa409e028c41137a659c02d0081ba57b701e7446 (patch)
treeefb9f213a00fa9e523cfe5c6456fec3a0d65231a /arch/mn10300/kernel/traps.c
parent5efe92c68045817b97927b748f369d407c1d89ab (diff)
MN10300: Make the kernel jump into gdbstub on a BUG
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 <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/kernel/traps.c')
-rw-r--r--arch/mn10300/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c
index 8b9dc6d9dcc6..fcb9a03d46a8 100644
--- a/arch/mn10300/kernel/traps.c
+++ b/arch/mn10300/kernel/traps.c
@@ -391,7 +391,7 @@ static asmlinkage void unsupported_syscall(struct pt_regs *regs,
391 if (code == EXCEP_SYSCALL15 && !user_mode(regs)) { 391 if (code == EXCEP_SYSCALL15 && !user_mode(regs)) {
392 if (report_bug(regs->pc, regs) == BUG_TRAP_TYPE_BUG) { 392 if (report_bug(regs->pc, regs) == BUG_TRAP_TYPE_BUG) {
393#ifdef CONFIG_GDBSTUB 393#ifdef CONFIG_GDBSTUB
394 __gdbstub_bug_trap(); 394 gdbstub_intercept(regs, code);
395#endif 395#endif
396 } 396 }
397 } 397 }