From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Alexandre Oliva <aoliva@redhat.com>
Subject: Re: [PATCH] readelf: Add some support for locviews.
Date: Mon, 05 Mar 2018 14:35:00 -0000 [thread overview]
Message-ID: <1520260520.6142.5.camel@klomp.org> (raw)
In-Reply-To: <20180301135506.1614-1-mark@klomp.org>
On Thu, 2018-03-01 at 14:55 +0100, Mark Wielaard wrote:
> This adds minimal support for locviews as output by GCC8.
> It changes readelf to keep track of loclistptrs from DW_AT_GNU_locviews
> and prints the locview pairs for those. Since there is no terminator
> we have to keep track of where the next loclist entry starts.
> The --debug-dump=loc output looks as follows:
>
> CU [ 714] base: +0x0000000000003020 <elf_hash>
> [ b4] view pair 1, 2
> [ b6] range 4, 7f
> +0x0000000000003024 <elf_hash+0x4>..
> +0x000000000000309e <elf_hash+0x7e>
> [ 0] reg5
> [ d9] view pair 3, 1
> view pair 1, 2
> [ dd] range 4, 4c
> +0x0000000000003024 <elf_hash+0x4>..
> +0x000000000000306b <elf_hash+0x4b>
> [ 0] reg5
> range 4c, 7f
> +0x000000000000306c <elf_hash+0x4c>..
> +0x000000000000309e <elf_hash+0x7e>
> [ 0] reg2
>
> Note that in the above output the view pairs correspond to the ranges
> immediately following in the loc list. This is how GCC8 currently
> outputs the locview pairs and ranges, but this is not guaranteed and
> you'll need to look at the location and GNU_locviews attributes of the
> DIE to know which really match up together. We might want to adjust the
> output to make this more clear.
>
> This does not yet add an locview accessor to libdw. It just recognizes
> the DW_AT_GNU_locviews attribute as a loclistptr when encoded as a
> sec_offset form.
Pushed to master.
prev parent reply other threads:[~2018-03-05 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 13:55 Mark Wielaard
2018-03-05 14:35 ` Mark Wielaard [this message]
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=1520260520.6142.5.camel@klomp.org \
--to=mark@klomp.org \
--cc=aoliva@redhat.com \
--cc=elfutils-devel@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).