Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Cc: stcarrez@nerim.fr
Subject: [rfa/6.0] TUI patch for paginated backtraces
Date: Fri, 01 Aug 2003 18:38:00 -0000	[thread overview]
Message-ID: <20030801183829.GA32097@nevyn.them.org> (raw)

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;


             reply	other threads:[~2003-08-01 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-01 18:38 Daniel Jacobowitz [this message]
2003-08-01 21:24 ` Stephane Carrez
2003-08-05 15:01   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030801183829.GA32097@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=stcarrez@nerim.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox