aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid Engraf <david.engraf@sysgo.com>2011-03-23 11:35:42 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-27 11:36:13 -0700
commite30d586e1ec3a54ab8f573aa47f64cd5b5d29029 (patch)
treec84121963c9e07eaeae2b0e99e6a06991eff39f2 /arch
parenta65a0507b92ab78164cb5da23c9bad093d7ef2b7 (diff)
downloadlinux-2.6.38-lt-ux500-e30d586e1ec3a54ab8f573aa47f64cd5b5d29029.tar.gz
sh: Fix ptrace hw_breakpoint handling
commit fb7f045ace0624f1e59a7db8497e460bd54b1cbc upstream. 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> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-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 b53664ef53e..2130ca674e9 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)
attr = bp->attr;
attr.bp_addr = addr;
+ /* reenable breakpoint */
+ attr.disabled = false;
err = modify_user_hw_breakpoint(bp, &attr);
if (unlikely(err))
return err;