From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13423 invoked by alias); 1 Aug 2003 18:38:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13416 invoked from network); 1 Aug 2003 18:38:31 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 1 Aug 2003 18:38:31 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19ienO-0008Ml-3u; Fri, 01 Aug 2003 14:38:30 -0400 Date: Fri, 01 Aug 2003 18:38:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: stcarrez@nerim.fr Subject: [rfa/6.0] TUI patch for paginated backtraces Message-ID: <20030801183829.GA32097@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, stcarrez@nerim.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00004.txt.bz2 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 * 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;