]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add an option with a color type.
authorAndrei Pikas <gdb@mail.api.win>
Sat, 5 Oct 2024 19:27:44 +0000 (22:27 +0300)
committerTom Tromey <tom@tromey.com>
Sun, 12 Jan 2025 20:30:43 +0000 (13:30 -0700)
commit6447969d0ac774b6dec0f95a0d3d27c27d158690
treee9812cfdd956f4c8e89f596b276ddc1c4ad8da45
parent338e0b05d8f2dd404eb0015bee31461dfe5ba307
Add an option with a color type.

Colors can be specified as "none" for terminal's default color, as a name of
one of the eight standard colors of ISO/IEC 6429 "black", "red", "green", etc.,
as an RGB hexadecimal tripplet #RRGGBB for 24-bit TrueColor, or as an
integer from 0 to 255.  Integers 0 to 7 are the synonyms for the standard
colors.  Integers 8-15 are used for the so-called bright colors from the
aixterm extended 16-color palette.  Integers 16-255 are the indexes into xterm
extended 256-color palette (usually 6x6x6 cube plus gray ramp).  In
general, 256-color palette is terminal dependent and sometimes can be
changed with OSC 4 sequences, e.g. "\033]4;1;rgb:00/FF/00\033\\".

It is the responsibility of the user to verify that the terminal supports
the specified colors.

PATCH v5 changes: documentation fixed.
PATCH v6 changes: documentation fixed.
PATCH v7 changes: rebase onto master and fixes after review.
PATCH v8 changes: fixes after review.
34 files changed:
gdb/Makefile.in
gdb/NEWS
gdb/cli/cli-cmds.c
gdb/cli/cli-decode.c
gdb/cli/cli-decode.h
gdb/cli/cli-option.c
gdb/cli/cli-option.h
gdb/cli/cli-setshow.c
gdb/cli/cli-style.c
gdb/cli/cli-style.h
gdb/command.h
gdb/doc/gdb.texinfo
gdb/doc/guile.texi
gdb/doc/python.texi
gdb/guile/guile-internal.h
gdb/guile/guile.c
gdb/guile/scm-color.c [new file with mode: 0644]
gdb/guile/scm-param.c
gdb/python/py-color.c [new file with mode: 0644]
gdb/python/py-color.h [new file with mode: 0644]
gdb/python/py-param.c
gdb/python/python.c
gdb/testsuite/gdb.base/default.exp
gdb/testsuite/gdb.base/style.exp
gdb/testsuite/gdb.guile/scm-color.exp [new file with mode: 0644]
gdb/testsuite/gdb.guile/scm-parameter.exp
gdb/testsuite/gdb.python/py-color.exp [new file with mode: 0644]
gdb/testsuite/gdb.python/py-parameter.exp
gdb/testsuite/lib/gdb-utils.exp
gdb/testsuite/lib/gdb.exp
gdb/top.c
gdb/ui-style.c
gdb/ui-style.h
gdb/unittests/style-selftests.c