This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch+7.3?] Fix TUI corrupted screen I regressed 7.1->7.2
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 29 Aug 2011 21:54:57 +0200
- Subject: [patch+7.3?] Fix TUI corrupted screen I regressed 7.1->7.2
Hi,
8f2b33202dadde3125fd749d96796b60746409e6 is the first bad commit
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Re: [patch] Do not break while asking with -batch
http://sourceware.org/ml/gdb-patches/2010-07/msg00366.html
./gdb -nx true -ex 'layout asm' -ex run
FAIL (FSF GDB HEAD):
[Inferior 1 (process 24314) exited normally]
(gdb) print 1
print 1
$1 = 1
(gdb)
PASS (fixed):
[Inferior 1 (process 24344) exited normally]
(gdb) print 1
$1 = 1
(gdb)
Apparently in TUI mode input_from_terminal_p () == 0 but fputs_maybe_filtered
still should do filtering.
I just reduced the change I did before to still satisfy the gdb_gcore.sh needs
but no longer change it so much.
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu (but TUI is
not tested by the testsuite).
Sorry,
Jan
gdb/
2011-08-29 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix TUI screen corruption.
* utils.c (fputs_maybe_filtered): Replace !input_from_terminal_p by
batch_flag.
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2131,8 +2131,8 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
/* Don't do any filtering if it is disabled. */
if (stream != gdb_stdout
- || ! pagination_enabled
- || ! input_from_terminal_p ()
+ || !pagination_enabled
+ || batch_flag
|| (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)
|| top_level_interpreter () == NULL
|| ui_out_is_mi_like_p (interp_ui_out (top_level_interpreter ())))