From: Giuliano Procida <gprocida@google.com>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: libabigail@sourceware.org, kernel-team@android.com,
maennich@google.com, mjw@redhat.com
Subject: Re: [PATCH v3] Bug 28191 - Interpret DWARF 5 addrx locations
Date: Wed, 24 Nov 2021 11:11:59 +0000 [thread overview]
Message-ID: <CAGvU0HmtgQr-b0qJkKPFspP+DYvKfD7eGgN0_7KRbxh_PiG=7Q@mail.gmail.com> (raw)
In-Reply-To: <87ilwiu72o.fsf@seketeli.org>
Hi Dodji.
On Tue, 23 Nov 2021 at 17:15, Dodji Seketeli <dodji@seketeli.org> wrote:
>
> [I am adding Mark to the list recipients as I am going to ask him a
> question below]
>
Indeed, I forgot to CC him on the patch. Hi Mark.
>
> Hello,
>
> Giuliano Procida <gprocida@google.com> a écrit:
>
> > This change uses libdw facilities to interpret location expressions
> > instead of using libabigail's own mini-interpreter. With the fix for
> > elfutils https://sourceware.org/bugzilla/show_bug.cgi?id=28220 in
> > elfutils-0.186, abidw will correctly interpret Clang DWARF 5 symbol
> > addresses. Without that fix many declarations will not be linked to
> > their corresponding symbols due to the incorrect interpretation of
> > location attribute data.
> >
> > * src/abg-dwarf-reader.cc (die_location_address): Use
> > dwarf_attr_integrate, dwarf_getlocation and
> > dwarf_getlocation_attr to decode addreses, instead of
> > die_location_expr and eval_last_constant_dwarf_sub_expr.
> > * tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
> > Refresh test reference output; two more symbols have types.
>
> Thanks for looking into that.
>
> It seems to me that we can also do away with the use of eval_last_constant_dwarf_sub_expr from
> die_member_offset. Would that work on your testing binaries?
>
I think I originally wrote the code just before a trip away and didn't
have the time to look into the other callers then.
>
> From what I am seeing, dwarf_getlocation_attr and dwarf_getlocation are
> present in elfutils 0.176 which is the oldest version that we need to
> support, so we should be able to ditch eval_last_constant_dwarf_sub_expr
> and its dependencies altogether.
>
> Or what am I missing?
>
I think it would be good if we could rely on elfutils for this functionality.
I've had a go at die_member_offset and I think I have it working (at
least with the test suite). I'll clean up what I have and post it.
There is considerable overlap with the address function.
I haven't been able to get die_virtual_function_index to work as
dwarf_getlocation_attr fails. There may be a simpler recipe to follow
here.
If/when the 3 existing callers are working, there may be some code in
common to factor out as a new die_location_expr function.
Regards,
Giuliano.
>
> [...]
>
> Cheers,
>
> --
> Dodji
next prev parent reply other threads:[~2021-11-24 11:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 18:54 [PATCH] " Giuliano Procida
2021-08-27 18:57 ` [PATCH v2] Bug 28191 - " Giuliano Procida
2021-11-19 15:01 ` [PATCH v3] " Giuliano Procida
2021-11-23 17:15 ` Dodji Seketeli
2021-11-23 19:59 ` Mark Wielaard
2021-11-24 11:11 ` Giuliano Procida [this message]
2021-11-24 11:33 ` Giuliano Procida
2021-11-24 11:44 ` Giuliano Procida
2022-01-13 8:56 ` [PATCH v4] " Giuliano Procida
2022-01-17 13:06 ` Dodji Seketeli
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='CAGvU0HmtgQr-b0qJkKPFspP+DYvKfD7eGgN0_7KRbxh_PiG=7Q@mail.gmail.com' \
--to=gprocida@google.com \
--cc=dodji@seketeli.org \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=maennich@google.com \
--cc=mjw@redhat.com \
/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).