From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8029 invoked by alias); 30 Jun 2005 13:15:06 -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 7964 invoked by uid 22791); 30 Jun 2005 13:14:57 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 30 Jun 2005 13:14:57 +0000 Received: from drow by nevyn.them.org with local (Exim 4.51) id 1DnysZ-0002FH-L7; Thu, 30 Jun 2005 09:14:55 -0400 Date: Thu, 30 Jun 2005 13:15:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: Start Fortran support for variable objects. Message-ID: <20050630131454.GA8241@nevyn.them.org> Mail-Followup-To: Nick Roberts , gdb-patches@sources.redhat.com References: <17091.4780.953681.620094@farnswood.snap.net.nz> <20050630025323.GA26397@nevyn.them.org> <17091.46378.720749.411474@farnswood.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17091.46378.720749.411474@farnswood.snap.net.nz> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00388.txt.bz2 On Thu, Jun 30, 2005 at 09:02:34PM +1200, Nick Roberts wrote: > Daniel Jacobowitz writes: > > On Thu, Jun 30, 2005 at 09:29:16AM +1200, Nick Roberts wrote: > > > > > > This patch adjusts the offset from 0 to 1 to allow the display of arrays > > > in Fortran using variable objects. > > > > I see that you're hardcoding this based on language. Can we do it > > based on type instead? Specifically, TYPE_LOW_BOUND and > > TYPE_HIGH_BOUND. We have got type information here - unless I'm > > misreading, var->type should be the type of the array. > > They look pretty similar to me. > > C: > > (top-gdb) p TYPE_LOW_BOUND(var->type) > $18 = 0 > (top-gdb) p* var->type->main_type > $33 = {code = TYPE_CODE_ARRAY, upper_bound_type = BOUND_SIMPLE, > lower_bound_type = BOUND_SIMPLE, name = 0x0, tag_name = 0x0, > objfile = 0x8357618, target_type = 0x8372c74, flags = 0, nfields = 1, > vptr_fieldno = -1, fields = 0x837496c, vptr_basetype = 0x0, type_specific = { > cplus_stuff = 0x0, floatformat = 0x0}} > > Fortran: > > (top-gdb) p TYPE_LOW_BOUND(var->type) > $3 = 0 > (top-gdb) p* var->type->main_type > $8 = {code = TYPE_CODE_ARRAY, upper_bound_type = BOUND_SIMPLE, > lower_bound_type = BOUND_SIMPLE, name = 0x0, tag_name = 0x0, > objfile = 0x8357618, target_type = 0x83654cc, flags = 0, nfields = 1, > vptr_fieldno = -1, fields = 0x83655c4, vptr_basetype = 0x0, > type_specific = {cplus_stuff = 0x0, floatformat = 0x0}} > > I need more of a clue to follow your suggestion. Well, that's what was SUPPOSED to happen, anyway. <1>: Abbrev Number: 4 (DW_TAG_array_type) DW_AT_sibling : DW_AT_type : <2>: Abbrev Number: 5 (DW_TAG_subrange_type) DW_AT_type : DW_AT_upper_bound : 4 I would have expected there to be a lower bound also... but there just isn't. Your patch is more or less OK. Let me reply to it to pick up some formatting comments. -- Daniel Jacobowitz CodeSourcery, LLC