This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Cache all static structures and reset cache during resolution
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre-Marie de Rodat <derodat at adacore dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 3 Apr 2015 10:52:26 -0700
- Subject: Re: [PATCH 2/2] Cache all static structures and reset cache during resolution
- Authentication-results: sourceware.org; auth=none
- References: <551E8B6D dot 4070706 at adacore dot com> <551E8BFB dot 1010000 at adacore dot com>
> gdb/ChangeLog:
>
> * ada-lang.c (template_to_static_fixed_type): Return input type
> when it is already fixed. Cache the input type itself when not
> creating a static fixed copy. Make it explicit that we never
> molestate the input type.
> * gdbtypes.c (resolve_dynamic_struct): Reset the
> TYPE_TARGET_TYPE field for resolved copies.
This one looks good to me too, but let's give people until
Mon Apr 13th to comment on the change in gdbtypes.c. I believe
this is the simplest approach, and, to me, the fact that the
TYPE_TARGET_TYPE is currently only used by Ada doesn't make it
a problem for handling it in generic code. But if others object,
then we can use the hack you had in ada-lang before you came up
with this version of the patch (the hack is based on the fixed
version of the type having a backlink to the original type it fixed,
thus allowing us to verify whether the cached TYPE_TARGET_TYPE
was copied from another type and is therefore irrelevant to this
type).
--
Joel