Avoid crash in ada-lang.c:to_fixed_array_type
When debugging Ada programs compiled by certain versions of GNAT with
-fgnat-encodings=minimal, gdb can crash. These crashes occur when
running the gdb test suite, once some of the later patches in this
series have been applied.
This patch works around the bug by throwing an exception in the
failing case. I did not implement a full fix because GNAT has been
changed to emit better DWARF, and so in the near future this will stop
being a problem. (Currently, users don't generally use
-fgnat-encodings=minimal, and the GNAT default will only be changed in
a fully-patched compiler.)
gdb/ChangeLog
2020-11-04 Tom Tromey <tromey@adacore.com>
* ada-lang.c (to_fixed_array_type): Error if
decode_constrained_packed_array_type returns NULL.