aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/kernel/gdb-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/kernel/gdb-stub.c')
-rw-r--r--arch/mn10300/kernel/gdb-stub.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c
index 1e8f24f00637..538266b2c9bc 100644
--- a/arch/mn10300/kernel/gdb-stub.c
+++ b/arch/mn10300/kernel/gdb-stub.c
@@ -1173,7 +1173,7 @@ int gdbstub_clear_breakpoint(u8 *addr, int len)
1173 1173
1174/* 1174/*
1175 * This function does all command processing for interfacing to gdb 1175 * This function does all command processing for interfacing to gdb
1176 * - returns 1 if the exception should be skipped, 0 otherwise. 1176 * - returns 0 if the exception should be skipped, -ERROR otherwise.
1177 */ 1177 */
1178static int gdbstub(struct pt_regs *regs, enum exception_code excep) 1178static int gdbstub(struct pt_regs *regs, enum exception_code excep)
1179{ 1179{
@@ -1188,7 +1188,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
1188 int loop; 1188 int loop;
1189 1189
1190 if (excep == EXCEP_FPU_DISABLED) 1190 if (excep == EXCEP_FPU_DISABLED)
1191 return 0; 1191 return -ENOTSUPP;
1192 1192
1193 gdbstub_flush_caches = 0; 1193 gdbstub_flush_caches = 0;
1194 1194
@@ -1197,7 +1197,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
1197 asm volatile("mov mdr,%0" : "=d"(mdr)); 1197 asm volatile("mov mdr,%0" : "=d"(mdr));
1198 local_save_flags(epsw); 1198 local_save_flags(epsw);
1199 arch_local_change_intr_mask_level( 1199 arch_local_change_intr_mask_level(
1200 NUM2EPSW_IM(CONFIG_GDBSTUB_IRQ_LEVEL + 1)); 1200 NUM2EPSW_IM(CONFIG_DEBUGGER_IRQ_LEVEL + 1));
1201 1201
1202 gdbstub_store_fpu(); 1202 gdbstub_store_fpu();
1203 1203
@@ -1675,14 +1675,23 @@ done:
1675 touch_softlockup_watchdog(); 1675 touch_softlockup_watchdog();
1676 1676
1677 local_irq_restore(epsw); 1677 local_irq_restore(epsw);
1678 return 1; 1678 return 0;
1679}
1680
1681/*
1682 * Determine if we hit a debugger special breakpoint that needs skipping over
1683 * automatically.
1684 */
1685int at_debugger_breakpoint(struct pt_regs *regs)
1686{
1687 return 0;
1679} 1688}
1680 1689
1681/* 1690/*
1682 * handle event interception 1691 * handle event interception
1683 */ 1692 */
1684asmlinkage int gdbstub_intercept(struct pt_regs *regs, 1693asmlinkage int debugger_intercept(enum exception_code excep,
1685 enum exception_code excep) 1694 int signo, int si_code, struct pt_regs *regs)
1686{ 1695{
1687 static u8 notfirst = 1; 1696 static u8 notfirst = 1;
1688 int ret; 1697 int ret;
@@ -1696,7 +1705,7 @@ asmlinkage int gdbstub_intercept(struct pt_regs *regs,
1696 asm("mov mdr,%0" : "=d"(mdr)); 1705 asm("mov mdr,%0" : "=d"(mdr));
1697 1706
1698 gdbstub_entry( 1707 gdbstub_entry(
1699 "--> gdbstub_intercept(%p,%04x) [MDR=%lx PC=%lx]\n", 1708 "--> debugger_intercept(%p,%04x) [MDR=%lx PC=%lx]\n",
1700 regs, excep, mdr, regs->pc); 1709 regs, excep, mdr, regs->pc);
1701 1710
1702 gdbstub_entry( 1711 gdbstub_entry(
@@ -1730,7 +1739,7 @@ asmlinkage int gdbstub_intercept(struct pt_regs *regs,
1730 1739
1731 ret = gdbstub(regs, excep); 1740 ret = gdbstub(regs, excep);
1732 1741
1733 gdbstub_entry("<-- gdbstub_intercept()\n"); 1742 gdbstub_entry("<-- debugger_intercept()\n");
1734 gdbstub_busy = 0; 1743 gdbstub_busy = 0;
1735 return ret; 1744 return ret;
1736} 1745}