From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5939 invoked by alias); 23 Nov 2014 09:53:21 -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 5922 invoked by uid 89); 23 Nov 2014 09:53:20 -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 09:53:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 425C51166A2; Sun, 23 Nov 2014 04:53: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 Lgi2gvgs0XJC; Sun, 23 Nov 2014 04:53:18 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CEE85116679; Sun, 23 Nov 2014 04:53:17 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 2A20C40F79; Sun, 23 Nov 2014 13:53:17 +0400 (RET) Date: Sun, 23 Nov 2014 09:53:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: RFC: "set" command with 2 arguments instead of one? Message-ID: <20141123095317.GE5774@adacore.com> References: <20141123042417.GA839@adacore.com> <87bnny45zi.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bnny45zi.fsf@igel.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00560.txt.bz2 > > It proposes the introduction of a couple of commands, one to dump > > the contents of the of the bounds table, and one to set the bounds > > for any given address. Since those commands are MPX-specific, > > I would like to have them prefixed somehow. But the beyond the > > fact that I'd like to have them prefixed, I was wondering if > > set/show commands could be used for that. Eg: > > > > show mpx bound ADDR > > set mpx bound ADDR LBOUND UBOUND > > > > The reason why I am asking for comments is that the "set" command > > above has a syntax which is slightly unusual for "set" commands > > in the sense that "set" commands nearly always only have one argument, > > whereas it has 3 in this case. > > How do you parse the arguments if they are arbitrary expressions? I think that this is a question which is othogonal to the question I am asking. If you need a command that takes multiple arguments, and some of these arguments are going to be arbitrary expressions, you're going to have a parsing problem regardless of the name of the command you're choosing. And each command, regardless of the name of the command they decide on, can determine how they handle it. For instance, they could use quoting, a la shell. But in the particular case that interests us, there are no arbitrary expressions as of yet. -- Joel