mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-01-11 03:23:43 +01:00
[x86-64] (unw_step): Further refine handling of functions without unwind-info.
CFA should be incremented by 16 in the hope that the previous frame may have valid unwind info. Also increase the default frame pointer recognition heuristic from 4k to 16k. Signed-off-by: Andrey Veskov <Andrey.Veskov@intel.com> Signed-off-by: Arun Sharma <arun.sharma@google.com>
This commit is contained in:
parent
06d2ffa41a
commit
8297866bd4
1 changed files with 2 additions and 2 deletions
|
@ -141,9 +141,9 @@ unw_step (unw_cursor_t *cursor)
|
||||||
rip_loc = DWARF_LOC (rbp + 8, 0);
|
rip_loc = DWARF_LOC (rbp + 8, 0);
|
||||||
/* Heuristic to recognize a bogus frame pointer */
|
/* Heuristic to recognize a bogus frame pointer */
|
||||||
ret = dwarf_get (&c->dwarf, rbp_loc, &rbp1);
|
ret = dwarf_get (&c->dwarf, rbp_loc, &rbp1);
|
||||||
if (ret || (abs(rbp - rbp1) > 4096))
|
if (ret || ((rbp1 - rbp) > 0x4000))
|
||||||
rbp_loc = DWARF_NULL_LOC;
|
rbp_loc = DWARF_NULL_LOC;
|
||||||
c->dwarf.cfa = rbp;
|
c->dwarf.cfa += 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark all registers unsaved */
|
/* Mark all registers unsaved */
|
||||||
|
|
Loading…
Reference in a new issue