2005-12-01 Denis Pilat * mi-interp.c (mi_interpreter_resume): Route target error through the MI. (struct mi_interp): Add field targerr. (mi_interpreter_init): Initialize mi target error stream. Index: mi/mi-interp.c =================================================================== --- mi/mi-interp.c (revision 224) +++ mi/mi-interp.c (working copy) @@ -40,6 +40,7 @@ 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... */ @@ -86,6 +87,15 @@ mi->err = mi_console_file_new (raw_stdout, "&", '"'); mi->log = mi->err; mi->targ = mi_console_file_new (raw_stdout, "@", '"'); + + /* MI 1 and 2 target error stream use the same steam prefix "@" in oder + to ensure backward compatibility with old frondtend, MI 3 uses + a new prefix "#" */ + if (mi_version (uiout) > 2) + mi->targerr = mi_console_file_new (raw_stdout, "#", '"'); + else + mi->targerr = mi_console_file_new (raw_stdout, "@", '"'); + mi->event_channel = mi_console_file_new (raw_stdout, "=", 0); return mi; @@ -119,6 +129,8 @@ gdb_stdlog = mi->log; /* Route target output through the MI. */ gdb_stdtarg = mi->targ; + /* Route target error through the MI error stream. */ + gdb_stdtargerr = mi->targerr; /* Replace all the hooks that we know about. There really needs to be a better way of doing this... */