Skip to content

Commit

Permalink
sh: Fix ptrace hw_breakpoint handling
Browse files Browse the repository at this point in the history
Since commit 34d0b5a it is no longer
possible to debug an application using singlestep. The old commit
converted singlestep handling via ptrace to hw_breakpoints. The
hw_breakpoint is disabled when an event is triggered and not re-enabled
again. This patch re-enables the existing hw_breakpoint before the
existing breakpoint is reused.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
Cc: stable@kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
David Engraf authored and Paul Mundt committed Mar 23, 2011
1 parent c49b6ec commit fb7f045
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sh/kernel/ptrace_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr)

attr = bp->attr;
attr.bp_addr = addr;
/* reenable breakpoint */
attr.disabled = false;
err = modify_user_hw_breakpoint(bp, &attr);
if (unlikely(err))
return err;
Expand Down

0 comments on commit fb7f045

Please sign in to comment.