gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 27 Jul 2010 19:11:51 +0000 (19:11 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 27 Jul 2010 19:11:51 +0000 (19:11 +0000)
* top.c (input_from_terminal_p): Return 0 on BATCH_FLAG.
* utils.c (defaulted_query): Do not explicitly check for BATCH_FLAG.
(fputs_maybe_filtered): Do not do filtering also on
! INPUT_FROM_TERMINAL_P.

gdb/ChangeLog
gdb/top.c
gdb/utils.c

index 2bac58831e6bd316b0f5506f0f239674ee18eadc..1907943b86b3d0077f8a316a8ccfde8284eea087 100644 (file)
@@ -1,3 +1,10 @@
+2010-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * top.c (input_from_terminal_p): Return 0 on BATCH_FLAG.
+       * utils.c (defaulted_query): Do not explicitly check for BATCH_FLAG.
+       (fputs_maybe_filtered): Do not do filtering also on
+       ! INPUT_FROM_TERMINAL_P.
+
 2010-07-27  Joel Brobecker  <brobecker@adacore.com>
 
        * dwarf2read.c (dw2_find_pc_sect_symtab): Remove trailing newline
index 93447fe9aa919c9edebf6742b30103ef7a13efb3..81a2b351861cf317171e9eadbdb1334b28e17fdd 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1242,6 +1242,9 @@ input_from_terminal_p (void)
   if (interactive_mode != AUTO_BOOLEAN_AUTO)
     return interactive_mode == AUTO_BOOLEAN_TRUE;
 
+  if (batch_flag)
+    return 0;
+
   if (gdb_has_a_terminal () && instream == stdin)
     return 1;
 
index 0eaa050ce04d30824839ae29a35f2c67b09689ba..0c51dbc29505256f161d6eba209d598beb7b88b3 100644 (file)
@@ -1634,7 +1634,7 @@ defaulted_query (const char *ctlstr, const char defchar, va_list args)
      question we're asking, and then answer the default automatically.  This
      way, important error messages don't get lost when talking to GDB
      over a pipe.  */
-  if (batch_flag || ! input_from_terminal_p ())
+  if (! input_from_terminal_p ())
     {
       wrap_here ("");
       vfprintf_filtered (gdb_stdout, ctlstr, args);
@@ -2352,7 +2352,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
+      || ! pagination_enabled
+      || ! input_from_terminal_p ()
       || (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 ())))