From a88c79b77036e4778e70d62081c3cfd1044bb8e3 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 9 Aug 2022 14:57:48 +0100 Subject: Default to enabling colored disassembly if output is to a terminal. PR 29457 * objdump.c (disassembler_color): Change type to an enum. (disassembler_extended_color): Remove. (usage): Update. (objdump_color_for_assembler_style): Update. (main): Update initialisation of disassembler_color. If not initialised via a command line option, set based upon terminal output. * doc/binutils.texi: Update description of disassmbler-color option. * testsuite/binutils-all/arc/objdump.exp: Add --disassembler-color=off option when disassembling. * testsuite/binutils-all/arm/objdump.exp: Likewise. --- binutils/doc/binutils.texi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'binutils/doc') diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 81be746..41f38f4 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -2828,6 +2828,9 @@ If it is necessary to disable the @option{--disassembler-color} option after it has previously been enabled then use @option{--disassembler-color=off}. +If this option is not specified then the default is to enable color +output if displaying to a terminal, but not otherwise. + @item -W[lLiaprmfFsoORtUuTgAckK] @itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links] @include debug.options.texi -- cgit v1.1