From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29770 invoked by alias); 27 Nov 2009 15:34:47 -0000 Received: (qmail 29760 invoked by uid 22791); 27 Nov 2009 15:34:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Nov 2009 15:34:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 626202BAB6B; Fri, 27 Nov 2009 10:34:39 -0500 (EST) 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 DO3YSXhrvoOe; Fri, 27 Nov 2009 10:34:39 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2A13C2BAACC; Fri, 27 Nov 2009 10:34:39 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EA194F5905; Fri, 27 Nov 2009 07:34:35 -0800 (PST) Date: Fri, 27 Nov 2009 15:34:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [commit/Ada] Update comment on how to "fix" dynamic entities Message-ID: <20091127153435.GE18125@adacore.com> References: <20091127015211.GC18125@adacore.com> <83vdgwmj77.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: <83vdgwmj77.fsf@gnu.org> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-11/txt/msg00585.txt.bz2 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 231 Thanks for the corrections, they are always very appreciated. I applied them as follow. 2009-11-27 Joel Brobecker * ada-lang.c: Apply some corrections to the previous comment addition. -- Joel --mojUlQ0s9EVzWg2t Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ada-comment-update.diff" Content-length: 1885 Index: ada-lang.c =================================================================== RCS file: /cvs/src/src/gdb/ada-lang.c,v retrieving revision 1.235 diff -u -p -r1.235 ada-lang.c --- ada-lang.c 27 Nov 2009 01:49:41 -0000 1.235 +++ ada-lang.c 27 Nov 2009 15:31:38 -0000 @@ -8480,15 +8480,15 @@ ada_value_cast (struct type *type, struc Arrays are a little simpler to handle than records, because the same amount of memory is allocated for each element of the array, even if - the amount of space actually used by each element changes from element + the amount of space actually used by each element differs from element to element. Consider for instance the following array of type Rec: type Rec_Array is array (1 .. 2) of Rec; - The actual amount of memory occupied by each element might change - from element to element, depending on the their discriminant value. + The actual amount of memory occupied by each element might be different + from element to element, depending on the value of their discriminant. But the amount of space reserved for each element in the array remains - constant regardless. So we simply need to compute that size using + fixed regardless. So we simply need to compute that size using the debugging information available, from which we can then determine the array size (we multiply the number of elements of the array by the size of each element). @@ -8512,7 +8512,7 @@ ada_value_cast (struct type *type, struc that we also use the adjective "aligner" in our code to designate these wrapper types. - In some cases, the size of allocated for each element is statically + In some cases, the size allocated for each element is statically known. In that case, the PAD type already has the correct size, and the array element should remain unfixed. --mojUlQ0s9EVzWg2t--