At present, there is no way to pass the output of a gdb command directly to the shell for further processing. For example, something similar is not permitted: (gdb) thread apply all bt | less This kind of feature is quite helpful in a scenario where a program under debugger has hundreds of threads running and one wants to examine the stack-trace of all the threads at once. The current behaviour of gdb makes it somewhat difficult since the entire output of gdb command (sometimes more than a number of pages) is dumped onto the screen. One can always redirect the output of gdb using logging mechanism, but that requires offline analysis of the log-file which may not be acceptable in certain situations. Another option is to get a shell using gdb's shell command, but that forces one every time to source the shell profile. Furthermore, the log-file contains entire debug information, parsing that huge file is resource and time consuming. I have implemented a feature which will allow one to pass the output of any gdb command to the shell for further processing. 2011-07-09 Abhijit Halder * top.c (execute_command_to_pipe): New function. (parse_for_shell_command): New function (execute_command): Update. * ui-file.c (gdb_modify_io): New function. * ui-file.h (gdb_modify_io): Prototype. top.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- ui-file.c | 15 ++++++++++++ ui-file.h | 3 ++ 3 files changed, 91 insertions(+), 1 deletion(-) Regards, Abhijit Halder