From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31521 invoked by alias); 14 Dec 2010 10:27:58 -0000 Received: (qmail 31512 invoked by uid 22791); 14 Dec 2010 10:27:57 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate6.uk.ibm.com (HELO mtagate6.uk.ibm.com) (194.196.100.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Dec 2010 10:27:51 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate6.uk.ibm.com (8.13.1/8.13.1) with ESMTP id oBEARmdo020210 for ; Tue, 14 Dec 2010 10:27:48 GMT Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id oBEARolJ3657932 for ; Tue, 14 Dec 2010 10:27:50 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id oBEARmCs025408 for ; Tue, 14 Dec 2010 03:27:48 -0700 Received: from leonard.localnet (dyn-9-152-224-32.boeblingen.de.ibm.com [9.152.224.32]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id oBEARihp025327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Dec 2010 03:27:48 -0700 From: Ken Werner To: Joel Brobecker Subject: Re: [patch] DW_AT_byte_size for array type entries Date: Tue, 14 Dec 2010 10:27:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-23-generic-pae; KDE/4.5.1; i686; ; ) Cc: Tom Tromey , gdb-patches@sourceware.org References: <201010191323.57251.ken@linux.vnet.ibm.com> <201012132103.09320.ken@linux.vnet.ibm.com> <20101214054150.GJ2596@adacore.com> In-Reply-To: <20101214054150.GJ2596@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012141127.43346.ken@linux.vnet.ibm.com> X-IsSubscribed: yes 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 X-SW-Source: 2010-12/txt/msg00224.txt.bz2 On Tuesday, December 14, 2010 6:41:50 am Joel Brobecker wrote: > > 2010-12-13 Ken Werner > > > > * valops.c (value_one): Use get_array_bounds to compute the number > > of array elements instead of dividing the length of the array by the > > length of the element types. > > * valarith.c (value_complement, value_neg): Likewise. > > This is OK. Patch committed: http://sourceware.org/ml/gdb-cvs/2010-12/msg00063.html > As a followup patch, how about defining a new function `get_array_length' > next to get_array_bounds? That way, you can factorize of this code that > keeps being repeated... Ok. Regards Ken