From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3745 invoked by alias); 1 Mar 2006 05:05:09 -0000 Received: (qmail 3735 invoked by uid 22791); 1 Mar 2006 05:05:08 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 01 Mar 2006 05:05:05 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FEJWH-0004xh-RF; Wed, 01 Mar 2006 00:05:01 -0500 Date: Wed, 01 Mar 2006 05:05:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Wu Zhou , gdb-patches@sources.redhat.com Subject: Re: [RFC]: Document patch for F90 derived type support Message-ID: <20060301050501.GA18703@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Wu Zhou , gdb-patches@sources.redhat.com References: <20060228135310.GA25487@nevyn.them.org> <20060301043203.GA17621@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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 X-SW-Source: 2006-03/txt/msg00004.txt.bz2 On Wed, Mar 01, 2006 at 06:53:44AM +0200, Eli Zaretskii wrote: > > > I did some comparison between g77 and gfortran. In the aspect of the > > > compiler-generated DW_TAG_base_type, g77 uses "byte", "word" and "integer" > > > for "integer*1", "integer*2" and "integer*4" respectively. And gfortran > > > seems to adopt a new mechanism, it uses "int1", "int2" and "int4" > > > respectively. So it might also make some sense. At lease the debugger > > > user can guess the meaning from these words. :-) > > > > I think they're close enough to display for now > > ``For now''? Are we in a hurry to release GDB or something? No, but my point was that there is no urgency in fixing it, which allows us to fix gfortran instead. > > I spoke with Paul Brook and there shouldn't be any trouble changing > > them if we want to. > > But what about the versions that are already there? We want GDB to > behave consistently, even of gfortran does not. This is the same name that, e.g., gfortran probably uses in some error messages. I believe there's value in being consistent with the compiler that the user is actually using. You can argue it either way, I don't disagree. I don't see either side as particularly more compelling than the other. For C++ we've been leaning towards consistency within GDB, although we mostly implement consistency with the user's compiler - and in some cases there's no choice about it. > > Eli, I agree that it would be reasonable to ignore them; but I don't > > think there's any particularly easy way to do it. > > ??? Won't something as simple as > > if (strcmp ("int4", ...) == 0) > printf_filtered ("integer*4"); > > do? What am I missing? No, it can't be quite that simple, because current versions of Fortran do support user-named types - "int4" does not necessarily imply integer(4). And future versions of the language may even have typedefs for basic types. Paul also corrected me on the naming - this would be integer(4) apparently, integer*4 is something different. -- Daniel Jacobowitz CodeSourcery