Re: [PATCH] Target stderr not displayed thru MI

Bob Rossi
2005-11-30T13:51:08Z

On Wed, Nov 30, 2005 at 01:58:06PM +0100, Denis PILAT wrote:
>
> Nick Roberts wrote:
>
> >>+ /* Route target error through the MI as well. */
> >>+ gdb_stdtargerr = mi->targ;
> >>
> >>
> >
> >I know nothing about remote debugging but shouldn't error output go to
> >mi->err so that you can distinguish it from target output?
> >
> >
> >
> Nick,
>
> The mi->err is used for displaying debugger errors, not the error coming
> from the target execution.
> The main problem with MI is that we can not distinguish target stdout
> from target stderr.

Hmm, that's interesting. Are you using the -inferior-tty-set option?

A program can write to stdout (1), stderr (2), but it can
also write to any other file descriptor it wants to. I understand
solving the stdout/stderr case would be helpful, but would it be good to
think of it in terms of file descriptor number? For instance, a program
could easily open another file descriptor and point it to the
controlling terminal and write data. Is this case relavent?

Thanks,
Bob Rossi