From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31815 invoked by alias); 10 Jul 2011 07:47:59 -0000 Received: (qmail 31771 invoked by uid 22791); 10 Jul 2011 07:47:46 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_HR 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; Sun, 10 Jul 2011 05:19:12 +0000 Received: by ewy9 with SMTP id 9so1142548ewy.0 for ; Sat, 09 Jul 2011 22:19:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.27.143 with SMTP id i15mr1179737ebc.38.1310275151153; Sat, 09 Jul 2011 22:19:11 -0700 (PDT) Received: by 10.213.4.207 with HTTP; Sat, 9 Jul 2011 22:19:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Jul 2011 12:13:00 -0000 Message-ID: Subject: Re: PATCH From: Abhijit Halder To: oza Pawandeep 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/msg00269.txt.bz2 Yes, you are right. But to run a shell script you have to either quit from gdb session or you have to run shell command to get a shell. In first choice the analysis of debug information is offline that may not be acceptable in certain situation where you take certain decision based on your debug information. In second choice you every time get a shell you source your shell profile (like bashrc bash_profile) that is not acceptable. Finally, the method you suggested will dump all the debug info in a file (this sometimes annoying). Processing that big file will again consumes more resources. On Sat, Jul 9, 2011 at 6:39 PM, oza Pawandeep wro= te: > Hi, > > with tee command, or similar things you can always redirect output to > file, and from there you may apply the script to get output from that. > probably use source command to automate and use shell command to run > the script to get the things done. > sure your way just gets output instantly, but other than that what > value does it add; I am trying to understand. > > Regards, > Oza. > > On Sat, Jul 9, 2011 at 2:00 PM, Abhijit Halder > wrote: >> There is no way to pass the output of a gdb command to a shell >> command. For example, something similar is not permitted: "(gdb) >> thread apply all bt | vim -". This kind of feature is quite helpful in >> a scenario where a program under debugger has 100s of threads running >> and one wants to search a particular pattern in stack-traces. I have >> implemented a feature which will allow one to pass the output of any >> gdb command to any shell command. >> >> 2011-07-09 Abhijit Halder >> >> =A0 =A0* top.c (execute_command_to_pipe): New function. >> =A0 =A0 (execute_command): Update. >> =A0 =A0* ui-file.c (gdb_modify_io): New function. >> =A0 =A0* ui-file.h (gdb_modify_io): Add prototype. >> > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10165 invoked by alias); 10 Jul 2011 08:17:43 -0000 Received: (qmail 10154 invoked by uid 22791); 10 Jul 2011 08:17:41 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_HR 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; Sun, 10 Jul 2011 08:17:28 +0000 Received: by ewy9 with SMTP id 9so1160259ewy.0 for ; Sun, 10 Jul 2011 01:17:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.27.143 with SMTP id i15mr1179737ebc.38.1310275151153; Sat, 09 Jul 2011 22:19:11 -0700 (PDT) Received: by 10.213.4.207 with HTTP; Sat, 9 Jul 2011 22:19:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Jul 2011 13:42:00 -0000 Message-ID: Subject: Re: PATCH From: Abhijit Halder To: oza Pawandeep 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/msg00270.txt.bz2 Message-ID: <20110711134200.ohzHB_3KFeElgi_X4_ear76HCHFl8j1bABnxACtg9Ks@z> Yes, you are right. But to run a shell script you have to either quit from gdb session or you have to run shell command to get a shell. In first choice the analysis of debug information is offline that may not be acceptable in certain situation where you take certain decision based on your debug information. In second choice you every time get a shell you source your shell profile (like bashrc bash_profile) that is not acceptable. Finally, the method you suggested will dump all the debug info in a file (this sometimes annoying). Processing that big file will again consumes more resources. On Sat, Jul 9, 2011 at 6:39 PM, oza Pawandeep wro= te: > Hi, > > with tee command, or similar things you can always redirect output to > file, and from there you may apply the script to get output from that. > probably use source command to automate and use shell command to run > the script to get the things done. > sure your way just gets output instantly, but other than that what > value does it add; I am trying to understand. > > Regards, > Oza. > > On Sat, Jul 9, 2011 at 2:00 PM, Abhijit Halder > wrote: >> There is no way to pass the output of a gdb command to a shell >> command. For example, something similar is not permitted: "(gdb) >> thread apply all bt | vim -". This kind of feature is quite helpful in >> a scenario where a program under debugger has 100s of threads running >> and one wants to search a particular pattern in stack-traces. I have >> implemented a feature which will allow one to pass the output of any >> gdb command to any shell command. >> >> 2011-07-09 Abhijit Halder >> >> =A0 =A0* top.c (execute_command_to_pipe): New function. >> =A0 =A0 (execute_command): Update. >> =A0 =A0* ui-file.c (gdb_modify_io): New function. >> =A0 =A0* ui-file.h (gdb_modify_io): Add prototype. >> >