binutils-gdb/gdb/testsuite/gdb.ada/scalar_storage
Tom Tromey 7737b13364 Handle DW_AT_endianity on enumeration types
A user found that gdb would not correctly print a field from an Ada
record using the scalar storage order feature.  We tracked this down
to a combination of problems.

First, GCC did not emit DW_AT_endianity on the enumeration type.
DWARF does not specify this, but it is an obvious and harmless
extension.  This was fixed in GCC recently:

    https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642347.html
    https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5d8b60effc7268448a94fbbbad923ab6871252cd

Second, GDB did not handle this attribute on enumeration types.  This
patch makes this change and adds a test case that will pass with the
patched GCC.

So far, the GCC patch isn't on the gcc-13 branch; but if it ever goes
in, the test case in this patch can be updated to reflect that.

Reviewed-By: Keith Seitz <keiths@redhat.com>
2024-01-24 07:45:04 -07:00
..
pck.adb
pck.ads
storage.adb Handle DW_AT_endianity on enumeration types 2024-01-24 07:45:04 -07:00