This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH


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 <oza.pawandeep@gmail.com> wrote:
> 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
> <abhijit.k.halder@gmail.com> 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 <abhijit.k.halder@symantec.com>
>>
>> ? ?* top.c (execute_command_to_pipe): New function.
>> ? ? (execute_command): Update.
>> ? ?* ui-file.c (gdb_modify_io): New function.
>> ? ?* ui-file.h (gdb_modify_io): Add prototype.
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]