From: Keith Seitz Date: Mon, 22 Jul 2002 22:00:25 +0000 (+0000) Subject: * valops.c (value_assign): Add register_update event notification X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da36a52bdc5735b7572187fab2c6b615c43107d3;p=thirdparty%2Fbinutils-gdb.git * valops.c (value_assign): Add register_update event notification for lval_register and lval_reg_frame_relative. --- diff --git a/gdb/valops.c b/gdb/valops.c index 2e60ec762fe..70fec70da58 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -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;