提交 c75fbb05 编写于 作者: J Jason Wessel

kgdb,sparc: Add in kgdb_arch_set_pc for sparc

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: NJason Wessel <jason.wessel@windriver.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
上级 4063eb5f
......@@ -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 },
......
......@@ -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 },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册