aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-02-14 12:54:42 +0000
committerPedro Alves <palves@redhat.com>2011-02-14 12:54:42 +0000
commit6bfc80c7385fe08f025e6e774655bc90441e2254 (patch)
tree6f04485fb614c68d0b06605138f56b322680d586 /gdb
parente730304246e026793738f1a2d135db2de36bf567 (diff)
downloadgdb-6bfc80c7385fe08f025e6e774655bc90441e2254.zip
gdb-6bfc80c7385fe08f025e6e774655bc90441e2254.tar.gz
gdb-6bfc80c7385fe08f025e6e774655bc90441e2254.tar.bz2
* value.c (mark_value_bytes_unavailable): Fix indexing the `bef'
range.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/value.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 52eac55..03b16fd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,10 @@
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):
No longer handle NULL values.
diff --git a/gdb/value.c b/gdb/value.c
index 2b8dd36..116eee2 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))
{