mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
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.
This commit is contained in:
parent
db1c0ae754
commit
1297a2f020
@ -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>
|
2001-08-10 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
* gdb-events.sh: Deal with event notifications with no
|
* gdb-events.sh: Deal with event notifications with no
|
||||||
|
@ -334,15 +334,16 @@ legacy_write_register_gen (int regnum, char *myaddr)
|
|||||||
|
|
||||||
size = REGISTER_RAW_SIZE (regnum);
|
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))
|
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);
|
memcpy (register_buffer (regnum), myaddr, size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user