From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16377 invoked by alias); 11 Jul 2011 23:32:07 -0000 Received: (qmail 16366 invoked by uid 22791); 11 Jul 2011 23:32:07 -0000 X-SWARE-Spam-Status: No, hits=-2.0 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-ey0-f169.google.com (HELO mail-ey0-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jul 2011 23:31:52 +0000 Received: by eyd9 with SMTP id 9so1675981eyd.0 for ; Mon, 11 Jul 2011 16:31:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.107.15 with SMTP id z15mr1735038ebo.114.1310427111073; Mon, 11 Jul 2011 16:31:51 -0700 (PDT) Received: by 10.213.4.207 with HTTP; Mon, 11 Jul 2011 16:31:51 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Jul 2011 00:51:00 -0000 Message-ID: Subject: Re: PATCH From: Abhijit Halder To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-07/txt/msg00290.txt.bz2 Yes I missed it. Let me modify the implementation to achieve the goal. On Tue, Jul 12, 2011 at 1:17 AM, Tom Tromey wrote: >>>>>> "Abhijit" =3D=3D Abhijit Halder writes: > > Abhijit> There is no way to pass the output of a gdb command to a shell > Abhijit> command. For example, something similar is not permitted: "(gdb) > Abhijit> thread apply all bt | vim -". This kind of feature is quite help= ful in > Abhijit> a scenario where a program under debugger has 100s of threads ru= nning > Abhijit> and one wants to search a particular pattern in stack-traces. I = have > Abhijit> implemented a feature which will allow one to pass the output of= any > Abhijit> gdb command to any shell command. > > It would be nice to be able to do something like this. > > Abhijit> 2011-07-09 Abhijit Halder > Abhijit> =A0 =A0 * top.c (execute_command_to_pipe): New function. > Abhijit> =A0 =A0 =A0(execute_command): Update. > > I don't think this implementation is the right approach. > It does the wrong thing with some existing valid commands, e.g. "print x|= 5". > > Tom >