From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68864 invoked by alias); 7 Sep 2018 20:36:09 -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 68100 invoked by uid 89); 7 Sep 2018 20:36:09 -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=abc, inclination, risk X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.146.7) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Sep 2018 20:36:06 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 5AB1F6DC7 for ; Fri, 7 Sep 2018 15:36:05 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id yNU5fnV1jBcCXyNU5fFHOG; Fri, 07 Sep 2018 15:36:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=cm10u0Db9ehFhuMPKumA/SGM4rYJCMnqE397AGxgCHE=; b=breNlLTdvugBKjIx/txtseihjw c6Lu4UIGuQS36T5EZb340RCnC/a3pQdPnhtof+K/fdVCYJlXb9+CQ44ETrlb4o5mfo4MEjCi6yWIH PjGz0jQVvHJvKWt0vPg/8lcQX; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:51030 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fyNU5-001bxq-34; Fri, 07 Sep 2018 15:36:05 -0500 From: Tom Tromey To: Andrew Burgess Cc: gdb-patches@sourceware.org, Philippe Waroquiers , Tom Tromey Subject: Re: [PATCHv2] gdb: Rewrite argument handling for user-defined commands References: <20180906232904.13286-1-andrew.burgess@embecosm.com> Date: Fri, 07 Sep 2018 20:36:00 -0000 In-Reply-To: <20180906232904.13286-1-andrew.burgess@embecosm.com> (Andrew Burgess's message of "Fri, 7 Sep 2018 00:29:04 +0100") Message-ID: <87tvn1vydn.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 X-SW-Source: 2018-09/txt/msg00122.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> This commit changes how quoting works so that the quotes are NOT now Andrew> included in the argument passed. If the user wants to include quotes, Andrew> they would now need to use nested quotes, so "\"abc\"" will pass the Andrew> argument "abc". Andrew> It is also possible to use single quotes, so '"abc"' will also pass Andrew> the argument "abc". Andrew> As currently there's no documentation for how quoting works in Andrew> user-defined commands this commit adds documentation for the new Andrew> behaviour. Andrew> The big risk with this commit is that this does change how arguments Andrew> are passed to user-defined commands, and this might causes issues for Andrew> existing users. I think this change goes against the compatibility approach I discussed in that earlier thread -- it changes the syntax of a command in a way that is likely to be used in practice. In my opinion, the documentation issue in cases like this is not a strong argument in favor of allowing a change. That's because users will often resort to trial-and-error to get gdb to do what they want. So unless the documentation is very clear, in practice, and especially over long periods of time, behavior is locked to the implementation. So, my own inclination is to say no to this patch, though I welcome & will listen to other responses. I'd accept a patch adding an option to define, though as I mentioned earlier, in a case like that I think it's better to design something very good rather than to try to patch things piecemeal; the latter being how gdb ended up in this situation in the first place. Tom