From: Jan Kratochvil Date: Tue, 27 Jul 2010 19:13:11 +0000 (+0000) Subject: gdb/ X-Git-Tag: gdb_7_2-2010-09-02-release~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=958c04dee315fefd3cbbfe385a5ebd25eda1d695;p=thirdparty%2Fbinutils-gdb.git gdb/ * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9ba5471c6e8..7c25aa92748 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2010-07-27 Jan Kratochvil + + * 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 Thiago Jung Bauermann * ppc-linux-nat.c (store_vsx_register): Use PTRACE_GETVSXREGS to get diff --git a/gdb/top.c b/gdb/top.c index 93447fe9aa9..81a2b351861 100644 --- 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; diff --git a/gdb/utils.c b/gdb/utils.c index a8beb379dc1..f9fdc07ce27 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1616,7 +1616,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); @@ -2334,7 +2334,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 ())))