Fix a bug in the amd64 dtrace_getarg() implementation: when unwinding the

stack, take into account the copy of rsi pushed between the breakpoint
trapframe and the dtrace_invop frame. Prior to r287644, this was covered
by the fact that sizeof(struct amd64_frame) was 24 rather than 16.

Reported by:	smh
This commit is contained in:
Mark Johnston 2015-11-19 05:33:15 +00:00
parent d12c556d32
commit 4d7296f9aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291057

View File

@ -385,8 +385,8 @@ dtrace_getarg(int arg, int aframes)
* we're seeking is passed in regsiters, we can just
* load it directly.
*/
struct trapframe *tf =
(struct trapframe *)((uintptr_t)&fp[1]);
struct trapframe *tf = (struct trapframe *)
((uintptr_t)&fp[1] + sizeof(uintptr_t));
if (arg <= inreg) {
switch (arg) {