From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2208 invoked by alias); 16 Mar 2010 15:16:29 -0000 Received: (qmail 2192 invoked by uid 22791); 16 Mar 2010 15:16:28 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 15:16:25 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 950C92BAB50; Tue, 16 Mar 2010 11:16:23 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id w6GFUNE3+zPX; Tue, 16 Mar 2010 11:16:23 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 57FCD2BAB38; Tue, 16 Mar 2010 11:16:22 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 1A80EF5917; Tue, 16 Mar 2010 08:16:21 -0700 (PDT) Date: Tue, 16 Mar 2010 15:16:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: Tom Tromey , Chandru , gdb-patches@sourceware.org Subject: Re: gdb can't print array element for fortran Message-ID: <20100316151621.GB3830@adacore.com> References: <201003121836.24712.chandru@in.ibm.com> <20100315171325.GN3045@adacore.com> <20100315234543.GA25216@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100315234543.GA25216@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00585.txt.bz2 > 2010-03-16 Jan Kratochvil > Chandru > > * dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED. > * valarith.c (value_subscripted_rvalue): Suppress error if > TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED. This seems like a reasonable workaround, especially since we already have some special handling of attr->form == DW_FORM_block1 for range types. So I guess we never have block2/block4 or even block attributes for the upper bound in practice? Just one request: > range_type = create_range_type (NULL, base_type, low, high); > > + if (attr && attr->form == DW_FORM_block1) > + TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1; Can you add a quick comment, with a FIXME to show that this is temporary? There's already some useful comments just slightly earlier in the code, perhaps we just ought to refer to that, somehow. Pre-approved with the addition of the comment. -- Joel