Re: Separating "shell dir" output from GDB/MI output

Bob Rossi
2005-10-09T17:33:43Z

> > On 10/9/05, Bob Rossi <bob@brasko.net> wrote:
> > > I think the best idea we've had so far for solving problems like this is
> > > to add an option to GDB to have it output GDB/MI data on a file
> > > descriptor X. For instance,
> > > gdb -i=mi -mi-out-fd=30
> > > and then when you fork/exec GDB you dup the 30 file descriptor so that
> > > you can read the output.
> > >
> > > Eli, do you know if this approach would be portable to windows nativly?
> > > I could look into implementing this feature, since it would resolve a
> > > *lot* of problems regarding I/O.
>
> While I think this is a good idea, what other specific problems would
> it solve that we haven't solved already?

It solves several problems. The user no longer has to create a pty to
give to GDB to separate the inferior output and the console output.
(CGDB will have to anyways, since it uses the terminal). Some of the
target's apparently write to STDOUT/STDERR, and that get's confused with
the MI output. Also, thing's like 'shell' and potentially other case's
get mixed in with the MI output. Finally, if we have several
interpreters going at the same time, we could have them all output to
there own descriptor.

Bob Rossi