diff options
author | Michael Snyder <msnyder@vmware.com> | 2000-09-01 17:59:26 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2000-09-01 17:59:26 +0000 |
commit | 705152c5cda80a4d43f27349ac7d19b4d91a37a1 (patch) | |
tree | 45d11e9ee82e4a58cf2622a2487fda109b1d0461 | |
parent | 791987aff2600e4c8408168c19d3aca90a47250e (diff) | |
download | gdb-705152c5cda80a4d43f27349ac7d19b4d91a37a1.zip gdb-705152c5cda80a4d43f27349ac7d19b4d91a37a1.tar.gz gdb-705152c5cda80a4d43f27349ac7d19b4d91a37a1.tar.bz2 |
2000-09-01 Michael Snyder <msnyder@cleaver.cygnus.com>
* regcache.c (reg_flush_command): New function. Maintainer-mode
command, flushes GDB's register cache, for testing purposes.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/regcache.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1040d55..6f0bc08 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-09-01 Michael Snyder <msnyder@cleaver.cygnus.com> + + * regcache.c (reg_flush_command): New function. Maintainer-mode + command, flushes GDB's register cache, for testing purposes. + 2000-08-31 J.T. Conklin <jtc@redback.com> * dcache.c (dcache_info): Output a cache line's state vector so it diff --git a/gdb/regcache.c b/gdb/regcache.c index c7bf6dc..b46a242 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -24,6 +24,7 @@ #include "inferior.h" #include "target.h" #include "gdbarch.h" +#include "gdbcmd.h" /* * DATA STRUCTURE @@ -867,6 +868,17 @@ write_fp (CORE_ADDR val) 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) { @@ -889,4 +901,7 @@ _initialize_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)"); } |