diff options
author | Tom Tromey <tromey@adacore.com> | 2019-03-08 13:54:07 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-03-14 05:47:11 -0600 |
commit | d085f98901ccd6c9764b93d3983f3c7797addc4f (patch) | |
tree | bdd1be3d6e40f4b72782ae0db0da3fc80dfe93c2 /gdb/testsuite/gdb.base | |
parent | 6f11e6824e15bd40fe1e7b245a22865c6ef8c7bd (diff) | |
download | binutils-d085f98901ccd6c9764b93d3983f3c7797addc4f.zip binutils-d085f98901ccd6c9764b93d3983f3c7797addc4f.tar.gz binutils-d085f98901ccd6c9764b93d3983f3c7797addc4f.tar.bz2 |
Add the "set style source" command
This adds "set style source" (and "show style source") commands. This
gives the user control over whether source code is highlighted.
gdb/ChangeLog
2019-03-14 Tom Tromey <tromey@adacore.com>
* NEWS: Add item for "style sources" commands.
* source-cache.c (source_cache::get_source_lines): Check
source_styling.
* cli/cli-style.c (source_styling): New global.
(_initialize_cli_style): Add "style sources" commands.
(show_style_sources): New function.
* cli/cli-style.h (source_styling): Declare.
gdb/doc/ChangeLog
2019-03-14 Tom Tromey <tromey@adacore.com>
* gdb.texinfo (Output Styling): Document "set style source" and
"show style source".
gdb/testsuite/ChangeLog
2019-03-14 Tom Tromey <tromey@adacore.com>
* gdb.base/style.exp: Add "set style sources" test.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/style.exp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 2778001..369c1f5 100644 --- a/gdb/testsuite/gdb.base/style.exp +++ b/gdb/testsuite/gdb.base/style.exp @@ -50,6 +50,12 @@ save_vars { env(TERM) } { "$main_expr.*$arg_expr.*$arg_expr.*$file_expr.*" gdb_test "info breakpoints" "$main_expr at $file_expr.*" + gdb_test_no_output "set style sources off" + gdb_test "frame" \ + "\r\n\[^\033\]*break here.*" \ + "frame without styling" + gdb_test_no_output "set style sources on" + gdb_test "break main" "file $base_file_expr.*" gdb_test "print &main" " = .* \033\\\[34m$hex\033\\\[m <$main_expr>" |