Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Mark Wielaard <mjw@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/DWARF] constant class of DW_AT_high_pc is offset for version >=4 only.
Date: Wed, 19 Feb 2014 07:23:00 -0000	[thread overview]
Message-ID: <20140219072317.GA4270@adacore.com> (raw)
In-Reply-To: <1392760350.21975.200.camel@bordewijk.wildebeest.org>

> Just trying to make up for breaking your setup with my original patch.
> Although I might be too pedantic in my DWARF spec reading and I cannot
> actually approve the patch. So it might be of little help. Sorry about
> that.

No - I think you're being very helpful, because you seem very
knowledgeable about present and future DWARF.

> Sadly DWARF doesn't seem to forbid anything. [...] But even DWARF2
> says that the only possible encoding of attribute values of class
> address is DW_FORM_addr.
[...]
> I admit I am mostly worried because GDB is seen as the gold standard of
> DWARF consumers. When GDB accepts some DWARF then basically all other
> DWARF consumers have to adapt.
[...]
> I am just pedantic about interpreting the DWARF standard. Because I do
> worry this will make things harder in the future.

OK, I see where you are coming from. In that case, I agree we should
be adding the complaint. The intention behind my patch then becomes:
Yes, we accept this format but its meaning is undefined. We interpret
it the best we can hoping that it may actually work in your case,
but no guarantees.

So, overall, the plan now is to adjust version #2 in the following
ways:
  - Add a comment in the function documentation explaining that
    this is to help trying to read broken DWARF;
  - Add a complaint inside the function when the attribute has
    the wrong format
The generalized usage of the new function is maintained.

> > > Note that this might break for DWARF5. See http://dwarfstd.org/ShowIssue.php?issue=120719.1
> > 
> > Interesting. I am curious why you would handle this attribute as
> > an offset even when the value is encoded in address form?
> 
> As Doug said, it is a space saving (offsets are often small) and it
> saves a relocation (linkers have to resolve all DW_FORM_addr values and
> they add up).

I was wondering why we don't "simply" require a constant format in
this case, instead of allowing both formats.

Thanks,
-- 
Joel


  reply	other threads:[~2014-02-19  7:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 15:40 Joel Brobecker
2014-02-16 19:19 ` Mark Wielaard
2014-02-17  9:19   ` Joel Brobecker
2014-02-18 13:30 ` Joel Brobecker
2014-02-18 16:03   ` Mark Wielaard
2014-02-18 18:49     ` Joel Brobecker
2014-02-18 20:29       ` Doug Evans
2014-02-18 21:52       ` Mark Wielaard
2014-02-19  7:23         ` Joel Brobecker [this message]
2014-02-19 13:44           ` Mark Wielaard
2014-02-21 18:42             ` Joel Brobecker
2014-02-26 10:53               ` Mark Wielaard
2014-02-26 19:45               ` pushed: " Joel Brobecker

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=20140219072317.GA4270@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --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