public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [Dwarf-Discuss] Some DWARFv5 draft feedback
Date: Thu, 01 Dec 2016 18:40:38 +0100	[thread overview]
Message-ID: <1480614038.3728.224.camel@redhat.com> (raw)
In-Reply-To: E3B07FDB86BFF041819DC057DEED8FEAF4950529@USCULXMSG08.am.sony.com

[-- Attachment #1: Type: text/plain, Size: 5077 bytes --]

On Thu, 2016-12-01 at 13:52 +0000, Robinson, Paul wrote:
> Thanks for reporting this stuff!  I see a few things you found have
> already been reported, but please make sure to file issues for the
> rest so we can clean up as much as we can.

Thanks, I did also file the following Issues, but they have not yet
shown up on the website. I think these are easily clarified. The rest is
probably more debatable, maybe something to coordinate between consumers
and producers.

For example what and how language specific attributes of DIEs move
between compile and (shared) type or partial units I don't have a good
feeling for (but might be as simple as just recommending producers not
to merge DIEs from CUs with different language attributes and/or adding
the language attribute to the partial unit DIE).

Subject:  Some forms are missing from the opcode_operands_table allowed
forms list
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  6.3.1  Page:  166
Type:  Error

The macro information entries in the opcode_operands_table may be
described in the table. But some cannot be described because some forms
are not in the list of allowed forms.

In particular DW_FORM_strp_sup is missing so DW_MACRO_define_sup and
DW_MACRO_undef_sup cannot be described. And DW_FORM_ref_sup is missing,
making it impossible to describe DW_MACRO_import_sup. Also
DW_FORM_line_strp isn't allowed. But it might be beneficial for
describing files referenced by macros.

Add DW_FORM_strp_sup, DW_FORM_ref_sup and DW_FORM_line_strp to the list
of allowed forms at the end of point 4 opcode_operands_table.

Subject:  Add DW_AT_encoding to the attribute list for
DW_TAG_enumeration_type
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  Appendix A  Page:  255
Type:  Improvement

It is allowed to have a DW_AT_byte_size on a DW_TAG_enumeration_type,
but not DW_AT_encoding. To describe both size and encoding one needs to
use a DW_AT_type pointing to a base type that represents the "underlying
type".

For languages where enumerations don't have an underlying type, or for
strongly typed enums it is easier to attach the encoding directly than
adding and indirection to a base type.

Add DW_AT_encoding to the attribute list for DW_TAG_enumeration_type.

Subject:  DW_FORM_data16 should be block class, not constant value
class.
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  7.5.5  Page:  212
Type:  Improvement

Classifying DW_FORM_data16 as a constant value class and having to
handle a 128bit value everywhere a constant value class is allowed is
somewhat inconvenient. Consumers do already handle such large values as
block and both gdb and elfutils currently handle data16 as (constant
size) block class.

In practice it seems to only impact DW_AT_const_value which can already
take a constant or a block. Using it for other attributes doesn't really
seem to make sense.

Suggest to rename to DW_FORM_data16_block and put it in the block class
instead of the constant class.

Subject:  representation of DW_FORM_strp/DW_FORM_line_strp typo
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  7.5.5  Page:  217
Type:  Editorial

Under the bullet point "string" in the second item describing the
representation:

"In the 32-bit DWARF format, the representation of a DW_FORM_strp,
DW_FORM_strp or
DW_FORM_strp_sup value is a 4-byte unsigned offset;"

The second DW_FORM_strp should be DW_FORM_line_strp.

Subject:  Make Unit Headers use less space
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  7.5.1  Page:  199
Type:  Improvement

This is an alternative for issue 161031.2. Instead of making the header
size/fields completely depend on the unit type just use some bits to
describe whether or not a unit header has any of the option fields. This
could be as simple as dedicating just the low 6 bits to the actually
unit type and use the upper two bits to indicate whether the header has
an (8 byte) ID field and/or an (4 or 8 byte) DIE offset field.

This allows 64 unit types and makes it easy to describe which optional
fields are in the header for currently unknown new types without wasting
any padding space.

Subject:  Remove DW_LANG_C_plus_plus_03
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  7.12  Page:  228
Type:  Error

Language encodings describe different languages, but c++03 (unlike c++11
and c++14) didn't change the language. C++03 is just C++98 with some
DRs. So for producers and consumers c++98 and c++03 look completely
similar. It was originally requested in Issue 120628.1, but the
submitter agreed with the consensus on the dwarf-discuss list to remove
it.

Subject:  Add DW_LANG_C_plus_plus_17
Name:  Mark Wielaard
Email:  mjw@redhat.com
Section:  7.12  Page:  228
Type:  Improvement

c++17 is nearly feature-complete to be finished in 2017. It adds various
language changes and compilers like GCC already implement it almost
completely. Please add DW_LANG_C_plus_plus_17 to the Language Encodings
table.



             reply	other threads:[~2016-12-01 17:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01 17:40 Mark Wielaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-06 18:56 Andreas Arnez
2016-12-01 19:32 Michael Eager
2016-12-01 14:17 Andreas Arnez
2016-12-01 14:04 Jakub Jelinek
2016-12-01 13:52 Robinson, Paul
2016-12-01 12:59 Todd Allen

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=1480614038.3728.224.camel@redhat.com \
    --to=mjw@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.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).