From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5971 invoked by alias); 1 Sep 2018 14:20:47 -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 5962 invoked by uid 89); 1 Sep 2018 14:20:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=act X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.149.72) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Sep 2018 14:20:45 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway34.websitewelcome.com (Postfix) with ESMTP id E39F81088E4 for ; Sat, 1 Sep 2018 09:20:43 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id w6lXfq8plBcCXw6lXfJdDg; Sat, 01 Sep 2018 09:20:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xH4fOCYDjDIIpUf5uerAG3WplhT0Wzz2+QrqPep8dOY=; b=vnl8oIMgDJOJ2+pjFYwABA+C5K ATo7X0RXMbkV3q2U7SWHcuChWfIca3xrruj1rqgFjDk1nkDBtM71VqkFh8UMN0pduqkMUhHYSBk6S WrcqTmHrYvWuZgXQ9zGBXiLt0; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:53222 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fw6lX-000hni-L0; Sat, 01 Sep 2018 09:20:43 -0500 From: Tom Tromey To: Philippe Waroquiers Cc: Tom Tromey , Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: Allow parenthesis to group arguments to user-defined commands References: <1535225533.1438.5.camel@skynet.be> <1535230403.1438.10.camel@skynet.be> <20180825224310.GA32506@embecosm.com> <87lg8q7ai7.fsf@tromey.com> <20180828184331.GJ32506@embecosm.com> <1535488137.7778.4.camel@skynet.be> <20180828232948.GK32506@embecosm.com> <1535663976.7778.12.camel@skynet.be> <87h8jaz1zz.fsf@tromey.com> <1535800196.10641.1.camel@skynet.be> Date: Sat, 01 Sep 2018 14:20:00 -0000 In-Reply-To: <1535800196.10641.1.camel@skynet.be> (Philippe Waroquiers's message of "Sat, 01 Sep 2018 13:09:56 +0200") Message-ID: <87zhx1qoxx.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-09/txt/msg00006.txt.bz2 >>>>> "Philippe" =3D=3D Philippe Waroquiers = writes: Philippe> What about the alternative solution to allow a user defined Philippe> command to use $argu0, $argu1, $argu2, ... to do unquoted Philippe> expansion when needed ? I think the problem is that people want to write user-defined commands that act like other gdb commands, and in particular writing a user-defined that takes an expression is, by far, the most common case. But, this proposal would mean that "print" would have one style of quoting, while "user-print" would have another, drastically less nice, style. Personally I think people should just write Python, since it is a much better way. But the CLI is more convenient, so here we are. Philippe> As far as I can see, gdb_argv is escaping single and double quote= s, e.g. Philippe> (gdb) handle 10 'ignore this \'bidule' Philippe> Unrecognized or ambiguous flag word: "ignore this 'bidule". Philippe> (gdb)=C2=A0 Yeah, I misremembered that. Thanks. Tom