aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/kgdb_32.c6
-rw-r--r--arch/sparc/kernel/kgdb_64.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
index 04df4edc0073..539243b236fa 100644
--- a/arch/sparc/kernel/kgdb_32.c
+++ b/arch/sparc/kernel/kgdb_32.c
@@ -158,6 +158,12 @@ void kgdb_arch_exit(void)
158{ 158{
159} 159}
160 160
161void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
162{
163 regs->pc = ip;
164 regs->npc = regs->pc + 4;
165}
166
161struct kgdb_arch arch_kgdb_ops = { 167struct kgdb_arch arch_kgdb_ops = {
162 /* Breakpoint instruction: ta 0x7d */ 168 /* Breakpoint instruction: ta 0x7d */
163 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d }, 169 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
diff --git a/arch/sparc/kernel/kgdb_64.c b/arch/sparc/kernel/kgdb_64.c
index 0a2bd0f99fc1..768290a6c028 100644
--- a/arch/sparc/kernel/kgdb_64.c
+++ b/arch/sparc/kernel/kgdb_64.c
@@ -181,6 +181,12 @@ void kgdb_arch_exit(void)
181{ 181{
182} 182}
183 183
184void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
185{
186 regs->tpc = ip;
187 regs->tnpc = regs->tpc + 4;
188}
189
184struct kgdb_arch arch_kgdb_ops = { 190struct kgdb_arch arch_kgdb_ops = {
185 /* Breakpoint instruction: ta 0x72 */ 191 /* Breakpoint instruction: ta 0x72 */
186 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 }, 192 .gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },