This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Target stderr not displayed thru MI
- From: Bob Rossi <bob at brasko dot net>
- To: Denis PILAT <denis dot pilat at st dot com>
- Cc: Nick Roberts <nickrob at snap dot net dot nz>, gdb-patches at sources dot redhat dot com
- Date: Wed, 30 Nov 2005 08:50:44 -0500
- Subject: Re: [PATCH] Target stderr not displayed thru MI
- References: <17293.36697.854192.691800@kahikatea.snap.net.nz> <438DA1DE.2020406@st.com>
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