aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 91d3202..a0dff93 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -30,6 +30,7 @@
#include "observable.h"
#include "regset.h"
#include <unordered_map>
+#include "cli/cli-cmds.h"
/*
* DATA STRUCTURE
@@ -1382,6 +1383,8 @@ regcache::debug_print_register (const char *func, int regno)
fprintf_unfiltered (gdb_stdlog, "\n");
}
+/* Implement 'maint flush register-cache' command. */
+
static void
reg_flush_command (const char *command, int from_tty)
{
@@ -2076,14 +2079,20 @@ void _initialize_regcache ();
void
_initialize_regcache ()
{
+ struct cmd_list_element *c;
+
regcache_descr_handle
= gdbarch_data_register_post_init (init_regcache_descr);
gdb::observers::target_changed.attach (regcache_observer_target_changed);
gdb::observers::thread_ptid_changed.attach (regcache_thread_ptid_changed);
- add_com ("flushregs", class_maintenance, reg_flush_command,
- _("Force gdb to flush its register cache (maintainer command)."));
+ add_cmd ("register-cache", class_maintenance, reg_flush_command,
+ _("Force gdb to flush its register and frame cache."),
+ &maintenanceflushlist);
+ c = add_com_alias ("flushregs", "maintenance flush register-cache",
+ class_maintenance, 0);
+ deprecate_cmd (c, "maintenance flush register-cache");
#if GDB_SELF_TEST
selftests::register_test ("get_thread_arch_aspace_regcache",