DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



050715.2 Ron Brender Bit strides and byte strides Improvement Accepted Ron Brender


Section: 5.5 and 5.11
Page: 65, 78,...

DWARF has two related attributes whose names have proven terribly
confusing: DW_AT_stride and DW_AT_stride_size. It is easy to
remember that both can be used to specify non-default strides for
arrays.

Quick--off the top of your head--how do they differ?

The relevant properties are:

    DW_AT_stride:
      - can be used on subrange types (of array types),
      - units are bytes

    DW_AT_stride_size:
      - can be used on array types
      - units are bits


PROPOSAL
--------

In DWARF V3, replace all occurrences of

      DW_AT_stride with DW_AT_byte_stride
and
      DW_AT_stride_size with DW_AT_bit_stride

In addition, in Section 5.5 re Array types, insert the following
immediately after the paragraph the defines DW_AT_stride_size:

     
     The name DW_AT_bit_stride replaces the name DW_AT_stride_size
     which is defined in DWARF Version 2. The name DW_AT_stride_size
     may be treated as an alias for DW_AT_bit_stride but use of
     DW_AT_stride_size is deprecated.
     

Similarly, in Section 5.11, insert the following immediately after
the paragraph that defines DW_AT_stride

     
     The name DW_AT_byte_stride replaces the name DW_AT_stride
     which is defined in DWARF Version 2. The name DW_AT_stride
     may be treated as an alias for DW_AT_byte_stride but use of
     DW_AT_stride is deprecated.
     

In the Index, add the following

     DW_AT_stride, See DW_AT_byte_stride
     DW_AT_stride_size, See DW_AT_bit_stride



All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2017 by DWARF Standards Committee.