This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Support pipes in the run command.
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb at sourceware dot org
- Date: Thu, 05 Mar 2009 13:16:06 -0700
- Subject: Re: Support pipes in the run command.
- References: <36a35d480903050859i2b6c6391xc8cff4ee6f2645f3@mail.gmail.com> <1236274335.28372.30.camel@localhost.localdomain>
- Reply-to: tromey at redhat dot com
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>> Tom Tromey told me that redirecting output was already implemented in
>> gdb. So what were you meaning in this e-mail?
Thiago> We do have redirection, but not pipe support, i.e., having output come
Thiago> from another command, not a file. But perhaps what he means is that
Thiago> since we have redirection, lack of pipe support can be worked around by
Thiago> redirecting the output of the first command in the pipe to a file, and
Thiago> then debug your program reading from that file.
We had a small miscommunication, because on irc he pointed me at an
old thread about redirecting gdb's output -- for which we have
"set logging".
With multiple inferiors I think we could extend the run command in a
few ways. First, let it support multiple commands in pipeline, as you
suggest. Second, give gdb a way to run a shell script and have it
trace the shell and all child processes. (I've long wanted this so I
can just run the wrapper scripts that libtool generates in a build
tree...)
I have little idea whether either of these is doable in a summer.
Tom