FreeBSD Bugzilla – Attachment 144012 Details for
Bug 191260
[patch] dtrace fbt entry function gets the wrong values from arg5 to arg9 on amd64 platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for dtrace_getarg()
dtrace_fbt.patch (text/plain), 1.71 KB, created by
luke.tw
on 2014-06-22 03:17:30 UTC
(
hide
)
Description:
patch for dtrace_getarg()
Filename:
MIME Type:
Creator:
luke.tw
Created:
2014-06-22 03:17:30 UTC
Size:
1.71 KB
patch
obsolete
>Index: sys/cddl/dev/dtrace/amd64/dtrace_isa.c >=================================================================== >--- sys/cddl/dev/dtrace/amd64/dtrace_isa.c (revision 267710) >+++ sys/cddl/dev/dtrace/amd64/dtrace_isa.c (working copy) >@@ -349,7 +349,7 @@ > for (i = 1; i <= aframes; i++) { > fp = fp->f_frame; > >- if (fp->f_retaddr == (long)dtrace_invop_callsite) { >+ if (P2ROUNDUP(fp->f_retaddr,16) == (long)dtrace_invop_callsite) { > /* > * In the case of amd64, we will use the pointer to the > * regs structure that was pushed when we took the >@@ -363,33 +363,32 @@ > * we're seeking is passed in regsiters, we can just > * load it directly. > */ >- struct reg *rp = (struct reg *)((uintptr_t)&fp[1] + >- sizeof (uintptr_t)); >+ struct trapframe *tp = (struct trapframe *)((uintptr_t)&fp[1]); > > if (arg <= inreg) { > switch (arg) { > case 0: >- stack = (uintptr_t *)&rp->r_rdi; >+ stack = (uintptr_t *)&tp->tf_rdi; > break; > case 1: >- stack = (uintptr_t *)&rp->r_rsi; >+ stack = (uintptr_t *)&tp->tf_rsi; > break; > case 2: >- stack = (uintptr_t *)&rp->r_rdx; >+ stack = (uintptr_t *)&tp->tf_rdx; > break; > case 3: >- stack = (uintptr_t *)&rp->r_rcx; >+ stack = (uintptr_t *)&tp->tf_rcx; > break; > case 4: >- stack = (uintptr_t *)&rp->r_r8; >+ stack = (uintptr_t *)&tp->tf_r8; > break; > case 5: >- stack = (uintptr_t *)&rp->r_r9; >+ stack = (uintptr_t *)&tp->tf_r9; > break; > } > arg = 0; > } else { >- stack = (uintptr_t *)(rp->r_rsp); >+ stack = (uintptr_t *)(tp->tf_rsp); > arg -= inreg; > } > goto load; >@@ -426,7 +425,6 @@ > DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); > > return (val); >- return (0); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 191260
: 144012