From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12112 invoked by alias); 25 Aug 2004 07:24:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12056 invoked from network); 25 Aug 2004 07:24:26 -0000 Received: from unknown (HELO cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com) (81.105.116.12) by sourceware.org with SMTP; 25 Aug 2004 07:24:26 -0000 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com (8.12.11/8.12.11) with ESMTP id i7P7fTgY011416; Wed, 25 Aug 2004 08:41:29 +0100 Subject: Re: [PATCH/RFA] PR gdb/648 (eval.c approval reqd) From: David Lecomber To: Jim Blandy Cc: patches In-Reply-To: References: <1091830216.4188.23.camel@localhost> <1092659964.5816.5.camel@localhost> <1093009988.5529.40.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> Content-Type: text/plain Message-Id: <1093419688.18611.48.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> Mime-Version: 1.0 Date: Wed, 25 Aug 2004 07:24:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00686.txt.bz2 Hi Jim, Yes, that's correct. Cheers David On Wed, 2004-08-25 at 06:52, Jim Blandy wrote: > So, I'm just trying to get my head around what's going on here. Would > you say the following comment change would be correct? > > *** gdbtypes.h.~1.58.~ 2004-08-09 17:42:14.000000000 -0500 > --- gdbtypes.h 2004-08-25 00:51:03.000000000 -0500 > *************** enum type_code > *** 82,88 **** > { > TYPE_CODE_UNDEF, /* Not used; catches errors */ > TYPE_CODE_PTR, /* Pointer type */ > ! TYPE_CODE_ARRAY, /* Array type with lower & upper bounds. */ > TYPE_CODE_STRUCT, /* C struct or Pascal record */ > TYPE_CODE_UNION, /* C union or Pascal variant part */ > TYPE_CODE_ENUM, /* Enumeration type */ > --- 82,108 ---- > { > TYPE_CODE_UNDEF, /* Not used; catches errors */ > TYPE_CODE_PTR, /* Pointer type */ > ! > ! /* Array type with lower & upper bounds. > ! > ! Regardless of the language, GDB represents multidimensional > ! array types the way C does: as arrays of arrays. So an > ! instance of a GDB array type T can always be seen as a series > ! of instances of TYPE_TARGET_TYPE (T) laid out sequentially in > ! memory. > ! > ! Row-major languages like C lay out multi-dimensional arrays so > ! that incrementing the rightmost index in a subscripting > ! expression results in the smallest change in the address of the > ! element referred to. Column-major languages like Fortran lay > ! them out so that incrementing the leftmost index results in the > ! smallest change. > ! > ! This means that, in column-major languages, working our way > ! from type to target type corresponds to working through indices > ! from right to left, not left to right. */ > ! TYPE_CODE_ARRAY, > ! > TYPE_CODE_STRUCT, /* C struct or Pascal record */ > TYPE_CODE_UNION, /* C union or Pascal variant part */ > TYPE_CODE_ENUM, /* Enumeration type */