From 12ab9e09fa95b49831c733ac432e4f40d76136a6 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 15 Jan 2010 12:07:04 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 7 +++++++ gdb/ada-lang.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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; -- 2.30.2