2004-11-15 Andrew Cagney <cagney@gnu.org>

* findvar.c (value_of_register): Set the frame ID.
	* value.c (value_primitive_field): Copy the frame ID.
	* valops.c (value_assign): Simplify lval_register case, there's
	always a frame.
This commit is contained in:
Andrew Cagney
2004-11-15 22:17:59 +00:00
parent 4bd1d37b6f
commit 0c16dd26a8
4 changed files with 11 additions and 10 deletions

View File

@@ -602,16 +602,8 @@ value_assign (struct value *toval, struct value *fromval)
int value_reg;
/* Figure out which frame this is in currently. */
if (VALUE_LVAL (toval) == lval_register)
{
frame = get_current_frame ();
value_reg = VALUE_REGNUM (toval);
}
else
{
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_REGNUM (toval);
}
frame = frame_find_by_id (VALUE_FRAME_ID (toval));
value_reg = VALUE_REGNUM (toval);
if (!frame)
error ("Value being assigned to is no longer active.");