From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54203 invoked by alias); 22 Apr 2019 21:14:13 -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 54194 invoked by uid 89); 22 Apr 2019 21:14:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=grammar, HContent-Transfer-Encoding:8bit X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Apr 2019 21:14:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1555967650; x=1587503650; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZP+FD+hz4l42i2QNaMtcfTfo5hdWDuFODjzRBg/kmYM=; b=xwQQEXk180XZmbmd7OwdUDchUq3hMJ4DtPrbr9/XzDU4iaVtwnCwzX7e lC1o6NA0Jf02bx1adG3mr7Q08Y1ENg==; Received: from 45.123-131-109.adsl-dyn.isp.belgacom.be (HELO md) ([109.131.123.45]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 22 Apr 2019 23:14:08 +0200 Message-ID: <1555967647.22002.7.camel@skynet.be> Subject: Re: [RFA 0/4] Implement | (pipe) command. From: Philippe Waroquiers To: Abhijit Halder Cc: "gdb-patches@sourceware.org ml" Date: Mon, 22 Apr 2019 21:14:00 -0000 In-Reply-To: References: <20190420212153.30934-1-philippe.waroquiers@skynet.be> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00427.txt.bz2 Hello Abhijit, Yes, the fact that the command line interface of GDB has no 'formal grammar' is sometimes making things difficult. In this case, I thought it was not particularly important to support | characters in the gdb command, but I might be wrong. If we want to handle this case, then I would prefer to have an optional argument: e.g. pipe [-dX] ... would indicate to use the character X as delimiter between the GDB command and the shell command. This syntax is lightweight, and still allows by default to re-run the previous command with || some_shell_command In any case, I agree that either such case should be properly handled e.g. with [-dX] or at least the limitation should be documented in the user manual. Thanks for the feedback, Philippe On Tue, 2019-04-23 at 02:14 +0530, Abhijit Halder wrote: > Hi Philippe, > > If I see it correctly, the syntax of the command is > pipe | > If the gdb command contains '|' the above syntax will be a problem. > I suggest below syntax  > pipe > Here the advantage is the delimiter can be anything and conveniently be chosen by the user. > > I made a similar attempt few years back. > https://sourceware.org/ml/gdb-patches/2012-01/msg00098.html > > This you can take this as a reference. > > Thanks, > Abhijit Halder > > > > On Sun, Apr 21, 2019 at 2:52 AM Philippe Waroquiers wrote: > > This patch series adds the pipe command, that allows to send the output > > of a GDB command to a shell command. > > > > The first patch allows a command to repeat a previous command. > > Currently only used by the pipe command added in this series, but > > the idea is that the slash command will also use this feature to > > repeat a previous command. > > > > > >