Default to enabling colored disassembly if output is to a terminal.
authorNick Clifton <nickc@redhat.com>
Tue, 9 Aug 2022 13:57:48 +0000 (14:57 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 9 Aug 2022 13:57:48 +0000 (14:57 +0100)
commita88c79b77036e4778e70d62081c3cfd1044bb8e3
tree3897a05c5d447fd3d44babc8312e0c8ad7dac417
parent80d362484999634e11d2b9f9e6d69e2cd4fdba12
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/ChangeLog
binutils/doc/binutils.texi
binutils/objdump.c
binutils/testsuite/binutils-all/arc/objdump.exp
binutils/testsuite/binutils-all/arm/objdump.exp