aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-08-05 14:59:59 +0000
committerDaniel Jacobowitz <drow@false.org>2003-08-05 14:59:59 +0000
commitfeaac9ce6cfaed2a9ecd09d0ad7c1c7ccf360f25 (patch)
tree7f31a97974c1c41c438af0ba862263dc2f1cd9ad
parent841de703f876b55092e3ed7b38ef8c4956e67e77 (diff)
downloadgdb-feaac9ce6cfaed2a9ecd09d0ad7c1c7ccf360f25.zip
gdb-feaac9ce6cfaed2a9ecd09d0ad7c1c7ccf360f25.tar.gz
gdb-feaac9ce6cfaed2a9ecd09d0ad7c1c7ccf360f25.tar.bz2
./
* Makefile.in (tui-interp.o): Update dependencies. tui/ * tui-interp.c: Include "cli-out.h". (tui_resume): Update tui_old_uiout's stream to gdb_stdout.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/tui/ChangeLog5
-rw-r--r--gdb/tui/tui-interp.c17
4 files changed, 27 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d32d3d5..c2ef63e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (tui-interp.o): Update dependencies.
+
2003-08-04 David Carlton <carlton@kealia.com>
* charset.c (cached_iconv_convert): Add __FILE__ and __LINE__ args
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 440e076..188c9a5 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2751,7 +2751,7 @@ tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \
$(event_top_h) $(event_loop_h) $(ui_out_h) $(tui_tuiData_h) \
- $(readline_h) $(tui_tuiWin_h) $(tui_h) $(tui_tuiIO_h)
+ $(readline_h) $(tui_tuiWin_h) $(tui_h) $(tui_tuiIO_h) $(cli_out_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c
tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
$(gdb_string_h) $(gdb_assert_h)
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 690e9b3..41fe93d 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-04 Daniel Jacobowitz <drow@mvista.com>
+
+ * tui-interp.c: Include "cli-out.h".
+ (tui_resume): Update tui_old_uiout's stream to gdb_stdout.
+
2003-07-24 Stephane Carrez <stcarrez@nerim.fr>
* tui.c (tui_rl_other_window): New function to switch the TUI active
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 0c1effb..986ebb3 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -25,6 +25,7 @@
#include "event-top.h"
#include "event-loop.h"
#include "ui-out.h"
+#include "cli-out.h"
#include "tui/tuiData.h"
#include "readline/readline.h"
#include "tui/tuiWin.h"
@@ -63,7 +64,23 @@ tui_init (void)
static int
tui_resume (void *data)
{
+ struct ui_file *stream;
+
+ /* gdb_setup_readline will change gdb_stdout. If the TUI was previously
+ writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */
+
+ stream = cli_out_set_stream (tui_old_uiout, gdb_stdout);
+ if (stream != gdb_stdout)
+ {
+ cli_out_set_stream (tui_old_uiout, stream);
+ stream = NULL;
+ }
+
gdb_setup_readline ();
+
+ if (stream != NULL)
+ cli_out_set_stream (tui_old_uiout, gdb_stdout);
+
if (tui_start_enabled)
tui_enable ();
return 1;