]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used
authorEd Maste <emaste@FreeBSD.org>
Thu, 19 Nov 2020 21:10:36 +0000 (21:10 +0000)
committerEd Maste <emaste@FreeBSD.org>
Thu, 31 Dec 2020 03:19:32 +0000 (22:19 -0500)
commit53bc3221561aac01410087646444dc4d4ef41f37
tree95a59026f839051b87b16c940e7422354829d280
parentce87312019a18e6bd0c97c50e5762b38ffc21e76
MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used

addr2line: swap if conditions for diff reduction in upcoming change

No functional change intended.

(cherry picked from commit 65c207758a9586116a023dea8eb3d173e85cb0a9)

addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used

Check label's ranges for address we want to translate if a CU doesn't
have usable DW_AT_range or DW_AT_low_pc.

Use more appropriate names: "struct CU" -> "struct range"

Developed as part of upstream ELF Tool Chain bug report
https://sourceforge.net/p/elftoolchain/tickets/552/ although this does
not address the specific case reported there.

Submitted by: Tiger Gao <tig@freebsdfoundation.org>
Sponsored by: The FreeBSD Foundation
Differential Revision: D23782

(cherry picked from commit a36179937e7e768d1840896ac1ea13ba6f118a09)

addr2line: rework check_range conditions

Simplify logic and reduce indentation for DW_AT_low_pc case.

Reviewed by: Tiger Gao, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: D27426

(cherry picked from commit f4d6ed9a5c5f5e78b9e20ae0c4b3ab78922aaf20)

addr2line: fix allocation leak in error path

CID: 1437677
Reported by: Coverity Scan
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 67b94fc58e61a78225930d54eadaba77f46a73b7)
contrib/elftoolchain/addr2line/addr2line.c