mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 00:40:26 +08:00
[DBGHELP][AMD64] Return the last valid frame at end of stack in StackWalk64
This commit is contained in:
@@ -663,9 +663,20 @@ static BOOL x86_64_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
|
||||
union ctx newctx = *context;
|
||||
|
||||
if (!fetch_next_frame(csw, &newctx, frame->AddrPC.Offset - deltapc, NULL))
|
||||
goto done_err;
|
||||
frame->AddrReturn.Mode = AddrModeFlat;
|
||||
frame->AddrReturn.Offset = newctx.ctx.Rip;
|
||||
{
|
||||
/*
|
||||
* The current frame is valid, but there is no parent frame to
|
||||
* report (end-of-stack). Return this frame and terminate the walk
|
||||
* on the next call, which matches Windows-observed behavior.
|
||||
*/
|
||||
frame->AddrReturn.Mode = AddrModeFlat;
|
||||
frame->AddrReturn.Offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame->AddrReturn.Mode = AddrModeFlat;
|
||||
frame->AddrReturn.Offset = newctx.ctx.Rip;
|
||||
}
|
||||
}
|
||||
|
||||
frame->Far = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user