forked from Imagelibrary/binutils-gdb
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:
committed by
Simon Marchi
parent
5ad2694b1e
commit
f54bdb6d27
11
gdb/dcache.c
11
gdb/dcache.c
@@ -702,13 +702,12 @@ With no arguments, this command prints the cache configuration and a\n\
|
||||
summary of each line in the cache. With an argument, dump\"\n\
|
||||
the contents of the given line."));
|
||||
|
||||
add_basic_prefix_cmd ("dcache", class_obscure, _("\
|
||||
add_setshow_prefix_cmd ("dcache", class_obscure,
|
||||
_("\
|
||||
Use this command to set number of lines in dcache and line-size."),
|
||||
&dcache_set_list, /*allow_unknown*/0, &setlist);
|
||||
add_show_prefix_cmd ("dcache", class_obscure, _("\
|
||||
Show dcachesettings."),
|
||||
&dcache_show_list, /*allow_unknown*/0,
|
||||
&showlist);
|
||||
("Show dcache settings."),
|
||||
&dcache_set_list, &dcache_show_list,
|
||||
&setlist, &showlist);
|
||||
|
||||
add_setshow_zuinteger_cmd ("line-size", class_obscure,
|
||||
&dcache_line_size, _("\
|
||||
|
||||
Reference in New Issue
Block a user