From: Joel Brobecker Date: Fri, 15 Jan 2010 12:07:04 +0000 (+0000) Subject: Do not use name-based lookup for unconstrained packed arrays. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=12ab9e09fa95b49831c733ac432e4f40d76136a6;p=binutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b42f33f5cbc..4d0431a3e33 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2010-01-15 Joel Brobecker + + 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 Enhance gdb-gdb.py to handle main_type.type_specific. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 24def9589bf..8f9071172fc 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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 irrelevant when it comes to packed arrays so the above lookup fails. 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 result;