diff options
author | Andrew Burgess <aburgess@redhat.com> | 2021-11-26 15:13:43 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-01-12 11:33:31 +0000 |
commit | 643b126809e945e02420d78fd1ef0e3cef195cc3 (patch) | |
tree | 00a6d9fb85f8d652ce0f6c04bcce2601a4dbe3ca /gdb/doc | |
parent | 0e42221ac2cea234fe7a35797475f55f3d304b92 (diff) | |
download | gdb-643b126809e945e02420d78fd1ef0e3cef195cc3.zip gdb-643b126809e945e02420d78fd1ef0e3cef195cc3.tar.gz gdb-643b126809e945e02420d78fd1ef0e3cef195cc3.tar.bz2 |
gdb: add 'maint set/show gnu-source-highlight enabled' command
In a later commit I want to address an issue with the Python pygments
based code styling solution. As this approach is only used when the
GNU Source Highlight library is not available, testing bugs in this
area can be annoying, as it requires GDB to be rebuilt with use of GNU
Source Highlight disabled.
This commit adds a pair of new maintenance commands:
maintenance set gnu-source-highlight enabled on|off
maintenance show gnu-source-highlight enabled
these commands can be used to disable use of the GNU Source Highlight
library, allowing me, in a later commit, to easily test bugs that
would otherwise be masked by GNU Source Highlight being used.
I made this a maintenance command, rather than a general purpose
command, as it didn't seem like this was something a general user
would need to adjust. We can always convert the maintenance command
to a general command later if needed.
There's no test for this here, but this feature will be used in a
later commit.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 2864950..fe81687 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -39797,6 +39797,25 @@ unload the library and continue searching for a suitable candidate as described in @ref{set libthread-db-search-path}. For more information about the tests, see @ref{maint check libthread-db}. +@kindex maint set gnu-source-highlight enabled +@kindex maint show gnu-source-highlight enabled +@item maint set gnu-source-highlight enabled @r{[}on|off@r{]} +@itemx maint show gnu-source-highlight enabled +Control whether @value{GDBN} should use the GNU Source Highlight +library for applying styling to source code (@pxref{Output Styling}). +This will be @samp{on} by default if the GNU Source Highlight library +is available. If the GNU Source Highlight library is not available, +then this will be @samp{off} by default, and attempting to change this +value to @samp{on} will give an error. + +If the GNU Source Highlight library is not being used, then +@value{GDBN} will use the Python Pygments package for source code +styling, if it is available. + +This option is useful for debugging @value{GDBN}'s use of the Pygments +library when @value{GDBN} is linked against the GNU Source Highlight +library. + @kindex maint space @cindex memory used by commands @item maint space @var{value} |