From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21753 invoked by alias); 29 Jun 2009 15:38:54 -0000 Received: (qmail 21740 invoked by uid 22791); 29 Jun 2009 15:38:53 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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; Mon, 29 Jun 2009 15:38:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 765EB2BAAE1; Mon, 29 Jun 2009 11:38:45 -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 rawUnrnltOG8; Mon, 29 Jun 2009 11:38:45 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B3F2A2BAAAD; Mon, 29 Jun 2009 11:38:44 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A87B6F5AF0; Mon, 29 Jun 2009 08:38:42 -0700 (PDT) Date: Mon, 29 Jun 2009 15:38:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfa/Ada] Restructure fixed array range fall-back to remove builtin types Message-ID: <20090629153842.GB7584@adacore.com> References: <200906261552.n5QFqLHr029329@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906261552.n5QFqLHr029329@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-06/txt/msg00816.txt.bz2 > I've tested this on amd64-linux with no regressions, however that doesn't > say much, as the FSF mainline Ada compiler often doesn't even generate _XA > types (the front-end generates them, but the middle-end never emits them > because it considers them unused ...). It's hard to test, because a failure to find the target type of an XA type would be a bug in the compiler. So this code is really there to make things a little more robust. > * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument. > Fall back to orig_type as index type if symbol lookup fails. > Allocate result types from ORIG_TYPE's objfile. > (ada_array_bound_from_type, to_fixed_array_type, > ada_evaluate_subexp): Pass original index type to > to_fixed_range_type. Do not pass objfile. > > * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument. > Fall back to orig_type as index type if symbol lookup fails. > (print_array_type, ada_print_type): Pass original index type > to print_range_type_named. This makes sense to me, and I verified that you handle the case of array index types that are range types. So OK. -- Joel