From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84864 invoked by alias); 28 Aug 2018 18:43:37 -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 84851 invoked by uid 89); 28 Aug 2018 18:43:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr1-f66.google.com Received: from mail-wr1-f66.google.com (HELO mail-wr1-f66.google.com) (209.85.221.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Aug 2018 18:43:35 +0000 Received: by mail-wr1-f66.google.com with SMTP id a108-v6so2478791wrc.13 for ; Tue, 28 Aug 2018 11:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ExT5Ux9wdErmGbaL7++TT4yiv+1vyt6wW2z2s/uQFWk=; b=K32wuyhBzyAZ+OuwVhAuiBxqaJAN8yxAuPjVOoGEUUVWYiPQgJIpS1OYafmHXY/3lC Bca7pXQCQxeqMhFk/MERLxJQnoY50W97ZOUDZugCIuht49URg49OyiqzDGEsXrHKHF0o j6Gi3hUW/OQ16iAiLrodrijJMzLxM6daJfIkzVeX9qnnw9vSxEkm1v5bDWHxrjM9rt6z bUkIKWyRjk8L7sormxnwjL7hJgK3HNLBeeIeHr09GQhSeiW79IS1xikrnszcbtt5aqdG auhScItihYKOdqs7BS07bvaOtzvOb9lZI3Y2wUzQoxc1R2gWpYlsDF8TcvA0a45tg4fO GbUQ== Return-Path: Received: from localhost (host86-134-20-86.range86-134.btcentralplus.com. [86.134.20.86]) by smtp.gmail.com with ESMTPSA id t4-v6sm2593657wrb.45.2018.08.28.11.43.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Aug 2018 11:43:31 -0700 (PDT) Date: Tue, 28 Aug 2018 18:43:00 -0000 From: Andrew Burgess To: Tom Tromey Cc: Philippe Waroquiers , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: Allow parenthesis to group arguments to user-defined commands Message-ID: <20180828184331.GJ32506@embecosm.com> References: <1535225533.1438.5.camel@skynet.be> <1535230403.1438.10.camel@skynet.be> <20180825224310.GA32506@embecosm.com> <87lg8q7ai7.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lg8q7ai7.fsf@tromey.com> X-Fortune: I wish I was on a Cincinnati street corner holding a clean dog! X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00706.txt.bz2 * Tom Tromey [2018-08-28 09:53:52 -0600]: > >>>>> "Andrew" == Andrew Burgess writes: > > Andrew> So, my suggestion deliberately avoids using quotes or backslashes as > Andrew> these are bogged down in the existing code. And using (...) is fairly > Andrew> intuitive given GDBs C like expression handling, personally I'd rather > Andrew> write: > Andrew> my_command ({unsigned long long} &global_var) > Andrew> than: > Andrew> my_command {unsigned\ long\ long}\ &global_var > > FWIW I tend to agree with your logic here. > > User-defined argument parsing is broken (and I think there's at least > one bug in bugzilla about this), but at the same time, making breaking > changes seems unfriendly. Your approach doesn't seem to be breaking > anything that is likely to be actually used. Given that the argument passing for user-defined functions is pretty self contained we could, conceivably, implement a whole new system and have a switch to select between them... the existing code does seem rather odd. But ideally, I'd like that to be a project for another day. Thanks, Andrew