diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2018-12-29 14:21:31 +0100 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2018-12-30 09:26:21 +0100 |
commit | ecad3b215d34263968bb7c74701e3ca9483ac710 (patch) | |
tree | 842213affcca9c96e1d10a665ddddf902c12172a /gdb/top.c | |
parent | f1d3b1665f4980c893b496e85906ce43917cc515 (diff) | |
download | gdb-ecad3b215d34263968bb7c74701e3ca9483ac710.zip gdb-ecad3b215d34263968bb7c74701e3ca9483ac710.tar.gz gdb-ecad3b215d34263968bb7c74701e3ca9483ac710.tar.bz2 |
Fix 'help set/show style' strange layouts/results.
The layout for 'help set address|variable' is strange, e.g.:
(gdb) help set style address
style address
List of show Address display styling
Configure address colors and display intensity subcommands:
show Address display styling
Configure address colors and display intensity background -- Set the background color for this property
show Address display styling
Configure address colors and display intensity foreground -- Set the foreground color for this property
show Address display styling
Configure address colors and display intensity intensity -- Set the display intensity color for this property
Type "help show Address display styling
Configure address colors and display intensity" followed by show Address display styling
Configure address colors and display intensity subcommand name for full documentation.
Type "apropos word" to search for commands related to "word".
Command name abbreviations are allowed if unambiguous.
(gdb)
The help for 'set style function|filename' gives help for 'Show':
(gdb) help set style filename
Filename display styling
Configure filename colors and display intensity.
List of show style filename subcommands:
show style filename background -- Set the background color for this property
show style filename foreground -- Set the foreground color for this property
show style filename intensity -- Set the display intensity color for this property
The help for 'show style function|filename' is equally strange, as it speaks
about commands, instead of sub commands:
(gdb) help show style filename
Filename display styling
Configure filename colors and display intensity.
List of commands:
background -- Show the background color for this property
foreground -- Show the foreground color for this property
intensity -- Show the display intensity color for this property
Type "help" followed by command name for full documentation.
Type "apropos word" to search for commands related to "word".
Command name abbreviations are allowed if unambiguous.
(gdb)
This patch fixes all this.
Note that the 'set style' and 'show style' have the same prefix_doc:
(gdb) help show style
Style-specific settings
Configure various style-related variables, such as colors
...
(gdb) help set style
Style-specific settings
Configure various style-related variables, such as colors
...
Other similar commands (such as set|show history) have typically
a more specific prefix:
(gdb) help show history
Generic command for showing command history parameters.
...
(gdb) help set history
Generic command for setting command history parameters.
...
This could be fixed by having set_prefix_doc and show_prefix_doc instead of
the single prefix_doc argument to cli_style_option::add_setshow_commands.
That could be improved if deemed better.
2018-12-29 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* cli/cli-style.c (cli_style_option::add_setshow_commands):
Initialize m_set_prefix with "set", instead of re-assigning
m_show_prefix. Use m_set_prefix for set_list and m_show_prefix
for show_list.
(_initialize_cli_style): Correct the order of arguments in
variable_name_style.add_setshow_commands and
address_style.add_setshow_commands calls.
Diffstat (limited to 'gdb/top.c')
0 files changed, 0 insertions, 0 deletions