This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Target stderr not displayed thru MI


On Wed, Nov 30, 2005 at 08:50:44AM -0500, Bob Rossi wrote:
> 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?

I assume that Denis is talking about a remote target here, providing
I/O via their target protocol, rather than a native TTY.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]