summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-02-06 20:46:14 +0000
committermarcel <marcel@FreeBSD.org>2010-02-06 20:46:14 +0000
commita85ee262b8a3566bf6a2a052487b3ae7103bee6b (patch)
treea75588ccb75ac614b360665de6b40674b30e3ea3
parent418133299a436bd57451b522e1f9e62a7b322588 (diff)
downloadFreeBSD-src-a85ee262b8a3566bf6a2a052487b3ae7103bee6b.zip
FreeBSD-src-a85ee262b8a3566bf6a2a052487b3ae7103bee6b.tar.gz
Fix single-stepping when the kernel was entered through the EPC syscall
path. When the taken branch leaves the kernel and enters the process, we still need to execute the instruction at that address. Don't raise SIGTRAP when we branch into the process, but enable single-stepping instead.
-rw-r--r--sys/ia64/ia64/trap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c
index 4e38b5e..6264462 100644
--- a/sys/ia64/ia64/trap.c
+++ b/sys/ia64/ia64/trap.c
@@ -803,7 +803,7 @@ trap(int vector, struct trapframe *tf)
* out of the gateway page we'll get back into the kernel
* and then we enable single stepping.
* Since this a rather round-about way of enabling single
- * stepping, don't make things complicated even more by
+ * stepping, don't make things even more complicated by
* calling userret() and do_ast(). We do that later...
*/
tf->tf_special.psr &= ~IA64_PSR_LP;
@@ -814,13 +814,14 @@ trap(int vector, struct trapframe *tf)
/*
* Don't assume there aren't any branches other than the
* branch that takes us out of the gateway page. Check the
- * iip and raise SIGTRAP only when it's an user address.
+ * iip and enable single stepping only when it's an user
+ * address.
*/
if (tf->tf_special.iip >= VM_MAX_ADDRESS)
return;
tf->tf_special.psr &= ~IA64_PSR_TB;
- sig = SIGTRAP;
- break;
+ tf->tf_special.psr |= IA64_PSR_SS;
+ return;
case IA64_VEC_IA32_EXCEPTION:
case IA64_VEC_IA32_INTERCEPT:
OpenPOWER on IntegriCloud