Use bit stride when taking slice of array
authorTom Tromey <tromey@adacore.com>
Wed, 4 Nov 2020 15:49:16 +0000 (08:49 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 4 Nov 2020 15:49:19 +0000 (08:49 -0700)
commit7ff5b9370f4f7c0c75d734aa19b8f020429d4bb5
tree477e1f023488cb143b18423a4aa49e6e5d5e5a7c
parent10f6a3add6b4bdd1c83494cad9e9497271fe0922
Use bit stride when taking slice of array

Testing with -fgnat-encodings=minimal showed that the Ada code failed
to use the bit stride of an array when taking a slice.  This patch
fixes the oversight.

gdb/ChangeLog
2020-11-04  Tom Tromey  <tromey@adacore.com>

* ada-lang.c (ada_value_slice_from_ptr): Use bit size.

gdb/testsuite/ChangeLog
2020-11-04  Tom Tromey  <tromey@adacore.com>

* gdb.ada/array_of_variant.exp: New file.
* gdb.ada/array_of_variant/p.adb: New file.
* gdb.ada/array_of_variant/pck.ads: New file.
* gdb.ada/array_of_variant/pck.adb: New file.
gdb/ChangeLog
gdb/ada-lang.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/array_of_variant.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_of_variant/p.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_of_variant/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/array_of_variant/pck.ads [new file with mode: 0644]