From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15159 invoked by alias); 3 Nov 2005 05:58:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15140 invoked by uid 22791); 3 Nov 2005 05:58:44 -0000 Received: from ausmtp01.au.ibm.com (HELO ausmtp01.au.ibm.com) (202.81.18.186) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 03 Nov 2005 05:58:44 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp01.au.ibm.com (8.12.10/8.12.10) with ESMTP id jA361oug158036 for ; Thu, 3 Nov 2005 17:01:51 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.250.244]) by sd0208e0.au.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id jA361dGE175452 for ; Thu, 3 Nov 2005 17:01:39 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11/8.13.3) with ESMTP id jA35wbYh019764 for ; Thu, 3 Nov 2005 16:58:37 +1100 Received: from [9.181.133.252] ([9.181.133.252]) by d23av03.au.ibm.com (8.12.11/8.12.11) with ESMTP id jA35wZmM019708; Thu, 3 Nov 2005 16:58:36 +1100 Date: Thu, 03 Nov 2005 16:09:00 -0000 From: Wu Zhou To: Jim Blandy cc: David Lecomber , gdb-patches@sources.redhat.com Subject: Re: [RFC]: Testcase for gdb's handling of Fortran's column-first array In-Reply-To: Message-ID: References: <1130918595.9928.22.camel@cpc2-oxfd8-3-0-cust199.oxfd.cable.ntl.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-11/txt/msg00057.txt.bz2 On Wed, 2 Nov 2005, Jim Blandy wrote: > > David Lecomber writes: > > I've not checked gfortran behaviour -- if it works, it's either because > > gfortran haven't fixed the original issue, or they changed the > > expression that we check the 'producer' against before making the swap > > round (you'll find that in dwarf2readc). > > It's worth pointing out that, if the type includes an explicit > DW_AT_ordering attribute, GDB uses that, and doesn't check the > producer string at all. So if g77 gets fixed, they could avoid > running afoul of the "GNU F77" check simply by making their ordering > explicit. I just noticed that there is an attribute for array index ordering. It is very good IMO. But AFAIK, the g77 is not in active development nowadays. So maybe we can suggest that gfortran developers adopt this so that gdb could handle it more gracefully. GFortran developers, Would anyone of you feel like adding this attribute into your dwarf output? It is much convenient for gdb to handle the index ordering of Fortran arrays. > > This is still a bit of a kludge: the Dwarf spec says that, in the > absence of an ordering attribute, the ordering is the default for the > language. So an explicit "column major" attribute in a Fortran > compilation unit would be redundant. I only mention it as a way for > G77 to avoid breaking old GDB's. > Regards - Wu Zhou