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:
parent
aa67e007fd
commit
965992ab09
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user