From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26883 invoked by alias); 30 Dec 2005 12:13:40 -0000 Received: (qmail 26875 invoked by uid 22791); 30 Dec 2005 12:13:39 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 Dec 2005 12:13:39 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-146-136.inter.net.il [80.230.146.136]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CHY91017 (AUTH halo1); Fri, 30 Dec 2005 14:13:35 +0200 (IST) Date: Sat, 31 Dec 2005 16:04:00 -0000 Message-Id: From: Eli Zaretskii To: Paul Hilfinger CC: gdb-patches@sourceware.org In-reply-to: <20051230101320.6A16348CBE6@nile.gnat.com> (message from Paul Hilfinger on Fri, 30 Dec 2005 05:13:20 -0500 (EST)) Subject: Re: [PATCH] Assignment of aggregates in Ada Reply-to: Eli Zaretskii References: <20051230101320.6A16348CBE6@nile.gnat.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00319.txt.bz2 > From: Paul Hilfinger > Date: Fri, 30 Dec 2005 05:13:20 -0500 (EST) > > The following set of changes allows assignments from aggregates in > Ada. I will commit in a few days if there is no objection. Thanks. > + else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK) > + { > + if (context == NULL) > + error ("No file or function \"%s\".", raw_name); > + else > + error ("No function \"%s\" in specified context.", raw_name); > + } > + else > + { > + if (nsyms > 1) > + warning ("Function name \"%s\" ambiguous here", raw_name); > + return SYMBOL_BLOCK_VALUE (syms[0].sym); > + } Please be sure to include in _() all strings that are messages displayed to the user. This is in preparation for GDB's i18n, at some future date. > + error ("Illegal attempt to select from type: \"%s\".", name0.ptr); Using ``illegal'' in a context that doesn't deal with laws is a no-no in GNU projects. ``Invalid'' is the usual replacement. > Index: gdb/doc/gdb.texinfo Please include suitable entries for gdb/doc/ChangeLog. > @item > -There are no record or array aggregates. > +There is limited support for array and record aggregates. They are > +permitted only on the right sides of assignments. Changing a > +discriminant's value by means of assignment of an aggregate has an > +undefined effect if that discriminant is used within the record. > +However, one can first modify discriminants by directly assigning to > +them (which normally would not be allowed in Ada), and then performing an > +aggregate assignment. @value{GDBN} is very loose about the usual > +rules concerning aggregates. You may mention only some of the > +components of an array or record aggregate; the rest will retain their > +original values upon assignment. You may freely use dynamic values as > +indices in component associations. You may uses overlapping or > +redundant component associations, although which component values are > +assigned in such cases is not defined. I think an example or two here would help clarify what you are saying. Also a @cindex entry might be a good idea, for example: @cindex array and record aggregates (Ada) Is the description above the only user-visible effect of these massive changes? If not, I'd like to document the rest as well.