On Tue, Jun 9, 2015 at 12:33 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Tue, Jun 09, 2015 at 12:17:49PM +0200, Eric Botcazou wrote: >> > How is this represented in DWARF? >> >> This is not represented on the branch, because this cannot be done in pure >> DWARF. DW_AT_endianity only applies to base types or stand-alone objects and >> we would need it for DW_TAG_member (and even DW_TAG_array_type in Ada). But >> this could easily be implemented once the representation is agreed on. > > DW_AT_endianity attribute is listed in DWARF4 for: > DW_TAG_base_type > DW_TAG_constant > DW_TAG_formal_parameter > DW_TAG_variable > Not really sure how to interpret it e.g. on DW_TAG_variable (or > formal_parameter) if it has DW_TAG_reference_type type - does it talk > about the endianity of what it refers to, or the reference itself, both? > Anyway, the DWARF standard doesn't forbid using it on other kinds of DIEs > and I think emitting it on DW_TAG_member would be natural. > Not sure why you would want it on DW_TAG_array_type, the endianity for > arrays should be specified on the element type, shouldn't it? > Or is array indexing endian dependent?
Maybe endian is index dependent (heh, you never know with Ada!) Richard. > Jakub