Do not use name-based lookup for unconstrained packed arrays.

* ada-lang.c (find_parallel_type_by_descriptive_type):
        Limit the fallback to name-based lookups to the case where
        the type is a constrained packed array.
This commit is contained in:
Joel Brobecker 2010-01-15 12:07:04 +00:00
parent c389c3dc73
commit 12ab9e09fa
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2010-01-15 Joel Brobecker <brobecker@adacore.com>
Do not use name-based lookup for unconstrained packed arrays.
* ada-lang.c (find_parallel_type_by_descriptive_type):
Limit the fallback to name-based lookups to the case where
the type is a constrained packed array.
2010-01-15 Joel Brobecker <brobecker@adacore.com> 2010-01-15 Joel Brobecker <brobecker@adacore.com>
Enhance gdb-gdb.py to handle main_type.type_specific. Enhance gdb-gdb.py to handle main_type.type_specific.

View file

@ -6687,7 +6687,7 @@ find_parallel_type_by_descriptive_type (struct type *type, const char *name)
older compilers, the descriptive type information is either absent or older compilers, the descriptive type information is either absent or
irrelevant when it comes to packed arrays so the above lookup fails. irrelevant when it comes to packed arrays so the above lookup fails.
Fall back to using a parallel lookup by name in this case. */ Fall back to using a parallel lookup by name in this case. */
if (result == NULL && ada_is_packed_array_type (type)) if (result == NULL && ada_is_constrained_packed_array_type (type))
return ada_find_any_type (name); return ada_find_any_type (name);
return result; return result;