From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77176 invoked by alias); 3 Apr 2015 12:47:28 -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 77162 invoked by uid 89); 3 Apr 2015 12:47: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 12:47:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D8301D37AD; Fri, 3 Apr 2015 08:47:24 -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 9Zq+3rBuOmAa; Fri, 3 Apr 2015 08:47:24 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A9CF0D2FFF; Fri, 3 Apr 2015 08:47:24 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A7EA240EAD; Fri, 3 Apr 2015 05:47:24 -0700 (PDT) Date: Fri, 03 Apr 2015 12:47:00 -0000 From: Joel Brobecker To: Pierre-Marie de Rodat Cc: GDB Patches Subject: Re: [PATCH] Do not consider reference types as dynamic Message-ID: <20150403124724.GC4704@adacore.com> References: <54FEDC09.3050106@adacore.com> <20150323133627.GG5438@adacore.com> <551BB1C9.10006@adacore.com> <551E5309.7090509@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551E5309.7090509@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-04/txt/msg00118.txt.bz2 > >From f3fd1a7e81fad7a0b8e4f483f79b2470a3cf1499 Mon Sep 17 00:00:00 2001 > From: Pierre-Marie de Rodat > Date: Fri, 3 Apr 2015 10:40:52 +0200 > Subject: [PATCH] Do not consider reference types as dynamic > > Even when referenced types are dynamic, the corresponding referencing > type should not be considered as dynamic: it's only a pointer. This > prevents reference type for values not in memory to be resolved. > > gdb/ChangeLog: > 2015-04-03 Pierre-Marie de Rodat > > * gdbtypes.c (is_dynamic_type_internal): Remove special handling > of TYPE_CODE_REF types so that they are not considered as > dynamic depending on the referenced type. > (resolve_dynamic_type_internal): Likewise. > > gdb/testsuite/ChangeLog: > 2015-04-03 Pierre-Marie de Rodat > > * gdb.ada/funcall_ref.exp: New file. > * gdb.ada/funcall_ref/foo.adb: New file. This is OK, thank you, Pierre-Marie. Note that the parameter "top_level" is no longer useful after this patch is applied, which is actually quite a nice side-effect of this patch. I hum'ed and ah'ed about whether to ask that it be removed as part of this patch, but in the end, I decided that this patch was fine without the cleanup, as "top_level" is used a several places, and I felt that cleaning it up here would dilute a bit the essence of this patch. So, I think we can clean it up separately. > diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c > index 217ec70..6fb2e9a 100644 > --- a/gdb/gdbtypes.c > +++ b/gdb/gdbtypes.c > @@ -1752,10 +1752,6 @@ is_dynamic_type_internal (struct type *type, int top_level) Thank you, -- Joel