[PATCH 1/2] DWARF: look up DW_AT_declaration non-recursively
Dodji Seketeli
dodji@seketeli.org
Thu Aug 6 16:43:31 GMT 2020
Giuliano Procida <gprocida@google.com> a écrit:
> Bug 26297: Possible misinterpretation of DW_AT_declaration via DW_AT_specification
>
> The DWARF attribute DW_AT_declaration indicates that a DIE is
> "declaration only". DWARF DIEs can be linked with DW_AT_specification
> and DW_AT_abstract_origin attributes, effectively combining them. A
> lone DW_AT_declaration in a chain of such DIEs should not render the
> whole chain declaration only.
Thank you for looking into this.
I kept meaning to look into that for a long time now and here you are
\o/
And yes, I think that several DW_AT_declaration a chain of DIEs linked by
DW_AT_{specification, abstract_origin} attributes should shouldn't turn a
definition DIE into a declaration-only one.
[...]
> * src/abg-dwarf-reader.cc (die_die_attribute): Rename
> 'look_thru_abstract_origin' argument to 'recursively' and
> mention DW_AT_specification in its doc comment. Remove stale
> comment for non-existent argument. Simplify code with the help
> of the ternary operator. (die_flag_attribute): Add
> recursively argument, defaulted to true. If this is false,
> look for attribute using dwarf_attr rather than
> dwarf_attr_integrate. (die_is_declaration_only): Call
> die_flag_attribute specifying non-recursive attribute search.
> * tests/data/test-annotate/test15-pr18892.so.abi: Update
> tests. This is mostly the removal of unreachable parts of the type
> graph and type id renumbering.
> * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
> Likewise.
> * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
> Likewise.
> * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt:
> Likewise.
> * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
> * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
> Likewise.
> * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
> Likewise.
> * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
> Likewise.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>
Applied to master, thanks!
Cheers,
--
Dodji
More information about the Libabigail
mailing list