]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add Ada test case with long array indices
authorTom Tromey <tromey@adacore.com>
Wed, 27 Aug 2025 19:30:46 +0000 (13:30 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 11 Sep 2025 17:59:58 +0000 (11:59 -0600)
commit2f1056944868118f93238fca409e1529549d3d08
treef6900f0d8a260214646133eac4052ebc42260ea1
parent6c82831fe65d1c94f776df3c2cbe6309768ed730
Add Ada test case with long array indices

This patch adds a test case to test that the previous two patches did
their job.

With the current gdb, this test fails:

    (gdb) print some_regular_access.all
    Value out of range.

The bug here is that the array has an index type that is wider than
'int', which is perfectly acceptable in Ada.

Note that this series doesn't quite go far enough: in Ada the index
could be a 128-bit integer.  This change would be more invasive; and
in practice this doesn't really seem to come up much -- so I've
deferred it.
gdb/testsuite/gdb.ada/array_long_idx.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_long_idx/main.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_long_idx/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_long_idx/pck.ads [new file with mode: 0644]