- add_show_from_set
- (add_set_cmd ("remotecache", class_support, var_boolean,
- (char *) &remote_dcache,
- "\
-Set cache use for remote targets.\n\
-When on, use data caching for remote targets. For many remote targets\n\
-this option can offer better throughput for reading target memory.\n\
-Unfortunately, gdb does not currently know anything about volatile\n\
-registers and thus data caching will produce incorrect results with\n\
-volatile registers are in use. By default, this option is on.",
- &setlist),
- &showlist);
-
- add_info ("dcache", dcache_info,
- "Print information on the dcache performance.");
-
+ add_setshow_boolean_cmd ("remotecache", class_support,
+ &dcache_enabled_p, _("\
+Set cache use for remote targets."), _("\
+Show cache use for remote targets."), _("\
+This used to enable the data cache for remote targets. The cache\n\
+functionality is now controlled by the memory region system and the\n\
+\"stack-cache\" flag; \"remotecache\" now does nothing and\n\
+exists only for compatibility reasons."),
+ NULL,
+ show_dcache_enabled_p,
+ &setlist, &showlist);
+
+ add_info ("dcache", info_dcache_command,
+ _("\
+Print information on the dcache performance.\n\
+Usage: info dcache [LINENUMBER]\n\
+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_prefix_cmd ("dcache", class_obscure, set_dcache_command, _("\
+Use this command to set number of lines in dcache and line-size."),
+ &dcache_set_list, "set dcache ", /*allow_unknown*/0, &setlist);
+ add_prefix_cmd ("dcache", class_obscure, show_dcache_command, _("\
+Show dcachesettings."),
+ &dcache_show_list, "show dcache ", /*allow_unknown*/0, &showlist);
+
+ add_setshow_zuinteger_cmd ("line-size", class_obscure,
+ &dcache_line_size, _("\
+Set dcache line size in bytes (must be power of 2)."), _("\
+Show dcache line size."),
+ NULL,
+ set_dcache_line_size,
+ NULL,
+ &dcache_set_list, &dcache_show_list);
+ add_setshow_zuinteger_cmd ("size", class_obscure,
+ &dcache_size, _("\
+Set number of dcache lines."), _("\
+Show number of dcache lines."),
+ NULL,
+ set_dcache_size,
+ NULL,
+ &dcache_set_list, &dcache_show_list);