[Dwarf-Discuss] Proposal to add DW_AT_alignment

Joel Brobecker brobecker@adacore.com
Wed May 28 23:33:53 GMT 2014


Hi Mark,

> I saw the submission deadline has officially passed, but I wanted to put
> up a formal proposal anyway. If not accepted to DWARF5 I will first
> implement it as a GNU extensions. But of course even in that case I
> would like feedback to make sure the extension is as close as possible
> to what might make it into a future standard.
> 
> I realized a better way to describe the extra alignment requirements is
> to introduce a new modifier type TAG instead of just adding an attribute
> to all types and variables. So that is how I submitted the formal
> proposal to http://dwarfstd.org/Comment.php:

Very interesting proposal! Thanks for putting it together.

I thought I would mention that Ada allows the user to specify
stricter alignments for objects too. And also, GNAT sometimes
decides on its own to use stricter alignments for certain objects.
Perhaps we might want to add Ada as an another example where
such source-level requirements can be used? It is not strictly
necessary but I have a feeling that it would convey the idea
that the concept is used a little more widely than just through
C11 and GNU extensions.

I don't understand yet why you think that having a new TAG
is a better approach. Is that because you think the compiler
will generate the debug info for the base type regardless,
and so having a new TAG with just that attribute and a reference
to the base type would save a little bit of space? Or maybe
it better follows how other modifiers such as "volatile" are
being described? (I just realized this while typing this email)

> DW_TAG_aligned_type). Figure 15 Type modifier tags add:
> DW_TAG_aligned_type non-default alignment requirements of type.

Maybe it's just because of the formatting that got lost, but
I don't understand what's being added.

Thanks!
-- 
Joel



More information about the Dwarf-discuss mailing list