ChangeSet 1.2085, 2005/03/12 09:17:17-08:00, [EMAIL PROTECTED]
[PATCH] PA-RISC signal handler fix
Fix singlestepping into a signal handler
Signed-off-by: Randolph Chung <[EMAIL PROTECTED]>
Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
signal.c | 13 +++++++++++++
1 files changed, 13 insertions(+)
diff -Nru a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
--- a/arch/parisc/kernel/signal.c 2005-03-12 21:44:39 -08:00
+++ b/arch/parisc/kernel/signal.c 2005-03-12 21:44:39 -08:00
@@ -32,6 +32,7 @@
#include <asm/uaccess.h>
#include <asm/pgalloc.h>
#include <asm/cacheflush.h>
+#include <asm/offsets.h>
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
@@ -442,6 +443,18 @@
if(personality(current->personality) == PER_LINUX)
psw |= PSW_W;
#endif
+
+ /* If we are singlestepping, arrange a trap to be delivered
+ when we return to userspace. Note the semantics -- we
+ should trap before the first insn in the handler is
+ executed. Ref:
+ http://sources.redhat.com/ml/gdb/2004-11/msg00245.html
+ */
+ if (pa_psw(current)->r) {
+ pa_psw(current)->r = 0;
+ psw |= PSW_R;
+ mtctl(-1, 0);
+ }
regs->gr[0] = psw;
regs->iaoq[0] = haddr | 3;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html