summaryrefslogtreecommitdiff
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
commit557ca39060baf4d139e8b6804087cde4b8bbfe9e (patch)
tree8ef9c37a1ba4638a845487fe87042595ed095016
parenta4100d2967e29eec7a436337c041c62f124da5f9 (diff)
downloadgdb-557ca39060baf4d139e8b6804087cde4b8bbfe9e.tar.gz
2003-03-08 Andrew Cagney <cagney@redhat.com>
* valarith.c (value_subscripted_rvalue): Copy the array's REGNO to the result.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/valarith.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a89411fe883..cc719a8b8ed 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-08 Andrew Cagney <cagney@redhat.com>
+
+ * valarith.c (value_subscripted_rvalue): Copy the array's REGNO to
+ the result.
+
2003-03-07 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Don't generate two macro definitions when an
diff --git a/gdb/valarith.c b/gdb/valarith.c
index dcfd92c9de8..ed0fe05f35e 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;
}