From: Stefani Seibold <stefani@seibold.net>
To: linux-kernel <linux-kernel@vger.kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] fix PPC floating point debug
Date: Fri, 27 Nov 2009 09:59:00 +0100 [thread overview]
Message-ID: <1259312340.9648.6.camel@wall-e> (raw)
The PPC architecture is unable to debug applications using hardware
floating point, because it would not save the floating point registers.
After returning from the debugger, the contents of register was
modified. This patch fix this bug.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
---
traps.c | 6 ++++++
1 file changed, 6 insertions(+)
--- linux-2.6.32-rc5/arch/powerpc/kernel/traps.c.orig 2009-11-27 09:47:37.989943124 +0100
+++ linux-2.6.32-rc5/arch/powerpc/kernel/traps.c 2009-11-27 09:47:41.088330825 +0100
@@ -559,6 +559,8 @@ void instruction_breakpoint_exception(st
return;
if (debugger_iabr_match(regs))
return;
+ if (regs->msr & MSR_FP)
+ giveup_fpu(current);
_exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip);
}
@@ -577,6 +579,8 @@ void __kprobes single_step_exception(str
if (debugger_sstep(regs))
return;
+ if (regs->msr & MSR_FP)
+ giveup_fpu(current);
_exception(SIGTRAP, regs, TRAP_TRACE, regs->nip);
}
@@ -834,6 +838,8 @@ void __kprobes program_check_exception(s
regs->nip += 4;
return;
}
+ if (regs->msr & MSR_FP)
+ giveup_fpu(current);
_exception(SIGTRAP, regs, TRAP_BRKPT, regs->nip);
return;
}
next reply other threads:[~2009-11-27 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 8:59 Stefani Seibold [this message]
2009-11-27 11:01 ` [PATCH] fix PPC floating point debug Benjamin Herrenschmidt
2009-11-27 12:44 ` Stefani Seibold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259312340.9648.6.camel@wall-e \
--to=stefani@seibold.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).