From: Pedro Alves Date: Mon, 14 Feb 2011 12:54:42 +0000 (+0000) Subject: * value.c (mark_value_bytes_unavailable): Fix indexing the `bef' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bfc80c7385fe08f025e6e774655bc90441e2254;p=binutils-gdb.git * value.c (mark_value_bytes_unavailable): Fix indexing the `bef' range. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 52eac555d56..03b16fdd028 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2011-02-14 Pedro Alves + Jan Kratochvil + + * value.c (mark_value_bytes_unavailable): Fix indexing the `bef' + range. + 2011-02-14 Pedro Alves * value.c (value_bits_valid, value_bits_synthetic_pointer): diff --git a/gdb/value.c b/gdb/value.c index 2b8dd360abb..116eee269da 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -439,7 +439,7 @@ mark_value_bytes_unavailable (struct value *value, int offset, int length) i = VEC_lower_bound (range_s, value->unavailable, &newr, range_lessthan); if (i > 0) { - struct range *bef = VEC_index (range_s, value->unavailable, i - i); + struct range *bef = VEC_index (range_s, value->unavailable, i - 1); if (ranges_overlap (bef->offset, bef->length, offset, length)) {