gdb: add add_setshow_prefix_cmd
There's a common pattern to call add_basic_prefix_cmd and add_show_prefix_cmd to add matching set and show commands. Add the add_setshow_prefix_cmd function to factor that out and use it at a few places. Change-Id: I6e9e90a30e9efb7b255bf839cac27b85d7069cfd
This commit is contained in:
parent
5ad2694b1e
commit
f54bdb6d27
34 changed files with 276 additions and 325 deletions
|
@ -169,12 +169,12 @@ _initialize_cli_logging ()
|
|||
{
|
||||
static struct cmd_list_element *set_logging_cmdlist, *show_logging_cmdlist;
|
||||
|
||||
add_basic_prefix_cmd ("logging", class_support,
|
||||
_("Set logging options."), &set_logging_cmdlist,
|
||||
0, &setlist);
|
||||
add_show_prefix_cmd ("logging", class_support,
|
||||
_("Show logging options."), &show_logging_cmdlist,
|
||||
0, &showlist);
|
||||
add_setshow_prefix_cmd ("logging", class_support,
|
||||
_("Set logging options."),
|
||||
_("Show logging options."),
|
||||
&set_logging_cmdlist, &show_logging_cmdlist,
|
||||
&setlist, &showlist);
|
||||
|
||||
add_setshow_boolean_cmd ("overwrite", class_support, &logging_overwrite, _("\
|
||||
Set whether logging overwrites or appends to the log file."), _("\
|
||||
Show whether logging overwrites or appends to the log file."), _("\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue