From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6116 invoked by alias); 24 Nov 2014 15:36:52 -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 6106 invoked by uid 89); 24 Nov 2014 15:36:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f176.google.com Received: from mail-wi0-f176.google.com (HELO mail-wi0-f176.google.com) (209.85.212.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 24 Nov 2014 15:36:50 +0000 Received: by mail-wi0-f176.google.com with SMTP id ex7so6077562wid.9 for ; Mon, 24 Nov 2014 07:36:47 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.90.16 with SMTP id bs16mr19667380wib.4.1416843407595; Mon, 24 Nov 2014 07:36:47 -0800 (PST) Received: by 10.27.132.70 with HTTP; Mon, 24 Nov 2014 07:36:47 -0800 (PST) In-Reply-To: <20141124071258.GI5774@adacore.com> References: <20141123042417.GA839@adacore.com> <87bnny45zi.fsf@igel.home> <20141123095317.GE5774@adacore.com> <20141124071258.GI5774@adacore.com> Date: Mon, 24 Nov 2014 15:36:00 -0000 Message-ID: Subject: Re: RFC: "set" command with 2 arguments instead of one? From: Doug Evans To: Joel Brobecker Cc: Andreas Schwab , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00605.txt.bz2 On Sun, Nov 23, 2014 at 11:12 PM, Joel Brobecker wrote: >> This feels like a case where we need to at least think about some >> future-proofing. >> One way some commands separate expressions is with commas. >> I'm not fond of optional commas (setting aside the thread on >> info macro -at LOCATION,). >> IOW, if it turns out that we want to use commas down the road >> to separate expressions here, then I'd prefer the commas >> be required today. >> E.g., set mpx bound ADDR, LBOUND, UBOUND > >> As for how to process multiple arguments to a "set" command, >> one way would be to stage the value in a string parameter, >> and then have a set handler post-process the result. > > I think using commas systematically is making it worse for ourselves, > since it prevents us from using gdb_buildargv to parse the command > arguments for us. Commas also have a meaning in C, so arguably > they could be used in expressions as well. But, if that's the way > people prefer, then having a standard gdb_buildargv-like API that > everyone consistently uses will make it easier for me to accept > that decision. fwiw, I *like* buildargv. But quoting expressions, not so much. :-) In the end, for something like this I'm ok with either.