From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125874 invoked by alias); 3 Apr 2015 17:52:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 125865 invoked by uid 89); 3 Apr 2015 17:52:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 03 Apr 2015 17:52:28 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 84E90D37E9; Fri, 3 Apr 2015 13:52:26 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oKnpL6jiWXYm; Fri, 3 Apr 2015 13:52:26 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 551DDD36BC; Fri, 3 Apr 2015 13:52:26 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 7808440EAD; Fri, 3 Apr 2015 10:52:26 -0700 (PDT) Date: Fri, 03 Apr 2015 17:52:00 -0000 From: Joel Brobecker To: Pierre-Marie de Rodat Cc: GDB Patches Subject: Re: [PATCH 2/2] Cache all static structures and reset cache during resolution Message-ID: <20150403175226.GG4704@adacore.com> References: <551E8B6D.4070706@adacore.com> <551E8BFB.1010000@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551E8BFB.1010000@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-04/txt/msg00124.txt.bz2 > 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