kgdb,sparc: Add in kgdb_arch_set_pc for sparc
authorJason Wessel <jason.wessel@windriver.com>
Fri, 21 May 2010 02:04:19 +0000 (21:04 -0500)
committerJason Wessel <jason.wessel@windriver.com>
Fri, 21 May 2010 02:04:19 +0000 (21:04 -0500)
The new debug core api requires all architectures that use to debug
core to implement a function to set the program counter.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/kgdb_32.c
arch/sparc/kernel/kgdb_64.c

index 04df4edc00738c3b74cabaa9e83f1cd2740af3f2..539243b236fa4c1400ed827aef7eb264b5c2693b 100644 (file)
@@ -158,6 +158,12 @@ void kgdb_arch_exit(void)
 {
 }
 
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+       regs->pc = ip;
+       regs->npc = regs->pc + 4;
+}
+
 struct kgdb_arch arch_kgdb_ops = {
        /* Breakpoint instruction: ta 0x7d */
        .gdb_bpt_instr          = { 0x91, 0xd0, 0x20, 0x7d },
index 0a2bd0f99fc1a3ce5d867d130bfc4085daaac503..768290a6c028a65d61bd5e356ba58549f8fdde4f 100644 (file)
@@ -181,6 +181,12 @@ void kgdb_arch_exit(void)
 {
 }
 
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+       regs->tpc = ip;
+       regs->tnpc = regs->tpc + 4;
+}
+
 struct kgdb_arch arch_kgdb_ops = {
        /* Breakpoint instruction: ta 0x72 */
        .gdb_bpt_instr          = { 0x91, 0xd0, 0x20, 0x72 },