mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-28 10:07:37 +01:00
Stop unwinding on undefined return address
Milian Wolff <mail@milianw.de> reported that this greatly improved unwinding perf on some his apps.
This commit is contained in:
parent
4791a76d26
commit
0808aa6737
1 changed files with 7 additions and 6 deletions
|
@ -83,12 +83,13 @@ unw_step (unw_cursor_t *cursor)
|
||||||
if (likely (ret >= 0))
|
if (likely (ret >= 0))
|
||||||
{
|
{
|
||||||
/* x86_64 ABI specifies that end of call-chain is marked with a
|
/* x86_64 ABI specifies that end of call-chain is marked with a
|
||||||
NULL RBP. */
|
NULL RBP or undefined return address */
|
||||||
if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP]))
|
if (DWARF_IS_NULL_LOC (c->dwarf.loc[RBP])
|
||||||
{
|
|| DWARF_IS_NULL_LOC(c->dwarf.loc[c->dwarf.ret_addr_column]))
|
||||||
c->dwarf.ip = 0;
|
{
|
||||||
ret = 0;
|
c->dwarf.ip = 0;
|
||||||
}
|
ret = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue