aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-08-10 21:52:17 +0000
committerMichael Snyder <msnyder@vmware.com>2001-08-10 21:52:17 +0000
commit1297a2f020b41485135f3e58100d689799785ee5 (patch)
treeaa3ac40d49ddbe47907ed7d5d8de16adbba2be0b /gdb
parentdb1c0ae754021c56ee70c7ec20025d7474fd5adf (diff)
downloadgdb-1297a2f020b41485135f3e58100d689799785ee5.zip
gdb-1297a2f020b41485135f3e58100d689799785ee5.tar.gz
gdb-1297a2f020b41485135f3e58100d689799785ee5.tar.bz2
2001-08-10 Michael Snyder <msnyder@redhat.com>
* regcache.c (legacy_write_register_gen): Don't 'optimize out' a write_register to a pseudo-reg. Target_store_pseudo_register needs to get called, because these regs may be computed and may have side-effects.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/regcache.c17
2 files changed, 16 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 74cad45..25d3233 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-10 Michael Snyder <msnyder@redhat.com>
+
+ * regcache.c (legacy_write_register_gen): Don't 'optimize out'
+ a write_register to a pseudo-reg. Target_store_pseudo_register
+ needs to get called, because these regs may be computed and may
+ have side-effects.
+
2001-08-10 Keith Seitz <keiths@redhat.com>
* gdb-events.sh: Deal with event notifications with no
diff --git a/gdb/regcache.c b/gdb/regcache.c
index b939d9a..ffd13bf 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -334,15 +334,16 @@ legacy_write_register_gen (int regnum, char *myaddr)
size = REGISTER_RAW_SIZE (regnum);
- /* If we have a valid copy of the register, and new value == old value,
- then don't bother doing the actual store. */
-
- if (register_cached (regnum)
- && memcmp (register_buffer (regnum), myaddr, size) == 0)
- return;
-
if (real_register (regnum))
- target_prepare_to_store ();
+ {
+ /* If we have a valid copy of the register, and new value == old
+ value, then don't bother doing the actual store. */
+ if (register_cached (regnum)
+ && memcmp (register_buffer (regnum), myaddr, size) == 0)
+ return;
+ else
+ target_prepare_to_store ();
+ }
memcpy (register_buffer (regnum), myaddr, size);