From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8240 invoked by alias); 5 Mar 2009 20:16:22 -0000 Received: (qmail 8231 invoked by uid 22791); 5 Mar 2009 20:16:21 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Mar 2009 20:16:16 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n25KGAe5017468 for ; Thu, 5 Mar 2009 15:16:10 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n25KG9S8009905; Thu, 5 Mar 2009 15:16:10 -0500 Received: from opsy.redhat.com (vpn-13-245.rdu.redhat.com [10.11.13.245]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n25KG94L006978; Thu, 5 Mar 2009 15:16:09 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 511348880CE; Thu, 5 Mar 2009 13:16:07 -0700 (MST) To: gdb@sourceware.org Subject: Re: Support pipes in the run command. References: <36a35d480903050859i2b6c6391xc8cff4ee6f2645f3@mail.gmail.com> <1236274335.28372.30.camel@localhost.localdomain> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 05 Mar 2009 20:16:00 -0000 In-Reply-To: <1236274335.28372.30.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Thu\, 05 Mar 2009 14\:32\:15 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Mail-Followup-To: gdb@sourceware.org X-SW-Source: 2009-03/txt/msg00055.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: >> Tom Tromey told me that redirecting output was already implemented in >> gdb. So what were you meaning in this e-mail? Thiago> We do have redirection, but not pipe support, i.e., having output come Thiago> from another command, not a file. But perhaps what he means is that Thiago> since we have redirection, lack of pipe support can be worked around by Thiago> redirecting the output of the first command in the pipe to a file, and Thiago> then debug your program reading from that file. We had a small miscommunication, because on irc he pointed me at an old thread about redirecting gdb's output -- for which we have "set logging". With multiple inferiors I think we could extend the run command in a few ways. First, let it support multiple commands in pipeline, as you suggest. Second, give gdb a way to run a shell script and have it trace the shell and all child processes. (I've long wanted this so I can just run the wrapper scripts that libtool generates in a build tree...) I have little idea whether either of these is doable in a summer. Tom