diff options
author | Mark Johnston <markj@FreeBSD.org> | 2013-10-21 04:15:55 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2013-10-21 04:15:55 +0000 |
commit | 7e75d5861000a9177c0d5d12d6a1951233d4d50b (patch) | |
tree | 8c454f9ea7a04ad0401dd2bffabc2805e80d110a /sys | |
parent | 72c775da6ce3911d7f7bf2b59ea47ca022f92f94 (diff) | |
download | src-test2-7e75d5861000a9177c0d5d12d6a1951233d4d50b.tar.gz src-test2-7e75d5861000a9177c0d5d12d6a1951233d4d50b.zip |
Notes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c | 15 | ||||
-rw-r--r-- | sys/cddl/dev/dtrace/amd64/dtrace_isa.c | 22 |
2 files changed, 35 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c index 65991aff0254..8b5ce9f46726 100644 --- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -272,7 +272,20 @@ fasttrap_anarg(struct reg *rp, int function_entry, int argno) * registers. */ if (argno < 6) - return ((&rp->r_rdi)[argno]); + switch (argno) { + case 0: + return (rp->r_rdi); + case 1: + return (rp->r_rsi); + case 2: + return (rp->r_rdx); + case 3: + return (rp->r_rcx); + case 4: + return (rp->r_r8); + case 5: + return (rp->r_r9); + } stack = (uintptr_t *)rp->r_rsp; DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c index 34d6f331ebee..3d3c43cd2e8a 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_isa.c @@ -367,7 +367,27 @@ dtrace_getarg(int arg, int aframes) sizeof (uintptr_t)); if (arg <= inreg) { - stack = (uintptr_t *)&rp->r_rdi; + switch (arg) { + case 0: + stack = (uintptr_t *)&rp->r_rdi; + break; + case 1: + stack = (uintptr_t *)&rp->r_rsi; + break; + case 2: + stack = (uintptr_t *)&rp->r_rdx; + break; + case 3: + stack = (uintptr_t *)&rp->r_rcx; + break; + case 4: + stack = (uintptr_t *)&rp->r_r8; + break; + case 5: + stack = (uintptr_t *)&rp->r_r9; + break; + } + arg = 0; } else { stack = (uintptr_t *)(rp->r_rsp); arg -= inreg; |