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


 > >>+  /* 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.

In that case, can you create a new MI channel? e.g.

struct mi_interp
{
  /* MI's output channels */
  struct ui_file *out;
  struct ui_file *err;
  struct ui_file *log;
  struct ui_file *targ;
  struct ui_file *targerr;
  struct ui_file *event_channel;

  /* This is the interpreter for the mi... */
  struct interp *mi2_interp;
  struct interp *mi1_interp;
  struct interp *mi_interp;
};
  ...
  mi->targerr = mi_console_file_new (raw_stdout, "#", '"');
  ...
  gdb_stdtargerr = mi->targerr;

Nick


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