1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-21 23:27:39 +01:00

freebsd: Fix boundary conditions for non-dwarf walker on x86_64.

In the commit d04dc94cc2, the check for
dwarf.ip == 0 was removed from non-dwarf walker in x86_64 version of
unw_step(). Apparently this broke the detection of the end of frame
chain when NULL %rbp is specified, because the case just marked
dwarf.ip as 0. Explicitly set ret to 0 to indicate the end of
iteration.
This commit is contained in:
Konstantin Belousov 2012-04-23 13:51:57 +03:00 committed by Arun Sharma
parent 3bb74aae3d
commit 1a6ea3da60

View file

@ -85,7 +85,10 @@ unw_step (unw_cursor_t *cursor)
/* x86_64 ABI specifies that end of call-chain is marked with a
NULL RBP. */
if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP]))
c->dwarf.ip = 0;
{
c->dwarf.ip = 0;
ret = 0;
}
}
else
{
@ -206,6 +209,7 @@ unw_step (unw_cursor_t *cursor)
Debug (2, "returning %d\n", ret);
return ret;
}
ret = 1;
}
else
c->dwarf.ip = 0;