#include "inferior.h"
#include "target.h"
#include "gdbarch.h"
+#include "gdbcmd.h"
/*
* DATA STRUCTURE
Ditto for write_pc.
1999-06-08: The following were re-written so that it assumes the
- existance of a TARGET_READ_PC et.al. macro. A default generic
+ existence of a TARGET_READ_PC et.al. macro. A default generic
version of that macro is made available where needed.
Since the ``TARGET_READ_PC'' et.al. macro is going to be controlled
TARGET_WRITE_FP (val);
}
+/* ARGSUSED */
+static void
+reg_flush_command (char *command, int from_tty)
+{
+ /* Force-flush the register cache. */
+ registers_changed ();
+ if (from_tty)
+ printf_filtered ("Register cache flushed.\n");
+}
+
+
static void
build_regcache (void)
{
register_gdbarch_swap (®isters, sizeof (registers), NULL);
register_gdbarch_swap (®ister_valid, sizeof (register_valid), NULL);
register_gdbarch_swap (NULL, 0, build_regcache);
+
+ add_com ("flushregs", class_maintenance, reg_flush_command,
+ "Force gdb to flush its register cache (maintainer command)");
}