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]

[PATCH] Target stderr not displayed thru MI


Hi all,

When debugging a program thru Eclipse or any front end using MI,
the stderr of the debugged program is lost.

This problem occures only on remote targets since native ones don't
use MI stream for output.

In the file gdb/mi/mi-interp.c, the 'mi_interpreter_resume' function
redirects the gdb stream into MI streams. All streams are redirected
except gdb_stdtargerr.

The attached patch (from a ST colleague) redirects target error output
on the unique MI target output stream.

Do you have any comment ?

Denis



2005-11-20  Serge Chatroux  <serge.chatroux@st.com>

	* mi-interp.c (mi_interpreter_resume): Route target error
	through the MI.


Index: mi-interp.c
===================================================================
--- mi-interp.c	(revision 245)
+++ mi-interp.c	(working copy)
@@ -119,6 +119,8 @@
   gdb_stdlog = mi->log;
   /* Route target output through the MI. */
   gdb_stdtarg = mi->targ;
+  /* Route target error through the MI as well. */
+  gdb_stdtargerr = mi->targ;
 
   /* Replace all the hooks that we know about.  There really needs to
      be a better way of doing this... */

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