aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-11-26 16:19:17 -0700
committerTom Tromey <tom@tromey.com>2018-12-28 12:49:54 -0700
commit140a4bc099820c909da0eac1df0f56ec468ad3dd (patch)
tree6f083bf9fd52c4fb7357641abfcbc6bcea43b5d0 /gdb
parent62f29fda90cf1d5a1899f57ef78452471c707fd6 (diff)
downloadbinutils-140a4bc099820c909da0eac1df0f56ec468ad3dd.zip
binutils-140a4bc099820c909da0eac1df0f56ec468ad3dd.tar.gz
binutils-140a4bc099820c909da0eac1df0f56ec468ad3dd.tar.bz2
Document the "set style" commands
This documents the new "set style" commands. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * NEWS: Mention terminal styling. gdb/doc/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * gdb.texinfo (Output Styling): New node.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/NEWS30
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo65
4 files changed, 103 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c853279..c2c9f87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2018-12-28 Tom Tromey <tom@tromey.com>
+ * NEWS: Mention terminal styling.
+
+2018-12-28 Tom Tromey <tom@tromey.com>
+
* utils.h (can_emit_style_escape): Declare.
* utils.c (can_emit_style_escape): No longer static.
* cli/cli-style.c (set_style_enabled): New function.
diff --git a/gdb/NEWS b/gdb/NEWS
index 913f3ae..c9e801c 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -53,6 +53,11 @@
binaries. This ensures that 'kevent' system calls are caught for
binaries using either the old or new ABIs.
+* Terminal styling is now available for the CLI and the TUI. GNU
+ Source Highlight can additionally be used to provide styling of
+ source code snippets. See the "set style" commands, below, for more
+ information.
+
* New targets
NXP S12Z s12z-*-elf
@@ -130,6 +135,31 @@ set tui tab-width NCHARS
show tui tab-width NCHARS
"set tui tab-width" replaces the "tabset" command, which has been deprecated.
+set style enabled [on|off]
+show style enabled
+ Enable or disable terminal styling. Styling is enabled by default
+ on most hosts.
+
+set style filename foreground COLOR
+set style filename background COLOR
+set style filename intensity VALUE
+ Control the styling of file names.
+
+set style function foreground COLOR
+set style function background COLOR
+set style function intensity VALUE
+ Control the styling of function names.
+
+set style variable foreground COLOR
+set style variable background COLOR
+set style variable intensity VALUE
+ Control the styling of variable names.
+
+set style address foreground COLOR
+set style address background COLOR
+set style address intensity VALUE
+ Control the styling of addresses.
+
* MI changes
** The '-data-disassemble' MI command now accepts an '-a' option to
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 68d3068..56d846c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-28 Tom Tromey <tom@tromey.com>
+
+ * gdb.texinfo (Output Styling): New node.
+
2018-12-13 John Baldwin <jhb@FreeBSD.org>
* gdb.texinfo (Set Catchpoints): Add an anchor for 'catch syscall'.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index d766e44..4d4274f 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -24219,6 +24219,7 @@ described here.
* Editing:: Command editing
* Command History:: Command history
* Screen Size:: Screen size
+* Output Styling:: Output styling
* Numbers:: Numbers
* ABI:: Configuring the current ABI
* Auto-loading:: Automatically loading associated files
@@ -24526,6 +24527,70 @@ Options, -batch}) also automatically disables pagination.
Show the current pagination mode.
@end table
+@node Output Styling
+@section Output Styling
+@cindex styling
+@cindex colors
+
+@kindex set style
+@kindex show style
+@value{GDBN} can style its output on a capable terminal. This is
+enabled by default on most systems. Various style settings are
+available; and styles can also be disabled entirely.
+
+@table @code
+@item set style enabled @samp{on|off}
+Enable or disable all styling. The default is host-dependent, with
+most hosts defaulting to @samp{on}.
+
+@item show style enabled
+Show the current state of styling.
+@end table
+
+Subcommands of @code{set style} control specific forms of styling.
+These subcommands all follow the same pattern: each style-able object
+can be styled with a foreground color, a background color, and an
+intensity.
+
+For example, the style of file names can be controlled using the
+@code{set style filename} group of commands:
+
+@table @code
+@item set style filename background @var{color}
+Set the background to @var{color}. Valid colors are @samp{none}
+(meaning the terminal's default color), @samp{black}, @samp{red},
+@samp{green}, @samp{yellow}, @samp{vlue}, @samp{magenta}, @samp{cyan},
+and@samp{white}.
+
+@item set style filename foreground @var{color}
+Set the foreground to @var{color}. Valid colors are @samp{none}
+(meaning the terminal's default color), @samp{black}, @samp{red},
+@samp{green}, @samp{yellow}, @samp{vlue}, @samp{magenta}, @samp{cyan},
+and@samp{white}.
+
+@item set style filename intensity @var{value}
+Set the intensity to @var{value}. Valid intensities are @samp{normal}
+(the default), @samp{bold}, and @samp{dim}.
+@end table
+
+The style-able objects are:
+@table @code
+@item filename
+Control the styling of file names.
+
+@item function
+Control the styling of function names. These are managed with the
+@code{set style function} family of commands.
+
+@item variable
+Control the styling of variable names. These are managed with the
+@code{set style variable} family of commands.
+
+@item address
+Control the styling of addresses. These are managed with the
+@code{set style address} family of commands.
+@end table
+
@node Numbers
@section Numbers
@cindex number representation