From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2166 invoked by alias); 5 Aug 2011 08:44:24 -0000 Received: (qmail 2157 invoked by uid 22791); 5 Aug 2011 08:44:24 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ew0-f41.google.com (HELO mail-ew0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Aug 2011 08:43:50 +0000 Received: by ewy9 with SMTP id 9so1531670ewy.0 for ; Fri, 05 Aug 2011 01:43:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.3.213 with SMTP id 21mr628063ebo.26.1312533828498; Fri, 05 Aug 2011 01:43:48 -0700 (PDT) Received: by 10.213.16.210 with HTTP; Fri, 5 Aug 2011 01:43:48 -0700 (PDT) In-Reply-To: <20110804084245.GA32427@host1.jankratochvil.net> References: <20110802065411.GA23915@host1.jankratochvil.net> <20110802154450.GA19759@host1.jankratochvil.net> <20110804084245.GA32427@host1.jankratochvil.net> Date: Fri, 05 Aug 2011 08:44:00 -0000 Message-ID: Subject: Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. From: Abhijit Halder To: Jan Kratochvil Cc: Sergio Durigan Junior , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00094.txt.bz2 On Thu, Aug 4, 2011 at 2:12 PM, Jan Kratochvil wrote: > On Thu, 04 Aug 2011 09:51:14 +0200, Abhijit Halder wrote: >> If in future some command started using gdb_stdin, > > then s/he can Google it out from your mailing list post. =A0The GDB codeb= ase > should be as simple as possible for easier contributions. > > I really do not see any (normal) use for gdb_stdin in the GDB codebase no= w. > > >> Please suggest me whether I should remove these (-r as well as -w) optio= ns. > > Yes. > > >> I am still not fully familiar with GNU style. > > For us non-Emacsists > =A0 =A0 =A0 =A0http://www.gnu.org/prep/standards/standards.html > suggests > =A0 =A0 =A0 =A0indent -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1= -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob > > > I am sorry you did not comment on the idea of '>' / '>>' etc. redirection= s, > I found find it also useful myself. > Sorry for this delay. I am not sure about the use-case of redirection. If someone wants to redirect some specific command output to a file, s/he can anyway do it using pipe and some useful shell command (e.g. cat). These two will be equivalent: 1. (gdb) print variable >somefile 2. (gdb) pipe | print variable | cat somefile But it will not dump any error message to the file. User may not be interested in the errors coming from gdb. That is the reason I purposefully skipped the gdb_stderr to be redirected to pipe. But that is again doable task. > > Thanks, > Jan >