+
+ printf_filtered (_("Dcache %u lines of %u bytes each.\n"),
+ dcache_size,
+ dcache ? (unsigned) dcache->line_size
+ : dcache_line_size);
+
+ if (dcache == NULL || ptid_equal (dcache->ptid, null_ptid))
+ {
+ printf_filtered (_("No data cache available.\n"));
+ return;
+ }
+
+ printf_filtered (_("Contains data for %s\n"),
+ target_pid_to_str (dcache->ptid));
+
+ refcount = 0;
+
+ n = splay_tree_min (dcache->tree);
+ i = 0;
+
+ while (n)
+ {
+ struct dcache_block *db = (struct dcache_block *) n->value;
+
+ printf_filtered (_("Line %d: address %s [%d hits]\n"),
+ i, paddress (target_gdbarch (), db->addr), db->refs);
+ i++;
+ refcount += db->refs;
+
+ n = splay_tree_successor (dcache->tree, n->key);
+ }
+
+ printf_filtered (_("Cache state: %d active lines, %d hits\n"), i, refcount);
+}
+
+static void
+dcache_info (char *exp, int tty)
+{
+ dcache_info_1 (target_dcache_get (), exp);
+}
+
+static void
+set_dcache_size (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ if (dcache_size == 0)
+ {
+ dcache_size = DCACHE_DEFAULT_SIZE;
+ error (_("Dcache size must be greater than 0."));
+ }
+ target_dcache_invalidate ();
+}
+
+static void
+set_dcache_line_size (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ if (dcache_line_size < 2
+ || (dcache_line_size & (dcache_line_size - 1)) != 0)
+ {
+ unsigned d = dcache_line_size;
+ dcache_line_size = DCACHE_DEFAULT_LINE_SIZE;
+ error (_("Invalid dcache line size: %u (must be power of 2)."), d);
+ }
+ target_dcache_invalidate ();
+}
+
+static void
+set_dcache_command (char *arg, int from_tty)
+{
+ printf_unfiltered (
+ "\"set dcache\" must be followed by the name of a subcommand.\n");
+ help_list (dcache_set_list, "set dcache ", -1, gdb_stdout);
+}
+
+static void
+show_dcache_command (char *args, int from_tty)
+{
+ cmd_show_list (dcache_show_list, from_tty, "");