aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-08 19:27:12 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-08 19:27:12 +0000
commitf49bacc80cb0d10690855e55b2e968cc5d3ceecd (patch)
treeee3126c1bd2e0934f00db395ddc2e22ea6effe85 /gdb/valarith.c
parentd55b850c07d19f38ab53df7931c944d12cf5c45a (diff)
downloadfsf-binutils-gdb-f49bacc80cb0d10690855e55b2e968cc5d3ceecd.zip
fsf-binutils-gdb-f49bacc80cb0d10690855e55b2e968cc5d3ceecd.tar.gz
fsf-binutils-gdb-f49bacc80cb0d10690855e55b2e968cc5d3ceecd.tar.bz2
2003-03-08 Andrew Cagney <cagney@redhat.com>
* valarith.c (value_subscripted_rvalue): Copy the array's REGNO to the result.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r--gdb/valarith.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c
index dcfd92c..ed0fe05 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -276,6 +276,7 @@ value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound
else
VALUE_LVAL (v) = VALUE_LVAL (array);
VALUE_ADDRESS (v) = VALUE_ADDRESS (array);
+ VALUE_REGNO (v) = VALUE_REGNO (array);
VALUE_OFFSET (v) = VALUE_OFFSET (array) + elt_offs;
return v;
}