public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: "gprocida+abigail at google dot com" <sourceware-bugzilla@sourceware.org>
To: libabigail@sourceware.org
Subject: [Bug default/26297] Possible misinterpretation of DW_AT_declaration via DW_AT_specification
Date: Fri, 24 Jul 2020 12:45:06 +0000	[thread overview]
Message-ID: <bug-26297-9487-rsInyzkQ2P@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26297-9487@http.sourceware.org/bugzilla/>

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

--- Comment #4 from Giuliano Procida <gprocida+abigail at google dot com> ---
Some progress.

It's possible and easy to update die_is_declaration only to not follow links.
This makes some difference.

For the rest, passing through some state is still needed. However, my first
attempt definitely contained something which blew up the
tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt
test. This may have been due to treating DW_AT_abstract_origin differently from
DW_AT_specification in one place.

I've rethought and reworked it. Instead of recording whether we have reached a
DIE via one or more links, I think it makes more sense to track the conjunction
of all the declaration-only states in a chain.

DIE1 --> DIE2 --> DIE3
decl     (no      decl
only      attr)   only

This should be treated as NOT declaration-only. Each time a link is followed,
it's either used for scope logic which doesn't care about this or there's a
recursive call to build_ir_node_from_die.

So, build_ir_node_from_die should take an is_declaration_only argument,
defaulted to true and (almost) immediately AND it with
die_is_declaration_only(die). This does leave much the same amount of plumbing
as before but it does make more logical sense.

WIP changes at https://github.com/myxoid/libabigail/commits/dwarf-follow-spec

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

  parent reply	other threads:[~2020-07-24 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 18:27 [Bug default/26297] New: " 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 [this message]
2020-07-24 14:32 ` gprocida+abigail at google dot com
2020-08-06 16:48 ` dodji at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26297-9487-rsInyzkQ2P@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=libabigail@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).