forked from Imagelibrary/binutils-gdb
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:
12
gdb/valops.c
12
gdb/valops.c
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user