[libbacktrace] Unify function name preference handling
authorTom de Vries <tdevries@suse.de>
Wed, 16 Jan 2019 07:46:56 +0000 (07:46 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Wed, 16 Jan 2019 07:46:56 +0000 (07:46 +0000)
commitdf1de0641543701e6cde7c47e1da594eed83325e
tree2bc7148a6377ff8cff86a81fd15244165864d1ba
parent9a60361196767f7ebf9bd088661512822d06aa66
[libbacktrace] Unify function name preference handling

Both read_function_entry and read_referenced_name implement a priority scheme
for names.  The priorities are:
- 1st: DW_AT_linkage_name
- 2nd: Name from DW_AT_abstract_origin or DW_AT_specification
- 3rd: DW_AT_name.

Ensure both functions fully adhere to it.

2019-01-16  Tom de Vries  <tdevries@suse.de>

* dwarf.c (read_referenced_name): Don't allow DW_AT_name to override any
name.
(read_function_entry): Same.  Don't allow name found via
DW_AT_abstract_origin or case DW_AT_specification to override linkage
name.

From-SVN: r267963
libbacktrace/ChangeLog
libbacktrace/dwarf.c