From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9718 invoked by alias); 15 Jan 2004 17:11:48 -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 9656 invoked from network); 15 Jan 2004 17:11:46 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 15 Jan 2004 17:11:46 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 835231A440D; Thu, 15 Jan 2004 12:10:02 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16390.51562.449957.635960@localhost.redhat.com> Date: Thu, 15 Jan 2004 17:11:00 -0000 To: Joel Brobecker Cc: Elena Zannoni , schwab@suse.de, gdb-patches@sources.redhat.com Subject: Re: [PATCH] Handle DW_TAG_subrange_type In-Reply-To: <20040114172803.GO4978@gnat.com> References: <16381.59531.51774.449779@localhost.redhat.com> <20040114172803.GO4978@gnat.com> X-SW-Source: 2004-01/txt/msg00388.txt.bz2 Joel Brobecker writes: > Hello Helena, > > > I agree that the subrange type should be handled in more places, so ok > > with Joel's calls for that. > > > > Almost identical code is in read_array_type. Would it be possible to > > unify that as well into a single function read_subrange_type? I.e. do > > you think that that "else if (attr->form == DW_FORM_block1)" clause > > will interfere with the ADA case? If not and we can unify them, then, > > I'd prefer the version that Andreas has, since it handles the default > > high and low, not as -1, but the same as the original code. > > Here is a revised patch, which I hope addresses all your comments. > Tested on x86-linux, using gcc HEAD. No regression. > > I should also mention that I am about to send a patch to gcc-patches, > which slightly modifies the dwarf-2 output, and will likely cause GCC > to generate more of these subrange_type DIEs. It is more a cleanup > patch than anything else, but I did verify that GDB together with the > attached patch handle the new GCC without trouble. > > 2004-01-14 J. Brobecker > > * dwarf2read.c (dwarf2_non_const_array_bound_ignored_complaint): > Delete, no longer used. > (read_subrange_type): New function, mostly extracted from > read_array_type(). > (read_array_type): Replace extracted code by call to > read_subrange_type(). > (dwarf2_get_attr_constant_value): New function. > (scan_partial_symbols): Add handling for DW_TAG_subrange_type. > (add_partial_symbol): Likewise. > (process_die): Likewise. > (new_symbol): Likewise. > (read_type_die): Likewise. > > OK to apply? sure elena