This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Reset pagination counts even when stdin is not a tty.
- From: Sandra Loosemore <sandra at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 19 Dec 2015 01:56:40 -0000
- Subject: [binutils-gdb] Reset pagination counts even when stdin is not a tty.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bc008695f5f9c72d2eac80d5dc125659ca106fad
commit bc008695f5f9c72d2eac80d5dc125659ca106fad
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Fri Dec 18 17:55:26 2015 -0800
Reset pagination counts even when stdin is not a tty.
2015-12-18 Sandra Loosemore <sandra@codesourcery.com>
gdb/
* event-top.c (command_handler): Don't require stdin to be a tty
for call to reinitialize_more_filter.
* top.c (command_loop): Likewise.
Diff:
---
gdb/ChangeLog | 6 ++++++
gdb/event-top.c | 3 +--
gdb/top.c | 3 +--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a4ca15b..b006ba8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2015-12-18 Sandra Loosemore <sandra@codesourcery.com>
+ * event-top.c (command_handler): Don't require stdin to be a tty
+ for call to reinitialize_more_filter.
+ * top.c (command_loop): Likewise.
+
+2015-12-18 Sandra Loosemore <sandra@codesourcery.com>
+
* utils.c (prompt_for_continue): Call throw_quit directly on 'q'.
2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 3f98c05..e5a5ac6 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -469,11 +469,10 @@ async_disable_stdin (void)
static void
command_handler (char *command)
{
- int stdin_is_tty = ISATTY (stdin);
struct cleanup *stat_chain;
clear_quit_flag ();
- if (instream == stdin && stdin_is_tty)
+ if (instream == stdin)
reinitialize_more_filter ();
/* If readline returned a NULL command, it means that the connection
diff --git a/gdb/top.c b/gdb/top.c
index d1e2271..a45f3cc 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -542,7 +542,6 @@ command_loop (void)
{
struct cleanup *old_chain;
char *command;
- int stdin_is_tty = ISATTY (stdin);
while (instream && !feof (instream))
{
@@ -550,7 +549,7 @@ command_loop (void)
(*window_hook) (instream, get_prompt ());
clear_quit_flag ();
- if (instream == stdin && stdin_is_tty)
+ if (instream == stdin)
reinitialize_more_filter ();
old_chain = make_cleanup (null_cleanup, 0);