summaryrefslogtreecommitdiffstats
path: root/sys/cddl/dev/dtrace/i386/dtrace_isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl/dev/dtrace/i386/dtrace_isa.c')
-rw-r--r--sys/cddl/dev/dtrace/i386/dtrace_isa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/cddl/dev/dtrace/i386/dtrace_isa.c b/sys/cddl/dev/dtrace/i386/dtrace_isa.c
index 3f73a50..21a8154 100644
--- a/sys/cddl/dev/dtrace/i386/dtrace_isa.c
+++ b/sys/cddl/dev/dtrace/i386/dtrace_isa.c
@@ -413,7 +413,8 @@ dtrace_getarg(int arg, int aframes)
for (i = 1; i <= aframes; i++) {
fp = fp->f_frame;
- if (fp->f_retaddr == (long)dtrace_invop_callsite) {
+ if (P2ROUNDUP(fp->f_retaddr, 4) ==
+ (long)dtrace_invop_callsite) {
/*
* If we pass through the invalid op handler, we will
* use the pointer that it passed to the stack as the
@@ -422,7 +423,7 @@ dtrace_getarg(int arg, int aframes)
* beyond the EIP/RIP that was pushed when the trap was
* taken -- hence the "+ 1" below.
*/
- stack = ((uintptr_t **)&fp[1])[1] + 1;
+ stack = ((uintptr_t **)&fp[1])[0] + 1;
goto load;
}
@@ -438,7 +439,7 @@ dtrace_getarg(int arg, int aframes)
*/
arg++;
- stack = (uintptr_t *)&fp[1];
+ stack = (uintptr_t *)fp + 2;
load:
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
OpenPOWER on IntegriCloud