X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=arch%2Fsh%2Fkernel%2Fkgdb.c;fp=arch%2Fsh%2Fkernel%2Fkgdb.c;h=efb6d398dec3b9f2a1beacc8c279b8bfd1c5c6d6;hb=489022cc86ec8817a30226d00d35c67d74dd24a0;hp=70c69659b8466b50ce8f3f4773f42320e765f176;hpb=c75fbb05b523571c0fdc48d4b968b73f0e20acbb;p=sfrench%2Fcifs-2.6.git 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, return -1; } +unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs) +{ + if (exception == 60) + return instruction_pointer(regs) - 2; + return instruction_pointer(regs); +} + +void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) +{ + regs->pc = ip; +} + /* * The primary entry points for the kgdb debug trap table entries. */ @@ -247,7 +259,7 @@ BUILD_TRAP_HANDLER(singlestep) local_irq_save(flags); regs->pc -= instruction_size(__raw_readw(regs->pc - 4)); - kgdb_handle_exception(vec >> 2, SIGTRAP, 0, regs); + kgdb_handle_exception(0, SIGTRAP, 0, regs); local_irq_restore(flags); }