From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6106 invoked by alias); 14 Jun 2014 13:21:39 -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 6094 invoked by uid 89); 14 Jun 2014 13:21:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Jun 2014 13:21:37 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5EDLXSd000961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 14 Jun 2014 09:21:33 -0400 Received: from host2.jankratochvil.net (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5EDLTFE023556 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Sat, 14 Jun 2014 09:21:31 -0400 Date: Sat, 14 Jun 2014 13:21:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Keven Boell , gdb-patches@sourceware.org, sanimir.agovic@intel.com, Tom Tromey Subject: Re: [PATCH 02/23] dwarf: add DW_AT_data_location support Message-ID: <20140614132128.GA30958@host2.jankratochvil.net> References: <1401861266-6240-1-git-send-email-keven.boell@intel.com> <1401861266-6240-3-git-send-email-keven.boell@intel.com> <20140610121014.GA6480@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140610121014.GA6480@adacore.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00540.txt.bz2 On Tue, 10 Jun 2014 14:10:14 +0200, Joel Brobecker wrote: > > --- a/gdb/gdbtypes.c > > +++ b/gdb/gdbtypes.c > > @@ -1635,8 +1635,12 @@ is_dynamic_type (struct type *type) > > or the elements it contains have a dynamic contents. */ > > if (is_dynamic_type (TYPE_INDEX_TYPE (type))) > > return 1; > > - else > > - return is_dynamic_type (TYPE_TARGET_TYPE (type)); > > + else if (TYPE_DATA_LOCATION (type) != NULL > > + && (TYPE_DATA_LOCATION_KIND (type) == PROP_LOCEXPR > > + || TYPE_DATA_LOCATION_KIND (type) == PROP_LOCLIST)) > > + return 1; > > + else > > + return is_dynamic_type (TYPE_TARGET_TYPE (type)); > > The comment needs to be updated. Your change is also splitting > the "if bounds or contents is dynamic" logic. Perhaps you could > simply add the data-location check at the start of the function > with a command that says: A type which has a data_location which > [bla bla] is a dynamic type The indentation is somehow incorrect there. Jan