From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20303 invoked by alias); 25 Aug 2004 05:53:21 -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 20294 invoked from network); 25 Aug 2004 05:53:20 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Aug 2004 05:53:20 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7P5rJS0030452 for ; Wed, 25 Aug 2004 01:53:19 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7P5rH303997; Wed, 25 Aug 2004 01:53:18 -0400 To: David Lecomber Cc: patches Subject: Re: [PATCH/RFA] PR gdb/648 (eval.c approval reqd) References: <1091830216.4188.23.camel@localhost> <1092659964.5816.5.camel@localhost> <1093009988.5529.40.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> From: Jim Blandy Date: Wed, 25 Aug 2004 05:53:00 -0000 In-Reply-To: <1093009988.5529.40.camel@cpc4-oxfd5-5-0-cust12.oxfd.cable.ntl.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-08/txt/msg00685.txt.bz2 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 */