From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19911 invoked by alias); 23 Nov 2014 03:27:23 -0000 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 Received: (qmail 19899 invoked by uid 89); 23 Nov 2014 03:27:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 23 Nov 2014 03:27:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8245A116699; Sat, 22 Nov 2014 22:27:18 -0500 (EST) 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 4nmxYUluGKk7; Sat, 22 Nov 2014 22:27:18 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1AF62116695; Sat, 22 Nov 2014 22:27:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 4701540F79; Sun, 23 Nov 2014 07:27:17 +0400 (RET) Date: Sun, 23 Nov 2014 03:27:00 -0000 From: Joel Brobecker To: Stan Shebs Cc: "gdb-patches@sourceware.org" , David Taylor Subject: Re: two agent expression nits (one line each) Message-ID: <20141123032717.GA5774@adacore.com> References: <14583.1410458050@usendtaylorx2l> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14583.1410458050@usendtaylorx2l> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00548.txt.bz2 Hi Stan Would you mind looking into this? David's comments seem reasonable, but it would be nice to confirm that what we currently do is what we had meant to do :-). Thanks! On Thu, Sep 11, 2014 at 01:54:10PM -0400, David Taylor wrote: > In gdb/doc/agentexpr.texi you''ll find the text: > > @item @code{setv} (0x2d) @var{n}: @result{} @var{v} > Set trace state variable number @var{n} to the value found on the top > of the stack. The stack is unchanged, so that the value is readily > available if the assignment is part of a larger expression. The > handling of @var{n} is as described for @code{getv}. > > The @item line and the following text do no agree with one another. I'm > guessing that the text is correct, in which case this line: > > @item @code{setv} (0x2d) @var{n}: @result{} @var{v} > > should be changed to this: > > @item @code{setv} (0x2d) @var{n}: @var{v} @result{} @var{v} > > Additionally, in gdb/common/ax.def we find the line: > > DEFOP (setv, 2, 0, 0, 1, 0x2d) > > >From the comment earlier in the file: > > Each line is of the form: > > DEFOP (name, size, data_size, consumed, produced, opcode) > [...] > CONSUMED is the number of stack elements consumed. > PRODUCED is the number of stack elements produced. > > which is saying that nothing is consumed and one item is produced. Both > should be 0 or both should be 1. Setting them both to 1 seems better > since if nothing is on the stack an error will occur. So, it should be > changed to: > > DEFOP (setv, 2, 0, 1, 1, 0x2d) > > David -- Joel