This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa/6.0] TUI patch for paginated backtraces
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: stcarrez at nerim dot fr
- Date: Fri, 1 Aug 2003 14:38:30 -0400
- Subject: [rfa/6.0] TUI patch for paginated backtraces
This is the exact parallel to a CLI patch I checked in last month. This
fixes the test in fputs_maybe_filtered, which causes backtraces to be
paginated again. It should only affect the TUI in CLI mode.
[Now that we have interp-switching infrastructure, I think tui_old_uiout
should go away, and instead cli_out should be used - we can switch
interpreters, that's the whole point.]
OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-08-01 Daniel Jacobowitz <drow@mvista.com>
* tui-interp.c (tui_resume): Update tui_old_uiout's stream
to gdb_stdout.
diff -urp gdb-5.3.20030801/gdb/tui.orig/tui-interp.c gdb-5.3.20030801/gdb/tui/tui-interp.c
--- gdb-5.3.20030801/gdb/tui.orig/tui-interp.c 2003-08-01 10:13:07.000000000 -0400
+++ gdb-5.3.20030801/gdb/tui/tui-interp.c 2003-08-01 14:10:02.000000000 -0400
@@ -63,7 +63,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;