* value.c (mark_value_bytes_unavailable): Fix indexing the `bef'
authorPedro Alves <palves@redhat.com>
Mon, 14 Feb 2011 12:54:42 +0000 (12:54 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 14 Feb 2011 12:54:42 +0000 (12:54 +0000)
range.

gdb/ChangeLog
gdb/value.c

index 52eac555d565b5b08cc43ed7c5e5484f29cc2267..03b16fdd028462258d4339088a24b6daa9f68e31 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-14  Pedro Alves  <pedro@codesourcery.com>
+           Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * value.c (mark_value_bytes_unavailable): Fix indexing the `bef'
+       range.
+
 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
 
        * value.c (value_bits_valid, value_bits_synthetic_pointer):
index 2b8dd360abb2a1a7d2381d4a3b653dd4f9a42e00..116eee269daee5ee645b6f291fed8fb79a591842 100644 (file)
@@ -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))
        {