* [PATCH] sh: Fix ptrace hw_breakpoint handling
@ 2011-03-23 11:35 David Engraf
2011-03-23 13:25 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: David Engraf @ 2011-03-23 11:35 UTC (permalink / raw)
To: linux-sh
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
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>
[-- Attachment #2: sh-fix-hw-breakpoint-usage.patch --]
[-- Type: text/x-diff, Size: 443 bytes --]
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 90a15d2..e3bd670 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sh: Fix ptrace hw_breakpoint handling
2011-03-23 11:35 [PATCH] sh: Fix ptrace hw_breakpoint handling David Engraf
@ 2011-03-23 13:25 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2011-03-23 13:25 UTC (permalink / raw)
To: linux-sh
On Wed, Mar 23, 2011 at 12:35:42PM +0100, David Engraf wrote:
> 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>
>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-23 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 11:35 [PATCH] sh: Fix ptrace hw_breakpoint handling David Engraf
2011-03-23 13:25 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).