diff options
| -rw-r--r-- | arch/sh/kernel/kgdb.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c index 70c69659b846..efb6d398dec3 100644 --- a/arch/sh/kernel/kgdb.c +++ b/arch/sh/kernel/kgdb.c | |||
| @@ -237,6 +237,18 @@ int kgdb_arch_handle_exception(int e_vector, int signo, int err_code, | |||
| 237 | return -1; | 237 | return -1; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs) | ||
| 241 | { | ||
| 242 | if (exception == 60) | ||
| 243 | return instruction_pointer(regs) - 2; | ||
| 244 | return instruction_pointer(regs); | ||
| 245 | } | ||
| 246 | |||
| 247 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) | ||
| 248 | { | ||
| 249 | regs->pc = ip; | ||
| 250 | } | ||
| 251 | |||
| 240 | /* | 252 | /* |
| 241 | * The primary entry points for the kgdb debug trap table entries. | 253 | * The primary entry points for the kgdb debug trap table entries. |
| 242 | */ | 254 | */ |
| @@ -247,7 +259,7 @@ BUILD_TRAP_HANDLER(singlestep) | |||
| 247 | 259 | ||
| 248 | local_irq_save(flags); | 260 | local_irq_save(flags); |
| 249 | regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); | 261 | regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); |
| 250 | kgdb_handle_exception(vec >> 2, SIGTRAP, 0, regs); | 262 | kgdb_handle_exception(0, SIGTRAP, 0, regs); |
| 251 | local_irq_restore(flags); | 263 | local_irq_restore(flags); |
| 252 | } | 264 | } |
| 253 | 265 | ||
