]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Remove the arg0 field from struct amd64_frame. Its existence was a bug,
authormarkj <markj@FreeBSD.org>
Fri, 11 Sep 2015 03:31:22 +0000 (03:31 +0000)
committermarkj <markj@FreeBSD.org>
Fri, 11 Sep 2015 03:31:22 +0000 (03:31 +0000)
since on amd64 the first argument to a function is generally not on the
stack.

Revert an old DTrace bug fix to some code that assumed that
sizeof(struct amd64_frame) == 16.

Reviewed by: jhb, kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3255

sys/cddl/dev/dtrace/amd64/dtrace_isa.c
sys/x86/include/stack.h

index 07a1b0a7ae8a797bcd4abb713128747167bc06e9..e05932d77e3ca88bdd9031f4d0ae8972257205ca 100644 (file)
@@ -440,7 +440,7 @@ dtrace_getarg(int arg, int aframes)
        }
 
        arg -= (inreg + 1);
-       stack = (uintptr_t *)fp + 2;
+       stack = (uintptr_t *)&fp[1];
 
 load:
        DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
index 8e45b82b06d0bf4bdb1360fe77b438cbe9a5a780..3489e42c580277a4ff7152731a89636ed81ad453 100644 (file)
@@ -45,7 +45,6 @@ struct i386_frame {
 struct amd64_frame {
        struct amd64_frame      *f_frame;
        u_long                  f_retaddr;
-       u_long                  f_arg0;
 };
 
 struct i386_frame {