public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/26297] New: Possible misinterpretation of DW_AT_declaration via DW_AT_specification
@ 2020-07-23 18:27 gprocida+abigail at google dot com
  2020-07-23 20:26 ` [Bug default/26297] " gprocida+abigail at google dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gprocida+abigail at google dot com @ 2020-07-23 18:27 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=26297

            Bug ID: 26297
           Summary: Possible misinterpretation of DW_AT_declaration via
                    DW_AT_specification
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dodji at redhat dot com
          Reporter: gprocida+abigail at google dot com
                CC: libabigail at sourceware dot org
  Target Milestone: ---

Hi Dodji.

I was looking into libabigail's emission of anonymous declaration-only unions
and starting comparing what I saw there against what dwarfdump and pahole -aAE
reported. The pahole output didn't look entirely trustworthy.

dwarfdump tests/data/test-read-dwarf/libtest23.so

shows a DW_TAG_union with a DW_AT_declaration yes attribute. I thought "how's
that?" but spotted that it was referred to via a DW_AT_specification attribute
from another declaration.

A little web search found the discussion

https://gdb-patches.sourceware.narkive.com/PLB1ixbx/dw-at-specification-long-ago-gdb-change

which concluded that DW_AT_declaration found by following a DW_AT_specification
should be ignored.

I coded a naive change that plumbed through a "followed_spec" boolean through
bits of the DWARF reader and the results were quite startling.

Please take a look at this and let me know your thoughts.

https://github.com/myxoid/libabigail/commit/fb3b7302a9923b8ee7ca279cc9492207140d886d

It may be useful to switch some tests to --type-id-style hash and turn on
annotation to better understand the changes. 

Regards,
Giuliano.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-06 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 18:27 [Bug default/26297] New: Possible misinterpretation of DW_AT_declaration via DW_AT_specification gprocida+abigail at google dot com
2020-07-23 20:26 ` [Bug default/26297] " gprocida+abigail at google dot com
2020-07-23 23:05 ` mark at klomp dot org
2020-07-24  8:30 ` gprocida+abigail at google dot com
2020-07-24 12:45 ` gprocida+abigail at google dot com
2020-07-24 14:32 ` gprocida+abigail at google dot com
2020-08-06 16:48 ` dodji at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).