1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-23 07:57:38 +01:00

(unw_get_proc_info): Don't freak out if dwarf_make_proc_info() fails.

Unfortunately, it must fail for current versions of libc
	since they fail to provide unwind-info for _start() and
	_dl_start().

(Logical change 1.290)
This commit is contained in:
mostang.com!davidm 2005-05-03 09:13:17 +00:00
parent e7fba77e9d
commit 7ac9665fd3

View file

@ -31,11 +31,18 @@ PROTECTED int
unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
{
struct cursor *c = (struct cursor *) cursor;
int ret;
if (ret = dwarf_make_proc_info (&c->dwarf))
return ret;
if (dwarf_make_proc_info (&c->dwarf) < 0)
{
/* On x86-64, some key routines such as _start() and _dl_start()
are missing DWARF unwind info. We don't want to fail in that
case, because those frames are uninteresting and just mark
the end of the frame-chain anyhow. */
memset (pi, 0, sizeof (*pi));
pi->start_ip = c->dwarf.ip;
pi->end_ip = c->dwarf.ip + 1;
return 0;
}
*pi = c->dwarf.pi;
return 0;
}