From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8532 invoked by alias); 11 Jul 2011 19:48:22 -0000 Received: (qmail 8516 invoked by uid 22791); 11 Jul 2011 19:48:20 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Mon, 11 Jul 2011 19:48:03 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6BJm1AY019028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 Jul 2011 15:48:01 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6BJm1wY009477; Mon, 11 Jul 2011 15:48:01 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6BJm0UV010706; Mon, 11 Jul 2011 15:48:00 -0400 From: Tom Tromey To: Abhijit Halder Cc: gdb-patches@sourceware.org Subject: Re: PATCH References: Date: Mon, 11 Jul 2011 21:10:00 -0000 In-Reply-To: (Abhijit Halder's message of "Sat, 9 Jul 2011 14:00:29 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/msg00286.txt.bz2 >>>>> "Abhijit" == 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 helpful in Abhijit> a scenario where a program under debugger has 100s of threads running 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> * top.c (execute_command_to_pipe): New function. Abhijit> (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