Reset pagination counts even when stdin is not a tty.
authorSandra Loosemore <sandra@codesourcery.com>
Sat, 19 Dec 2015 01:55:26 +0000 (17:55 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Sat, 19 Dec 2015 01:55:26 +0000 (17:55 -0800)
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.

gdb/ChangeLog
gdb/event-top.c
gdb/top.c

index a4ca15b0469db8a874cb1e9d7f728f6d5eabddb1..b006ba8faf2e55fee792e096d46555c36c618dc7 100644 (file)
@@ -1,3 +1,9 @@
+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'.
index 3f98c059590c1fbc07b2301e2e55d9463a4c257a..e5a5ac6ef8b137283c5bc4afe528e74d32ac750e 100644 (file)
@@ -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
index d1e2271c4311fdbe4d6d27720e3e4f3fdf9d4af8..a45f3cc8cc4d3bdf1d3f3fad8dc002c721e377ff 100644 (file)
--- 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);