diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-11-15 22:17:59 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-11-15 22:17:59 +0000 |
commit | 0c16dd26a8129f61b7a6fb7d9aca8fa8b21b53a8 (patch) | |
tree | 26685e16331b95b22d09796ac0d5f6642d16ecd3 /gdb/valops.c | |
parent | 4bd1d37b6f22a363637bd74a499e73f6413cf94b (diff) | |
download | gdb-0c16dd26a8129f61b7a6fb7d9aca8fa8b21b53a8.zip gdb-0c16dd26a8129f61b7a6fb7d9aca8fa8b21b53a8.tar.gz gdb-0c16dd26a8129f61b7a6fb7d9aca8fa8b21b53a8.tar.bz2 |
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.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 40290d4..fa63871 100644 --- a/gdb/valops.c +++ b/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."); |