[Dwarf-discuss] Enhancement: Dynamic DW_AT_data_bit_offset

Cary Coutant ccoutant@gmail.com
Tue Apr 29 20:09:23 GMT 2025


>
> 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 for the old DW_AT_bit_offset.

Anyway, given the permissive nature of DWARF, you could go ahead and use
DW_FORM_exprloc for this attribute in DWARF 4 or 5, as long as compiler and
debugger agree on it. We can work to standardize that in DWARF 6.

-cary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dwarfstd.org/pipermail/dwarf-discuss/attachments/20250429/bd50da09/attachment.htm>


More information about the Dwarf-discuss mailing list