aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-03-08 19:20:38 +0000
committerTom Tromey <tromey@redhat.com>2010-03-08 19:20:38 +0000
commit7c953934352840c28dcda0c8a6a18660aa1e3ab9 (patch)
treeaad0480e2191952a96d4464e37055ff6bc82b7a9 /gdb/utils.c
parent9c8ee2ab75111236586c439951528d90e2242568 (diff)
downloadgdb-7c953934352840c28dcda0c8a6a18660aa1e3ab9.zip
gdb-7c953934352840c28dcda0c8a6a18660aa1e3ab9.tar.gz
gdb-7c953934352840c28dcda0c8a6a18660aa1e3ab9.tar.bz2
gdb
PR cli/9591: * NEWS: Update. * utils.c: Include main.h. (fputs_maybe_filtered): Don't paginate if `batch_flag'. (defaulted_query): Use default answer if `batch_flag'. * main.h (batch_flag): Declare. * main.c (batch_flag): New global. (captured_main): Remove 'batch'. Update. gdb/doc PR cli/9591: * gdb.texinfo (Mode Options): Mention lack of pagination and confirmation with --batch. (Screen Size): Mention --batch. (Messages/Warnings): Likewise.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 8054f03..e225a3f 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -58,6 +58,7 @@
#include "gdb_obstack.h"
#include "gdbcore.h"
#include "top.h"
+#include "main.h"
#include "inferior.h" /* for signed_pointer_to_address */
@@ -1496,7 +1497,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 (! input_from_terminal_p ())
+ if (batch_flag || ! input_from_terminal_p ())
{
wrap_here ("");
vfprintf_filtered (gdb_stdout, ctlstr, args);