提交 3f0a55e3 编写于 作者: M Michal Simek 提交者: Jason Wessel

kgdb,powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE

kgdb_handle_breakpoint checks the first arch_kgdb_breakpoint
which is not known by gdb that's why is necessary jump over
it. The jump lenght is equal to BREAK_INSTR_SIZE that's
why is cleaner to use defined macro instead of hardcoded
non-described offset.
Signed-off-by: NMichal Simek <monstr@monstr.eu>
Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 62a0309c
......@@ -129,7 +129,7 @@ static int kgdb_handle_breakpoint(struct pt_regs *regs)
return 0;
if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr))
regs->nip += 4;
regs->nip += BREAK_INSTR_SIZE;
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册