]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* valops.c (value_assign): Add register_update event notification
authorKeith Seitz <keiths@redhat.com>
Mon, 22 Jul 2002 22:00:25 +0000 (22:00 +0000)
committerKeith Seitz <keiths@redhat.com>
Mon, 22 Jul 2002 22:00:25 +0000 (22:00 +0000)
        for lval_register and lval_reg_frame_relative.

gdb/valops.c

index 2e60ec762fe96bb84b82a5d60c3a3a4904ec6541..70fec70da5882b90919790ae4a55dd72881c67c9 100644 (file)
@@ -678,6 +678,9 @@ value_assign (struct value *toval, struct value *fromval)
                              VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
 #endif
        }
+
+      register_update_event (VALUE_REGNO (toval));
+
       /* Assigning to the stack pointer, frame pointer, and other
          (architecture and calling convention specific) registers may
          cause the frame cache to be out of date.  We just do this
@@ -763,8 +766,11 @@ value_assign (struct value *toval, struct value *fromval)
              error ("Attempt to assign to an unmodifiable value.");
          }
 
+       if (regno > VALUE_FRAME_REGNUM (toval) + reg_offset)
+         regno = -1;
        if (register_changed_hook)
-         register_changed_hook (-1);
+         register_changed_hook (regno);
+       register_update_event (regno);
       }
       break;