From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A42603857C5B; Thu, 23 Jul 2020 18:27:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A42603857C5B From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/26297] New: Possible misinterpretation of DW_AT_declaration via DW_AT_specification Date: Thu, 23 Jul 2020 18:27:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida+abigail at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 18:27:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26297 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 unio= ns 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 attrib= ute from another declaration. A little web search found the discussion https://gdb-patches.sourceware.narkive.com/PLB1ixbx/dw-at-specification-lon= g-ago-gdb-change which concluded that DW_AT_declaration found by following a DW_AT_specifica= tion should be ignored. I coded a naive change that plumbed through a "followed_spec" boolean throu= gh 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/fb3b7302a9923b8ee7ca279cc949220= 7140d886d It may be useful to switch some tests to --type-id-style hash and turn on annotation to better understand the changes.=20 Regards, Giuliano. --=20 You are receiving this mail because: You are on the CC list for the bug.=