aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/main.c8
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1a946b7..fd704da 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-21 Alan Hayward <alan.hayward@arm.com>
+
+ * main.c (captured_main_1): Disable styling in batch mode.
+
2019-02-20 Tom Tromey <tom@tromey.com>
* symtab.c (symtab_symbol_info): Fix typos.
diff --git a/gdb/main.c b/gdb/main.c
index a728390..e14dd06 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -47,6 +47,7 @@
#include "common/signals-state-save-restore.h"
#include <vector>
#include "common/pathstuff.h"
+#include "cli/cli-style.h"
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
@@ -850,7 +851,12 @@ captured_main_1 (struct captured_main_args *context)
}
if (batch_flag)
- quiet = 1;
+ {
+ quiet = 1;
+
+ /* Disable all output styling when running in batch mode. */
+ cli_styling = 0;
+ }
}
save_original_signals_state (quiet);