From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16009 invoked by alias); 2 Aug 2011 06:54:41 -0000 Received: (qmail 15988 invoked by uid 22791); 2 Aug 2011 06:54:40 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Aug 2011 06:54:19 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p726sIQP010403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Aug 2011 02:54:18 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p726sG9w007690 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 2 Aug 2011 02:54:18 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p726sEjl017686; Tue, 2 Aug 2011 08:54:14 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p726sC2x017680; Tue, 2 Aug 2011 08:54:12 +0200 Date: Tue, 02 Aug 2011 06:54:00 -0000 From: Jan Kratochvil To: Abhijit Halder Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. Message-ID: <20110802065411.GA23915@host1.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-08/txt/msg00023.txt.bz2 On Fri, 29 Jul 2011 15:35:10 +0200, Abhijit Halder wrote: On Fri, Jul 29, 2011 at 6:45 PM, Abhijit Halder wrote: > This is the implementation of a new gdb command, named 'pipe', to make > ease of I/O communication between gdb and shell. > The syntax of this command is shown as follows: > (gdb) pipe [option] gdb-cmd shell-cmd > List of options go with pipe command: >  -r   gdb reads output of shell-command from pipe >  -w  gdb passes output of a command to shell to process. When is useful to feed input of a GDB command from some file/process? It is IMO useful only for `run' but that will not work this way. >  -    end of gdb option list > dlim (delimiter) is a single ASCII character from the set below: > {|/\'"`#@!$%^} (We actually can remove this restriction). I would prefer first to agree on the proper syntax. I do not find (gdb) pipe | print 1 | less to be something a new user will ever try whether it does not work. The original idea of: (gdb) print 1 | less looks fine to me as in normal cases one never uses `|' in the GDB commands. Still for example for the `echo' GDB command one may use `|' as both the `echo' argument and also one may want to pass the output to some shell. If there is pipe `|' GDB could support also redirections '>', '>>', '2>&1', '&>', '|&' besides '|' etc. There could be some disable of the option being enabled by default: (gdb) set shell-metachars off Thanks, Jan