[0/2] Fix determination of DIE declaration-only status

Message ID 20200724170953.4069948-1-gprocida@google.com
Headers
Series Fix determination of DIE declaration-only status |

Message

Giuliano Procida July 24, 2020, 5:09 p.m. UTC
  Hi.

These two patches should consistute a fix for Bug 26297: "Possible
misinterpretation of DW_AT_declaration via DW_AT_specification".

A chain of DIEs linked by the DW_AT_specification and/or
DW_AT_abstract_origin attributes should only be considered
"declaration only" if every DIE in the chain has the DW_AT_declaration
attribute.

The first commit changes the behaviour of die_is_declaration_only to
not search for DW_AT_declaration across links and then second adjusts
code so that this function called for every DIE in a chain with the
results combined together sensibly.

I couldn't see any way of avoiding the extra plumbing without
restructuring a lot of code or adding a separate pass over the DWARF
info.

Regards,
Giuliano.

Giuliano Procida (2):
  DWARF: look up DW_AT_declaration non-recursively
  DWARF: track chained DIE declaration-only status

 src/abg-dwarf-reader.cc                       |  160 +-
 .../data/test-annotate/test15-pr18892.so.abi  |  431 ----
 .../data/test-annotate/test17-pr19027.so.abi  |   18 +-
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 2102 +++++++++--------
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  112 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  174 +-
 ...-pr19026-libvtkIOSQL-6.1.so.1-report-0.txt |    3 +
 .../test-read-dwarf/test15-pr18892.so.abi     |  241 --
 .../test-read-dwarf/test17-pr19027.so.abi     |   18 +-
 ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 2067 ++++++++--------
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |  110 +-
 ...st20-pr19025-libvtkParallelCore-6.1.so.abi |  174 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |   88 +-
 13 files changed, 2526 insertions(+), 3172 deletions(-)