Specially handle array contexts in Ada expression resolution
A user noticed that the Ada expression code in gdb did not
automatically disambiguate an enumerator in an array context. That
is, an expression like "print array(enumerator)" is not ambiguous,
even if "enumerator" is declared in multiple enumerations, because the
correct one can be found by examining the array's index type.
This patch changes the Ada expression resolution code to handle this
case.
gdb/ChangeLog
2021-01-25 Tom Tromey <tromey@adacore.com>
* ada-lang.c (resolve_subexp): Handle array context.
gdb/testsuite/ChangeLog
2021-01-25 Tom Tromey <tromey@adacore.com>
* gdb.ada/local-enum.exp: Add enumerator resolution test.