* valops.c (value_assign): Call reinit_frame_cache when assigning

to a register.
This commit is contained in:
Jim Kingdon 1993-10-26 15:49:39 +00:00
parent 9e16fcf124
commit 79971d11cc
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Oct 26 10:41:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* valops.c (value_assign): Call reinit_frame_cache when assigning
to a register.
Mon Oct 25 11:08:59 1993 Stu Grossman (grossman at cygnus.com)
* infrun.c (wait_for_inferior): Fix PC out of objfile bounds

View File

@ -374,6 +374,12 @@ value_assign (toval, fromval)
VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
#endif
}
/* 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
on all assignments to registers for simplicity; I doubt the slowdown
matters. */
reinit_frame_cache ();
break;
case lval_reg_frame_relative:
@ -463,6 +469,9 @@ value_assign (toval, fromval)
type = VALUE_TYPE (fromval);
}
/* FIXME: This loses if fromval is a different size than toval, for
example because fromval got cast in the REGISTER_CONVERTIBLE case
above. */
val = allocate_value (type);
memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),