This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Cache all static structures and reset cache during resolution


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]