mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 10:53:39 +01:00
addr2line: skip CUs lacking debug info instead of bailing out
Some binaries (such as the FreeBSD kernel) contain a mixture of CUs with and without debug information. Previously translate() exited upon encountering a CU without debug information. Instead, just move on to the next CU. Reported by: royger Reviewed by: royger Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3712
This commit is contained in:
parent
e6d5be3edc
commit
10b8b85018
@ -248,7 +248,13 @@ translate(Dwarf_Debug dbg, const char* addrstr)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dwarf_srclines(die, &lbuf, &lcount, &de) != DW_DLV_OK) {
|
switch (dwarf_srclines(die, &lbuf, &lcount, &de)) {
|
||||||
|
case DW_DLV_OK:
|
||||||
|
break;
|
||||||
|
case DW_DLV_NO_ENTRY:
|
||||||
|
/* If one CU lacks debug info, just skip it. */
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
warnx("dwarf_srclines: %s", dwarf_errmsg(de));
|
warnx("dwarf_srclines: %s", dwarf_errmsg(de));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user