This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] GDB testsuite: Suppress GCC's colored output


Newer GCC versions yield colored diagnostic messages by default, which may
be useful when executing GDB interactively from a terminal.  But when run
from a GDB test case, the compiler output is written into gdb.log, where
such escape sequences are usually more inhibiting than helpful to the
evaluation of test results.  So this patch suppresses that.

gdb/testsuite/ChangeLog:

	* lib/gdb.exp (gdb_compile): Suppress GCC's coloring of messages.
---
 gdb/testsuite/lib/gdb.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3d3eaab..9a5c27f 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3552,6 +3552,9 @@ proc gdb_compile {source dest type options} {
 	}
     }
 
+    # Stop the compiler from producing colored output.
+    setenv GCC_COLORS ""
+
     set result [target_compile $source $dest $type $options]
 
     # Prune uninteresting compiler (and linker) output.
-- 
2.5.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]