1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2025-01-10 19:23:41 +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:
Arun Sharma 2006-07-26 22:06:48 -06:00 committed by David Mosberger-Tang
parent 06d2ffa41a
commit 8297866bd4

View file

@ -141,9 +141,9 @@ unw_step (unw_cursor_t *cursor)
rip_loc = DWARF_LOC (rbp + 8, 0);
/* Heuristic to recognize a bogus frame pointer */
ret = dwarf_get (&c->dwarf, rbp_loc, &rbp1);
if (ret || (abs(rbp - rbp1) > 4096))
if (ret || ((rbp1 - rbp) > 0x4000))
rbp_loc = DWARF_NULL_LOC;
c->dwarf.cfa = rbp;
c->dwarf.cfa += 16;
}
/* Mark all registers unsaved */