From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28946 invoked by alias); 29 Jun 2009 17:29:03 -0000 Received: (qmail 28938 invoked by uid 22791); 29 Jun 2009 17:29:03 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Jun 2009 17:28:55 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n5THSEZn200550 for ; Mon, 29 Jun 2009 17:28:14 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5THSDef2625644 for ; Mon, 29 Jun 2009 19:28:13 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5THSDEh005663 for ; Mon, 29 Jun 2009 19:28:13 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n5THSCoJ005640; Mon, 29 Jun 2009 19:28:12 +0200 Message-Id: <200906291728.n5THSCoJ005640@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 29 Jun 2009 19:28:12 +0200 Subject: Re: [rfa/Ada] Restructure array bounds routines to remove builtin types To: brobecker@adacore.com (Joel Brobecker) Date: Mon, 29 Jun 2009 17:29:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20090629153649.GA7584@adacore.com> from "Joel Brobecker" at Jun 29, 2009 08:36:49 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00828.txt.bz2 Joel Brobecker wrote: > Looks OK to me, and verified also against AdaCore's testsuite > on x86-linux (DWARF and stabs). Thanks for the quick review! I've committed the patch now. > Just one tiny request: > > > -struct type * > > -ada_index_type (struct type *type, int n) > > +static struct type * > > +ada_index_type (struct type *type, int n, const char *name) > > Would you mind documenting what this new NAME parameter is supposed > to be? Here's what I committed on top of the original patch: ChangeLog: * ada-lang.c (ada_index_type): Update comment. Index: gdb/ada-lang.c =================================================================== RCS file: /cvs/src/src/gdb/ada-lang.c,v retrieving revision 1.217 diff -u -r1.217 ada-lang.c --- gdb/ada-lang.c 29 Jun 2009 17:22:10 -0000 1.217 +++ gdb/ada-lang.c 29 Jun 2009 17:24:55 -0000 @@ -2408,7 +2408,10 @@ } /* The type of nth index in arrays of given type (n numbering from 1). - Does not examine memory. */ + Does not examine memory. Throws an error if N is invalid or TYPE + is not an array type. NAME is the name of the Ada attribute being + evaluated ('range, 'first, 'last, or 'length); it is used in building + the error message. */ static struct type * ada_index_type (struct type *type, int n, const char *name) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com