aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-02-14 11:23:33 +0000
committerPedro Alves <palves@redhat.com>2011-02-14 11:23:33 +0000
commitc8c1c22feaaf76ddd437776a3cdeaedf4695916a (patch)
tree39a5cbfd10fae9dee763225229f2e532e4d312ef /gdb/valprint.c
parente6e4e7014d3721283cf0415cadb3c7f1a1200f7b (diff)
downloadgdb-c8c1c22feaaf76ddd437776a3cdeaedf4695916a.zip
gdb-c8c1c22feaaf76ddd437776a3cdeaedf4695916a.tar.gz
gdb-c8c1c22feaaf76ddd437776a3cdeaedf4695916a.tar.bz2
gdb/
* value.h (value_available_contents_eq): Declare. * value.c (find_first_range_overlap): New function. (value_available_contents_eq): New function. * valprint.c (val_print_array_elements): Use value_available_contents_eq. * ada-valprint.c (val_print_packed_array_elements): Use value_available_contents_eq. * jv-valprint.c (java_value_print): Use value_available_contents_eq.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 64a4b05..fd573c2 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1242,9 +1242,11 @@ val_print_array_elements (struct type *type,
rep1 = i + 1;
reps = 1;
while (rep1 < len
- && memcmp (valaddr + embedded_offset + i * eltlen,
- valaddr + embedded_offset + rep1 * eltlen,
- eltlen) == 0)
+ && value_available_contents_eq (val,
+ embedded_offset + i * eltlen,
+ val,
+ embedded_offset + rep1 * eltlen,
+ eltlen))
{
++reps;
++rep1;