Skip to content

Commit

Permalink
kgdb,powerpc: Replace hardcoded offset by BREAK_INSTR_SIZE
Browse files Browse the repository at this point in the history
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: Michal Simek <monstr@monstr.eu>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Michal Simek authored and Jason Wessel committed Aug 5, 2010
1 parent 62a0309 commit 3f0a55e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f0a55e

Please sign in to comment.