On 4/17/25 3:58 PM, Tom Tromey via Dwarf-discuss wrote:
> Consider the appended Ada program. Here, the offset of "Another_Field"
> is a non-constant number of bits from the start of the object.
>
> I think there is no way to represent this in DWARF 5. Section 5.7.6,
> page 119 says:
>
> For
> "Simon" == Simon Marchi writes:
Simon> Just to make sure I understand, can you clarify how
Simon> DW_AT_data_member_location and DW_AT_bit_offset are used in this
Simon> case? In particular, which one is constant and which one is an
Simon> evaluated expression?
Dynamic DW_AT_data_member_l
>
> One way to fix this would be to lift the "integer constant" restriction
> and allow an expression here.
Yes, that would be a reasonable thing to do for DWARF 6. I'm kind of
surprised we didn't allow an expression for DW_AT_data_bit_offset from the
start, especially given that it was allowed f