aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorDavid Engraf <david.engraf@sysgo.com>2011-03-23 07:35:42 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-03-23 09:18:25 -0400
commitfb7f045ace0624f1e59a7db8497e460bd54b1cbc (patch)
tree52e4ebc446dc2e506bffd1ee56fb5f9ce86cd02c /arch/sh
parentc49b6ecf0870e78fa40497cd8b142915c1d5c7c9 (diff)
sh: Fix ptrace hw_breakpoint handling
Since commit 34d0b5af50a063cded842716633501b38ff815fb 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>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/ptrace_32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index b53664ef53e8..2130ca674e9b 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -101,6 +101,8 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr)
101 101
102 attr = bp->attr; 102 attr = bp->attr;
103 attr.bp_addr = addr; 103 attr.bp_addr = addr;
104 /* reenable breakpoint */
105 attr.disabled = false;
104 err = modify_user_hw_breakpoint(bp, &attr); 106 err = modify_user_hw_breakpoint(bp, &attr);
105 if (unlikely(err)) 107 if (unlikely(err))
106 return err; 108 return err;